tf-checkout-react 1.3.28 → 1.3.29
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/components/addonsContainer/index.d.ts +1 -2
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +1 -2
- package/dist/components/ticketsContainer/index.d.ts +1 -2
- package/dist/tf-checkout-react.cjs.development.js +32 -45
- 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 +32 -45
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +9 -0
- package/src/components/addonsContainer/index.tsx +12 -31
- package/src/components/billing-info-container/index.tsx +2 -2
- package/src/components/loginModal/index.tsx +2 -2
- package/src/components/signupModal/index.tsx +1 -1
- package/src/components/ticketsContainer/PromoCodeSection.tsx +2 -4
- package/src/components/ticketsContainer/TicketsSection.tsx +2 -2
- package/src/components/ticketsContainer/index.tsx +0 -3
|
@@ -10,9 +10,8 @@ export interface IAddonContainterProps {
|
|
|
10
10
|
onConfirmSelectionSuccess?: (res: any) => void;
|
|
11
11
|
onConfirmSelectionError?: (error: any) => void;
|
|
12
12
|
onCountdownFinish?: () => void;
|
|
13
|
-
samePageBilling?: boolean;
|
|
14
13
|
}
|
|
15
14
|
export interface ObjectLiteral {
|
|
16
15
|
[key: string]: any;
|
|
17
16
|
}
|
|
18
|
-
export declare const AddonsContainter: ({ classNamePrefix, enableBillingInfoAutoCreate, enableTimer, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, onPostCheckoutSuccess, onPostCheckoutError, onConfirmSelectionSuccess, onConfirmSelectionError, onCountdownFinish,
|
|
17
|
+
export declare const AddonsContainter: ({ classNamePrefix, enableBillingInfoAutoCreate, enableTimer, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, onPostCheckoutSuccess, onPostCheckoutError, onConfirmSelectionSuccess, onConfirmSelectionError, onCountdownFinish, }: IAddonContainterProps) => JSX.Element;
|
|
@@ -9,6 +9,5 @@ export interface IPromoCodeSectionProps {
|
|
|
9
9
|
setCodeIsApplied: (value: boolean) => void;
|
|
10
10
|
codeIsInvalid: boolean;
|
|
11
11
|
setCodeIsInvalid: (value: boolean) => void;
|
|
12
|
-
promoText?: string;
|
|
13
12
|
}
|
|
14
|
-
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied, codeIsInvalid, setCodeIsInvalid
|
|
13
|
+
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied, codeIsInvalid, setCodeIsInvalid }: IPromoCodeSectionProps) => JSX.Element;
|
|
@@ -51,7 +51,6 @@ export interface IGetTickets {
|
|
|
51
51
|
enableInfluencersSection?: boolean;
|
|
52
52
|
enableAddOns?: boolean;
|
|
53
53
|
ordersPath?: string;
|
|
54
|
-
promoText?: string;
|
|
55
54
|
}
|
|
56
55
|
export interface ITicket {
|
|
57
56
|
id: string | number;
|
|
@@ -60,5 +59,5 @@ export interface ITicket {
|
|
|
60
59
|
export interface ISelectedTickets {
|
|
61
60
|
[key: string]: string | number;
|
|
62
61
|
}
|
|
63
|
-
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath,
|
|
62
|
+
export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, }: IGetTickets) => JSX.Element;
|
|
64
63
|
export {};
|
|
@@ -67,7 +67,6 @@ var TablePagination = _interopDefault(require('@mui/material/TablePagination'));
|
|
|
67
67
|
var TableRow = _interopDefault(require('@mui/material/TableRow'));
|
|
68
68
|
var _has = _interopDefault(require('lodash/has'));
|
|
69
69
|
var Radio = _interopDefault(require('@mui/material/Radio'));
|
|
70
|
-
var lodash = require('lodash');
|
|
71
70
|
var _isNull = _interopDefault(require('lodash/isNull'));
|
|
72
71
|
var _reverse = _interopDefault(require('lodash/reverse'));
|
|
73
72
|
|
|
@@ -1231,6 +1230,8 @@ publicRequest.interceptors.response.use(function (response) {
|
|
|
1231
1230
|
return Promise.reject(error);
|
|
1232
1231
|
});
|
|
1233
1232
|
publicRequest.interceptors.request.use(function (config) {
|
|
1233
|
+
var _document$cookie;
|
|
1234
|
+
|
|
1234
1235
|
var guestToken = isWindowDefined ? window.localStorage.getItem('auth_guest_token') : null;
|
|
1235
1236
|
var userData = isWindowDefined ? window.localStorage.getItem('user_data') : null;
|
|
1236
1237
|
var accessToken = isWindowDefined ? window.localStorage.getItem('access_token') : null;
|
|
@@ -1261,14 +1262,24 @@ publicRequest.interceptors.request.use(function (config) {
|
|
|
1261
1262
|
config.headers = _updatedHeaders2;
|
|
1262
1263
|
}
|
|
1263
1264
|
|
|
1264
|
-
|
|
1265
|
+
var additionalCookiesHeaderValue = (_document$cookie = document.cookie) != null ? _document$cookie : '';
|
|
1266
|
+
|
|
1267
|
+
if (additionalCookiesHeaderValue !== '') {
|
|
1265
1268
|
var _updatedHeaders3 = _extends({}, config.headers, {
|
|
1266
|
-
'
|
|
1269
|
+
'Additional-Cookies': additionalCookiesHeaderValue
|
|
1267
1270
|
});
|
|
1268
1271
|
|
|
1269
1272
|
config.headers = _updatedHeaders3;
|
|
1270
1273
|
}
|
|
1271
1274
|
|
|
1275
|
+
if (CONFIGS.X_SOURCE_ORIGIN) {
|
|
1276
|
+
var _updatedHeaders4 = _extends({}, config.headers, {
|
|
1277
|
+
'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
config.headers = _updatedHeaders4;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1272
1283
|
if (CONFIGS.BASE_URL) {
|
|
1273
1284
|
config.baseURL = CONFIGS.BASE_URL + '/api';
|
|
1274
1285
|
}
|
|
@@ -2311,7 +2322,7 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
2311
2322
|
onSubmit: props.handleSubmit
|
|
2312
2323
|
}, React__default.createElement("div", {
|
|
2313
2324
|
className: "modal-title"
|
|
2314
|
-
}, "
|
|
2325
|
+
}, "Login"), React__default.createElement("div", {
|
|
2315
2326
|
className: 'login-logo-container'
|
|
2316
2327
|
}, React__default.createElement("img", {
|
|
2317
2328
|
className: "login-logo-tff",
|
|
@@ -2359,7 +2370,7 @@ var LoginModal = function LoginModal(_ref) {
|
|
|
2359
2370
|
className: "login-action-button"
|
|
2360
2371
|
}, React__default.createElement("button", {
|
|
2361
2372
|
type: "submit"
|
|
2362
|
-
}, "
|
|
2373
|
+
}, "Login")), showForgotPasswordButton && React__default.createElement("div", {
|
|
2363
2374
|
className: "forgot-password"
|
|
2364
2375
|
}, React__default.createElement("span", {
|
|
2365
2376
|
"aria-hidden": "true",
|
|
@@ -2546,7 +2557,7 @@ var SignupModal = function SignupModal(_ref) {
|
|
|
2546
2557
|
className: "login"
|
|
2547
2558
|
}, React__default.createElement("span", {
|
|
2548
2559
|
onClick: onLogin
|
|
2549
|
-
}, "
|
|
2560
|
+
}, "Login")), showPoweredByImage ? React__default.createElement(PoweredBy, null) : null);
|
|
2550
2561
|
}))));
|
|
2551
2562
|
};
|
|
2552
2563
|
|
|
@@ -3660,7 +3671,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
3660
3671
|
className: "account-actions-block"
|
|
3661
3672
|
}, React__default.createElement("div", {
|
|
3662
3673
|
className: "action-item"
|
|
3663
|
-
}, React__default.createElement("div", null, accountInfoTitle), React__default.createElement("div", null, "
|
|
3674
|
+
}, React__default.createElement("div", null, accountInfoTitle), React__default.createElement("div", null, "Login & skip ahead:")), React__default.createElement("div", {
|
|
3664
3675
|
className: "action-item login-block"
|
|
3665
3676
|
}, React__default.createElement("button", {
|
|
3666
3677
|
className: "login-register-button",
|
|
@@ -3673,7 +3684,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
3673
3684
|
setShowModalLogin(true);
|
|
3674
3685
|
}
|
|
3675
3686
|
}
|
|
3676
|
-
}, "
|
|
3687
|
+
}, "Login"), !hideLogo && React__default.createElement("div", {
|
|
3677
3688
|
className: "logo-image-container"
|
|
3678
3689
|
}, React__default.createElement("img", {
|
|
3679
3690
|
src: theme === 'dark' ? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg' : 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg',
|
|
@@ -5275,8 +5286,7 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5275
5286
|
updateTickets = _ref.updateTickets,
|
|
5276
5287
|
setCodeIsApplied = _ref.setCodeIsApplied,
|
|
5277
5288
|
codeIsInvalid = _ref.codeIsInvalid,
|
|
5278
|
-
setCodeIsInvalid = _ref.setCodeIsInvalid
|
|
5279
|
-
promoText = _ref.promoText;
|
|
5289
|
+
setCodeIsInvalid = _ref.setCodeIsInvalid;
|
|
5280
5290
|
var isPromoCodeHasValue = !!code.trim();
|
|
5281
5291
|
|
|
5282
5292
|
var renderInputField = function renderInputField() {
|
|
@@ -5332,7 +5342,7 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5332
5342
|
setShowPromoInput(true);
|
|
5333
5343
|
setCodeIsInvalid(false);
|
|
5334
5344
|
}
|
|
5335
|
-
},
|
|
5345
|
+
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
5336
5346
|
};
|
|
5337
5347
|
|
|
5338
5348
|
var ReferralLogic = function ReferralLogic(props) {
|
|
@@ -5489,7 +5499,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5489
5499
|
}
|
|
5490
5500
|
|
|
5491
5501
|
var ticketIsFree = +ticket.price === 0;
|
|
5492
|
-
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "
|
|
5502
|
+
var ticketPrice = isSoldOut ? 'SOLD OUT' : ticketIsFree ? 'FREE' : "$ " + (+ticket.price).toFixed(2);
|
|
5493
5503
|
var isNewGroupTicket = (ticket == null ? void 0 : ticket.groupName) !== ((_arr = arr[i - 1]) == null ? void 0 : _arr.groupName);
|
|
5494
5504
|
return React__default.createElement(React__default.Fragment, {
|
|
5495
5505
|
key: ticket.id || ticket.name
|
|
@@ -5505,7 +5515,7 @@ var TicketsSection = function TicketsSection(_ref) {
|
|
|
5505
5515
|
className: "event-detail__tier-price"
|
|
5506
5516
|
}, ticketIsDiscounted && React__default.createElement("p", {
|
|
5507
5517
|
className: "old-price"
|
|
5508
|
-
}, "
|
|
5518
|
+
}, "$ ", (+ticket.oldPrice).toFixed(2)), React__default.createElement("p", {
|
|
5509
5519
|
className: isSoldOut ? 'sold-out' : ''
|
|
5510
5520
|
}, ticketPrice), !isSoldOut && !ticketIsFree && React__default.createElement("p", {
|
|
5511
5521
|
className: "fees"
|
|
@@ -5575,8 +5585,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5575
5585
|
handleNotInvitedModalClose = _ref$handleNotInvited === void 0 ? _identity : _ref$handleNotInvited,
|
|
5576
5586
|
_ref$handleInvalidLin = _ref.handleInvalidLinkModalClose,
|
|
5577
5587
|
handleInvalidLinkModalClose = _ref$handleInvalidLin === void 0 ? _identity : _ref$handleInvalidLin,
|
|
5578
|
-
ordersPath = _ref.ordersPath
|
|
5579
|
-
promoText = _ref.promoText;
|
|
5588
|
+
ordersPath = _ref.ordersPath;
|
|
5580
5589
|
|
|
5581
5590
|
var _useState = React.useState({}),
|
|
5582
5591
|
selectedTickets = _useState[0],
|
|
@@ -6132,8 +6141,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6132
6141
|
setCode: setCode,
|
|
6133
6142
|
updateTickets: updateTickets,
|
|
6134
6143
|
codeIsInvalid: codeIsInvalid,
|
|
6135
|
-
setCodeIsInvalid: setCodeIsInvalid
|
|
6136
|
-
promoText: promoText
|
|
6144
|
+
setCodeIsInvalid: setCodeIsInvalid
|
|
6137
6145
|
}) : null, wrappedActionsSectionComponent, canShowGetTicketBtn() && React__default.createElement(Button$1, {
|
|
6138
6146
|
"aria-hidden": true,
|
|
6139
6147
|
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n " + (!isLoggedIn ? 'on-bottom' : '') + "\n ",
|
|
@@ -7685,11 +7693,8 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7685
7693
|
_ref$onConfirmSelecti2 = _ref.onConfirmSelectionError,
|
|
7686
7694
|
onConfirmSelectionError = _ref$onConfirmSelecti2 === void 0 ? _identity : _ref$onConfirmSelecti2,
|
|
7687
7695
|
_ref$onCountdownFinis = _ref.onCountdownFinish,
|
|
7688
|
-
_onCountdownFinish = _ref$onCountdownFinis === void 0 ? _identity : _ref$onCountdownFinis
|
|
7689
|
-
_ref$samePageBilling = _ref.samePageBilling,
|
|
7690
|
-
samePageBilling = _ref$samePageBilling === void 0 ? false : _ref$samePageBilling;
|
|
7696
|
+
_onCountdownFinish = _ref$onCountdownFinis === void 0 ? _identity : _ref$onCountdownFinis;
|
|
7691
7697
|
|
|
7692
|
-
var valuesRef = React.useRef(null);
|
|
7693
7698
|
var eventId = getQueryVariable('event_id');
|
|
7694
7699
|
|
|
7695
7700
|
var _useState = React.useState([]),
|
|
@@ -7866,7 +7871,7 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7866
7871
|
collectOptionalWalletAddress = (_pageConfigsData$coll = pageConfigsData.collect_optional_wallet_address) != null ? _pageConfigsData$coll : false;
|
|
7867
7872
|
collectMandatoryWalletAddress = (_pageConfigsData$coll2 = pageConfigsData.collect_mandatory_wallet_address) != null ? _pageConfigsData$coll2 : false;
|
|
7868
7873
|
|
|
7869
|
-
if (!(skipBillingPage && enableBillingInfoAutoCreate
|
|
7874
|
+
if (!(skipBillingPage && enableBillingInfoAutoCreate)) {
|
|
7870
7875
|
_context2.next = 36;
|
|
7871
7876
|
break;
|
|
7872
7877
|
}
|
|
@@ -7970,7 +7975,6 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7970
7975
|
}));
|
|
7971
7976
|
}
|
|
7972
7977
|
|
|
7973
|
-
var flagHasAddOn = getQueryVariable('hasAddOn') === 'true';
|
|
7974
7978
|
return React__default.createElement(React__default.Fragment, null, !!cartExpirationTime && enableTimer && React__default.createElement(TimerWidget$1, {
|
|
7975
7979
|
expires_at: cartExpirationTime,
|
|
7976
7980
|
onCountdownFinish: function onCountdownFinish() {
|
|
@@ -7978,7 +7982,7 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7978
7982
|
|
|
7979
7983
|
_onCountdownFinish();
|
|
7980
7984
|
}
|
|
7981
|
-
}),
|
|
7985
|
+
}), React__default.createElement("div", {
|
|
7982
7986
|
className: classNamePrefix + "_container"
|
|
7983
7987
|
}, React__default.createElement("div", {
|
|
7984
7988
|
className: classNamePrefix + "_block"
|
|
@@ -7986,7 +7990,7 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
7986
7990
|
className: classNamePrefix + "_line_block"
|
|
7987
7991
|
}, React__default.createElement("p", {
|
|
7988
7992
|
className: classNamePrefix + "_info_title"
|
|
7989
|
-
}, "Get Your Tickets"),
|
|
7993
|
+
}, "Get Your Tickets"), React__default.createElement("button", {
|
|
7990
7994
|
type: "button",
|
|
7991
7995
|
className: classNamePrefix + "_skip",
|
|
7992
7996
|
onClick: function onClick() {
|
|
@@ -8004,11 +8008,6 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
8004
8008
|
}
|
|
8005
8009
|
}, function (_ref4) {
|
|
8006
8010
|
var values = _ref4.values;
|
|
8007
|
-
|
|
8008
|
-
if (!lodash.isEqual(values, valuesRef.current)) {
|
|
8009
|
-
valuesRef.current = values;
|
|
8010
|
-
}
|
|
8011
|
-
|
|
8012
8011
|
var isConfirmDisabled = !isAtLeastOneAddonSelected(values);
|
|
8013
8012
|
return React__default.createElement(formik.Form, {
|
|
8014
8013
|
autoComplete: "off",
|
|
@@ -8048,13 +8047,7 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
8048
8047
|
selectOptions: addonsOptions[variant.id],
|
|
8049
8048
|
classNamePrefix: classNamePrefix,
|
|
8050
8049
|
handleAddonChange: function handleAddonChange(id, value) {
|
|
8051
|
-
onFieldChange(id, value, addon);
|
|
8052
|
-
|
|
8053
|
-
if (samePageBilling) {
|
|
8054
|
-
setTimeout(function () {
|
|
8055
|
-
handleConfirm(valuesRef.current);
|
|
8056
|
-
}, 100);
|
|
8057
|
-
}
|
|
8050
|
+
return onFieldChange(id, value, addon);
|
|
8058
8051
|
}
|
|
8059
8052
|
})
|
|
8060
8053
|
);
|
|
@@ -8065,16 +8058,10 @@ var AddonsContainter = function AddonsContainter(_ref) {
|
|
|
8065
8058
|
selectOptions: addonsOptions[addon.id],
|
|
8066
8059
|
classNamePrefix: classNamePrefix,
|
|
8067
8060
|
handleAddonChange: function handleAddonChange(id, value) {
|
|
8068
|
-
onFieldChange(id, value, addon);
|
|
8069
|
-
|
|
8070
|
-
if (samePageBilling) {
|
|
8071
|
-
setTimeout(function () {
|
|
8072
|
-
handleConfirm(valuesRef.current);
|
|
8073
|
-
}, 100);
|
|
8074
|
-
}
|
|
8061
|
+
return onFieldChange(id, value, addon);
|
|
8075
8062
|
}
|
|
8076
8063
|
})));
|
|
8077
|
-
}),
|
|
8064
|
+
}), React__default.createElement("button", {
|
|
8078
8065
|
type: "submit",
|
|
8079
8066
|
className: (isConfirmDisabled ? classNamePrefix + "_is_disabled" : '') + " " + classNamePrefix + "_submit_button",
|
|
8080
8067
|
disabled: isConfirmDisabled
|