@solvimon/solvimon-web 0.1.0-alpha.1 → 0.1.0-alpha.2
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/README.md +5 -5
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js → BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs} +2 -2
- package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-CRsFr9TH.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-CIVSoqFr.js → ContentWithAsideLayout-DczcgSrt.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs} +5 -5
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs +75 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs → Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs} +5 -4
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs} +5 -5
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js} +1 -1
- package/dist/auto-DzZuCneB.mjs +14387 -0
- package/dist/auto-PpnAChnH.js +6 -0
- package/dist/{cloneDeep-Hs8Pp07F.js → cloneDeep-DranHQkY.js} +1 -1
- package/dist/{component-BkmcE85U.mjs → component-DEo_ndpK.mjs} +92 -78
- package/dist/component-XHQYFLA_.js +1 -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 +96 -5
- 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 +582 -5
- 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 +132 -5
- 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 +580 -5
- 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 +127 -5
- 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 +102 -5
- 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 +131 -5
- 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 +236 -5
- 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 +150 -5
- 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 +132 -5
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
- package/dist/{InvoiceDetails.entry.ce-Cnpz8CLJ.mjs → components/WalletBalances/WalletBalances.es.js} +41 -51
- package/dist/core/configuration.d.ts +2 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/registry.d.ts +1 -1
- package/dist/core/types.d.ts +4 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +40 -34
- package/dist/invoices-BW1notiX.js +1 -0
- package/dist/{invoices-C31Wz1Bu.mjs → invoices-M5oYVch6.mjs} +1 -1
- package/dist/{paymentMethods-CzUqDlvc.js → paymentMethods-BX80t2zk.js} +1 -1
- package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-CqKUfc3w.mjs} +1 -1
- package/dist/{payments-C3LPk9k9.js → payments-BHv4hCeJ.js} +1 -1
- package/dist/{payments-NtWI8KlU.mjs → payments-CosaPZwo.mjs} +1 -1
- package/dist/registry-BwKEYOf7.js +1 -0
- package/dist/registry-Cag1Jj7P.mjs +143 -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 +5140 -5
- 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 +134 -5
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1012 -0
- package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-Bs4DIE8f.mjs} +1 -1
- package/dist/{subscriptions-CqK7t-fF.js → subscriptions-CnxvsBXd.js} +1 -1
- package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-CgRcOqv3.mjs} +1 -1
- package/dist/useActionDispatchProvider-Cru69mAl.js +1 -0
- package/dist/{useCustomer-Dp8sGHI0.js → useCustomer-B0NK96dA.js} +1 -1
- package/dist/{useCustomer-BRY0tuBH.mjs → useCustomer-DlcjY3fP.mjs} +2 -2
- package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → useCustomerPaymentMethodOptions-BzEquyUV.mjs} +7 -6
- package/dist/{useCustomerPaymentMethodOptions-DYpMDnJR.js → useCustomerPaymentMethodOptions-C-8BLzqb.js} +1 -1
- package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-C7ToTmZK.mjs} +9 -7
- package/dist/useIncrementalLoading-D60Vttil.js +1 -0
- package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-CcueV3We.mjs} +2 -2
- package/dist/{useInvoiceData-DImEH1ca.js → useInvoiceData-DstXfI7t.js} +1 -1
- package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CXng3aUm.mjs} +4 -4
- package/dist/{useInvoicesList-BZQ9Y0qN.js → useInvoicesList-DmzjgMlW.js} +1 -1
- package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-DCGVRXA4.js} +1 -1
- package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-Db-1R6rI.mjs} +2 -2
- package/dist/{useService-Dz13Nxbi.mjs → useService-B4qv5N2D.mjs} +14 -5
- package/dist/useService-D-CUtlp3.js +1 -0
- package/dist/useWalletBalanceItems-BZyiAhcV.js +1 -0
- package/dist/useWalletBalanceItems-CHkLaccm.mjs +105 -0
- package/package.json +16 -3
- package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
- package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
- package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
- package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
- package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
- package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
- package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
- package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
- package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
- package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
- package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
- package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
- package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
- package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
- package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
- package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
- package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
- package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
- package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
- package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
- package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
- package/dist/auto-B_36W1Fc.js +0 -6
- package/dist/auto-BfMZdgp-.mjs +0 -14207
- package/dist/component-Df5eNqYX.js +0 -1
- package/dist/invoices-8M_3ur_U.js +0 -1
- package/dist/registry-By94DXE2.js +0 -1
- package/dist/registry-shRKDl3K.mjs +0 -127
- package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
- package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
- package/dist/useService-bNNi4GB8.js +0 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, renderSlot } from "vue";
|
|
2
|
+
import { n as _sfc_main$4, _ as _sfc_main$2 } from "./component-DEo_ndpK.mjs";
|
|
3
|
+
const _hoisted_1$1 = { class: "flex gap-1" };
|
|
4
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "Kpi",
|
|
6
|
+
props: {
|
|
7
|
+
icon: { type: null },
|
|
8
|
+
kpi: { type: String }
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
13
|
+
createVNode(unref(_sfc_main$4), {
|
|
14
|
+
icon: __props.icon,
|
|
15
|
+
size: "xs"
|
|
16
|
+
}, null, 8, ["icon"]),
|
|
17
|
+
createVNode(unref(_sfc_main$2), { variant: "body-xs" }, {
|
|
18
|
+
default: withCtx(() => [
|
|
19
|
+
createTextVNode(toDisplayString(__props.kpi), 1)
|
|
20
|
+
]),
|
|
21
|
+
_: 1
|
|
22
|
+
})
|
|
23
|
+
]);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const _hoisted_1 = { class: "flex items-start" };
|
|
28
|
+
const _hoisted_2 = { class: "flex flex-col grow" };
|
|
29
|
+
const _hoisted_3 = { class: "flex items-center gap-1" };
|
|
30
|
+
const _hoisted_4 = { class: "flex items-center ml-4 self-center" };
|
|
31
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
|
+
__name: "PricingGroupContent",
|
|
33
|
+
props: {
|
|
34
|
+
name: { type: String },
|
|
35
|
+
description: { type: String }
|
|
36
|
+
},
|
|
37
|
+
setup(__props) {
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
40
|
+
createElementVNode("div", _hoisted_2, [
|
|
41
|
+
createElementVNode("div", _hoisted_3, [
|
|
42
|
+
createVNode(unref(_sfc_main$2), {
|
|
43
|
+
tag: "span",
|
|
44
|
+
variant: "body-sm",
|
|
45
|
+
weight: "semibold"
|
|
46
|
+
}, {
|
|
47
|
+
default: withCtx(() => [
|
|
48
|
+
createTextVNode(toDisplayString(__props.name), 1)
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}),
|
|
52
|
+
renderSlot(_ctx.$slots, "badge")
|
|
53
|
+
]),
|
|
54
|
+
createVNode(unref(_sfc_main$2), {
|
|
55
|
+
tag: "span",
|
|
56
|
+
variant: "body-xs",
|
|
57
|
+
shade: "lighter"
|
|
58
|
+
}, {
|
|
59
|
+
default: withCtx(() => [
|
|
60
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
createElementVNode("div", _hoisted_4, [
|
|
66
|
+
renderSlot(_ctx.$slots, "default")
|
|
67
|
+
])
|
|
68
|
+
]);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
_sfc_main as _,
|
|
74
|
+
_sfc_main$1 as a
|
|
75
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, renderSlot, openBlock, createElementBlock, Fragment, mergeProps, normalizeProps, createElementVNode, normalizeClass, Comment, Text } from "vue";
|
|
1
|
+
import { defineComponent, useSlots, computed, renderSlot, openBlock, createElementBlock, Fragment, mergeProps, normalizeProps, createElementVNode, normalizeClass, isVNode, Comment, Text } from "vue";
|
|
2
2
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
3
|
__name: "Skeleton",
|
|
4
4
|
props: {
|
|
@@ -15,6 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
if (Array.isArray(node)) {
|
|
16
16
|
return node.every(isVnodeEmpty);
|
|
17
17
|
}
|
|
18
|
+
if (!isVNode(node)) return false;
|
|
18
19
|
const vnode = node;
|
|
19
20
|
if (vnode.type === Comment) {
|
|
20
21
|
return true;
|
|
@@ -42,11 +43,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
43
|
});
|
|
43
44
|
return (_ctx, _cache) => {
|
|
44
45
|
return hasSlotContent.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
45
|
-
__props.variant === "title" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, { class: "rounded border border-gray-50 bg-gray-50/50
|
|
46
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "rounded border border-gray-50 bg-gray-50/50
|
|
46
|
+
__props.variant === "title" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, { class: "h-6 w-40 rounded border border-gray-50 bg-gray-50/50" }), null, 16)) : __props.variant === "divider-text" ? (openBlock(), createElementBlock("div", mergeProps({ key: 1 }, _ctx.$attrs, { class: "mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50" }), null, 16)) : __props.variant === "section" ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, _ctx.$attrs)), [
|
|
47
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-6 w-40 rounded border border-gray-50 bg-gray-50/50" }, null, -1)),
|
|
47
48
|
createElementVNode("div", {
|
|
48
49
|
class: normalizeClass([
|
|
49
|
-
"rounded border border-gray-50 bg-gray-50/50
|
|
50
|
+
"mt-1 rounded border border-gray-50 bg-gray-50/50 md:mt-2",
|
|
50
51
|
_ctx.$props.class
|
|
51
52
|
])
|
|
52
53
|
}, null, 2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),r=e.defineComponent({__name:"Skeleton",props:{variant:{type:String},class:{type:String}},setup(r){const t=e.useSlots(),n=r=>{if(null==r||!1===r)return!0;if("string"==typeof r||"number"==typeof r)return 0===String(r).trim().length;if(Array.isArray(r))return r.every(n);if(!e.isVNode(r))return!1;const t=r;return t.type===e.Comment||(t.type===e.Text?"string"!=typeof t.children||!t.children.trim():t.type===e.Fragment&&(null==t.children||!!Array.isArray(t.children)&&t.children.every(n)))},o=e.computed(()=>{if(!t.default)return!1;const e=t.default({});return!(!e||0===e.length)&&!e.every(n)});return(t,n)=>o.value?e.renderSlot(t.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},["title"===r.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},t.$attrs,{class:"h-6 w-40 rounded border border-gray-50 bg-gray-50/50"}),null,16)):"divider-text"===r.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},t.$attrs,{class:"mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"}),null,16)):"section"===r.variant?(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:2},t.$attrs)),[n[0]||(n[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",t.$props.class])},null,2)],16)):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:3},t.$attrs,{class:["rounded border border-gray-50 bg-gray-50/50",t.$props.class]}),null,16))],64))}});exports._sfc_main=r;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createSubscriptionsService } from "./subscriptions-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-C7ToTmZK.mjs";
|
|
2
|
+
import { c as createSubscriptionsService } from "./subscriptions-Bs4DIE8f.mjs";
|
|
3
3
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
|
|
4
|
-
import { b as useIntl, d as _sfc_main$1g, _ as _sfc_main$2$1, g as _sfc_main$3, m as _sfc_main$2H } from "./component-
|
|
5
|
-
import { _ as _sfc_main$4 } from "./Skeleton.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { b as useIntl, d as _sfc_main$1g, _ as _sfc_main$2$1, g as _sfc_main$3, m as _sfc_main$2H } from "./component-DEo_ndpK.mjs";
|
|
5
|
+
import { _ as _sfc_main$4 } from "./Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs";
|
|
6
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-CgRcOqv3.mjs";
|
|
7
7
|
function useSubscriptionsList({
|
|
8
8
|
customerId,
|
|
9
9
|
batchSize: pageSize = 15
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useIncrementalLoading-D8oKNxX7.js"),t=require("./subscriptions-CqK7t-fF.js"),o=require("vue"),i=require("./component-Df5eNqYX.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js"),s=require("./useActionDispatchProvider-DsIljrhi.js");const r={class:"flex flex-col gap-4 md:flex-row"},c={class:"grow"},a={class:"mt-4 flex items-center gap-6"},u={key:1,class:"flex gap-1"},l={class:"flex flex-col items-center gap-2 md:flex-row"},p=o.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:n}=i.useIntl(),{formatDate:s}=i.useIntl(),p=o.computed(()=>{var e;const o=t.subscription.pricing_plan_schedule_infos;if(0===o.length)return;const i=o[o.length-1];return null==(e=null==i?void 0:i.pricing_plan_version)?void 0:e.pricing_plan}),d=o.computed(()=>{var e;return t.subscription.name||(null==(e=p.value)?void 0:e.name)||n({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})}),b=o.computed(()=>{var e;return null==(e=p.value)?void 0:e.description}),m=o.computed(()=>{const e=t.subscription.inactive_periods;return!e||0===e.length}),w=o.computed(()=>{const e=t.subscription.inactive_periods;return Array.isArray(e)&&e.length>0}),h=o.computed(()=>m.value&&t.showCancelSubscriptionButton),f=o.computed(()=>w.value&&t.showRenewSubscriptionButton),_=o.computed(()=>t.showViewSubscriptionDetailsButton);return(t,p)=>(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),null,{default:o.withCtx(()=>[o.createElementVNode("div",r,[o.createElementVNode("div",c,[o.createVNode(o.unref(i._sfc_main$2),{tag:"h3",variant:"heading-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.value),1)]),_:1}),b.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2),{key:0,variant:"body-sm",tag:"span",shade:"lighter"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.value),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",a,[e.paymentMethod?(o.openBlock(),o.createBlock(o.unref(i._sfc_main),{key:0,variant:"condensed","payment-method":e.paymentMethod},null,8,["payment-method"])):o.createCommentVNode("",!0),e.subscription.next_invoice?(o.openBlock(),o.createElementBlock("div",u,[o.createVNode(o.unref(i._sfc_main$2),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),o.createVNode(o.unref(i._sfc_main$2),{tag:"span",variant:"body-xs",shade:"light"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",l,[_.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:0,color:"primary",class:"w-full md:w-auto",type:"button",onClick:p[0]||(p[0]=o=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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})):o.createCommentVNode("",!0),h.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:1,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:p[1]||(p[1]=o=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Cancel subscription",description:"The label for the cancel subscription button in the subscriptions block",id:"customer.subscriptions_block.cancel_button_label"})),1)]),_:1})):f.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:2,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:p[2]||(p[2]=o=>t.$emit("renew-subscription",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Renew subscription",description:"The label for the renew subscription button in the subscriptions block",id:"customer.subscriptions_block.renew_button_label"})),1)]),_:1})):o.createCommentVNode("",!0)])])]),_:1}))}}),d={key:1,class:"grid grid-cols-1 gap-4"},b=o.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:n}=i.useIntl(),s=o.computed(()=>t.subscriptions.length>0),r=e=>{if(e)return t.paymentMethods.find(({id:t})=>t===e)},c=o.computed(()=>t.showViewAllButton);return(t,a)=>(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),{"no-spacing":"","no-border":"",title:o.unref(n)({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)})},o.createSlots({default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("div",d,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.subscriptions,i=>(o.openBlock(),o.createBlock(p,{key:i.id,subscription:i,"payment-method":r(i.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,"show-view-all-button":e.showViewAllButton,"show-cancel-button":e.showCancelButton,"show-renew-button":e.showRenewButton,onViewSubscriptionDetails:a[1]||(a[1]=e=>t.$emit("view-subscription-details",e)),onCancelSubscription:a[2]||(a[2]=e=>t.$emit("cancel-subscription",e)),onRenewSubscription:a[3]||(a[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","show-view-all-button","show-cancel-button","show-renew-button"]))),128))])):(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),{key:0},{default:o.withCtx(()=>[o.createVNode(o.unref(i._sfc_main$2),{tag:"h3",variant:"heading-3"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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}),o.createVNode(o.unref(i._sfc_main$2),{variant:"body-xs",shade:"lighter"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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},[c.value?{name:"right",fn:o.withCtx(()=>[o.createVNode(o.unref(i._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:a[0]||(a[0]=e=>t.$emit("view-all-subscriptions"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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"]))}}),m=o.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}=s.useActionDispatchProvider();return(i,s)=>{var r,c,a,u;return e.isLoading?(o.openBlock(),o.createBlock(n._sfc_main,{key:0,variant:"section",class:"min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):e.customer?(o.openBlock(),o.createBlock(b,{key:1,customer:e.customer,subscriptions:e.subscriptions,"payment-methods":e.paymentMethods,"is-loading":e.isLoading,"show-view-all-button":null==(r=e.configuration)?void 0:r.showViewAllButton,"show-view-details-button":null==(c=e.configuration)?void 0:c.showViewDetailsButton,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,onViewSubscriptionDetails:s[0]||(s[0]=e=>o.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:s[1]||(s[1]=e=>o.unref(t)({action:"view-all-subscriptions"})),onCancelSubscription:s[2]||(s[2]=e=>o.unref(t)({action:"cancel-subscription",data:{subscriptionId:e.subscriptionId}})),onRenewSubscription:s[3]||(s[3]=e=>o.unref(t)({action:"renew-subscription",data:{subscriptionId:e.subscriptionId}})),onLoadMore:s[4]||(s[4]=e=>i.$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"])):o.createCommentVNode("",!0)}}});exports._sfc_main=m,exports.useSubscriptionsList=function({customerId:o,batchSize:i=15}){const n=t.createSubscriptionsService();return e.useIncrementalLoading({service:async e=>n.getActiveSubscriptions({customerId:o,pagination:{page:e,pageSize:i}})})};
|
|
1
|
+
const e=require("./useIncrementalLoading-D60Vttil.js"),t=require("./subscriptions-CnxvsBXd.js"),o=require("vue"),i=require("./component-XHQYFLA_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js"),s=require("./useActionDispatchProvider-Cru69mAl.js");const r={class:"flex flex-col gap-4 md:flex-row"},c={class:"grow"},a={class:"mt-4 flex items-center gap-6"},u={key:1,class:"flex gap-1"},l={class:"flex flex-col items-center gap-2 md:flex-row"},p=o.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:n}=i.useIntl(),{formatDate:s}=i.useIntl(),p=o.computed(()=>{var e;const o=t.subscription.pricing_plan_schedule_infos;if(0===o.length)return;const i=o[o.length-1];return null==(e=null==i?void 0:i.pricing_plan_version)?void 0:e.pricing_plan}),d=o.computed(()=>{var e;return t.subscription.name||(null==(e=p.value)?void 0:e.name)||n({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})}),b=o.computed(()=>{var e;return null==(e=p.value)?void 0:e.description}),m=o.computed(()=>{const e=t.subscription.inactive_periods;return!e||0===e.length}),w=o.computed(()=>{const e=t.subscription.inactive_periods;return Array.isArray(e)&&e.length>0}),h=o.computed(()=>m.value&&t.showCancelSubscriptionButton),f=o.computed(()=>w.value&&t.showRenewSubscriptionButton),_=o.computed(()=>t.showViewSubscriptionDetailsButton);return(t,p)=>(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),null,{default:o.withCtx(()=>[o.createElementVNode("div",r,[o.createElementVNode("div",c,[o.createVNode(o.unref(i._sfc_main$2),{tag:"h3",variant:"heading-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.value),1)]),_:1}),b.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2),{key:0,variant:"body-sm",tag:"span",shade:"lighter"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.value),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",a,[e.paymentMethod?(o.openBlock(),o.createBlock(o.unref(i._sfc_main),{key:0,variant:"condensed","payment-method":e.paymentMethod},null,8,["payment-method"])):o.createCommentVNode("",!0),e.subscription.next_invoice?(o.openBlock(),o.createElementBlock("div",u,[o.createVNode(o.unref(i._sfc_main$2),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),o.createVNode(o.unref(i._sfc_main$2),{tag:"span",variant:"body-xs",shade:"light"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",l,[_.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:0,color:"primary",class:"w-full md:w-auto",type:"button",onClick:p[0]||(p[0]=o=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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})):o.createCommentVNode("",!0),h.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:1,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:p[1]||(p[1]=o=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Cancel subscription",description:"The label for the cancel subscription button in the subscriptions block",id:"customer.subscriptions_block.cancel_button_label"})),1)]),_:1})):f.value?(o.openBlock(),o.createBlock(o.unref(i._sfc_main$2H),{key:2,variant:"outline",color:"gray",class:"w-full md:w-auto",type:"button",onClick:p[2]||(p[2]=o=>t.$emit("renew-subscription",{subscriptionId:e.subscription.id}))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({defaultMessage:"Renew subscription",description:"The label for the renew subscription button in the subscriptions block",id:"customer.subscriptions_block.renew_button_label"})),1)]),_:1})):o.createCommentVNode("",!0)])])]),_:1}))}}),d={key:1,class:"grid grid-cols-1 gap-4"},b=o.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:n}=i.useIntl(),s=o.computed(()=>t.subscriptions.length>0),r=e=>{if(e)return t.paymentMethods.find(({id:t})=>t===e)},c=o.computed(()=>t.showViewAllButton);return(t,a)=>(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),{"no-spacing":"","no-border":"",title:o.unref(n)({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)})},o.createSlots({default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("div",d,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.subscriptions,i=>(o.openBlock(),o.createBlock(p,{key:i.id,subscription:i,"payment-method":r(i.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,"show-view-all-button":e.showViewAllButton,"show-cancel-button":e.showCancelButton,"show-renew-button":e.showRenewButton,onViewSubscriptionDetails:a[1]||(a[1]=e=>t.$emit("view-subscription-details",e)),onCancelSubscription:a[2]||(a[2]=e=>t.$emit("cancel-subscription",e)),onRenewSubscription:a[3]||(a[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","show-view-all-button","show-cancel-button","show-renew-button"]))),128))])):(o.openBlock(),o.createBlock(o.unref(i._sfc_main$1g),{key:0},{default:o.withCtx(()=>[o.createVNode(o.unref(i._sfc_main$2),{tag:"h3",variant:"heading-3"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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}),o.createVNode(o.unref(i._sfc_main$2),{variant:"body-xs",shade:"lighter"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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},[c.value?{name:"right",fn:o.withCtx(()=>[o.createVNode(o.unref(i._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:a[0]||(a[0]=e=>t.$emit("view-all-subscriptions"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)({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"]))}}),m=o.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}=s.useActionDispatchProvider();return(i,s)=>{var r,c,a,u;return e.isLoading?(o.openBlock(),o.createBlock(n._sfc_main,{key:0,variant:"section",class:"min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):e.customer?(o.openBlock(),o.createBlock(b,{key:1,customer:e.customer,subscriptions:e.subscriptions,"payment-methods":e.paymentMethods,"is-loading":e.isLoading,"show-view-all-button":null==(r=e.configuration)?void 0:r.showViewAllButton,"show-view-details-button":null==(c=e.configuration)?void 0:c.showViewDetailsButton,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,onViewSubscriptionDetails:s[0]||(s[0]=e=>o.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:s[1]||(s[1]=e=>o.unref(t)({action:"view-all-subscriptions"})),onCancelSubscription:s[2]||(s[2]=e=>o.unref(t)({action:"cancel-subscription",data:{subscriptionId:e.subscriptionId}})),onRenewSubscription:s[3]||(s[3]=e=>o.unref(t)({action:"renew-subscription",data:{subscriptionId:e.subscriptionId}})),onLoadMore:s[4]||(s[4]=e=>i.$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"])):o.createCommentVNode("",!0)}}});exports._sfc_main=m,exports.useSubscriptionsList=function({customerId:o,batchSize:i=15}){const n=t.createSubscriptionsService();return e.useIncrementalLoading({service:async e=>n.getActiveSubscriptions({customerId:o,pagination:{page:e,pageSize:i}})})};
|