tf-checkout-react 1.6.2 → 1.6.4

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.
@@ -7,5 +7,6 @@ export interface ITicketResaleContainer {
7
7
  onDeclineTicketPurchaseError: (e: AxiosError) => void;
8
8
  orderHash?: string;
9
9
  billingPath?: string;
10
+ defaultRedirection?: boolean;
10
11
  }
11
- export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, billingPath, }: ITicketResaleContainer) => JSX.Element;
12
+ export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, billingPath, defaultRedirection, }: ITicketResaleContainer) => JSX.Element;
@@ -2592,7 +2592,7 @@ function isFalsy(item) {
2592
2592
  }
2593
2593
  var requiredValidator = function requiredValidator(value, message) {
2594
2594
  var errorMessage = '';
2595
- if (isFalsy(value)) {
2595
+ if (isFalsy(typeof value === 'string' ? value.trim() : value)) {
2596
2596
  errorMessage = message || 'Required';
2597
2597
  }
2598
2598
  return errorMessage;
@@ -4263,7 +4263,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
4263
4263
  }) || {};
4264
4264
  var initialCountry = selectedCountry.id || _get(userData, 'countryId', '') || '1';
4265
4265
  var pageUrl = isBrowser ? window.location.href.split('?')[0] : '';
4266
- usePixel(eventId || '', {
4266
+ usePixel(eventId || (cartInfoData == null ? void 0 : cartInfoData.eventId), {
4267
4267
  page: 'billing',
4268
4268
  pageUrl: pageUrl
4269
4269
  });
@@ -9024,7 +9024,9 @@ var TicketResaleContainer = function TicketResaleContainer(_ref) {
9024
9024
  _ref$onDeclineTicketP2 = _ref.onDeclineTicketPurchaseError,
9025
9025
  onDeclineTicketPurchaseError = _ref$onDeclineTicketP2 === void 0 ? function () {} : _ref$onDeclineTicketP2,
9026
9026
  orderHash = _ref.orderHash,
9027
- billingPath = _ref.billingPath;
9027
+ billingPath = _ref.billingPath,
9028
+ _ref$defaultRedirecti = _ref.defaultRedirection,
9029
+ defaultRedirection = _ref$defaultRedirecti === void 0 ? true : _ref$defaultRedirecti;
9028
9030
  var isWindowDefined = typeof window !== 'undefined';
9029
9031
  var _useState = React.useState(''),
9030
9032
  error = _useState[0],
@@ -9077,7 +9079,9 @@ var TicketResaleContainer = function TicketResaleContainer(_ref) {
9077
9079
  _response = _context.sent;
9078
9080
  event_id = _get(_response.data.data.attributes, 'event_id');
9079
9081
  onProcessTicketSuccess(_response.data);
9080
- window.location.href = (billingPath != null ? billingPath : '/billing/billing-info') + "?event_id=" + event_id;
9082
+ if (defaultRedirection) {
9083
+ window.location.href = (billingPath != null ? billingPath : '/billing/billing-info') + "?event_id=" + event_id;
9084
+ }
9081
9085
  _context.next = 32;
9082
9086
  break;
9083
9087
  case 28: