tf-checkout-react 1.0.75 → 1.0.79
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 +7 -2
- package/dist/components/billing-info-container/utils.d.ts +1 -0
- package/dist/components/common/FormikPhoneNumberField.d.ts +1 -1
- package/dist/components/countdown/index.d.ts +11 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +13 -1
- package/dist/components/paymentContainer/index.d.ts +9 -2
- package/dist/components/ticketsContainer/index.d.ts +9 -1
- package/dist/components/waitingList/index.d.ts +1 -2
- package/dist/tf-checkout-react.cjs.development.js +505 -177
- 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 +498 -170
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +7 -0
- package/dist/utils/downloadPDF.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +2 -1
- package/src/api/index.ts +9 -0
- package/src/components/billing-info-container/index.tsx +25 -27
- package/src/components/billing-info-container/utils.ts +2 -1
- package/src/components/common/CheckboxField.tsx +19 -8
- package/src/components/common/CustomField.tsx +7 -0
- package/src/components/common/FormikPhoneNumberField.tsx +11 -1
- package/src/components/common/SelectField.tsx +5 -1
- package/src/components/countdown/index.tsx +89 -0
- package/src/components/countdown/style.css +10 -0
- package/src/components/loginModal/index.tsx +2 -0
- package/src/components/orderDetailsContainer/ticketsTable.tsx +66 -60
- package/src/components/paymentContainer/index.tsx +9 -11
- package/src/components/stripePayment/index.tsx +4 -4
- package/src/components/ticketsContainer/PromoCodeSection.tsx +3 -2
- package/src/components/ticketsContainer/TicketsSection.tsx +10 -6
- package/src/components/ticketsContainer/index.tsx +236 -76
- package/src/components/ticketsContainer/style.css +7 -0
- package/src/components/waitingList/index.tsx +3 -9
- package/src/components/waitingList/style.css +4 -2
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +51 -0
- package/src/utils/downloadPDF.tsx +22 -0
- package/src/utils/index.ts +2 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -8,6 +8,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
10
|
export declare const handleSetAccessToken: (token: any) => void;
|
|
11
|
+
export declare function getEvent(id: string | number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
12
|
export declare function getTickets(id: string | number, promoCode: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
13
|
export declare const addToCart: (id: string | number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
14
|
export declare const getCart: () => 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/styles';
|
|
6
8
|
export interface IBillingInfoPage {
|
|
7
9
|
data?: IBillingInfoData[];
|
|
8
10
|
ticketHoldersFields?: IBillingInfoData;
|
|
@@ -30,7 +32,10 @@ export interface IBillingInfoPage {
|
|
|
30
32
|
theme?: 'light' | 'dark';
|
|
31
33
|
isLoggedIn?: boolean;
|
|
32
34
|
accountInfoTitle?: string | JSX.Element;
|
|
33
|
-
fontFamily?: string;
|
|
34
35
|
hideLogo?: boolean;
|
|
36
|
+
themeOptions?: ThemeOptions & {
|
|
37
|
+
input?: CSSProperties;
|
|
38
|
+
checkbox?: CSSProperties;
|
|
39
|
+
};
|
|
35
40
|
}
|
|
36
|
-
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,
|
|
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;
|
|
@@ -7,5 +7,5 @@ export interface INumberInField {
|
|
|
7
7
|
interface IOtherProps {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
|
-
export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors }, setFieldValue, selectOptions, ...rest }: INumberInField & IOtherProps) => JSX.Element;
|
|
10
|
+
export declare const FormikPhoneNumberField: ({ label, field, form: { touched, errors, initialValues }, setFieldValue, selectOptions, ...rest }: INumberInField & IOtherProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface CountdownTypes {
|
|
4
|
+
startDate: string;
|
|
5
|
+
timezone?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
callback?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
|
|
11
|
+
export default Countdown;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
interface IAddOnTypes {
|
|
3
|
+
name: string;
|
|
4
|
+
status: string;
|
|
5
|
+
}
|
|
6
|
+
interface ITicketTypes {
|
|
7
|
+
add_ons?: IAddOnTypes[];
|
|
8
|
+
hash: string;
|
|
9
|
+
ticket_type: string;
|
|
10
|
+
holder_name: string;
|
|
11
|
+
status: string;
|
|
12
|
+
pdf_link: string;
|
|
13
|
+
}
|
|
2
14
|
interface TicketsTableTypes {
|
|
3
|
-
tickets:
|
|
15
|
+
tickets: ITicketTypes[];
|
|
4
16
|
}
|
|
5
17
|
declare const TicketsTable: ({ tickets }: TicketsTableTypes) => JSX.Element;
|
|
6
18
|
export default TicketsTable;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
|
+
import { StripeElementsOptions } from '@stripe/stripe-js';
|
|
3
4
|
import './style.css';
|
|
4
5
|
import { IPaymentField } from '../../types';
|
|
5
6
|
import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
|
|
7
|
+
import { ThemeOptions } from '@mui/material';
|
|
8
|
+
import { CSSProperties } from "@mui/styles";
|
|
6
9
|
export interface IPaymentPage {
|
|
7
10
|
paymentFields: IPaymentField[];
|
|
8
11
|
handlePayment: any;
|
|
@@ -15,6 +18,10 @@ export interface IPaymentPage {
|
|
|
15
18
|
onPaymentError: (value: AxiosError) => void;
|
|
16
19
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
17
20
|
disableZipSection: boolean;
|
|
18
|
-
|
|
21
|
+
themeOptions?: ThemeOptions & {
|
|
22
|
+
input?: CSSProperties;
|
|
23
|
+
checkbox?: CSSProperties;
|
|
24
|
+
};
|
|
25
|
+
elementsOptions?: StripeElementsOptions;
|
|
19
26
|
}
|
|
20
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection,
|
|
27
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions }: IPaymentPage) => JSX.Element;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
3
|
import './style.css';
|
|
4
|
+
import { ThemeOptions } from '@mui/material';
|
|
5
|
+
import { CSSProperties } from '@mui/styles';
|
|
4
6
|
interface CartSuccess {
|
|
5
7
|
skip_billing_page: boolean;
|
|
6
8
|
names_required: boolean;
|
|
7
9
|
age_required: boolean;
|
|
8
10
|
event_id: string;
|
|
11
|
+
hash?: string;
|
|
9
12
|
}
|
|
10
13
|
export interface IGetTickets {
|
|
11
14
|
eventId: number;
|
|
@@ -15,9 +18,14 @@ export interface IGetTickets {
|
|
|
15
18
|
onAddToCartError: (e: AxiosError) => void;
|
|
16
19
|
onGetTicketsSuccess: (response: any) => void;
|
|
17
20
|
onGetTicketsError: (e: AxiosError) => void;
|
|
21
|
+
onLoginSuccess: () => void;
|
|
18
22
|
theme?: 'light' | 'dark';
|
|
19
23
|
queryPromoCode?: string;
|
|
20
24
|
isPromotionsEnabled?: boolean;
|
|
25
|
+
themeOptions?: ThemeOptions & {
|
|
26
|
+
input?: CSSProperties;
|
|
27
|
+
checkbox?: CSSProperties;
|
|
28
|
+
};
|
|
21
29
|
}
|
|
22
30
|
export interface ITicket {
|
|
23
31
|
id: string | number;
|
|
@@ -26,5 +34,5 @@ export interface ITicket {
|
|
|
26
34
|
export interface ISelectedTickets {
|
|
27
35
|
[key: string]: string | number;
|
|
28
36
|
}
|
|
29
|
-
export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, }: IGetTickets) => JSX.Element;
|
|
37
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, }: IGetTickets) => JSX.Element;
|
|
30
38
|
export {};
|
|
@@ -3,7 +3,6 @@ import './style.css';
|
|
|
3
3
|
interface WaitingListProps {
|
|
4
4
|
tickets: any;
|
|
5
5
|
eventId: number;
|
|
6
|
-
isPromotionsEnabled: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare const WaitingList: ({ tickets, eventId
|
|
7
|
+
declare const WaitingList: ({ tickets, eventId }: WaitingListProps) => JSX.Element;
|
|
9
8
|
export default WaitingList;
|