tf-checkout-react 1.3.14 → 1.3.15
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 +349 -160
- package/dist/components/confirmModal/index.d.ts +1 -1
- package/dist/components/ticketsContainer/index.d.ts +5 -1
- package/dist/tf-checkout-react.cjs.development.js +155 -74
- 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 +156 -75
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -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 +15 -5
- package/src/components/common/CustomField.tsx +25 -22
- package/src/components/common/dist/PhoneNumberField.js +96 -0
- package/src/components/confirmModal/index.tsx +16 -9
- package/src/components/ticketsContainer/index.tsx +57 -3
|
@@ -14,6 +14,8 @@ interface CartSuccess {
|
|
|
14
14
|
total?: string;
|
|
15
15
|
hasAddOn?: boolean;
|
|
16
16
|
free_ticket: boolean;
|
|
17
|
+
collect_optional_wallet_address?: boolean;
|
|
18
|
+
collect_mandatory_wallet_address?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface IGetTickets {
|
|
19
21
|
eventId: number;
|
|
@@ -26,6 +28,8 @@ export interface IGetTickets {
|
|
|
26
28
|
onLogoutSuccess: () => void;
|
|
27
29
|
onLogoutError: (e: AxiosError) => void;
|
|
28
30
|
onLoginSuccess: () => void;
|
|
31
|
+
handleNotInvitedModalClose: () => void;
|
|
32
|
+
handleInvalidLinkModalClose: () => void;
|
|
29
33
|
theme?: 'light' | 'dark';
|
|
30
34
|
queryPromoCode?: string;
|
|
31
35
|
isPromotionsEnabled?: boolean;
|
|
@@ -54,5 +58,5 @@ export interface ITicket {
|
|
|
54
58
|
export interface ISelectedTickets {
|
|
55
59
|
[key: string]: string | number;
|
|
56
60
|
}
|
|
57
|
-
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, }: IGetTickets) => JSX.Element;
|
|
61
|
+
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, }: IGetTickets) => JSX.Element;
|
|
58
62
|
export {};
|
|
@@ -1330,7 +1330,6 @@ function getEvent(id, pk) {
|
|
|
1330
1330
|
var referralIdlocal = '';
|
|
1331
1331
|
|
|
1332
1332
|
if (referral_key) {
|
|
1333
|
-
// eslint-disable-next-line prefer-destructuring
|
|
1334
1333
|
referralIdlocal = referral_key.split('.')[1];
|
|
1335
1334
|
}
|
|
1336
1335
|
|
|
@@ -1351,9 +1350,11 @@ function getEvent(id, pk) {
|
|
|
1351
1350
|
return response;
|
|
1352
1351
|
}
|
|
1353
1352
|
function getTickets(id, promoCode, pk) {
|
|
1353
|
+
var invitationHash = getQueryVariable('invitation-hash');
|
|
1354
1354
|
var response = publicRequest.get("v1/event/" + id + "/tickets", {
|
|
1355
1355
|
params: {
|
|
1356
|
-
pk: pk
|
|
1356
|
+
pk: pk,
|
|
1357
|
+
'invitation-hash': invitationHash
|
|
1357
1358
|
},
|
|
1358
1359
|
headers: promoCode ? _extends({}, ttfHeaders, {
|
|
1359
1360
|
'Promotion-Event': String(id),
|
|
@@ -1611,6 +1612,11 @@ var CustomField = function CustomField(_ref) {
|
|
|
1611
1612
|
_ref$InputProps = _ref.InputProps,
|
|
1612
1613
|
InputProps = _ref$InputProps === void 0 ? {} : _ref$InputProps,
|
|
1613
1614
|
inputRef = _ref.inputRef;
|
|
1615
|
+
|
|
1616
|
+
var _useState = React.useState(Boolean(field.value)),
|
|
1617
|
+
isShrinked = _useState[0],
|
|
1618
|
+
setIsShrinked = _useState[1];
|
|
1619
|
+
|
|
1614
1620
|
var isSelectField = type === 'select';
|
|
1615
1621
|
|
|
1616
1622
|
var error = _get(errors, field.name);
|
|
@@ -1621,6 +1627,7 @@ var CustomField = function CustomField(_ref) {
|
|
|
1621
1627
|
sx: customTheme == null ? void 0 : customTheme.input
|
|
1622
1628
|
};
|
|
1623
1629
|
return React__default.createElement(TextField, Object.assign({
|
|
1630
|
+
placeholder: "",
|
|
1624
1631
|
id: field.name,
|
|
1625
1632
|
label: label,
|
|
1626
1633
|
type: type,
|
|
@@ -1628,6 +1635,9 @@ var CustomField = function CustomField(_ref) {
|
|
|
1628
1635
|
fullWidth: true,
|
|
1629
1636
|
error: !!error && isTouched,
|
|
1630
1637
|
helperText: isTouched && error,
|
|
1638
|
+
onFocus: function onFocus() {
|
|
1639
|
+
setIsShrinked(true);
|
|
1640
|
+
},
|
|
1631
1641
|
SelectProps: {
|
|
1632
1642
|
"native": true,
|
|
1633
1643
|
className: theme,
|
|
@@ -1636,12 +1646,21 @@ var CustomField = function CustomField(_ref) {
|
|
|
1636
1646
|
}
|
|
1637
1647
|
},
|
|
1638
1648
|
InputLabelProps: {
|
|
1639
|
-
sx: customTheme == null ? void 0 : customTheme.input
|
|
1649
|
+
sx: customTheme == null ? void 0 : customTheme.input,
|
|
1650
|
+
shrink: isShrinked || Boolean(field.value)
|
|
1640
1651
|
},
|
|
1641
1652
|
InputProps: InputProps,
|
|
1642
1653
|
inputProps: _extends({}, inputProps, pInputProps),
|
|
1643
1654
|
inputRef: inputRef
|
|
1644
|
-
}, field
|
|
1655
|
+
}, field, {
|
|
1656
|
+
onBlur: function onBlur(e) {
|
|
1657
|
+
setIsShrinked(Boolean(field.value));
|
|
1658
|
+
|
|
1659
|
+
if (field.onBlur) {
|
|
1660
|
+
field.onBlur(e);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}), isSelectField ? _map(selectOptions, function (option) {
|
|
1645
1664
|
return React__default.createElement("option", {
|
|
1646
1665
|
key: option.value,
|
|
1647
1666
|
value: option.value,
|
|
@@ -3058,6 +3077,8 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
3058
3077
|
var expirationTime = _get(cartInfoData, 'expiresAt');
|
|
3059
3078
|
|
|
3060
3079
|
var flagRequirePhone = getQueryVariable('phone_required') === 'true';
|
|
3080
|
+
var collectOptionalWalletAddress = getQueryVariable('collect_optional_wallet_address') === 'true';
|
|
3081
|
+
var collectMandatoryWalletAddress = getQueryVariable('collect_mandatory_wallet_address') === 'true';
|
|
3061
3082
|
var flagFreeTicket = getQueryVariable('free_ticket') === 'true';
|
|
3062
3083
|
var hidePhoneField = getQueryVariable('hide_phone_field') === 'true'; // Get prevProps
|
|
3063
3084
|
|
|
@@ -3628,14 +3649,17 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
3628
3649
|
}
|
|
3629
3650
|
}
|
|
3630
3651
|
|
|
3631
|
-
if (el.name === '
|
|
3632
|
-
if (
|
|
3652
|
+
if (el.name === 'data_capture[wallet_address]') {
|
|
3653
|
+
if (collectOptionalWalletAddress) {
|
|
3633
3654
|
el.required = false;
|
|
3634
|
-
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
if (collectMandatoryWalletAddress) {
|
|
3658
|
+
el.required = true;
|
|
3635
3659
|
}
|
|
3636
3660
|
}
|
|
3637
3661
|
|
|
3638
|
-
if (
|
|
3662
|
+
if (['street_address', 'country', 'state', 'city', 'zip'].includes(el.name)) {
|
|
3639
3663
|
if (flagFreeTicket) {
|
|
3640
3664
|
el.required = false;
|
|
3641
3665
|
return false;
|
|
@@ -3651,7 +3675,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
3651
3675
|
}, element.component ? element.component : React__default.createElement(formik.Field, {
|
|
3652
3676
|
setPhoneValidationIsLoading: element.type === 'phone' ? setPhoneValidationIsLoading : undefined,
|
|
3653
3677
|
name: element.name,
|
|
3654
|
-
label: element.name === 'phone' ? "" + element.label + (flagRequirePhone ? '' : ' (optional)') + " " : element.label,
|
|
3678
|
+
label: element.name === 'phone' ? "" + element.label + (flagRequirePhone ? '' : ' (optional)') + " " : element.name === 'data_capture[wallet_address]' ? "" + element.label + (collectOptionalWalletAddress ? ' (optional)' : '') + " " : element.label,
|
|
3655
3679
|
type: element.type,
|
|
3656
3680
|
fill: element.fill,
|
|
3657
3681
|
validate: getValidateFunctions(element, states, props.values, props.errors),
|
|
@@ -4849,6 +4873,51 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4849
4873
|
}))))));
|
|
4850
4874
|
};
|
|
4851
4875
|
|
|
4876
|
+
var style$3 = {
|
|
4877
|
+
position: 'absolute',
|
|
4878
|
+
top: '50%',
|
|
4879
|
+
left: '50%',
|
|
4880
|
+
transform: 'translate(-50%, -50%)',
|
|
4881
|
+
minWidth: 480,
|
|
4882
|
+
backgroundColor: '#e3e3e3',
|
|
4883
|
+
border: '1px solid white',
|
|
4884
|
+
outline: 'none',
|
|
4885
|
+
padding: '14px',
|
|
4886
|
+
maxHeight: '85vh',
|
|
4887
|
+
overflow: 'auto'
|
|
4888
|
+
};
|
|
4889
|
+
|
|
4890
|
+
var ConfirmModal = function ConfirmModal(_ref) {
|
|
4891
|
+
var _ref$message = _ref.message,
|
|
4892
|
+
message = _ref$message === void 0 ? '' : _ref$message,
|
|
4893
|
+
_ref$loading = _ref.loading,
|
|
4894
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
4895
|
+
_ref$hideCancelBtn = _ref.hideCancelBtn,
|
|
4896
|
+
hideCancelBtn = _ref$hideCancelBtn === void 0 ? false : _ref$hideCancelBtn,
|
|
4897
|
+
_ref$onClose = _ref.onClose,
|
|
4898
|
+
onClose = _ref$onClose === void 0 ? _identity : _ref$onClose,
|
|
4899
|
+
_ref$onConfirm = _ref.onConfirm,
|
|
4900
|
+
onConfirm = _ref$onConfirm === void 0 ? _identity : _ref$onConfirm;
|
|
4901
|
+
return React__default.createElement(Modal, {
|
|
4902
|
+
open: true,
|
|
4903
|
+
onClose: onClose,
|
|
4904
|
+
"aria-labelledby": "modal-modal-title",
|
|
4905
|
+
"aria-describedby": "modal-modal-description",
|
|
4906
|
+
className: "confirm-modal"
|
|
4907
|
+
}, React__default.createElement(Box, {
|
|
4908
|
+
style: style$3
|
|
4909
|
+
}, React__default.createElement("p", null, message), React__default.createElement("div", {
|
|
4910
|
+
className: "footer"
|
|
4911
|
+
}, !hideCancelBtn && React__default.createElement(Button, {
|
|
4912
|
+
onClick: onClose,
|
|
4913
|
+
disabled: loading
|
|
4914
|
+
}, "Cancel"), React__default.createElement(Button, {
|
|
4915
|
+
onClick: onConfirm
|
|
4916
|
+
}, loading ? React__default.createElement(CircularProgress, {
|
|
4917
|
+
size: "22px"
|
|
4918
|
+
}) : 'OK'))));
|
|
4919
|
+
};
|
|
4920
|
+
|
|
4852
4921
|
var isTimeExpired = function isTimeExpired(startDate, timezone) {
|
|
4853
4922
|
return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'));
|
|
4854
4923
|
};
|
|
@@ -5427,7 +5496,11 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5427
5496
|
_ref$enableInfluencer = _ref.enableInfluencersSection,
|
|
5428
5497
|
enableInfluencersSection = _ref$enableInfluencer === void 0 ? true : _ref$enableInfluencer,
|
|
5429
5498
|
_ref$enableAddOns = _ref.enableAddOns,
|
|
5430
|
-
enableAddOns = _ref$enableAddOns === void 0 ? true : _ref$enableAddOns
|
|
5499
|
+
enableAddOns = _ref$enableAddOns === void 0 ? true : _ref$enableAddOns,
|
|
5500
|
+
_ref$handleNotInvited = _ref.handleNotInvitedModalClose,
|
|
5501
|
+
handleNotInvitedModalClose = _ref$handleNotInvited === void 0 ? _identity : _ref$handleNotInvited,
|
|
5502
|
+
_ref$handleInvalidLin = _ref.handleInvalidLinkModalClose,
|
|
5503
|
+
handleInvalidLinkModalClose = _ref$handleInvalidLin === void 0 ? _identity : _ref$handleInvalidLin;
|
|
5431
5504
|
|
|
5432
5505
|
var _useState = React.useState({}),
|
|
5433
5506
|
selectedTickets = _useState[0],
|
|
@@ -5496,6 +5569,14 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5496
5569
|
error = _useState16[0],
|
|
5497
5570
|
setError = _useState16[1];
|
|
5498
5571
|
|
|
5572
|
+
var _useState17 = React.useState(''),
|
|
5573
|
+
isNotInvitedError = _useState17[0],
|
|
5574
|
+
setIsNotInvitedError = _useState17[1];
|
|
5575
|
+
|
|
5576
|
+
var _useState18 = React.useState(''),
|
|
5577
|
+
isInvalidLinkError = _useState18[0],
|
|
5578
|
+
setIsInvalidLinkError = _useState18[1];
|
|
5579
|
+
|
|
5499
5580
|
var ticketsContainerRef = React.useRef(null);
|
|
5500
5581
|
React.useEffect(function () {
|
|
5501
5582
|
if (typeof window !== 'undefined') {
|
|
@@ -5674,7 +5755,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5674
5755
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
5675
5756
|
var _product_options, _product_options2, _ticket_types;
|
|
5676
5757
|
|
|
5677
|
-
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult;
|
|
5758
|
+
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, _pageConfigsData$free, _pageConfigsData$coll, _pageConfigsData$coll2, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, freeTicket, collectOptionalWalletAddress, collectMandatoryWalletAddress, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult, message, _isInvalidLinkError, _isNotInvitedError;
|
|
5678
5759
|
|
|
5679
5760
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
5680
5761
|
while (1) {
|
|
@@ -5731,7 +5812,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5731
5812
|
pageConfigsDataResponse = _context2.t0;
|
|
5732
5813
|
|
|
5733
5814
|
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
5734
|
-
_context2.next =
|
|
5815
|
+
_context2.next = 48;
|
|
5735
5816
|
break;
|
|
5736
5817
|
}
|
|
5737
5818
|
|
|
@@ -5743,13 +5824,15 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5743
5824
|
hidePhoneField = (_pageConfigsData$hide = pageConfigsData.hide_phone_field) != null ? _pageConfigsData$hide : false;
|
|
5744
5825
|
hasAddOn = (_pageConfigsData$has_ = pageConfigsData.has_add_on) != null ? _pageConfigsData$has_ : false;
|
|
5745
5826
|
freeTicket = (_pageConfigsData$free = pageConfigsData.free_ticket) != null ? _pageConfigsData$free : false;
|
|
5827
|
+
collectOptionalWalletAddress = (_pageConfigsData$coll = pageConfigsData.collect_optional_wallet_address) != null ? _pageConfigsData$coll : false;
|
|
5828
|
+
collectMandatoryWalletAddress = (_pageConfigsData$coll2 = pageConfigsData.collect_mandatory_wallet_address) != null ? _pageConfigsData$coll2 : false;
|
|
5746
5829
|
hash = '';
|
|
5747
5830
|
total = '';
|
|
5748
5831
|
_isWindowDefined = typeof window !== 'undefined';
|
|
5749
5832
|
_isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
5750
5833
|
|
|
5751
5834
|
if (!(skipBillingPage && !hasAddOn)) {
|
|
5752
|
-
_context2.next =
|
|
5835
|
+
_context2.next = 47;
|
|
5753
5836
|
break;
|
|
5754
5837
|
}
|
|
5755
5838
|
|
|
@@ -5759,27 +5842,27 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5759
5842
|
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
5760
5843
|
|
|
5761
5844
|
if (!enableBillingInfoAutoCreate) {
|
|
5762
|
-
_context2.next =
|
|
5845
|
+
_context2.next = 43;
|
|
5763
5846
|
break;
|
|
5764
5847
|
}
|
|
5765
5848
|
|
|
5766
|
-
_context2.next =
|
|
5849
|
+
_context2.next = 40;
|
|
5767
5850
|
return postOnCheckout(checkoutBody, access_token);
|
|
5768
5851
|
|
|
5769
|
-
case
|
|
5852
|
+
case 40:
|
|
5770
5853
|
_context2.t1 = _context2.sent;
|
|
5771
|
-
_context2.next =
|
|
5854
|
+
_context2.next = 44;
|
|
5772
5855
|
break;
|
|
5773
5856
|
|
|
5774
|
-
case
|
|
5857
|
+
case 43:
|
|
5775
5858
|
_context2.t1 = null;
|
|
5776
5859
|
|
|
5777
|
-
case
|
|
5860
|
+
case 44:
|
|
5778
5861
|
checkoutResult = _context2.t1;
|
|
5779
5862
|
hash = _get(checkoutResult, 'data.data.attributes.hash');
|
|
5780
5863
|
total = _get(checkoutResult, 'data.data.attributes.total');
|
|
5781
5864
|
|
|
5782
|
-
case
|
|
5865
|
+
case 47:
|
|
5783
5866
|
onAddToCartSuccess({
|
|
5784
5867
|
skip_billing_page: skipBillingPage,
|
|
5785
5868
|
names_required: nameIsRequired,
|
|
@@ -5787,36 +5870,48 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5787
5870
|
age_required: ageIsRequired,
|
|
5788
5871
|
hide_phone_field: hidePhoneField,
|
|
5789
5872
|
free_ticket: freeTicket,
|
|
5873
|
+
collect_optional_wallet_address: collectOptionalWalletAddress,
|
|
5874
|
+
collect_mandatory_wallet_address: collectMandatoryWalletAddress,
|
|
5790
5875
|
event_id: String(eventId),
|
|
5791
5876
|
hash: hash,
|
|
5792
5877
|
total: total,
|
|
5793
5878
|
hasAddOn: hasAddOn
|
|
5794
5879
|
});
|
|
5795
5880
|
|
|
5796
|
-
case
|
|
5797
|
-
_context2.next =
|
|
5881
|
+
case 48:
|
|
5882
|
+
_context2.next = 53;
|
|
5798
5883
|
break;
|
|
5799
5884
|
|
|
5800
|
-
case
|
|
5801
|
-
_context2.prev =
|
|
5885
|
+
case 50:
|
|
5886
|
+
_context2.prev = 50;
|
|
5802
5887
|
_context2.t2 = _context2["catch"](6);
|
|
5803
5888
|
|
|
5804
5889
|
if (axios.isAxiosError(_context2.t2)) {
|
|
5805
5890
|
onAddToCartError(_context2.t2);
|
|
5806
|
-
|
|
5891
|
+
message = _get(_context2.t2, 'response.data.message', '');
|
|
5892
|
+
_isInvalidLinkError = _includes(message, 'No more of this ticket type are available right now');
|
|
5893
|
+
_isNotInvitedError = _includes(message, 'You must have been invited to this event to attend');
|
|
5894
|
+
|
|
5895
|
+
if (_isInvalidLinkError) {
|
|
5896
|
+
setIsInvalidLinkError(message);
|
|
5897
|
+
} else if (_isNotInvitedError) {
|
|
5898
|
+
setIsNotInvitedError(message);
|
|
5899
|
+
} else {
|
|
5900
|
+
setError(message);
|
|
5901
|
+
}
|
|
5807
5902
|
}
|
|
5808
5903
|
|
|
5809
|
-
case
|
|
5810
|
-
_context2.prev =
|
|
5904
|
+
case 53:
|
|
5905
|
+
_context2.prev = 53;
|
|
5811
5906
|
setHandleBookIsLoading(false);
|
|
5812
|
-
return _context2.finish(
|
|
5907
|
+
return _context2.finish(53);
|
|
5813
5908
|
|
|
5814
|
-
case
|
|
5909
|
+
case 56:
|
|
5815
5910
|
case "end":
|
|
5816
5911
|
return _context2.stop();
|
|
5817
5912
|
}
|
|
5818
5913
|
}
|
|
5819
|
-
}, _callee2, null, [[6,
|
|
5914
|
+
}, _callee2, null, [[6, 50, 53, 56]]);
|
|
5820
5915
|
}));
|
|
5821
5916
|
|
|
5822
5917
|
return function handleBook() {
|
|
@@ -5882,6 +5977,17 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5882
5977
|
return false;
|
|
5883
5978
|
};
|
|
5884
5979
|
|
|
5980
|
+
var _onClose = function onClose(value) {
|
|
5981
|
+
if (value === 'notInvited') {
|
|
5982
|
+
handleNotInvitedModalClose();
|
|
5983
|
+
} else if (value === 'invalidLink') {
|
|
5984
|
+
handleInvalidLinkModalClose();
|
|
5985
|
+
}
|
|
5986
|
+
|
|
5987
|
+
setIsNotInvitedError('');
|
|
5988
|
+
setIsInvalidLinkError('');
|
|
5989
|
+
};
|
|
5990
|
+
|
|
5885
5991
|
return React__default.createElement(privateTheming.ThemeProvider, {
|
|
5886
5992
|
theme: themeMui
|
|
5887
5993
|
}, !isLoading && React__default.createElement(ReferralLogic, {
|
|
@@ -5889,7 +5995,25 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5889
5995
|
}), React__default.createElement("div", {
|
|
5890
5996
|
className: "get-tickets-page " + theme,
|
|
5891
5997
|
style: contentStyle
|
|
5892
|
-
},
|
|
5998
|
+
}, isInvalidLinkError && React__default.createElement(ConfirmModal, {
|
|
5999
|
+
message: isInvalidLinkError,
|
|
6000
|
+
hideCancelBtn: true,
|
|
6001
|
+
onClose: function onClose() {
|
|
6002
|
+
return _onClose('invalidLink');
|
|
6003
|
+
},
|
|
6004
|
+
onConfirm: function onConfirm() {
|
|
6005
|
+
return _onClose('invalidLink');
|
|
6006
|
+
}
|
|
6007
|
+
}), isNotInvitedError && React__default.createElement(ConfirmModal, {
|
|
6008
|
+
hideCancelBtn: true,
|
|
6009
|
+
message: isNotInvitedError,
|
|
6010
|
+
onClose: function onClose() {
|
|
6011
|
+
return _onClose('notInvited');
|
|
6012
|
+
},
|
|
6013
|
+
onConfirm: function onConfirm() {
|
|
6014
|
+
return _onClose('notInvited');
|
|
6015
|
+
}
|
|
6016
|
+
}), error && React__default.createElement(Alert, {
|
|
5893
6017
|
severity: "error",
|
|
5894
6018
|
onClose: onErrorClose,
|
|
5895
6019
|
variant: "filled",
|
|
@@ -6217,49 +6341,6 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
|
|
|
6217
6341
|
})));
|
|
6218
6342
|
};
|
|
6219
6343
|
|
|
6220
|
-
var style$3 = {
|
|
6221
|
-
position: 'absolute',
|
|
6222
|
-
top: '50%',
|
|
6223
|
-
left: '50%',
|
|
6224
|
-
transform: 'translate(-50%, -50%)',
|
|
6225
|
-
minWidth: 480,
|
|
6226
|
-
backgroundColor: '#e3e3e3',
|
|
6227
|
-
border: '1px solid white',
|
|
6228
|
-
outline: 'none',
|
|
6229
|
-
padding: '14px',
|
|
6230
|
-
maxHeight: '85vh',
|
|
6231
|
-
overflow: 'auto'
|
|
6232
|
-
};
|
|
6233
|
-
|
|
6234
|
-
var ConfirmModal = function ConfirmModal(_ref) {
|
|
6235
|
-
var _ref$message = _ref.message,
|
|
6236
|
-
message = _ref$message === void 0 ? '' : _ref$message,
|
|
6237
|
-
_ref$loading = _ref.loading,
|
|
6238
|
-
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
6239
|
-
_ref$onClose = _ref.onClose,
|
|
6240
|
-
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
6241
|
-
_ref$onConfirm = _ref.onConfirm,
|
|
6242
|
-
onConfirm = _ref$onConfirm === void 0 ? function () {} : _ref$onConfirm;
|
|
6243
|
-
return React__default.createElement(Modal, {
|
|
6244
|
-
open: true,
|
|
6245
|
-
onClose: onClose,
|
|
6246
|
-
"aria-labelledby": "modal-modal-title",
|
|
6247
|
-
"aria-describedby": "modal-modal-description",
|
|
6248
|
-
className: 'confirm-modal'
|
|
6249
|
-
}, React__default.createElement(Box, {
|
|
6250
|
-
style: style$3
|
|
6251
|
-
}, React__default.createElement("p", null, message), React__default.createElement("div", {
|
|
6252
|
-
className: 'footer'
|
|
6253
|
-
}, React__default.createElement(Button, {
|
|
6254
|
-
onClick: onClose,
|
|
6255
|
-
disabled: loading
|
|
6256
|
-
}, "Cancel"), React__default.createElement(Button, {
|
|
6257
|
-
onClick: onConfirm
|
|
6258
|
-
}, loading ? React__default.createElement(CircularProgress, {
|
|
6259
|
-
size: "22px"
|
|
6260
|
-
}) : 'OK'))));
|
|
6261
|
-
};
|
|
6262
|
-
|
|
6263
6344
|
var _excluded$2 = ["label", "field", "theme", "disableDropdown"];
|
|
6264
6345
|
var RadioField = function RadioField(_ref) {
|
|
6265
6346
|
var label = _ref.label,
|