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