tf-checkout-react 1.3.51 → 1.4.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.
Files changed (50) hide show
  1. package/dist/api/index.d.ts +6 -1
  2. package/dist/components/common/Loader.d.ts +1 -1
  3. package/dist/components/idVerificationContainer/constants.d.ts +2 -0
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/seatMapContainer/SeatMapComponent.d.ts +8 -0
  6. package/dist/components/seatMapContainer/TicketsSection.d.ts +9 -0
  7. package/dist/components/seatMapContainer/addToCart.d.ts +21 -0
  8. package/dist/components/seatMapContainer/index.d.ts +2 -0
  9. package/dist/components/seatMapContainer/utils.d.ts +14 -0
  10. package/dist/components/stripePayment/index.d.ts +2 -2
  11. package/dist/components/ticketsContainer/TicketRow.d.ts +3 -1
  12. package/dist/components/ticketsContainer/TicketsSection.d.ts +5 -1
  13. package/dist/components/ticketsContainer/index.d.ts +6 -2
  14. package/dist/index.d.ts +1 -0
  15. package/dist/tf-checkout-react.cjs.development.js +1435 -128
  16. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  17. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  18. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  19. package/dist/tf-checkout-react.esm.js +1436 -130
  20. package/dist/tf-checkout-react.esm.js.map +1 -1
  21. package/dist/tf-checkout-styles.css +1 -1
  22. package/dist/types/order-data.d.ts +3 -0
  23. package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +9 -2
  24. package/package.json +12 -4
  25. package/src/.d.ts +4 -3
  26. package/src/api/index.ts +89 -6
  27. package/src/components/billing-info-container/index.tsx +111 -102
  28. package/src/components/common/Loader.tsx +6 -8
  29. package/src/components/common/dist/PhoneNumberField.js +96 -0
  30. package/src/components/confirmationContainer/index.tsx +11 -9
  31. package/src/components/idVerificationContainer/constants.ts +2 -0
  32. package/src/components/idVerificationContainer/index.tsx +54 -13
  33. package/src/components/index.ts +2 -1
  34. package/src/components/orderDetailsContainer/index.tsx +54 -23
  35. package/src/components/paymentContainer/index.tsx +167 -33
  36. package/src/components/seatMapContainer/SeatMapComponent.tsx +73 -0
  37. package/src/components/seatMapContainer/TicketsSection.tsx +254 -0
  38. package/src/components/seatMapContainer/addToCart.ts +82 -0
  39. package/src/components/seatMapContainer/index.tsx +408 -0
  40. package/src/components/seatMapContainer/utils.ts +138 -0
  41. package/src/components/stripePayment/index.tsx +23 -18
  42. package/src/components/ticketsContainer/TicketRow.tsx +28 -13
  43. package/src/components/ticketsContainer/TicketsSection.tsx +85 -2
  44. package/src/components/ticketsContainer/index.tsx +57 -12
  45. package/src/components/ticketsContainer/style.css +0 -3
  46. package/src/hooks/usePixel.ts +35 -1
  47. package/src/index.ts +2 -1
  48. package/src/types/order-data.ts +3 -0
  49. package/src/types/seatMap.d.ts +154 -0
  50. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +6 -2
@@ -4,7 +4,7 @@ import { GetNetverifyUrlResponseData, UpdateVerificationStatusResponseData, Veri
4
4
  export declare const setCustomHeader: (response: any) => void;
5
5
  export declare const handleSetAccessToken: (token: string) => void;
6
6
  export declare function getEvent(id: string | number, pk?: string): Promise<AxiosResponse<any, any>>;
7
- export declare function getTickets(id: string | number, promoCode: string, pk?: string): Promise<AxiosResponse<any, any>>;
7
+ export declare function getTickets(id: string | number, promoCode?: string, pk?: string): Promise<AxiosResponse<any, any>>;
8
8
  export declare const addToCart: (id: string | number, data: any) => Promise<AxiosResponse<any, any>>;
9
9
  export declare const getCart: () => Promise<AxiosResponse<any, any>>;
10
10
  export declare const postOnCheckout: (data: any, accessToken?: string | undefined, freeTicket?: boolean) => Promise<AxiosResponse<any, any>>;
@@ -44,6 +44,10 @@ export declare const validatePhoneNumber: (phone: string) => Promise<any>;
44
44
  export declare const getAddons: (eventId: string) => Promise<any>;
45
45
  export declare const selectAddons: (data: any) => void;
46
46
  export declare const getCheckoutPageConfigs: () => Promise<any>;
47
+ export declare const getSeatMapData: (eventId: string | number) => Promise<SeatMapDataResponse>;
48
+ export declare const getSeatMapStatuses: (eventId: string | number) => Promise<SeatMapStatusesResponse>;
49
+ export declare const reserveSeat: (eventId: string | number, tierId: string, seatId: string) => Promise<any>;
50
+ export declare const removeSeatReserve: (eventId: string | number, tierId: string, seatIds: string[]) => Promise<any>;
47
51
  export declare function getPixelScript(id: string | number, pageOptions: pageOptions): Promise<AxiosResponse<any, any>>;
48
52
  export declare const getNetverifyUrl: () => Promise<GetNetverifyUrlResponseData>;
49
53
  export declare const checkVerificationStatus: () => Promise<{
@@ -52,4 +56,5 @@ export declare const checkVerificationStatus: () => Promise<{
52
56
  export declare const updateVerificationStatus: () => Promise<{
53
57
  data: UpdateVerificationStatusResponseData;
54
58
  }>;
59
+ export declare const checkCustomerOrder: (orderHash: string) => Promise<any>;
55
60
  export {};
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare function Loader(): JSX.Element;
2
+ export declare const Loader: () => JSX.Element;
@@ -2,6 +2,7 @@ export declare const VERIFICATION_STATUSES: {
2
2
  PENDING: string;
3
3
  APPROVED: string;
4
4
  FAILED: string;
5
+ WRONG_CUSTOMER: string;
5
6
  };
6
7
  export declare const TRANSACTION_STATUSES: {
7
8
  ERROR: string;
@@ -11,4 +12,5 @@ export declare const VERIFICATION_MESSAGES: {
11
12
  PENDING: string;
12
13
  APPROVED: string;
13
14
  FAILED: string;
15
+ WRONG_CUSTOMER: string;
14
16
  };
@@ -7,4 +7,5 @@ export { OrderDetailsContainer } from './orderDetailsContainer';
7
7
  export { ResetPasswordContainer } from './resetPasswordContainer';
8
8
  export { TicketResaleContainer } from './ticketResale';
9
9
  export { AddonsContainter } from './addonsContainer';
10
+ export { SeatMapContainer } from './seatMapContainer';
10
11
  export { IDVerification } from './idVerificationContainer';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import 'tf-seat-map-view/dist/index.css';
3
+ declare global {
4
+ interface Window {
5
+ tierPrices: any;
6
+ }
7
+ }
8
+ export declare const SeatMapComponent: (props: ISeatMapContainerProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { CSSProperties } from '@emotion/serialize';
3
+ import { ThemeOptions } from '@mui/material';
4
+ export declare const TicketsSection: (props: ITicketsSectionProps & {
5
+ themeOptions?: ThemeOptions & {
6
+ input?: CSSProperties;
7
+ checkbox?: CSSProperties;
8
+ };
9
+ }) => JSX.Element;
@@ -0,0 +1,21 @@
1
+ interface IAddToCartFuncProps {
2
+ eventId: string | number;
3
+ data: any;
4
+ ticketQuantity: number;
5
+ enableBillingInfoAutoCreate?: boolean;
6
+ }
7
+ export declare const addToCartFunc: ({ eventId, data, ticketQuantity, enableBillingInfoAutoCreate, }: IAddToCartFuncProps) => Promise<{
8
+ skip_billing_page: any;
9
+ names_required: any;
10
+ phone_required: any;
11
+ age_required: any;
12
+ hide_phone_field: any;
13
+ free_ticket: any;
14
+ collect_optional_wallet_address: any;
15
+ collect_mandatory_wallet_address: any;
16
+ event_id: string;
17
+ hash: string;
18
+ total: string;
19
+ hasAddOn: any;
20
+ } | null>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SeatMapContainer: (props: IMapContainerProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare const getTierIdBasedOnSeatId: (seatId: string, eventSeats: Array<EventSeat>) => string;
2
+ export declare const getButtonLabel: (count: number, tableMapEnabled: boolean) => string;
3
+ export declare const getOwnReservationsBasedOnStatuses: (statuses: any) => string[];
4
+ export declare const getTicketDropdownData: (reservationData: Array<SeatReservationData>, tierReleations: TicketTypeTierRelations) => ITicketsDropdownsData[];
5
+ export declare const getAddToCartRequestData: ({ eventId, reservations, selectedSeats, selectedTickets, guestCounts, }: any) => {
6
+ attributes: {
7
+ alternative_view_id: null;
8
+ product_cart_quantity: any;
9
+ product_options: {};
10
+ product_id: any;
11
+ ticket_types: {};
12
+ };
13
+ };
14
+ export declare const getTierRelationsArray: (data: Array<TicketTypeTierRelationsData>) => (string | number)[];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
3
2
  import './style.css';
3
+ import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
4
4
  export interface ICheckoutForm {
5
5
  total: string;
6
6
  currency: string;
@@ -17,5 +17,5 @@ export interface ICheckoutForm {
17
17
  disableZipSection: boolean;
18
18
  paymentButtonText?: string;
19
19
  }
20
- declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, paymentButtonText }: ICheckoutForm) => JSX.Element;
20
+ declare const CheckoutForm: ({ total, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, paymentButtonText, }: ICheckoutForm) => JSX.Element;
21
21
  export default CheckoutForm;
@@ -5,6 +5,8 @@ interface ITicketRowProps {
5
5
  prevTicketTier: any;
6
6
  selectedTickets: any;
7
7
  handleTicketSelect: any;
8
+ isSeatMapAllowed?: any;
9
+ tableType?: boolean;
8
10
  }
9
- export declare const TicketRow: ({ ticketTier, prevTicketTier, selectedTickets, handleTicketSelect, }: ITicketRowProps) => JSX.Element;
11
+ export declare const TicketRow: ({ ticketTier, prevTicketTier, selectedTickets, handleTicketSelect, isSeatMapAllowed, tableType, }: ITicketRowProps) => JSX.Element;
10
12
  export {};
@@ -7,9 +7,13 @@ interface ITicketsSectionProps {
7
7
  handleTicketSelect: any;
8
8
  sortBySoldOut: boolean;
9
9
  hideTicketsHeader: boolean;
10
+ hideTableTicketsHeader: boolean;
11
+ tableTickets: any;
10
12
  ticketsHeaderComponent?: ReactNode;
13
+ tableTicketsHeaderComponent?: ReactNode;
11
14
  showGroupNameBlock?: boolean;
12
15
  currencySybmol?: string;
16
+ isSeatMapAllowed?: boolean;
13
17
  }
14
- export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader, showGroupNameBlock, currencySybmol, }: ITicketsSectionProps) => JSX.Element;
18
+ export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, tableTicketsHeaderComponent, hideTicketsHeader, hideTableTicketsHeader, showGroupNameBlock, currencySybmol, isSeatMapAllowed, tableTickets, }: ITicketsSectionProps) => JSX.Element;
15
19
  export {};
@@ -50,6 +50,8 @@ export interface IGetTickets {
50
50
  actionsSectionComponent?: any;
51
51
  ticketsHeaderComponent?: ReactNode;
52
52
  hideTicketsHeader?: boolean;
53
+ tableTicketsHeaderComponent?: ReactNode;
54
+ hideTableTicketsHeader?: boolean;
53
55
  enableInfluencersSection?: boolean;
54
56
  enableAddOns?: boolean;
55
57
  ordersPath?: string;
@@ -57,6 +59,7 @@ export interface IGetTickets {
57
59
  promoText?: string;
58
60
  showGroupNameBlock?: boolean;
59
61
  currencySybmol?: string;
62
+ onReserveButtonClick?: () => void;
60
63
  onPendingVerification?: () => void;
61
64
  }
62
65
  export interface ITicket {
@@ -64,7 +67,8 @@ export interface ITicket {
64
67
  [key: string]: string | number;
65
68
  }
66
69
  export interface ISelectedTickets {
67
- [key: string]: string | number;
70
+ isTable: boolean;
71
+ [key: string]: string | number | boolean;
68
72
  }
69
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, currencySybmol, onPendingVerification, }: IGetTickets) => JSX.Element;
73
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, tableTicketsHeaderComponent, hideTableTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, currencySybmol, onReserveButtonClick, onPendingVerification, }: IGetTickets) => JSX.Element;
70
74
  export {};
package/dist/index.d.ts CHANGED
@@ -14,5 +14,6 @@ export { ResetPasswordContainer } from './components/resetPasswordContainer';
14
14
  export { ForgotPasswordModal } from './components/forgotPasswordModal';
15
15
  export { AddonsContainter } from './components/addonsContainer';
16
16
  export { PoweredBy } from './components/common/PoweredBy';
17
+ export { SeatMapContainer } from './components/seatMapContainer';
17
18
  export { IDVerification } from './components/idVerificationContainer';
18
19
  export { VERIFICATION_STATUSES } from './components/idVerificationContainer/constants';