@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.
- package/dist/Alert.vue.es-DMPvSykx.js +1 -0
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
- package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
- package/dist/Amount.vue.es-h8wulbBG.js +1 -0
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
- package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +6 -4
- package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
- package/dist/Button.vue.es-BC4_TItq.js +1 -0
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
- package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
- package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
- package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
- package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
- package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
- package/dist/{ContentWithAsideLayout-D_T137tN.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-BZJPhvLh.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +14 -11
- package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
- package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
- package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
- package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
- package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BWXmZmGZ.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
- 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
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
- 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
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
- package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
- package/dist/Section.vue.es-BuzTXRLP.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-AxYjVFUM.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +23 -20
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
- package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
- package/dist/_flatRest.es-dFffnTpX.js +1 -0
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/api.es-B4qAAJKr.js +1 -0
- package/dist/api.es-UkfpLiLL.mjs +83 -0
- package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
- package/dist/cn.es-C7xoIs3C.js +1 -0
- package/dist/cn.es-tfxVlz02.mjs +3191 -0
- package/dist/component-ZRZIt3ZW.js +1 -0
- package/dist/component-dpA83LIN.mjs +6569 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +2612 -28
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +10 -8
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4820 -7
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/countryData.es--zJAd6LA.mjs +252 -0
- package/dist/countryData.es-D3MFzU92.js +1 -0
- package/dist/customer-CJrpbGX4.mjs +32 -0
- package/dist/customer-CcQR-JIm.js +1 -0
- package/dist/customer.es-D42Md24r.js +1 -0
- package/dist/customer.es-LIW2YmLL.mjs +30 -0
- package/dist/formatting.es-9hM8aHSg.js +1 -0
- package/dist/formatting.es-D5H_ySFv.mjs +68 -0
- package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
- package/dist/index-CI71bVGE.mjs +2521 -0
- package/dist/index-WLSPwi90.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-BBJF2O2l.js +1 -0
- package/dist/index.es-LCAKs4tH.mjs +438 -0
- package/dist/index.es.js +1 -1
- package/dist/invoices-3kVHsAXr.js +1 -0
- package/dist/{invoices-C7BHqB0g.mjs → invoices-CNK1Ushv.mjs} +15 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
- package/dist/isEmpty.es-Dycf-CD_.js +1 -0
- package/dist/{paymentMethods-BA7Kt8ti.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
- package/dist/paymentMethods-DZRf0WRl.js +1 -0
- package/dist/{payments-NTHUh5je.mjs → payments-CE9U7aKK.mjs} +1 -1
- package/dist/{payments-B8W0W6wZ.js → payments-CLt0SExf.js} +1 -1
- package/dist/pick.es-BgDAfhAl.js +1 -0
- package/dist/pick.es-DdVOyp0Q.mjs +45 -0
- package/dist/{registry-DgRnFEVF.mjs → registry-B99ZnfEn.mjs} +1 -2
- package/dist/registry-ClZ43bQn.js +1 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +1862 -162
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
- package/dist/solvimon-web.css +1 -1
- package/dist/subscriptions-CS8HTxzC.js +1 -0
- package/dist/{subscriptions-BEoXaAHw.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
- package/dist/typeGuards.es-C4nR5FkL.js +1 -0
- package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
- package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
- package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
- package/dist/useCustomer--jycAz--.mjs +25 -0
- package/dist/useCustomer-PthyTFLl.js +1 -0
- package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
- package/dist/{useIncrementalLoading-Bgs0mqyb.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
- package/dist/{useInvoiceData-B6P2VShe.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
- package/dist/{useInvoiceData-CS7hLTea.js → useInvoiceData-DvQO_nKz.js} +1 -1
- package/dist/useInvoicesList-CHkwSNO9.js +1 -0
- package/dist/{useInvoicesList-23Ra-23Z.mjs → useInvoicesList-DFhF_gp7.mjs} +260 -23
- package/dist/{usePaymentMethods-BK4unvj2.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
- package/dist/{usePaymentMethods-B8Nft16c.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
- package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
- package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
- package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
- package/package.json +14 -8
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DNWspHtC.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Cx4c8E4i.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-WRXecMCj.mjs +0 -6568
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D9_G7CyE.js +0 -1
- package/dist/component-DI3AxwdD.mjs +0 -58733
- package/dist/component-yWF07boR.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-CjBHfDXp.js +0 -1
- package/dist/paymentMethods-A-5SBmy1.js +0 -1
- package/dist/registry-SwmYGFn7.js +0 -1
- package/dist/subscriptions-DSi93KpN.js +0 -1
- package/dist/useCustomer-DkrBNt5f.mjs +0 -45
- package/dist/useCustomer-fK-w7ifj.js +0 -1
- package/dist/useIncrementalLoading-BK6N8sYW.js +0 -1
- package/dist/useInvoicesList-CIFGVsDj.js +0 -1
- package/dist/useWalletBalanceItems-DreHuOra.mjs +0 -105
- package/dist/useWalletBalanceItems-NlFk6jPD.js +0 -1
- /package/dist/{sprite-DZD704h3-CCc3Mz1x.js → sprite.svg.es-CCc3Mz1x.js} +0 -0
- /package/dist/{sprite-DZD704h3-DZD704h3.mjs → sprite.svg.es-DZD704h3.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),r=require("./customer-CcQR-JIm.js"),t=require("./useService-B67YWAcN.js");exports.useCustomer=function({customerId:u}){const{getCustomer:s,updateCustomer:c}=r.createCustomerService(),a=e.ref(),{data:o,...i}=t.useService({service:async()=>{const e=await s(u);return a.value=e,e}}),{data:n,...v}=t.useService({service:async e=>{const r=await c(u,e);return a.value=r,r}});return{customer:a,get:i,update:v}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./_Uint8Array-DxISR7XF.js"),a=require("./api.es-B4qAAJKr.js");require("./component-ZRZIt3ZW.js");const t=require("vue"),n=require("./cloneDeep-Hs8Pp07F.js");function i(e){return"data"in e&&"links"in e}exports.useIncrementalLoading=function({initialData:u=[],service:r}){const l=t.shallowRef(u),s=t.ref(e.ApiStatus.Initial),o=t.ref(null),c=t.ref(1),v=t.ref(!1),d=t.computed(()=>s.value===e.ApiStatus.Loading),f=async a=>{var t;if(!d.value)try{o.value=null,s.value=e.ApiStatus.Loading;const n=await r(a);if(!i(n))return void(s.value=e.ApiStatus.Done);v.value=!!(null==(t=n.links)?void 0:t.next),l.value=[...l.value,...n.data],s.value=e.ApiStatus.Done,c.value=a}catch(n){o.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(n),s.value=e.ApiStatus.Failed}};return{items:t.computed(()=>n.cloneDeep(l.value)),error:o,fetchInitial:async()=>await f(1),fetchMore:async()=>await f(c.value+1),fetchAll:async()=>{o.value=null,s.value=e.ApiStatus.Loading;const t=await a.getPaginatedFullList(async a=>{const t=await r(a);if(!i(t))throw s.value=e.ApiStatus.Failed,new Error("message"in t?t.message:"Request failed");return t});l.value=t.data,s.value=e.ApiStatus.Done},isPending:d,hasNextBatch:v}};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { A as ApiStatus } from "./_Uint8Array-DHE03FZr.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { g as getPaginatedFullList } from "./api.es-UkfpLiLL.mjs";
|
|
3
|
+
import "./component-dpA83LIN.mjs";
|
|
3
4
|
import { shallowRef, ref, computed } from "vue";
|
|
4
5
|
import { c as cloneDeep } from "./cloneDeep-sm9cY-u2.mjs";
|
|
6
|
+
function isApiSuccessCollectionResponse(response) {
|
|
7
|
+
return "data" in response && "links" in response;
|
|
8
|
+
}
|
|
5
9
|
function toError(error) {
|
|
6
10
|
return error instanceof Error ? error : new Error("Something went wrong while fetching data.");
|
|
7
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createInvoicesService } from "./invoices-
|
|
2
|
-
import { c as createPaymentsService } from "./payments-
|
|
1
|
+
import { c as createInvoicesService } from "./invoices-CNK1Ushv.mjs";
|
|
2
|
+
import { c as createPaymentsService } from "./payments-CE9U7aKK.mjs";
|
|
3
3
|
import { ref, onMounted } from "vue";
|
|
4
4
|
import { w as watchDebounced } from "./index-BFZ0dPh9.mjs";
|
|
5
5
|
const useData = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./invoices-
|
|
1
|
+
const e=require("./invoices-3kVHsAXr.js"),t=require("./payments-CLt0SExf.js"),n=require("vue"),a=require("./index-2jo9BSPM.js");exports.useInvoiceData=function(r){const{getInvoice:c}=e.createInvoicesService(),{getPayments:i}=t.createPaymentsService();return(({getData:e,onError:t,watchValue:r,debounce:c=200})=>{const i=n.ref(),s=n.ref(!0),o=async()=>{try{i.value=await e(r)}catch(n){null==t||t(n)}finally{s.value=!1}};return n.onMounted(async()=>{o(),r&&a.watchDebounced(r,()=>{o()},{debounce:c})}),{data:i,isPending:s}})({getData:async()=>{const[e,t]=await Promise.all([c(r),i(r)]);return{invoice:e,paymentAttempts:t}}})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./Section.vue.es-BuzTXRLP.js"),o=require("./component-ZRZIt3ZW.js"),n=require("./Amount.vue.es-h8wulbBG.js"),a=require("./Button.vue.es-BC4_TItq.js"),i=require("./Chip.vue.es-D0fkSe8a.js"),r=require("./TooltipParagraph.vue.es-kTbRGoPF.js"),l=require("./useActionDispatchProvider-CWVV_xsi.js"),s=require("./useIncrementalLoading-CAdNW-Bf.js"),c=require("./invoices-3kVHsAXr.js"),d={class:"relative"},u={class:"w-full text-sm text-left text-gray-500"},p=e.defineComponent({__name:"Table",props:{striped:{type:Boolean},stripeClass:{},hoverable:{type:Boolean},sorting:{},rounded:{type:Boolean},noBorder:{type:Boolean}},emits:["sort"],setup(t,{emit:o}){const n=t,a=o;return e.provide("striped",n.striped),e.provide("stripeClass",n.stripeClass),e.provide("hoverable",n.hoverable),e.provide("sorting",n.sorting),e.provide("emit",a),e.provide("rounded",n.rounded??!1),e.provide("noBorder",n.noBorder??!1),(t,o)=>(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("table",u,[e.renderSlot(t.$slots,"default")])]))}}),f={key:0,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"},m={key:1,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"},v=e.defineComponent({__name:"TableCellScrollShadow",props:{elRef:{}},setup(t){const o=t,n=e.ref(!1),a=e.ref(!1);return e.onMounted(()=>{var e;if((null==(e=o.elRef)?void 0:e.value)&&o.elRef.value.parentElement){const e=Array.from(o.elRef.value.parentElement.children);n.value=e[0]===o.elRef.value,a.value=e[e.length-1]===o.elRef.value}}),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.value?(e.openBlock(),e.createElementBlock("div",f)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("div",m)):e.createCommentVNode("",!0)],64))}}),h=e.defineComponent({__name:"TableCell",props:{hasPadding:{type:Boolean,default:!1}},setup(t){const o=e.inject("stripeClass")??"group-odd:bg-gray-50",n=e.inject("rounded")??!1,a=e.inject("hoverable"),i=e.inject("striped"),r=e.inject("tdLinkSlot"),l=t,s=e.ref(),c=e.computed(()=>{let e="relative transition ease-in-out px-4 py-3 text-gray-800 first:whitespace-nowrap leading-none";return i&&(e+=` group-even:bg-white ${o}`),n&&(e+=" first-of-type:rounded-l last-of-type:rounded-r overflow-clip"),l.hasPadding||(e+=" first:pl-0"),a&&(e+=" group-hover:bg-gray-50 cursor-pointer"),e});return(t,o)=>(e.openBlock(),e.createElementBlock("td",{ref_key:"el",ref:s,class:e.normalizeClass(c.value)},[s.value?(e.openBlock(),e.createBlock(v,{key:0,"el-ref":e.toRef(s.value)},null,8,["el-ref"])):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{key:1})):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")],2))}}),g=["colspan","tabindex"],_=e.defineComponent({__name:"TableHeadCell",props:{colspan:{},columnName:{},sortable:{type:Boolean},hasPadding:{type:Boolean,default:!1},tooltip:{},fixedWidth:{}},emits:["sort"],setup(t,{emit:o}){const n=o,i=e.inject("sorting"),l=t,s=e.ref(),c=e.computed(()=>!(!l.sortable||!i)&&(i.columnName===l.columnName&&(null==i?void 0:i.direction))),d=()=>{l.sortable&&i&&l.columnName&&n("sort",l.columnName)};return(o,n)=>(e.openBlock(),e.createElementBlock("th",{ref_key:"el",ref:s,style:e.normalizeStyle(t.fixedWidth?{"--col-w":`${t.fixedWidth}px`}:void 0),class:e.normalizeClass([[{"cursor-pointer":t.sortable,"first:pl-0":!t.hasPadding},t.fixedWidth?["min-w-[var(--col-w)]"]:null],"relative px-4 py-2 font-medium text-xs whitespace-nowrap select-none"]),colspan:t.colspan,tabindex:t.sortable?0:-1,scope:"col",onClick:d},[s.value?(e.openBlock(),e.createBlock(v,{key:0,"el-ref":e.toRef(s.value)},null,8,["el-ref"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass({"text-blue-700":c.value})},[e.renderSlot(o.$slots,"default")],2),t.sortable?(e.openBlock(),e.createBlock(a._sfc_main$1,{key:1,icon:c.value&&"desc"===c.value?"north":"south",class:e.normalizeClass([{"text-blue-700":c.value},"text-sm"]),size:"2xs"},null,8,["icon","class"])):e.createCommentVNode("",!0),t.tooltip?(e.openBlock(),e.createBlock(r._sfc_main,{key:2,variant:"outline"},{default:e.withCtx(()=>[e.createVNode(a._sfc_main$1,{icon:"help",size:"xs",class:"rounded drop-shadow-sm hover:bg-gray-50 hover:cursor-default -mt-0.5 ml-0.5"})]),tooltip:e.withCtx(()=>[e.createVNode(r.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(r._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.tooltip),1)]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)],14,g))}}),y=e.defineComponent({__name:"TableRow",props:{backgroundClass:{}},setup(t){const o=e.useSlots();e.provide("tdLinkSlot",o.link);const n=e.inject("noBorder");return(o,a)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(["group rounded-md",{"bg-white":!t.backgroundClass,"border-y border-gray-200":!e.unref(n)}])},[e.renderSlot(o.$slots,"default")],2))}}),b={};const k=i._export_sfc(b,[["render",function(t,o){return e.openBlock(),e.createElementBlock("tbody",null,[e.renderSlot(t.$slots,"default")])}]]),x={},B={class:"bg-white"};const C=i._export_sfc(x,[["render",function(t,o){return e.openBlock(),e.createElementBlock("thead",B,[e.renderSlot(t.$slots,"default")])}]]),w={},N={class:"bg-white"};const V=i._export_sfc(w,[["render",function(t,o){return e.openBlock(),e.createElementBlock("tr",N,[e.renderSlot(t.$slots,"default")])}]]),S={class:"grid-cols-1 gap-4"},T=["onClick"],I={class:"flex flex-col"},j={class:"mt-2 flex items-center justify-center"},z=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(t){const r=t,{formatDate:l,$t:s}=o.useIntl(),c=e.computed(()=>r.configuration.showPayButton),d=e.computed(()=>r.configuration.showViewButton),u=e.computed(()=>r.hasMoreItems);return(r,f)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(e.unref(p),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(C),null,{default:e.withCtx(()=>[e.createVNode(e.unref(V),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({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(_),{class:"hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({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(_),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({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(_),{class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({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(k),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoices,t=>(e.openBlock(),e.createBlock(e.unref(y),{key:t.id},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(h),{"has-padding":"",class:"h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",I,[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({date:t.invoice_date,format:"date",offsetType:"offsetted",timezone:t.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(h),{class:"hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({date:t.invoice_date,format:"date",offsetType:"offsetted",timezone:t.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(h),{class:"h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main),{value:t.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(h),{class:"h-14 text-right"},{default:e.withCtx(()=>[t.paid?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):c.value?(e.openBlock(),e.createBlock(e.unref(a._sfc_main),{key:1,variant:"outline",color:"gray",size:"sm",type:"button",onClick:e.withModifiers(e=>r.$emit("pay-invoice",{invoiceId:t.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({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},[d.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"absolute inset-0 h-full w-full",onClick:e=>r.$emit("view-invoice",{invoiceId:t.id})},null,8,T)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",j,[u.value?(e.openBlock(),e.createBlock(e.unref(a._sfc_main),{key:0,variant:"outline",color:"gray",size:"sm",class:"w-full",loading:t.isLoading,onClick:f[0]||(f[0]=e=>r.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),E=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(n){const{$t:a}=o.useIntl(),{dispatchAction:i}=l.useActionDispatchProvider();return(o,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(z,{configuration:n.configuration,"has-more-items":n.hasMoreItems,invoices:n.invoices,"is-loading":n.isLoading,onLoadMore:r[0]||(r[0]=e=>o.$emit("load-more")),onViewInvoice:r[1]||(r[1]=t=>e.unref(i)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:r[2]||(r[2]=t=>e.unref(i)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=E,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const o=c.createInvoicesService();return s.useIncrementalLoading({service:async n=>o.getInvoices({customerId:e,pagination:{page:n,pageSize:t}})})};
|
|
@@ -1,8 +1,245 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent, provide, openBlock, createElementBlock, createElementVNode, renderSlot, ref, onMounted, Fragment, createCommentVNode, inject, computed, normalizeClass, createBlock, toRef, unref, resolveDynamicComponent, normalizeStyle, withCtx, createVNode, createTextVNode, toDisplayString, useSlots, renderList, createSlots, withModifiers } from "vue";
|
|
2
|
+
import { _ as _sfc_main$h } from "./Section.vue.es-3-H1pUTB.mjs";
|
|
3
|
+
import { a as useIntl, _ as _sfc_main$d } from "./component-dpA83LIN.mjs";
|
|
4
|
+
import { _ as _sfc_main$e } from "./Amount.vue.es-C6JE5rL8.mjs";
|
|
5
|
+
import { a as _sfc_main$a, _ as _sfc_main$g } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
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]]);
|
|
6
243
|
const _hoisted_1 = { class: "grid-cols-1 gap-4" };
|
|
7
244
|
const _hoisted_2 = ["onClick"];
|
|
8
245
|
const _hoisted_3 = { class: "flex flex-col" };
|
|
@@ -24,7 +261,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24
261
|
const showLoadMoreButton = computed(() => props.hasMoreItems);
|
|
25
262
|
return (_ctx, _cache) => {
|
|
26
263
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
27
|
-
createVNode(unref(_sfc_main$
|
|
264
|
+
createVNode(unref(_sfc_main$9), {
|
|
28
265
|
striped: "",
|
|
29
266
|
"no-border": "",
|
|
30
267
|
rounded: "",
|
|
@@ -36,7 +273,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
36
273
|
default: withCtx(() => [
|
|
37
274
|
createVNode(unref(TableHeadRow), null, {
|
|
38
275
|
default: withCtx(() => [
|
|
39
|
-
createVNode(unref(_sfc_main$
|
|
276
|
+
createVNode(unref(_sfc_main$6), null, {
|
|
40
277
|
default: withCtx(() => [
|
|
41
278
|
createTextVNode(toDisplayString(unref($t)({
|
|
42
279
|
defaultMessage: "Invoice",
|
|
@@ -46,7 +283,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
46
283
|
]),
|
|
47
284
|
_: 1
|
|
48
285
|
}),
|
|
49
|
-
createVNode(unref(_sfc_main$
|
|
286
|
+
createVNode(unref(_sfc_main$6), { class: "hidden md:table-cell" }, {
|
|
50
287
|
default: withCtx(() => [
|
|
51
288
|
createTextVNode(toDisplayString(unref($t)({
|
|
52
289
|
defaultMessage: "Date",
|
|
@@ -56,7 +293,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
56
293
|
]),
|
|
57
294
|
_: 1
|
|
58
295
|
}),
|
|
59
|
-
createVNode(unref(_sfc_main$
|
|
296
|
+
createVNode(unref(_sfc_main$6), null, {
|
|
60
297
|
default: withCtx(() => [
|
|
61
298
|
createTextVNode(toDisplayString(unref($t)({
|
|
62
299
|
defaultMessage: "Amount",
|
|
@@ -66,7 +303,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
66
303
|
]),
|
|
67
304
|
_: 1
|
|
68
305
|
}),
|
|
69
|
-
createVNode(unref(_sfc_main$
|
|
306
|
+
createVNode(unref(_sfc_main$6), { class: "text-right" }, {
|
|
70
307
|
default: withCtx(() => [
|
|
71
308
|
createTextVNode(toDisplayString(unref($t)({
|
|
72
309
|
defaultMessage: "Status",
|
|
@@ -85,17 +322,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
85
322
|
createVNode(unref(TableBody), null, {
|
|
86
323
|
default: withCtx(() => [
|
|
87
324
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoices, (invoice) => {
|
|
88
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
325
|
+
return openBlock(), createBlock(unref(_sfc_main$5), {
|
|
89
326
|
key: invoice.id
|
|
90
327
|
}, createSlots({
|
|
91
328
|
default: withCtx(() => [
|
|
92
|
-
createVNode(unref(_sfc_main$
|
|
329
|
+
createVNode(unref(_sfc_main$7), {
|
|
93
330
|
"has-padding": "",
|
|
94
331
|
class: "h-14"
|
|
95
332
|
}, {
|
|
96
333
|
default: withCtx(() => [
|
|
97
334
|
createElementVNode("div", _hoisted_3, [
|
|
98
|
-
createVNode(unref(_sfc_main$
|
|
335
|
+
createVNode(unref(_sfc_main$d), {
|
|
99
336
|
tag: "span",
|
|
100
337
|
variant: "body-sm",
|
|
101
338
|
class: "md:hidden"
|
|
@@ -110,7 +347,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
110
347
|
]),
|
|
111
348
|
_: 2
|
|
112
349
|
}, 1024),
|
|
113
|
-
createVNode(unref(_sfc_main$
|
|
350
|
+
createVNode(unref(_sfc_main$d), {
|
|
114
351
|
tag: "span",
|
|
115
352
|
variant: "body-xs",
|
|
116
353
|
shade: "lighter"
|
|
@@ -124,7 +361,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
124
361
|
]),
|
|
125
362
|
_: 2
|
|
126
363
|
}, 1024),
|
|
127
|
-
createVNode(unref(_sfc_main$
|
|
364
|
+
createVNode(unref(_sfc_main$7), { class: "hidden h-14 md:table-cell" }, {
|
|
128
365
|
default: withCtx(() => [
|
|
129
366
|
createTextVNode(toDisplayString(unref(formatDate)({
|
|
130
367
|
date: invoice.invoice_date,
|
|
@@ -135,14 +372,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
135
372
|
]),
|
|
136
373
|
_: 2
|
|
137
374
|
}, 1024),
|
|
138
|
-
createVNode(unref(_sfc_main$
|
|
375
|
+
createVNode(unref(_sfc_main$7), { class: "h-14" }, {
|
|
139
376
|
default: withCtx(() => [
|
|
140
|
-
createVNode(unref(_sfc_main$
|
|
377
|
+
createVNode(unref(_sfc_main$d), {
|
|
141
378
|
tag: "span",
|
|
142
379
|
weight: "semibold"
|
|
143
380
|
}, {
|
|
144
381
|
default: withCtx(() => [
|
|
145
|
-
createVNode(unref(_sfc_main$
|
|
382
|
+
createVNode(unref(_sfc_main$e), {
|
|
146
383
|
value: invoice.invoice_amount_including_tax
|
|
147
384
|
}, null, 8, ["value"])
|
|
148
385
|
]),
|
|
@@ -151,9 +388,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
151
388
|
]),
|
|
152
389
|
_: 2
|
|
153
390
|
}, 1024),
|
|
154
|
-
createVNode(unref(_sfc_main$
|
|
391
|
+
createVNode(unref(_sfc_main$7), { class: "h-14 text-right" }, {
|
|
155
392
|
default: withCtx(() => [
|
|
156
|
-
invoice.paid ? (openBlock(), createBlock(unref(_sfc_main$
|
|
393
|
+
invoice.paid ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
157
394
|
key: 0,
|
|
158
395
|
color: "green"
|
|
159
396
|
}, {
|
|
@@ -165,7 +402,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
165
402
|
})), 1)
|
|
166
403
|
]),
|
|
167
404
|
_: 1
|
|
168
|
-
})) : showPayButton.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
405
|
+
})) : showPayButton.value ? (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
169
406
|
key: 1,
|
|
170
407
|
variant: "outline",
|
|
171
408
|
color: "gray",
|
|
@@ -208,7 +445,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
208
445
|
_: 1
|
|
209
446
|
}),
|
|
210
447
|
createElementVNode("div", _hoisted_4, [
|
|
211
|
-
showLoadMoreButton.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
448
|
+
showLoadMoreButton.value ? (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
212
449
|
key: 0,
|
|
213
450
|
variant: "outline",
|
|
214
451
|
color: "gray",
|
|
@@ -251,7 +488,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
251
488
|
const { $t } = useIntl();
|
|
252
489
|
const { dispatchAction } = useActionDispatchProvider();
|
|
253
490
|
return (_ctx, _cache) => {
|
|
254
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
491
|
+
return openBlock(), createBlock(unref(_sfc_main$h), {
|
|
255
492
|
"no-border": "",
|
|
256
493
|
"no-spacing": "",
|
|
257
494
|
"content-background": "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useIncrementalLoading-
|
|
1
|
+
const e=require("./useIncrementalLoading-CAdNW-Bf.js"),t=require("./paymentMethods-DZRf0WRl.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-CcnL3flF.mjs";
|
|
2
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-C-ApE-G4.mjs";
|
|
3
3
|
function usePaymentMethods({
|
|
4
4
|
customerId,
|
|
5
5
|
pageSize = 15
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./_Uint8Array-DxISR7XF.js"),t=require("vue");function r(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e.MapCache;++r<n;)this.add(t[r])}function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}r.prototype.add=r.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},r.prototype.has=function(e){return this.__data__.has(e)};function a(e,t,a,i,o,u){var c=1&a,
|
|
1
|
+
const e=require("./_Uint8Array-DxISR7XF.js"),t=require("vue");function r(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e.MapCache;++r<n;)this.add(t[r])}function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}r.prototype.add=r.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},r.prototype.has=function(e){return this.__data__.has(e)};function a(e,t,a,i,o,u){var c=1&a,s=e.length,f=t.length;if(s!=f&&!(c&&f>s))return!1;var l=u.get(e),v=u.get(t);if(l&&v)return l==t&&v==e;var p=-1,b=!0,h=2&a?new r:void 0;for(u.set(e,t),u.set(t,e);++p<s;){var y=e[p],d=t[p];if(i)var g=c?i(d,y,p,t,e,u):i(y,d,p,e,t,u);if(void 0!==g){if(g)continue;b=!1;break}if(h){if(!n(t,function(e,t){if(r=t,!h.has(r)&&(y===e||o(y,e,a,i,u)))return h.push(t);var r})){b=!1;break}}else if(y!==d&&!o(y,d,a,i,u)){b=!1;break}}return u.delete(e),u.delete(t),b}function i(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function o(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var u=e.Symbol?e.Symbol.prototype:void 0,c=u?u.valueOf:void 0;var s=Object.prototype.hasOwnProperty;var f="[object Arguments]",l="[object Array]",v="[object Object]",p=Object.prototype.hasOwnProperty;function b(t,r,n,u,b,h){var y=e.isArray(t),d=e.isArray(r),g=y?l:e.getTag(t),_=d?l:e.getTag(r),j=(g=g==f?v:g)==v,w=(_=_==f?v:_)==v,A=g==_;if(A&&e.isBuffer(t)){if(!e.isBuffer(r))return!1;y=!0,j=!1}if(A&&!j)return h||(h=new e.Stack),y||e.isTypedArray(t)?a(t,r,n,u,b,h):function(t,r,n,u,s,f,l){switch(n){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!f(new e.Uint8Array(t),new e.Uint8Array(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e.eq(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var v=i;case"[object Set]":var p=1&u;if(v||(v=o),t.size!=r.size&&!p)return!1;var b=l.get(t);if(b)return b==r;u|=2,l.set(t,r);var h=a(v(t),v(r),u,s,f,l);return l.delete(t),h;case"[object Symbol]":if(c)return c.call(t)==c.call(r)}return!1}(t,r,g,n,u,b,h);if(!(1&n)){var S=j&&p.call(t,"__wrapped__"),m=w&&p.call(r,"__wrapped__");if(S||m){var O=S?t.value():t,k=m?r.value():r;return h||(h=new e.Stack),b(O,k,n,u,h)}}return!!A&&(h||(h=new e.Stack),function(t,r,n,a,i,o){var u=1&n,c=e.getAllKeys(t),f=c.length;if(f!=e.getAllKeys(r).length&&!u)return!1;for(var l=f;l--;){var v=c[l];if(!(u?v in r:s.call(r,v)))return!1}var p=o.get(t),b=o.get(r);if(p&&b)return p==r&&b==t;var h=!0;o.set(t,r),o.set(r,t);for(var y=u;++l<f;){var d=t[v=c[l]],g=r[v];if(a)var _=u?a(g,d,v,r,t,o):a(d,g,v,t,r,o);if(!(void 0===_?d===g||i(d,g,n,a,o):_)){h=!1;break}y||(y="constructor"==v)}if(h&&!y){var j=t.constructor,w=r.constructor;j==w||!("constructor"in t)||!("constructor"in r)||"function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w||(h=!1)}return o.delete(t),o.delete(r),h}(t,r,n,u,b,h))}function h(t,r,n,a,i){return t===r||(null==t||null==r||!e.isObjectLike(t)&&!e.isObjectLike(r)?t!=t&&r!=r:b(t,r,n,a,h,i))}function y(e,t){return h(e,t)}function d(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.isEqual=y,exports.useService=function({initialValue:r,service:n,isCollection:a=!1}){const i=t.shallowRef(r),o=t.ref(e.ApiStatus.Initial),u=t.ref(null),c=t.computed(()=>o.value===e.ApiStatus.Loading);return{data:i,execute:async(...t)=>{try{o.value=e.ApiStatus.Loading,u.value=null;const s=d(await n(...t),a);return c=s,y((r=i).value,c)||(r.value=c),o.value=e.ApiStatus.Done,s}catch(s){return u.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(s),o.value=e.ApiStatus.Failed,Promise.reject()}var r,c},apiStatus:o,isPending:c,error:u}};
|