tf-checkout-react 1.3.8 → 1.3.10
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/ticketsContainer/index.d.ts +1 -0
- package/dist/tf-checkout-react.cjs.development.js +34 -24
- 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 +34 -24
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +6 -1
- package/src/components/confirmationContainer/index.tsx +8 -2
- package/src/components/ticketsContainer/index.tsx +3 -0
|
@@ -3048,7 +3048,8 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
3048
3048
|
|
|
3049
3049
|
var expirationTime = _get(cartInfoData, 'expiresAt');
|
|
3050
3050
|
|
|
3051
|
-
var flagRequirePhone = getQueryVariable('phone_required') === 'true';
|
|
3051
|
+
var flagRequirePhone = getQueryVariable('phone_required') === 'true';
|
|
3052
|
+
var hidePhoneField = getQueryVariable('hide_phone_field') === 'true'; // Get prevProps
|
|
3052
3053
|
|
|
3053
3054
|
var prevData = useRef(data);
|
|
3054
3055
|
|
|
@@ -3603,7 +3604,11 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
3603
3604
|
}
|
|
3604
3605
|
|
|
3605
3606
|
if (el.name === 'phone') {
|
|
3606
|
-
|
|
3607
|
+
if (!hidePhoneField) {
|
|
3608
|
+
el.required = flagRequirePhone;
|
|
3609
|
+
} else {
|
|
3610
|
+
return false;
|
|
3611
|
+
}
|
|
3607
3612
|
}
|
|
3608
3613
|
|
|
3609
3614
|
return true;
|
|
@@ -4727,14 +4732,17 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4727
4732
|
className: "title"
|
|
4728
4733
|
}, confirmationTitle), React.createElement("div", {
|
|
4729
4734
|
className: "share-message-section",
|
|
4730
|
-
dangerouslySetInnerHTML: data.custom_confirmation_page_text ? createMarkup(data.custom_confirmation_page_text) : undefined
|
|
4731
|
-
}, data.custom_confirmation_page_text ? undefined : React.createElement(React.Fragment, null, data.attach_tickets ? React.createElement("span", {
|
|
4735
|
+
dangerouslySetInnerHTML: data.custom_confirmation_page_text && data.custom_confirmation_page_text_full_replacement ? createMarkup(data.custom_confirmation_page_text) : undefined
|
|
4736
|
+
}, data.custom_confirmation_page_text && data.custom_confirmation_page_text_full_replacement ? undefined : React.createElement(React.Fragment, null, data.attach_tickets ? React.createElement("span", {
|
|
4732
4737
|
className: "main"
|
|
4733
4738
|
}, "Your tickets have been emailed to you") : React.createElement("span", {
|
|
4734
4739
|
className: "main"
|
|
4735
4740
|
}, confirmationMain), React.createElement("span", {
|
|
4736
4741
|
className: "helper"
|
|
4737
|
-
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper))))), data.
|
|
4742
|
+
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper))))), data.custom_confirmation_page_text && !data.custom_confirmation_page_text_full_replacement ? React.createElement("div", {
|
|
4743
|
+
className: 'custom-confirmation-page-text',
|
|
4744
|
+
dangerouslySetInnerHTML: createMarkup(data.custom_confirmation_page_text)
|
|
4745
|
+
}) : null, data.disable_referral === false && isReferralEnabled && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
4738
4746
|
className: "referral_text_image_section"
|
|
4739
4747
|
}, React.createElement("div", {
|
|
4740
4748
|
className: "referral_text_section"
|
|
@@ -5635,7 +5643,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5635
5643
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
5636
5644
|
var _product_options, _product_options2, _ticket_types;
|
|
5637
5645
|
|
|
5638
|
-
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$has_, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hasAddOn, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult;
|
|
5646
|
+
var ticket, optionName, ticketId, ticketQuantity, data, result, pageConfigsDataResponse, _pageConfigsData$skip, _pageConfigsData$name, _pageConfigsData$age_, _pageConfigsData$phon, _pageConfigsData$hide, _pageConfigsData$has_, pageConfigsData, skipBillingPage, nameIsRequired, ageIsRequired, phoneIsRequired, hidePhoneField, hasAddOn, hash, total, _isWindowDefined, userData, access_token, checkoutBody, checkoutResult;
|
|
5639
5647
|
|
|
5640
5648
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
5641
5649
|
while (1) {
|
|
@@ -5692,7 +5700,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5692
5700
|
pageConfigsDataResponse = _context2.t0;
|
|
5693
5701
|
|
|
5694
5702
|
if (!(result.status === 200 && pageConfigsDataResponse.status === 200)) {
|
|
5695
|
-
_context2.next =
|
|
5703
|
+
_context2.next = 45;
|
|
5696
5704
|
break;
|
|
5697
5705
|
}
|
|
5698
5706
|
|
|
@@ -5701,6 +5709,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5701
5709
|
nameIsRequired = (_pageConfigsData$name = pageConfigsData.names_required) != null ? _pageConfigsData$name : false;
|
|
5702
5710
|
ageIsRequired = (_pageConfigsData$age_ = pageConfigsData.age_required) != null ? _pageConfigsData$age_ : false;
|
|
5703
5711
|
phoneIsRequired = (_pageConfigsData$phon = pageConfigsData.phone_required) != null ? _pageConfigsData$phon : false;
|
|
5712
|
+
hidePhoneField = (_pageConfigsData$hide = pageConfigsData.hide_phone_field) != null ? _pageConfigsData$hide : false;
|
|
5704
5713
|
hasAddOn = (_pageConfigsData$has_ = pageConfigsData.has_add_on) != null ? _pageConfigsData$has_ : false;
|
|
5705
5714
|
hash = '';
|
|
5706
5715
|
total = '';
|
|
@@ -5708,7 +5717,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5708
5717
|
_isWindowDefined && window.localStorage.removeItem('add_ons');
|
|
5709
5718
|
|
|
5710
5719
|
if (!(skipBillingPage && !hasAddOn)) {
|
|
5711
|
-
_context2.next =
|
|
5720
|
+
_context2.next = 44;
|
|
5712
5721
|
break;
|
|
5713
5722
|
}
|
|
5714
5723
|
|
|
@@ -5718,44 +5727,45 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5718
5727
|
checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketQuantity, userData);
|
|
5719
5728
|
|
|
5720
5729
|
if (!enableBillingInfoAutoCreate) {
|
|
5721
|
-
_context2.next =
|
|
5730
|
+
_context2.next = 40;
|
|
5722
5731
|
break;
|
|
5723
5732
|
}
|
|
5724
5733
|
|
|
5725
|
-
_context2.next =
|
|
5734
|
+
_context2.next = 37;
|
|
5726
5735
|
return postOnCheckout(checkoutBody, access_token);
|
|
5727
5736
|
|
|
5728
|
-
case
|
|
5737
|
+
case 37:
|
|
5729
5738
|
_context2.t1 = _context2.sent;
|
|
5730
|
-
_context2.next =
|
|
5739
|
+
_context2.next = 41;
|
|
5731
5740
|
break;
|
|
5732
5741
|
|
|
5733
|
-
case
|
|
5742
|
+
case 40:
|
|
5734
5743
|
_context2.t1 = null;
|
|
5735
5744
|
|
|
5736
|
-
case
|
|
5745
|
+
case 41:
|
|
5737
5746
|
checkoutResult = _context2.t1;
|
|
5738
5747
|
hash = _get(checkoutResult, 'data.data.attributes.hash');
|
|
5739
5748
|
total = _get(checkoutResult, 'data.data.attributes.total');
|
|
5740
5749
|
|
|
5741
|
-
case
|
|
5750
|
+
case 44:
|
|
5742
5751
|
onAddToCartSuccess({
|
|
5743
5752
|
skip_billing_page: skipBillingPage,
|
|
5744
5753
|
names_required: nameIsRequired,
|
|
5745
5754
|
phone_required: phoneIsRequired,
|
|
5746
5755
|
age_required: ageIsRequired,
|
|
5756
|
+
hide_phone_field: hidePhoneField,
|
|
5747
5757
|
event_id: String(eventId),
|
|
5748
5758
|
hash: hash,
|
|
5749
5759
|
total: total,
|
|
5750
5760
|
hasAddOn: hasAddOn
|
|
5751
5761
|
});
|
|
5752
5762
|
|
|
5753
|
-
case
|
|
5754
|
-
_context2.next =
|
|
5763
|
+
case 45:
|
|
5764
|
+
_context2.next = 50;
|
|
5755
5765
|
break;
|
|
5756
5766
|
|
|
5757
|
-
case
|
|
5758
|
-
_context2.prev =
|
|
5767
|
+
case 47:
|
|
5768
|
+
_context2.prev = 47;
|
|
5759
5769
|
_context2.t2 = _context2["catch"](6);
|
|
5760
5770
|
|
|
5761
5771
|
if (axios.isAxiosError(_context2.t2)) {
|
|
@@ -5763,17 +5773,17 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5763
5773
|
setError(_get(_context2.t2, 'response.data.message'));
|
|
5764
5774
|
}
|
|
5765
5775
|
|
|
5766
|
-
case
|
|
5767
|
-
_context2.prev =
|
|
5776
|
+
case 50:
|
|
5777
|
+
_context2.prev = 50;
|
|
5768
5778
|
setHandleBookIsLoading(false);
|
|
5769
|
-
return _context2.finish(
|
|
5779
|
+
return _context2.finish(50);
|
|
5770
5780
|
|
|
5771
|
-
case
|
|
5781
|
+
case 53:
|
|
5772
5782
|
case "end":
|
|
5773
5783
|
return _context2.stop();
|
|
5774
5784
|
}
|
|
5775
5785
|
}
|
|
5776
|
-
}, _callee2, null, [[6,
|
|
5786
|
+
}, _callee2, null, [[6, 47, 50, 53]]);
|
|
5777
5787
|
}));
|
|
5778
5788
|
|
|
5779
5789
|
return function handleBook() {
|