tf-checkout-react 1.0.45 → 1.0.46
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/utils.d.ts +1 -1
- package/dist/components/common/CheckboxField.d.ts +2 -2
- package/dist/components/ticketsContainer/TicketRow.d.ts +10 -0
- package/dist/components/ticketsContainer/TicketsSection.d.ts +10 -0
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/components/ticketsContainer/utils.d.ts +4 -0
- package/dist/components/waitingList/index.d.ts +7 -0
- package/dist/tf-checkout-react.cjs.development.css +2 -1
- package/dist/tf-checkout-react.cjs.development.js +273 -62
- 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 +279 -65
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/validators/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/api/index.ts +3 -1
- package/src/components/.DS_Store +0 -0
- package/src/components/billing-info-container/index.tsx +18 -11
- package/src/components/billing-info-container/utils.ts +3 -2
- package/src/components/common/CheckboxField.tsx +3 -2
- package/src/components/common/CustomField.tsx +1 -1
- package/src/components/ticketsContainer/TicketRow.tsx +86 -0
- package/src/components/ticketsContainer/TicketsSection.tsx +82 -0
- package/src/components/ticketsContainer/index.tsx +82 -208
- package/src/components/ticketsContainer/utils.ts +11 -0
- package/src/components/waitingList/index.tsx +162 -0
- package/src/components/waitingList/style.css +18 -0
- package/src/validators/index.ts +9 -3
package/dist/api/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export declare const getProfileData: (accessToken: any) => Promise<import("axios
|
|
|
20
20
|
export declare const getCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
21
21
|
export declare const getConfirmationData: (orderHash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
22
22
|
export declare const getStates: (countryId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
|
+
export declare const addToWaitingList: (id: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
24
|
export {};
|
|
@@ -6,7 +6,7 @@ export interface ILoggedInValues {
|
|
|
6
6
|
export interface IValues {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}
|
|
9
|
-
export declare const getInitialValues: (data?: any, propsInitialValues?: IValues) => IValues;
|
|
9
|
+
export declare const getInitialValues: (data?: any, propsInitialValues?: IValues, userValues?: any) => IValues;
|
|
10
10
|
export declare const createRegisterFormData: (values?: IValues) => FormData;
|
|
11
11
|
interface ICheckoutBody {
|
|
12
12
|
attributes: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FieldInputProps } from 'formik';
|
|
3
3
|
export interface ICheckboxField {
|
|
4
|
-
label: string;
|
|
4
|
+
label: string | number | JSX.Element;
|
|
5
5
|
field: FieldInputProps<any>;
|
|
6
6
|
}
|
|
7
7
|
interface IOtherProps {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
|
-
export declare const CheckboxField: ({ label, field, }: ICheckboxField & IOtherProps) => JSX.Element;
|
|
10
|
+
export declare const CheckboxField: ({ label, field, ...rest }: ICheckboxField & IOtherProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface ITicketRowProps {
|
|
4
|
+
ticketTier: any;
|
|
5
|
+
prevTicketTier: any;
|
|
6
|
+
selectedTickets: any;
|
|
7
|
+
handleTicketSelect: any;
|
|
8
|
+
}
|
|
9
|
+
export declare const TicketRow: ({ ticketTier, prevTicketTier, selectedTickets, handleTicketSelect, }: ITicketRowProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface ITicketsSectionProps {
|
|
4
|
+
ticketsList: any;
|
|
5
|
+
selectedTickets: any;
|
|
6
|
+
handleTicketSelect: any;
|
|
7
|
+
promoCodeIsApplied: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, promoCodeIsApplied, }: ITicketsSectionProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export interface IGetTickets {
|
|
|
14
14
|
onAddToCartError: (e: AxiosError) => void;
|
|
15
15
|
onGetTicketsSuccess: (response: any) => void;
|
|
16
16
|
onGetTicketsError: (e: AxiosError) => void;
|
|
17
|
+
theme?: 'light' | 'dark';
|
|
17
18
|
}
|
|
18
19
|
export interface ITicket {
|
|
19
20
|
id: string | number;
|
|
@@ -22,5 +23,5 @@ export interface ITicket {
|
|
|
22
23
|
export interface ISelectedTickets {
|
|
23
24
|
[key: string]: string | number;
|
|
24
25
|
}
|
|
25
|
-
export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, }: IGetTickets) => JSX.Element;
|
|
26
|
+
export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, }: IGetTickets) => JSX.Element;
|
|
26
27
|
export {};
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
.style_payment_page__1PUd8{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_payment_page__1PUd8 .style_order_info_section__J1olw{padding:15px 0}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4{padding-bottom:15px;padding-top:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_field-underline__2M8Bd{border-bottom:1px solid #000;padding-bottom:15px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_title__1MBgS{font-size:14px;font-weight:700;padding-bottom:3px}.style_payment_page__1PUd8 .style_order_info_section__J1olw .style_order_info_block__3kZN4 .style_order_info_text__3gSEK{font-size:16px;line-height:1.15;outline:none}.style_payment_page__1PUd8 .style_MuiBox-root__2LeaA{margin-left:auto;margin-right:auto;padding:20px;text-align:center}.style_payment_page__1PUd8 .style_payment_info_label__3Zmjp{padding:20px 0;text-align:center}.style_payment_page__1PUd8 .style_payment_form__2arf4{color:#fff;padding:20px}.style_payment_page__1PUd8 .style_payment_form__2arf4 input,.style_payment_page__1PUd8 .style_payment_form__2arf4 label{color:#fff}.style_payment_page__1PUd8 .style_payment_button__3WzAn{padding-top:20px;text-align:center}
|
|
5
5
|
.style_card_form_inner__7vzGq{background:#232323;border-radius:8px;padding:15px}.style_card_form_inner__7vzGq .style_card_label_text__F7GFa{color:#fff}.style_card_form_inner__7vzGq .style_StripeElement__jS5TJ{margin:5px 0 10px}.style_card_label_text__F7GFa{color:#fff}.style_payment_button__2rkp8{padding-top:15px;text-align:center}.style_payment_button__2rkp8 button{background-color:#212529;border-radius:8px;color:#fff;cursor:pointer;font-size:26px;padding:15px 30px;transition:opacity .5s;width:200px}.style_payment_button__2rkp8 button:hover{opacity:.7}.style_checkout_error_block__3LUN5{color:#e53935;font-weight:600;padding:15px 0}.style_zip_element__31oFa p{margin-bottom:0}.style_zip_element__31oFa input{background-color:#232323;border:none;color:#fff;font-size:18px;margin-top:5px;outline:none;width:100%}
|
|
6
6
|
.style_confirmation-page__1F9Sh{margin:0 auto;max-width:1024px}.style_confirmation-page__1F9Sh .style_strong-text__27fPG{font-weight:700}.style_confirmation-page__1F9Sh .style_title__2Al5H{color:#333;font-size:24px;font-weight:600}.style_confirmation-page__1F9Sh .style_share-message-section__3tRfP{background:#dff0d8;border:1px solid #d6e9c6;border-radius:5px;color:#2c7221;display:flex;flex-direction:column;margin:20px 0;padding:15px}.style_confirmation-page__1F9Sh .style_main__3LBFA{font-size:15px;font-weight:700}.style_confirmation-page__1F9Sh .style_helper__3L5l6,.style_confirmation-page__1F9Sh .style_main__3LBFA{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif}.style_confirmation-page__1F9Sh .style_helper__3L5l6{font-size:14px;margin-top:5px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin:20px -10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text_section__3dvbC{margin:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_title_text__1zFZX{color:#f08057;font-size:28px;padding-bottom:10px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe .style_referral_text__2tAKA{font-size:18px}.style_confirmation-page__1F9Sh .style_referral_text_image_section__1shCe img{margin:10px;max-width:200px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz{-moz-column-gap:5rem;column-gap:5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_invitation_title__x4iqi{font-size:22px;padding-bottom:12px;padding-top:12px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z{flex:1 1;padding:0 5px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT{display:grid;flex-wrap:wrap;margin:0 -7px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share_buttons__2C4eT .style_social-media-btns__2kCat .style_sharing-btn__IVnek{min-width:130px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ.style_share-by-link-copy__25qUa{padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-button__3R2yU{flex:1 1}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_convenient_buttons__2RFH8.style_sharing-btn__IVnek{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J{background:#000;color:#fff;padding:0}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-by-link__2B83J.style_label__3FIno{margin:0;padding:0;text-align:left}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_sharing-btn__IVnek{flex:1 1;padding:7px;text-align:center}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ{background:#000;color:#fff;padding:10px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_svg_wrapper__268DZ{display:inline}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-btn-inner__2HBGQ .style_share-input__2Pp7g{background-color:#fff;text-align:left;width:300px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_share_section__2XjM2 .style_invitation_section__1xH0Z .style_share-text__V36JV{display:block;font-size:13px;font-weight:600;padding-top:8px;width:100%}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf{background:#e3e3e3;border:1px solid #dcdcdc;display:grid;grid-template-columns:1fr 1fr;margin:10px 0;padding:15px}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_wrapper__1aDnf.style_free_price__3Hd0-{background:#e9835b;border:1px solid #eb7b4a;color:#fff}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_label__3SVoy{font-weight:600}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_sublabel__2Ckqd{font-size:14px;font-weight:100}.style_confirmation-page__1F9Sh .style_share_wrapper__3JrMz .style_pricing-section_price__3v8bL{font-weight:600;text-align:right}
|
|
7
|
-
body{margin:0;padding:0}.style_get-tickets-page__11KeR{width:100%}.style_event-detail__tier__2CcMs{background-color:#fff;padding:17px 35px 20px}.style_event-detail__tier-name__116US{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.style_event-detail__tier-status__IbqO1{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.style_event-tickets-container__3vdaQ{align-items:center;display:flex;justify-content:space-between}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u.style_true__g6yhC{background-color:#c1c3c6;border-color:#afb0b1}.style_event-detail__tier-price__3doIb{color:#000;font-family:Inter-Bold;font-size:1.5rem;font-weight:700;line-height:1;text-align:center}.style_event-detail__tier-price__3doIb p{margin:0}.style_event-detail__tier-price__3doIb .style_fees__19QjH{font-size:14px;font-weight:400;margin-top:4px;text-align:left}.style_event-detail__tier-price__3doIb .style_old-price__2mSOJ{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.style_alert-info__24Mx5{background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;font-size:1em;margin:0 35px;padding:8px 15px;text-align:center;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.style_event-detail__tier-state__2ethF{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.style_promo-code-block__ttqVr input{font-size:14px;padding:1px 8px}.style_book-button__1krJI{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.style_book-button__1krJI:hover{background-color:#505050;border-color:#505050}.style_loader-container__3iPe2{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar{width:5px}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-track{background:#f1f1f1}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb{background:#888}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb:hover{background:#555}.style_get-tickets__3Sghy .style_get-tickets__selectbox__2ApAj{width:100%}.style_disabled__310xq{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_hidden__ceCor{display:none}
|
|
7
|
+
body{margin:0;padding:0}.style_get-tickets-page__11KeR{width:100%}.style_event-detail__tier__2CcMs{background-color:#fff;padding:17px 35px 20px}.style_event-detail__tier-name__116US{color:#000;font-family:Inter-Bold;font-family:Bebas Neue;font-size:.85rem;font-weight:700;letter-spacing:.2em;line-height:1.3;margin-bottom:8px;margin-top:16px;padding-right:20%;text-transform:uppercase}.style_event-detail__tier-status__IbqO1{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;margin-top:8px;width:100%}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;font-weight:700;letter-spacing:.2em;line-height:1.5;margin-bottom:10px;width:200px}.style_event-tickets-container__3vdaQ{align-items:center;display:flex;justify-content:space-between}.style_event-detail__tier-status__IbqO1.style_ticket-button__Nty1u.style_true__g6yhC{background-color:#c1c3c6;border-color:#afb0b1}.style_event-detail__tier-price__3doIb{color:#000;font-family:Inter-Bold;font-size:1.5rem;font-weight:700;line-height:1;text-align:center}.style_event-detail__tier-price__3doIb p{margin:0}.style_event-detail__tier-price__3doIb .style_fees__19QjH{font-size:14px;font-weight:400;margin-top:4px;text-align:left}.style_event-detail__tier-price__3doIb .style_old-price__2mSOJ{color:red;font-size:1.3rem;margin-bottom:5px;text-decoration:line-through}.style_alert-info__24Mx5{background-color:#d9edf7;border:1px solid #bce8f1;border-radius:4px;color:#3a87ad;font-size:1em;margin:0 35px;padding:8px 15px;text-align:center;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.style_event-detail__tier-state__2ethF{color:#30bc9d;font-family:Inter-Bold;font-size:.75rem;font-weight:300;line-height:1;text-align:right;text-transform:uppercase}.style_promo-code-block__ttqVr input{font-size:14px;padding:1px 8px}.style_book-button__1krJI{background-color:#212529;border:3px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-size:26px;font-weight:700;height:50px;letter-spacing:.2em;line-height:1.5;margin:25px auto 10px;text-align:center;width:100%}.style_book-button__1krJI:hover{background-color:#505050;border-color:#505050}.style_loader-container__3iPe2{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar{width:5px}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-track{background:#f1f1f1}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb{background:#888}.style_get-tickets-paper__3ZF-f::-webkit-scrollbar-thumb:hover{background:#555}.style_get-tickets__3Sghy .style_get-tickets__selectbox__2ApAj{width:100%}.style_disabled__310xq{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.style_hidden__ceCor{display:none}
|
|
8
|
+
.style_waiting-list__2sJxM{padding:17px 35px 20px}.style_waiting-list__2sJxM .style_field-item__34MYc{margin-bottom:30px}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2{width:100%!important}.style_waiting-list__2sJxM .style_waiting-list-button__tO7D2:hover{background-color:#505050}.style_waiting-list__2sJxM .style_success-message__BvF3R h3{margin:10px 0}.style_waiting-list__2sJxM .style_success-message__BvF3R p{margin:0}
|
|
@@ -29,18 +29,17 @@ var reactStripeJs = require('@stripe/react-stripe-js');
|
|
|
29
29
|
var stripeJs = require('@stripe/stripe-js');
|
|
30
30
|
var CircularProgress = _interopDefault(require('@mui/material/CircularProgress'));
|
|
31
31
|
var SVG = _interopDefault(require('react-inlinesvg'));
|
|
32
|
-
var _sortBy = _interopDefault(require('lodash/sortBy'));
|
|
33
|
-
var _has = _interopDefault(require('lodash/has'));
|
|
34
32
|
var _some = _interopDefault(require('lodash/some'));
|
|
35
33
|
var _find = _interopDefault(require('lodash/find'));
|
|
36
34
|
var _isEmpty = _interopDefault(require('lodash/isEmpty'));
|
|
37
|
-
var
|
|
38
|
-
var
|
|
35
|
+
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
36
|
+
var jwt_decode = _interopDefault(require('jwt-decode'));
|
|
37
|
+
var _sortBy = _interopDefault(require('lodash/sortBy'));
|
|
38
|
+
var _has = _interopDefault(require('lodash/has'));
|
|
39
39
|
var FormControl = _interopDefault(require('@mui/material/FormControl'));
|
|
40
40
|
var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
41
41
|
var Select = _interopDefault(require('@mui/material/Select'));
|
|
42
|
-
var Button = _interopDefault(require('
|
|
43
|
-
var jwt_decode = _interopDefault(require('jwt-decode'));
|
|
42
|
+
var Button$1 = _interopDefault(require('@mui/material/Button'));
|
|
44
43
|
|
|
45
44
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
46
45
|
try {
|
|
@@ -871,6 +870,7 @@ try {
|
|
|
871
870
|
}
|
|
872
871
|
});
|
|
873
872
|
|
|
873
|
+
var emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
874
874
|
var combineValidators = function combineValidators() {
|
|
875
875
|
for (var _len = arguments.length, validators = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
876
876
|
validators[_key] = arguments[_key];
|
|
@@ -879,19 +879,22 @@ var combineValidators = function combineValidators() {
|
|
|
879
879
|
return function () {
|
|
880
880
|
for (var i = 0; i < validators.length; ++i) {
|
|
881
881
|
var error_message = validators[i].apply(validators, arguments);
|
|
882
|
-
if (error_message
|
|
882
|
+
if (error_message) return error_message;
|
|
883
883
|
}
|
|
884
884
|
};
|
|
885
885
|
};
|
|
886
|
-
var requiredValidator = function requiredValidator(value) {
|
|
886
|
+
var requiredValidator = function requiredValidator(value, message) {
|
|
887
887
|
var errorMessage = '';
|
|
888
888
|
|
|
889
889
|
if (!value) {
|
|
890
|
-
errorMessage = 'Required';
|
|
890
|
+
errorMessage = message || 'Required';
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
return errorMessage;
|
|
894
894
|
};
|
|
895
|
+
var emailValidator = function emailValidator(email) {
|
|
896
|
+
return !emailRegex.test(email) ? 'Please enter a valid email address' : '';
|
|
897
|
+
};
|
|
895
898
|
|
|
896
899
|
// preview1
|
|
897
900
|
|
|
@@ -1068,6 +1071,9 @@ var getConfirmationData = function getConfirmationData(orderHash) {
|
|
|
1068
1071
|
var getStates = function getStates(countryId) {
|
|
1069
1072
|
return publicRequest.get("/countries/" + countryId + "/states/");
|
|
1070
1073
|
};
|
|
1074
|
+
var addToWaitingList = function addToWaitingList(id, data) {
|
|
1075
|
+
return publicRequest.post("/v1/event/" + id + "/add_to_waiting_list", data);
|
|
1076
|
+
};
|
|
1071
1077
|
|
|
1072
1078
|
var style = {
|
|
1073
1079
|
position: 'absolute',
|
|
@@ -1467,7 +1473,7 @@ var RegisterModal = function RegisterModal(_ref) {
|
|
|
1467
1473
|
};
|
|
1468
1474
|
|
|
1469
1475
|
var _excluded = ["firstName", "lastName", "holderAge", "confirmEmail", "confirmPassword"];
|
|
1470
|
-
var getInitialValues = function getInitialValues(data, propsInitialValues) {
|
|
1476
|
+
var getInitialValues = function getInitialValues(data, propsInitialValues, userValues) {
|
|
1471
1477
|
if (data === void 0) {
|
|
1472
1478
|
data = [];
|
|
1473
1479
|
}
|
|
@@ -1476,6 +1482,10 @@ var getInitialValues = function getInitialValues(data, propsInitialValues) {
|
|
|
1476
1482
|
propsInitialValues = {};
|
|
1477
1483
|
}
|
|
1478
1484
|
|
|
1485
|
+
if (userValues === void 0) {
|
|
1486
|
+
userValues = {};
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1479
1489
|
var results = _flatMapDeep(data, function (_ref) {
|
|
1480
1490
|
var fields = _ref.fields;
|
|
1481
1491
|
return _map(fields, function (_ref2) {
|
|
@@ -1490,7 +1500,7 @@ var getInitialValues = function getInitialValues(data, propsInitialValues) {
|
|
|
1490
1500
|
var initialValues = {};
|
|
1491
1501
|
|
|
1492
1502
|
_forEach(results, function (item) {
|
|
1493
|
-
initialValues[item] = propsInitialValues[item] || '';
|
|
1503
|
+
initialValues[item] = propsInitialValues[item] || userValues[item] || '';
|
|
1494
1504
|
});
|
|
1495
1505
|
|
|
1496
1506
|
return initialValues;
|
|
@@ -1643,16 +1653,20 @@ var CustomField = function CustomField(_ref) {
|
|
|
1643
1653
|
}, field), isSelectField ? _map(selectOptions, function (option) {
|
|
1644
1654
|
return React__default.createElement("option", {
|
|
1645
1655
|
key: option.value,
|
|
1646
|
-
value: option.value
|
|
1656
|
+
value: option.value,
|
|
1657
|
+
disabled: option.disabled
|
|
1647
1658
|
}, option.label);
|
|
1648
1659
|
}) : null);
|
|
1649
1660
|
};
|
|
1650
1661
|
|
|
1662
|
+
var _excluded$1 = ["label", "field"];
|
|
1651
1663
|
var CheckboxField = function CheckboxField(_ref) {
|
|
1652
1664
|
var label = _ref.label,
|
|
1653
|
-
field = _ref.field
|
|
1665
|
+
field = _ref.field,
|
|
1666
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1667
|
+
|
|
1654
1668
|
return React__default.createElement(FormGroup, null, React__default.createElement(FormControlLabel, {
|
|
1655
|
-
control: React__default.createElement(Checkbox, Object.assign({}, field)),
|
|
1669
|
+
control: React__default.createElement(Checkbox, Object.assign({}, field, rest)),
|
|
1656
1670
|
label: label
|
|
1657
1671
|
}));
|
|
1658
1672
|
};
|
|
@@ -2050,7 +2064,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref4) {
|
|
|
2050
2064
|
lastName: lastNameLogged,
|
|
2051
2065
|
country: 1,
|
|
2052
2066
|
brand_opt_in: optedInFieldValue
|
|
2053
|
-
})),
|
|
2067
|
+
}), userValues),
|
|
2054
2068
|
enableReinitialize: true,
|
|
2055
2069
|
onSubmit: function () {
|
|
2056
2070
|
var _onSubmit = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(values, formikHelpers) {
|
|
@@ -3019,10 +3033,14 @@ var getTicketSelectOptions = function getTicketSelectOptions(maxCount, minCount,
|
|
|
3019
3033
|
return options;
|
|
3020
3034
|
};
|
|
3021
3035
|
|
|
3022
|
-
var
|
|
3023
|
-
var
|
|
3024
|
-
|
|
3025
|
-
|
|
3036
|
+
var TicketRow = function TicketRow(_ref) {
|
|
3037
|
+
var ticketTier = _ref.ticketTier,
|
|
3038
|
+
prevTicketTier = _ref.prevTicketTier,
|
|
3039
|
+
selectedTickets = _ref.selectedTickets,
|
|
3040
|
+
handleTicketSelect = _ref.handleTicketSelect;
|
|
3041
|
+
var soldOutMessage = ticketTier.soldOutMessage ? ("" + ticketTier.soldOutMessage).toUpperCase() : 'SOLD OUT';
|
|
3042
|
+
var isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded || !_has(ticketTier, 'maxQuantity') || ticketTier.maxQuantity === 0;
|
|
3043
|
+
var options = getTicketSelectOptions(ticketTier.maxQuantity, ticketTier.minQuantity, ticketTier.multiplier);
|
|
3026
3044
|
var onSaleContent = isSalesClosed ? null : React__default.createElement("div", {
|
|
3027
3045
|
className: "get-tickets"
|
|
3028
3046
|
}, React__default.createElement(Box, {
|
|
@@ -3030,7 +3048,7 @@ var computeTierStateLabel = function computeTierStateLabel(tier, prevTier, selec
|
|
|
3030
3048
|
}, React__default.createElement(FormControl, {
|
|
3031
3049
|
fullWidth: true
|
|
3032
3050
|
}, React__default.createElement(Select, {
|
|
3033
|
-
value: selectedTickets[
|
|
3051
|
+
value: selectedTickets[ticketTier.id] ? selectedTickets[ticketTier.id] : 0,
|
|
3034
3052
|
onChange: handleTicketSelect,
|
|
3035
3053
|
displayEmpty: true,
|
|
3036
3054
|
inputProps: {
|
|
@@ -3050,51 +3068,234 @@ var computeTierStateLabel = function computeTierStateLabel(tier, prevTier, selec
|
|
|
3050
3068
|
value: option.value
|
|
3051
3069
|
}, option.value);
|
|
3052
3070
|
})))));
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
if (
|
|
3056
|
-
|
|
3057
|
-
|
|
3071
|
+
var returnValue = '';
|
|
3072
|
+
|
|
3073
|
+
if (ticketTier.sold_out || !ticketTier.displayTicket || ticketTier.soldOut) {
|
|
3074
|
+
returnValue = soldOutMessage;
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
if (!+ticketTier.cost && !+ticketTier.price) {
|
|
3078
|
+
returnValue = 'FREE';
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
if (ticketTier.displayTicket) {
|
|
3082
|
+
returnValue = onSaleContent;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
if (_get(prevTicketTier, 'in_stock')) {
|
|
3086
|
+
returnValue = 'SOON';
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
return React__default.createElement(React__default.Fragment, null, returnValue, " ");
|
|
3058
3090
|
};
|
|
3059
3091
|
|
|
3060
|
-
var
|
|
3061
|
-
var
|
|
3092
|
+
var TicketsSection = function TicketsSection(_ref) {
|
|
3093
|
+
var ticketsList = _ref.ticketsList,
|
|
3094
|
+
selectedTickets = _ref.selectedTickets,
|
|
3095
|
+
handleTicketSelect = _ref.handleTicketSelect,
|
|
3096
|
+
promoCodeIsApplied = _ref.promoCodeIsApplied;
|
|
3097
|
+
|
|
3098
|
+
var sortedTicketsList = _sortBy(ticketsList, 'sortOrder');
|
|
3062
3099
|
|
|
3063
|
-
|
|
3064
|
-
var isSoldOut =
|
|
3100
|
+
return React__default.createElement(React__default.Fragment, null, sortedTicketsList.map(function (ticket, i, arr) {
|
|
3101
|
+
var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
|
|
3065
3102
|
|
|
3066
3103
|
var ticketSelect = function ticketSelect(event) {
|
|
3067
3104
|
var value = event.target.value;
|
|
3068
|
-
handleTicketSelect(
|
|
3105
|
+
handleTicketSelect(ticket.id, value);
|
|
3069
3106
|
};
|
|
3070
3107
|
|
|
3071
3108
|
var ticketIsDiscounted = false;
|
|
3072
3109
|
|
|
3073
|
-
if (
|
|
3110
|
+
if (ticket.oldPrice && promoCodeIsApplied && !isSoldOut && ticket.oldPrice !== ticket.price) {
|
|
3074
3111
|
ticketIsDiscounted = true;
|
|
3075
3112
|
}
|
|
3076
3113
|
|
|
3077
3114
|
return React__default.createElement("div", {
|
|
3078
|
-
key:
|
|
3115
|
+
key: ticket.id || ticket.name,
|
|
3079
3116
|
className: "event-detail__tier " + (isSoldOut ? 'disabled' : '')
|
|
3080
3117
|
}, React__default.createElement("div", {
|
|
3081
3118
|
className: "event-detail__tier-name"
|
|
3082
|
-
},
|
|
3119
|
+
}, ticket.displayName || ticket.name), React__default.createElement("div", {
|
|
3083
3120
|
className: "event-tickets-container"
|
|
3084
3121
|
}, React__default.createElement("div", {
|
|
3085
3122
|
className: "event-detail__tier-price"
|
|
3086
3123
|
}, ticketIsDiscounted && React__default.createElement("p", {
|
|
3087
3124
|
className: "old-price"
|
|
3088
|
-
}, "$ ", (+
|
|
3089
|
-
className:
|
|
3090
|
-
},
|
|
3125
|
+
}, "$ ", (+ticket.oldPrice).toFixed(2)), React__default.createElement("p", null, isSoldOut ? 'SOLD OUT' : "$ " + (+ticket.cost || +ticket.price).toFixed(2)), !isSoldOut && React__default.createElement("p", {
|
|
3126
|
+
className: "fees"
|
|
3127
|
+
}, ticket.taxesIncluded ? '(incl. Fees)' : '(excl. Fees)')), React__default.createElement("div", {
|
|
3091
3128
|
className: "event-detail__tier-state",
|
|
3092
3129
|
style: {
|
|
3093
3130
|
minWidth: 55
|
|
3094
3131
|
}
|
|
3095
|
-
},
|
|
3132
|
+
}, React__default.createElement(TicketRow, {
|
|
3133
|
+
ticketTier: ticket,
|
|
3134
|
+
prevTicketTier: arr[i - 1],
|
|
3135
|
+
selectedTickets: selectedTickets,
|
|
3136
|
+
handleTicketSelect: ticketSelect
|
|
3137
|
+
}))));
|
|
3138
|
+
}));
|
|
3139
|
+
};
|
|
3140
|
+
|
|
3141
|
+
var generateQuantity = function generateQuantity(n) {
|
|
3142
|
+
var quantityList = [];
|
|
3143
|
+
|
|
3144
|
+
for (var i = 1; i <= n; i++) {
|
|
3145
|
+
quantityList.push({
|
|
3146
|
+
label: i,
|
|
3147
|
+
value: i
|
|
3148
|
+
});
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
return quantityList;
|
|
3152
|
+
};
|
|
3153
|
+
|
|
3154
|
+
var WaitingList = function WaitingList(_ref) {
|
|
3155
|
+
var _ref$tickets = _ref.tickets,
|
|
3156
|
+
tickets = _ref$tickets === void 0 ? {} : _ref$tickets;
|
|
3157
|
+
|
|
3158
|
+
var _useState = React.useState(false),
|
|
3159
|
+
showSuccessMessage = _useState[0],
|
|
3160
|
+
setShowSuccessMessage = _useState[1];
|
|
3161
|
+
|
|
3162
|
+
var _useState2 = React.useState(false),
|
|
3163
|
+
loading = _useState2[0],
|
|
3164
|
+
setLoading = _useState2[1];
|
|
3165
|
+
|
|
3166
|
+
var ticketTypesList = Object.values(tickets).map(function (d) {
|
|
3167
|
+
return {
|
|
3168
|
+
label: d.displayName,
|
|
3169
|
+
value: d.id
|
|
3170
|
+
};
|
|
3096
3171
|
});
|
|
3097
|
-
|
|
3172
|
+
|
|
3173
|
+
var handleSubmit = /*#__PURE__*/function () {
|
|
3174
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(values) {
|
|
3175
|
+
var id, requestData, _yield$addToWaitingLi, data;
|
|
3176
|
+
|
|
3177
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
3178
|
+
while (1) {
|
|
3179
|
+
switch (_context.prev = _context.next) {
|
|
3180
|
+
case 0:
|
|
3181
|
+
_context.prev = 0;
|
|
3182
|
+
setLoading(true);
|
|
3183
|
+
id = ENV.EVENT_ID;
|
|
3184
|
+
requestData = {
|
|
3185
|
+
data: {
|
|
3186
|
+
attributes: values
|
|
3187
|
+
}
|
|
3188
|
+
};
|
|
3189
|
+
_context.next = 6;
|
|
3190
|
+
return addToWaitingList(id, requestData);
|
|
3191
|
+
|
|
3192
|
+
case 6:
|
|
3193
|
+
_yield$addToWaitingLi = _context.sent;
|
|
3194
|
+
data = _yield$addToWaitingLi.data;
|
|
3195
|
+
|
|
3196
|
+
if (data.success) {
|
|
3197
|
+
setShowSuccessMessage(true);
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
_context.next = 14;
|
|
3201
|
+
break;
|
|
3202
|
+
|
|
3203
|
+
case 11:
|
|
3204
|
+
_context.prev = 11;
|
|
3205
|
+
_context.t0 = _context["catch"](0);
|
|
3206
|
+
console.log(_context.t0);
|
|
3207
|
+
|
|
3208
|
+
case 14:
|
|
3209
|
+
_context.prev = 14;
|
|
3210
|
+
setLoading(false);
|
|
3211
|
+
return _context.finish(14);
|
|
3212
|
+
|
|
3213
|
+
case 17:
|
|
3214
|
+
case "end":
|
|
3215
|
+
return _context.stop();
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
}, _callee, null, [[0, 11, 14, 17]]);
|
|
3219
|
+
}));
|
|
3220
|
+
|
|
3221
|
+
return function handleSubmit(_x) {
|
|
3222
|
+
return _ref2.apply(this, arguments);
|
|
3223
|
+
};
|
|
3224
|
+
}();
|
|
3225
|
+
|
|
3226
|
+
return React__default.createElement("div", {
|
|
3227
|
+
className: "waiting-list"
|
|
3228
|
+
}, showSuccessMessage ? React__default.createElement("div", {
|
|
3229
|
+
className: "success-message"
|
|
3230
|
+
}, React__default.createElement("h3", null, "You've been added to the waiting list!"), React__default.createElement("p", null, "You'll be notified if tickets become available.")) : React__default.createElement(React__default.Fragment, null, React__default.createElement("h2", null, "WAITING LIST"), React__default.createElement(formik.Formik, {
|
|
3231
|
+
initialValues: {
|
|
3232
|
+
ticketTypeId: '',
|
|
3233
|
+
quantity: '',
|
|
3234
|
+
firstName: '',
|
|
3235
|
+
lastName: '',
|
|
3236
|
+
email: ''
|
|
3237
|
+
},
|
|
3238
|
+
onSubmit: handleSubmit
|
|
3239
|
+
}, React__default.createElement(formik.Form, null, React__default.createElement("div", {
|
|
3240
|
+
className: "field-item"
|
|
3241
|
+
}, React__default.createElement(formik.Field, {
|
|
3242
|
+
name: "ticketTypeId",
|
|
3243
|
+
label: "Ticket types",
|
|
3244
|
+
type: "select",
|
|
3245
|
+
component: CustomField,
|
|
3246
|
+
selectOptions: [{
|
|
3247
|
+
label: 'Type of Ticket',
|
|
3248
|
+
value: '',
|
|
3249
|
+
disabled: true
|
|
3250
|
+
}].concat(ticketTypesList)
|
|
3251
|
+
})), React__default.createElement("div", {
|
|
3252
|
+
className: "field-item"
|
|
3253
|
+
}, React__default.createElement(formik.Field, {
|
|
3254
|
+
name: "quantity",
|
|
3255
|
+
label: "Quantity",
|
|
3256
|
+
type: "select",
|
|
3257
|
+
component: CustomField,
|
|
3258
|
+
selectOptions: [{
|
|
3259
|
+
label: 'Quantity Requested',
|
|
3260
|
+
value: '',
|
|
3261
|
+
disabled: true
|
|
3262
|
+
}].concat(generateQuantity(10))
|
|
3263
|
+
})), React__default.createElement("div", {
|
|
3264
|
+
className: "field-item"
|
|
3265
|
+
}, React__default.createElement(formik.Field, {
|
|
3266
|
+
name: "firstName",
|
|
3267
|
+
label: "First name",
|
|
3268
|
+
validate: function validate(value) {
|
|
3269
|
+
return requiredValidator(value, 'Please enter your First name');
|
|
3270
|
+
},
|
|
3271
|
+
component: CustomField
|
|
3272
|
+
})), React__default.createElement("div", {
|
|
3273
|
+
className: "field-item"
|
|
3274
|
+
}, React__default.createElement(formik.Field, {
|
|
3275
|
+
name: "lastName",
|
|
3276
|
+
label: "Last name",
|
|
3277
|
+
validate: function validate(value) {
|
|
3278
|
+
return requiredValidator(value, 'Please enter your Last name');
|
|
3279
|
+
},
|
|
3280
|
+
component: CustomField
|
|
3281
|
+
})), React__default.createElement("div", {
|
|
3282
|
+
className: "field-item"
|
|
3283
|
+
}, React__default.createElement(formik.Field, {
|
|
3284
|
+
name: "email",
|
|
3285
|
+
label: "Email",
|
|
3286
|
+
validate: combineValidators(function (value) {
|
|
3287
|
+
return requiredValidator(value, 'Please enter your Email');
|
|
3288
|
+
}, function (value) {
|
|
3289
|
+
return emailValidator(value);
|
|
3290
|
+
}),
|
|
3291
|
+
component: CustomField
|
|
3292
|
+
})), React__default.createElement(Button$1, {
|
|
3293
|
+
type: "submit",
|
|
3294
|
+
variant: "contained",
|
|
3295
|
+
className: "waiting-list-button"
|
|
3296
|
+
}, loading ? React__default.createElement(CircularProgress, {
|
|
3297
|
+
size: "22px"
|
|
3298
|
+
}) : 'ADD TO WAITING LIST')))));
|
|
3098
3299
|
};
|
|
3099
3300
|
|
|
3100
3301
|
function Loader() {
|
|
@@ -3114,7 +3315,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3114
3315
|
_ref$onGetTicketsSucc = _ref.onGetTicketsSuccess,
|
|
3115
3316
|
onGetTicketsSuccess = _ref$onGetTicketsSucc === void 0 ? function () {} : _ref$onGetTicketsSucc,
|
|
3116
3317
|
_ref$onGetTicketsErro = _ref.onGetTicketsError,
|
|
3117
|
-
onGetTicketsError = _ref$onGetTicketsErro === void 0 ? function () {} : _ref$onGetTicketsErro
|
|
3318
|
+
onGetTicketsError = _ref$onGetTicketsErro === void 0 ? function () {} : _ref$onGetTicketsErro,
|
|
3319
|
+
_ref$theme = _ref.theme,
|
|
3320
|
+
theme = _ref$theme === void 0 ? 'light' : _ref$theme;
|
|
3118
3321
|
|
|
3119
3322
|
var _useState = React.useState({}),
|
|
3120
3323
|
selectedTickets = _useState[0],
|
|
@@ -3125,28 +3328,32 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3125
3328
|
setTickets = _useState2[1];
|
|
3126
3329
|
|
|
3127
3330
|
var _useState3 = React.useState(false),
|
|
3128
|
-
|
|
3129
|
-
|
|
3331
|
+
showWaitingList = _useState3[0],
|
|
3332
|
+
setShowWaitingList = _useState3[1];
|
|
3130
3333
|
|
|
3131
3334
|
var _useState4 = React.useState(false),
|
|
3132
|
-
|
|
3133
|
-
|
|
3335
|
+
isLoading = _useState4[0],
|
|
3336
|
+
setIsLoading = _useState4[1];
|
|
3134
3337
|
|
|
3135
|
-
var _useState5 = React.useState(
|
|
3136
|
-
|
|
3137
|
-
|
|
3338
|
+
var _useState5 = React.useState(false),
|
|
3339
|
+
handleBookIsLoading = _useState5[0],
|
|
3340
|
+
setHandleBookIsLoading = _useState5[1];
|
|
3138
3341
|
|
|
3139
3342
|
var _useState6 = React.useState(''),
|
|
3140
|
-
|
|
3141
|
-
|
|
3343
|
+
promoCode = _useState6[0],
|
|
3344
|
+
setPromoCode = _useState6[1];
|
|
3142
3345
|
|
|
3143
|
-
var _useState7 = React.useState(
|
|
3144
|
-
|
|
3145
|
-
|
|
3346
|
+
var _useState7 = React.useState(''),
|
|
3347
|
+
promoCodeUpdated = _useState7[0],
|
|
3348
|
+
setPromoCodeUpdated = _useState7[1];
|
|
3146
3349
|
|
|
3147
3350
|
var _useState8 = React.useState(false),
|
|
3148
|
-
|
|
3149
|
-
|
|
3351
|
+
showPromoInput = _useState8[0],
|
|
3352
|
+
setShowPromoInput = _useState8[1];
|
|
3353
|
+
|
|
3354
|
+
var _useState9 = React.useState(false),
|
|
3355
|
+
promoCodeIsApplied = _useState9[0],
|
|
3356
|
+
setPromoCodeIsApplied = _useState9[1];
|
|
3150
3357
|
|
|
3151
3358
|
React.useEffect(function () {
|
|
3152
3359
|
if (typeof window !== 'undefined') {
|
|
@@ -3169,8 +3376,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3169
3376
|
|
|
3170
3377
|
function _getTicketsApi() {
|
|
3171
3378
|
_getTicketsApi = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
3172
|
-
var response, attributes
|
|
3173
|
-
|
|
3379
|
+
var response, attributes;
|
|
3174
3380
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3175
3381
|
while (1) {
|
|
3176
3382
|
switch (_context.prev = _context.next) {
|
|
@@ -3187,10 +3393,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3187
3393
|
setCustomHeader(response);
|
|
3188
3394
|
attributes = _get(response, 'data.data.attributes');
|
|
3189
3395
|
setPromoCodeIsApplied(attributes.ValidPromoCode);
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
});
|
|
3193
|
-
setTickets(_tickets);
|
|
3396
|
+
setTickets(_get(attributes, 'tickets'));
|
|
3397
|
+
setShowWaitingList(attributes.showWaitingList);
|
|
3194
3398
|
onGetTicketsSuccess(response.data);
|
|
3195
3399
|
}
|
|
3196
3400
|
|
|
@@ -3313,9 +3517,16 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3313
3517
|
return !(item.sold_out || item.soldOut);
|
|
3314
3518
|
});
|
|
3315
3519
|
return React__default.createElement("div", {
|
|
3316
|
-
className: "get-tickets-page",
|
|
3520
|
+
className: "get-tickets-page " + theme,
|
|
3317
3521
|
style: contentStyle
|
|
3318
|
-
}, isLoading ? React__default.createElement(Loader, null) : React__default.createElement(
|
|
3522
|
+
}, isLoading ? React__default.createElement(Loader, null) : React__default.createElement(React__default.Fragment, null, showWaitingList ? React__default.createElement(WaitingList, {
|
|
3523
|
+
tickets: tickets
|
|
3524
|
+
}) : React__default.createElement("div", null, React__default.createElement(TicketsSection, {
|
|
3525
|
+
ticketsList: tickets,
|
|
3526
|
+
selectedTickets: selectedTickets,
|
|
3527
|
+
handleTicketSelect: handleTicketSelect,
|
|
3528
|
+
promoCodeIsApplied: promoCodeIsApplied
|
|
3529
|
+
}), promoCodeIsApplied ? React__default.createElement("div", {
|
|
3319
3530
|
className: "alert-info"
|
|
3320
3531
|
}, "Your promo code was applied successfully.") : null, showPromoInput && React__default.createElement("div", {
|
|
3321
3532
|
className: "promo-code-block"
|
|
@@ -3350,7 +3561,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3350
3561
|
"aria-hidden": true,
|
|
3351
3562
|
className: "book-button " + (handleBookIsLoading || _isEmpty(selectedTickets) || Object.values(selectedTickets)[0] === 0 ? 'disabled' : ''),
|
|
3352
3563
|
onClick: !handleBookIsLoading && !_isEmpty(selectedTickets) && Object.values(selectedTickets)[0] > 0 ? handleBook : function () {}
|
|
3353
|
-
}, getTicketsLabel || 'GET TICKETS')));
|
|
3564
|
+
}, getTicketsLabel || 'GET TICKETS'))));
|
|
3354
3565
|
};
|
|
3355
3566
|
|
|
3356
3567
|
exports.BillingInfoContainer = BillingInfoContainer;
|