mainstack-payments 1.0.56 → 1.0.58
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/{CashAppPayment-2d41e345.js → CashAppPayment-ec1303ed.js} +1 -1
- package/build/{CryptoPayments-3c3e977d.js → CryptoPayments-018fa85c.js} +1 -1
- package/build/{index-9f474fd2.js → index-b2bd5651.js} +7208 -7385
- package/build/mainstack-payments.js +1 -1
- package/build/src/components/CheckoutForm.d.ts +0 -1
- package/build/src/components/ContactAction.d.ts +1 -3
- package/build/src/components/Payment.d.ts +1 -0
- package/build/src/components/SummaryCard.d.ts +5 -24
- package/build/src/components/UI/TextStyled.d.ts +4 -0
- package/build/src/pages/DiscountCode.d.ts +23 -0
- package/build/src/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as o, e as y, S as P, M as i, c, f as u, g as p, P as k, W as l, l as d, j as M, i as C, a as F, b as f, h, k as g } from "./index-
|
|
1
|
+
import { d as o, e as y, S as P, M as i, c, f as u, g as p, P as k, W as l, l as d, j as M, i as C, a as F, b as f, h, k as g } from "./index-b2bd5651.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "mainstack-design-system";
|
|
4
4
|
import "react";
|
|
@@ -2,9 +2,7 @@ import { TCustomizations } from 'types';
|
|
|
2
2
|
|
|
3
3
|
interface ContactActionProps {
|
|
4
4
|
customizations?: TCustomizations;
|
|
5
|
-
discount?:
|
|
6
|
-
isFullDiscount: boolean;
|
|
7
|
-
};
|
|
5
|
+
discount?: number;
|
|
8
6
|
onGoBack?: () => void;
|
|
9
7
|
handlePaymentProceed: (e: React.MouseEvent) => void;
|
|
10
8
|
feesLoading: boolean;
|
|
@@ -20,6 +20,7 @@ export interface IMainstackPaymentProps {
|
|
|
20
20
|
onError?: (error: TError) => void;
|
|
21
21
|
hasApiKey?: boolean;
|
|
22
22
|
FooterElement?: ReactNode;
|
|
23
|
+
DiscountComponent?: ReactNode;
|
|
23
24
|
}
|
|
24
25
|
declare const MainstackPayment: import('react').ForwardRefExoticComponent<IMainstackPaymentProps & import('react').RefAttributes<unknown>>;
|
|
25
26
|
export default MainstackPayment;
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TItemList } from 'types';
|
|
3
3
|
|
|
4
|
-
type
|
|
5
|
-
discount: TDiscount;
|
|
6
|
-
setDiscount: React.Dispatch<React.SetStateAction<TDiscount>>;
|
|
7
|
-
hasDiscountCode: true;
|
|
8
|
-
discountCode: string;
|
|
9
|
-
setDiscountCode: React.Dispatch<React.SetStateAction<string>>;
|
|
10
|
-
applyDiscount: () => Promise<any>;
|
|
11
|
-
onDiscountApplied: (res: any) => void;
|
|
12
|
-
onDiscountRemoved?: () => void;
|
|
13
|
-
isApplyingDiscount: boolean;
|
|
14
|
-
} | {
|
|
15
|
-
discount?: TDiscount;
|
|
16
|
-
setDiscount?: React.Dispatch<React.SetStateAction<TDiscount>>;
|
|
17
|
-
hasDiscountCode?: false;
|
|
18
|
-
discountCode?: string;
|
|
19
|
-
setDiscountCode?: React.Dispatch<React.SetStateAction<string>>;
|
|
20
|
-
applyDiscount?: () => Promise<any>;
|
|
21
|
-
onDiscountApplied?: (res: any) => void;
|
|
22
|
-
onDiscountRemoved?: () => void;
|
|
23
|
-
isApplyingDiscount?: boolean;
|
|
24
|
-
};
|
|
25
|
-
type IProps = TDiscountProps & {
|
|
4
|
+
type IProps = {
|
|
26
5
|
summaryTitle: string | ReactNode;
|
|
27
6
|
currency: string;
|
|
28
7
|
amount: number;
|
|
29
8
|
feesLoading: boolean;
|
|
9
|
+
isFullDiscount: boolean;
|
|
30
10
|
taxFees: {
|
|
31
11
|
localTaxFees: number;
|
|
32
12
|
shouldApplyTax?: boolean;
|
|
@@ -54,6 +34,7 @@ type IProps = TDiscountProps & {
|
|
|
54
34
|
quantity: number;
|
|
55
35
|
summaryWidth?: string;
|
|
56
36
|
summaryGridWidth?: number;
|
|
37
|
+
children?: React.ReactNode;
|
|
57
38
|
};
|
|
58
|
-
declare const SummaryCard: ({ summaryTitle, currency, amount, feesLoading,
|
|
39
|
+
declare const SummaryCard: ({ summaryTitle, currency, amount, feesLoading, isFullDiscount, taxFees, switchingFees, transactionFees, isSingleColumn, itemsList, productImage, productName, quantity, summaryWidth, summaryGridWidth, children, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
40
|
export default SummaryCard;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type TDiscount = {
|
|
4
|
+
amount: number;
|
|
5
|
+
type: string;
|
|
6
|
+
value: number;
|
|
7
|
+
isFullDiscount: boolean;
|
|
8
|
+
};
|
|
9
|
+
interface DiscountCodeProps {
|
|
10
|
+
product_id: string;
|
|
11
|
+
account_id: string;
|
|
12
|
+
currency: string;
|
|
13
|
+
store_id: string;
|
|
14
|
+
ticket_payload?: string;
|
|
15
|
+
cart_id?: string;
|
|
16
|
+
payment_plan_id?: string;
|
|
17
|
+
discount: TDiscount;
|
|
18
|
+
setDiscount: (discount: TDiscount) => void;
|
|
19
|
+
discountCode: string;
|
|
20
|
+
setDiscountCode: (discountCode: string) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const DiscountCode: React.FC<DiscountCodeProps>;
|
|
23
|
+
export default DiscountCode;
|