tf-checkout-react 1.6.6-beta.3 → 1.6.6-beta.31
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/README.md +61 -40
- package/dist/adapters/customFields.d.ts +1 -0
- package/dist/api/checkout.d.ts +1 -0
- package/dist/api/common.d.ts +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/preRegistrationComplete.d.ts +1 -1
- package/dist/components/addonsContainer/AddonComponent.d.ts +5 -1
- package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +17 -0
- package/dist/components/addonsContainer/index.d.ts +5 -1
- package/dist/components/billing-info-container/index.d.ts +8 -1
- package/dist/components/billing-info-container/utils.d.ts +25 -1
- package/dist/components/common/DatePickerField.d.ts +7 -1
- package/dist/components/countdown/index.d.ts +1 -1
- package/dist/components/forgotPasswordModal/index.d.ts +2 -1
- package/dist/components/myTicketsContainer/index.d.ts +3 -2
- package/dist/components/orderDetailsContainer/index.d.ts +7 -1
- package/dist/components/paymentContainer/OrderDetails.d.ts +8 -0
- package/dist/components/paymentContainer/handlePayment.d.ts +15 -0
- package/dist/components/paymentContainer/index.d.ts +10 -5
- package/dist/components/preRegistration/FieldsSection.d.ts +7 -1
- package/dist/components/preRegistration/PreRegistrationComplete.d.ts +6 -0
- package/dist/components/preRegistration/constants.d.ts +2 -2
- package/dist/components/preRegistration/index.d.ts +6 -0
- package/dist/components/resetPasswordContainer/index.d.ts +2 -2
- package/dist/components/stripePayment/index.d.ts +18 -3
- package/dist/components/ticketsContainer/InfoIcon.d.ts +5 -0
- package/dist/components/ticketsContainer/TicketsSection.d.ts +3 -2
- package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +25 -0
- package/dist/components/ticketsContainer/index.d.ts +18 -5
- package/dist/components/timerWidget/index.d.ts +2 -1
- package/dist/constants/index.d.ts +5 -0
- package/dist/index.d.ts +4 -1
- package/dist/tf-checkout-react.cjs.development.js +5196 -3599
- 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 +5199 -3605
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/types/add_on.d.ts +1 -0
- package/dist/types/checkoutPageConfigs.d.ts +1 -1
- package/dist/types/order-data.d.ts +2 -1
- package/dist/utils/auth.d.ts +8 -0
- package/dist/utils/customFields.d.ts +11 -0
- package/dist/utils/getDomain.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/setConfigs.d.ts +1 -0
- package/package.json +3 -2
- package/src/adapters/customFields.ts +7 -1
- package/src/api/auth.ts +2 -1
- package/src/api/checkout.ts +8 -4
- package/src/api/common.ts +49 -2
- package/src/api/interceptors.ts +7 -23
- package/src/api/preRegistrationComplete.ts +1 -1
- package/src/api/publicRequest.ts +10 -0
- package/src/components/addonsContainer/AddonComponent.tsx +71 -11
- package/src/components/addonsContainer/SimpleAddonsContainer.tsx +388 -0
- package/src/components/addonsContainer/index.tsx +189 -58
- package/src/components/billing-info-container/index.tsx +704 -390
- package/src/components/billing-info-container/{utils.ts → utils.tsx} +119 -0
- package/src/components/common/CheckboxField/index.tsx +1 -1
- package/src/components/common/DatePickerField.tsx +25 -10
- package/src/components/common/SnackbarAlert.tsx +32 -34
- package/src/components/confirmationContainer/index.tsx +1 -1
- package/src/components/countdown/index.tsx +22 -22
- package/src/components/delegationsContainer/IssueComponent.tsx +2 -1
- package/src/components/forgotPasswordModal/index.tsx +44 -13
- package/src/components/loginForm/index.tsx +1 -1
- package/src/components/loginModal/index.tsx +2 -2
- package/src/components/loginModal/style.css +3 -1
- package/src/components/myTicketsContainer/index.tsx +13 -9
- package/src/components/orderDetailsContainer/index.tsx +188 -173
- package/src/components/paymentContainer/OrderDetails.tsx +170 -0
- package/src/components/paymentContainer/handlePayment.ts +86 -0
- package/src/components/paymentContainer/index.tsx +253 -226
- package/src/components/paymentContainer/style.css +113 -0
- package/src/components/preRegistration/FieldsSection.tsx +8 -0
- package/src/components/preRegistration/PreRegistrationComplete.tsx +128 -118
- package/src/components/preRegistration/PreRegistrationInformations.tsx +21 -15
- package/src/components/preRegistration/constants.tsx +10 -4
- package/src/components/preRegistration/index.tsx +194 -174
- package/src/components/registerForm/constants.tsx +3 -1
- package/src/components/registerForm/index.tsx +3 -3
- package/src/components/resetPasswordContainer/index.tsx +12 -13
- package/src/components/seatMapContainer/TicketsSection.tsx +2 -2
- package/src/components/stripePayment/index.tsx +129 -24
- package/src/components/ticketsContainer/InfoIcon.tsx +35 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +34 -28
- package/src/components/ticketsContainer/TicketRow.tsx +1 -1
- package/src/components/ticketsContainer/TicketsSection.tsx +178 -52
- package/src/components/ticketsContainer/TimeSlotsSection.tsx +120 -0
- package/src/components/ticketsContainer/index.tsx +209 -99
- package/src/components/timerWidget/index.tsx +15 -3
- package/src/constants/index.ts +2 -0
- package/src/hoc/CustomFields/index.tsx +9 -1
- package/src/index.ts +7 -2
- package/src/types/add_on.ts +1 -0
- package/src/types/api/common.d.ts +27 -0
- package/src/types/api/orders.d.ts +19 -3
- package/src/types/api/payment.d.ts +5 -2
- package/src/types/api/preRegistrationComplete.d.ts +2 -2
- package/src/types/checkoutPageConfigs.ts +1 -1
- package/src/types/order-data.ts +2 -1
- package/src/types/pre-registration-complete.d.ts +6 -1
- package/src/utils/auth.ts +32 -0
- package/src/utils/cookies.ts +42 -11
- package/src/utils/customFields.ts +22 -0
- package/src/utils/getDomain.ts +10 -4
- package/src/utils/index.ts +1 -1
- package/src/utils/setConfigs.ts +3 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './style.css';
|
|
3
|
-
import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
|
|
3
|
+
import { Stripe, StripeCardNumberElement, StripeCardNumberElementOptions, StripeError } from '@stripe/stripe-js';
|
|
4
|
+
interface PaymentFieldsData {
|
|
5
|
+
billing_info: {
|
|
6
|
+
city?: string;
|
|
7
|
+
street_address?: string;
|
|
8
|
+
state?: string;
|
|
9
|
+
};
|
|
10
|
+
postalCode?: string;
|
|
11
|
+
disableZipSection?: boolean;
|
|
12
|
+
cardComplete?: boolean;
|
|
13
|
+
}
|
|
4
14
|
export interface ICheckoutForm {
|
|
5
15
|
total: string | number;
|
|
6
16
|
currency: string;
|
|
@@ -14,11 +24,16 @@ export interface ICheckoutForm {
|
|
|
14
24
|
isLoading: any;
|
|
15
25
|
handleSetLoading: (loading: any) => void;
|
|
16
26
|
conditions: any;
|
|
17
|
-
disableZipSection
|
|
27
|
+
disableZipSection?: boolean;
|
|
18
28
|
paymentButtonText?: string;
|
|
19
29
|
forPaymentPlan?: boolean;
|
|
20
30
|
orderId?: string;
|
|
21
31
|
hasSeatMapActions: boolean;
|
|
32
|
+
enableAddressElement?: boolean;
|
|
33
|
+
collectPaymentMethodOnly?: boolean;
|
|
34
|
+
displayPaymentButton?: boolean;
|
|
35
|
+
onPaymentFieldsUpdate?: (error: any, paymentFieldsData: PaymentFieldsData, stripe: Stripe | null, card: StripeCardNumberElement | null) => void;
|
|
36
|
+
stripeCardError?: StripeError | null;
|
|
22
37
|
}
|
|
23
|
-
declare const CheckoutForm: ({ total, orderId, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, paymentButtonText, forPaymentPlan, hasSeatMapActions, }: ICheckoutForm) => JSX.Element;
|
|
38
|
+
declare const CheckoutForm: ({ total, orderId, onSubmit, stripeCardOptions, error, stripe_client_secret, currency, billing_info, isLoading, handleSetLoading, conditions, disableZipSection, paymentButtonText, forPaymentPlan, hasSeatMapActions, enableAddressElement, displayPaymentButton, onPaymentFieldsUpdate, stripeCardError, }: ICheckoutForm) => JSX.Element;
|
|
24
39
|
export default CheckoutForm;
|
|
@@ -12,8 +12,9 @@ interface ITicketsSectionProps {
|
|
|
12
12
|
ticketsHeaderComponent?: ReactNode;
|
|
13
13
|
tableTicketsHeaderComponent?: ReactNode;
|
|
14
14
|
showGroupNameBlock?: boolean;
|
|
15
|
-
|
|
15
|
+
currencySymbol?: string;
|
|
16
16
|
isSeatMapAllowed?: boolean;
|
|
17
|
+
descriptionTrigger?: 'click' | 'hover';
|
|
17
18
|
}
|
|
18
|
-
export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, tableTicketsHeaderComponent, hideTicketsHeader, hideTableTicketsHeader, showGroupNameBlock,
|
|
19
|
+
export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, tableTicketsHeaderComponent, hideTicketsHeader, hideTableTicketsHeader, showGroupNameBlock, currencySymbol, isSeatMapAllowed, tableTickets, descriptionTrigger, }: ITicketsSectionProps) => JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
event: any;
|
|
4
|
+
eventId: number;
|
|
5
|
+
availableDates: string[];
|
|
6
|
+
selectedDate: string | null;
|
|
7
|
+
timeSlotGroups: {
|
|
8
|
+
[key: string]: any[];
|
|
9
|
+
};
|
|
10
|
+
setTimeSlotGroups: (value: {
|
|
11
|
+
[key: string]: any[];
|
|
12
|
+
}) => void;
|
|
13
|
+
setSelectedDate: (value: string | null) => void;
|
|
14
|
+
getTimeSlots: (date: string | null, type?: string) => Promise<void>;
|
|
15
|
+
selectedTickets: any;
|
|
16
|
+
handleTicketSelect: any;
|
|
17
|
+
sortBySoldOut: boolean;
|
|
18
|
+
hideTicketsHeader: boolean;
|
|
19
|
+
ticketsHeaderComponent?: ReactNode;
|
|
20
|
+
showGroupNameBlock?: boolean;
|
|
21
|
+
currencySymbol?: string;
|
|
22
|
+
isSeatMapAllowed?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const TimeSlotsSection: React.FC<Props>;
|
|
25
|
+
export default TimeSlotsSection;
|
|
@@ -9,6 +9,7 @@ interface CartSuccess {
|
|
|
9
9
|
hash?: string | number;
|
|
10
10
|
total?: string | number;
|
|
11
11
|
hasAddOn?: boolean;
|
|
12
|
+
eventSlug?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface IGetTickets {
|
|
14
15
|
eventId: number;
|
|
@@ -16,12 +17,24 @@ export interface IGetTickets {
|
|
|
16
17
|
getTicketsLabel?: string;
|
|
17
18
|
contentStyle?: React.CSSProperties;
|
|
18
19
|
onAddToCartError: (e: AxiosError) => void;
|
|
19
|
-
onGetTicketsSuccess: (response:
|
|
20
|
+
onGetTicketsSuccess: (response: {
|
|
21
|
+
data: {
|
|
22
|
+
attributes: {
|
|
23
|
+
tickets: ITicketData[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}) => void;
|
|
20
27
|
onGetTicketsPress: () => void;
|
|
21
28
|
onGetTicketsError: (e: AxiosError) => void;
|
|
22
29
|
onLogoutSuccess: () => void;
|
|
23
30
|
onLogoutError: (e: AxiosError) => void;
|
|
24
|
-
onGetProfileDataSuccess: (response:
|
|
31
|
+
onGetProfileDataSuccess: (response: {
|
|
32
|
+
data: {
|
|
33
|
+
attributes: {
|
|
34
|
+
[key: string]: string | number | boolean | null;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}) => void;
|
|
25
38
|
onGetProfileDataError: (e: AxiosError) => void;
|
|
26
39
|
onLoginSuccess: () => void;
|
|
27
40
|
handleNotInvitedModalClose: () => void;
|
|
@@ -41,7 +54,7 @@ export interface IGetTickets {
|
|
|
41
54
|
sortBySoldOut?: boolean;
|
|
42
55
|
disableCountdownLeadingZero?: boolean;
|
|
43
56
|
isLoggedIn?: boolean;
|
|
44
|
-
actionsSectionComponent?:
|
|
57
|
+
actionsSectionComponent?: ReactNode;
|
|
45
58
|
ticketsHeaderComponent?: ReactNode;
|
|
46
59
|
hideTicketsHeader?: boolean;
|
|
47
60
|
tableTicketsHeaderComponent?: ReactNode;
|
|
@@ -52,7 +65,7 @@ export interface IGetTickets {
|
|
|
52
65
|
showPoweredByImage?: boolean;
|
|
53
66
|
promoText?: string;
|
|
54
67
|
showGroupNameBlock?: boolean;
|
|
55
|
-
|
|
68
|
+
currencySymbol?: string;
|
|
56
69
|
onReserveButtonClick?: () => void;
|
|
57
70
|
onPendingVerification?: () => void;
|
|
58
71
|
showAlertIcons?: boolean;
|
|
@@ -65,5 +78,5 @@ export interface ISelectedTickets {
|
|
|
65
78
|
isTable: boolean;
|
|
66
79
|
[key: string]: string | number | boolean;
|
|
67
80
|
}
|
|
68
|
-
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, onGetTicketsPress, 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,
|
|
81
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, onGetTicketsPress, 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, currencySymbol, onReserveButtonClick, onPendingVerification, showAlertIcons, }: IGetTickets) => JSX.Element;
|
|
69
82
|
export {};
|
|
@@ -4,6 +4,7 @@ export interface ITimerWidgetPage {
|
|
|
4
4
|
expires_at: number;
|
|
5
5
|
buyLoading?: boolean;
|
|
6
6
|
onCountdownFinish?: () => void;
|
|
7
|
+
container?: string;
|
|
7
8
|
}
|
|
8
9
|
export interface IRenderer {
|
|
9
10
|
minutes: number;
|
|
@@ -11,5 +12,5 @@ export interface IRenderer {
|
|
|
11
12
|
completed: number;
|
|
12
13
|
handleCountdownFinish: () => void;
|
|
13
14
|
}
|
|
14
|
-
declare const _default: React.MemoExoticComponent<({ expires_at, buyLoading, onCountdownFinish, }: ITimerWidgetPage) => JSX.Element | null>;
|
|
15
|
+
declare const _default: React.MemoExoticComponent<({ expires_at, buyLoading, onCountdownFinish, container, }: ITimerWidgetPage) => JSX.Element | null>;
|
|
15
16
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { currencyNormalizerCreator, createFixedFloatNormalizer } from './normali
|
|
|
6
6
|
export { LoginModal } from './components/loginModal';
|
|
7
7
|
export { MyTicketsContainer } from './components/myTicketsContainer';
|
|
8
8
|
export { OrderDetailsContainer } from './components/orderDetailsContainer';
|
|
9
|
-
export {
|
|
9
|
+
export { DEFAULT_FEES_STYLE } from './constants/index';
|
|
10
10
|
export { TicketResaleContainer } from './components';
|
|
11
11
|
export { RedirectModal } from './components/common/RedirectModal';
|
|
12
12
|
export { RsvpContainer } from './components/rsvpContainer';
|
|
@@ -22,3 +22,6 @@ export { PoweredBy } from './components/common/PoweredBy';
|
|
|
22
22
|
export { SeatMapContainer } from './components/seatMapContainer';
|
|
23
23
|
export { IDVerification } from './components/idVerificationContainer';
|
|
24
24
|
export { VERIFICATION_STATUSES } from './components/idVerificationContainer/constants';
|
|
25
|
+
export { setConfigs } from './utils/setConfigs';
|
|
26
|
+
export { logoutUser } from './utils/auth';
|
|
27
|
+
export { OrderDetails } from './components/paymentContainer/OrderDetails';
|