@solvimon/solvimon-web 0.1.0-alpha.1
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 +80 -0
- package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +99 -0
- package/dist/BillingInformation.entry.ce-DkrfEvK_.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs +56 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js +1 -0
- package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +1 -0
- package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +579 -0
- package/dist/Checkout.entry.ce-Bif6vR1K.mjs +5185 -0
- package/dist/Checkout.entry.ce-CkQnLAn4.js +1 -0
- package/dist/ContentWithAsideLayout-BC-C5Gjt.mjs +42 -0
- package/dist/ContentWithAsideLayout-CIVSoqFr.js +1 -0
- package/dist/CustomerOverview.entry.ce-C__omsVl.js +1 -0
- package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +231 -0
- package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +135 -0
- package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +1 -0
- package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +583 -0
- package/dist/Invoice.entry.ce-Cgr43ome.js +1 -0
- package/dist/InvoiceDetails.entry.ce-Cnpz8CLJ.mjs +130 -0
- package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs +85 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js +1 -0
- package/dist/InvoicesList.entry.ce-38iOW5qh.js +1 -0
- package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +105 -0
- package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +1 -0
- package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +134 -0
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js +1 -0
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs +90 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs +6568 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +1 -0
- package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +238 -0
- package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +1 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs +62 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +1 -0
- package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +1 -0
- package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +153 -0
- package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +1 -0
- package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +135 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs +373 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js +1 -0
- package/dist/_Uint8Array-DHE03FZr.mjs +507 -0
- package/dist/_Uint8Array-DxISR7XF.js +1 -0
- package/dist/auto-B_36W1Fc.js +6 -0
- package/dist/auto-BfMZdgp-.mjs +14207 -0
- package/dist/cloneDeep-Hs8Pp07F.js +1 -0
- package/dist/cloneDeep-sm9cY-u2.mjs +212 -0
- package/dist/component-BkmcE85U.mjs +58654 -0
- package/dist/component-Df5eNqYX.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +3 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.es.js +7 -0
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +3 -0
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -0
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +7 -0
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +3 -0
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -0
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +7 -0
- package/dist/components/Invoice/Invoice.ce.d.ts +3 -0
- package/dist/components/Invoice/Invoice.cjs.js +1 -0
- package/dist/components/Invoice/Invoice.es.js +7 -0
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +3 -0
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -0
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +7 -0
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +3 -0
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -0
- package/dist/components/InvoicesList/InvoicesList.es.js +7 -0
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +3 -0
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -0
- package/dist/components/PaymentHistory/PaymentHistory.es.js +7 -0
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +3 -0
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -0
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +3 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -0
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +3 -0
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -0
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +7 -0
- package/dist/core/action-request.types.d.ts +58 -0
- package/dist/core/configuration.d.ts +2 -0
- package/dist/core/index.cjs.js +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.es.js +6 -0
- package/dist/core/registry.ce.d.ts +2 -0
- package/dist/core/registry.d.ts +6 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/index-2jo9BSPM.js +1 -0
- package/dist/index-BFZ0dPh9.mjs +179 -0
- package/dist/index-CWSXne1Q.js +1 -0
- package/dist/index-CzL1ZcGi.mjs +85 -0
- package/dist/index-D3v7hAtc.mjs +253 -0
- package/dist/index-DRdBmZ2-.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.es.js +39 -0
- package/dist/invoices-8M_3ur_U.js +1 -0
- package/dist/invoices-C31Wz1Bu.mjs +84 -0
- package/dist/paymentMethods-CrU4G_2Y.mjs +65 -0
- package/dist/paymentMethods-CzUqDlvc.js +1 -0
- package/dist/payments-C3LPk9k9.js +1 -0
- package/dist/payments-NtWI8KlU.mjs +47 -0
- package/dist/registry-By94DXE2.js +1 -0
- package/dist/registry-shRKDl3K.mjs +127 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +3 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -0
- package/dist/screens/Checkout/Checkout.es.js +7 -0
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +3 -0
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -0
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +7 -0
- package/dist/solvimon-web.css +1 -0
- package/dist/sprite-i5T7eZnk-C55G-dBo.js +1 -0
- package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +4 -0
- package/dist/subscriptions-3R7aMoky.mjs +74 -0
- package/dist/subscriptions-CqK7t-fF.js +1 -0
- package/dist/useActionDispatchProvider-CBo_Hwu5.mjs +12 -0
- package/dist/useActionDispatchProvider-DsIljrhi.js +1 -0
- package/dist/useCustomer-BRY0tuBH.mjs +45 -0
- package/dist/useCustomer-Dp8sGHI0.js +1 -0
- package/dist/useCustomerPaymentMethodOptions-DYpMDnJR.js +1 -0
- package/dist/useCustomerPaymentMethodOptions-Fe_dLxfv.mjs +168 -0
- package/dist/useIncrementalLoading-D8oKNxX7.js +1 -0
- package/dist/useIncrementalLoading-fHCizCSo.mjs +69 -0
- package/dist/useInvoiceData-DImEH1ca.js +1 -0
- package/dist/useInvoiceData-dyvoDwFF.mjs +51 -0
- package/dist/useInvoicesList-BZQ9Y0qN.js +1 -0
- package/dist/useInvoicesList-rDvRzMqe.mjs +294 -0
- package/dist/useLoadInitialData-BRg7IWqW.js +1 -0
- package/dist/useLoadInitialData-Dm48tlSO.mjs +13 -0
- package/dist/usePaymentMethods-Bq5fWl1Q.mjs +16 -0
- package/dist/usePaymentMethods-Dbimodf0.js +1 -0
- package/dist/useService-Dz13Nxbi.mjs +272 -0
- package/dist/useService-bNNi4GB8.js +1 -0
- package/package.json +174 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { unref } from "vue";
|
|
2
|
+
const req = (value) => {
|
|
3
|
+
value = unref(value);
|
|
4
|
+
if (Array.isArray(value)) return !!value.length;
|
|
5
|
+
if (value === void 0 || value === null) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (value === false) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
if (value instanceof Date) {
|
|
12
|
+
return !isNaN(value.getTime());
|
|
13
|
+
}
|
|
14
|
+
if (typeof value === "object") {
|
|
15
|
+
for (let _ in value) return true;
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return !!String(value).length;
|
|
19
|
+
};
|
|
20
|
+
function regex() {
|
|
21
|
+
for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
|
+
expr[_key] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
return (value) => {
|
|
25
|
+
value = unref(value);
|
|
26
|
+
return !req(value) || expr.every((reg) => {
|
|
27
|
+
reg.lastIndex = 0;
|
|
28
|
+
return reg.test(value);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
regex(/^[a-zA-Z]*$/);
|
|
33
|
+
regex(/^[a-zA-Z0-9]*$/);
|
|
34
|
+
regex(/^\d*(\.\d+)?$/);
|
|
35
|
+
const emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
|
|
36
|
+
var email$1 = regex(emailRegex);
|
|
37
|
+
var email = {
|
|
38
|
+
$validator: email$1,
|
|
39
|
+
$message: "Value is not a valid email address",
|
|
40
|
+
$params: {
|
|
41
|
+
type: "email"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
function required$1(value) {
|
|
45
|
+
if (typeof value === "string") {
|
|
46
|
+
value = value.trim();
|
|
47
|
+
}
|
|
48
|
+
return req(value);
|
|
49
|
+
}
|
|
50
|
+
var required = {
|
|
51
|
+
$validator: required$1,
|
|
52
|
+
$message: "Value is required",
|
|
53
|
+
$params: {
|
|
54
|
+
type: "required"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const validate$1 = (prop, val) => prop ? req(typeof val === "string" ? val.trim() : val) : true;
|
|
58
|
+
function requiredIf$1(propOrFunction) {
|
|
59
|
+
return function(value, parentVM) {
|
|
60
|
+
if (typeof propOrFunction !== "function") {
|
|
61
|
+
return validate$1(unref(propOrFunction), value);
|
|
62
|
+
}
|
|
63
|
+
const result = propOrFunction.call(this, value, parentVM);
|
|
64
|
+
return validate$1(result, value);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function requiredIf(prop) {
|
|
68
|
+
return {
|
|
69
|
+
$validator: requiredIf$1(prop),
|
|
70
|
+
$message: "The value is required",
|
|
71
|
+
$params: {
|
|
72
|
+
type: "requiredIf",
|
|
73
|
+
prop
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
|
78
|
+
regex(urlRegex);
|
|
79
|
+
regex(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
80
|
+
regex(/^[-]?\d*(\.\d+)?$/);
|
|
81
|
+
export {
|
|
82
|
+
requiredIf as a,
|
|
83
|
+
email as e,
|
|
84
|
+
required as r
|
|
85
|
+
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { i as isClient, t as tryOnScopeDispose, a as tryOnMounted, r as resolveRef, b as isString, n as noop, c as resolveUnref, d as increaseWithUnit, e as identity } from "./index-BFZ0dPh9.mjs";
|
|
2
|
+
import { ref, watchEffect, watch } from "vue";
|
|
3
|
+
function unrefElement(elRef) {
|
|
4
|
+
var _a;
|
|
5
|
+
const plain = resolveUnref(elRef);
|
|
6
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
7
|
+
}
|
|
8
|
+
const defaultWindow = isClient ? window : void 0;
|
|
9
|
+
function useEventListener(...args) {
|
|
10
|
+
let target;
|
|
11
|
+
let events;
|
|
12
|
+
let listeners;
|
|
13
|
+
let options;
|
|
14
|
+
if (isString(args[0]) || Array.isArray(args[0])) {
|
|
15
|
+
[events, listeners, options] = args;
|
|
16
|
+
target = defaultWindow;
|
|
17
|
+
} else {
|
|
18
|
+
[target, events, listeners, options] = args;
|
|
19
|
+
}
|
|
20
|
+
if (!target)
|
|
21
|
+
return noop;
|
|
22
|
+
if (!Array.isArray(events))
|
|
23
|
+
events = [events];
|
|
24
|
+
if (!Array.isArray(listeners))
|
|
25
|
+
listeners = [listeners];
|
|
26
|
+
const cleanups = [];
|
|
27
|
+
const cleanup = () => {
|
|
28
|
+
cleanups.forEach((fn) => fn());
|
|
29
|
+
cleanups.length = 0;
|
|
30
|
+
};
|
|
31
|
+
const register = (el, event, listener, options2) => {
|
|
32
|
+
el.addEventListener(event, listener, options2);
|
|
33
|
+
return () => el.removeEventListener(event, listener, options2);
|
|
34
|
+
};
|
|
35
|
+
const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
|
|
36
|
+
cleanup();
|
|
37
|
+
if (!el)
|
|
38
|
+
return;
|
|
39
|
+
cleanups.push(...events.flatMap((event) => {
|
|
40
|
+
return listeners.map((listener) => register(el, event, listener, options2));
|
|
41
|
+
}));
|
|
42
|
+
}, { immediate: true, flush: "post" });
|
|
43
|
+
const stop = () => {
|
|
44
|
+
stopWatch();
|
|
45
|
+
cleanup();
|
|
46
|
+
};
|
|
47
|
+
tryOnScopeDispose(stop);
|
|
48
|
+
return stop;
|
|
49
|
+
}
|
|
50
|
+
function useSupported(callback, sync = false) {
|
|
51
|
+
const isSupported = ref();
|
|
52
|
+
const update = () => isSupported.value = Boolean(callback());
|
|
53
|
+
update();
|
|
54
|
+
tryOnMounted(update, sync);
|
|
55
|
+
return isSupported;
|
|
56
|
+
}
|
|
57
|
+
function useMediaQuery(query, options = {}) {
|
|
58
|
+
const { window: window2 = defaultWindow } = options;
|
|
59
|
+
const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
60
|
+
let mediaQuery;
|
|
61
|
+
const matches = ref(false);
|
|
62
|
+
const cleanup = () => {
|
|
63
|
+
if (!mediaQuery)
|
|
64
|
+
return;
|
|
65
|
+
if ("removeEventListener" in mediaQuery)
|
|
66
|
+
mediaQuery.removeEventListener("change", update);
|
|
67
|
+
else
|
|
68
|
+
mediaQuery.removeListener(update);
|
|
69
|
+
};
|
|
70
|
+
const update = () => {
|
|
71
|
+
if (!isSupported.value)
|
|
72
|
+
return;
|
|
73
|
+
cleanup();
|
|
74
|
+
mediaQuery = window2.matchMedia(resolveRef(query).value);
|
|
75
|
+
matches.value = mediaQuery.matches;
|
|
76
|
+
if ("addEventListener" in mediaQuery)
|
|
77
|
+
mediaQuery.addEventListener("change", update);
|
|
78
|
+
else
|
|
79
|
+
mediaQuery.addListener(update);
|
|
80
|
+
};
|
|
81
|
+
watchEffect(update);
|
|
82
|
+
tryOnScopeDispose(() => cleanup());
|
|
83
|
+
return matches;
|
|
84
|
+
}
|
|
85
|
+
const breakpointsTailwind = {
|
|
86
|
+
"sm": 640,
|
|
87
|
+
"md": 768,
|
|
88
|
+
"lg": 1024,
|
|
89
|
+
"xl": 1280,
|
|
90
|
+
"2xl": 1536
|
|
91
|
+
};
|
|
92
|
+
var __defProp$m = Object.defineProperty;
|
|
93
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
94
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
95
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
96
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
97
|
+
var __spreadValues$m = (a, b) => {
|
|
98
|
+
for (var prop in b || (b = {}))
|
|
99
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
100
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
101
|
+
if (__getOwnPropSymbols$o)
|
|
102
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
103
|
+
if (__propIsEnum$o.call(b, prop))
|
|
104
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
105
|
+
}
|
|
106
|
+
return a;
|
|
107
|
+
};
|
|
108
|
+
function useBreakpoints(breakpoints, options = {}) {
|
|
109
|
+
function getValue(k, delta) {
|
|
110
|
+
let v = breakpoints[k];
|
|
111
|
+
if (delta != null)
|
|
112
|
+
v = increaseWithUnit(v, delta);
|
|
113
|
+
if (typeof v === "number")
|
|
114
|
+
v = `${v}px`;
|
|
115
|
+
return v;
|
|
116
|
+
}
|
|
117
|
+
const { window: window2 = defaultWindow } = options;
|
|
118
|
+
function match(query) {
|
|
119
|
+
if (!window2)
|
|
120
|
+
return false;
|
|
121
|
+
return window2.matchMedia(query).matches;
|
|
122
|
+
}
|
|
123
|
+
const greaterOrEqual = (k) => {
|
|
124
|
+
return useMediaQuery(`(min-width: ${getValue(k)})`, options);
|
|
125
|
+
};
|
|
126
|
+
const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {
|
|
127
|
+
Object.defineProperty(shortcuts, k, {
|
|
128
|
+
get: () => greaterOrEqual(k),
|
|
129
|
+
enumerable: true,
|
|
130
|
+
configurable: true
|
|
131
|
+
});
|
|
132
|
+
return shortcuts;
|
|
133
|
+
}, {});
|
|
134
|
+
return __spreadValues$m({
|
|
135
|
+
greater(k) {
|
|
136
|
+
return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);
|
|
137
|
+
},
|
|
138
|
+
greaterOrEqual,
|
|
139
|
+
smaller(k) {
|
|
140
|
+
return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);
|
|
141
|
+
},
|
|
142
|
+
smallerOrEqual(k) {
|
|
143
|
+
return useMediaQuery(`(max-width: ${getValue(k)})`, options);
|
|
144
|
+
},
|
|
145
|
+
between(a, b) {
|
|
146
|
+
return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);
|
|
147
|
+
},
|
|
148
|
+
isGreater(k) {
|
|
149
|
+
return match(`(min-width: ${getValue(k, 0.1)})`);
|
|
150
|
+
},
|
|
151
|
+
isGreaterOrEqual(k) {
|
|
152
|
+
return match(`(min-width: ${getValue(k)})`);
|
|
153
|
+
},
|
|
154
|
+
isSmaller(k) {
|
|
155
|
+
return match(`(max-width: ${getValue(k, -0.1)})`);
|
|
156
|
+
},
|
|
157
|
+
isSmallerOrEqual(k) {
|
|
158
|
+
return match(`(max-width: ${getValue(k)})`);
|
|
159
|
+
},
|
|
160
|
+
isInBetween(a, b) {
|
|
161
|
+
return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);
|
|
162
|
+
}
|
|
163
|
+
}, shortcutMethods);
|
|
164
|
+
}
|
|
165
|
+
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
166
|
+
const globalKey = "__vueuse_ssr_handlers__";
|
|
167
|
+
_global[globalKey] = _global[globalKey] || {};
|
|
168
|
+
var SwipeDirection;
|
|
169
|
+
(function(SwipeDirection2) {
|
|
170
|
+
SwipeDirection2["UP"] = "UP";
|
|
171
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
172
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
173
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
174
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
175
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
176
|
+
var __defProp = Object.defineProperty;
|
|
177
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
178
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
179
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
180
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
181
|
+
var __spreadValues = (a, b) => {
|
|
182
|
+
for (var prop in b || (b = {}))
|
|
183
|
+
if (__hasOwnProp.call(b, prop))
|
|
184
|
+
__defNormalProp(a, prop, b[prop]);
|
|
185
|
+
if (__getOwnPropSymbols)
|
|
186
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
187
|
+
if (__propIsEnum.call(b, prop))
|
|
188
|
+
__defNormalProp(a, prop, b[prop]);
|
|
189
|
+
}
|
|
190
|
+
return a;
|
|
191
|
+
};
|
|
192
|
+
const _TransitionPresets = {
|
|
193
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
194
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
195
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
196
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
197
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
198
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
199
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
200
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
201
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
202
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
203
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
204
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
205
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
206
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
207
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
208
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
209
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
210
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
211
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
212
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
213
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
214
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
215
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
216
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
217
|
+
};
|
|
218
|
+
__spreadValues({
|
|
219
|
+
linear: identity
|
|
220
|
+
}, _TransitionPresets);
|
|
221
|
+
function useWindowSize(options = {}) {
|
|
222
|
+
const {
|
|
223
|
+
window: window2 = defaultWindow,
|
|
224
|
+
initialWidth = Infinity,
|
|
225
|
+
initialHeight = Infinity,
|
|
226
|
+
listenOrientation = true,
|
|
227
|
+
includeScrollbar = true
|
|
228
|
+
} = options;
|
|
229
|
+
const width = ref(initialWidth);
|
|
230
|
+
const height = ref(initialHeight);
|
|
231
|
+
const update = () => {
|
|
232
|
+
if (window2) {
|
|
233
|
+
if (includeScrollbar) {
|
|
234
|
+
width.value = window2.innerWidth;
|
|
235
|
+
height.value = window2.innerHeight;
|
|
236
|
+
} else {
|
|
237
|
+
width.value = window2.document.documentElement.clientWidth;
|
|
238
|
+
height.value = window2.document.documentElement.clientHeight;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
update();
|
|
243
|
+
tryOnMounted(update);
|
|
244
|
+
useEventListener("resize", update, { passive: true });
|
|
245
|
+
if (listenOrientation)
|
|
246
|
+
useEventListener("orientationchange", update, { passive: true });
|
|
247
|
+
return { width, height };
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
useBreakpoints as a,
|
|
251
|
+
breakpointsTailwind as b,
|
|
252
|
+
useWindowSize as u
|
|
253
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),r=r=>{if(r=e.unref(r),Array.isArray(r))return!!r.length;if(null==r)return!1;if(!1===r)return!0;if(r instanceof Date)return!isNaN(r.getTime());if("object"==typeof r){for(let e in r)return!0;return!1}return!!String(r).length};function a(){for(var a=arguments.length,t=new Array(a),f=0;f<a;f++)t[f]=arguments[f];return a=>(a=e.unref(a),!r(a)||t.every(e=>(e.lastIndex=0,e.test(a))))}a(/^[a-zA-Z]*$/),a(/^[a-zA-Z0-9]*$/),a(/^\d*(\.\d+)?$/);var t={$validator:a(/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i),$message:"Value is not a valid email address",$params:{type:"email"}};var f={$validator:function(e){return"string"==typeof e&&(e=e.trim()),r(e)},$message:"Value is required",$params:{type:"required"}};const i=(e,a)=>!e||r("string"==typeof a?a.trim():a);a(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i),a(/(^[0-9]*$)|(^-[0-9]+$)/),a(/^[-]?\d*(\.\d+)?$/),exports.email=t,exports.required=f,exports.requiredIf=function(r){return{$validator:(a=r,function(r,t){if("function"!=typeof a)return i(e.unref(a),r);const f=a.call(this,r,t);return i(f,r)}),$message:"The value is required",$params:{type:"requiredIf",prop:r}};var a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./registry-By94DXE2.js"),o=require("./Checkout.entry.ce-CkQnLAn4.js"),i=require("./CustomerOverview.entry.ce-C__omsVl.js"),n=require("./BillingInformation.entry.ce-DkrfEvK_.js"),t=require("./BillingInformationForm.entry.ce-MPMirEsk.js"),r=require("./CustomerPaymentMethods.entry.ce-DnjlRHPA.js"),s=require("./InvoiceDetails.entry.ce-jHDyWra2.js"),m=require("./InvoicesList.entry.ce-38iOW5qh.js"),l=require("./PaymentHistory.entry.ce-DDeHMhK_.js"),v=require("./SubscriptionSchedules.entry.ce-B4T_yQC1.js"),S=require("./SubscriptionsList.entry.ce-B5SJCQW0.js"),c=require("./PaymentMethodForm.entry.ce-zxeBXZW6.js");exports.createSolvimonCore=e.createSolvimonCore,exports.getRegisteredComponentIds=e.getRegisteredComponentIds,exports.getRegisteredScreenIds=e.getRegisteredScreenIds,exports.SolvimonCheckout=o.SolvimonCheckout,exports.defineSolvimonCheckout=o.defineSolvimonCheckout,exports.SolvimonCustomerOverview=i.SolvimonCustomerOverview,exports.defineSolvimonCustomerOverview=i.defineSolvimonCustomerOverview,exports.SolvimonBillingInformation=n.SolvimonBillingInformation,exports.defineSolvimonBillingInformation=n.defineSolvimonBillingInformation,exports.SolvimonBillingInformationForm=t.SolvimonBillingInformationForm,exports.defineSolvimonBillingInformationForm=t.defineSolvimonBillingInformationForm,exports.SolvimonCustomerPaymentMethods=r.SolvimonCustomerPaymentMethods,exports.defineSolvimonCustomerPaymentMethods=r.defineSolvimonCustomerPaymentMethods,exports.SolvimonInvoiceDetails=s.SolvimonInvoiceDetails,exports.defineSolvimonInvoiceDetails=s.defineSolvimonInvoiceDetails,exports.SolvimonInvoicesList=m.SolvimonInvoicesList,exports.defineSolvimonInvoicesList=m.defineSolvimonInvoicesList,exports.SolvimonPaymentHistory=l.SolvimonPaymentHistory,exports.defineSolvimonPaymentHistory=l.defineSolvimonPaymentHistory,exports.SolvimonSubscriptionSchedules=v.SolvimonSubscriptionSchedules,exports.defineSolvimonSubscriptionSchedules=v.defineSolvimonSubscriptionSchedules,exports.SolvimonSubscriptionsList=S.SolvimonSubscriptionsList,exports.defineSolvimonSubscriptionsList=S.defineSolvimonSubscriptionsList,exports.SolvimonPaymentMethodForm=c.SolvimonPaymentMethodForm,exports.defineSolvimonPaymentMethodForm=c.defineSolvimonPaymentMethodForm;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { createSolvimonCore, getRegisteredScreenIds, getRegisteredComponentIds, } from './public/core';
|
|
2
|
+
export type { SolvimonMountConfig, CoreConfiguration, ComponentConfigurationById, ScreenConfigurationById, ComponentMountConfiguration, ScreenMountConfiguration, SolvimonMountInstance, RegisteredScreenId, RegisteredComponentId, ActionRequestDetail, RequestActionEvent, } from './public/core';
|
|
3
|
+
export { SolvimonCheckout, defineSolvimonCheckout, } from './public/screens/Checkout/Checkout.entry.ce';
|
|
4
|
+
export { SolvimonCustomerOverview, defineSolvimonCustomerOverview, } from './public/screens/CustomerOverview/CustomerOverview.entry.ce';
|
|
5
|
+
export { SolvimonBillingInformation, defineSolvimonBillingInformation, } from './public/components/BillingInformation/BillingInformation.entry.ce';
|
|
6
|
+
export { SolvimonBillingInformationForm, defineSolvimonBillingInformationForm, } from './public/components/BillingInformationForm/BillingInformationForm.entry.ce';
|
|
7
|
+
export { SolvimonCustomerPaymentMethods, defineSolvimonCustomerPaymentMethods, } from './public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce';
|
|
8
|
+
export { SolvimonInvoiceDetails, defineSolvimonInvoiceDetails, } from './public/components/InvoiceDetails/InvoiceDetails.entry.ce';
|
|
9
|
+
export { SolvimonInvoicesList, defineSolvimonInvoicesList, } from './public/components/InvoicesList/InvoicesList.entry.ce';
|
|
10
|
+
export { SolvimonPaymentHistory, defineSolvimonPaymentHistory, } from './public/components/PaymentHistory/PaymentHistory.entry.ce';
|
|
11
|
+
export { SolvimonSubscriptionSchedules, defineSolvimonSubscriptionSchedules, } from './public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce';
|
|
12
|
+
export { SolvimonSubscriptionsList, defineSolvimonSubscriptionsList, } from './public/components/SubscriptionsList/SubscriptionsList.entry.ce';
|
|
13
|
+
export { SolvimonPaymentMethodForm, defineSolvimonPaymentMethodForm, } from './public/components/PaymentMethodForm/PaymentMethodForm.entry.ce';
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { c, g, a } from "./registry-shRKDl3K.mjs";
|
|
2
|
+
import { S, d } from "./Checkout.entry.ce-Bif6vR1K.mjs";
|
|
3
|
+
import { S as S2, d as d2 } from "./CustomerOverview.entry.ce-Ce_Yk8-i.mjs";
|
|
4
|
+
import { S as S3, d as d3 } from "./BillingInformation.entry.ce-1xVdsWlL.mjs";
|
|
5
|
+
import { S as S4, d as d4 } from "./BillingInformationForm.entry.ce-xfT0Jqps.mjs";
|
|
6
|
+
import { S as S5, d as d5 } from "./CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs";
|
|
7
|
+
import { S as S6, d as d6 } from "./InvoiceDetails.entry.ce-Cnpz8CLJ.mjs";
|
|
8
|
+
import { S as S7, d as d7 } from "./InvoicesList.entry.ce-BBaHEtAD.mjs";
|
|
9
|
+
import { S as S8, d as d8 } from "./PaymentHistory.entry.ce-Dw2NiP4l.mjs";
|
|
10
|
+
import { S as S9, d as d9 } from "./SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs";
|
|
11
|
+
import { S as S10, d as d10 } from "./SubscriptionsList.entry.ce-cNYuQZZj.mjs";
|
|
12
|
+
import { S as S11, d as d11 } from "./PaymentMethodForm.entry.ce-f4cFExKc.mjs";
|
|
13
|
+
export {
|
|
14
|
+
S3 as SolvimonBillingInformation,
|
|
15
|
+
S4 as SolvimonBillingInformationForm,
|
|
16
|
+
S as SolvimonCheckout,
|
|
17
|
+
S2 as SolvimonCustomerOverview,
|
|
18
|
+
S5 as SolvimonCustomerPaymentMethods,
|
|
19
|
+
S6 as SolvimonInvoiceDetails,
|
|
20
|
+
S7 as SolvimonInvoicesList,
|
|
21
|
+
S8 as SolvimonPaymentHistory,
|
|
22
|
+
S11 as SolvimonPaymentMethodForm,
|
|
23
|
+
S9 as SolvimonSubscriptionSchedules,
|
|
24
|
+
S10 as SolvimonSubscriptionsList,
|
|
25
|
+
c as createSolvimonCore,
|
|
26
|
+
d3 as defineSolvimonBillingInformation,
|
|
27
|
+
d4 as defineSolvimonBillingInformationForm,
|
|
28
|
+
d as defineSolvimonCheckout,
|
|
29
|
+
d2 as defineSolvimonCustomerOverview,
|
|
30
|
+
d5 as defineSolvimonCustomerPaymentMethods,
|
|
31
|
+
d6 as defineSolvimonInvoiceDetails,
|
|
32
|
+
d7 as defineSolvimonInvoicesList,
|
|
33
|
+
d8 as defineSolvimonPaymentHistory,
|
|
34
|
+
d11 as defineSolvimonPaymentMethodForm,
|
|
35
|
+
d9 as defineSolvimonSubscriptionSchedules,
|
|
36
|
+
d10 as defineSolvimonSubscriptionsList,
|
|
37
|
+
g as getRegisteredComponentIds,
|
|
38
|
+
a as getRegisteredScreenIds
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=require("./component-Df5eNqYX.js");exports.createInvoicesService=function(){const e=n.createRequestService(),i=n.useConfig();return{getInvoice:function(n){return e({url:`${i.apiUrls.transaction}/portal/invoices/${n}`})},getInvoices:function({customerId:t,pagination:r,query:o}){const a=n.withPagination({customer_id:t,...o??{}},r),c=new URL(`${i.apiUrls.transaction}/portal/invoices`);return Object.entries(a).forEach(([n,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{c.searchParams.append(`${n}[]`,`${e}`)}):c.searchParams.append(n,`${e}`))}),e({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(t){return e({url:`${i.apiUrls.transaction}/portal/invoices/${t}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(e=>{const i=new Blob([e],{type:"application/pdf"});n.downloadFile(i,`invoice-${t}.pdf`)})},getInvoicePreview:function({customer:n,pricingPlanSubscriptionId:t,startAt:r,customizations:o,pricing_plan_schedule_customizations:a}){return e({url:`${i.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:t,...r&&{start_at:r},...o&&{pricing_plan_schedule_customizations:o},...a&&{pricing_plan_schedule_customizations:a},customer_details:{...n,reference:"preview"}}})}}};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { c as createRequestService, u as useConfig, h as downloadFile, a as withPagination } from "./component-BkmcE85U.mjs";
|
|
2
|
+
function createInvoicesService() {
|
|
3
|
+
const request = createRequestService();
|
|
4
|
+
const config = useConfig();
|
|
5
|
+
function getInvoice(invoiceId) {
|
|
6
|
+
return request({
|
|
7
|
+
url: `${config.apiUrls.transaction}/portal/invoices/${invoiceId}`
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function getInvoices({
|
|
11
|
+
customerId,
|
|
12
|
+
pagination,
|
|
13
|
+
query
|
|
14
|
+
}) {
|
|
15
|
+
const queryParams = withPagination(
|
|
16
|
+
{
|
|
17
|
+
customer_id: customerId,
|
|
18
|
+
...query ?? {}
|
|
19
|
+
},
|
|
20
|
+
pagination
|
|
21
|
+
);
|
|
22
|
+
const url = new URL(`${config.apiUrls.transaction}/portal/invoices`);
|
|
23
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
24
|
+
if (value === null || value === void 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
value.forEach((entry) => {
|
|
29
|
+
url.searchParams.append(`${key}[]`, `${entry}`);
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
url.searchParams.append(key, `${value}`);
|
|
34
|
+
});
|
|
35
|
+
return request({
|
|
36
|
+
url: url.toString(),
|
|
37
|
+
isCollection: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async function getInvoicePdf(id) {
|
|
41
|
+
return request({
|
|
42
|
+
url: `${config.apiUrls.transaction}/portal/invoices/${id}/pdf`,
|
|
43
|
+
options: { headers: { "Content-Type": "application/pdf" } }
|
|
44
|
+
}).then((response) => {
|
|
45
|
+
const newBlob = new Blob([response], {
|
|
46
|
+
type: "application/pdf"
|
|
47
|
+
});
|
|
48
|
+
downloadFile(newBlob, `invoice-${id}.pdf`);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function getInvoicePreview({
|
|
52
|
+
customer,
|
|
53
|
+
pricingPlanSubscriptionId,
|
|
54
|
+
startAt,
|
|
55
|
+
customizations,
|
|
56
|
+
pricing_plan_schedule_customizations
|
|
57
|
+
}) {
|
|
58
|
+
return request({
|
|
59
|
+
url: `${config.apiUrls.transaction}/portal/invoices/preview`,
|
|
60
|
+
options: { method: "POST" },
|
|
61
|
+
data: {
|
|
62
|
+
template_pricing_plan_subscription_id: pricingPlanSubscriptionId,
|
|
63
|
+
...startAt && { start_at: startAt },
|
|
64
|
+
...customizations && { pricing_plan_schedule_customizations: customizations },
|
|
65
|
+
...pricing_plan_schedule_customizations && {
|
|
66
|
+
pricing_plan_schedule_customizations
|
|
67
|
+
},
|
|
68
|
+
customer_details: {
|
|
69
|
+
...customer,
|
|
70
|
+
reference: "preview"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
getInvoice,
|
|
77
|
+
getInvoices,
|
|
78
|
+
getInvoicePdf,
|
|
79
|
+
getInvoicePreview
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
createInvoicesService as c
|
|
84
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { c as createRequestService, u as useConfig, a as withPagination } from "./component-BkmcE85U.mjs";
|
|
2
|
+
function createPaymentMethodsService() {
|
|
3
|
+
const request = createRequestService();
|
|
4
|
+
const config = useConfig();
|
|
5
|
+
const BASE_URL = "/portal/payment-methods";
|
|
6
|
+
function getPaymentMethods({
|
|
7
|
+
customerId,
|
|
8
|
+
pagination,
|
|
9
|
+
query
|
|
10
|
+
}) {
|
|
11
|
+
const queryParams = withPagination(
|
|
12
|
+
{ customer_id: customerId, ...query ?? {} },
|
|
13
|
+
pagination
|
|
14
|
+
);
|
|
15
|
+
const url = new URL(`${config.apiUrls.config}${BASE_URL}`);
|
|
16
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
17
|
+
if (value === null || value === void 0) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (Array.isArray(value)) {
|
|
21
|
+
value.forEach((entry) => {
|
|
22
|
+
url.searchParams.append(`${key}[]`, `${entry}`);
|
|
23
|
+
});
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
url.searchParams.append(key, `${value}`);
|
|
27
|
+
});
|
|
28
|
+
return request({
|
|
29
|
+
url: url.toString(),
|
|
30
|
+
isCollection: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function getPaymentMethodOptions({
|
|
34
|
+
customerId,
|
|
35
|
+
country,
|
|
36
|
+
subscriptionId,
|
|
37
|
+
amount
|
|
38
|
+
}) {
|
|
39
|
+
return request({
|
|
40
|
+
url: `${config.apiUrls.config}/portal/payment-method-options`,
|
|
41
|
+
options: { method: "POST" },
|
|
42
|
+
data: {
|
|
43
|
+
...customerId && { customer_id: customerId },
|
|
44
|
+
...country && { country },
|
|
45
|
+
...subscriptionId && { pricing_plan_subscription_id: subscriptionId },
|
|
46
|
+
amount
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function tokenizePaymentMethod(data) {
|
|
51
|
+
return request({
|
|
52
|
+
url: `${config.apiUrls.config}/portal/payment-methods/tokenize`,
|
|
53
|
+
options: { method: "POST" },
|
|
54
|
+
data
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
getPaymentMethods,
|
|
59
|
+
getPaymentMethodOptions,
|
|
60
|
+
tokenizePaymentMethod
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
createPaymentMethodsService as c
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=require("./component-Df5eNqYX.js");exports.createPaymentMethodsService=function(){const e=t.createRequestService(),n=t.useConfig();return{getPaymentMethods:function({customerId:o,pagination:r,query:i}){const a=t.withPagination({customer_id:o,...i??{}},r),s=new URL(`${n.apiUrls.config}/portal/payment-methods`);return Object.entries(a).forEach(([t,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{s.searchParams.append(`${t}[]`,`${e}`)}):s.searchParams.append(t,`${e}`))}),e({url:s.toString(),isCollection:!0})},getPaymentMethodOptions:function({customerId:t,country:o,subscriptionId:r,amount:i}){return e({url:`${n.apiUrls.config}/portal/payment-method-options`,options:{method:"POST"},data:{...t&&{customer_id:t},...o&&{country:o},...r&&{pricing_plan_subscription_id:r},amount:i}})},tokenizePaymentMethod:function(t){return e({url:`${n.apiUrls.config}/portal/payment-methods/tokenize`,options:{method:"POST"},data:t})}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=require("./component-Df5eNqYX.js"),e="/portal/payments";exports.createPaymentsService=()=>{const a=t.createRequestService(),n=t.useConfig();return{getPayments:function(t){return a({url:`${n.apiUrls.transaction}${e}`,query:{invoice_id:t},isCollection:!0})},getPaymentDetails:function({paymentAcceptorId:t,paymentGatewayVariant:r,adyen:i}){return a({url:`${n.apiUrls.transaction}${e}/verify-details`,options:{method:"POST"},data:{payment_acceptor_id:t,payment_gateway_variant:r,adyen:i}})},authorizePayment:function(t){return a({url:`${n.apiUrls.transaction}${e}/authorize`,options:{method:"POST"},data:t})}}};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { c as createRequestService, u as useConfig } from "./component-BkmcE85U.mjs";
|
|
2
|
+
const BASE_URL = "/portal/payments";
|
|
3
|
+
const createPaymentsService = () => {
|
|
4
|
+
const request = createRequestService();
|
|
5
|
+
const config = useConfig();
|
|
6
|
+
function getPayments(invoiceId) {
|
|
7
|
+
return request({
|
|
8
|
+
url: `${config.apiUrls.transaction}${BASE_URL}`,
|
|
9
|
+
query: { invoice_id: invoiceId },
|
|
10
|
+
isCollection: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function getPaymentDetails({
|
|
14
|
+
paymentAcceptorId,
|
|
15
|
+
paymentGatewayVariant,
|
|
16
|
+
adyen
|
|
17
|
+
}) {
|
|
18
|
+
return request({
|
|
19
|
+
url: `${config.apiUrls.transaction}${BASE_URL}/verify-details`,
|
|
20
|
+
options: {
|
|
21
|
+
method: "POST"
|
|
22
|
+
},
|
|
23
|
+
data: {
|
|
24
|
+
payment_acceptor_id: paymentAcceptorId,
|
|
25
|
+
payment_gateway_variant: paymentGatewayVariant,
|
|
26
|
+
adyen
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function authorizePayment(data) {
|
|
31
|
+
return request({
|
|
32
|
+
url: `${config.apiUrls.transaction}${BASE_URL}/authorize`,
|
|
33
|
+
options: {
|
|
34
|
+
method: "POST"
|
|
35
|
+
},
|
|
36
|
+
data
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
getPayments,
|
|
41
|
+
getPaymentDetails,
|
|
42
|
+
authorizePayment
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
createPaymentsService as c
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./PaymentMethodForm.entry.ce-zxeBXZW6.js"),n=require("./CustomerOverview.entry.ce-C__omsVl.js"),o=require("./Checkout.entry.ce-CkQnLAn4.js"),i=require("./Invoice.entry.ce-Cgr43ome.js"),t=require("./InvoiceDetails.entry.ce-jHDyWra2.js"),r=require("./InvoicesList.entry.ce-38iOW5qh.js"),s=require("./PaymentHistory.entry.ce-DDeHMhK_.js"),c=require("./SubscriptionsList.entry.ce-B5SJCQW0.js"),m=require("./SubscriptionSchedules.entry.ce-B4T_yQC1.js"),u=require("./CustomerPaymentMethods.entry.ce-DnjlRHPA.js"),f=require("./BillingInformation.entry.ce-DkrfEvK_.js"),a=require("./BillingInformationForm.entry.ce-MPMirEsk.js"),l=require("./component-Df5eNqYX.js"),d={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout},v={invoice:i.defineSolvimonInvoice,"invoice-details":t.defineSolvimonInvoiceDetails,"invoices-list":r.defineSolvimonInvoicesList,"payment-history":s.defineSolvimonPaymentHistory,"subscriptions-list":c.defineSolvimonSubscriptionsList,"subscription-schedules":m.defineSolvimonSubscriptionSchedules,"customer-payment-methods":u.defineSolvimonCustomerPaymentMethods,"billing-information":f.defineSolvimonBillingInformation,"billing-information-form":a.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function y(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);!function(e,n){const o="screen"===n?d[e]:v[e];if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?d:v).join(", ")}.`);o()}(n,o);const r=(s=n,l.getComponentName(s));var s;const c=document.createElement(r);return function(e,n){const o=e;for(const[i,t]of Object.entries(n))void 0!==t&&(o[i]=t)}(c,i),t.appendChild(c),{unmount(){c.remove()}}}function p(e){const{container:n,...o}=e;return{container:n,props:o}}const S={"customer-overview":n._sfc_main,checkout:o._sfc_main},_={invoice:i._sfc_main,"invoice-details":t._sfc_main,"invoices-list":r._sfc_main,"payment-history":s._sfc_main,"subscriptions-list":c._sfc_main,"subscription-schedules":m._sfc_main,"customer-payment-methods":u._sfc_main,"billing-information":f._sfc_main,"billing-information-form":a._sfc_main,"payment-method-form":e._sfc_main};exports.createSolvimonCore=function(e={}){return{config:e,createComponent(n,o){const{container:i,props:t}=p(o);return y(i,n,"component",{...e,...t}).unmount},createScreen(n,o){const{container:i,props:t}=p(o);return y(i,n,"screen",{...e,...t}).unmount}}},exports.getRegisteredComponentIds=function(){return Object.keys(_)},exports.getRegisteredScreenIds=function(){return Object.keys(S)};
|