tf-checkout-react 1.0.103 → 1.0.106-beta.1
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 +278 -1
- package/dist/api/index.d.ts +3 -1
- package/dist/components/common/CustomField.d.ts +1 -1
- package/dist/components/common/DatePickerField.d.ts +14 -0
- package/dist/components/common/RedirectModal.d.ts +7 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/countdown/index.d.ts +3 -1
- package/dist/components/loginModal/index.d.ts +1 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
- package/dist/components/rsvpContainer/index.d.ts +7 -0
- package/dist/components/ticketResale/index.d.ts +5 -3
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
- package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
- package/dist/components/ticketsContainer/index.d.ts +9 -2
- package/dist/components/timerWidget/index.d.ts +3 -3
- package/dist/images/cross.svg +44 -0
- package/dist/images/done.svg +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +664 -231
- 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 +670 -239
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +89 -89
- package/src/.d.ts +2 -2
- package/src/api/index.ts +300 -278
- package/src/assets/images/cross.svg +44 -0
- package/src/assets/images/done.svg +3 -3
- package/src/components/billing-info-container/index.tsx +811 -799
- package/src/components/billing-info-container/style.css +105 -105
- package/src/components/billing-info-container/utils.ts +225 -224
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +87 -84
- package/src/components/common/DatePickerField.tsx +98 -0
- package/src/components/common/FormikPhoneNumberField.tsx +51 -51
- package/src/components/common/Loader.tsx +9 -9
- package/src/components/common/RadioField.tsx +35 -35
- package/src/components/common/RedirectModal.tsx +43 -0
- package/src/components/common/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +53 -53
- package/src/components/common/index.tsx +4 -4
- package/src/components/confirmModal/index.tsx +51 -51
- package/src/components/confirmModal/style.css +21 -21
- package/src/components/confirmationContainer/config.ts +72 -72
- package/src/components/confirmationContainer/index.tsx +207 -197
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +98 -89
- package/src/components/countdown/style.css +9 -9
- package/src/components/index.ts +7 -7
- package/src/components/loginModal/index.tsx +213 -209
- package/src/components/loginModal/style.css +71 -71
- package/src/components/myTicketsContainer/index.tsx +196 -196
- package/src/components/myTicketsContainer/row.tsx +41 -41
- package/src/components/myTicketsContainer/style.css +39 -39
- package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
- package/src/components/orderDetailsContainer/index.tsx +252 -249
- package/src/components/orderDetailsContainer/style.css +72 -72
- package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
- package/src/components/paymentContainer/index.tsx +285 -284
- package/src/components/registerModal/index.tsx +190 -190
- package/src/components/rsvpContainer/index.tsx +126 -0
- package/src/components/stripePayment/index.tsx +254 -253
- package/src/components/stripePayment/style.css +59 -59
- package/src/components/ticketResale/index.tsx +74 -56
- package/src/components/ticketResaleModal/index.tsx +215 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
- package/src/components/ticketsContainer/TicketRow.tsx +83 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
- package/src/components/ticketsContainer/index.tsx +464 -430
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +87 -70
- package/src/components/timerWidget/style.css +34 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -20
- package/src/index.ts +15 -13
- package/src/normalizers/index.ts +45 -45
- package/src/types/billing-info-data.ts +37 -37
- package/src/types/payment-field.ts +7 -7
- package/src/types/referral-promotion.ts +7 -7
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
- package/src/utils/downloadPDF.tsx +30 -30
- package/src/utils/formikErrorFocus.ts +24 -24
- package/src/utils/getImage.ts +14 -14
- package/src/utils/getQueryVariable.ts +13 -13
- package/src/utils/index.ts +5 -5
- package/src/utils/setConfigs.ts +26 -26
- package/src/utils/showZero.tsx +10 -10
- package/src/validators/index.ts +20 -20
package/README.md
CHANGED
|
@@ -1,5 +1,280 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tf-checkout-react
|
|
2
|
+
|
|
2
3
|
|
|
4
|
+
- [About The Project](#about-the-project)
|
|
5
|
+
- [Getting started](#getting-started)
|
|
6
|
+
- [Prerequisites](#prerequisites)
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Existing project](#existing-project)
|
|
9
|
+
- [Run Independently](#run-independently)
|
|
10
|
+
- [Usage](#usage)
|
|
11
|
+
- [Set configuration](#set-configuration)
|
|
12
|
+
- [Features/Functionalities](#featuresfunctionalities)
|
|
13
|
+
- [Login](#login)
|
|
14
|
+
- [Tickets Container](#tickets-container)
|
|
15
|
+
- [Billing Container](#billing-container)
|
|
16
|
+
- [Checkout Containers](#checkout-containers)
|
|
17
|
+
- [Confirmation Container](#confirmation-container)
|
|
18
|
+
- [Orders Container](#orders-container)
|
|
19
|
+
- [Order Container](#order-container)
|
|
20
|
+
- [Commands](#commands)
|
|
21
|
+
- [Rollup](#rollup)
|
|
22
|
+
- [TypeScript](#typescript)
|
|
23
|
+
- [GitHub Actions](#github-actions)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# About The Project
|
|
27
|
+
|
|
28
|
+
This package containes Ticketfairy checkout functionality. Besides that package provides different functionalities connected with checkout functionality, such as `login/register`, `order management functionality`, `resale functionality`, `referrals functionality`, etc.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Getting started
|
|
32
|
+
## Prerequisites
|
|
33
|
+
- node >= 12.14.1
|
|
34
|
+
- npm >= 6.13.4
|
|
35
|
+
## Installation
|
|
36
|
+
### Existing project
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm i tf-checkout-react
|
|
40
|
+
```
|
|
41
|
+
or
|
|
42
|
+
```
|
|
43
|
+
yarn add tf-checkout-react
|
|
44
|
+
```
|
|
45
|
+
### Run Independently
|
|
46
|
+
|
|
47
|
+
- Clone this repo: `git clone https://github.com/theticketfairy/tf-checkout-react.git`
|
|
48
|
+
- Install dependencies: `npm install`
|
|
49
|
+
- Install example app dependencies: `cd example && npm install`
|
|
50
|
+
- Run example app from example folder: `npm start`
|
|
51
|
+
|
|
52
|
+
Project will run under `localhost:3002`. Port can be changed from `package.json`.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Usage
|
|
57
|
+
|
|
58
|
+
## Set configuration
|
|
59
|
+
|
|
60
|
+
Import `setConfigs` function from the package.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
import { setConfigs } from 'tf-checkout-react'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Call it in the root and pass neccesary options. Here are available options:
|
|
67
|
+
|
|
68
|
+
- BASE_URL - need for making API calls (default: `https://www.ticketfairy.com`)
|
|
69
|
+
- EVENT_ID - only for local testing
|
|
70
|
+
- BRAND_SLUG - only for local testing
|
|
71
|
+
- X_SOURCE_ORIGIN - need for local environment. This header will be included in every API request (ex. `houseofx.nyc`)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Features/Functionalities
|
|
76
|
+
|
|
77
|
+
## Login
|
|
78
|
+
|
|
79
|
+
Used to authenticate user. Import `LoginModal` from package. `LoginModal` component provides login form with validations and error handlings. Also it provides callback functions for every action and API call.
|
|
80
|
+
|
|
81
|
+
### `props`
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
interface Props {
|
|
85
|
+
onClose: () => void;
|
|
86
|
+
onLogin: () => void;
|
|
87
|
+
alreadyHasUser?: boolean;
|
|
88
|
+
userExpired?: boolean;
|
|
89
|
+
onAuthorizeSuccess?: (res: any) => void;
|
|
90
|
+
onAuthorizeError?: (e: AxiosError) => void;
|
|
91
|
+
onGetProfileDataSuccess?: (res: any) => void;
|
|
92
|
+
onGetProfileDataError?: (e: AxiosError) => void;
|
|
93
|
+
modalClassname?: string;
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## Tickets Container
|
|
99
|
+
|
|
100
|
+
Tickets container/component will retrieve and show a list of tickets corresponding to `eventId`. It also containes `PromoCode`, `AccessCode`, `WaitingLsit` and `SessionButtons` functionalities.
|
|
101
|
+
|
|
102
|
+
### `props`
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
interface Props {
|
|
106
|
+
eventId: number;
|
|
107
|
+
getTicketsLabel?: string;
|
|
108
|
+
contentStyle?: React.CSSProperties;
|
|
109
|
+
|
|
110
|
+
onAddToCartSuccess: (response: CartSuccess) => void;
|
|
111
|
+
onAddToCartError: (e: AxiosError) => void;
|
|
112
|
+
onGetTicketsSuccess: (response: any) => void;
|
|
113
|
+
onGetTicketsError: (e: AxiosError) => void;
|
|
114
|
+
onLogoutSuccess: () => void;
|
|
115
|
+
onLogoutError: (e: AxiosError) => void;
|
|
116
|
+
onLoginSuccess: () => void;
|
|
117
|
+
|
|
118
|
+
theme?: 'light' | 'dark';
|
|
119
|
+
themeOptions?: ThemeOptions & {
|
|
120
|
+
input?: CSSProperties;
|
|
121
|
+
checkbox?: CSSProperties;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
queryPromoCode?: string;
|
|
125
|
+
isPromotionsEnabled?: boolean;
|
|
126
|
+
isAccessCodeEnabled?: boolean;
|
|
127
|
+
|
|
128
|
+
hideSessionButtons?: boolean;
|
|
129
|
+
hideWaitingList?: boolean;
|
|
130
|
+
enableBillingInfoAutoCreate?: boolean;
|
|
131
|
+
isButtonScrollable?: boolean;
|
|
132
|
+
sortBySoldOut?: boolean;
|
|
133
|
+
disableCountdownLeadingZero?: boolean;
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Billing Container
|
|
139
|
+
|
|
140
|
+
Billing container provides form for filling user's data. Form contains `user info`, `age` and `ticket holders` sections. Depending on event's requirements billing information form may differ. Form will autofill all available information and in case of all required fields are autofilled, billing page will redirect to payment page. Form submition will automatically register new user, if there is no existing user with provided email.
|
|
141
|
+
|
|
142
|
+
### `props`
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
interface Props {
|
|
146
|
+
data?: IBillingInfoData[];
|
|
147
|
+
ticketHoldersFields?: IBillingInfoData;
|
|
148
|
+
initialValues?: FormikValues;
|
|
149
|
+
handleSubmit?: (
|
|
150
|
+
values: FormikValues,
|
|
151
|
+
formikHelpers: FormikHelpers<FormikValues>,
|
|
152
|
+
eventId: any,
|
|
153
|
+
res: any
|
|
154
|
+
) => void;
|
|
155
|
+
onSubmitError?: (e: AxiosError) => void;
|
|
156
|
+
|
|
157
|
+
onRegisterSuccess?: (value: any) => void;
|
|
158
|
+
onRegisterError?: (e: AxiosError, email: string) => void;
|
|
159
|
+
onGetCartSuccess?: (res: any) => void;
|
|
160
|
+
onGetCartError?: (e: AxiosError) => void;
|
|
161
|
+
onGetCountriesSuccess?: (res: any) => void;
|
|
162
|
+
onGetCountriesError?: (e: AxiosError) => void;
|
|
163
|
+
onGetStatesSuccess?: (res: any) => void;
|
|
164
|
+
onGetStatesError?: (e: AxiosError) => void;
|
|
165
|
+
onGetProfileDataSuccess?: (res: any) => void;
|
|
166
|
+
onGetProfileDataError?: (e: AxiosError) => void;
|
|
167
|
+
onAuthorizeSuccess?: () => void;
|
|
168
|
+
onAuthorizeError?: (e: AxiosError) => void;
|
|
169
|
+
onSkipBillingPage: (data: any) => void;
|
|
170
|
+
onCountdownFinish?: () => void;
|
|
171
|
+
|
|
172
|
+
isLoggedIn?: boolean;
|
|
173
|
+
onLogin?: () => void;
|
|
174
|
+
onLoginSuccess?: () => void;
|
|
175
|
+
onErrorClose?: () => void;
|
|
176
|
+
|
|
177
|
+
theme?: 'light' | 'dark';
|
|
178
|
+
themeOptions?: ThemeOptions & {
|
|
179
|
+
input?: CSSProperties;
|
|
180
|
+
checkbox?: CSSProperties;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
buttonName?: string;
|
|
184
|
+
accountInfoTitle?: string | JSX.Element;
|
|
185
|
+
hideLogo?: boolean;
|
|
186
|
+
hideErrorsAlertSection?: boolean;
|
|
187
|
+
skipPage?: boolean;
|
|
188
|
+
canSkipHolderNames?: boolean;
|
|
189
|
+
shouldFetchCountries?: boolean;
|
|
190
|
+
enableTimer?: boolean;
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Checkout Containers
|
|
196
|
+
|
|
197
|
+
Will show the order details and a card form that the user will need to fill with its card details.
|
|
198
|
+
TicketFairy doesn't store any card related data, we use [Stripe](https://stripe.com/) as payments solution.
|
|
199
|
+
|
|
200
|
+
### `props`
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
interface Props {
|
|
204
|
+
paymentFields: IPaymentField[];
|
|
205
|
+
handlePayment: any;
|
|
206
|
+
checkoutData: any;
|
|
207
|
+
formTitle?: string;
|
|
208
|
+
errorText?: string;
|
|
209
|
+
onErrorClose?: () => void;
|
|
210
|
+
onGetPaymentDataSuccess: (value: any) => void;
|
|
211
|
+
onGetPaymentDataError: (value: AxiosError) => void;
|
|
212
|
+
onPaymentError: (value: AxiosError) => void;
|
|
213
|
+
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
214
|
+
disableZipSection: boolean;
|
|
215
|
+
themeOptions?: ThemeOptions & {
|
|
216
|
+
input?: CSSProperties;
|
|
217
|
+
checkbox?: CSSProperties;
|
|
218
|
+
};
|
|
219
|
+
elementsOptions?: StripeElementsOptions;
|
|
220
|
+
onCountdownFinish?: () => void;
|
|
221
|
+
enableTimer?: boolean;
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## Confirmation Container
|
|
227
|
+
|
|
228
|
+
This is shown once the payment is successfully completed, could show components to share the purchase in social media or refer it with friends to get discounts on the purchase.
|
|
229
|
+
|
|
230
|
+
### `props`
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
interface Props {
|
|
234
|
+
isReferralEnabled: boolean;
|
|
235
|
+
showDefaultShareButtons: boolean;
|
|
236
|
+
messengerAppId: string;
|
|
237
|
+
shareButtons: IShareButton[];
|
|
238
|
+
orderHash?: string;
|
|
239
|
+
|
|
240
|
+
onGetConfirmationDataSuccess: (res: any) => void;
|
|
241
|
+
onGetConfirmationDataError: (e: AxiosError) => void;
|
|
242
|
+
onLinkCopied: () => void;
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
## Orders Container
|
|
248
|
+
|
|
249
|
+
Will show the purchased orders for the logged user.
|
|
250
|
+
|
|
251
|
+
### `props`
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
interface Props {
|
|
255
|
+
handleDetailsInfo: (id: string) => void;
|
|
256
|
+
onGetOrdersSuccess: (res: any) => void;
|
|
257
|
+
onGetOrdersError: (err: any) => void;
|
|
258
|
+
|
|
259
|
+
theme?: 'light' | 'dark';
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
## Order Container
|
|
265
|
+
|
|
266
|
+
Will show the purchased order details. Contains `order PDF download` and `ticket resale` functionalities. Currently both functionalities are enabled by default.
|
|
267
|
+
|
|
268
|
+
### `props`
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
interface Props {
|
|
272
|
+
onGetOrderSuccess: (res: any) => void;
|
|
273
|
+
onGetOrderError: (err: any) => void;
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
|
|
3
278
|
## Commands
|
|
4
279
|
|
|
5
280
|
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
|
|
@@ -24,10 +299,12 @@ The default example imports and live reloads whatever is in `/dist`, so if you a
|
|
|
24
299
|
|
|
25
300
|
To do a one-off build, use `npm run build` or `yarn build`.
|
|
26
301
|
|
|
302
|
+
|
|
27
303
|
### Rollup
|
|
28
304
|
|
|
29
305
|
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
|
30
306
|
|
|
307
|
+
|
|
31
308
|
### TypeScript
|
|
32
309
|
|
|
33
310
|
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
package/dist/api/index.d.ts
CHANGED
|
@@ -31,5 +31,7 @@ export declare const getConditions: (eventId: string) => Promise<import("axios")
|
|
|
31
31
|
export declare const resaleTicket: (data: any, hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
32
32
|
export declare const removeFromResale: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
33
33
|
export declare const postReferralVisits: (eventId: string, referralId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const processTicket: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
35
|
+
export declare const declineInvitation: (hash: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
36
|
+
export declare const sendRSVPInfo: (eventId: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
35
37
|
export {};
|
|
@@ -16,5 +16,5 @@ export interface ICustomField {
|
|
|
16
16
|
interface IOtherProps {
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
}
|
|
19
|
-
export declare const CustomField: ({ label, type, field, selectOptions, form: { touched, errors, submitCount }, theme, }: ICustomField & IOtherProps) => JSX.Element;
|
|
19
|
+
export declare const CustomField: ({ label, type, field, selectOptions, form: { touched, errors, submitCount }, theme, inputProps: pInputProps, InputProps, inputRef, }: ICustomField & IOtherProps) => JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldInputProps, FormikProps } from 'formik';
|
|
3
|
+
export interface IDatePickerFieldProps {
|
|
4
|
+
label: string;
|
|
5
|
+
field: FieldInputProps<any>;
|
|
6
|
+
form: FormikProps<any>;
|
|
7
|
+
theme: 'dark' | 'light';
|
|
8
|
+
useCompact?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IOtherProps {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export declare const DatePickerField: ({ label, field, form, theme, useCompact, }: IDatePickerFieldProps & IOtherProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -8,6 +8,7 @@ export interface IShareButton {
|
|
|
8
8
|
shareData: any;
|
|
9
9
|
}
|
|
10
10
|
export interface IConfirmationPage {
|
|
11
|
+
copyIcon?: boolean;
|
|
11
12
|
isReferralEnabled: boolean;
|
|
12
13
|
showDefaultShareButtons: boolean;
|
|
13
14
|
messengerAppId: string;
|
|
@@ -17,4 +18,4 @@ export interface IConfirmationPage {
|
|
|
17
18
|
onLinkCopied: () => void;
|
|
18
19
|
orderHash?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare const ConfirmationContainer: ({ isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
|
|
21
|
+
export declare const ConfirmationContainer: ({ copyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied }: IConfirmationPage) => JSX.Element;
|
|
@@ -5,7 +5,9 @@ interface CountdownTypes {
|
|
|
5
5
|
timezone?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
message?: string;
|
|
8
|
+
disableLeadingZero?: boolean;
|
|
8
9
|
callback?: () => void;
|
|
10
|
+
isLoggedIn?: boolean;
|
|
9
11
|
}
|
|
10
|
-
declare function Countdown({ startDate, timezone, title, message, callback }: CountdownTypes): JSX.Element;
|
|
12
|
+
declare function Countdown({ startDate, timezone, title, message, disableLeadingZero, callback, isLoggedIn }: CountdownTypes): JSX.Element;
|
|
11
13
|
export default Countdown;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
3
|
export interface ITicketResaleContainer {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
onProcessTicketSuccess: (res: any) => void;
|
|
5
|
+
onProcessTicketError: (e: AxiosError) => void;
|
|
6
|
+
onDeclineTicketPurchaseSuccess: (res: any) => void;
|
|
7
|
+
onDeclineTicketPurchaseError: (e: AxiosError) => void;
|
|
6
8
|
orderHash?: string;
|
|
7
9
|
}
|
|
8
|
-
export declare const TicketResaleContainer: ({
|
|
10
|
+
export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, }: ITicketResaleContainer) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IAccessCodeSectionProps {
|
|
3
|
+
code: string;
|
|
4
|
+
setCode: (value: string) => void;
|
|
5
|
+
updateTickets: (value: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const AccessCodeSection: ({ code, setCode, updateTickets }: IAccessCodeSectionProps) => JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface IPromoCodeSectionProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
code: string;
|
|
4
|
+
codeIsApplied: boolean;
|
|
5
5
|
showPromoInput: boolean;
|
|
6
|
-
|
|
7
|
-
isAllTicketsSoldOut: boolean;
|
|
8
|
-
isAccessCodeEnabled?: boolean;
|
|
9
|
-
isPromoLoading?: boolean;
|
|
10
|
-
setPromoCode: (value: string) => void;
|
|
11
|
-
setPromoCodeUpdated: (value: string) => void;
|
|
6
|
+
setCode: (value: string) => void;
|
|
12
7
|
setShowPromoInput: (value: boolean) => void;
|
|
8
|
+
updateTickets: (value: boolean) => void;
|
|
13
9
|
}
|
|
14
|
-
export declare const PromoCodeSection: ({
|
|
10
|
+
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets }: IPromoCodeSectionProps) => JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import './style.css';
|
|
3
3
|
interface ITicketsSectionProps {
|
|
4
4
|
ticketsList: any;
|
|
5
5
|
selectedTickets: any;
|
|
6
6
|
handleTicketSelect: any;
|
|
7
|
-
|
|
7
|
+
codeIsApplied: boolean;
|
|
8
|
+
sortBySoldOut: boolean;
|
|
9
|
+
ticketsHeaderComponent?: ReactNode;
|
|
10
|
+
hideTicketsHeader: boolean;
|
|
8
11
|
}
|
|
9
|
-
export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect,
|
|
12
|
+
export declare const TicketsSection: ({ ticketsList, selectedTickets, handleTicketSelect, codeIsApplied, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader }: ITicketsSectionProps) => JSX.Element;
|
|
10
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { ThemeOptions } from '@mui/material';
|
|
@@ -10,6 +10,7 @@ interface CartSuccess {
|
|
|
10
10
|
phone_required: boolean;
|
|
11
11
|
event_id: string;
|
|
12
12
|
hash?: string;
|
|
13
|
+
total?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface IGetTickets {
|
|
15
16
|
eventId: number;
|
|
@@ -31,6 +32,12 @@ export interface IGetTickets {
|
|
|
31
32
|
hideSessionButtons?: boolean;
|
|
32
33
|
hideWaitingList?: boolean;
|
|
33
34
|
isButtonScrollable?: boolean;
|
|
35
|
+
sortBySoldOut?: boolean;
|
|
36
|
+
disableCountdownLeadingZero?: boolean;
|
|
37
|
+
isLoggedIn?: boolean;
|
|
38
|
+
actionsSectionComponent?: any;
|
|
39
|
+
ticketsHeaderComponent?: ReactNode;
|
|
40
|
+
hideTicketsHeader?: boolean;
|
|
34
41
|
}
|
|
35
42
|
export interface ITicket {
|
|
36
43
|
id: string | number;
|
|
@@ -39,5 +46,5 @@ export interface ITicket {
|
|
|
39
46
|
export interface ISelectedTickets {
|
|
40
47
|
[key: string]: string | number;
|
|
41
48
|
}
|
|
42
|
-
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable }: IGetTickets) => JSX.Element;
|
|
49
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader }: IGetTickets) => JSX.Element;
|
|
43
50
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style.css';
|
|
3
3
|
export interface ITimerWidgetPage {
|
|
4
4
|
expires_at: number;
|
|
@@ -11,5 +11,5 @@ export interface IRenderer {
|
|
|
11
11
|
completed: number;
|
|
12
12
|
handleCountdownFinish: () => void;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export default
|
|
14
|
+
declare const _default: React.MemoExoticComponent<({ expires_at, buyLoading, onCountdownFinish, }: ITimerWidgetPage) => JSX.Element | null>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="94.926px" height="94.926px" viewBox="0 0 94.926 94.926" style="enable-background:new 0 0 94.926 94.926;"
|
|
6
|
+
xml:space="preserve">
|
|
7
|
+
<g>
|
|
8
|
+
<path d="M55.931,47.463L94.306,9.09c0.826-0.827,0.826-2.167,0-2.994L88.833,0.62C88.436,0.224,87.896,0,87.335,0
|
|
9
|
+
c-0.562,0-1.101,0.224-1.498,0.62L47.463,38.994L9.089,0.62c-0.795-0.795-2.202-0.794-2.995,0L0.622,6.096
|
|
10
|
+
c-0.827,0.827-0.827,2.167,0,2.994l38.374,38.373L0.622,85.836c-0.827,0.827-0.827,2.167,0,2.994l5.473,5.476
|
|
11
|
+
c0.397,0.396,0.936,0.62,1.498,0.62s1.1-0.224,1.497-0.62l38.374-38.374l38.374,38.374c0.397,0.396,0.937,0.62,1.498,0.62
|
|
12
|
+
s1.101-0.224,1.498-0.62l5.473-5.476c0.826-0.827,0.826-2.167,0-2.994L55.931,47.463z"/>
|
|
13
|
+
</g>
|
|
14
|
+
<g>
|
|
15
|
+
</g>
|
|
16
|
+
<g>
|
|
17
|
+
</g>
|
|
18
|
+
<g>
|
|
19
|
+
</g>
|
|
20
|
+
<g>
|
|
21
|
+
</g>
|
|
22
|
+
<g>
|
|
23
|
+
</g>
|
|
24
|
+
<g>
|
|
25
|
+
</g>
|
|
26
|
+
<g>
|
|
27
|
+
</g>
|
|
28
|
+
<g>
|
|
29
|
+
</g>
|
|
30
|
+
<g>
|
|
31
|
+
</g>
|
|
32
|
+
<g>
|
|
33
|
+
</g>
|
|
34
|
+
<g>
|
|
35
|
+
</g>
|
|
36
|
+
<g>
|
|
37
|
+
</g>
|
|
38
|
+
<g>
|
|
39
|
+
</g>
|
|
40
|
+
<g>
|
|
41
|
+
</g>
|
|
42
|
+
<g>
|
|
43
|
+
</g>
|
|
44
|
+
</svg>
|
package/dist/images/done.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z" fill="#569F44"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z" fill="#569F44"/>
|
|
3
|
+
</svg>
|
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,5 @@ export { MyTicketsContainer } from './components/myTicketsContainer';
|
|
|
8
8
|
export { OrderDetailsContainer } from './components/orderDetailsContainer';
|
|
9
9
|
export { setConfigs } from './utils/setConfigs';
|
|
10
10
|
export { TicketResaleContainer } from './components';
|
|
11
|
+
export { RedirectModal } from './components/common/RedirectModal';
|
|
12
|
+
export { RsvpContainer } from './components/rsvpContainer';
|