@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,238 +0,0 @@
|
|
|
1
|
-
import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { C as getCustomerCountry, b as useIntl, k as _sfc_main$14, d as _sfc_main$1g, o as _sfc_main$4, p as defineCustomElement, n as getComponentName } from "./component-BkmcE85U.mjs";
|
|
3
|
-
import { u as useLoadInitialData } from "./useLoadInitialData-Dm48tlSO.mjs";
|
|
4
|
-
import { u as useCustomer } from "./useCustomer-BRY0tuBH.mjs";
|
|
5
|
-
import { u as useService } from "./useService-Dz13Nxbi.mjs";
|
|
6
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-CrU4G_2Y.mjs";
|
|
7
|
-
import { _ as _sfc_main$3 } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.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 { data, execute: get, apiStatus, error, isPending } = useService({
|
|
23
|
-
initialValue: [],
|
|
24
|
-
service
|
|
25
|
-
});
|
|
26
|
-
return { paymentMethodOptions: data, get, apiStatus, error, isPending };
|
|
27
|
-
}
|
|
28
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
29
|
-
__name: "PaymentMethodForm.entry.view",
|
|
30
|
-
props: {
|
|
31
|
-
environment: { type: String },
|
|
32
|
-
locale: { type: String },
|
|
33
|
-
dateLocale: { type: String },
|
|
34
|
-
messages: { type: Object },
|
|
35
|
-
showTimezones: { type: Boolean },
|
|
36
|
-
primaryColor: { type: String },
|
|
37
|
-
secondaryColor: { type: String },
|
|
38
|
-
isShadowRoot: { type: Boolean },
|
|
39
|
-
experimentalFeatures: { type: Array },
|
|
40
|
-
logLevel: { type: String },
|
|
41
|
-
onLog: { type: Function },
|
|
42
|
-
allowedPortalTypes: { type: Array },
|
|
43
|
-
portalObject: { type: Object },
|
|
44
|
-
customElementName: { type: String },
|
|
45
|
-
branding: { type: Object },
|
|
46
|
-
configuration: { type: Object },
|
|
47
|
-
countryCode: { type: String }
|
|
48
|
-
},
|
|
49
|
-
setup(__props) {
|
|
50
|
-
const props = __props;
|
|
51
|
-
const customer = useCustomer({ customerId: props.portalObject.customer_id });
|
|
52
|
-
const paymentMethodOptions = usePaymentMethodOptions();
|
|
53
|
-
const initialLoad = async () => {
|
|
54
|
-
var _a;
|
|
55
|
-
const customerResponse = await customer.get.execute();
|
|
56
|
-
const country = getCustomerCountry(customerResponse);
|
|
57
|
-
await paymentMethodOptions.get({
|
|
58
|
-
customerId: customerResponse.id,
|
|
59
|
-
country,
|
|
60
|
-
amount: (_a = props.configuration) == null ? void 0 : _a.amount
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const { isLoading } = useLoadInitialData(initialLoad());
|
|
64
|
-
return (_ctx, _cache) => {
|
|
65
|
-
return renderSlot(_ctx.$slots, "default", {
|
|
66
|
-
customer: unref(customer).customer.value,
|
|
67
|
-
paymentMethodOptions: unref(paymentMethodOptions),
|
|
68
|
-
isLoading: unref(isLoading)
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
const FALLBACK_COUNTRY_CODE = "NL";
|
|
74
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
75
|
-
__name: "PaymentMethodForm",
|
|
76
|
-
props: {
|
|
77
|
-
customer: { type: Object },
|
|
78
|
-
paymentMethodOptions: { type: Array },
|
|
79
|
-
configuration: { type: Object },
|
|
80
|
-
isLoading: { type: Boolean, default: false },
|
|
81
|
-
countryCode: { type: String }
|
|
82
|
-
},
|
|
83
|
-
setup(__props) {
|
|
84
|
-
const DEFAULT_AMOUNT = {
|
|
85
|
-
currency: "EUR",
|
|
86
|
-
quantity: "0"
|
|
87
|
-
};
|
|
88
|
-
const props = __props;
|
|
89
|
-
const { $t } = useIntl();
|
|
90
|
-
const resolveConfiguration = (configuration2) => {
|
|
91
|
-
if ((configuration2 == null ? void 0 : configuration2.variant) === "AUTHORIZE") {
|
|
92
|
-
return configuration2;
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
...configuration2,
|
|
96
|
-
variant: "TOKENIZE"
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
const configuration = computed(
|
|
100
|
-
() => resolveConfiguration(props.configuration)
|
|
101
|
-
);
|
|
102
|
-
const countryCode = computed(() => {
|
|
103
|
-
let result = FALLBACK_COUNTRY_CODE;
|
|
104
|
-
if (props.countryCode) {
|
|
105
|
-
result = props.countryCode;
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
if (props.customer) {
|
|
109
|
-
const country = getCustomerCountry(props.customer);
|
|
110
|
-
if (country) {
|
|
111
|
-
result = country;
|
|
112
|
-
return result;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return FALLBACK_COUNTRY_CODE;
|
|
116
|
-
});
|
|
117
|
-
const paymentIntegrationProps = computed(() => {
|
|
118
|
-
if (configuration.value.variant === "AUTHORIZE") {
|
|
119
|
-
return {
|
|
120
|
-
paymentMethodOptions: props.paymentMethodOptions,
|
|
121
|
-
countryCode: countryCode.value,
|
|
122
|
-
variant: "AUTHORIZE",
|
|
123
|
-
amount: configuration.value.amount,
|
|
124
|
-
context: configuration.value.context,
|
|
125
|
-
invoiceId: configuration.value.invoiceId,
|
|
126
|
-
successRedirectUrl: configuration.value.successRedirectUrl,
|
|
127
|
-
selectedOption: configuration.value.selectedOption,
|
|
128
|
-
validateOnSubmit: configuration.value.validateOnSubmit,
|
|
129
|
-
forceStorePaymentMethod: configuration.value.forceStorePaymentMethod
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
paymentMethodOptions: props.paymentMethodOptions,
|
|
134
|
-
customerId: props.customer.id,
|
|
135
|
-
countryCode: countryCode.value,
|
|
136
|
-
variant: "TOKENIZE",
|
|
137
|
-
amount: configuration.value.amount ?? DEFAULT_AMOUNT,
|
|
138
|
-
invoiceId: configuration.value.invoiceId,
|
|
139
|
-
successRedirectUrl: configuration.value.successRedirectUrl,
|
|
140
|
-
selectedOption: configuration.value.selectedOption,
|
|
141
|
-
validateOnSubmit: configuration.value.validateOnSubmit,
|
|
142
|
-
forceStorePaymentMethod: configuration.value.forceStorePaymentMethod
|
|
143
|
-
};
|
|
144
|
-
});
|
|
145
|
-
return (_ctx, _cache) => {
|
|
146
|
-
return __props.isLoading ? (openBlock(), createBlock(unref(_sfc_main$14), {
|
|
147
|
-
key: 0,
|
|
148
|
-
variant: "section",
|
|
149
|
-
class: "min-h-[180px]"
|
|
150
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$1g), {
|
|
151
|
-
key: 1,
|
|
152
|
-
"no-border": "",
|
|
153
|
-
"no-spacing": "",
|
|
154
|
-
"content-background": "none",
|
|
155
|
-
title: unref($t)({
|
|
156
|
-
defaultMessage: "Available payment methods",
|
|
157
|
-
description: "Title of the available payment methods form",
|
|
158
|
-
id: "components.payment_method_form.section_title"
|
|
159
|
-
})
|
|
160
|
-
}, {
|
|
161
|
-
default: withCtx(() => [
|
|
162
|
-
createVNode(_sfc_main$3, normalizeProps(guardReactiveProps(paymentIntegrationProps.value)), null, 16)
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
}, 8, ["title"]));
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
170
|
-
__name: "PaymentMethodForm.entry",
|
|
171
|
-
props: {
|
|
172
|
-
environment: { type: String },
|
|
173
|
-
locale: { type: String },
|
|
174
|
-
dateLocale: { type: String },
|
|
175
|
-
messages: { type: Object },
|
|
176
|
-
showTimezones: { type: Boolean },
|
|
177
|
-
primaryColor: { type: String },
|
|
178
|
-
secondaryColor: { type: String },
|
|
179
|
-
isShadowRoot: { type: Boolean },
|
|
180
|
-
experimentalFeatures: { type: Array },
|
|
181
|
-
logLevel: { type: String },
|
|
182
|
-
onLog: { type: Function },
|
|
183
|
-
allowedPortalTypes: { type: Array },
|
|
184
|
-
portalObject: { type: Object },
|
|
185
|
-
customElementName: { type: String },
|
|
186
|
-
branding: { type: Object },
|
|
187
|
-
configuration: { type: Object },
|
|
188
|
-
countryCode: { type: String }
|
|
189
|
-
},
|
|
190
|
-
setup(__props) {
|
|
191
|
-
const props = __props;
|
|
192
|
-
return (_ctx, _cache) => {
|
|
193
|
-
var _a, _b, _c, _d;
|
|
194
|
-
return openBlock(), createBlock(unref(_sfc_main$4), {
|
|
195
|
-
"custom-element-name": unref(COMPONENT_NAME),
|
|
196
|
-
environment: __props.environment,
|
|
197
|
-
locale: __props.locale,
|
|
198
|
-
"portal-object": __props.portalObject,
|
|
199
|
-
"allowed-portal-types": ["CUSTOMER"],
|
|
200
|
-
"primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
|
|
201
|
-
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
202
|
-
"experimental-features": __props.experimentalFeatures,
|
|
203
|
-
"log-level": __props.logLevel,
|
|
204
|
-
"on-log": __props.onLog,
|
|
205
|
-
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
206
|
-
}, {
|
|
207
|
-
default: withCtx(() => [
|
|
208
|
-
createVNode(_sfc_main$2, normalizeProps(guardReactiveProps(props)), {
|
|
209
|
-
default: withCtx(({ customer, paymentMethodOptions, isLoading }) => [
|
|
210
|
-
customer ? (openBlock(), createBlock(_sfc_main$1, {
|
|
211
|
-
key: 0,
|
|
212
|
-
customer,
|
|
213
|
-
"payment-method-options": paymentMethodOptions.paymentMethodOptions.value,
|
|
214
|
-
configuration: __props.configuration,
|
|
215
|
-
"is-loading": isLoading
|
|
216
|
-
}, null, 8, ["customer", "payment-method-options", "configuration", "is-loading"])) : createCommentVNode("", true)
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
}, 16)
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
const SolvimonPaymentMethodForm = defineCustomElement(_sfc_main);
|
|
227
|
-
const COMPONENT_NAME = getComponentName("payment-method-form");
|
|
228
|
-
const defineSolvimonPaymentMethodForm = () => {
|
|
229
|
-
if (!customElements.get(COMPONENT_NAME)) {
|
|
230
|
-
customElements.define(COMPONENT_NAME, SolvimonPaymentMethodForm);
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
export {
|
|
234
|
-
COMPONENT_NAME as C,
|
|
235
|
-
SolvimonPaymentMethodForm as S,
|
|
236
|
-
_sfc_main as _,
|
|
237
|
-
defineSolvimonPaymentMethodForm as d
|
|
238
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-Df5eNqYX.js"),o=require("./useLoadInitialData-BRg7IWqW.js"),n=require("./useCustomer-Dp8sGHI0.js"),r=require("./useService-bNNi4GB8.js"),a=require("./paymentMethods-CzUqDlvc.js"),i=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js");const u=e.defineComponent({__name:"PaymentMethodForm.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},countryCode:{type:String}},setup(i){const u=i,c=n.useCustomer({customerId:u.portalObject.customer_id}),s=function(){const{getPaymentMethodOptions:e}=a.createPaymentMethodsService(),{data:t,execute:o,apiStatus:n,error:i,isPending:u}=r.useService({initialValue:[],service:t=>function(e){return void 0!==e.customerId}(t)?e({customerId:t.customerId,amount:t.amount,country:t.country}):e({subscriptionId:t.subscriptionId,amount:t.amount,country:t.country})});return{paymentMethodOptions:t,get:o,apiStatus:n,error:i,isPending:u}}(),{isLoading:l}=o.useLoadInitialData((async()=>{var e;const o=await c.get.execute(),n=t.getCustomerCountry(o);await s.get({customerId:o.id,country:n,amount:null==(e=u.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(c).customer.value,paymentMethodOptions:e.unref(s),isLoading:e.unref(l)})}}),c=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},setup(o){const n={currency:"EUR",quantity:"0"},r=o,{$t:a}=t.useIntl(),u=e.computed(()=>{return"AUTHORIZE"===(null==(e=r.configuration)?void 0:e.variant)?e:{...e,variant:"TOKENIZE"};var e}),c=e.computed(()=>{let e="NL";if(r.countryCode)return e=r.countryCode,e;if(r.customer){const o=t.getCustomerCountry(r.customer);if(o)return e=o,e}return"NL"}),s=e.computed(()=>"AUTHORIZE"===u.value.variant?{paymentMethodOptions:r.paymentMethodOptions,countryCode:c.value,variant:"AUTHORIZE",amount:u.value.amount,context:u.value.context,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod}:{paymentMethodOptions:r.paymentMethodOptions,customerId:r.customer.id,countryCode:c.value,variant:"TOKENIZE",amount:u.value.amount??n,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod});return(n,r)=>o.isLoading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$14),{key:0,variant:"section",class:"min-h-[180px]"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:1,"no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Available payment methods",description:"Title of the available payment methods form",id:"components.payment_method_form.section_title"})},{default:e.withCtx(()=>[e.createVNode(i._sfc_main,e.normalizeProps(e.guardReactiveProps(s.value)),null,16)]),_:1},8,["title"]))}}),s=e.defineComponent({__name:"PaymentMethodForm.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},countryCode:{type:String}},setup(o){const n=o;return(r,a)=>{var i,s,l,p;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(m),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(i=o.branding)?void 0:i.colors)?void 0:s.primary,"secondary-color":null==(p=null==(l=o.branding)?void 0:l.colors)?void 0:p.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(u,e.normalizeProps(e.guardReactiveProps(n)),{default:e.withCtx(({customer:t,paymentMethodOptions:n,isLoading:r})=>[t?(e.openBlock(),e.createBlock(c,{key:0,customer:t,"payment-method-options":n.paymentMethodOptions.value,configuration:o.configuration,"is-loading":r},null,8,["customer","payment-method-options","configuration","is-loading"])):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),m=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=m,exports.SolvimonPaymentMethodForm=l,exports._sfc_main=s,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(m)||customElements.define(m,l)};
|
|
@@ -1 +0,0 @@
|
|
|
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);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:"rounded border border-gray-50 bg-gray-50/50 h-6 w-40"}),null,16)):"divider-text"===r.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},t.$attrs,{class:"rounded border border-gray-50 bg-gray-50/50 h-4 w-12 mx-auto"}),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:"rounded border border-gray-50 bg-gray-50/50 h-6 w-40"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["rounded border border-gray-50 bg-gray-50/50 mt-1 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 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-Df5eNqYX.js"),n=require("./useService-bNNi4GB8.js"),o=require("./subscriptions-CqK7t-fF.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 s=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:s,withPlanData:a,get:l}=function({subscriptionId:e}){const{getSubscription:t}=o.createSubscriptionsService(),{data:r,execute:i,apiStatus:s,error:a,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:s,error:a,get:i,isPending:l}}({subscriptionId:i.configuration.subscriptionId}),{isLoading:c}=r.useLoadInitialData(l());return(t,n)=>e.renderSlot(t.$slots,"default",{schedulesData:e.unref(s)?e.unref(a)(e.unref(s)):void 0,isLoading:e.unref(c)})}}),a=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,a)=>{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:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(s,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(a),c=t.getComponentName("subscription-schedules");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionSchedules=l,exports._sfc_main=a,exports.defineSolvimonSubscriptionSchedules=()=>{customElements.get(c)||customElements.define(c,l)};
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { b as useIntl, d as _sfc_main$1g, B as _sfc_main$E, o as _sfc_main$3, p as defineCustomElement, n as getComponentName } from "./component-BkmcE85U.mjs";
|
|
3
|
-
import { u as useService } from "./useService-Dz13Nxbi.mjs";
|
|
4
|
-
import { c as createSubscriptionsService } from "./subscriptions-3R7aMoky.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
|
-
};
|
|
148
|
-
export {
|
|
149
|
-
COMPONENT_NAME as C,
|
|
150
|
-
SolvimonSubscriptionSchedules as S,
|
|
151
|
-
_sfc_main as _,
|
|
152
|
-
defineSolvimonSubscriptionSchedules as d
|
|
153
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),o=require("./SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js"),t=require("./component-Df5eNqYX.js"),r=require("./useCustomer-Dp8sGHI0.js"),n=require("./useLoadInitialData-BRg7IWqW.js"),l=require("./usePaymentMethods-Dbimodf0.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._sfc_main=a,exports.defineSolvimonSubscriptionsList=()=>{customElements.get(c)||customElements.define(c,s)};
|
|
@@ -1,135 +0,0 @@
|
|
|
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-DfB5BqiH.mjs";
|
|
3
|
-
import { o as _sfc_main$2, p as defineCustomElement, n as getComponentName } from "./component-BkmcE85U.mjs";
|
|
4
|
-
import { u as useCustomer } from "./useCustomer-BRY0tuBH.mjs";
|
|
5
|
-
import { u as useLoadInitialData } from "./useLoadInitialData-Dm48tlSO.mjs";
|
|
6
|
-
import { u as usePaymentMethods } from "./usePaymentMethods-Bq5fWl1Q.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
|
-
};
|
|
130
|
-
export {
|
|
131
|
-
COMPONENT_NAME as C,
|
|
132
|
-
SolvimonSubscriptionsList as S,
|
|
133
|
-
_sfc_main as _,
|
|
134
|
-
defineSolvimonSubscriptionsList as d
|
|
135
|
-
};
|