@solvimon/solvimon-web 0.1.0-alpha.5 → 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-CvUwy_tp.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +8 -5
- 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-CKbnuXMU.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-BjJufFeN.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/{useCustomerPaymentMethodOptions-BlFH4zxG.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +16 -33
- 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-DaEPSNrY.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-CLU-8-Ao.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-DAwMy1l8.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/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs} +17 -5
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Cj4cnM8z.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +24 -24
- 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 +6 -12
- 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 +4 -4
- 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 +4 -4
- 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 +12 -9
- 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 +4821 -8
- 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-CoEBP5UT.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-C2gWIbEr.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
- package/dist/paymentMethods-DZRf0WRl.js +1 -0
- package/dist/{payments-DLjkq_hN.mjs → payments-CE9U7aKK.mjs} +1 -1
- package/dist/{payments-ClJySb0d.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-bo_7pcbl.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 +1873 -172
- 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 +31 -17
- 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/{sprite-i5T7eZnk-C55G-dBo.js → sprite.svg.es-CCc3Mz1x.js} +1 -1
- package/dist/{sprite-i5T7eZnk-i5T7eZnk.mjs → sprite.svg.es-DZD704h3.mjs} +1 -1
- package/dist/subscriptions-CS8HTxzC.js +1 -0
- package/dist/{subscriptions-BepBTXR5.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-D4OtXsNA.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
- package/dist/{useActionDispatchProvider-B_SkyymZ.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-BqD4k_-r.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
- package/dist/{useInvoiceData-7mqBeSPa.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
- package/dist/{useInvoiceData-DvNf2402.js → useInvoiceData-DvQO_nKz.js} +1 -1
- package/dist/useInvoicesList-CHkwSNO9.js +1 -0
- package/dist/{useInvoicesList-B5vYDRyl.mjs → useInvoicesList-DFhF_gp7.mjs} +261 -24
- package/dist/{usePaymentMethods-BdZkt6re.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
- package/dist/{usePaymentMethods-4Io2ZHlo.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-BouYyZhD.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ck_1lRDB.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DFCX2tcj.mjs +0 -6568
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BOZurit_.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D49i1DHa.js +0 -1
- package/dist/component-B0RYS5uK.mjs +0 -58666
- package/dist/component-BeqkeC9h.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-CUrXmVXe.js +0 -1
- package/dist/paymentMethods-D_rYLg3F.js +0 -1
- package/dist/registry-EPF-VAYZ.js +0 -1
- package/dist/subscriptions-DERHtyHo.js +0 -1
- package/dist/useCustomer-C0RKKfGJ.mjs +0 -45
- package/dist/useCustomer-CEFUPIDZ.js +0 -1
- package/dist/useCustomerPaymentMethodOptions-BgCFkLeQ.js +0 -1
- package/dist/useIncrementalLoading-CDpeHhKs.js +0 -1
- package/dist/useInvoicesList-CBqZG_rw.js +0 -1
- package/dist/useWalletBalanceItems-B0NZuM3W.mjs +0 -105
- package/dist/useWalletBalanceItems-CzV3PcJH.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, renderSlot } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as _sfc_main$3 } from "./component-dpA83LIN.mjs";
|
|
3
|
+
import { a as _sfc_main$2 } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
3
4
|
const _hoisted_1$1 = { class: "flex gap-1" };
|
|
4
5
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "Kpi",
|
|
@@ -10,11 +11,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
10
11
|
setup(__props) {
|
|
11
12
|
return (_ctx, _cache) => {
|
|
12
13
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
13
|
-
createVNode(unref(_sfc_main$
|
|
14
|
+
createVNode(unref(_sfc_main$2), {
|
|
14
15
|
icon: __props.icon,
|
|
15
16
|
size: "xs"
|
|
16
17
|
}, null, 8, ["icon"]),
|
|
17
|
-
createVNode(unref(_sfc_main$
|
|
18
|
+
createVNode(unref(_sfc_main$3), { variant: "body-xs" }, {
|
|
18
19
|
default: withCtx(() => [
|
|
19
20
|
createTextVNode(toDisplayString(__props.kpi), 1)
|
|
20
21
|
]),
|
|
@@ -39,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
40
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
40
41
|
createElementVNode("div", _hoisted_2, [
|
|
41
42
|
createElementVNode("div", _hoisted_3, [
|
|
42
|
-
createVNode(unref(_sfc_main$
|
|
43
|
+
createVNode(unref(_sfc_main$3), {
|
|
43
44
|
tag: "span",
|
|
44
45
|
variant: "body-sm",
|
|
45
46
|
weight: "semibold"
|
|
@@ -51,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
52
|
}),
|
|
52
53
|
renderSlot(_ctx.$slots, "badge")
|
|
53
54
|
]),
|
|
54
|
-
createVNode(unref(_sfc_main$
|
|
55
|
+
createVNode(unref(_sfc_main$3), {
|
|
55
56
|
tag: "span",
|
|
56
57
|
variant: "body-xs",
|
|
57
58
|
shade: "lighter"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./component-ZRZIt3ZW.js"),n=require("./Button.vue.es-BC4_TItq.js"),i={class:"flex gap-1"},a=e.defineComponent({__name:"Kpi",props:{icon:{type:null},kpi:{type:String}},setup:a=>(o,r)=>(e.openBlock(),e.createElementBlock("div",i,[e.createVNode(e.unref(n._sfc_main$1),{icon:a.icon,size:"xs"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main),{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.kpi),1)]),_:1})]))}),o={class:"flex items-start"},r={class:"flex flex-col grow"},s={class:"flex items-center gap-1"},c={class:"flex items-center ml-4 self-center"},l=e.defineComponent({__name:"PricingGroupContent",props:{name:{type:String},description:{type:String}},setup:n=>(i,a)=>(e.openBlock(),e.createElementBlock("div",o,[e.createElementVNode("div",r,[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:1}),e.renderSlot(i.$slots,"badge")]),e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.description),1)]),_:1})]),e.createElementVNode("div",c,[e.renderSlot(i.$slots,"default")])]))});exports._sfc_main=l,exports._sfc_main$1=a;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, resolveDynamicComponent, createVNode, createSlots, createTextVNode, toDisplayString, createElementVNode, normalizeClass } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "./component-dpA83LIN.mjs";
|
|
3
|
+
const _hoisted_1 = { class: "flex gap-4 items-center" };
|
|
4
|
+
const _hoisted_2 = { key: 1 };
|
|
5
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "SectionTitle",
|
|
7
|
+
setup(__props) {
|
|
8
|
+
return (_ctx, _cache) => {
|
|
9
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
10
|
+
_ctx.$slots.default ? (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
11
|
+
key: 0,
|
|
12
|
+
tag: "h2",
|
|
13
|
+
variant: "heading-3",
|
|
14
|
+
class: "grow"
|
|
15
|
+
}, {
|
|
16
|
+
default: withCtx(() => [
|
|
17
|
+
renderSlot(_ctx.$slots, "default")
|
|
18
|
+
]),
|
|
19
|
+
_: 3
|
|
20
|
+
})) : createCommentVNode("", true),
|
|
21
|
+
_ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
22
|
+
renderSlot(_ctx.$slots, "right")
|
|
23
|
+
])) : createCommentVNode("", true)
|
|
24
|
+
]);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
29
|
+
__name: "Section",
|
|
30
|
+
props: {
|
|
31
|
+
contentClasses: {},
|
|
32
|
+
contentBackground: { default: "gray" },
|
|
33
|
+
title: {},
|
|
34
|
+
noSpacing: { type: Boolean },
|
|
35
|
+
hasError: { type: Boolean },
|
|
36
|
+
noBorder: { type: Boolean, default: false }
|
|
37
|
+
},
|
|
38
|
+
setup(__props) {
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.title ? "section" : "div"), null, {
|
|
41
|
+
default: withCtx(() => [
|
|
42
|
+
createVNode(_sfc_main$1, null, createSlots({ _: 2 }, [
|
|
43
|
+
__props.title ? {
|
|
44
|
+
name: "default",
|
|
45
|
+
fn: withCtx(() => [
|
|
46
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
47
|
+
]),
|
|
48
|
+
key: "0"
|
|
49
|
+
} : void 0,
|
|
50
|
+
_ctx.$slots.right ? {
|
|
51
|
+
name: "right",
|
|
52
|
+
fn: withCtx(() => [
|
|
53
|
+
renderSlot(_ctx.$slots, "right")
|
|
54
|
+
]),
|
|
55
|
+
key: "1"
|
|
56
|
+
} : void 0
|
|
57
|
+
]), 1024),
|
|
58
|
+
createElementVNode("div", {
|
|
59
|
+
class: normalizeClass({
|
|
60
|
+
"rounded border": !__props.noBorder,
|
|
61
|
+
"p-3 py-2": !__props.noSpacing,
|
|
62
|
+
"bg-gray-50/50": __props.contentBackground === "gray",
|
|
63
|
+
"mt-1 md:mt-2": !!__props.title,
|
|
64
|
+
[__props.contentClasses ?? ""]: !!__props.contentClasses,
|
|
65
|
+
"border-red-600": __props.hasError,
|
|
66
|
+
"border-gray-100": !__props.hasError
|
|
67
|
+
})
|
|
68
|
+
}, [
|
|
69
|
+
renderSlot(_ctx.$slots, "default")
|
|
70
|
+
], 2)
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
_sfc_main as _
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./component-ZRZIt3ZW.js"),o={class:"flex gap-4 items-center"},n={key:1},r=e.defineComponent({__name:"SectionTitle",setup:r=>(r,l)=>(e.openBlock(),e.createElementBlock("div",o,[r.$slots.default?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,tag:"h2",variant:"heading-3",class:"grow"},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3})):e.createCommentVNode("",!0),r.$slots.right?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(r.$slots,"right")])):e.createCommentVNode("",!0)]))}),l=e.defineComponent({__name:"Section",props:{contentClasses:{},contentBackground:{default:"gray"},title:{},noSpacing:{type:Boolean},hasError:{type:Boolean},noBorder:{type:Boolean,default:!1}},setup:t=>(o,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.title?"section":"div"),null,{default:e.withCtx(()=>[e.createVNode(r,null,e.createSlots({_:2},[t.title?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),key:"0"}:void 0,o.$slots.right?{name:"right",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"right")]),key:"1"}:void 0]),1024),e.createElementVNode("div",{class:e.normalizeClass({"rounded border":!t.noBorder,"p-3 py-2":!t.noSpacing,"bg-gray-50/50":"gray"===t.contentBackground,"mt-1 md:mt-2":!!t.title,[t.contentClasses??""]:!!t.contentClasses,"border-red-600":t.hasError,"border-gray-100":!t.hasError})},[e.renderSlot(o.$slots,"default")],2)]),_:3}))});exports._sfc_main=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=["data-testid"],r=["data-testid"],a=["data-testid"],d=["data-testid"],n=e.defineComponent({__name:"Skeleton",props:{variant:{type:String},class:{type:String},dataTestid:{type:String}},setup(n){const o=e.useSlots(),s=t=>{if(null==t||!1===t)return!0;if("string"==typeof t||"number"==typeof t)return 0===String(t).trim().length;if(Array.isArray(t))return t.every(s);if(!e.isVNode(t))return!1;const r=t;return r.type===e.Comment||(r.type===e.Text?"string"!=typeof r.children||!r.children.trim():r.type===e.Fragment&&(null==r.children||!!Array.isArray(r.children)&&r.children.every(s)))},l=e.computed(()=>{if(!o.default)return!1;const e=o.default({});return!(!e||0===e.length)&&!e.every(s)});return(o,s)=>l.value?e.renderSlot(o.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},["title"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},o.$attrs,{"data-testid":n.dataTestid,class:"h-6 w-40 rounded border border-gray-50 bg-gray-50/50"}),null,16,t)):"divider-text"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},o.$attrs,{"data-testid":n.dataTestid,class:"mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"}),null,16,r)):"section"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2},o.$attrs,{"data-testid":n.dataTestid}),[s[0]||(s[0]=e.createElementVNode("div",{class:"h-6 w-40 rounded border border-gray-50 bg-gray-50/50"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["mt-1 rounded border border-gray-50 bg-gray-50/50 md:mt-2",o.$props.class])},null,2)],16,a)):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:3},o.$attrs,{"data-testid":n.dataTestid,class:["rounded border border-gray-50 bg-gray-50/50",o.$props.class]}),null,16,d))],64))}});exports._sfc_main=n;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, renderSlot, openBlock, createElementBlock, Fragment, mergeProps,
|
|
1
|
+
import { defineComponent, useSlots, computed, renderSlot, openBlock, createElementBlock, Fragment, mergeProps, createElementVNode, normalizeClass, isVNode, Comment, Text } from "vue";
|
|
2
|
+
const _hoisted_1 = ["data-testid"];
|
|
3
|
+
const _hoisted_2 = ["data-testid"];
|
|
4
|
+
const _hoisted_3 = ["data-testid"];
|
|
5
|
+
const _hoisted_4 = ["data-testid"];
|
|
2
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
7
|
__name: "Skeleton",
|
|
4
8
|
props: {
|
|
5
9
|
variant: { type: String },
|
|
6
|
-
class: { type: String }
|
|
10
|
+
class: { type: String },
|
|
11
|
+
dataTestid: { type: String }
|
|
7
12
|
},
|
|
8
13
|
setup(__props) {
|
|
9
14
|
const slots = useSlots();
|
|
@@ -43,7 +48,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
48
|
});
|
|
44
49
|
return (_ctx, _cache) => {
|
|
45
50
|
return hasSlotContent.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
46
|
-
__props.variant === "title" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
51
|
+
__props.variant === "title" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
52
|
+
"data-testid": __props.dataTestid,
|
|
53
|
+
class: "h-6 w-40 rounded border border-gray-50 bg-gray-50/50"
|
|
54
|
+
}), null, 16, _hoisted_1)) : __props.variant === "divider-text" ? (openBlock(), createElementBlock("div", mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
55
|
+
"data-testid": __props.dataTestid,
|
|
56
|
+
class: "mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"
|
|
57
|
+
}), null, 16, _hoisted_2)) : __props.variant === "section" ? (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, _ctx.$attrs, { "data-testid": __props.dataTestid }), [
|
|
47
58
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-6 w-40 rounded border border-gray-50 bg-gray-50/50" }, null, -1)),
|
|
48
59
|
createElementVNode("div", {
|
|
49
60
|
class: normalizeClass([
|
|
@@ -51,9 +62,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
62
|
_ctx.$props.class
|
|
52
63
|
])
|
|
53
64
|
}, null, 2)
|
|
54
|
-
], 16)) : (openBlock(), createElementBlock("div", mergeProps({ key: 3 }, _ctx.$attrs, {
|
|
65
|
+
], 16, _hoisted_3)) : (openBlock(), createElementBlock("div", mergeProps({ key: 3 }, _ctx.$attrs, {
|
|
66
|
+
"data-testid": __props.dataTestid,
|
|
55
67
|
class: ["rounded border border-gray-50 bg-gray-50/50", _ctx.$props.class]
|
|
56
|
-
}), null, 16))
|
|
68
|
+
}), null, 16, _hoisted_4))
|
|
57
69
|
], 64));
|
|
58
70
|
};
|
|
59
71
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createSubscriptionsService } from "./subscriptions-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-CcnL3flF.mjs";
|
|
2
|
+
import { c as createSubscriptionsService } from "./subscriptions-CoeCrY1I.mjs";
|
|
3
3
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import { _ as _sfc_main$
|
|
6
|
-
import {
|
|
4
|
+
import { _ as _sfc_main$3 } from "./Section.vue.es-3-H1pUTB.mjs";
|
|
5
|
+
import { _ as _sfc_main$6 } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
6
|
+
import { a as useIntl, _ as _sfc_main$4 } from "./component-dpA83LIN.mjs";
|
|
7
|
+
import { _ as _sfc_main$5 } from "./PaymentMethod.vue.es-nXZoQjG3.mjs";
|
|
8
|
+
import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
9
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-eO2qFPGv.mjs";
|
|
7
10
|
function useSubscriptionsList({
|
|
8
11
|
customerId,
|
|
9
12
|
batchSize: pageSize = 15
|
|
@@ -79,11 +82,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
79
82
|
);
|
|
80
83
|
const isDetailButtonVisible = computed(() => props.showViewSubscriptionDetailsButton);
|
|
81
84
|
return (_ctx, _cache) => {
|
|
82
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
85
|
+
return openBlock(), createBlock(unref(_sfc_main$3), null, {
|
|
83
86
|
default: withCtx(() => [
|
|
84
87
|
createElementVNode("div", _hoisted_1$1, [
|
|
85
88
|
createElementVNode("div", _hoisted_2, [
|
|
86
|
-
createVNode(unref(_sfc_main$
|
|
89
|
+
createVNode(unref(_sfc_main$4), {
|
|
87
90
|
tag: "h3",
|
|
88
91
|
variant: "heading-2"
|
|
89
92
|
}, {
|
|
@@ -92,7 +95,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
92
95
|
]),
|
|
93
96
|
_: 1
|
|
94
97
|
}),
|
|
95
|
-
subscriptionDescription.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
98
|
+
subscriptionDescription.value ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
96
99
|
key: 0,
|
|
97
100
|
variant: "body-sm",
|
|
98
101
|
tag: "span",
|
|
@@ -104,13 +107,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
104
107
|
_: 1
|
|
105
108
|
})) : createCommentVNode("", true),
|
|
106
109
|
createElementVNode("div", _hoisted_3, [
|
|
107
|
-
__props.paymentMethod ? (openBlock(), createBlock(unref(_sfc_main$
|
|
110
|
+
__props.paymentMethod ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
108
111
|
key: 0,
|
|
109
112
|
variant: "condensed",
|
|
110
113
|
"payment-method": __props.paymentMethod
|
|
111
114
|
}, null, 8, ["payment-method"])) : createCommentVNode("", true),
|
|
112
115
|
__props.subscription.next_invoice ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
113
|
-
createVNode(unref(_sfc_main$
|
|
116
|
+
createVNode(unref(_sfc_main$4), {
|
|
114
117
|
tag: "span",
|
|
115
118
|
variant: "body-xs",
|
|
116
119
|
shade: "light",
|
|
@@ -125,7 +128,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
125
128
|
]),
|
|
126
129
|
_: 1
|
|
127
130
|
}),
|
|
128
|
-
createVNode(unref(_sfc_main$
|
|
131
|
+
createVNode(unref(_sfc_main$4), {
|
|
129
132
|
tag: "span",
|
|
130
133
|
variant: "body-xs",
|
|
131
134
|
shade: "light"
|
|
@@ -144,7 +147,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
144
147
|
])
|
|
145
148
|
]),
|
|
146
149
|
createElementVNode("div", _hoisted_5, [
|
|
147
|
-
isDetailButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
150
|
+
isDetailButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
148
151
|
key: 0,
|
|
149
152
|
color: "primary",
|
|
150
153
|
class: "w-full md:w-auto",
|
|
@@ -160,7 +163,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
160
163
|
]),
|
|
161
164
|
_: 1
|
|
162
165
|
})) : createCommentVNode("", true),
|
|
163
|
-
isCancelButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
166
|
+
isCancelButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
164
167
|
key: 1,
|
|
165
168
|
variant: "outline",
|
|
166
169
|
color: "gray",
|
|
@@ -176,7 +179,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
176
179
|
})), 1)
|
|
177
180
|
]),
|
|
178
181
|
_: 1
|
|
179
|
-
})) : isRenewButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
182
|
+
})) : isRenewButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
180
183
|
key: 2,
|
|
181
184
|
variant: "outline",
|
|
182
185
|
color: "gray",
|
|
@@ -228,7 +231,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
228
231
|
};
|
|
229
232
|
const isViewAllButtonVisible = computed(() => props.showViewAllButton);
|
|
230
233
|
return (_ctx, _cache) => {
|
|
231
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
234
|
+
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
232
235
|
"no-spacing": "",
|
|
233
236
|
"no-border": "",
|
|
234
237
|
title: unref($t)(
|
|
@@ -241,9 +244,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
241
244
|
)
|
|
242
245
|
}, createSlots({
|
|
243
246
|
default: withCtx(() => [
|
|
244
|
-
!hasSubscriptions.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
247
|
+
!hasSubscriptions.value ? (openBlock(), createBlock(unref(_sfc_main$3), { key: 0 }, {
|
|
245
248
|
default: withCtx(() => [
|
|
246
|
-
createVNode(unref(_sfc_main$
|
|
249
|
+
createVNode(unref(_sfc_main$4), {
|
|
247
250
|
tag: "h3",
|
|
248
251
|
variant: "heading-3"
|
|
249
252
|
}, {
|
|
@@ -256,7 +259,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
256
259
|
]),
|
|
257
260
|
_: 1
|
|
258
261
|
}),
|
|
259
|
-
createVNode(unref(_sfc_main$
|
|
262
|
+
createVNode(unref(_sfc_main$4), {
|
|
260
263
|
variant: "body-xs",
|
|
261
264
|
shade: "lighter"
|
|
262
265
|
}, {
|
|
@@ -281,13 +284,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
281
284
|
"show-view-subscription-details-button": __props.showViewDetailsButton,
|
|
282
285
|
"show-cancel-subscription-button": __props.showCancelButton,
|
|
283
286
|
"show-renew-subscription-button": __props.showRenewButton,
|
|
284
|
-
"show-view-all-button": __props.showViewAllButton,
|
|
285
|
-
"show-cancel-button": __props.showCancelButton,
|
|
286
|
-
"show-renew-button": __props.showRenewButton,
|
|
287
287
|
onViewSubscriptionDetails: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("view-subscription-details", $event)),
|
|
288
288
|
onCancelSubscription: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("cancel-subscription", $event)),
|
|
289
289
|
onRenewSubscription: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("renew-subscription", $event))
|
|
290
|
-
}, null, 8, ["subscription", "payment-method", "customer", "show-view-subscription-details-button", "show-cancel-subscription-button", "show-renew-subscription-button"
|
|
290
|
+
}, null, 8, ["subscription", "payment-method", "customer", "show-view-subscription-details-button", "show-cancel-subscription-button", "show-renew-subscription-button"]);
|
|
291
291
|
}), 128))
|
|
292
292
|
]))
|
|
293
293
|
]),
|
|
@@ -296,7 +296,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
296
296
|
isViewAllButtonVisible.value ? {
|
|
297
297
|
name: "right",
|
|
298
298
|
fn: withCtx(() => [
|
|
299
|
-
createVNode(unref(_sfc_main$
|
|
299
|
+
createVNode(unref(_sfc_main$6), {
|
|
300
300
|
size: "sm",
|
|
301
301
|
variant: "ghost",
|
|
302
302
|
color: "gray",
|
|
@@ -334,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
334
334
|
const { dispatchAction } = useActionDispatchProvider();
|
|
335
335
|
return (_ctx, _cache) => {
|
|
336
336
|
var _a, _b, _c, _d;
|
|
337
|
-
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$
|
|
337
|
+
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$7, {
|
|
338
338
|
key: 0,
|
|
339
339
|
variant: "section",
|
|
340
340
|
class: "min-h-[100px]",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useIncrementalLoading-CAdNW-Bf.js"),t=require("./subscriptions-CS8HTxzC.js"),i=require("vue"),o=require("./Section.vue.es-BuzTXRLP.js"),n=require("./Button.vue.es-BC4_TItq.js"),s=require("./component-ZRZIt3ZW.js"),r=require("./PaymentMethod.vue.es-DYlnmZh7.js"),c=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),a=require("./useActionDispatchProvider-CWVV_xsi.js");const u={class:"flex flex-col gap-4 md:flex-row"},l={class:"grow"},p={class:"mt-4 flex items-center gap-6"},d={key:1,class:"flex gap-1"},b={class:"flex flex-col items-center gap-2 md:flex-row"},m=i.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0},showCancelSubscriptionButton:{type:Boolean,default:!0},showRenewSubscriptionButton:{type:Boolean,default:!0}},emits:["view-subscription-details","cancel-subscription","renew-subscription"],setup(e){const t=e,{$t:c}=s.useIntl(),{formatDate:a}=s.useIntl(),m=i.computed(()=>{var e;const i=t.subscription.pricing_plan_schedule_infos;if(0===i.length)return;const o=i[i.length-1];return null==(e=null==o?void 0:o.pricing_plan_version)?void 0:e.pricing_plan}),f=i.computed(()=>{var e;return t.subscription.name||(null==(e=m.value)?void 0:e.name)||c({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})}),h=i.computed(()=>{var e;return null==(e=m.value)?void 0:e.description}),w=i.computed(()=>{const e=t.subscription.inactive_periods;return!e||0===e.length}),_=i.computed(()=>{const e=t.subscription.inactive_periods;return Array.isArray(e)&&e.length>0}),v=i.computed(()=>w.value&&t.showCancelSubscriptionButton),g=i.computed(()=>_.value&&t.showRenewSubscriptionButton),y=i.computed(()=>t.showViewSubscriptionDetailsButton);return(t,m)=>(i.openBlock(),i.createBlock(i.unref(o._sfc_main),null,{default:i.withCtx(()=>[i.createElementVNode("div",u,[i.createElementVNode("div",l,[i.createVNode(i.unref(s._sfc_main),{tag:"h3",variant:"heading-2"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(f.value),1)]),_:1}),h.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main),{key:0,variant:"body-sm",tag:"span",shade:"lighter"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h.value),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",p,[e.paymentMethod?(i.openBlock(),i.createBlock(i.unref(r._sfc_main),{key:0,variant:"condensed","payment-method":e.paymentMethod},null,8,["payment-method"])):i.createCommentVNode("",!0),e.subscription.next_invoice?(i.openBlock(),i.createElementBlock("div",d,[i.createVNode(i.unref(s._sfc_main),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(c)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),i.createVNode(i.unref(s._sfc_main),{tag:"span",variant:"body-xs",shade:"light"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(a)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",b,[y.value?(i.openBlock(),i.createBlock(i.unref(n._sfc_main),{key:0,color:"primary",class:"w-full md:w-auto",type:"button",onClick:m[0]||(m[0]=i=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(c)({defaultMessage:"Subscription details",description:"The label for the subscription details button in the subscriptions block",id:"customer.subscriptions_block.show_details_button_label"})),1)]),_:1})):i.createCommentVNode("",!0),v.value?(i.openBlock(),i.createBlock(i.unref(n._sfc_main),{key:1,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:m[1]||(m[1]=i=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(c)({defaultMessage:"Cancel subscription",description:"The label for the cancel subscription button in the subscriptions block",id:"customer.subscriptions_block.cancel_button_label"})),1)]),_:1})):g.value?(i.openBlock(),i.createBlock(i.unref(n._sfc_main),{key:2,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:m[2]||(m[2]=i=>t.$emit("renew-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(c)({defaultMessage:"Renew subscription",description:"The label for the renew subscription button in the subscriptions block",id:"customer.subscriptions_block.renew_button_label"})),1)]),_:1})):i.createCommentVNode("",!0)])])]),_:1}))}}),f={key:1,class:"grid grid-cols-1 gap-4"},h=i.defineComponent({__name:"SubscriptionsList",props:{customer:{type:Object},subscriptions:{type:Array},paymentMethods:{default:()=>[],type:Array},isLoading:{type:Boolean},showViewAllButton:{type:Boolean,default:!0},showViewDetailsButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showRenewButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","cancel-subscription","renew-subscription","load-more"],setup(e){const t=e,{$t:r}=s.useIntl(),c=i.computed(()=>t.subscriptions.length>0),a=e=>{if(e)return t.paymentMethods.find(({id:t})=>t===e)},u=i.computed(()=>t.showViewAllButton);return(t,l)=>(i.openBlock(),i.createBlock(i.unref(o._sfc_main),{"no-spacing":"","no-border":"",title:i.unref(r)({defaultMessage:"{count, plural, one {My subscription} other {My subscriptions}}",description:"Title for the subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.title"},{count:String(e.subscriptions.length)})},i.createSlots({default:i.withCtx(()=>[c.value?(i.openBlock(),i.createElementBlock("div",f,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.subscriptions,o=>(i.openBlock(),i.createBlock(m,{key:o.id,subscription:o,"payment-method":a(o.payment_method_id),customer:e.customer,"show-view-subscription-details-button":e.showViewDetailsButton,"show-cancel-subscription-button":e.showCancelButton,"show-renew-subscription-button":e.showRenewButton,onViewSubscriptionDetails:l[1]||(l[1]=e=>t.$emit("view-subscription-details",e)),onCancelSubscription:l[2]||(l[2]=e=>t.$emit("cancel-subscription",e)),onRenewSubscription:l[3]||(l[3]=e=>t.$emit("renew-subscription",e))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button","show-cancel-subscription-button","show-renew-subscription-button"]))),128))])):(i.openBlock(),i.createBlock(i.unref(o._sfc_main),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main),{tag:"h3",variant:"heading-3"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)({defaultMessage:"No subscriptions",description:"Title for the my subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.no_active_subscription_title"})),1)]),_:1}),i.createVNode(i.unref(s._sfc_main),{variant:"body-xs",shade:"lighter"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)({defaultMessage:"There’s no active subscription to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.subscriptions_block.no_active_subscription_content"})),1)]),_:1})]),_:1}))]),_:2},[u.value?{name:"right",fn:i.withCtx(()=>[i.createVNode(i.unref(n._sfc_main),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:l[0]||(l[0]=e=>t.$emit("view-all-subscriptions"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)({defaultMessage:"View all",description:"The text for the view all subscriptions button",id:"customer_overview.subscriptions_block.view_all_button_label"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),w=i.defineComponent({__name:"SubscriptionsList",props:{customer:{type:null},subscriptions:{type:Array},paymentMethods:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(e){const{dispatchAction:t}=a.useActionDispatchProvider();return(o,n)=>{var s,r,a,u;return e.isLoading?(i.openBlock(),i.createBlock(c._sfc_main,{key:0,variant:"section",class:"min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):e.customer?(i.openBlock(),i.createBlock(h,{key:1,customer:e.customer,subscriptions:e.subscriptions,"payment-methods":e.paymentMethods,"is-loading":e.isLoading,"show-view-all-button":null==(s=e.configuration)?void 0:s.showViewAllButton,"show-view-details-button":null==(r=e.configuration)?void 0:r.showViewDetailsButton,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,onViewSubscriptionDetails:n[0]||(n[0]=e=>i.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:n[1]||(n[1]=e=>i.unref(t)({action:"view-all-subscriptions"})),onCancelSubscription:n[2]||(n[2]=e=>i.unref(t)({action:"cancel-subscription",data:{subscriptionId:e.subscriptionId}})),onRenewSubscription:n[3]||(n[3]=e=>i.unref(t)({action:"renew-subscription",data:{subscriptionId:e.subscriptionId}})),onLoadMore:n[4]||(n[4]=e=>o.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button","show-cancel-button","show-renew-button"])):i.createCommentVNode("",!0)}}});exports._sfc_main=w,exports.useSubscriptionsList=function({customerId:i,batchSize:o=15}){const n=t.createSubscriptionsService();return e.useIncrementalLoading({service:async e=>n.getActiveSubscriptions({customerId:i,pagination:{page:e,pageSize:o}})})};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { defineComponent, ref, inject, provide, openBlock, createElementBlock, Fragment, createElementVNode, mergeProps, normalizeStyle, renderSlot, unref, createBlock, Teleport, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { u as useFloating, o as offset, f as flip, a as autoUpdate, b as _export_sfc } from "./Chip.vue.es-DcW2CjUA.mjs";
|
|
3
|
+
import { T as TOOLTIP_PORTAL_NAME, e as TOOLTIP_DARK_MODE_INJECT_KEY, _ as _sfc_main$3 } from "./component-dpA83LIN.mjs";
|
|
4
|
+
const _hoisted_1$1 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "px-3 mb-1"
|
|
7
|
+
};
|
|
8
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "Tooltip",
|
|
10
|
+
props: {
|
|
11
|
+
variant: { default: "default" },
|
|
12
|
+
placement: { default: "bottom-end" },
|
|
13
|
+
offset: { default: 4 },
|
|
14
|
+
maxWidth: { default: "xs" },
|
|
15
|
+
rootClass: {},
|
|
16
|
+
title: {},
|
|
17
|
+
isDarkMode: { type: Boolean }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const triggerRef = ref();
|
|
22
|
+
const tooltipRef = ref(null);
|
|
23
|
+
const isVisible = ref(false);
|
|
24
|
+
const tooltipTeleportTarget = inject(TOOLTIP_PORTAL_NAME);
|
|
25
|
+
const { floatingStyles } = useFloating(triggerRef, tooltipRef, {
|
|
26
|
+
whileElementsMounted: autoUpdate,
|
|
27
|
+
placement: props.placement,
|
|
28
|
+
middleware: [offset(props.offset), flip()]
|
|
29
|
+
});
|
|
30
|
+
provide(TOOLTIP_DARK_MODE_INJECT_KEY, props.isDarkMode);
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
33
|
+
createElementVNode("span", mergeProps(_ctx.$attrs, {
|
|
34
|
+
ref_key: "triggerRef",
|
|
35
|
+
ref: triggerRef,
|
|
36
|
+
class: "relative leading-none",
|
|
37
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => isVisible.value = true),
|
|
38
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => isVisible.value = false)
|
|
39
|
+
}), [
|
|
40
|
+
createElementVNode("span", {
|
|
41
|
+
class: "absolute",
|
|
42
|
+
style: normalizeStyle({
|
|
43
|
+
inset: `-${__props.offset}px`
|
|
44
|
+
})
|
|
45
|
+
}, null, 4),
|
|
46
|
+
renderSlot(_ctx.$slots, "default")
|
|
47
|
+
], 16),
|
|
48
|
+
unref(tooltipTeleportTarget) ? (openBlock(), createBlock(Teleport, {
|
|
49
|
+
key: 0,
|
|
50
|
+
to: unref(tooltipTeleportTarget)
|
|
51
|
+
}, [
|
|
52
|
+
isVisible.value ? (openBlock(), createElementBlock("div", {
|
|
53
|
+
key: 0,
|
|
54
|
+
ref_key: "tooltipRef",
|
|
55
|
+
ref: tooltipRef,
|
|
56
|
+
style: normalizeStyle(unref(floatingStyles)),
|
|
57
|
+
class: normalizeClass(["border z-70 shadow-md", [
|
|
58
|
+
__props.rootClass,
|
|
59
|
+
`max-w-${__props.maxWidth}`,
|
|
60
|
+
{
|
|
61
|
+
"border-gray-200 rounded bg-white": !__props.isDarkMode,
|
|
62
|
+
"border-gray-700 rounded bg-gray-700": __props.isDarkMode
|
|
63
|
+
}
|
|
64
|
+
]]),
|
|
65
|
+
onMouseenter: _cache[2] || (_cache[2] = ($event) => isVisible.value = true),
|
|
66
|
+
onMouseleave: _cache[3] || (_cache[3] = ($event) => isVisible.value = false)
|
|
67
|
+
}, [
|
|
68
|
+
createElementVNode("div", {
|
|
69
|
+
class: normalizeClass(["rounded", {
|
|
70
|
+
"border-gray-50 bg-gray-50": __props.variant === "outline" && !__props.isDarkMode,
|
|
71
|
+
"border-gray-600 bg-gray-600": __props.variant === "outline" && __props.isDarkMode,
|
|
72
|
+
"border-4": __props.variant === "outline" && !__props.title,
|
|
73
|
+
"border-2": __props.variant === "outline" && __props.title,
|
|
74
|
+
"pt-0": !!__props.title
|
|
75
|
+
}])
|
|
76
|
+
}, [
|
|
77
|
+
__props.title ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
78
|
+
createVNode(_sfc_main$3, {
|
|
79
|
+
variant: "caps-heading",
|
|
80
|
+
shade: "lighter",
|
|
81
|
+
class: normalizeClass({ "!text-gray-100": __props.isDarkMode }),
|
|
82
|
+
"no-spacing": ""
|
|
83
|
+
}, {
|
|
84
|
+
default: withCtx(() => [
|
|
85
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["class"])
|
|
89
|
+
])) : createCommentVNode("", true),
|
|
90
|
+
createElementVNode("div", {
|
|
91
|
+
class: normalizeClass(["py-2 rounded", {
|
|
92
|
+
"bg-white": __props.variant === "outline" && !__props.isDarkMode,
|
|
93
|
+
"bg-gray-700": __props.variant === "outline" && __props.isDarkMode
|
|
94
|
+
}])
|
|
95
|
+
}, [
|
|
96
|
+
renderSlot(_ctx.$slots, "tooltip")
|
|
97
|
+
], 2)
|
|
98
|
+
], 2)
|
|
99
|
+
], 38)) : createCommentVNode("", true)
|
|
100
|
+
], 8, ["to"])) : createCommentVNode("", true)
|
|
101
|
+
], 64);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const _sfc_main$1 = {};
|
|
106
|
+
const _hoisted_1 = { class: "px-3" };
|
|
107
|
+
function _sfc_render(_ctx, _cache) {
|
|
108
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
109
|
+
renderSlot(_ctx.$slots, "default")
|
|
110
|
+
]);
|
|
111
|
+
}
|
|
112
|
+
const TooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
|
|
113
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
114
|
+
__name: "TooltipParagraph",
|
|
115
|
+
setup(__props) {
|
|
116
|
+
const isDarkMode = inject(TOOLTIP_DARK_MODE_INJECT_KEY);
|
|
117
|
+
return (_ctx, _cache) => {
|
|
118
|
+
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
119
|
+
tag: "p",
|
|
120
|
+
variant: "body-xs",
|
|
121
|
+
shade: "lighter",
|
|
122
|
+
class: normalizeClass({ "!text-gray-200": unref(isDarkMode) })
|
|
123
|
+
}, {
|
|
124
|
+
default: withCtx(() => [
|
|
125
|
+
renderSlot(_ctx.$slots, "default")
|
|
126
|
+
]),
|
|
127
|
+
_: 3
|
|
128
|
+
}, 8, ["class"]);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export {
|
|
133
|
+
TooltipContent as T,
|
|
134
|
+
_sfc_main$2 as _,
|
|
135
|
+
_sfc_main as a
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./Chip.vue.es-D0fkSe8a.js"),o=require("./component-ZRZIt3ZW.js"),a={key:0,class:"px-3 mb-1"},r=e.defineComponent({__name:"Tooltip",props:{variant:{default:"default"},placement:{default:"bottom-end"},offset:{default:4},maxWidth:{default:"xs"},rootClass:{},title:{},isDarkMode:{type:Boolean}},setup(r){const l=r,n=e.ref(),s=e.ref(null),i=e.ref(!1),d=e.inject(o.TOOLTIP_PORTAL_NAME),{floatingStyles:c}=t.useFloating(n,s,{whileElementsMounted:t.autoUpdate,placement:l.placement,middleware:[t.offset(l.offset),t.flip()]});return e.provide(o.TOOLTIP_DARK_MODE_INJECT_KEY,l.isDarkMode),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",e.mergeProps(t.$attrs,{ref_key:"triggerRef",ref:n,class:"relative leading-none",onMouseenter:l[0]||(l[0]=e=>i.value=!0),onMouseleave:l[1]||(l[1]=e=>i.value=!1)}),[e.createElementVNode("span",{class:"absolute",style:e.normalizeStyle({inset:`-${r.offset}px`})},null,4),e.renderSlot(t.$slots,"default")],16),e.unref(d)?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:e.unref(d)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:s,style:e.normalizeStyle(e.unref(c)),class:e.normalizeClass(["border z-70 shadow-md",[r.rootClass,`max-w-${r.maxWidth}`,{"border-gray-200 rounded bg-white":!r.isDarkMode,"border-gray-700 rounded bg-gray-700":r.isDarkMode}]]),onMouseenter:l[2]||(l[2]=e=>i.value=!0),onMouseleave:l[3]||(l[3]=e=>i.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["rounded",{"border-gray-50 bg-gray-50":"outline"===r.variant&&!r.isDarkMode,"border-gray-600 bg-gray-600":"outline"===r.variant&&r.isDarkMode,"border-4":"outline"===r.variant&&!r.title,"border-2":"outline"===r.variant&&r.title,"pt-0":!!r.title}])},[r.title?(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(o._sfc_main,{variant:"caps-heading",shade:"lighter",class:e.normalizeClass({"!text-gray-100":r.isDarkMode}),"no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:1},8,["class"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["py-2 rounded",{"bg-white":"outline"===r.variant&&!r.isDarkMode,"bg-gray-700":"outline"===r.variant&&r.isDarkMode}])},[e.renderSlot(t.$slots,"tooltip")],2)],2)],38)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)],64))}}),l={},n={class:"px-3"};const s=t._export_sfc(l,[["render",function(t,o){return e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(t.$slots,"default")])}]]),i=e.defineComponent({__name:"TooltipParagraph",setup(t){const a=e.inject(o.TOOLTIP_DARK_MODE_INJECT_KEY);return(t,r)=>(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{tag:"p",variant:"body-xs",shade:"lighter",class:e.normalizeClass({"!text-gray-200":e.unref(a)})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["class"]))}});exports.TooltipContent=s,exports._sfc_main=r,exports._sfc_main$1=i;
|