tf-checkout-react 1.0.99-beta.9 → 1.0.102
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 +26 -26
- package/dist/components/billing-info-container/index.d.ts +7 -3
- package/dist/components/billing-info-container/utils.d.ts +1 -0
- package/dist/components/common/Loader.d.ts +2 -0
- package/dist/components/common/RadioField.d.ts +11 -0
- package/dist/components/common/index.d.ts +5 -0
- package/dist/components/confirmModal/index.d.ts +9 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/countdown/index.d.ts +1 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +9 -2
- package/dist/components/ticketResale/index.d.ts +8 -0
- package/dist/components/ticketResaleModal/index.d.ts +18 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +2 -1
- package/dist/components/ticketsContainer/index.d.ts +3 -4
- package/dist/env.d.ts +1 -0
- package/dist/images/email.svg +1 -0
- package/dist/images/user.svg +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +1104 -736
- 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 +1113 -746
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +1 -6
- package/dist/utils/downloadPDF.d.ts +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/package.json +3 -2
- package/src/.DS_Store +0 -0
- package/src/api/index.ts +34 -36
- package/src/assets/images/email.svg +1 -0
- package/src/assets/images/user.svg +1 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +90 -76
- package/src/components/billing-info-container/utils.ts +5 -12
- package/src/components/common/CustomField.tsx +3 -6
- package/src/components/common/Loader.tsx +10 -0
- package/src/components/common/RadioField.tsx +35 -0
- package/src/components/common/SnackbarAlert.tsx +1 -1
- package/src/components/common/index.tsx +5 -0
- package/src/components/confirmModal/index.tsx +51 -0
- package/src/components/confirmModal/style.css +21 -0
- package/src/components/confirmationContainer/index.tsx +5 -2
- package/src/components/countdown/index.tsx +1 -3
- package/src/components/index.ts +1 -0
- package/src/components/loginModal/index.tsx +41 -3
- package/src/components/myTicketsContainer/index.tsx +60 -1
- package/src/components/orderDetailsContainer/index.tsx +99 -4
- package/src/components/orderDetailsContainer/style.css +5 -4
- package/src/components/orderDetailsContainer/ticketsTable.tsx +91 -82
- package/src/components/paymentContainer/index.tsx +1 -7
- package/src/components/registerModal/index.tsx +10 -3
- package/src/components/stripePayment/index.tsx +1 -1
- package/src/components/ticketResale/index.tsx +56 -0
- package/src/components/ticketResaleModal/index.tsx +210 -0
- package/src/components/ticketResaleModal/style.css +28 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +4 -1
- package/src/components/ticketsContainer/TicketRow.tsx +6 -12
- package/src/components/ticketsContainer/index.tsx +90 -98
- package/src/components/waitingList/index.tsx +1 -1
- package/src/env.ts +2 -1
- package/src/index.ts +1 -0
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +4 -16
- package/src/utils/downloadPDF.tsx +6 -28
- package/src/utils/index.ts +0 -2
- package/dist/utils/cookies.d.ts +0 -3
- package/dist/utils/getDomain.d.ts +0 -1
- package/src/utils/cookies.ts +0 -42
- package/src/utils/getDomain.ts +0 -15
package/dist/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosInstance
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
2
|
interface IPublicRequest extends AxiosInstance {
|
|
3
3
|
setGuestToken: (token: string) => void;
|
|
4
4
|
setAccessToken: (token: string) => void;
|
|
@@ -7,29 +7,29 @@ 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
|
|
11
|
-
export declare function
|
|
12
|
-
export declare
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<AxiosResponse<any, any>>;
|
|
34
|
-
export declare const
|
|
10
|
+
export declare const handleSetAccessToken: (token: any) => void;
|
|
11
|
+
export declare function getEvent(id: string | number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
+
export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
+
export declare const addToCart: (id: string | number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
+
export declare const getCart: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
15
|
+
export declare const postOnCheckout: (data: any, accessToken: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
16
|
+
export declare const authorize: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
17
|
+
export declare const register: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
18
|
+
export declare const getAccessToken: (data: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
19
|
+
export declare const getPaymentData: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
20
|
+
export declare const handlePaymentData: (orderHash: string, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
21
|
+
export declare const handlePaymentSuccess: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
22
|
+
export declare const handleFreeSuccess: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
|
+
export declare const getProfileData: (accessToken: any) => Promise<any>;
|
|
24
|
+
export declare const getCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
|
+
export declare const getConfirmationData: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
26
|
+
export declare const getStates: (countryId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
27
|
+
export declare const getOrders: (page: number, limit: number, eventSlug: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
28
|
+
export declare const getOrderDetails: (orderId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
29
|
+
export declare const addToWaitingList: (id: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
|
+
export declare const getConditions: (eventId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
31
|
+
export declare const resaleTicket: (data: any, hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
32
|
+
export declare const removeFromResale: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
33
|
+
export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
34
|
+
export declare const checkTicketStatus: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
35
35
|
export {};
|
|
@@ -9,7 +9,10 @@ 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:
|
|
12
|
+
onRegisterSuccess?: (value: {
|
|
13
|
+
accessToken: string;
|
|
14
|
+
refreshToken: string;
|
|
15
|
+
}) => void;
|
|
13
16
|
onRegisterError?: (e: AxiosError, email: string) => void;
|
|
14
17
|
onSubmitError?: (e: AxiosError) => void;
|
|
15
18
|
onGetCartSuccess?: (res: any) => void;
|
|
@@ -39,6 +42,7 @@ export interface IBillingInfoPage {
|
|
|
39
42
|
onSkipBillingPage: (data: any) => void;
|
|
40
43
|
skipPage?: boolean;
|
|
41
44
|
canSkipHolderNames?: boolean;
|
|
42
|
-
|
|
45
|
+
onCountdownFinish?: () => void;
|
|
46
|
+
enableTimer?: boolean;
|
|
43
47
|
}
|
|
44
|
-
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,
|
|
48
|
+
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, onCountdownFinish, enableTimer }: IBillingInfoPage) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldInputProps } from 'formik';
|
|
3
|
+
export interface IRadioField {
|
|
4
|
+
label: string | number | JSX.Element;
|
|
5
|
+
field?: FieldInputProps<any>;
|
|
6
|
+
}
|
|
7
|
+
interface IOtherProps {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const RadioField: ({ label, field, theme, ...rest }: IRadioField & IOtherProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export interface IConfirmationPage {
|
|
|
14
14
|
shareButtons: IShareButton[];
|
|
15
15
|
onGetConfirmationDataSuccess: (res: any) => void;
|
|
16
16
|
onGetConfirmationDataError: (e: AxiosError) => void;
|
|
17
|
+
onLinkCopied: () => void;
|
|
17
18
|
orderHash?: string;
|
|
18
19
|
}
|
|
19
|
-
export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, }: IConfirmationPage) => JSX.Element;
|
|
20
|
+
export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
|
|
@@ -5,8 +5,7 @@ interface CountdownTypes {
|
|
|
5
5
|
timezone?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
message?: string;
|
|
8
|
-
showMessage?: boolean;
|
|
9
8
|
callback?: () => void;
|
|
10
9
|
}
|
|
11
|
-
declare function Countdown({ startDate, timezone, title, message,
|
|
10
|
+
declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
|
|
12
11
|
export default Countdown;
|
|
@@ -4,3 +4,4 @@ export { PaymentContainer } from './paymentContainer';
|
|
|
4
4
|
export { TicketsContainer } from './ticketsContainer';
|
|
5
5
|
export { MyTicketsContainer } from './myTicketsContainer';
|
|
6
6
|
export { OrderDetailsContainer } from './orderDetailsContainer';
|
|
7
|
+
export { TicketResaleContainer } from './ticketResale';
|
|
@@ -3,16 +3,23 @@ interface IAddOnTypes {
|
|
|
3
3
|
name: string;
|
|
4
4
|
status: string;
|
|
5
5
|
}
|
|
6
|
-
interface ITicketTypes {
|
|
6
|
+
export interface ITicketTypes {
|
|
7
7
|
add_ons?: IAddOnTypes[];
|
|
8
8
|
hash: string;
|
|
9
9
|
ticket_type: string;
|
|
10
10
|
holder_name: string;
|
|
11
11
|
status: string;
|
|
12
12
|
pdf_link: string;
|
|
13
|
+
is_sellable: boolean;
|
|
14
|
+
is_on_sale?: boolean;
|
|
15
|
+
event_name: string;
|
|
16
|
+
currency: string;
|
|
17
|
+
resale_fee_amount: number | string;
|
|
13
18
|
}
|
|
14
19
|
interface TicketsTableTypes {
|
|
15
20
|
tickets: ITicketTypes[];
|
|
21
|
+
handleSellTicket: (ticket: ITicketTypes) => void;
|
|
22
|
+
handleRemoveFromResale: (ticket: ITicketTypes) => void;
|
|
16
23
|
}
|
|
17
|
-
declare const TicketsTable: ({ tickets }: TicketsTableTypes) => JSX.Element;
|
|
24
|
+
declare const TicketsTable: ({ tickets, handleSellTicket, handleRemoveFromResale }: TicketsTableTypes) => JSX.Element;
|
|
18
25
|
export default TicketsTable;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AxiosError } from 'axios';
|
|
3
|
+
export interface ITicketResaleContainer {
|
|
4
|
+
onCheckTicketStatusSuccess: (res: any) => void;
|
|
5
|
+
onCheckTicketStatusError: (e: AxiosError) => void;
|
|
6
|
+
orderHash?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TicketResaleContainer: ({ onCheckTicketStatusSuccess, onCheckTicketStatusError, orderHash, }: ITicketResaleContainer) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ITicketTypes } from '../orderDetailsContainer/ticketsTable';
|
|
3
|
+
import './style.css';
|
|
4
|
+
interface Props {
|
|
5
|
+
ticket: ITicketTypes;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSubmit: (values: InitialValuesTypes) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface InitialValuesTypes {
|
|
10
|
+
to: string;
|
|
11
|
+
first_name: string;
|
|
12
|
+
last_name: string;
|
|
13
|
+
email: string;
|
|
14
|
+
confirm_email: string;
|
|
15
|
+
confirm: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const TicketResaleModal: ({ ticket, onClose, onSubmit, }: Props) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -6,8 +6,9 @@ export interface IPromoCodeSectionProps {
|
|
|
6
6
|
isPromotionsEnabled: boolean;
|
|
7
7
|
isAllTicketsSoldOut: boolean;
|
|
8
8
|
isAccessCodeEnabled?: boolean;
|
|
9
|
+
isPromoLoading?: boolean;
|
|
9
10
|
setPromoCode: (value: string) => void;
|
|
10
11
|
setPromoCodeUpdated: (value: string) => void;
|
|
11
12
|
setShowPromoInput: (value: boolean) => void;
|
|
12
13
|
}
|
|
13
|
-
export declare const PromoCodeSection: ({ promoCode, promoCodeIsApplied, showPromoInput, isPromotionsEnabled, setPromoCode, setPromoCodeUpdated, setShowPromoInput, isAccessCodeEnabled, }: IPromoCodeSectionProps) => JSX.Element;
|
|
14
|
+
export declare const PromoCodeSection: ({ promoCode, promoCodeIsApplied, showPromoInput, isPromotionsEnabled, setPromoCode, setPromoCodeUpdated, setShowPromoInput, isAccessCodeEnabled, isPromoLoading, }: IPromoCodeSectionProps) => JSX.Element;
|
|
@@ -7,6 +7,7 @@ interface CartSuccess {
|
|
|
7
7
|
skip_billing_page: boolean;
|
|
8
8
|
names_required: boolean;
|
|
9
9
|
age_required: boolean;
|
|
10
|
+
phone_required: boolean;
|
|
10
11
|
event_id: string;
|
|
11
12
|
hash?: string;
|
|
12
13
|
}
|
|
@@ -18,8 +19,6 @@ export interface IGetTickets {
|
|
|
18
19
|
onAddToCartError: (e: AxiosError) => void;
|
|
19
20
|
onGetTicketsSuccess: (response: any) => void;
|
|
20
21
|
onGetTicketsError: (e: AxiosError) => void;
|
|
21
|
-
onLogoutSuccess: () => void;
|
|
22
|
-
onLogoutError: (e: AxiosError) => void;
|
|
23
22
|
onLoginSuccess: () => void;
|
|
24
23
|
theme?: 'light' | 'dark';
|
|
25
24
|
queryPromoCode?: string;
|
|
@@ -31,7 +30,7 @@ export interface IGetTickets {
|
|
|
31
30
|
isAccessCodeEnabled?: boolean;
|
|
32
31
|
hideSessionButtons?: boolean;
|
|
33
32
|
hideWaitingList?: boolean;
|
|
34
|
-
|
|
33
|
+
isButtonScrollable?: boolean;
|
|
35
34
|
}
|
|
36
35
|
export interface ITicket {
|
|
37
36
|
id: string | number;
|
|
@@ -40,5 +39,5 @@ export interface ITicket {
|
|
|
40
39
|
export interface ISelectedTickets {
|
|
41
40
|
[key: string]: string | number;
|
|
42
41
|
}
|
|
43
|
-
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError,
|
|
42
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable }: IGetTickets) => JSX.Element;
|
|
44
43
|
export {};
|
package/dist/env.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="envelope" class="svg-inline--fa fa-envelope fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user" class="svg-inline--fa fa-user fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"></path></svg>
|
package/dist/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { LoginModal } from './components/loginModal';
|
|
|
7
7
|
export { MyTicketsContainer } from './components/myTicketsContainer';
|
|
8
8
|
export { OrderDetailsContainer } from './components/orderDetailsContainer';
|
|
9
9
|
export { setConfigs } from './utils/setConfigs';
|
|
10
|
+
export { TicketResaleContainer } from './components';
|