@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
|
@@ -1,7 +1,238 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../component-
|
|
1
|
+
import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
+
import { F as getCustomerCountry, b as useIntl, k as _sfc_main$14, d as _sfc_main$1g, p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-DEo_ndpK.mjs";
|
|
3
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
|
|
4
|
+
import { u as useCustomer } from "../../useCustomer-DlcjY3fP.mjs";
|
|
5
|
+
import { u as useService } from "../../useService-B4qv5N2D.mjs";
|
|
6
|
+
import { c as createPaymentMethodsService } from "../../paymentMethods-CqKUfc3w.mjs";
|
|
7
|
+
import { _ as _sfc_main$3 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs";
|
|
8
|
+
function hasCustomerId(payload) {
|
|
9
|
+
return payload.customerId !== void 0;
|
|
10
|
+
}
|
|
11
|
+
function usePaymentMethodOptions() {
|
|
12
|
+
const { getPaymentMethodOptions } = createPaymentMethodsService();
|
|
13
|
+
const service = (payload) => hasCustomerId(payload) ? getPaymentMethodOptions({
|
|
14
|
+
customerId: payload.customerId,
|
|
15
|
+
amount: payload.amount,
|
|
16
|
+
country: payload.country
|
|
17
|
+
}) : getPaymentMethodOptions({
|
|
18
|
+
subscriptionId: payload.subscriptionId,
|
|
19
|
+
amount: payload.amount,
|
|
20
|
+
country: payload.country
|
|
21
|
+
});
|
|
22
|
+
const initialValue = [];
|
|
23
|
+
const { data, execute: get, apiStatus, error, isPending } = useService({
|
|
24
|
+
initialValue,
|
|
25
|
+
service
|
|
26
|
+
});
|
|
27
|
+
return { paymentMethodOptions: data, get, apiStatus, error, isPending };
|
|
28
|
+
}
|
|
29
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
30
|
+
__name: "PaymentMethodForm.entry.view",
|
|
31
|
+
props: {
|
|
32
|
+
environment: { type: String },
|
|
33
|
+
locale: { type: String },
|
|
34
|
+
dateLocale: { type: String },
|
|
35
|
+
messages: { type: Object },
|
|
36
|
+
showTimezones: { type: Boolean },
|
|
37
|
+
primaryColor: { type: String },
|
|
38
|
+
secondaryColor: { type: String },
|
|
39
|
+
isShadowRoot: { type: Boolean },
|
|
40
|
+
experimentalFeatures: { type: Array },
|
|
41
|
+
logLevel: { type: String },
|
|
42
|
+
onLog: { type: Function },
|
|
43
|
+
allowedPortalTypes: { type: Array },
|
|
44
|
+
portalObject: { type: Object },
|
|
45
|
+
customElementName: { type: String },
|
|
46
|
+
branding: { type: Object },
|
|
47
|
+
configuration: { type: Object },
|
|
48
|
+
countryCode: { type: String }
|
|
49
|
+
},
|
|
50
|
+
setup(__props) {
|
|
51
|
+
const props = __props;
|
|
52
|
+
const customer = useCustomer({ customerId: props.portalObject.customer_id });
|
|
53
|
+
const paymentMethodOptions = usePaymentMethodOptions();
|
|
54
|
+
const initialLoad = async () => {
|
|
55
|
+
var _a;
|
|
56
|
+
const customerResponse = await customer.get.execute();
|
|
57
|
+
const country = getCustomerCountry(customerResponse);
|
|
58
|
+
await paymentMethodOptions.get({
|
|
59
|
+
customerId: customerResponse.id,
|
|
60
|
+
country,
|
|
61
|
+
amount: (_a = props.configuration) == null ? void 0 : _a.amount
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const { isLoading } = useLoadInitialData(initialLoad());
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return renderSlot(_ctx.$slots, "default", {
|
|
67
|
+
customer: unref(customer).customer.value,
|
|
68
|
+
paymentMethodOptions: unref(paymentMethodOptions),
|
|
69
|
+
isLoading: unref(isLoading)
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const FALLBACK_COUNTRY_CODE = "NL";
|
|
75
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
76
|
+
__name: "PaymentMethodForm",
|
|
77
|
+
props: {
|
|
78
|
+
customer: { type: Object },
|
|
79
|
+
paymentMethodOptions: { type: Array },
|
|
80
|
+
configuration: { type: Object },
|
|
81
|
+
isLoading: { type: Boolean, default: false },
|
|
82
|
+
countryCode: { type: String }
|
|
83
|
+
},
|
|
84
|
+
setup(__props) {
|
|
85
|
+
const DEFAULT_AMOUNT = {
|
|
86
|
+
currency: "EUR",
|
|
87
|
+
quantity: "0"
|
|
88
|
+
};
|
|
89
|
+
const props = __props;
|
|
90
|
+
const { $t } = useIntl();
|
|
91
|
+
const resolveConfiguration = (configuration2) => {
|
|
92
|
+
if ((configuration2 == null ? void 0 : configuration2.variant) === "AUTHORIZE") {
|
|
93
|
+
return configuration2;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
...configuration2,
|
|
97
|
+
variant: "TOKENIZE"
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
const configuration = computed(
|
|
101
|
+
() => resolveConfiguration(props.configuration)
|
|
102
|
+
);
|
|
103
|
+
const countryCode = computed(() => {
|
|
104
|
+
let result = FALLBACK_COUNTRY_CODE;
|
|
105
|
+
if (props.countryCode) {
|
|
106
|
+
result = props.countryCode;
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
if (props.customer) {
|
|
110
|
+
const country = getCustomerCountry(props.customer);
|
|
111
|
+
if (country) {
|
|
112
|
+
result = country;
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return FALLBACK_COUNTRY_CODE;
|
|
117
|
+
});
|
|
118
|
+
const paymentIntegrationProps = computed(() => {
|
|
119
|
+
if (configuration.value.variant === "AUTHORIZE") {
|
|
120
|
+
return {
|
|
121
|
+
paymentMethodOptions: props.paymentMethodOptions,
|
|
122
|
+
countryCode: countryCode.value,
|
|
123
|
+
variant: "AUTHORIZE",
|
|
124
|
+
amount: configuration.value.amount,
|
|
125
|
+
context: configuration.value.context,
|
|
126
|
+
invoiceId: configuration.value.invoiceId,
|
|
127
|
+
successRedirectUrl: configuration.value.successRedirectUrl,
|
|
128
|
+
selectedOption: configuration.value.selectedOption,
|
|
129
|
+
validateOnSubmit: configuration.value.validateOnSubmit,
|
|
130
|
+
forceStorePaymentMethod: configuration.value.forceStorePaymentMethod
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
paymentMethodOptions: props.paymentMethodOptions,
|
|
135
|
+
customerId: props.customer.id,
|
|
136
|
+
countryCode: countryCode.value,
|
|
137
|
+
variant: "TOKENIZE",
|
|
138
|
+
amount: configuration.value.amount ?? DEFAULT_AMOUNT,
|
|
139
|
+
invoiceId: configuration.value.invoiceId,
|
|
140
|
+
successRedirectUrl: configuration.value.successRedirectUrl,
|
|
141
|
+
selectedOption: configuration.value.selectedOption,
|
|
142
|
+
validateOnSubmit: configuration.value.validateOnSubmit,
|
|
143
|
+
forceStorePaymentMethod: configuration.value.forceStorePaymentMethod
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return __props.isLoading ? (openBlock(), createBlock(unref(_sfc_main$14), {
|
|
148
|
+
key: 0,
|
|
149
|
+
variant: "section",
|
|
150
|
+
class: "min-h-[180px]"
|
|
151
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$1g), {
|
|
152
|
+
key: 1,
|
|
153
|
+
"no-border": "",
|
|
154
|
+
"no-spacing": "",
|
|
155
|
+
"content-background": "none",
|
|
156
|
+
title: unref($t)({
|
|
157
|
+
defaultMessage: "Available payment methods",
|
|
158
|
+
description: "Title of the available payment methods form",
|
|
159
|
+
id: "components.payment_method_form.section_title"
|
|
160
|
+
})
|
|
161
|
+
}, {
|
|
162
|
+
default: withCtx(() => [
|
|
163
|
+
createVNode(_sfc_main$3, normalizeProps(guardReactiveProps(paymentIntegrationProps.value)), null, 16)
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}, 8, ["title"]));
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
171
|
+
__name: "PaymentMethodForm.entry",
|
|
172
|
+
props: {
|
|
173
|
+
environment: { type: String },
|
|
174
|
+
locale: { type: String },
|
|
175
|
+
dateLocale: { type: String },
|
|
176
|
+
messages: { type: Object },
|
|
177
|
+
showTimezones: { type: Boolean },
|
|
178
|
+
primaryColor: { type: String },
|
|
179
|
+
secondaryColor: { type: String },
|
|
180
|
+
isShadowRoot: { type: Boolean },
|
|
181
|
+
experimentalFeatures: { type: Array },
|
|
182
|
+
logLevel: { type: String },
|
|
183
|
+
onLog: { type: Function },
|
|
184
|
+
allowedPortalTypes: { type: Array },
|
|
185
|
+
portalObject: { type: Object },
|
|
186
|
+
customElementName: { type: String },
|
|
187
|
+
branding: { type: Object },
|
|
188
|
+
configuration: { type: Object },
|
|
189
|
+
countryCode: { type: String }
|
|
190
|
+
},
|
|
191
|
+
setup(__props) {
|
|
192
|
+
const props = __props;
|
|
193
|
+
return (_ctx, _cache) => {
|
|
194
|
+
var _a, _b, _c, _d;
|
|
195
|
+
return openBlock(), createBlock(unref(_sfc_main$4), {
|
|
196
|
+
"custom-element-name": unref(COMPONENT_NAME),
|
|
197
|
+
environment: __props.environment,
|
|
198
|
+
locale: __props.locale,
|
|
199
|
+
"portal-object": __props.portalObject,
|
|
200
|
+
"allowed-portal-types": ["CUSTOMER"],
|
|
201
|
+
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
202
|
+
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
203
|
+
"experimental-features": __props.experimentalFeatures,
|
|
204
|
+
"log-level": __props.logLevel,
|
|
205
|
+
"on-log": __props.onLog,
|
|
206
|
+
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
207
|
+
}, {
|
|
208
|
+
default: withCtx(() => [
|
|
209
|
+
createVNode(_sfc_main$2, normalizeProps(guardReactiveProps(props)), {
|
|
210
|
+
default: withCtx(({ customer, paymentMethodOptions, isLoading }) => [
|
|
211
|
+
customer ? (openBlock(), createBlock(_sfc_main$1, {
|
|
212
|
+
key: 0,
|
|
213
|
+
customer,
|
|
214
|
+
"payment-method-options": paymentMethodOptions.paymentMethodOptions.value,
|
|
215
|
+
configuration: __props.configuration,
|
|
216
|
+
"is-loading": isLoading
|
|
217
|
+
}, null, 8, ["customer", "payment-method-options", "configuration", "is-loading"])) : createCommentVNode("", true)
|
|
218
|
+
]),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 16)
|
|
221
|
+
]),
|
|
222
|
+
_: 1
|
|
223
|
+
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const SolvimonPaymentMethodForm = defineCustomElement(_sfc_main);
|
|
228
|
+
const COMPONENT_NAME = getComponentName("payment-method-form");
|
|
229
|
+
const defineSolvimonPaymentMethodForm = () => {
|
|
230
|
+
if (!customElements.get(COMPONENT_NAME)) {
|
|
231
|
+
customElements.define(COMPONENT_NAME, SolvimonPaymentMethodForm);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
3
234
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
235
|
+
COMPONENT_NAME,
|
|
236
|
+
SolvimonPaymentMethodForm,
|
|
237
|
+
defineSolvimonPaymentMethodForm
|
|
7
238
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SolvimonSubscriptionSchedules: import('vue').VueElementConstructor<unknown>;
|
|
1
|
+
export declare const SolvimonSubscriptionSchedules: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
|
|
2
2
|
export declare const COMPONENT_NAME: string;
|
|
3
3
|
export declare const defineSolvimonSubscriptionSchedules: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-XHQYFLA_.js"),n=require("../../useService-D-CUtlp3.js"),o=require("../../subscriptions-CnxvsBXd.js"),r=require("../../useLoadInitialData-BRg7IWqW.js"),i=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(n){const{$t:o}=t.useIntl();return(r,i)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"no-border":"",spacing:"none","content-background":"none",title:e.unref(o)({defaultMessage:"Schedules",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$E),{schedules:n.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});const a=e.defineComponent({__name:"SubscriptionSchedules.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(t){const i=t,{subscription:a,withPlanData:s,get:l}=function({subscriptionId:e}){const{getSubscription:t}=o.createSubscriptionsService(),{data:r,execute:i,apiStatus:a,error:s,isPending:l}=n.useService({service:()=>t({id:e,expanded:!0})});return{subscription:r,withPlanData:e=>e.pricing_plan_schedule_infos.map(e=>({schedule:e.pricing_plan_schedule,selectedPricingPlan:e.pricing_plan_version.pricing_plan,selectedPricingPlanVersion:e.pricing_plan_version})),apiStatus:a,error:s,get:i,isPending:l}}({subscriptionId:i.configuration.subscriptionId}),{isLoading:c}=r.useLoadInitialData(l());return(t,n)=>e.renderSlot(t.$slots,"default",{schedulesData:e.unref(a)?e.unref(s)(e.unref(a)):void 0,isLoading:e.unref(c)})}}),s=e.defineComponent({__name:"SubscriptionSchedules.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(n){const o=n;return(r,s)=>{var l,p,u,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=n.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(d=null==(u=n.branding)?void 0:u.colors)?void 0:d.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:s[0]||(s[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(({schedulesData:t,isLoading:o})=>[t?(e.openBlock(),e.createBlock(i,{key:0,"schedules-data":t,"is-loading":o,configuration:n.configuration},null,8,["schedules-data","is-loading","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),l=t.defineCustomElement(s),c=t.getComponentName("subscription-schedules");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionSchedules=l,exports.defineSolvimonSubscriptionSchedules=()=>{customElements.get(c)||customElements.define(c,l)};
|
|
@@ -1,7 +1,152 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../component-
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
+
import { b as useIntl, d as _sfc_main$1g, E as _sfc_main$E, p as _sfc_main$3, q as defineCustomElement, o as getComponentName } from "../../component-DEo_ndpK.mjs";
|
|
3
|
+
import { u as useService } from "../../useService-B4qv5N2D.mjs";
|
|
4
|
+
import { c as createSubscriptionsService } from "../../subscriptions-Bs4DIE8f.mjs";
|
|
5
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
|
|
6
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "SubscriptionSchedules",
|
|
8
|
+
props: {
|
|
9
|
+
schedulesData: { type: Array },
|
|
10
|
+
configuration: { type: Object },
|
|
11
|
+
isLoading: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const { $t } = useIntl();
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createBlock(unref(_sfc_main$1g), {
|
|
17
|
+
"no-border": "",
|
|
18
|
+
spacing: "none",
|
|
19
|
+
"content-background": "none",
|
|
20
|
+
title: unref($t)({
|
|
21
|
+
defaultMessage: "Schedules",
|
|
22
|
+
description: "Invoices list title",
|
|
23
|
+
id: "invoices_list.title"
|
|
24
|
+
})
|
|
25
|
+
}, {
|
|
26
|
+
default: withCtx(() => [
|
|
27
|
+
createVNode(unref(_sfc_main$E), { schedules: __props.schedulesData }, null, 8, ["schedules"])
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
}, 8, ["title"]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function useSubscription({
|
|
35
|
+
subscriptionId
|
|
36
|
+
}) {
|
|
37
|
+
const { getSubscription } = createSubscriptionsService();
|
|
38
|
+
const { data, execute: get, apiStatus, error, isPending } = useService({
|
|
39
|
+
service: () => getSubscription({ id: subscriptionId, expanded: true })
|
|
40
|
+
});
|
|
41
|
+
const withPlanData = (subscription) => {
|
|
42
|
+
return subscription.pricing_plan_schedule_infos.map((schedule) => {
|
|
43
|
+
return {
|
|
44
|
+
schedule: schedule.pricing_plan_schedule,
|
|
45
|
+
selectedPricingPlan: schedule.pricing_plan_version.pricing_plan,
|
|
46
|
+
selectedPricingPlanVersion: schedule.pricing_plan_version
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return { subscription: data, withPlanData, apiStatus, error, get, isPending };
|
|
51
|
+
}
|
|
52
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
53
|
+
__name: "SubscriptionSchedules.entry.view",
|
|
54
|
+
props: {
|
|
55
|
+
environment: { type: String },
|
|
56
|
+
locale: { type: String },
|
|
57
|
+
dateLocale: { type: String },
|
|
58
|
+
messages: { type: Object },
|
|
59
|
+
showTimezones: { type: Boolean },
|
|
60
|
+
primaryColor: { type: String },
|
|
61
|
+
secondaryColor: { type: String },
|
|
62
|
+
isShadowRoot: { type: Boolean },
|
|
63
|
+
experimentalFeatures: { type: Array },
|
|
64
|
+
logLevel: { type: String },
|
|
65
|
+
onLog: { type: Function },
|
|
66
|
+
allowedPortalTypes: { type: Array },
|
|
67
|
+
portalObject: { type: Object },
|
|
68
|
+
customElementName: { type: String },
|
|
69
|
+
branding: { type: Object },
|
|
70
|
+
configuration: { type: Object }
|
|
71
|
+
},
|
|
72
|
+
setup(__props) {
|
|
73
|
+
const props = __props;
|
|
74
|
+
const { subscription, withPlanData, get } = useSubscription({
|
|
75
|
+
subscriptionId: props.configuration.subscriptionId
|
|
76
|
+
});
|
|
77
|
+
const { isLoading } = useLoadInitialData(get());
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return renderSlot(_ctx.$slots, "default", {
|
|
80
|
+
schedulesData: unref(subscription) ? unref(withPlanData)(unref(subscription)) : void 0,
|
|
81
|
+
isLoading: unref(isLoading)
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
87
|
+
__name: "SubscriptionSchedules.entry",
|
|
88
|
+
props: {
|
|
89
|
+
environment: { type: String },
|
|
90
|
+
locale: { type: String },
|
|
91
|
+
dateLocale: { type: String },
|
|
92
|
+
messages: { type: Object },
|
|
93
|
+
showTimezones: { type: Boolean },
|
|
94
|
+
primaryColor: { type: String },
|
|
95
|
+
secondaryColor: { type: String },
|
|
96
|
+
isShadowRoot: { type: Boolean },
|
|
97
|
+
experimentalFeatures: { type: Array },
|
|
98
|
+
logLevel: { type: String },
|
|
99
|
+
onLog: { type: Function },
|
|
100
|
+
allowedPortalTypes: { type: Array },
|
|
101
|
+
portalObject: { type: Object },
|
|
102
|
+
customElementName: { type: String },
|
|
103
|
+
branding: { type: Object },
|
|
104
|
+
configuration: { type: Object }
|
|
105
|
+
},
|
|
106
|
+
setup(__props) {
|
|
107
|
+
const props = __props;
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
var _a, _b, _c, _d;
|
|
110
|
+
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
111
|
+
"custom-element-name": unref(COMPONENT_NAME),
|
|
112
|
+
environment: __props.environment,
|
|
113
|
+
locale: __props.locale,
|
|
114
|
+
"portal-object": __props.portalObject,
|
|
115
|
+
"allowed-portal-types": ["CUSTOMER"],
|
|
116
|
+
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
117
|
+
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
118
|
+
"experimental-features": __props.experimentalFeatures,
|
|
119
|
+
"log-level": __props.logLevel,
|
|
120
|
+
"on-log": __props.onLog,
|
|
121
|
+
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(props)), {
|
|
125
|
+
default: withCtx(({ schedulesData, isLoading }) => [
|
|
126
|
+
schedulesData ? (openBlock(), createBlock(_sfc_main$2, {
|
|
127
|
+
key: 0,
|
|
128
|
+
"schedules-data": schedulesData,
|
|
129
|
+
"is-loading": isLoading,
|
|
130
|
+
configuration: __props.configuration
|
|
131
|
+
}, null, 8, ["schedules-data", "is-loading", "configuration"])) : createCommentVNode("", true)
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 16)
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
const SolvimonSubscriptionSchedules = defineCustomElement(_sfc_main);
|
|
142
|
+
const COMPONENT_NAME = getComponentName("subscription-schedules");
|
|
143
|
+
const defineSolvimonSubscriptionSchedules = () => {
|
|
144
|
+
if (!customElements.get(COMPONENT_NAME)) {
|
|
145
|
+
customElements.define(COMPONENT_NAME, SolvimonSubscriptionSchedules);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
3
148
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
149
|
+
COMPONENT_NAME,
|
|
150
|
+
SolvimonSubscriptionSchedules,
|
|
151
|
+
defineSolvimonSubscriptionSchedules
|
|
7
152
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SolvimonSubscriptionsList: import('vue').VueElementConstructor<unknown>;
|
|
1
|
+
export declare const SolvimonSubscriptionsList: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
|
|
2
2
|
export declare const COMPONENT_NAME: string;
|
|
3
3
|
export declare const defineSolvimonSubscriptionsList: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js"),t=require("../../component-XHQYFLA_.js"),r=require("../../useCustomer-B0NK96dA.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../usePaymentMethods-DCGVRXA4.js"),i=e.defineComponent({__name:"SubscriptionsList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(i){const a=i.portalObject.customer_id,s=r.useCustomer({customerId:a}),p=o.useSubscriptionsList({customerId:a}),u=l.usePaymentMethods({customerId:a}),{isLoading:m}=n.useLoadInitialData(s.get.execute(),p.fetchInitial(),u.fetchAll());return(o,r)=>{var n,l,a,y;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:i.environment,locale:i.locale,"portal-object":i.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(n=i.branding)?void 0:n.colors)?void 0:l.primary,"secondary-color":null==(y=null==(a=i.branding)?void 0:a.colors)?void 0:y.secondary,"experimental-features":i.experimentalFeatures,"log-level":i.logLevel,"on-log":i.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{customer:e.unref(s),subscriptions:e.unref(p).items,paymentMethods:e.unref(u).items,isLoading:e.unref(m),loadMore:e.unref(p).fetchMore})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),a=e.defineComponent({__name:"SubscriptionsList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var a,s,p,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=r.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(u=null==(p=r.branding)?void 0:p.colors)?void 0:u.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,subscriptions:n,paymentMethods:l,isLoading:i,loadMore:a})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,customer:t.customer.value,subscriptions:n.value,"payment-methods":l.value,"is-loading":i,onLoadMore:a},null,8,["configuration","customer","subscriptions","payment-methods","is-loading","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),s=t.defineCustomElement(a),c=t.getComponentName("subscriptions-list");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionsList=s,exports.defineSolvimonSubscriptionsList=()=>{customElements.get(c)||customElements.define(c,s)};
|
|
@@ -1,7 +1,134 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { u as useSubscriptionsList, _ as _sfc_main$3 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs";
|
|
3
|
+
import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-DEo_ndpK.mjs";
|
|
4
|
+
import { u as useCustomer } from "../../useCustomer-DlcjY3fP.mjs";
|
|
5
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
|
|
6
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-Db-1R6rI.mjs";
|
|
7
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "SubscriptionsList.entry.view",
|
|
9
|
+
props: {
|
|
10
|
+
environment: { type: String },
|
|
11
|
+
locale: { type: String },
|
|
12
|
+
dateLocale: { type: String },
|
|
13
|
+
messages: { type: Object },
|
|
14
|
+
showTimezones: { type: Boolean },
|
|
15
|
+
primaryColor: { type: String },
|
|
16
|
+
secondaryColor: { type: String },
|
|
17
|
+
isShadowRoot: { type: Boolean },
|
|
18
|
+
experimentalFeatures: { type: Array },
|
|
19
|
+
logLevel: { type: String },
|
|
20
|
+
onLog: { type: Function },
|
|
21
|
+
allowedPortalTypes: { type: Array },
|
|
22
|
+
portalObject: { type: Object },
|
|
23
|
+
customElementName: { type: String },
|
|
24
|
+
branding: { type: Object },
|
|
25
|
+
configuration: { type: Object }
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const customerId = props.portalObject.customer_id;
|
|
30
|
+
const customer = useCustomer({ customerId });
|
|
31
|
+
const subscriptions = useSubscriptionsList({ customerId });
|
|
32
|
+
const paymentMethods = usePaymentMethods({ customerId });
|
|
33
|
+
const { isLoading } = useLoadInitialData(
|
|
34
|
+
customer.get.execute(),
|
|
35
|
+
subscriptions.fetchInitial(),
|
|
36
|
+
paymentMethods.fetchAll()
|
|
37
|
+
);
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
var _a, _b, _c, _d;
|
|
40
|
+
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
41
|
+
"custom-element-name": unref(COMPONENT_NAME),
|
|
42
|
+
environment: __props.environment,
|
|
43
|
+
locale: __props.locale,
|
|
44
|
+
"portal-object": __props.portalObject,
|
|
45
|
+
"allowed-portal-types": ["CUSTOMER"],
|
|
46
|
+
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
47
|
+
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
48
|
+
"experimental-features": __props.experimentalFeatures,
|
|
49
|
+
"log-level": __props.logLevel,
|
|
50
|
+
"on-log": __props.onLog,
|
|
51
|
+
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
52
|
+
}, {
|
|
53
|
+
default: withCtx(() => [
|
|
54
|
+
renderSlot(_ctx.$slots, "default", {
|
|
55
|
+
customer: unref(customer),
|
|
56
|
+
subscriptions: unref(subscriptions).items,
|
|
57
|
+
paymentMethods: unref(paymentMethods).items,
|
|
58
|
+
isLoading: unref(isLoading),
|
|
59
|
+
loadMore: unref(subscriptions).fetchMore
|
|
60
|
+
})
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
68
|
+
__name: "SubscriptionsList.entry",
|
|
69
|
+
props: {
|
|
70
|
+
environment: { type: String },
|
|
71
|
+
locale: { type: String },
|
|
72
|
+
dateLocale: { type: String },
|
|
73
|
+
messages: { type: Object },
|
|
74
|
+
showTimezones: { type: Boolean },
|
|
75
|
+
primaryColor: { type: String },
|
|
76
|
+
secondaryColor: { type: String },
|
|
77
|
+
isShadowRoot: { type: Boolean },
|
|
78
|
+
experimentalFeatures: { type: Array },
|
|
79
|
+
logLevel: { type: String },
|
|
80
|
+
onLog: { type: Function },
|
|
81
|
+
allowedPortalTypes: { type: Array },
|
|
82
|
+
portalObject: { type: Object },
|
|
83
|
+
customElementName: { type: String },
|
|
84
|
+
branding: { type: Object },
|
|
85
|
+
configuration: { type: Object }
|
|
86
|
+
},
|
|
87
|
+
setup(__props) {
|
|
88
|
+
return (_ctx, _cache) => {
|
|
89
|
+
var _a, _b, _c, _d;
|
|
90
|
+
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
91
|
+
"custom-element-name": unref(COMPONENT_NAME),
|
|
92
|
+
environment: __props.environment,
|
|
93
|
+
locale: __props.locale,
|
|
94
|
+
"portal-object": __props.portalObject,
|
|
95
|
+
"allowed-portal-types": ["CUSTOMER"],
|
|
96
|
+
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
97
|
+
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
98
|
+
"experimental-features": __props.experimentalFeatures,
|
|
99
|
+
"log-level": __props.logLevel,
|
|
100
|
+
"on-log": __props.onLog,
|
|
101
|
+
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
102
|
+
}, {
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$props)), {
|
|
105
|
+
default: withCtx(({ customer, subscriptions, paymentMethods, isLoading, loadMore }) => [
|
|
106
|
+
createVNode(_sfc_main$3, {
|
|
107
|
+
configuration: __props.configuration,
|
|
108
|
+
customer: customer.customer.value,
|
|
109
|
+
subscriptions: subscriptions.value,
|
|
110
|
+
"payment-methods": paymentMethods.value,
|
|
111
|
+
"is-loading": isLoading,
|
|
112
|
+
onLoadMore: loadMore
|
|
113
|
+
}, null, 8, ["configuration", "customer", "subscriptions", "payment-methods", "is-loading", "onLoadMore"])
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
}, 16)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const SolvimonSubscriptionsList = defineCustomElement(_sfc_main);
|
|
124
|
+
const COMPONENT_NAME = getComponentName("subscriptions-list");
|
|
125
|
+
const defineSolvimonSubscriptionsList = () => {
|
|
126
|
+
if (!customElements.get(COMPONENT_NAME)) {
|
|
127
|
+
customElements.define(COMPONENT_NAME, SolvimonSubscriptionsList);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
3
130
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
131
|
+
COMPONENT_NAME,
|
|
132
|
+
SolvimonSubscriptionsList,
|
|
133
|
+
defineSolvimonSubscriptionsList
|
|
7
134
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../_Uint8Array-DxISR7XF.js"),a=require("../../useWalletBalanceItems-BZyiAhcV.js"),o=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../component-XHQYFLA_.js"),n=e.defineComponent({__name:"WalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup:t=>(o,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{"has-error":t.hasError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances},null,8,["has-error","is-loading","wallet-balances"]))}),r=e.defineComponent({__name:"WalletBalances.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup(t){const l=t.portalObject.customer_id,n=a.useCustomerWalletBalances({customerId:l}),r=a.useWalletBalanceItems(n.walletBalances),{isLoading:s}=o.useLoadInitialData(n.fetch());return(t,a)=>e.renderSlot(t.$slots,"default",{customerWalletBalances:e.unref(n),walletBalanceItems:e.unref(r),isLoading:e.unref(s)})}}),s=e.defineComponent({__name:"WalletBalances.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup:a=>(o,s)=>{var i,c,m,u;return e.openBlock(),e.createBlock(e.unref(l._sfc_main$1),{"custom-element-name":e.unref(p),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(i=a.branding)?void 0:i.colors)?void 0:c.primary,"secondary-color":null==(u=null==(m=a.branding)?void 0:m.colors)?void 0:u.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:s[0]||(s[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({customerWalletBalances:a,walletBalanceItems:o,isLoading:l})=>[e.createVNode(n,{"has-error":a.apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":l,"wallet-balances":o},null,8,["has-error","is-loading","wallet-balances"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=l.defineCustomElement(s),p=l.getComponentName("wallet-balances");exports.COMPONENT_NAME=p,exports.SolvimonWalletBalances=i,exports.defineSolvimonWalletBalances=()=>{customElements.get(p)||customElements.define(p,i)};
|