tf-checkout-react 1.4.23-beta.4 → 1.4.23-beta.6
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 -1
- package/dist/components/preRegistration/index.d.ts +1 -0
- package/dist/hooks/useLocalStorageListener.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +134 -43
- 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 +134 -43
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/api/index.ts +49 -36
- package/src/components/confirmationContainer/social-buttons.tsx +1 -1
- package/src/components/preRegistration/Influancers.tsx +17 -14
- package/src/components/preRegistration/PreRegistrationInformations.tsx +13 -5
- package/src/components/preRegistration/Prewards.tsx +15 -12
- package/src/components/preRegistration/ShareOptions.tsx +35 -21
- package/src/components/preRegistration/index.tsx +41 -25
- package/src/components/stripePayment/index.tsx +4 -1
- package/src/components/ticketsContainer/index.tsx +11 -3
- package/src/components/ticketsContainer/utils.ts +4 -1
- package/src/components/timerWidget/index.tsx +7 -11
- package/src/hooks/useLocalStorageListener.ts +27 -0
- package/src/types/pre-registration-complete.d.ts +7 -4
package/dist/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import { pageOptions } from '../hooks/usePixel';
|
|
3
3
|
import { GetNetverifyUrlResponseData, UpdateVerificationStatusResponseData, VerificationStatusResponseData } from '../types/verification';
|
|
4
4
|
export { issueTicket, getDelegationTickets } from './guestTicketDelegation';
|
|
@@ -93,3 +93,4 @@ export declare const updateVerificationStatus: () => Promise<{
|
|
|
93
93
|
data: UpdateVerificationStatusResponseData;
|
|
94
94
|
}>;
|
|
95
95
|
export declare const checkCustomerOrder: (orderHash: string) => Promise<any>;
|
|
96
|
+
export declare const refreshSeatReservation: (eventId: string) => Promise<AxiosResponse<any, AxiosRequestConfig<any>>>;
|
|
@@ -6,6 +6,7 @@ interface IPreRegistrationProps extends ILoginModalProps, IForgotPasswordProps {
|
|
|
6
6
|
eventId: string | number;
|
|
7
7
|
formFields?: IFormFieldsSection[];
|
|
8
8
|
additionalFieldAttribute?: IFieldAttribute;
|
|
9
|
+
isPreregistrationStarted: boolean;
|
|
9
10
|
onGetCountriesSuccess?: (res: any) => void;
|
|
10
11
|
onGetCountriesError?: (e: AxiosError) => void;
|
|
11
12
|
onConfirmationSuccess?: (res: any) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLocalStorageListener(key: string, callback: (value: string | null) => void): string | null;
|
|
@@ -1409,6 +1409,27 @@ var checkCustomerOrder = /*#__PURE__*/function () {
|
|
|
1409
1409
|
return _ref12.apply(this, arguments);
|
|
1410
1410
|
};
|
|
1411
1411
|
}();
|
|
1412
|
+
var refreshSeatReservation = /*#__PURE__*/function () {
|
|
1413
|
+
var _ref13 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(eventId) {
|
|
1414
|
+
var response;
|
|
1415
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1416
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1417
|
+
case 0:
|
|
1418
|
+
_context13.next = 2;
|
|
1419
|
+
return publicRequest.patch("event/" + eventId + "/reservation/refresh/");
|
|
1420
|
+
case 2:
|
|
1421
|
+
response = _context13.sent;
|
|
1422
|
+
return _context13.abrupt("return", response);
|
|
1423
|
+
case 4:
|
|
1424
|
+
case "end":
|
|
1425
|
+
return _context13.stop();
|
|
1426
|
+
}
|
|
1427
|
+
}, _callee13);
|
|
1428
|
+
}));
|
|
1429
|
+
return function refreshSeatReservation(_x14) {
|
|
1430
|
+
return _ref13.apply(this, arguments);
|
|
1431
|
+
};
|
|
1432
|
+
}();
|
|
1412
1433
|
|
|
1413
1434
|
function appendScriptsToHeader(code) {
|
|
1414
1435
|
if (isBrowser && code) {
|
|
@@ -2677,7 +2698,7 @@ var TimerWidget = function TimerWidget(_ref) {
|
|
|
2677
2698
|
var expires_at = _ref.expires_at,
|
|
2678
2699
|
buyLoading = _ref.buyLoading,
|
|
2679
2700
|
_ref$onCountdownFinis = _ref.onCountdownFinish,
|
|
2680
|
-
onCountdownFinish = _ref$onCountdownFinis === void 0 ?
|
|
2701
|
+
onCountdownFinish = _ref$onCountdownFinis === void 0 ? _identity : _ref$onCountdownFinis;
|
|
2681
2702
|
var _useState = React.useState(true),
|
|
2682
2703
|
showTimer = _useState[0],
|
|
2683
2704
|
setShowTimer = _useState[1];
|
|
@@ -2701,19 +2722,19 @@ var TimerWidget = function TimerWidget(_ref) {
|
|
|
2701
2722
|
var hideTimer = function hideTimer() {
|
|
2702
2723
|
var timerRl = document.querySelector('.timer');
|
|
2703
2724
|
if (timerRl) {
|
|
2704
|
-
timerRl.style.visibility =
|
|
2725
|
+
timerRl.style.visibility = 'hidden';
|
|
2705
2726
|
}
|
|
2706
2727
|
};
|
|
2707
2728
|
return showTimer && !!expires_at ? React__default.createElement("div", {
|
|
2708
2729
|
className: "timer"
|
|
2709
2730
|
}, React__default.createElement("div", {
|
|
2710
|
-
className:
|
|
2731
|
+
className: "close-icon",
|
|
2711
2732
|
onClick: hideTimer
|
|
2712
2733
|
}, React__default.createElement(SVG, {
|
|
2713
2734
|
src: Cross,
|
|
2714
|
-
width:
|
|
2715
|
-
height:
|
|
2716
|
-
fill:
|
|
2735
|
+
width: "10",
|
|
2736
|
+
height: "10",
|
|
2737
|
+
fill: "#fff"
|
|
2717
2738
|
})), React__default.createElement("div", {
|
|
2718
2739
|
className: "toast-message"
|
|
2719
2740
|
}, React__default.createElement("p", null, "Please complete your purchase before the timer reaches zero."), React__default.createElement("p", {
|
|
@@ -4047,6 +4068,7 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
4047
4068
|
var _useState4 = React.useState(false),
|
|
4048
4069
|
allowSubmit = _useState4[0],
|
|
4049
4070
|
setAllowSubmit = _useState4[1];
|
|
4071
|
+
var eventId = getQueryVariable('event_id') || '';
|
|
4050
4072
|
var handleSubmit = /*#__PURE__*/function () {
|
|
4051
4073
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
|
|
4052
4074
|
var card, address, _setupResponse$setupI, setupResponse, paymentMethodReq, _yield$stripe$confirm, _error;
|
|
@@ -4130,25 +4152,26 @@ var CheckoutForm = function CheckoutForm(_ref) {
|
|
|
4130
4152
|
_yield$stripe$confirm = _context.sent;
|
|
4131
4153
|
_error = _yield$stripe$confirm.error;
|
|
4132
4154
|
if (!_error) {
|
|
4133
|
-
_context.next =
|
|
4155
|
+
_context.next = 36;
|
|
4134
4156
|
break;
|
|
4135
4157
|
}
|
|
4158
|
+
refreshSeatReservation(eventId);
|
|
4136
4159
|
setStripeError(_error.message);
|
|
4137
4160
|
handleSetLoading(false);
|
|
4138
4161
|
return _context.abrupt("return");
|
|
4139
|
-
case
|
|
4162
|
+
case 36:
|
|
4140
4163
|
onSubmit(null);
|
|
4141
|
-
_context.next =
|
|
4164
|
+
_context.next = 42;
|
|
4142
4165
|
break;
|
|
4143
|
-
case
|
|
4144
|
-
_context.prev =
|
|
4166
|
+
case 39:
|
|
4167
|
+
_context.prev = 39;
|
|
4145
4168
|
_context.t0 = _context["catch"](1);
|
|
4146
4169
|
onSubmit(_context.t0);
|
|
4147
|
-
case
|
|
4170
|
+
case 42:
|
|
4148
4171
|
case "end":
|
|
4149
4172
|
return _context.stop();
|
|
4150
4173
|
}
|
|
4151
|
-
}, _callee, null, [[1,
|
|
4174
|
+
}, _callee, null, [[1, 39]]);
|
|
4152
4175
|
}));
|
|
4153
4176
|
return function handleSubmit(_x) {
|
|
4154
4177
|
return _ref2.apply(this, arguments);
|
|
@@ -5076,7 +5099,7 @@ var SocialButtons = function SocialButtons(_ref2) {
|
|
|
5076
5099
|
},
|
|
5077
5100
|
key: index
|
|
5078
5101
|
}, shareButton));
|
|
5079
|
-
})),
|
|
5102
|
+
})), showDefaultShareButtons || shareButtons.length ? footerText : null, (showReferralsInfoText || Boolean(clientLabel)) && React__default.createElement("p", {
|
|
5080
5103
|
className: "note-message"
|
|
5081
5104
|
}, React__default.createElement("span", null, "*Please note, only purchases made from a different", ' ', clientLabel || 'Ticket Fairy', " account can count towards your referrals"), React__default.createElement("span", null, ' ', "so please make sure you ask your friends to buy their own tickets using their own ", clientLabel || 'Ticket Fairy', " account!")));
|
|
5082
5105
|
};
|
|
@@ -5411,6 +5434,26 @@ var useCookieListener = function useCookieListener(key, handler) {
|
|
|
5411
5434
|
}, []);
|
|
5412
5435
|
};
|
|
5413
5436
|
|
|
5437
|
+
function useLocalStorageListener(key, callback) {
|
|
5438
|
+
var isWindowDefined = typeof window !== 'undefined';
|
|
5439
|
+
var _useState = React.useState(isWindowDefined ? localStorage.getItem(key) : ''),
|
|
5440
|
+
value = _useState[0],
|
|
5441
|
+
setValue = _useState[1];
|
|
5442
|
+
React.useEffect(function () {
|
|
5443
|
+
var intervalId = setInterval(function () {
|
|
5444
|
+
var newValue = localStorage.getItem(key);
|
|
5445
|
+
if (newValue !== value) {
|
|
5446
|
+
setValue(newValue);
|
|
5447
|
+
callback(JSON.parse(newValue || ''));
|
|
5448
|
+
}
|
|
5449
|
+
}, 100);
|
|
5450
|
+
return function () {
|
|
5451
|
+
clearInterval(intervalId);
|
|
5452
|
+
};
|
|
5453
|
+
}, [key, value, callback]);
|
|
5454
|
+
return value;
|
|
5455
|
+
}
|
|
5456
|
+
|
|
5414
5457
|
var style$4 = {
|
|
5415
5458
|
position: 'absolute',
|
|
5416
5459
|
top: '50%',
|
|
@@ -5852,7 +5895,7 @@ var defineIsSalesClosed = function defineIsSalesClosed(eventDatesInfo) {
|
|
|
5852
5895
|
if (!salesStarted || salesStarted && salesEnded) {
|
|
5853
5896
|
isSalesClosed = true;
|
|
5854
5897
|
}
|
|
5855
|
-
if (!presalesStarted && !presalesEnded || presalesStarted && presalesEnded) {
|
|
5898
|
+
if (!presalesStarted && !presalesEnded || presalesStarted && presalesEnded && !salesStarted) {
|
|
5856
5899
|
isSalesClosed = true;
|
|
5857
5900
|
} else {
|
|
5858
5901
|
isSalesClosed = false;
|
|
@@ -6189,11 +6232,20 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6189
6232
|
var _useState21 = React.useState(false),
|
|
6190
6233
|
ticketsNotAvailableModalOpen = _useState21[0],
|
|
6191
6234
|
setTicketsNotAvailableModalOpen = _useState21[1];
|
|
6235
|
+
var _useState22 = React.useState(checkUserPreregistration()),
|
|
6236
|
+
isPreregistred = _useState22[0],
|
|
6237
|
+
setIsPreregisred = _useState22[1];
|
|
6192
6238
|
var ticketsContainerRef = React.useRef(null);
|
|
6193
6239
|
var pageUrl = isBrowser ? window.location.href.split('?')[0] : '';
|
|
6194
6240
|
useCookieListener(X_TF_ECOMMERCE, function (value) {
|
|
6195
6241
|
return setIsLogged(Boolean(value));
|
|
6196
6242
|
});
|
|
6243
|
+
useLocalStorageListener('user_data', function (user) {
|
|
6244
|
+
var isPreregistredUser = _some(preregistereds, function (item) {
|
|
6245
|
+
return item.email === (user == null ? void 0 : user.email);
|
|
6246
|
+
});
|
|
6247
|
+
setIsPreregisred(isPreregistredUser);
|
|
6248
|
+
});
|
|
6197
6249
|
usePixel(eventId, {
|
|
6198
6250
|
pageUrl: pageUrl
|
|
6199
6251
|
});
|
|
@@ -6216,6 +6268,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6216
6268
|
fetchPreregisteredsData();
|
|
6217
6269
|
}
|
|
6218
6270
|
}, [eventId]);
|
|
6271
|
+
React.useEffect(function () {
|
|
6272
|
+
setIsPreregisred(checkUserPreregistration());
|
|
6273
|
+
}, [preregistereds]);
|
|
6219
6274
|
React.useEffect(function () {
|
|
6220
6275
|
if (isLogged) {
|
|
6221
6276
|
fetchUserData().then(function (res) {
|
|
@@ -6381,7 +6436,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6381
6436
|
return _ref3 = {}, _ref3[key] = value, _ref3.isTable = isTable, _ref3;
|
|
6382
6437
|
});
|
|
6383
6438
|
};
|
|
6384
|
-
|
|
6439
|
+
function checkUserPreregistration() {
|
|
6385
6440
|
var userDataString = isWindowDefined ? window.localStorage.getItem('user_data') : '';
|
|
6386
6441
|
var isPreregistredUser = false;
|
|
6387
6442
|
if (userDataString) {
|
|
@@ -6391,7 +6446,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6391
6446
|
});
|
|
6392
6447
|
}
|
|
6393
6448
|
return isPreregistredUser;
|
|
6394
|
-
}
|
|
6449
|
+
}
|
|
6395
6450
|
var handleOrdersClick = function handleOrdersClick() {
|
|
6396
6451
|
if (isWindowDefined) {
|
|
6397
6452
|
window.location.href = ordersPath != null ? ordersPath : '/orders';
|
|
@@ -6636,7 +6691,6 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
6636
6691
|
var hideTopInfluencers = event == null ? void 0 : event.hideTopInfluencers;
|
|
6637
6692
|
var isSeatMapAllowed = _get(event, 'seatMapAllowed', false);
|
|
6638
6693
|
var isTableMapEnabled = _get(event, 'tableMapEnabled', false);
|
|
6639
|
-
var isPreregistred = checkUserPreregistration();
|
|
6640
6694
|
var notAvailableTicketsMessage = "Tickets for this event are not available until " + moment(event == null ? void 0 : event.salesStart).format('dddd, DD MMMM YYYY') + ". \n If you pre-registered, log into your account first to buy your pre-sale ticket.";
|
|
6641
6695
|
var tableTickets = _filter(tickets, function (ticket) {
|
|
6642
6696
|
return ticket.isTable;
|
|
@@ -11233,6 +11287,7 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11233
11287
|
var eventId = _ref.eventId,
|
|
11234
11288
|
pFormFields = _ref.formFields,
|
|
11235
11289
|
additionalFieldAttribute = _ref.additionalFieldAttribute,
|
|
11290
|
+
isPreregistrationStarted = _ref.isPreregistrationStarted,
|
|
11236
11291
|
logo = _ref.logo,
|
|
11237
11292
|
showForgotPasswordButton = _ref.showForgotPasswordButton,
|
|
11238
11293
|
_ref$onLoginSuccess = _ref.onLoginSuccess,
|
|
@@ -11267,6 +11322,12 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11267
11322
|
var _useState6 = React.useState(Boolean(getCookieByName(X_TF_ECOMMERCE$2))),
|
|
11268
11323
|
isLoggedIn = _useState6[0],
|
|
11269
11324
|
setIsLoggedIn = _useState6[1];
|
|
11325
|
+
var _useState7 = React.useState({
|
|
11326
|
+
show: false,
|
|
11327
|
+
message: ''
|
|
11328
|
+
}),
|
|
11329
|
+
confirmModalState = _useState7[0],
|
|
11330
|
+
setConfirmModalState = _useState7[1];
|
|
11270
11331
|
useCookieListener(X_TF_ECOMMERCE$2, function (value) {
|
|
11271
11332
|
return setIsLoggedIn(Boolean(value));
|
|
11272
11333
|
});
|
|
@@ -11324,11 +11385,20 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11324
11385
|
onClose: function onClose() {
|
|
11325
11386
|
setError('');
|
|
11326
11387
|
}
|
|
11388
|
+
}), confirmModalState.show && React__default.createElement(ConfirmModal, {
|
|
11389
|
+
hideCancelBtn: true,
|
|
11390
|
+
onConfirm: function onConfirm() {
|
|
11391
|
+
return setConfirmModalState({
|
|
11392
|
+
show: false,
|
|
11393
|
+
message: ''
|
|
11394
|
+
});
|
|
11395
|
+
},
|
|
11396
|
+
message: confirmModalState.message
|
|
11327
11397
|
}), !isLoggedIn && React__default.createElement("div", {
|
|
11328
11398
|
className: "account-actions-block"
|
|
11329
11399
|
}, React__default.createElement("div", {
|
|
11330
11400
|
className: "action-item"
|
|
11331
|
-
}, React__default.createElement("div", null, React__default.createElement("span", null, "If you have a"), React__default.createElement("b", null, " Mana Common "), React__default.createElement("span", null, "account and password already
|
|
11401
|
+
}, React__default.createElement("div", null, React__default.createElement("span", null, "Create (or log in to) your account, then click on Confirm Registration."), React__default.createElement("span", null, " If you have a"), React__default.createElement("b", null, " Mana Common "), React__default.createElement("span", null, "account and password already"))), React__default.createElement("div", {
|
|
11332
11402
|
className: "action-item login-block"
|
|
11333
11403
|
}, React__default.createElement("button", {
|
|
11334
11404
|
className: "login-register-button",
|
|
@@ -11372,7 +11442,11 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11372
11442
|
case 0:
|
|
11373
11443
|
_context2.prev = 0;
|
|
11374
11444
|
if (!isLoggedIn) {
|
|
11375
|
-
_context2.next =
|
|
11445
|
+
_context2.next = 21;
|
|
11446
|
+
break;
|
|
11447
|
+
}
|
|
11448
|
+
if (!isPreregistrationStarted) {
|
|
11449
|
+
_context2.next = 18;
|
|
11376
11450
|
break;
|
|
11377
11451
|
}
|
|
11378
11452
|
updatedValues = _extends({}, values);
|
|
@@ -11384,17 +11458,25 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11384
11458
|
updatedValues.shareHash = hash;
|
|
11385
11459
|
// remove date picker string value
|
|
11386
11460
|
delete updatedValues.holderAge;
|
|
11387
|
-
_context2.next =
|
|
11461
|
+
_context2.next = 13;
|
|
11388
11462
|
return confirmPreRegistration(eventId, updatedValues);
|
|
11389
|
-
case
|
|
11463
|
+
case 13:
|
|
11390
11464
|
confirmationData = _context2.sent;
|
|
11391
11465
|
if (isWindowDefined$1) {
|
|
11392
11466
|
window.localStorage.setItem('pre-registration-hash', _get(confirmationData, 'attributes.hash'));
|
|
11393
11467
|
}
|
|
11394
11468
|
onConfirmationSuccess(confirmationData);
|
|
11395
|
-
_context2.next =
|
|
11469
|
+
_context2.next = 19;
|
|
11396
11470
|
break;
|
|
11397
|
-
case
|
|
11471
|
+
case 18:
|
|
11472
|
+
setConfirmModalState({
|
|
11473
|
+
show: true,
|
|
11474
|
+
message: 'The preregistration has not started'
|
|
11475
|
+
});
|
|
11476
|
+
case 19:
|
|
11477
|
+
_context2.next = 41;
|
|
11478
|
+
break;
|
|
11479
|
+
case 21:
|
|
11398
11480
|
bodyFormData = new FormData();
|
|
11399
11481
|
bodyFormData.append('first_name', values.firstName);
|
|
11400
11482
|
bodyFormData.append('last_name', values.lastName);
|
|
@@ -11407,23 +11489,23 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11407
11489
|
bodyFormData.append('client_id', CONFIGS.CLIENT_ID);
|
|
11408
11490
|
bodyFormData.append('client_secret', CONFIGS.CLIENT_SECRET);
|
|
11409
11491
|
bodyFormData.append('register_for', 'prereg');
|
|
11410
|
-
_context2.next =
|
|
11492
|
+
_context2.next = 35;
|
|
11411
11493
|
return register(bodyFormData);
|
|
11412
|
-
case
|
|
11494
|
+
case 35:
|
|
11413
11495
|
res = _context2.sent;
|
|
11414
|
-
_context2.next =
|
|
11496
|
+
_context2.next = 38;
|
|
11415
11497
|
return getProfileData();
|
|
11416
|
-
case
|
|
11498
|
+
case 38:
|
|
11417
11499
|
profileRes = _context2.sent;
|
|
11418
11500
|
onLoginSuccess(res.data);
|
|
11419
11501
|
if (isWindowDefined$1) {
|
|
11420
11502
|
window.localStorage.setItem('user_data', JSON.stringify(_get(profileRes, 'data.data')));
|
|
11421
11503
|
}
|
|
11422
|
-
case
|
|
11423
|
-
_context2.next =
|
|
11504
|
+
case 41:
|
|
11505
|
+
_context2.next = 50;
|
|
11424
11506
|
break;
|
|
11425
|
-
case
|
|
11426
|
-
_context2.prev =
|
|
11507
|
+
case 43:
|
|
11508
|
+
_context2.prev = 43;
|
|
11427
11509
|
_context2.t0 = _context2["catch"](0);
|
|
11428
11510
|
errorMessage = (_context2.t0 == null ? void 0 : _context2.t0.message) || 'Error';
|
|
11429
11511
|
emailErrors = _context2.t0 == null ? void 0 : (_e$response2 = _context2.t0.response) == null ? void 0 : (_e$response2$data = _e$response2.data) == null ? void 0 : (_e$response2$data$mes = _e$response2$data.message) == null ? void 0 : _e$response2$data$mes.email;
|
|
@@ -11439,11 +11521,11 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11439
11521
|
setError(errorMessage);
|
|
11440
11522
|
}
|
|
11441
11523
|
onConfirmationError(_context2.t0);
|
|
11442
|
-
case
|
|
11524
|
+
case 50:
|
|
11443
11525
|
case "end":
|
|
11444
11526
|
return _context2.stop();
|
|
11445
11527
|
}
|
|
11446
|
-
}, _callee2, null, [[0,
|
|
11528
|
+
}, _callee2, null, [[0, 43]]);
|
|
11447
11529
|
}));
|
|
11448
11530
|
function onSubmit(_x) {
|
|
11449
11531
|
return _onSubmit.apply(this, arguments);
|
|
@@ -11475,12 +11557,14 @@ var PreRegistration = function PreRegistration(_ref) {
|
|
|
11475
11557
|
var Prewards = function Prewards(props) {
|
|
11476
11558
|
var data = props.data,
|
|
11477
11559
|
_props$classNamePrefi = props.classNamePrefix,
|
|
11478
|
-
classNamePrefix = _props$classNamePrefi === void 0 ? '' : _props$classNamePrefi
|
|
11560
|
+
classNamePrefix = _props$classNamePrefi === void 0 ? '' : _props$classNamePrefi,
|
|
11561
|
+
_props$headerNode = props.headerNode,
|
|
11562
|
+
headerNode = _props$headerNode === void 0 ? React__default.createElement(React__default.Fragment, null, "PRE", React__default.createElement("span", null, "WARDS\u2122")) : _props$headerNode;
|
|
11479
11563
|
return React__default.createElement("div", {
|
|
11480
11564
|
className: classNamePrefix + "_prewards"
|
|
11481
|
-
}, React__default.createElement("div", {
|
|
11565
|
+
}, !_isEmpty(data) && React__default.createElement("div", {
|
|
11482
11566
|
className: classNamePrefix + "_prewards_heder"
|
|
11483
|
-
},
|
|
11567
|
+
}, headerNode), React__default.createElement("div", {
|
|
11484
11568
|
className: classNamePrefix + "_prizes"
|
|
11485
11569
|
}, _map(data, function (prize) {
|
|
11486
11570
|
var description = prize.description,
|
|
@@ -11557,6 +11641,9 @@ var ShareOptions = function ShareOptions(props) {
|
|
|
11557
11641
|
actions = _data$attributes.actions,
|
|
11558
11642
|
shareUrl = _data$attributes.shareUrl;
|
|
11559
11643
|
var shareButtons = shareOptionsAdapter(actions, shareUrl);
|
|
11644
|
+
var isShareLinkEnabled = _some(actions, function (item) {
|
|
11645
|
+
return item.action === 'shared_url';
|
|
11646
|
+
});
|
|
11560
11647
|
var _onAfterShare = /*#__PURE__*/function () {
|
|
11561
11648
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(eventActionId) {
|
|
11562
11649
|
var shareActionToken, tokenShuffleMethod, accessToken;
|
|
@@ -11589,7 +11676,7 @@ var ShareOptions = function ShareOptions(props) {
|
|
|
11589
11676
|
}();
|
|
11590
11677
|
return React__default.createElement("div", {
|
|
11591
11678
|
className: classNamePrefix + "_share_options"
|
|
11592
|
-
}, React__default.createElement("div", {
|
|
11679
|
+
}, !_isEmpty(actions) && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
11593
11680
|
className: classNamePrefix + "_share_header"
|
|
11594
11681
|
}, headerText), React__default.createElement(SocialButtons, {
|
|
11595
11682
|
shareLink: data.attributes.shareUrl,
|
|
@@ -11602,7 +11689,7 @@ var ShareOptions = function ShareOptions(props) {
|
|
|
11602
11689
|
onAfterShare: function onAfterShare(eventActionId) {
|
|
11603
11690
|
return _onAfterShare(eventActionId);
|
|
11604
11691
|
}
|
|
11605
|
-
}), React__default.createElement("div", {
|
|
11692
|
+
}), isShareLinkEnabled && React__default.createElement("div", {
|
|
11606
11693
|
className: classNamePrefix + "_share_btn_inner"
|
|
11607
11694
|
}, React__default.createElement(CopyField, {
|
|
11608
11695
|
copyValue: shareUrl,
|
|
@@ -11610,7 +11697,7 @@ var ShareOptions = function ShareOptions(props) {
|
|
|
11610
11697
|
hasCopyIcon: hasCopyIcon,
|
|
11611
11698
|
classNamePrefix: classNamePrefix,
|
|
11612
11699
|
messageText: "Share your link"
|
|
11613
|
-
})));
|
|
11700
|
+
}))));
|
|
11614
11701
|
};
|
|
11615
11702
|
|
|
11616
11703
|
var isWindowDefined$2 = typeof window !== 'undefined';
|
|
@@ -11801,10 +11888,10 @@ var Influancers = function Influancers(props) {
|
|
|
11801
11888
|
var data = props.data,
|
|
11802
11889
|
classNamePrefix = props.classNamePrefix,
|
|
11803
11890
|
_props$headerNode = props.headerNode,
|
|
11804
|
-
headerNode = _props$headerNode === void 0 ?
|
|
11891
|
+
headerNode = _props$headerNode === void 0 ? React__default.createElement(React__default.Fragment, null, "TOP", React__default.createElement("span", null, "\xA0INFLUANCERS")) : _props$headerNode;
|
|
11805
11892
|
return React__default.createElement("div", {
|
|
11806
11893
|
className: classNamePrefix + "_influencers_container"
|
|
11807
|
-
}, React__default.createElement("div", {
|
|
11894
|
+
}, !_isEmpty(data) && React__default.createElement("div", {
|
|
11808
11895
|
className: classNamePrefix + "_influencers_header"
|
|
11809
11896
|
}, headerNode), React__default.createElement("div", {
|
|
11810
11897
|
className: classNamePrefix + "_influencers"
|
|
@@ -11828,7 +11915,9 @@ var PreRegistrationInformations = function PreRegistrationInformations(props) {
|
|
|
11828
11915
|
_props$onGetPreregist = props.onGetPreregistrationDataSuccess,
|
|
11829
11916
|
onGetPreregistrationDataSuccess = _props$onGetPreregist === void 0 ? _identity : _props$onGetPreregist,
|
|
11830
11917
|
_props$onGetPreregist2 = props.onGetPreregistrationDataError,
|
|
11831
|
-
onGetPreregistrationDataError = _props$onGetPreregist2 === void 0 ? _identity : _props$onGetPreregist2
|
|
11918
|
+
onGetPreregistrationDataError = _props$onGetPreregist2 === void 0 ? _identity : _props$onGetPreregist2,
|
|
11919
|
+
influancersHeaderNode = props.influancersHeaderNode,
|
|
11920
|
+
prewardsHeaderNode = props.prewardsHeaderNode;
|
|
11832
11921
|
var _useState = React.useState([]),
|
|
11833
11922
|
prizes = _useState[0],
|
|
11834
11923
|
setPrizes = _useState[1];
|
|
@@ -11875,9 +11964,11 @@ var PreRegistrationInformations = function PreRegistrationInformations(props) {
|
|
|
11875
11964
|
return React__default.createElement("div", {
|
|
11876
11965
|
className: classNamePrefix + "_pre_registration_info_container"
|
|
11877
11966
|
}, React__default.createElement(Prewards, {
|
|
11967
|
+
headerNode: prewardsHeaderNode,
|
|
11878
11968
|
data: prizes,
|
|
11879
11969
|
classNamePrefix: classNamePrefix
|
|
11880
11970
|
}), React__default.createElement(Influancers, {
|
|
11971
|
+
headerNode: influancersHeaderNode,
|
|
11881
11972
|
data: influencers,
|
|
11882
11973
|
classNamePrefix: classNamePrefix
|
|
11883
11974
|
}));
|