tf-checkout-react 1.0.106-beta.9 → 1.2.0
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 +9 -5
- package/dist/components/account-settings/index.d.ts +3 -0
- package/dist/components/billing-info-container/index.d.ts +3 -5
- package/dist/components/countdown/index.d.ts +2 -1
- package/dist/components/loginModal/index.d.ts +2 -2
- package/dist/components/myTicketsContainer/tableConfig.d.ts +1 -1
- package/dist/components/orderDetailsContainer/index.d.ts +5 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -1
- package/dist/components/paymentContainer/index.d.ts +2 -1
- package/dist/components/registerModal/index.d.ts +11 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +3 -2
- package/dist/components/ticketsContainer/TicketsSection.d.ts +1 -2
- package/dist/components/ticketsContainer/index.d.ts +4 -1
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +733 -281
- 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 +732 -282
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/utils/cookies.d.ts +3 -0
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
- package/dist/utils/downloadPDF.d.ts +1 -1
- package/dist/utils/getDomain.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +12 -1
- package/src/api/index.ts +86 -39
- package/src/components/account-settings/index.tsx +161 -0
- package/src/components/account-settings/style.css +200 -0
- package/src/components/billing-info-container/index.tsx +73 -63
- package/src/components/billing-info-container/style.css +1 -1
- package/src/components/billing-info-container/utils.ts +11 -3
- package/src/components/common/SnackbarAlert.tsx +1 -1
- package/src/components/countdown/index.tsx +3 -1
- package/src/components/forgotPasswordModal/index.tsx +5 -5
- package/src/components/loginModal/index.tsx +19 -56
- package/src/components/myTicketsContainer/index.tsx +95 -70
- package/src/components/myTicketsContainer/style.css +2 -2
- package/src/components/myTicketsContainer/tableConfig.tsx +3 -6
- package/src/components/orderDetailsContainer/index.tsx +71 -21
- package/src/components/orderDetailsContainer/style.css +3 -3
- package/src/components/orderDetailsContainer/ticketsTable.tsx +134 -85
- package/src/components/paymentContainer/index.tsx +114 -49
- package/src/components/registerModal/index.tsx +183 -0
- package/src/components/registerModal/style.css +18 -0
- package/src/components/stripePayment/index.tsx +14 -12
- package/src/components/stripePayment/style.css +3 -3
- package/src/components/ticketResaleModal/index.tsx +12 -14
- package/src/components/ticketsContainer/PromoCodeSection.tsx +8 -7
- package/src/components/ticketsContainer/TicketRow.tsx +1 -1
- package/src/components/ticketsContainer/TicketsSection.tsx +0 -3
- package/src/components/ticketsContainer/index.tsx +92 -50
- package/src/env.ts +3 -3
- package/src/index.ts +3 -1
- package/src/utils/cookies.ts +42 -0
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +16 -4
- package/src/utils/downloadPDF.tsx +28 -6
- package/src/utils/getDomain.ts +15 -0
- package/src/utils/index.ts +2 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
2
|
interface IPublicRequest extends AxiosInstance {
|
|
3
3
|
setGuestToken: (token: string) => void;
|
|
4
4
|
setAccessToken: (token: string) => void;
|
|
@@ -7,20 +7,23 @@ interface IPublicRequest extends AxiosInstance {
|
|
|
7
7
|
export declare const publicRequest: IPublicRequest;
|
|
8
8
|
export declare const setXSourceOrigin: (sourceOrigin: string) => void;
|
|
9
9
|
export declare const setCustomHeader: (response: any) => void;
|
|
10
|
-
export declare const handleSetAccessToken: (token:
|
|
10
|
+
export declare const handleSetAccessToken: (token: string) => void;
|
|
11
11
|
export declare function getEvent(id: string | number): Promise<AxiosResponse<any, any>>;
|
|
12
12
|
export declare function getTickets(id: string | number, promoCode: string): Promise<AxiosResponse<any, any>>;
|
|
13
13
|
export declare const addToCart: (id: string | number, data: any) => Promise<AxiosResponse<any, any>>;
|
|
14
14
|
export declare const getCart: () => Promise<AxiosResponse<any, any>>;
|
|
15
|
-
export declare const postOnCheckout: (data: any, accessToken
|
|
16
|
-
export declare const authorize: (data:
|
|
15
|
+
export declare const postOnCheckout: (data: any, accessToken?: string | undefined) => Promise<AxiosResponse<any, any>>;
|
|
16
|
+
export declare const authorize: (data: {
|
|
17
|
+
email: string;
|
|
18
|
+
password: string;
|
|
19
|
+
}) => Promise<AxiosResponse<any, any>>;
|
|
17
20
|
export declare const register: (data: FormData) => Promise<AxiosResponse<any, any>>;
|
|
18
21
|
export declare const getAccessToken: (data: FormData) => Promise<AxiosResponse<any, any>>;
|
|
19
22
|
export declare const getPaymentData: (hash: string) => Promise<AxiosResponse<any, any>>;
|
|
20
23
|
export declare const handlePaymentData: (orderHash: string, data: any) => Promise<AxiosResponse<any, any>>;
|
|
21
24
|
export declare const handlePaymentSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
|
|
22
25
|
export declare const handleFreeSuccess: (orderHash: string) => Promise<AxiosResponse<any, any>>;
|
|
23
|
-
export declare const getProfileData: (accessToken
|
|
26
|
+
export declare const getProfileData: (accessToken?: string | undefined) => Promise<any>;
|
|
24
27
|
export declare const getCountries: () => Promise<AxiosResponse<any, any>>;
|
|
25
28
|
export declare const getConfirmationData: (orderHash: string) => Promise<AxiosResponse<any, any>>;
|
|
26
29
|
export declare const getStates: (countryId: string) => Promise<AxiosResponse<any, any>>;
|
|
@@ -31,6 +34,7 @@ export declare const getConditions: (eventId: string) => Promise<AxiosResponse<a
|
|
|
31
34
|
export declare const resaleTicket: (data: any, hash: string) => Promise<AxiosResponse<any, any>>;
|
|
32
35
|
export declare const removeFromResale: (hash: string) => Promise<AxiosResponse<any, any>>;
|
|
33
36
|
export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<AxiosResponse<any, any>>;
|
|
37
|
+
export declare const logout: () => Promise<AxiosResponse<any, any>>;
|
|
34
38
|
export declare const forgotPassword: (email: string) => Promise<AxiosResponse<any, any>>;
|
|
35
39
|
interface IResetPasswordData {
|
|
36
40
|
token: string;
|
|
@@ -9,10 +9,7 @@ export interface IBillingInfoPage {
|
|
|
9
9
|
data?: IBillingInfoData[];
|
|
10
10
|
ticketHoldersFields?: IBillingInfoData;
|
|
11
11
|
handleSubmit?: (values: FormikValues, formikHelpers: FormikHelpers<FormikValues>, eventId: any, res: any) => void;
|
|
12
|
-
onRegisterSuccess?: (value:
|
|
13
|
-
accessToken: string;
|
|
14
|
-
refreshToken: string;
|
|
15
|
-
}) => void;
|
|
12
|
+
onRegisterSuccess?: (value: any) => void;
|
|
16
13
|
onRegisterError?: (e: AxiosError, email: string) => void;
|
|
17
14
|
onSubmitError?: (e: AxiosError) => void;
|
|
18
15
|
onGetCartSuccess?: (res: any) => void;
|
|
@@ -42,6 +39,7 @@ export interface IBillingInfoPage {
|
|
|
42
39
|
onSkipBillingPage: (data: any) => void;
|
|
43
40
|
skipPage?: boolean;
|
|
44
41
|
canSkipHolderNames?: boolean;
|
|
42
|
+
shouldFetchCountries?: boolean;
|
|
45
43
|
onForgotPasswordSuccess?: (res: any) => void;
|
|
46
44
|
onForgotPasswordError?: (e: AxiosError) => void;
|
|
47
45
|
onCountdownFinish?: () => void;
|
|
@@ -50,4 +48,4 @@ export interface IBillingInfoPage {
|
|
|
50
48
|
showForgotPasswordButton?: boolean;
|
|
51
49
|
showSignUpButton?: boolean;
|
|
52
50
|
}
|
|
53
|
-
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, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames, onForgotPasswordSuccess, onForgotPasswordError, onCountdownFinish, enableTimer, logo, showForgotPasswordButton, showSignUpButton }: IBillingInfoPage) => JSX.Element;
|
|
51
|
+
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, onErrorClose, hideErrorsAlertSection, onSkipBillingPage, skipPage, canSkipHolderNames, onForgotPasswordSuccess, onForgotPasswordError, shouldFetchCountries, onCountdownFinish, enableTimer, logo, showForgotPasswordButton, showSignUpButton }: IBillingInfoPage) => JSX.Element;
|
|
@@ -5,9 +5,10 @@ interface CountdownTypes {
|
|
|
5
5
|
timezone?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
message?: string;
|
|
8
|
+
showMessage?: boolean;
|
|
8
9
|
disableLeadingZero?: boolean;
|
|
9
10
|
callback?: () => void;
|
|
10
11
|
isLoggedIn?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare function Countdown({ startDate, timezone, title, message, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
|
|
13
|
+
declare function Countdown({ startDate, timezone, title, message, showMessage, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
|
|
13
14
|
export default Countdown;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './style.css';
|
|
3
3
|
interface OrderDetailsTypes {
|
|
4
|
+
columns: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
4
7
|
onGetOrdersSuccess: (res: any) => void;
|
|
5
8
|
onGetOrdersError: (err: any) => void;
|
|
6
9
|
onReturnButtonClick: (data: any) => void;
|
|
10
|
+
personalLinkIcon?: string;
|
|
7
11
|
}
|
|
8
|
-
export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError, onReturnButtonClick }: OrderDetailsTypes) => JSX.Element;
|
|
12
|
+
export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onReturnButtonClick, personalLinkIcon, }: OrderDetailsTypes) => JSX.Element;
|
|
9
13
|
export {};
|
|
@@ -22,6 +22,7 @@ interface TicketsTableTypes {
|
|
|
22
22
|
tickets: ITicketTypes[];
|
|
23
23
|
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
24
24
|
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
25
|
+
icon?: string;
|
|
25
26
|
}
|
|
26
|
-
declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale }: TicketsTableTypes) => JSX.Element;
|
|
27
|
+
declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale, icon, }: TicketsTableTypes) => JSX.Element;
|
|
27
28
|
export default TicketsTable;
|
|
@@ -25,5 +25,6 @@ export interface IPaymentPage {
|
|
|
25
25
|
elementsOptions?: StripeElementsOptions;
|
|
26
26
|
onCountdownFinish?: () => void;
|
|
27
27
|
enableTimer?: boolean;
|
|
28
|
+
enablePaymentPlan?: boolean;
|
|
28
29
|
}
|
|
29
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, }: IPaymentPage) => JSX.Element;
|
|
30
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, }: IPaymentPage) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { AxiosError } from 'axios';
|
|
3
|
+
import './style.css';
|
|
4
|
+
interface Props {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onRegister: () => void;
|
|
7
|
+
onGetProfileDataSuccess: (res: any) => void;
|
|
8
|
+
onGetProfileDataError: (e: AxiosError) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const RegisterModal: FC<Props>;
|
|
11
|
+
export {};
|
|
@@ -5,6 +5,7 @@ export interface IPromoCodeSectionProps {
|
|
|
5
5
|
showPromoInput: boolean;
|
|
6
6
|
setCode: (value: string) => void;
|
|
7
7
|
setShowPromoInput: (value: boolean) => void;
|
|
8
|
-
updateTickets: (value: boolean) => void;
|
|
8
|
+
updateTickets: (value: boolean, type: string) => void;
|
|
9
|
+
setCodeIsApplied: (value: boolean) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets }: IPromoCodeSectionProps) => JSX.Element;
|
|
11
|
+
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied }: IPromoCodeSectionProps) => JSX.Element;
|
|
@@ -4,10 +4,9 @@ interface ITicketsSectionProps {
|
|
|
4
4
|
ticketsList: any;
|
|
5
5
|
selectedTickets: any;
|
|
6
6
|
handleTicketSelect: any;
|
|
7
|
-
codeIsApplied: boolean;
|
|
8
7
|
sortBySoldOut: boolean;
|
|
9
8
|
ticketsHeaderComponent?: ReactNode;
|
|
10
9
|
hideTicketsHeader: boolean;
|
|
11
10
|
}
|
|
12
|
-
export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect,
|
|
11
|
+
export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -20,6 +20,8 @@ export interface IGetTickets {
|
|
|
20
20
|
onAddToCartError: (e: AxiosError) => void;
|
|
21
21
|
onGetTicketsSuccess: (response: any) => void;
|
|
22
22
|
onGetTicketsError: (e: AxiosError) => void;
|
|
23
|
+
onLogoutSuccess: () => void;
|
|
24
|
+
onLogoutError: (e: AxiosError) => void;
|
|
23
25
|
onLoginSuccess: () => void;
|
|
24
26
|
theme?: 'light' | 'dark';
|
|
25
27
|
queryPromoCode?: string;
|
|
@@ -31,6 +33,7 @@ export interface IGetTickets {
|
|
|
31
33
|
isAccessCodeEnabled?: boolean;
|
|
32
34
|
hideSessionButtons?: boolean;
|
|
33
35
|
hideWaitingList?: boolean;
|
|
36
|
+
enableBillingInfoAutoCreate?: boolean;
|
|
34
37
|
isButtonScrollable?: boolean;
|
|
35
38
|
sortBySoldOut?: boolean;
|
|
36
39
|
disableCountdownLeadingZero?: boolean;
|
|
@@ -46,5 +49,5 @@ export interface ITicket {
|
|
|
46
49
|
export interface ISelectedTickets {
|
|
47
50
|
[key: string]: string | number;
|
|
48
51
|
}
|
|
49
|
-
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader }: IGetTickets) => JSX.Element;
|
|
52
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader }: IGetTickets) => JSX.Element;
|
|
50
53
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,3 +10,5 @@ export { setConfigs } from './utils/setConfigs';
|
|
|
10
10
|
export { TicketResaleContainer } from './components';
|
|
11
11
|
export { RedirectModal } from './components/common/RedirectModal';
|
|
12
12
|
export { RsvpContainer } from './components/rsvpContainer';
|
|
13
|
+
export { ResetPasswordContainer } from './components/resetPasswordContainer';
|
|
14
|
+
export { ForgotPasswordModal } from './components/forgotPasswordModal';
|