@solvimon/solvimon-web 0.1.0-alpha.16 → 0.1.0-alpha.18
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 +33 -31
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
- package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-D4QupHWl.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
- package/dist/{PaymentIntegrationForm-CypW6fZY.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
- package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
- package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
- package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
- package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
- package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +25 -14
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +77 -31
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +115 -68
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs +37 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs +100 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +22 -119
- package/dist/adyen-BMDZQBUG.js +1 -0
- package/dist/{url-1Lbg5Yni.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
- package/dist/component--Y7Igv5i.mjs +1022 -0
- package/dist/component-DIy1hvJM.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +4 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +7 -7
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -58
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +25 -9
- package/dist/core/action-request.types.d.ts +3 -15
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +4 -2
- package/dist/{customer-Bv_fqXzO.mjs → customer-DovIxTG1.mjs} +1 -1
- package/dist/{customer-_W8gIX5m.js → customer-brfznoHY.js} +1 -1
- package/dist/en-US-BvOHPudj.js +1 -0
- package/dist/{en-US-DAgOSlgv.mjs → en-US-CXDO3qhq.mjs} +121 -36
- package/dist/index-BMWWP8xj.js +1 -0
- package/dist/index-Do7kzLpg.mjs +265 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +7 -4
- package/dist/invoices-Cf3dSYSj.js +1 -0
- package/dist/{invoices-BGb0AwVF.mjs → invoices-Dk-z04lg.mjs} +32 -16
- package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-BgL_PuBn.mjs} +126 -40
- package/dist/nl-NL-COGUFg60.js +1 -0
- package/dist/{paymentMethods-DvqlWe96.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
- package/dist/paymentMethods-DVDC_WfL.js +1 -0
- package/dist/{payments-DMDDI3MK.js → payments-DVZFO5yb.js} +1 -1
- package/dist/{payments-CpzTVrQM.mjs → payments-TnRjtlOw.mjs} +1 -1
- package/dist/pricing-CuYndX6t.js +1 -0
- package/dist/pricing-GwLCiSzs.mjs +19 -0
- package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
- package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
- package/dist/{registry-B-If1W_u.mjs → registry-Ck0Gb6rj.mjs} +7 -4
- package/dist/registry-Cra6yoB4.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +429 -689
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +61 -39
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +30 -13
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +3 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +889 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +3 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +716 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/subscription-C41lG-rH.mjs +89 -0
- package/dist/subscription-b0OPx8Du.js +1 -0
- package/dist/subscriptions-BFCKVHnP.js +1 -0
- package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
- package/dist/{useActionDispatchProvider-Dz8-e4gZ.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
- package/dist/{useActionDispatchProvider-BHTknMoH.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
- package/dist/{useCustomer-Z24KchWC.js → useCustomer-C1XTqmrQ.js} +1 -1
- package/dist/{useCustomer-VVJi8z2w.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
- package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
- package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
- package/dist/{useInvoiceData-Bl87gzIS.js → useInvoiceData-BrxMo4Zt.js} +1 -1
- package/dist/{useInvoiceData-Di5pLPM0.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
- package/dist/{useInvoicesList-z19cteaD.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
- package/dist/useInvoicesList-DmisMQzy.js +1 -0
- package/dist/{useLoadInitialData-CkpryfjF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
- package/dist/{useLoadInitialData-CTqfiMTN.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
- package/dist/{usePaymentMethodOptions-BoGHJjng.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
- package/dist/{usePaymentMethodOptions-BsCZnCQW.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
- package/dist/{usePaymentMethods-AC-4rrR9.js → usePaymentMethods-CAFMvSOr.js} +1 -1
- package/dist/{usePaymentMethods-ocHmNoP7.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
- package/dist/{usePayments-CgXZeWrU.js → usePayments-BieVBaz-.js} +1 -1
- package/dist/{usePayments-D85eB5l4.mjs → usePayments-D88XSZfS.mjs} +10 -4
- package/dist/{usePortal-B1O1zgdV.mjs → usePortal-0NDlbFr9.mjs} +1 -1
- package/dist/{usePortal-DVD7PcWI.js → usePortal-B954nyEB.js} +1 -1
- package/dist/{useService-CHrkefKd.js → useService-BiljI7XA.js} +1 -1
- package/dist/{useService-DF57xuDd.mjs → useService-CqfJi5ST.mjs} +1 -1
- package/dist/useSubscription-9rJpFNUF.mjs +29 -0
- package/dist/useSubscription-k3limdu_.js +1 -0
- package/dist/vendor-ui-Dfh3_g4q.js +1 -0
- package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-ItGf7wJV.mjs} +8006 -6329
- package/package.json +23 -9
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs +0 -1537
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js +0 -1
- package/dist/component-Bg2JVC_O.mjs +0 -933
- package/dist/component-Bs8oszfD.js +0 -1
- package/dist/en-US-C0gIE4Q1.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-D-OKipCg.js +0 -1
- package/dist/nl-NL-Br7muSHK.js +0 -1
- package/dist/paymentMethods-DIbB759g.js +0 -1
- package/dist/registry-uG2isab0.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1102
- package/dist/subscriptions-BPYyv09M.mjs +0 -75
- package/dist/subscriptions-CC61I6Nj.js +0 -1
- package/dist/url-B6-3PkW2.js +0 -1
- package/dist/useIncrementalLoading-CuSndpP2.js +0 -1
- package/dist/useInvoicesList-CFk-_oVK.js +0 -1
- package/dist/useWalletBalanceItems-BL-R5foK.js +0 -1
- package/dist/useWalletBalanceItems-COQDLfoZ.mjs +0 -109
- package/dist/vendor-ui-C3Tq-qY_.js +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
function getFirstPricingPlanScheduleOfType({
|
|
2
|
+
pricingPlanScheduleInfos,
|
|
3
|
+
type
|
|
4
|
+
}) {
|
|
5
|
+
return (pricingPlanScheduleInfos ?? []).find(
|
|
6
|
+
(scheduleInfo) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (((_a = scheduleInfo.pricing_plan_schedule) == null ? void 0 : _a.type) ?? scheduleInfo.type) === type;
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
function getActiveDefaultScheduleId(subscriptions) {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = getActiveDefaultScheduleInfo(
|
|
15
|
+
subscriptions.flatMap(
|
|
16
|
+
({ pricing_plan_schedule_infos }) => pricing_plan_schedule_infos ?? []
|
|
17
|
+
)
|
|
18
|
+
)) == null ? void 0 : _a.id;
|
|
19
|
+
}
|
|
20
|
+
const getStartAt = (scheduleInfo) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return Date.parse(scheduleInfo.start_at ?? ((_a = scheduleInfo.pricing_plan_schedule) == null ? void 0 : _a.start_at));
|
|
23
|
+
};
|
|
24
|
+
function getActiveDefaultScheduleInfo(scheduleInfos) {
|
|
25
|
+
const now = Date.now();
|
|
26
|
+
return scheduleInfos.filter((scheduleInfo) => {
|
|
27
|
+
const schedule = scheduleInfo.pricing_plan_schedule;
|
|
28
|
+
const type = (schedule == null ? void 0 : schedule.type) ?? scheduleInfo.type;
|
|
29
|
+
const startAt = getStartAt(scheduleInfo);
|
|
30
|
+
const endAtValue = scheduleInfo.end_at ?? (schedule == null ? void 0 : schedule.end_at);
|
|
31
|
+
const endAt = endAtValue ? Date.parse(endAtValue) : void 0;
|
|
32
|
+
const hasStarted = Number.isFinite(startAt) && startAt <= now;
|
|
33
|
+
const hasNotEnded = endAt === void 0 || !Number.isFinite(endAt) || endAt > now;
|
|
34
|
+
return type === "DEFAULT" && hasStarted && hasNotEnded;
|
|
35
|
+
}).sort((a, b) => getStartAt(b) - getStartAt(a)).at(0);
|
|
36
|
+
}
|
|
37
|
+
function getPricingGroupByPricingId({
|
|
38
|
+
pricingPlanScheduleInfo,
|
|
39
|
+
pricingId
|
|
40
|
+
}) {
|
|
41
|
+
var _a;
|
|
42
|
+
return (((_a = pricingPlanScheduleInfo.pricing_plan_version) == null ? void 0 : _a.pricing_categories) ?? []).flatMap((category) => category.pricing_groups ?? []).find((group) => (group.pricings ?? []).some((pricing) => pricing.id === pricingId));
|
|
43
|
+
}
|
|
44
|
+
function getPricingItemConfigMetaById({
|
|
45
|
+
pricingPlanScheduleInfo
|
|
46
|
+
}) {
|
|
47
|
+
const metaById = /* @__PURE__ */ new Map();
|
|
48
|
+
const categories = pricingPlanScheduleInfo.pricing_plan_version.pricing_categories ?? [];
|
|
49
|
+
categories.forEach((category) => {
|
|
50
|
+
var _a;
|
|
51
|
+
(_a = category.pricings) == null ? void 0 : _a.forEach((pricing) => {
|
|
52
|
+
var _a2;
|
|
53
|
+
(_a2 = pricing.items) == null ? void 0 : _a2.forEach((item) => {
|
|
54
|
+
var _a3, _b, _c;
|
|
55
|
+
(_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach((billingConfig) => {
|
|
56
|
+
var _a4;
|
|
57
|
+
(_a4 = billingConfig.configs) == null ? void 0 : _a4.forEach((config) => {
|
|
58
|
+
var _a5, _b2, _c2, _d;
|
|
59
|
+
if (config.id) {
|
|
60
|
+
const currency = (_d = (_c2 = (_b2 = (_a5 = config.details) == null ? void 0 : _a5.bands) == null ? void 0 : _b2.find(
|
|
61
|
+
(band) => {
|
|
62
|
+
var _a6;
|
|
63
|
+
return (_a6 = band.amount) == null ? void 0 : _a6.currency;
|
|
64
|
+
}
|
|
65
|
+
)) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
|
|
66
|
+
metaById.set(config.id, {
|
|
67
|
+
...currency && { currency },
|
|
68
|
+
billingPeriod: billingConfig.billing_period
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
(_b = item.configs) == null ? void 0 : _b.forEach((config) => {
|
|
74
|
+
var _a4, _b2, _c2, _d;
|
|
75
|
+
if (config.id) {
|
|
76
|
+
const currency = (_d = (_c2 = (_b2 = (_a4 = config.details) == null ? void 0 : _a4.bands) == null ? void 0 : _b2.find(
|
|
77
|
+
(band) => {
|
|
78
|
+
var _a5;
|
|
79
|
+
return (_a5 = band.amount) == null ? void 0 : _a5.currency;
|
|
80
|
+
}
|
|
81
|
+
)) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
|
|
82
|
+
metaById.set(config.id, {
|
|
83
|
+
...currency && { currency }
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
(_c = item.pricing_currency_configs) == null ? void 0 : _c.forEach((currencyConfig) => {
|
|
88
|
+
var _a4, _b2;
|
|
89
|
+
const currency = currencyConfig.currency;
|
|
90
|
+
(_a4 = currencyConfig.billing_period_configs) == null ? void 0 : _a4.forEach((billingConfig) => {
|
|
91
|
+
var _a5;
|
|
92
|
+
(_a5 = billingConfig.configs) == null ? void 0 : _a5.forEach((config) => {
|
|
93
|
+
if (config.id) {
|
|
94
|
+
metaById.set(config.id, {
|
|
95
|
+
currency,
|
|
96
|
+
billingPeriod: billingConfig.billing_period
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
(_b2 = currencyConfig.configs) == null ? void 0 : _b2.forEach((config) => {
|
|
102
|
+
if (config.id) {
|
|
103
|
+
metaById.set(config.id, { currency });
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
return metaById;
|
|
111
|
+
}
|
|
112
|
+
function getScheduleCustomizations({
|
|
113
|
+
enabledPricings,
|
|
114
|
+
seatsValues,
|
|
115
|
+
pricingPlanScheduleInfos,
|
|
116
|
+
pricingCurrency,
|
|
117
|
+
billingPeriod
|
|
118
|
+
}) {
|
|
119
|
+
const subscriptionSchedule = getFirstPricingPlanScheduleOfType({
|
|
120
|
+
pricingPlanScheduleInfos,
|
|
121
|
+
type: "DEFAULT"
|
|
122
|
+
});
|
|
123
|
+
if (!subscriptionSchedule || !enabledPricings && !seatsValues) {
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
return [
|
|
127
|
+
{
|
|
128
|
+
pricing_plan_schedule_id: subscriptionSchedule.id,
|
|
129
|
+
enabled_pricings: enabledPricings,
|
|
130
|
+
seats_values: seatsValues == null ? void 0 : seatsValues.map(({ pricing_item_config_id, number }) => ({
|
|
131
|
+
pricing_item_config_id,
|
|
132
|
+
number
|
|
133
|
+
})),
|
|
134
|
+
...pricingCurrency && { pricing_currency: pricingCurrency },
|
|
135
|
+
...billingPeriod && { billing_period: billingPeriod }
|
|
136
|
+
}
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
getActiveDefaultScheduleId as a,
|
|
141
|
+
getScheduleCustomizations as b,
|
|
142
|
+
getActiveDefaultScheduleInfo as c,
|
|
143
|
+
getPricingGroupByPricingId as d,
|
|
144
|
+
getPricingItemConfigMetaById as e,
|
|
145
|
+
getFirstPricingPlanScheduleOfType as g
|
|
146
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineSolvimonPaymentMethodForm } from "./components/PaymentMethodForm/PaymentMethodForm.es.js";
|
|
2
2
|
import { defineSolvimonCustomerOverview } from "./screens/CustomerOverview/CustomerOverview.es.js";
|
|
3
3
|
import { defineSolvimonCheckout } from "./screens/Checkout/Checkout.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { defineSolvimonSubscriptionManagement } from "./screens/SubscriptionManagement/SubscriptionManagement.es.js";
|
|
5
|
+
import { defineSolvimonSubscriptionDetails } from "./screens/SubscriptionDetails/SubscriptionDetails.es.js";
|
|
5
6
|
import { defineSolvimonPayInvoice } from "./screens/PayInvoice/PayInvoice.es.js";
|
|
6
7
|
import { defineSolvimonPaymentMethodsManagement } from "./screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js";
|
|
7
8
|
import { defineSolvimonInvoice } from "./components/Invoice/Invoice.es.js";
|
|
@@ -15,11 +16,12 @@ import { defineSolvimonCustomerPaymentMethods } from "./components/CustomerPayme
|
|
|
15
16
|
import { defineSolvimonWalletBalances } from "./components/WalletBalances/WalletBalances.es.js";
|
|
16
17
|
import { defineSolvimonBillingInformation } from "./components/BillingInformation/BillingInformation.es.js";
|
|
17
18
|
import { defineSolvimonBillingInformationForm } from "./components/BillingInformationForm/BillingInformationForm.es.js";
|
|
18
|
-
import { g as getComponentName } from "./component
|
|
19
|
+
import { g as getComponentName } from "./component--Y7Igv5i.mjs";
|
|
19
20
|
const SCREEN_DEFINERS = {
|
|
20
21
|
"customer-overview": defineSolvimonCustomerOverview,
|
|
21
22
|
checkout: defineSolvimonCheckout,
|
|
22
|
-
"
|
|
23
|
+
"subscription-management": defineSolvimonSubscriptionManagement,
|
|
24
|
+
"subscription-details": defineSolvimonSubscriptionDetails,
|
|
23
25
|
"pay-invoice": defineSolvimonPayInvoice,
|
|
24
26
|
"payment-methods-management": defineSolvimonPaymentMethodsManagement
|
|
25
27
|
};
|
|
@@ -119,7 +121,8 @@ function createSolvimonCore(config = {}) {
|
|
|
119
121
|
const REGISTERED_SCREEN_IDS = [
|
|
120
122
|
"customer-overview",
|
|
121
123
|
"checkout",
|
|
122
|
-
"
|
|
124
|
+
"subscription-management",
|
|
125
|
+
"subscription-details",
|
|
123
126
|
"pay-invoice",
|
|
124
127
|
"payment-methods-management"
|
|
125
128
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js"),n=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),o=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/SubscriptionManagement/SubscriptionManagement.cjs.js"),t=require("./screens/SubscriptionDetails/SubscriptionDetails.cjs.js"),s=require("./screens/PayInvoice/PayInvoice.cjs.js"),r=require("./screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js"),c=require("./components/Invoice/Invoice.cjs.js"),m=require("./components/InvoiceHeader/InvoiceHeader.cjs.js"),a=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),u=require("./components/InvoicesList/InvoicesList.cjs.js"),l=require("./components/PaymentHistory/PaymentHistory.cjs.js"),v=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),d=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),f=require("./components/WalletBalances/WalletBalances.cjs.js"),j=require("./components/BillingInformation/BillingInformation.cjs.js"),S=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),h=require("./component-DIy1hvJM.js"),b={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout,"subscription-management":i.defineSolvimonSubscriptionManagement,"subscription-details":t.defineSolvimonSubscriptionDetails,"pay-invoice":s.defineSolvimonPayInvoice,"payment-methods-management":r.defineSolvimonPaymentMethodsManagement},y={invoice:c.defineSolvimonInvoice,"invoice-header":m.defineSolvimonInvoiceHeader,"invoice-details":a.defineSolvimonInvoiceDetails,"invoices-list":u.defineSolvimonInvoicesList,"payment-history":l.defineSolvimonPaymentHistory,"subscriptions-list":v.defineSolvimonSubscriptionsList,"subscription-schedules":d.defineSolvimonSubscriptionSchedules,"customer-payment-methods":p.defineSolvimonCustomerPaymentMethods,"wallet-balances":f.defineSolvimonWalletBalances,"billing-information":j.defineSolvimonBillingInformation,"billing-information-form":S.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function g(e,n){const o="screen"===n?(i=e,Object.hasOwn(b,i)&&b[e]):function(e){return Object.hasOwn(y,e)}(e)&&y[e];var i;if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?b:y).join(", ")}.`);o()}function I(e,n,o,i){const t=function(e){if("string"==typeof e){const n=document.querySelector(e);if(!n)throw new Error(`Solvimon: container not found for selector "${e}"`);return n}return e}(e);g(n,o);const s=(r=n,h.getComponentName(r));var r;const c=document.createElement(s);return function(e,n){const o={};for(const[i,t]of Object.entries(n))void 0!==t&&(o[i]=t);Object.assign(e,o)}(c,i),t.appendChild(c),{unmount(){c.remove()}}}function q(e){const{container:n,...o}=e;return{container:n,props:Object.fromEntries(Object.entries(o))}}function M(e,n){return{...e,...n}}const P=["customer-overview","checkout","subscription-management","subscription-details","pay-invoice","payment-methods-management"],w=["invoice","invoice-header","invoice-details","invoices-list","payment-history","subscriptions-list","subscription-schedules","customer-payment-methods","wallet-balances","billing-information","billing-information-form","payment-method-form"];exports.createSolvimonCore=function(e={}){return{config:e,createComponent(n,o){const{container:i,props:t}=q(o);return I(i,n,"component",M(e,t)).unmount},createScreen(n,o){const{container:i,props:t}=q(o);return I(i,n,"screen",M(e,t)).unmount}}},exports.getRegisteredComponentIds=function(){return[...w]},exports.getRegisteredScreenIds=function(){return[...P]};
|