tf-checkout-react 1.3.45 → 1.3.47-beta.1

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.
Binary file
@@ -26,5 +26,6 @@ export interface IConfirmationPage {
26
26
  clientLabel?: string;
27
27
  showReferralsInfoText?: boolean;
28
28
  showCopyInfoModal?: boolean;
29
+ showPricingNoteSection?: boolean;
29
30
  }
30
- export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, }: IConfirmationPage) => JSX.Element;
31
+ export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, showReferralsInfoText, showCopyInfoModal, showPricingNoteSection, }: IConfirmationPage) => JSX.Element;
@@ -6,9 +6,10 @@ interface ITicketsSectionProps {
6
6
  selectedTickets: any;
7
7
  handleTicketSelect: any;
8
8
  sortBySoldOut: boolean;
9
- ticketsHeaderComponent?: ReactNode;
10
9
  hideTicketsHeader: boolean;
10
+ ticketsHeaderComponent?: ReactNode;
11
11
  showGroupNameBlock?: boolean;
12
+ currencySybmol?: string;
12
13
  }
13
- export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader, showGroupNameBlock, }: ITicketsSectionProps) => JSX.Element;
14
+ export declare const TicketsSection: ({ event, ticketsList, selectedTickets, handleTicketSelect, sortBySoldOut, ticketsHeaderComponent, hideTicketsHeader, showGroupNameBlock, currencySybmol, }: ITicketsSectionProps) => JSX.Element;
14
15
  export {};
@@ -56,6 +56,7 @@ export interface IGetTickets {
56
56
  showPoweredByImage?: boolean;
57
57
  promoText?: string;
58
58
  showGroupNameBlock?: boolean;
59
+ currencySybmol?: string;
59
60
  }
60
61
  export interface ITicket {
61
62
  id: string | number;
@@ -64,5 +65,5 @@ export interface ITicket {
64
65
  export interface ISelectedTickets {
65
66
  [key: string]: string | number;
66
67
  }
67
- export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, }: IGetTickets) => JSX.Element;
68
+ export declare const TicketsContainer: ({ onLoginSuccess, getTicketsLabel, eventId, onAddToCartSuccess, contentStyle, onAddToCartError, onGetTicketsSuccess, onGetTicketsError, onLogoutSuccess, onLogoutError, onGetProfileDataSuccess, onGetProfileDataError, theme, queryPromoCode, isPromotionsEnabled, themeOptions, isAccessCodeEnabled, hideSessionButtons, hideWaitingList, enableBillingInfoAutoCreate, isButtonScrollable, sortBySoldOut, disableCountdownLeadingZero, isLoggedIn, actionsSectionComponent: ActionsSectionComponent, ticketsHeaderComponent, hideTicketsHeader, enableInfluencersSection, enableAddOns, handleNotInvitedModalClose, handleInvalidLinkModalClose, ordersPath, showPoweredByImage, promoText, showGroupNameBlock, currencySybmol, }: IGetTickets) => JSX.Element;
68
69
  export {};
@@ -1258,6 +1258,8 @@ publicRequest.interceptors.response.use(function (response) {
1258
1258
  return Promise.reject(error);
1259
1259
  });
1260
1260
  publicRequest.interceptors.request.use(function (config) {
1261
+ var _document$cookie;
1262
+
1261
1263
  var guestToken = isWindowDefined ? window.localStorage.getItem('auth_guest_token') : null;
1262
1264
  var userData = isWindowDefined ? window.localStorage.getItem('user_data') : null;
1263
1265
  var accessToken = isWindowDefined ? window.localStorage.getItem('access_token') : null;
@@ -1288,6 +1290,16 @@ publicRequest.interceptors.request.use(function (config) {
1288
1290
  config.headers = _updatedHeaders2;
1289
1291
  }
1290
1292
 
1293
+ var additionalCookiesHeaderValue = (_document$cookie = document.cookie) != null ? _document$cookie : '';
1294
+
1295
+ if (additionalCookiesHeaderValue !== '') {
1296
+ var _updatedHeaders3 = _extends({}, config.headers, {
1297
+ 'Additional-Cookies': additionalCookiesHeaderValue
1298
+ });
1299
+
1300
+ config.headers = _updatedHeaders3;
1301
+ }
1302
+
1291
1303
  if (CONFIGS.X_SOURCE_ORIGIN) {
1292
1304
  var _updatedHeaders4 = _extends({}, config.headers, {
1293
1305
  'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN
@@ -5102,7 +5114,9 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5102
5114
  _ref$showReferralsInf = _ref.showReferralsInfoText,
5103
5115
  showReferralsInfoText = _ref$showReferralsInf === void 0 ? false : _ref$showReferralsInf,
5104
5116
  _ref$showCopyInfoModa = _ref.showCopyInfoModal,
5105
- showCopyInfoModal = _ref$showCopyInfoModa === void 0 ? false : _ref$showCopyInfoModa;
5117
+ showCopyInfoModal = _ref$showCopyInfoModa === void 0 ? false : _ref$showCopyInfoModa,
5118
+ _ref$showPricingNoteS = _ref.showPricingNoteSection,
5119
+ showPricingNoteSection = _ref$showPricingNoteS === void 0 ? false : _ref$showPricingNoteS;
5106
5120
  var inputRef = React.useRef(null);
5107
5121
 
5108
5122
  var _useState = React.useState(null),
@@ -5320,7 +5334,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5320
5334
  }, pricing.subLabel)), React__default.createElement("div", {
5321
5335
  className: "pricing-section_price"
5322
5336
  }, ' ', pricing.price));
5323
- }), React__default.createElement("div", {
5337
+ }), showPricingNoteSection && React__default.createElement("div", {
5324
5338
  className: "note-pricing-section"
5325
5339
  }, "^ This is based on the most expensive ticket in your order."))))));
5326
5340
  };
@@ -5894,17 +5908,19 @@ var TicketsSection = function TicketsSection(_ref) {
5894
5908
  sortBySoldOut = _ref.sortBySoldOut,
5895
5909
  ticketsHeaderComponent = _ref.ticketsHeaderComponent,
5896
5910
  hideTicketsHeader = _ref.hideTicketsHeader,
5897
- showGroupNameBlock = _ref.showGroupNameBlock;
5898
- var currency = event.currency.currency;
5911
+ showGroupNameBlock = _ref.showGroupNameBlock,
5912
+ currencySybmol = _ref.currencySybmol;
5913
+ var symbol = event.currency.symbol;
5899
5914
  var sortedTicketsList = sortBySoldOut ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut') : _sortBy(ticketsList, 'sortOrder');
5900
5915
  var showGroup = !!sortedTicketsList.find(function (ticket) {
5901
5916
  return ticket.groupName;
5902
5917
  });
5918
+ var priceSymbol = currencySybmol ? currencySybmol : symbol;
5903
5919
  return React__default.createElement(React__default.Fragment, null, !hideTicketsHeader && ticketsHeaderComponent, sortedTicketsList.map(function (ticket, i, arr) {
5904
5920
  var _arr;
5905
5921
 
5906
- var ticketPrice = currencyNormalizerCreator((+ticket.price).toFixed(2), currency);
5907
- var ticketOldPrice = currencyNormalizerCreator((+ticket.oldPrice).toFixed(2), currency);
5922
+ var ticketPrice = priceSymbol + " " + (+ticket.price).toFixed(2);
5923
+ var ticketOldPrice = priceSymbol + " " + (+ticket.oldPrice).toFixed(2);
5908
5924
  var isSoldOut = ticket.sold_out || !ticket.displayTicket || ticket.soldOut;
5909
5925
 
5910
5926
  var ticketSelect = function ticketSelect(event) {
@@ -6014,7 +6030,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
6014
6030
  showPoweredByImage = _ref$showPoweredByIma === void 0 ? false : _ref$showPoweredByIma,
6015
6031
  promoText = _ref.promoText,
6016
6032
  _ref$showGroupNameBlo = _ref.showGroupNameBlock,
6017
- showGroupNameBlock = _ref$showGroupNameBlo === void 0 ? false : _ref$showGroupNameBlo;
6033
+ showGroupNameBlock = _ref$showGroupNameBlo === void 0 ? false : _ref$showGroupNameBlo,
6034
+ _ref$currencySybmol = _ref.currencySybmol,
6035
+ currencySybmol = _ref$currencySybmol === void 0 ? '' : _ref$currencySybmol;
6018
6036
 
6019
6037
  var _useState = React.useState({}),
6020
6038
  selectedTickets = _useState[0],
@@ -6193,7 +6211,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
6193
6211
 
6194
6212
  function _getTicketsApi() {
6195
6213
  _getTicketsApi = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(isUpdateingCode, type) {
6196
- var _previewKey, response, eventResponse, attributes, _event2;
6214
+ var previewKey, response, eventResponse, attributes, _event2;
6197
6215
 
6198
6216
  return runtime_1.wrap(function _callee4$(_context4) {
6199
6217
  while (1) {
@@ -6201,14 +6219,14 @@ var TicketsContainer = function TicketsContainer(_ref) {
6201
6219
  case 0:
6202
6220
  _context4.prev = 0;
6203
6221
  isUpdateingCode ? setCodeIsLoading(true) : setIsLoading(true);
6204
- _previewKey = getQueryVariable('pk') || undefined;
6222
+ previewKey = getQueryVariable('pk') || undefined;
6205
6223
  _context4.next = 5;
6206
- return getTickets(eventId, code, _previewKey);
6224
+ return getTickets(eventId, code, previewKey);
6207
6225
 
6208
6226
  case 5:
6209
6227
  response = _context4.sent;
6210
6228
  _context4.next = 8;
6211
- return getEvent(eventId, _previewKey);
6229
+ return getEvent(eventId, previewKey);
6212
6230
 
6213
6231
  case 8:
6214
6232
  eventResponse = _context4.sent;
@@ -6535,10 +6553,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
6535
6553
  var externalUrl = event == null ? void 0 : event.redirectUrl;
6536
6554
  var eventSaleIsNotStarted = !(event != null && event.salesStarted) && (event == null ? void 0 : event.salesStart) && !isTicketAvailable;
6537
6555
  var influencers = event != null && event.referralsEnabled ? event == null ? void 0 : event.referrals : [];
6538
- var previewKey = getQueryVariable('pk') || undefined;
6539
6556
 
6540
6557
  var canShowGetTicketBtn = function canShowGetTicketBtn() {
6541
- if (!wrappedActionsSectionComponent && !eventSaleIsNotStarted && isTicketOnSale && !(event != null && event.salesEnded) && !externalUrl && !previewKey) {
6558
+ if (!wrappedActionsSectionComponent && !eventSaleIsNotStarted && isTicketOnSale && !(event != null && event.salesEnded) && !externalUrl) {
6542
6559
  return true;
6543
6560
  }
6544
6561
 
@@ -6599,7 +6616,8 @@ var TicketsContainer = function TicketsContainer(_ref) {
6599
6616
  sortBySoldOut: sortBySoldOut,
6600
6617
  ticketsHeaderComponent: ticketsHeaderComponent,
6601
6618
  hideTicketsHeader: hideTicketsHeader || _isEmpty(tickets),
6602
- showGroupNameBlock: showGroupNameBlock
6619
+ showGroupNameBlock: showGroupNameBlock,
6620
+ currencySybmol: currencySybmol
6603
6621
  }), externalUrl ? null : isSalesClosed ? React__default.createElement("p", {
6604
6622
  className: "event-closed-message " + (!isLoggedIn ? 'event-closed-on-bottom' : '')
6605
6623
  }, "Sales for this event are closed.") : eventSaleIsNotStarted ? React__default.createElement(Countdown, {