@tender-cash/agent-sdk-react 0.3.0 → 0.3.1-beta.3
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/dist/assets/icons/Palantir.png +0 -0
- package/dist/assets/icons/tender.svg +55 -2
- package/dist/assets/icons/tender0.svg +3 -0
- package/dist/style.css +1 -1
- package/dist/tender-cash-agent-sdk-react.cjs.js +51 -50
- package/dist/tender-cash-agent-sdk-react.cjs.js.map +1 -1
- package/dist/tender-cash-agent-sdk-react.es.js +5000 -4030
- package/dist/tender-cash-agent-sdk-react.es.js.map +1 -1
- package/dist/types/module/_actions/details.d.ts +1 -0
- package/dist/types/module/_actions/index.d.ts +1 -0
- package/dist/types/module/_components/layout.d.ts +8 -3
- package/dist/types/module/index.d.ts +1 -1
- package/dist/types/module/screens/details.d.ts +1 -1
- package/dist/types/module/screens/form.d.ts +1 -1
- package/dist/types/module/types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -19,5 +19,6 @@ declare const fetchPaymentDetailAction: ({ nextScreen, setPageLoading }: {
|
|
|
19
19
|
} | undefined;
|
|
20
20
|
confirmPayment: () => void | Promise<void>;
|
|
21
21
|
cancelPayment: () => void | Promise<void>;
|
|
22
|
+
expirePayment: () => void | Promise<void>;
|
|
22
23
|
};
|
|
23
24
|
export default fetchPaymentDetailAction;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { FormFooterProps, FormHeaderProps } from '../types';
|
|
2
|
-
declare const FormFooter: ({ children }: FormFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const FormHeader: ({ title, description, icon }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
|
|
3
|
+
declare const FormFooter: ({ children, className }: FormFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const FormHeader: ({ title, description, icon, className, }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const FormBody: ({ children, className, }: {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { FormFooter, FormHeader, FormBody };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TenderAgentProps } from './types';
|
|
2
|
-
declare const TenderAgentSdk: ({ referenceId, amount, accessId, accessSecret, env, fiatCurrency, onEventResponse }: TenderAgentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TenderAgentSdk: ({ referenceId, amount, accessId, accessSecret, env, fiatCurrency, paymentExpirySeconds, onEventResponse }: TenderAgentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TenderAgentSdk;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { paymentResponseProps, paymentDetailsProps } from '../types';
|
|
2
|
-
declare const PaymentDetails: ({ address, amount, amountPaid, coin, loading, status, balance, excess, cancelPayment, confirmPayment, }: paymentResponseProps & paymentDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const PaymentDetails: ({ address, amount, amountPaid, coin, chain, loading, status, balance, excess, cancelPayment, confirmPayment, expirePayment, coinIcon, chainIcon, }: paymentResponseProps & paymentDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PaymentDetails;
|
|
@@ -12,5 +12,5 @@ interface paymentFormProps {
|
|
|
12
12
|
selectNetwork: (value: Option) => void;
|
|
13
13
|
submitForm: () => void;
|
|
14
14
|
}
|
|
15
|
-
declare const PaymentForm: ({ amount, fiatCurrency, networks, selectedNetwork, selectedCoin, coins, formDisabled, formLoading, selectCoin, selectNetwork, submitForm }: paymentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const PaymentForm: ({ amount, fiatCurrency, networks, selectedNetwork, selectedCoin, coins, formDisabled, formLoading, selectCoin, selectNetwork, submitForm, }: paymentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default PaymentForm;
|
|
@@ -44,9 +44,11 @@ interface FormHeaderProps {
|
|
|
44
44
|
title: string;
|
|
45
45
|
description: string;
|
|
46
46
|
icon?: string;
|
|
47
|
+
className?: string;
|
|
47
48
|
}
|
|
48
49
|
interface FormFooterProps {
|
|
49
50
|
children: ReactNode;
|
|
51
|
+
className?: string;
|
|
50
52
|
}
|
|
51
53
|
interface IPaymentData {
|
|
52
54
|
id?: string;
|
|
@@ -65,10 +67,13 @@ interface paymentResponseProps {
|
|
|
65
67
|
amount: number;
|
|
66
68
|
amountPaid: number;
|
|
67
69
|
coin: string;
|
|
70
|
+
chain: string;
|
|
68
71
|
loading: boolean;
|
|
69
72
|
status?: PaymentStatusProps;
|
|
70
73
|
balance?: string;
|
|
71
74
|
excess?: string;
|
|
75
|
+
coinIcon?: string;
|
|
76
|
+
chainIcon?: string;
|
|
72
77
|
}
|
|
73
78
|
declare enum PAYMENT_RESPONSES {
|
|
74
79
|
partial = "Please complete the remaining payment to finalize this transaction. If the full amount is not received within 24 hours, the transaction will be canceled. For a refund, please contact the Merchant.",
|
|
@@ -89,6 +94,7 @@ declare const PAYMENT_ICONS: {
|
|
|
89
94
|
interface paymentDetailsProps {
|
|
90
95
|
cancelPayment: () => void;
|
|
91
96
|
confirmPayment: () => void;
|
|
97
|
+
expirePayment: () => void;
|
|
92
98
|
}
|
|
93
99
|
declare enum PAYMENT_STAGE {
|
|
94
100
|
FORM = 1,
|
|
@@ -158,6 +164,7 @@ interface ConfigContextType {
|
|
|
158
164
|
fiatCurrency: string;
|
|
159
165
|
env: TenderEnvironments;
|
|
160
166
|
confirmationInterval?: number;
|
|
167
|
+
paymentExpirySeconds?: number;
|
|
161
168
|
theme?: "light" | "dark";
|
|
162
169
|
onEventResponse?: (data: onFinishResponse) => void;
|
|
163
170
|
}
|
|
@@ -168,6 +175,7 @@ interface TenderAgentProps {
|
|
|
168
175
|
accessId: string;
|
|
169
176
|
accessSecret: string;
|
|
170
177
|
env: TenderEnvironments;
|
|
178
|
+
paymentExpirySeconds?: number;
|
|
171
179
|
onEventResponse?: (data: onFinishResponse) => void;
|
|
172
180
|
}
|
|
173
181
|
interface PaymentChain {
|