@superlogic/spree-pay 0.4.11 → 0.4.14
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/build/{CryptoComTab-OCWI7MFM.js → CryptoComTab-NMS7BP25.js} +2 -2
- package/build/{CryptoTab-4WXYLS43.js → CryptoTab-4IC63YD5.js} +2 -2
- package/build/{chunk-WHTBHEIN.js → chunk-UT65MGD2.js} +3 -6
- package/build/{chunk-VDX65MBD.js → chunk-VZWGJKM3.js} +4 -4
- package/build/{chunk-NAY4SEME.js → chunk-XFJYLJZ4.js} +1 -1
- package/build/index.cjs +15 -10
- package/build/index.css +3 -3
- package/build/index.js +14 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Iframe3ds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VZWGJKM3.js";
|
|
4
4
|
import {
|
|
5
5
|
InfoBanner,
|
|
6
6
|
Legal,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useSpreePayRegister,
|
|
13
13
|
useSpreePaymentMethod,
|
|
14
14
|
useStaticConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XFJYLJZ4.js";
|
|
16
16
|
|
|
17
17
|
// src/components/CryptoComTab/CryptoComTab.tsx
|
|
18
18
|
import { useCallback, useEffect } from "react";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CheckoutButton,
|
|
3
3
|
PointsSwitch,
|
|
4
4
|
cn as cn2
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UT65MGD2.js";
|
|
6
6
|
import {
|
|
7
7
|
Dialog,
|
|
8
8
|
DialogContent,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useSpreePayConfig,
|
|
17
17
|
useSpreePayRegister,
|
|
18
18
|
useSpreePaymentMethod
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XFJYLJZ4.js";
|
|
20
20
|
|
|
21
21
|
// src/components/CryptoTab/Crypto/CryptoWrapper.tsx
|
|
22
22
|
import { useMemo as useMemo2 } from "react";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useSpreePayEnv,
|
|
7
7
|
useSpreePaymentMethod,
|
|
8
8
|
useStaticConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XFJYLJZ4.js";
|
|
10
10
|
|
|
11
11
|
// src/components/common/PointsSwitch.tsx
|
|
12
12
|
import { useId } from "react";
|
|
@@ -257,15 +257,12 @@ var CheckoutButton = ({ isLoggedIn }) => {
|
|
|
257
257
|
const checkoutClass = "text-(--inverse) h-14 leading-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
258
258
|
return /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-col gap-4 p-6 text-xs leading-5 font-medium text-(--secondary) md:px-7", children: [
|
|
259
259
|
/* @__PURE__ */ jsx5(Legal, {}),
|
|
260
|
-
isLoggedIn ? /* @__PURE__ */ jsx5(Fragment, { children: onProcess && /* @__PURE__ */ jsx5("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */
|
|
260
|
+
isLoggedIn ? /* @__PURE__ */ jsx5(Fragment, { children: onProcess && /* @__PURE__ */ jsx5("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ jsx5(
|
|
261
261
|
"a",
|
|
262
262
|
{
|
|
263
263
|
href: `${staticConfig.keycloakUrl}/realms/${tenantId}/protocol/openid-connect/auth?client_id=${keycloakClientId ?? "oneof-next"}&response_type=code&redirect_uri=${window.location.href}`,
|
|
264
264
|
className: checkoutClass,
|
|
265
|
-
children:
|
|
266
|
-
"Log in / Sign up",
|
|
267
|
-
tenantId === "moca" ? " for an AIR account" : ""
|
|
268
|
-
]
|
|
265
|
+
children: spreePayConfig?.loginLabel || "Log in / Sign up"
|
|
269
266
|
}
|
|
270
267
|
),
|
|
271
268
|
/* @__PURE__ */ jsxs3("a", { href: "https://www.spree.finance/", className: "flex items-center justify-center gap-2 hover:underline", children: [
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DialogContent,
|
|
4
4
|
DialogDescription,
|
|
5
5
|
DialogTitle
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XFJYLJZ4.js";
|
|
7
7
|
|
|
8
8
|
// src/modals/Iframe3ds.tsx
|
|
9
9
|
import { useEffect } from "react";
|
|
@@ -37,7 +37,7 @@ var Iframe3ds = NiceModal.create(({ url }) => {
|
|
|
37
37
|
modal.reject();
|
|
38
38
|
modal.remove();
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */ jsx(Dialog, { open: modal.visible, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-h-[
|
|
40
|
+
return /* @__PURE__ */ jsx(Dialog, { open: modal.visible, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-h-[90dvh] w-full max-w-[680px] overflow-hidden p-0", children: [
|
|
41
41
|
/* @__PURE__ */ jsx(DialogTitle, { className: "sr-only", children: "Payment Verification" }),
|
|
42
42
|
/* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: "Complete 3D Secure verification to finalize your payment" }),
|
|
43
43
|
/* @__PURE__ */ jsx(
|
|
@@ -45,8 +45,8 @@ var Iframe3ds = NiceModal.create(({ url }) => {
|
|
|
45
45
|
{
|
|
46
46
|
src: url,
|
|
47
47
|
id: "3ds-iframe",
|
|
48
|
-
title: "Payment
|
|
49
|
-
className: "h-[731px] w-full rounded-lg border-0"
|
|
48
|
+
title: "Payment Verification",
|
|
49
|
+
className: "h-[731px] max-h-[90dvh] w-full rounded-lg border-0"
|
|
50
50
|
}
|
|
51
51
|
)
|
|
52
52
|
] }) });
|
package/build/index.cjs
CHANGED
|
@@ -69,7 +69,7 @@ var init_payments = __esm({
|
|
|
69
69
|
var version;
|
|
70
70
|
var init_package = __esm({
|
|
71
71
|
"package.json"() {
|
|
72
|
-
version = "0.4.
|
|
72
|
+
version = "0.4.14";
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -595,7 +595,7 @@ var init_Iframe3ds = __esm({
|
|
|
595
595
|
modal.reject();
|
|
596
596
|
modal.remove();
|
|
597
597
|
};
|
|
598
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog, { open: modal.visible, onOpenChange: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DialogContent, { className: "max-h-[
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog, { open: modal.visible, onOpenChange: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DialogContent, { className: "max-h-[90dvh] w-full max-w-[680px] overflow-hidden p-0", children: [
|
|
599
599
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogTitle, { className: "sr-only", children: "Payment Verification" }),
|
|
600
600
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogDescription, { className: "sr-only", children: "Complete 3D Secure verification to finalize your payment" }),
|
|
601
601
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -603,8 +603,8 @@ var init_Iframe3ds = __esm({
|
|
|
603
603
|
{
|
|
604
604
|
src: url,
|
|
605
605
|
id: "3ds-iframe",
|
|
606
|
-
title: "Payment
|
|
607
|
-
className: "h-[731px] w-full rounded-lg border-0"
|
|
606
|
+
title: "Payment Verification",
|
|
607
|
+
className: "h-[731px] max-h-[90dvh] w-full rounded-lg border-0"
|
|
608
608
|
}
|
|
609
609
|
)
|
|
610
610
|
] }) });
|
|
@@ -1302,15 +1302,12 @@ var init_CheckoutButton = __esm({
|
|
|
1302
1302
|
const checkoutClass = "text-(--inverse) h-14 leading-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
1303
1303
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full flex-col gap-4 p-6 text-xs leading-5 font-medium text-(--secondary) md:px-7", children: [
|
|
1304
1304
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Legal, {}),
|
|
1305
|
-
isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: onProcess && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1305
|
+
isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: onProcess && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1306
1306
|
"a",
|
|
1307
1307
|
{
|
|
1308
1308
|
href: `${staticConfig.keycloakUrl}/realms/${tenantId}/protocol/openid-connect/auth?client_id=${keycloakClientId ?? "oneof-next"}&response_type=code&redirect_uri=${window.location.href}`,
|
|
1309
1309
|
className: checkoutClass,
|
|
1310
|
-
children:
|
|
1311
|
-
"Log in / Sign up",
|
|
1312
|
-
tenantId === "moca" ? " for an AIR account" : ""
|
|
1313
|
-
]
|
|
1310
|
+
children: spreePayConfig?.loginLabel || "Log in / Sign up"
|
|
1314
1311
|
}
|
|
1315
1312
|
),
|
|
1316
1313
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("a", { href: "https://www.spree.finance/", className: "flex items-center justify-center gap-2 hover:underline", children: [
|
|
@@ -3496,6 +3493,14 @@ var CreditCard = ({ newCards, setNewCards }) => {
|
|
|
3496
3493
|
},
|
|
3497
3494
|
[setNewCards]
|
|
3498
3495
|
);
|
|
3496
|
+
const handleAddNewCard = () => {
|
|
3497
|
+
setSelectedPaymentMethod({
|
|
3498
|
+
...selectedPaymentMethod,
|
|
3499
|
+
type: "CREDIT_CARD" /* CREDIT_CARD */,
|
|
3500
|
+
method: null
|
|
3501
|
+
});
|
|
3502
|
+
setShowForm(true);
|
|
3503
|
+
};
|
|
3499
3504
|
const handleCancel = () => {
|
|
3500
3505
|
setShowForm(false);
|
|
3501
3506
|
};
|
|
@@ -3515,7 +3520,7 @@ var CreditCard = ({ newCards, setNewCards }) => {
|
|
|
3515
3520
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3516
3521
|
"button",
|
|
3517
3522
|
{
|
|
3518
|
-
onClick:
|
|
3523
|
+
onClick: handleAddNewCard,
|
|
3519
3524
|
disabled: !spreePayConfig?.stripePublicKey,
|
|
3520
3525
|
className: "text-md text-(--brand-primary) hover:underline disabled:cursor-not-allowed disabled:no-underline disabled:opacity-50",
|
|
3521
3526
|
children: "Add new card"
|
package/build/index.css
CHANGED
|
@@ -430,12 +430,12 @@
|
|
|
430
430
|
.sl-spreepay .max-h-\[40vh\] {
|
|
431
431
|
max-height: 40vh;
|
|
432
432
|
}
|
|
433
|
+
.sl-spreepay .max-h-\[90dvh\] {
|
|
434
|
+
max-height: 90dvh;
|
|
435
|
+
}
|
|
433
436
|
.sl-spreepay .max-h-\[90vh\] {
|
|
434
437
|
max-height: 90vh;
|
|
435
438
|
}
|
|
436
|
-
.sl-spreepay .max-h-\[600px\] {
|
|
437
|
-
max-height: 600px;
|
|
438
|
-
}
|
|
439
439
|
.sl-spreepay .min-h-11 {
|
|
440
440
|
min-height: calc(var(--spacing) * 11);
|
|
441
441
|
}
|
package/build/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getSplitAmount,
|
|
9
9
|
getTransactionFee,
|
|
10
10
|
useSlapiBalance
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UT65MGD2.js";
|
|
12
12
|
import {
|
|
13
13
|
Iframe3ds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VZWGJKM3.js";
|
|
15
15
|
import {
|
|
16
16
|
InfoBanner,
|
|
17
17
|
LogLevel,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
useSpreePayRegister,
|
|
33
33
|
useSpreePaymentMethod,
|
|
34
34
|
useStaticConfig
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XFJYLJZ4.js";
|
|
36
36
|
|
|
37
37
|
// src/SpreePay.tsx
|
|
38
38
|
import { useCallback as useCallback8, useEffect as useEffect7, useMemo as useMemo9, useState as useState12 } from "react";
|
|
@@ -892,6 +892,14 @@ var CreditCard = ({ newCards, setNewCards }) => {
|
|
|
892
892
|
},
|
|
893
893
|
[setNewCards]
|
|
894
894
|
);
|
|
895
|
+
const handleAddNewCard = () => {
|
|
896
|
+
setSelectedPaymentMethod({
|
|
897
|
+
...selectedPaymentMethod,
|
|
898
|
+
type: "CREDIT_CARD" /* CREDIT_CARD */,
|
|
899
|
+
method: null
|
|
900
|
+
});
|
|
901
|
+
setShowForm(true);
|
|
902
|
+
};
|
|
895
903
|
const handleCancel = () => {
|
|
896
904
|
setShowForm(false);
|
|
897
905
|
};
|
|
@@ -911,7 +919,7 @@ var CreditCard = ({ newCards, setNewCards }) => {
|
|
|
911
919
|
/* @__PURE__ */ jsx5(
|
|
912
920
|
"button",
|
|
913
921
|
{
|
|
914
|
-
onClick:
|
|
922
|
+
onClick: handleAddNewCard,
|
|
915
923
|
disabled: !spreePayConfig?.stripePublicKey,
|
|
916
924
|
className: "text-md text-(--brand-primary) hover:underline disabled:cursor-not-allowed disabled:no-underline disabled:opacity-50",
|
|
917
925
|
children: "Add new card"
|
|
@@ -2260,9 +2268,9 @@ var TabButtons = (props) => {
|
|
|
2260
2268
|
|
|
2261
2269
|
// src/SpreePayContent.tsx
|
|
2262
2270
|
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2263
|
-
var CryptoTab = lazy(() => import("./CryptoTab-
|
|
2271
|
+
var CryptoTab = lazy(() => import("./CryptoTab-4IC63YD5.js").then((module) => ({ default: module.CryptoTab })));
|
|
2264
2272
|
var CryptoComTab = lazy(
|
|
2265
|
-
() => import("./CryptoComTab-
|
|
2273
|
+
() => import("./CryptoComTab-NMS7BP25.js").then((module) => ({ default: module.CryptoComTab }))
|
|
2266
2274
|
);
|
|
2267
2275
|
var TabLoadingFallback = () => /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center px-5 py-8 md:px-7", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center gap-3", children: [
|
|
2268
2276
|
/* @__PURE__ */ jsx18("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-(--border-component-specific-card) border-t-(--brand-primary)" }),
|