tf-checkout-react 1.0.73 → 1.0.77
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/api/index.d.ts +1 -0
- package/dist/components/billing-info-container/index.d.ts +9 -3
- package/dist/components/billing-info-container/utils.d.ts +1 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/paymentContainer/index.d.ts +8 -3
- package/dist/components/stripePayment/index.d.ts +2 -1
- package/dist/components/ticketsContainer/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +215 -119
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +207 -111
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/setConfigs.d.ts +2 -1
- package/package.json +1 -1
- package/src/api/index.ts +6 -20
- package/src/components/billing-info-container/index.tsx +39 -36
- package/src/components/billing-info-container/utils.ts +2 -1
- package/src/components/common/CheckboxField.tsx +15 -8
- package/src/components/common/CustomField.tsx +7 -0
- package/src/components/common/FormikPhoneNumberField.tsx +9 -0
- package/src/components/common/SelectField.tsx +5 -1
- package/src/components/confirmationContainer/index.tsx +59 -43
- package/src/components/paymentContainer/index.tsx +8 -10
- package/src/components/stripePayment/index.tsx +24 -16
- package/src/components/ticketsContainer/index.tsx +91 -50
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +51 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/setConfigs.ts +7 -2
package/dist/api/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ interface IPublicRequest extends AxiosInstance {
|
|
|
5
5
|
setBaseUrl: (baseUrl: string) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const publicRequest: IPublicRequest;
|
|
8
|
+
export declare const setXSourceOrigin: (sourceOrigin: string) => void;
|
|
8
9
|
export declare const setCustomHeader: (response: any) => void;
|
|
9
10
|
export declare const handleSetAccessToken: (token: any) => void;
|
|
10
11
|
export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -3,6 +3,8 @@ import { AxiosError } from 'axios';
|
|
|
3
3
|
import { FormikHelpers, FormikValues } from 'formik';
|
|
4
4
|
import './style.css';
|
|
5
5
|
import { IBillingInfoData } from '../../types';
|
|
6
|
+
import { ThemeOptions } from '@mui/material';
|
|
7
|
+
import { CSSProperties } from '@mui/styled-engine';
|
|
6
8
|
export interface IBillingInfoPage {
|
|
7
9
|
data?: IBillingInfoData[];
|
|
8
10
|
ticketHoldersFields?: IBillingInfoData;
|
|
@@ -11,7 +13,7 @@ export interface IBillingInfoPage {
|
|
|
11
13
|
accessToken: string;
|
|
12
14
|
refreshToken: string;
|
|
13
15
|
}) => void;
|
|
14
|
-
onRegisterError?: (e: AxiosError) => void;
|
|
16
|
+
onRegisterError?: (e: AxiosError, email: string) => void;
|
|
15
17
|
onSubmitError?: (e: AxiosError) => void;
|
|
16
18
|
onGetCartSuccess?: (res: any) => void;
|
|
17
19
|
onGetCartError?: (e: AxiosError) => void;
|
|
@@ -29,7 +31,11 @@ export interface IBillingInfoPage {
|
|
|
29
31
|
buttonName?: string;
|
|
30
32
|
theme?: 'light' | 'dark';
|
|
31
33
|
isLoggedIn?: boolean;
|
|
32
|
-
|
|
34
|
+
accountInfoTitle?: string | JSX.Element;
|
|
33
35
|
hideLogo?: boolean;
|
|
36
|
+
themeOptions?: ThemeOptions & {
|
|
37
|
+
input?: CSSProperties;
|
|
38
|
+
checkbox?: CSSProperties;
|
|
39
|
+
};
|
|
34
40
|
}
|
|
35
|
-
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn,
|
|
41
|
+
export declare const BillingInfoContainer: ({ data, ticketHoldersFields, initialValues, buttonName, handleSubmit, theme, onRegisterSuccess, onRegisterError, onSubmitError, onGetCartSuccess, onGetCartError, onGetCountriesSuccess, onGetCountriesError, onGetStatesSuccess, onGetStatesError, onGetProfileDataSuccess, onGetProfileDataError, onAuthorizeSuccess, onAuthorizeError, onLogin, onLoginSuccess, isLoggedIn: pIsLoggedIn, accountInfoTitle, hideLogo, themeOptions }: IBillingInfoPage) => JSX.Element;
|
|
@@ -14,5 +14,6 @@ export interface IConfirmationPage {
|
|
|
14
14
|
shareButtons: IShareButton[];
|
|
15
15
|
onGetConfirmationDataSuccess: (res: any) => void;
|
|
16
16
|
onGetConfirmationDataError: (e: AxiosError) => void;
|
|
17
|
+
orderHash?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
|
|
19
|
+
export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, }: IConfirmationPage) => JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { IPaymentField } from '../../types';
|
|
5
5
|
import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
|
|
6
|
+
import { ThemeOptions } from '@mui/material';
|
|
6
7
|
export interface IPaymentPage {
|
|
7
8
|
paymentFields: IPaymentField[];
|
|
8
9
|
handlePayment: any;
|
|
@@ -14,6 +15,10 @@ export interface IPaymentPage {
|
|
|
14
15
|
onGetPaymentDataError: (value: AxiosError) => void;
|
|
15
16
|
onPaymentError: (value: AxiosError) => void;
|
|
16
17
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
17
|
-
|
|
18
|
+
disableZipSection: boolean;
|
|
19
|
+
themeOptions?: ThemeOptions & {
|
|
20
|
+
input?: CSSProperties;
|
|
21
|
+
checkbox?: CSSProperties;
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions,
|
|
24
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, }: IPaymentPage) => JSX.Element;
|
|
@@ -14,6 +14,7 @@ export interface ICheckoutForm {
|
|
|
14
14
|
isLoading: any;
|
|
15
15
|
handleSetLoading: (loading: any) => void;
|
|
16
16
|
conditions: any;
|
|
17
|
+
disableZipSection: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, }: ICheckoutForm) => JSX.Element;
|
|
19
|
+
declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, }: ICheckoutForm) => JSX.Element;
|
|
19
20
|
export default CheckoutForm;
|