tf-checkout-react 1.0.56 → 1.0.60
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 +2 -0
- package/dist/components/confirmationContainer/index.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/myTicketsContainer/index.d.ts +9 -0
- package/dist/components/myTicketsContainer/row.d.ts +15 -0
- package/dist/components/myTicketsContainer/tableConfig.d.ts +5 -0
- package/dist/components/orderDetailsContainer/index.d.ts +8 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +6 -0
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/env.d.ts +2 -2
- package/{src/components/billing-info-container → dist/images}/logo-ttf.png +0 -0
- package/dist/tf-checkout-react.cjs.development.js +43 -16
- 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 +48 -67
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -0
- package/dist/utils/getImage.d.ts +1 -0
- package/package.json +2 -5
- package/src/.d.ts +2 -0
- package/src/api/index.ts +6 -1
- package/src/assets/images/logo-ttf.png +0 -0
- package/src/components/billing-info-container/index.tsx +4 -3
- package/src/components/confirmationContainer/index.tsx +3 -2
- package/src/components/index.ts +2 -0
- package/src/components/loginModal/index.tsx +1 -0
- package/src/components/myTicketsContainer/index.tsx +125 -0
- package/src/components/myTicketsContainer/row.tsx +41 -0
- package/src/components/myTicketsContainer/style.css +40 -0
- package/src/components/myTicketsContainer/tableConfig.tsx +34 -0
- package/src/components/orderDetailsContainer/index.tsx +120 -0
- package/src/components/orderDetailsContainer/style.css +53 -0
- package/src/components/orderDetailsContainer/ticketsTable.tsx +86 -0
- package/src/components/ticketsContainer/index.tsx +3 -1
- package/src/components/waitingList/index.tsx +1 -1
- package/src/components/waitingList/style.css +1 -0
- package/src/env.ts +2 -2
- package/src/utils/getImage.ts +14 -0
- package/dist/tf-checkout-react.cjs.development.css +0 -8
package/dist/api/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ 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 getOrders: (page: number, limit: number, eventSlug: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
|
+
export declare const getOrderDetails: (orderId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
25
|
export declare const addToWaitingList: (id: number, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
26
|
export declare const getConditions: (eventId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
27
|
export {};
|
|
@@ -21,4 +21,4 @@ export interface IConfirmationPage {
|
|
|
21
21
|
onGetConfirmationDataSuccess: (res: any) => void;
|
|
22
22
|
onGetConfirmationDataError: (e: AxiosError) => void;
|
|
23
23
|
}
|
|
24
|
-
export declare const ConfirmationContainer: ({ referralPromotions, shareButtons, shareLink, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
|
|
24
|
+
export declare const ConfirmationContainer: ({ isReferralEnabled, referralPromotions, shareButtons, shareLink, onGetConfirmationDataSuccess, onGetConfirmationDataError, }: IConfirmationPage) => JSX.Element;
|
|
@@ -2,3 +2,5 @@ export { BillingInfoContainer } from './billing-info-container';
|
|
|
2
2
|
export { ConfirmationContainer } from './confirmationContainer';
|
|
3
3
|
export { PaymentContainer } from './paymentContainer';
|
|
4
4
|
export { TicketsContainer } from './ticketsContainer';
|
|
5
|
+
export { MyTicketsContainer } from './myTicketsContainer';
|
|
6
|
+
export { OrderDetailsContainer } from './orderDetailsContainer';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface MyTicketsTypes {
|
|
4
|
+
handleDetailsInfo: (id: string) => void;
|
|
5
|
+
onGetOrdersSuccess: (res: any) => void;
|
|
6
|
+
onGetOrdersError: (err: any) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const MyTicketsContainer: ({ handleDetailsInfo, onGetOrdersSuccess, onGetOrdersError }: MyTicketsTypes) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface RowItems {
|
|
3
|
+
id: string;
|
|
4
|
+
date: string;
|
|
5
|
+
image: string;
|
|
6
|
+
eventName: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
currency: string;
|
|
9
|
+
}
|
|
10
|
+
interface RowPropsTypes {
|
|
11
|
+
row: RowItems;
|
|
12
|
+
handleDetailsInfo: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const Row: ({ row, handleDetailsInfo }: RowPropsTypes) => JSX.Element;
|
|
15
|
+
export default Row;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './style.css';
|
|
3
|
+
interface OrderDetailsTypes {
|
|
4
|
+
onGetOrdersSuccess: (res: any) => void;
|
|
5
|
+
onGetOrdersError: (err: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const OrderDetailsContainer: ({ onGetOrdersSuccess, onGetOrdersError }: OrderDetailsTypes) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -16,6 +16,7 @@ export interface IGetTickets {
|
|
|
16
16
|
onGetTicketsSuccess: (response: any) => void;
|
|
17
17
|
onGetTicketsError: (e: AxiosError) => void;
|
|
18
18
|
theme?: 'light' | 'dark';
|
|
19
|
+
queryPromoCode?: string;
|
|
19
20
|
}
|
|
20
21
|
export interface ITicket {
|
|
21
22
|
id: string | number;
|
|
@@ -24,5 +25,5 @@ export interface ITicket {
|
|
|
24
25
|
export interface ISelectedTickets {
|
|
25
26
|
[key: string]: string | number;
|
|
26
27
|
}
|
|
27
|
-
export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, }: IGetTickets) => JSX.Element;
|
|
28
|
+
export declare const TicketsContainer: ({ getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, theme, queryPromoCode }: IGetTickets) => JSX.Element;
|
|
28
29
|
export {};
|
package/dist/env.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ENV: {
|
|
2
2
|
EVENT_ID: number;
|
|
3
3
|
BASE_URL: string;
|
|
4
4
|
CLIENT_ID: string;
|
|
5
5
|
CLIENT_SECRET: string;
|
|
6
6
|
STRIPE_PUBLISHABLE_KEY: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const ENV_PROD: {
|
|
9
9
|
EVENT_ID: number;
|
|
10
10
|
BASE_URL: string;
|
|
11
11
|
CLIENT_ID: string;
|
|
File without changes
|
|
@@ -915,14 +915,13 @@ var emailValidator = function emailValidator(email) {
|
|
|
915
915
|
};
|
|
916
916
|
|
|
917
917
|
// preview1
|
|
918
|
-
|
|
919
918
|
var ENV = {
|
|
920
|
-
EVENT_ID:
|
|
921
|
-
BASE_URL: 'https://
|
|
922
|
-
CLIENT_ID: '
|
|
919
|
+
EVENT_ID: 3483,
|
|
920
|
+
BASE_URL: 'https://preview1.ttf.fluxtech.me/api',
|
|
921
|
+
CLIENT_ID: '4792a61f2fcb49197ab4c2d2f44df570',
|
|
923
922
|
CLIENT_SECRET: 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9',
|
|
924
|
-
STRIPE_PUBLISHABLE_KEY: '
|
|
925
|
-
};
|
|
923
|
+
STRIPE_PUBLISHABLE_KEY: 'pk_test_51H4BkOGqveRD6EShliLrT9vd7mPOBPvQSuqmvc3wIinDqxWsCLeS2N7HonPPn6MhjU35ayYy5v4I6MLlD4jNWrd000NSgAF6UL'
|
|
924
|
+
}; // prod
|
|
926
925
|
|
|
927
926
|
var isWindowDefined = typeof window !== 'undefined';
|
|
928
927
|
var ttfHeaders = {
|
|
@@ -1255,7 +1254,11 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
1255
1254
|
onSubmit: props.handleSubmit
|
|
1256
1255
|
}, React__default.createElement("div", {
|
|
1257
1256
|
className: "modal-title"
|
|
1258
|
-
}, "Login"), React__default.createElement("
|
|
1257
|
+
}, "Login"), React__default.createElement("img", {
|
|
1258
|
+
className: "login-logo-tff",
|
|
1259
|
+
src: "https://www.ticketfairy.com/resources/images/logo-ttf-black.svg",
|
|
1260
|
+
alt: ""
|
|
1261
|
+
}), React__default.createElement("div", {
|
|
1259
1262
|
className: "server_auth__error"
|
|
1260
1263
|
}, error), alreadyHasUser && React__default.createElement("p", {
|
|
1261
1264
|
className: "info-text-for-login"
|
|
@@ -1849,6 +1852,22 @@ var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
|
|
|
1849
1852
|
|
|
1850
1853
|
var ErrorFocus = /*#__PURE__*/formik.connect(ErrorFocusInternal);
|
|
1851
1854
|
|
|
1855
|
+
var getImage = function getImage(name) {
|
|
1856
|
+
if (name === void 0) {
|
|
1857
|
+
name = '';
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
var image = '';
|
|
1861
|
+
|
|
1862
|
+
if (!name.trim().length) {
|
|
1863
|
+
return image;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
return image;
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1869
|
+
var TTFLOGO = /*#__PURE__*/getImage('logo-ttf.png');
|
|
1870
|
+
|
|
1852
1871
|
var LogicRunner = function LogicRunner(_ref) {
|
|
1853
1872
|
var values = _ref.values,
|
|
1854
1873
|
setStates = _ref.setStates,
|
|
@@ -2429,7 +2448,12 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2429
2448
|
onLogin();
|
|
2430
2449
|
setShowModalLogin(true);
|
|
2431
2450
|
}
|
|
2432
|
-
}, "Login")
|
|
2451
|
+
}, "Login"), React__default.createElement("div", {
|
|
2452
|
+
className: "logo-image-container"
|
|
2453
|
+
}, React__default.createElement("img", {
|
|
2454
|
+
src: TTFLOGO,
|
|
2455
|
+
alt: "nodata"
|
|
2456
|
+
})))), _map(dataWithUniqueIds, function (item) {
|
|
2433
2457
|
var label = item.label,
|
|
2434
2458
|
labelClassName = item.labelClassName,
|
|
2435
2459
|
fields = item.fields;
|
|
@@ -3129,7 +3153,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3129
3153
|
|
|
3130
3154
|
var defaultSvg = 'https://img.icons8.com/ios-filled/50/000000/facebook-new.svg';
|
|
3131
3155
|
var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
3132
|
-
var
|
|
3156
|
+
var isReferralEnabled = _ref.isReferralEnabled,
|
|
3157
|
+
_ref$referralPromotio = _ref.referralPromotions,
|
|
3133
3158
|
referralPromotions = _ref$referralPromotio === void 0 ? [] : _ref$referralPromotio,
|
|
3134
3159
|
_ref$shareButtons = _ref.shareButtons,
|
|
3135
3160
|
shareButtons = _ref$shareButtons === void 0 ? [] : _ref$shareButtons,
|
|
@@ -3200,7 +3225,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
3200
3225
|
className: "main"
|
|
3201
3226
|
}, "Your tickets have been emailed to you"), React__default.createElement("span", {
|
|
3202
3227
|
className: "helper"
|
|
3203
|
-
}, "Please bring them with you to the event")), data.disable_referral === false && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
3228
|
+
}, "Please bring them with you to the event")), data.disable_referral === false && isReferralEnabled && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
3204
3229
|
className: "referral_text_image_section"
|
|
3205
3230
|
}, React__default.createElement("div", {
|
|
3206
3231
|
className: "referral_text_section"
|
|
@@ -3511,13 +3536,13 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
3511
3536
|
|
|
3512
3537
|
return React__default.createElement("div", {
|
|
3513
3538
|
className: "waiting-list"
|
|
3514
|
-
}, React__default.createElement("
|
|
3515
|
-
className: "no-tickets-text"
|
|
3516
|
-
}, "No tickets are currently available for this event."), showSuccessMessage ? React__default.createElement("div", {
|
|
3539
|
+
}, showSuccessMessage ? React__default.createElement("div", {
|
|
3517
3540
|
className: "success-message"
|
|
3518
3541
|
}, React__default.createElement("p", {
|
|
3519
3542
|
className: "added-success-message"
|
|
3520
|
-
}, "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("
|
|
3543
|
+
}, "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("p", {
|
|
3544
|
+
className: "no-tickets-text"
|
|
3545
|
+
}, "No tickets are currently available for this event."), React__default.createElement("h2", null, "WAITING LIST"), React__default.createElement(formik.Formik, {
|
|
3521
3546
|
initialValues: {
|
|
3522
3547
|
ticketTypeId: '',
|
|
3523
3548
|
quantity: '',
|
|
@@ -3607,7 +3632,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3607
3632
|
_ref$onGetTicketsErro = _ref.onGetTicketsError,
|
|
3608
3633
|
onGetTicketsError = _ref$onGetTicketsErro === void 0 ? function () {} : _ref$onGetTicketsErro,
|
|
3609
3634
|
_ref$theme = _ref.theme,
|
|
3610
|
-
theme = _ref$theme === void 0 ? 'light' : _ref$theme
|
|
3635
|
+
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
3636
|
+
_ref$queryPromoCode = _ref.queryPromoCode,
|
|
3637
|
+
queryPromoCode = _ref$queryPromoCode === void 0 ? '' : _ref$queryPromoCode;
|
|
3611
3638
|
|
|
3612
3639
|
var _useState = React.useState({}),
|
|
3613
3640
|
selectedTickets = _useState[0],
|
|
@@ -3633,7 +3660,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
3633
3660
|
promoCode = _useState6[0],
|
|
3634
3661
|
setPromoCode = _useState6[1];
|
|
3635
3662
|
|
|
3636
|
-
var _useState7 = React.useState(
|
|
3663
|
+
var _useState7 = React.useState(queryPromoCode),
|
|
3637
3664
|
promoCodeUpdated = _useState7[0],
|
|
3638
3665
|
setPromoCodeUpdated = _useState7[1];
|
|
3639
3666
|
|