tf-checkout-react 1.3.48-beta.14 → 1.3.48-beta.16

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.
@@ -2811,15 +2811,18 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
2811
2811
  var _useState14 = React.useState(true),
2812
2812
  loading = _useState14[0],
2813
2813
  setLoading = _useState14[1];
2814
- var _useState15 = React.useState(true),
2815
- isCountriesLoading = _useState15[0],
2816
- setIsCountriesLoading = _useState15[1];
2817
- var _useState16 = React.useState(null),
2818
- error = _useState16[0],
2819
- setError = _useState16[1];
2820
- var _useState17 = React.useState(false),
2821
- phoneValidationIsLoading = _useState17[0],
2822
- setPhoneValidationIsLoading = _useState17[1];
2814
+ var _useState15 = React.useState(false),
2815
+ cardLoading = _useState15[0],
2816
+ setCardLoading = _useState15[1];
2817
+ var _useState16 = React.useState(true),
2818
+ isCountriesLoading = _useState16[0],
2819
+ setIsCountriesLoading = _useState16[1];
2820
+ var _useState17 = React.useState(null),
2821
+ error = _useState17[0],
2822
+ setError = _useState17[1];
2823
+ var _useState18 = React.useState(false),
2824
+ phoneValidationIsLoading = _useState18[0],
2825
+ setPhoneValidationIsLoading = _useState18[1];
2823
2826
  var emailLogged = _get(userData, 'email', '') || _get(userValues, 'email', '');
2824
2827
  var firstNameLogged = _get(userData, 'first_name', '') || _get(userValues, 'first_name', '');
2825
2828
  var lastNameLogged = _get(userData, 'last_name', '') || _get(userValues, 'last_name', '');
@@ -2828,6 +2831,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
2828
2831
  var eventId = getQueryVariable('event_id') || '';
2829
2832
  var optedInFieldValue = brandOptIn ? brandOptIn : _get(cartInfoData, 'optedIn', false);
2830
2833
  var ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false));
2834
+ var isTable = Boolean(_get(cartInfoData, 'is_table', false));
2831
2835
  var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true);
2832
2836
  var expirationTime = _get(cartInfoData, 'expiresAt');
2833
2837
  var flagRequirePhone = getQueryVariable('phone_required') === 'true';
@@ -2915,9 +2919,10 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
2915
2919
  while (1) switch (_context3.prev = _context3.next) {
2916
2920
  case 0:
2917
2921
  _context3.prev = 0;
2918
- _context3.next = 3;
2922
+ setCardLoading(true);
2923
+ _context3.next = 4;
2919
2924
  return getCart();
2920
- case 3:
2925
+ case 4:
2921
2926
  res = _context3.sent;
2922
2927
  setCustomHeader(res);
2923
2928
  cartInfo = _get(res, 'data.data.attributes');
@@ -2927,19 +2932,23 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
2927
2932
  return nanoid.nanoid();
2928
2933
  }));
2929
2934
  onGetCartSuccess(res.data);
2930
- _context3.next = 15;
2935
+ _context3.next = 16;
2931
2936
  break;
2932
- case 12:
2933
- _context3.prev = 12;
2937
+ case 13:
2938
+ _context3.prev = 13;
2934
2939
  _context3.t0 = _context3["catch"](0);
2935
2940
  if (axios.isAxiosError(_context3.t0)) {
2936
2941
  onGetCartError(_context3.t0);
2937
2942
  }
2938
- case 15:
2943
+ case 16:
2944
+ _context3.prev = 16;
2945
+ setCardLoading(false);
2946
+ return _context3.finish(16);
2947
+ case 19:
2939
2948
  case "end":
2940
2949
  return _context3.stop();
2941
2950
  }
2942
- }, _callee3, null, [[0, 12]]);
2951
+ }, _callee3, null, [[0, 13, 16, 19]]);
2943
2952
  }));
2944
2953
  return function fetchCart() {
2945
2954
  return _ref6.apply(this, arguments);
@@ -3075,9 +3084,12 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
3075
3084
  page: 'billing',
3076
3085
  pageUrl: pageUrl
3077
3086
  });
3087
+ if (isTable) {
3088
+ dataWithUniqueIds[0].label = 'Get Your Tables';
3089
+ }
3078
3090
  return React__default.createElement(styles.ThemeProvider, {
3079
3091
  theme: themeMui
3080
- }, (loading || isCountriesLoading) && React__default.createElement(Backdrop, {
3092
+ }, (loading || cardLoading || isCountriesLoading) && React__default.createElement(Backdrop, {
3081
3093
  sx: {
3082
3094
  color: '#fff',
3083
3095
  backgroundColor: '#000000bd',
@@ -3288,7 +3300,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
3288
3300
  }, React__default.createElement("img", {
3289
3301
  src: theme === 'dark' ? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg' : 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg',
3290
3302
  alt: "nodata"
3291
- })))), _map(dataWithUniqueIds, function (item) {
3303
+ })))), !cardLoading && _map(dataWithUniqueIds, function (item) {
3292
3304
  var label = item.label,
3293
3305
  labelClassName = item.labelClassName,
3294
3306
  fields = item.fields;
@@ -4024,6 +4036,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
4024
4036
  return currencyNormalizerCreator(createFixedFloatNormalizer(2)(parseFloat(value)), currency);
4025
4037
  }
4026
4038
  }] : paymentFields;
4039
+ var isTable = orderData == null ? void 0 : orderData.guest_count;
4027
4040
  return React__default.createElement(styles.ThemeProvider, {
4028
4041
  theme: themeMui
4029
4042
  }, React__default.createElement("div", {
@@ -4038,7 +4051,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
4038
4051
  variant: "filled"
4039
4052
  }, error), paymentDataIsLoading && React__default.createElement(Loader, null), !paymentDataIsLoading && React__default.createElement(Container, {
4040
4053
  maxWidth: "md"
4041
- }, showFormTitle && React__default.createElement("h1", null, formTitle), React__default.createElement("div", {
4054
+ }, showFormTitle && React__default.createElement("h1", null, isTable ? 'Get Your Tables' : formTitle), React__default.createElement("div", {
4042
4055
  className: "order_info_text"
4043
4056
  }, orderInfoLabel), React__default.createElement("div", {
4044
4057
  className: "order_info_section",
@@ -7831,7 +7844,7 @@ var TicketsSection$1 = function TicketsSection(props) {
7831
7844
  var numLength = endNum - startNum + 1;
7832
7845
  var showGuestCountDropdown = Boolean(startNum && endNum);
7833
7846
  // prices
7834
- var guestPrice = ((guestCounts[dropdownData.seatId] || startNum) - 1) * Number(selectedTicketData == null ? void 0 : selectedTicketData.guest_price);
7847
+ var guestPrice = (guestCounts[dropdownData.seatId] - startNum) * Number(selectedTicketData == null ? void 0 : selectedTicketData.guest_price);
7835
7848
  var finalPrice = createFixedFloatNormalizer(2)((selectedTicketData == null ? void 0 : selectedTicketData.ticket_type_price) + guestPrice);
7836
7849
  return React__default.createElement("div", {
7837
7850
  className: "ticket",