tf-checkout-react 1.7.2 → 1.7.4
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/auth.d.ts +22 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/components/confirmationContainer/index.d.ts +5 -1
- package/dist/components/loginForm/index.d.ts +1 -0
- package/dist/components/loginModal/SignUpForm.d.ts +10 -0
- package/dist/components/loginModal/constants.d.ts +39 -0
- package/dist/components/loginModal/index.d.ts +1 -0
- package/dist/components/seatMapContainer/addToCart.d.ts +2 -2
- package/dist/components/ticketsContainer/TimeSlotTicketRow.d.ts +19 -0
- package/dist/tf-checkout-react.cjs.development.js +1654 -698
- 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 +1655 -699
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/validators/index.d.ts +4 -0
- package/package.json +2 -2
- package/src/api/auth.ts +49 -0
- package/src/api/index.ts +1 -1
- package/src/api/publicRequest.ts +1 -0
- package/src/components/billing-info-container/index.tsx +128 -32
- package/src/components/billing-info-container/style.css +46 -2
- package/src/components/confirmationContainer/index.tsx +24 -3
- package/src/components/loginForm/index.tsx +19 -3
- package/src/components/loginModal/SignUpForm.tsx +329 -0
- package/src/components/loginModal/constants.ts +46 -0
- package/src/components/loginModal/index.tsx +86 -9
- package/src/components/loginModal/style.css +44 -2
- package/src/components/preRegistration/constants.tsx +6 -4
- package/src/components/preRegistration/index.tsx +3 -3
- package/src/components/preRegistration/utils.ts +9 -1
- package/src/components/ticketsContainer/TimeSlotTicketRow.tsx +224 -0
- package/src/components/ticketsContainer/TimeSlotsSection.tsx +98 -24
- package/src/components/ticketsContainer/index.tsx +79 -21
- package/src/types/api/common.d.ts +1 -0
- package/src/types/api/payment.d.ts +2 -0
- package/src/types/formFields.d.ts +1 -1
- package/src/validators/index.ts +22 -1
package/dist/api/auth.d.ts
CHANGED
|
@@ -3,3 +3,25 @@ export declare const signUp: (data: ISignupRequestData) => Promise<IProfileRespo
|
|
|
3
3
|
export declare const register: (data: FormData) => Promise<IProfileResponse>;
|
|
4
4
|
export declare const getProfileData: () => Promise<IProfileResponse>;
|
|
5
5
|
export declare const logout: () => Promise<IAxiosResponseData>;
|
|
6
|
+
/**
|
|
7
|
+
* Checks whether a given email address already exists via the `/ajax/contact-email` endpoint.
|
|
8
|
+
*
|
|
9
|
+
* The underlying API is expected to return a JSON object containing:
|
|
10
|
+
* - `exists`: `1` if the email exists, `0` otherwise
|
|
11
|
+
* - `error`: `1` if an error occurred, `0` otherwise
|
|
12
|
+
* - `message`: an optional error message when `error === 1`
|
|
13
|
+
*
|
|
14
|
+
* This function normalizes that response to an object with:
|
|
15
|
+
* - `exists`: a boolean indicating whether the email exists
|
|
16
|
+
* - `error`: an optional string containing an error message, if any
|
|
17
|
+
*
|
|
18
|
+
* On network or unexpected errors, it returns `{ exists: false, error: 'Failed to check email' }`.
|
|
19
|
+
*
|
|
20
|
+
* @param {string} email - The email address to check for existence.
|
|
21
|
+
* @returns {Promise<{ exists: boolean; error?: string }>} A promise that resolves to the normalized
|
|
22
|
+
* result of the email existence check.
|
|
23
|
+
*/
|
|
24
|
+
export declare const checkEmailExists: (email: string) => Promise<{
|
|
25
|
+
exists: boolean;
|
|
26
|
+
error?: string;
|
|
27
|
+
}>;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './interceptors';
|
|
2
2
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
3
3
|
import { GetNetverifyUrlResponseData, UpdateVerificationStatusResponseData, VerificationStatusResponseData } from '../types/verification';
|
|
4
|
-
export { authorize, getProfileData, signUp, register, logout } from './auth';
|
|
4
|
+
export { authorize, getProfileData, signUp, register, logout, checkEmailExists } from './auth';
|
|
5
5
|
export { setAxiosHeader, setBaseUrl } from './publicRequest';
|
|
6
6
|
export { getOrders, getOrderDetails } from './orders';
|
|
7
7
|
export { addToCart, getCart } from './cart';
|
|
@@ -38,5 +38,9 @@ export interface IConfirmationPage {
|
|
|
38
38
|
showPricingNoteSection?: boolean;
|
|
39
39
|
showOrderDetailsBtn?: boolean;
|
|
40
40
|
onOrderDetailsClick?: (data: ICheckoutCompleteData) => void;
|
|
41
|
+
showProductImage?: boolean;
|
|
42
|
+
eventTitle?: string;
|
|
43
|
+
eventDate?: string;
|
|
44
|
+
eventLocation?: string;
|
|
41
45
|
}
|
|
42
|
-
export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, showPricingNoteSection, showOrderDetailsBtn, onOrderDetailsClick, }: IConfirmationPage) => JSX.Element;
|
|
46
|
+
export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, showPricingNoteSection, showOrderDetailsBtn, onOrderDetailsClick, showProductImage, eventTitle, eventDate, eventLocation, }: IConfirmationPage) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface SignUpFormProps {
|
|
4
|
+
onSignUpSuccess: (res: IProfileData) => void;
|
|
5
|
+
onGetProfileDataSuccess?: (res: any) => void;
|
|
6
|
+
onGetProfileDataError?: (e: AxiosError) => void;
|
|
7
|
+
logo?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SignUpForm: FC<SignUpFormProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
PRIMARY: string;
|
|
3
|
+
SECONDARY: string;
|
|
4
|
+
BACKGROUND: string;
|
|
5
|
+
BORDER: string;
|
|
6
|
+
INDICATOR: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const TYPOGRAPHY: {
|
|
9
|
+
FONT_FAMILY: string;
|
|
10
|
+
FONT_WEIGHT: {
|
|
11
|
+
SEMIBOLD: number;
|
|
12
|
+
BOLD: number;
|
|
13
|
+
};
|
|
14
|
+
FONT_SIZE: {
|
|
15
|
+
TAB: string;
|
|
16
|
+
TITLE: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const MODAL_DIMENSIONS: {
|
|
20
|
+
WIDTH: {
|
|
21
|
+
DESKTOP: number;
|
|
22
|
+
MOBILE: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const TAB_STYLES: {
|
|
26
|
+
BACKGROUND_COLOR: string;
|
|
27
|
+
MARGIN_BOTTOM: string;
|
|
28
|
+
LABEL: {
|
|
29
|
+
FONT_FAMILY: string;
|
|
30
|
+
FONT_WEIGHT: number;
|
|
31
|
+
FONT_SIZE: string;
|
|
32
|
+
TEXT_TRANSFORM: string;
|
|
33
|
+
COLOR: string;
|
|
34
|
+
SELECTED_COLOR: string;
|
|
35
|
+
};
|
|
36
|
+
INDICATOR: {
|
|
37
|
+
BACKGROUND_COLOR: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -7,8 +7,8 @@ interface IAddToCartFuncProps {
|
|
|
7
7
|
export declare const addToCartFunc: ({ eventId, data, ticketQuantity, enableBillingInfoAutoCreate, }: IAddToCartFuncProps) => Promise<{
|
|
8
8
|
skip_billing_page: any;
|
|
9
9
|
event_id: string;
|
|
10
|
-
hash: string
|
|
11
|
-
total: string
|
|
10
|
+
hash: string;
|
|
11
|
+
total: string;
|
|
12
12
|
hasAddOn: any;
|
|
13
13
|
} | null>;
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface TimeSlotOption {
|
|
4
|
+
timeKey: string;
|
|
5
|
+
ticketInstance: any;
|
|
6
|
+
}
|
|
7
|
+
interface ITimeSlotTicketRowProps {
|
|
8
|
+
ticketKey: string;
|
|
9
|
+
ticket: any;
|
|
10
|
+
availableTimeSlots: TimeSlotOption[];
|
|
11
|
+
selectedTickets: any;
|
|
12
|
+
selectedTimeSlots: any;
|
|
13
|
+
handleTicketSelect: (ticketKey: string, quantity: number, ticketInstance: any) => void;
|
|
14
|
+
handleTimeSlotSelect: (ticketKey: string, timeKey: string, ticketInstance: any) => void;
|
|
15
|
+
priceSymbol: string;
|
|
16
|
+
isSoldOut: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const TimeSlotTicketRow: ({ ticketKey, ticket, availableTimeSlots, selectedTickets, selectedTimeSlots, handleTicketSelect, handleTimeSlotSelect, priceSymbol, isSoldOut, }: ITimeSlotTicketRowProps) => JSX.Element;
|
|
19
|
+
export {};
|