tf-checkout-react 1.3.19 → 1.3.22

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 CHANGED
@@ -49,6 +49,11 @@ This package containes Ticketfairy checkout functionality. Besides that package
49
49
 
50
50
  ## [WebFlow](/webflow/public/INTEGRATION.md)
51
51
 
52
+ ## Clients (Minimal version required)
53
+
54
+ - Mana Common (1.3.19)
55
+ - Restlesnites (1.3.3)
56
+
52
57
   
53
58
 
54
59
  # Getting started
@@ -19,6 +19,7 @@ interface OrderDetailsTypes {
19
19
  key: keyof ITicketTypes & keyof IActionColumns;
20
20
  label: string | number | null | undefined;
21
21
  }>;
22
+ ordersPath?: string;
22
23
  }
23
- export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, ticketsTableColumns, }: OrderDetailsTypes) => JSX.Element;
24
+ export declare const OrderDetailsContainer: ({ columns, onGetOrdersSuccess, onGetOrdersError, onRemoveFromResaleSuccess, onRemoveFromResaleError, onResaleTicketSuccess, onResaleTicketError, onReturnButtonClick, personalLinkIcon, displayColumnNameInRow, ticketsTableColumns, ordersPath, }: OrderDetailsTypes) => JSX.Element;
24
25
  export {};
@@ -6,5 +6,6 @@ export interface ITicketResaleContainer {
6
6
  onDeclineTicketPurchaseSuccess: (res: any) => void;
7
7
  onDeclineTicketPurchaseError: (e: AxiosError) => void;
8
8
  orderHash?: string;
9
+ billingPath?: string;
9
10
  }
10
- export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, }: ITicketResaleContainer) => JSX.Element;
11
+ export declare const TicketResaleContainer: ({ onProcessTicketSuccess, onProcessTicketError, onDeclineTicketPurchaseSuccess, onDeclineTicketPurchaseError, orderHash, billingPath, }: ITicketResaleContainer) => JSX.Element;
@@ -50,6 +50,7 @@ export interface IGetTickets {
50
50
  hideTicketsHeader?: boolean;
51
51
  enableInfluencersSection?: boolean;
52
52
  enableAddOns?: boolean;
53
+ ordersPath?: string;
53
54
  }
54
55
  export interface ITicket {
55
56
  id: string | number;
@@ -58,5 +59,5 @@ export interface ITicket {
58
59
  export interface ISelectedTickets {
59
60
  [key: string]: string | number;
60
61
  }
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;
62
+ 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, ordersPath, }: IGetTickets) => JSX.Element;
62
63
  export {};
@@ -1351,11 +1351,16 @@ function getEvent(id, pk) {
1351
1351
  }
1352
1352
  function getTickets(id, promoCode, pk) {
1353
1353
  var invitationHash = getQueryVariable('invitation-hash');
1354
+ var params = {
1355
+ pk: pk
1356
+ };
1357
+
1358
+ if (invitationHash) {
1359
+ params['invitation-hash'] = invitationHash;
1360
+ }
1361
+
1354
1362
  var response = publicRequest.get("v1/event/" + id + "/tickets", {
1355
- params: {
1356
- pk: pk,
1357
- 'invitation-hash': invitationHash
1358
- },
1363
+ params: params,
1359
1364
  headers: promoCode ? _extends({}, ttfHeaders, {
1360
1365
  'Promotion-Event': String(id),
1361
1366
  'Promotion-Code': promoCode
@@ -5519,7 +5524,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
5519
5524
  _ref$handleNotInvited = _ref.handleNotInvitedModalClose,
5520
5525
  handleNotInvitedModalClose = _ref$handleNotInvited === void 0 ? _identity : _ref$handleNotInvited,
5521
5526
  _ref$handleInvalidLin = _ref.handleInvalidLinkModalClose,
5522
- handleInvalidLinkModalClose = _ref$handleInvalidLin === void 0 ? _identity : _ref$handleInvalidLin;
5527
+ handleInvalidLinkModalClose = _ref$handleInvalidLin === void 0 ? _identity : _ref$handleInvalidLin,
5528
+ ordersPath = _ref.ordersPath;
5523
5529
 
5524
5530
  var _useState = React.useState({}),
5525
5531
  selectedTickets = _useState[0],
@@ -5762,7 +5768,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
5762
5768
 
5763
5769
  var handleOrdersClick = function handleOrdersClick() {
5764
5770
  if (isWindowDefined) {
5765
- window.location.href = '/orders';
5771
+ window.location.href = ordersPath != null ? ordersPath : '/orders';
5766
5772
  }
5767
5773
  };
5768
5774
 
@@ -6736,7 +6742,8 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
6736
6742
  personalLinkIcon = _ref$personalLinkIcon === void 0 ? '' : _ref$personalLinkIcon,
6737
6743
  _ref$displayColumnNam = _ref.displayColumnNameInRow,
6738
6744
  displayColumnNameInRow = _ref$displayColumnNam === void 0 ? false : _ref$displayColumnNam,
6739
- ticketsTableColumns = _ref.ticketsTableColumns;
6745
+ ticketsTableColumns = _ref.ticketsTableColumns,
6746
+ ordersPath = _ref.ordersPath;
6740
6747
 
6741
6748
  var _useState = React.useState({}),
6742
6749
  data = _useState[0],
@@ -6995,7 +7002,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
6995
7002
  className: "return-button",
6996
7003
  onClick: function onClick() {
6997
7004
  if (typeof window !== 'undefined') {
6998
- window.location.assign('/orders');
7005
+ window.location.assign(ordersPath != null ? ordersPath : '/orders');
6999
7006
  }
7000
7007
  }
7001
7008
  }, "Back to Orders")))), !(data != null && data.disable_referral) && React__default.createElement("div", {
@@ -7063,7 +7070,7 @@ var OrderDetailsContainer = function OrderDetailsContainer(_ref) {
7063
7070
  if (onReturnButtonClick) {
7064
7071
  onReturnButtonClick(data);
7065
7072
  } else if (typeof window !== 'undefined') {
7066
- window.location.assign('/orders');
7073
+ window.location.assign(ordersPath != null ? ordersPath : '/orders');
7067
7074
  }
7068
7075
  }
7069
7076
  }, "Return to Order History"))), showResaleModal && React__default.createElement(TicketResaleModal, {
@@ -7202,7 +7209,8 @@ var TicketResaleContainer = function TicketResaleContainer(_ref) {
7202
7209
  onDeclineTicketPurchaseSuccess = _ref$onDeclineTicketP === void 0 ? function () {} : _ref$onDeclineTicketP,
7203
7210
  _ref$onDeclineTicketP2 = _ref.onDeclineTicketPurchaseError,
7204
7211
  onDeclineTicketPurchaseError = _ref$onDeclineTicketP2 === void 0 ? function () {} : _ref$onDeclineTicketP2,
7205
- orderHash = _ref.orderHash;
7212
+ orderHash = _ref.orderHash,
7213
+ billingPath = _ref.billingPath;
7206
7214
  var isWindowDefined = typeof window !== 'undefined';
7207
7215
 
7208
7216
  var _useState = React.useState(''),
@@ -7272,7 +7280,7 @@ var TicketResaleContainer = function TicketResaleContainer(_ref) {
7272
7280
  names_required = _get(data, 'names_required', false);
7273
7281
  event_id = _get(data, 'event_id');
7274
7282
  onProcessTicketSuccess(_response.data);
7275
- window.location.href = "/billing/billing-info/?age_required=" + age_required + "&names_required=" + names_required + "&event_id=" + event_id;
7283
+ window.location.href = (billingPath != null ? billingPath : '/billing/billing-info/') + "?age_required=" + age_required + "&names_required=" + names_required + "&event_id=" + event_id;
7276
7284
  _context.next = 35;
7277
7285
  break;
7278
7286