tf-checkout-react 1.3.48-beta.18 → 1.3.48-beta.19

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.
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import './style.css';
2
+ import React from 'react';
3
3
  export interface ITimerWidgetPage {
4
4
  expires_at: number;
5
5
  buyLoading?: boolean;
@@ -29,8 +29,8 @@ var _isObject = _interopDefault(require('lodash/isObject'));
29
29
  var Box = _interopDefault(require('@mui/material/Box'));
30
30
  var Modal = _interopDefault(require('@mui/material/Modal'));
31
31
  var Countdown$1 = _interopDefault(require('react-countdown'));
32
- var _isNumber = _interopDefault(require('lodash/isNumber'));
33
32
  var SVG = _interopDefault(require('react-inlinesvg'));
33
+ var _isNumber = _interopDefault(require('lodash/isNumber'));
34
34
  var _flatMapDeep = _interopDefault(require('lodash/flatMapDeep'));
35
35
  var _isArray = _interopDefault(require('lodash/isArray'));
36
36
  var Checkbox = _interopDefault(require('@mui/material/Checkbox'));
@@ -1895,6 +1895,8 @@ var SignupModal = function SignupModal(_ref) {
1895
1895
  }))));
1896
1896
  };
1897
1897
 
1898
+ var Cross = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\r\n<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\r\n\t width=\"94.926px\" height=\"94.926px\" viewBox=\"0 0 94.926 94.926\" style=\"enable-background:new 0 0 94.926 94.926;\"\r\n\t xml:space=\"preserve\">\r\n<g>\r\n\t<path d=\"M55.931,47.463L94.306,9.09c0.826-0.827,0.826-2.167,0-2.994L88.833,0.62C88.436,0.224,87.896,0,87.335,0\r\n\t\tc-0.562,0-1.101,0.224-1.498,0.62L47.463,38.994L9.089,0.62c-0.795-0.795-2.202-0.794-2.995,0L0.622,6.096\r\n\t\tc-0.827,0.827-0.827,2.167,0,2.994l38.374,38.373L0.622,85.836c-0.827,0.827-0.827,2.167,0,2.994l5.473,5.476\r\n\t\tc0.397,0.396,0.936,0.62,1.498,0.62s1.1-0.224,1.497-0.62l38.374-38.374l38.374,38.374c0.397,0.396,0.937,0.62,1.498,0.62\r\n\t\ts1.101-0.224,1.498-0.62l5.473-5.476c0.826-0.827,0.826-2.167,0-2.994L55.931,47.463z\"/>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n</svg>";
1899
+
1898
1900
  var showZero = function showZero(value) {
1899
1901
  if (value === void 0) {
1900
1902
  value = 0;
@@ -1903,17 +1905,6 @@ var showZero = function showZero(value) {
1903
1905
  return _isNumber(intNumber) ? intNumber >= 0 && intNumber < 10 ? '0' + intNumber : intNumber : null;
1904
1906
  };
1905
1907
 
1906
- var getImage = function getImage(name) {
1907
- if (name === void 0) {
1908
- name = '';
1909
- }
1910
- var image = '';
1911
- if (!name.trim().length) {
1912
- return image;
1913
- }
1914
- return image;
1915
- };
1916
-
1917
1908
  var TimerWidget = function TimerWidget(_ref) {
1918
1909
  var expires_at = _ref.expires_at,
1919
1910
  buyLoading = _ref.buyLoading,
@@ -1951,7 +1942,7 @@ var TimerWidget = function TimerWidget(_ref) {
1951
1942
  className: 'close-icon',
1952
1943
  onClick: hideTimer
1953
1944
  }, React__default.createElement(SVG, {
1954
- src: getImage('cross.svg'),
1945
+ src: Cross,
1955
1946
  width: '10',
1956
1947
  height: '10',
1957
1948
  fill: '#fff'
@@ -4918,6 +4909,10 @@ var AccessCodeSection = function AccessCodeSection(_ref) {
4918
4909
  }, "ENTER"));
4919
4910
  };
4920
4911
 
4912
+ var DoneSvg = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z\" fill=\"#569F44\"/>\n</svg>";
4913
+
4914
+ var XmarkSvg = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg\n xmlns:osb=\"http://www.openswatchbook.org/uri/2009/osb\"\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n xmlns:cc=\"http://creativecommons.org/ns#\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:svg=\"http://www.w3.org/2000/svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n viewBox=\"0 0 48 48\"\n version=\"1.1\"\n id=\"svg15\"\n sodipodi:docname=\"cross red circle.svg\"\n inkscape:version=\"0.92.3 (2405546, 2018-03-11)\">\n <metadata\n id=\"metadata19\">\n <rdf:RDF>\n <cc:Work\n rdf:about=\"\">\n <dc:format>image/svg+xml</dc:format>\n <dc:type\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n <dc:title />\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <sodipodi:namedview\n pagecolor=\"#ffffff\"\n bordercolor=\"#666666\"\n borderopacity=\"1\"\n objecttolerance=\"10\"\n gridtolerance=\"10\"\n guidetolerance=\"10\"\n inkscape:pageopacity=\"0\"\n inkscape:pageshadow=\"2\"\n inkscape:window-width=\"1920\"\n inkscape:window-height=\"1027\"\n id=\"namedview17\"\n showgrid=\"false\"\n inkscape:zoom=\"4.9166667\"\n inkscape:cx=\"-11.694915\"\n inkscape:cy=\"40.271186\"\n inkscape:window-x=\"-8\"\n inkscape:window-y=\"-8\"\n inkscape:window-maximized=\"1\"\n inkscape:current-layer=\"g13\" />\n <defs\n id=\"defs7\">\n <linearGradient\n id=\"linearGradient828\"\n osb:paint=\"solid\">\n <stop\n style=\"stop-color:#ff0000;stop-opacity:1;\"\n offset=\"0\"\n id=\"stop826\" />\n </linearGradient>\n <linearGradient\n id=\"0\"\n gradientUnits=\"userSpaceOnUse\"\n y1=\"47.37\"\n x2=\"0\"\n y2=\"-1.429\">\n <stop\n stop-color=\"#c52828\"\n id=\"stop2\" />\n <stop\n offset=\"1\"\n stop-color=\"#ff5454\"\n id=\"stop4\" />\n </linearGradient>\n </defs>\n <g\n transform=\"matrix(.99999 0 0 .99999-58.37.882)\"\n enable-background=\"new\"\n id=\"g13\"\n style=\"fill-opacity:1\">\n <circle\n cx=\"82.37\"\n cy=\"23.12\"\n r=\"24\"\n fill=\"url(#0)\"\n id=\"circle9\"\n style=\"fill-opacity:1;fill:#dd3333\" />\n <path\n d=\"m87.77 23.725l5.939-5.939c.377-.372.566-.835.566-1.373 0-.54-.189-.997-.566-1.374l-2.747-2.747c-.377-.372-.835-.564-1.373-.564-.539 0-.997.186-1.374.564l-5.939 5.939-5.939-5.939c-.377-.372-.835-.564-1.374-.564-.539 0-.997.186-1.374.564l-2.748 2.747c-.377.378-.566.835-.566 1.374 0 .54.188.997.566 1.373l5.939 5.939-5.939 5.94c-.377.372-.566.835-.566 1.373 0 .54.188.997.566 1.373l2.748 2.747c.377.378.835.564 1.374.564.539 0 .997-.186 1.374-.564l5.939-5.939 5.94 5.939c.377.378.835.564 1.374.564.539 0 .997-.186 1.373-.564l2.747-2.747c.377-.372.566-.835.566-1.373 0-.54-.188-.997-.566-1.373l-5.939-5.94\"\n fill=\"#fff\"\n fill-opacity=\".842\"\n id=\"path11\"\n style=\"fill-opacity:1;fill:#ffffff\" />\n </g>\n</svg>";
4915
+
4921
4916
  var PromoCodeSection = function PromoCodeSection(_ref) {
4922
4917
  var code = _ref.code,
4923
4918
  codeIsApplied = _ref.codeIsApplied,
@@ -4962,7 +4957,7 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
4962
4957
  return React__default.createElement("div", null, codeIsApplied ? React__default.createElement("div", {
4963
4958
  className: "alert-info"
4964
4959
  }, React__default.createElement(SVG, {
4965
- src: getImage('done.svg'),
4960
+ src: DoneSvg,
4966
4961
  preProcessor: function preProcessor(code) {
4967
4962
  return code.replace(/fill=".*?"/g, 'fill="currentColor"');
4968
4963
  }
@@ -4971,7 +4966,7 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
4971
4966
  }, "PROMO CODE APPLIED SUCCESSFULLY")) : null, codeIsInvalid ? React__default.createElement("div", {
4972
4967
  className: "alert-info fail"
4973
4968
  }, React__default.createElement(SVG, {
4974
- src: getImage('xmark.svg')
4969
+ src: XmarkSvg
4975
4970
  }), React__default.createElement("p", {
4976
4971
  className: "promo-code-fail"
4977
4972
  }, "Invalid Promo Code")) : null, !showPromoInput && React__default.createElement(Button$1, {
@@ -6091,6 +6086,10 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
6091
6086
  })));
6092
6087
  };
6093
6088
 
6089
+ var EmailSvg = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"envelope\" class=\"svg-inline--fa fa-envelope fa-w-16\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"currentColor\" d=\"M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z\"></path></svg>";
6090
+
6091
+ var UserSvg = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"user\" class=\"svg-inline--fa fa-user fa-w-14\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path fill=\"currentColor\" d=\"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z\"></path></svg>";
6092
+
6094
6093
  var _excluded$2 = ["label", "field", "theme", "disableDropdown"];
6095
6094
  var RadioField = function RadioField(_ref) {
6096
6095
  var label = _ref.label,
@@ -6201,7 +6200,7 @@ var TicketResaleModal = function TicketResaleModal(_ref) {
6201
6200
  }, React__default.createElement("div", {
6202
6201
  className: 'icon'
6203
6202
  }, React__default.createElement(SVG, {
6204
- src: getImage('user.svg'),
6203
+ src: UserSvg,
6205
6204
  width: '24',
6206
6205
  height: '24'
6207
6206
  })), React__default.createElement(formik.Field, {
@@ -6225,7 +6224,7 @@ var TicketResaleModal = function TicketResaleModal(_ref) {
6225
6224
  }, React__default.createElement("div", {
6226
6225
  className: 'icon'
6227
6226
  }, React__default.createElement(SVG, {
6228
- src: getImage('email.svg'),
6227
+ src: EmailSvg,
6229
6228
  width: '24',
6230
6229
  height: '24'
6231
6230
  })), React__default.createElement(formik.Field, {
@@ -7812,7 +7811,8 @@ var TicketsSection$1 = function TicketsSection(props) {
7812
7811
  _props$tableMapEnable = props.tableMapEnabled,
7813
7812
  tableMapEnabled = _props$tableMapEnable === void 0 ? false : _props$tableMapEnable,
7814
7813
  guestCounts = props.guestCounts,
7815
- setGuestCounts = props.setGuestCounts;
7814
+ setGuestCounts = props.setGuestCounts,
7815
+ isAddingToCart = props.isAddingToCart;
7816
7816
  var bookButtonIsDisabled = _some(selectedTickets, function (item) {
7817
7817
  return !item;
7818
7818
  }) || _isEmpty(reservedSeats) || reservedSeats.length !== _keys(selectedTickets).length;
@@ -7957,8 +7957,14 @@ var TicketsSection$1 = function TicketsSection(props) {
7957
7957
  }))))));
7958
7958
  })), React__default.createElement("div", null, React__default.createElement(reactBootstrap.Button, {
7959
7959
  className: "book-button\n " + (bookButtonIsDisabled ? 'disabled' : '') + "\n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n ",
7960
- onClick: !bookButtonIsDisabled ? handleGetTicketClick : _identity
7961
- }, getTicketsBtnLabel || getButtonLabel(reservedSeats.length, tableMapEnabled)))));
7960
+ onClick: !bookButtonIsDisabled ? handleGetTicketClick : _identity,
7961
+ disabled: isAddingToCart
7962
+ }, isAddingToCart ? React__default.createElement(CircularProgress, {
7963
+ size: 20,
7964
+ style: {
7965
+ marginLeft: 10
7966
+ }
7967
+ }) : getTicketsBtnLabel || getButtonLabel(reservedSeats.length, tableMapEnabled)))));
7962
7968
  };
7963
7969
 
7964
7970
  var SeatMapContainer = function SeatMapContainer(props) {
@@ -7992,15 +7998,18 @@ var SeatMapContainer = function SeatMapContainer(props) {
7992
7998
  var _useState5 = React.useState(false),
7993
7999
  isReserving = _useState5[0],
7994
8000
  setIsReserving = _useState5[1];
7995
- var _useState6 = React.useState(null),
7996
- error = _useState6[0],
7997
- setError = _useState6[1];
7998
- var _useState7 = React.useState(Date.now() <= Number(localStorage.getItem('reservationStart'))),
7999
- showTimer = _useState7[0],
8000
- setShowTimer = _useState7[1];
8001
- var _useState8 = React.useState({}),
8002
- guestCounts = _useState8[0],
8003
- setGuestCounts = _useState8[1];
8001
+ var _useState6 = React.useState(false),
8002
+ isAddingToCart = _useState6[0],
8003
+ setIsAddingToCart = _useState6[1];
8004
+ var _useState7 = React.useState(null),
8005
+ error = _useState7[0],
8006
+ setError = _useState7[1];
8007
+ var _useState8 = React.useState(Date.now() <= Number(localStorage.getItem('reservationStart'))),
8008
+ showTimer = _useState8[0],
8009
+ setShowTimer = _useState8[1];
8010
+ var _useState9 = React.useState({}),
8011
+ guestCounts = _useState9[0],
8012
+ setGuestCounts = _useState9[1];
8004
8013
  var updateGuestCounts = function updateGuestCounts(reservationData) {
8005
8014
  _forEach(reservationData, function (item) {
8006
8015
  var tierTickets = seatMapData.ticketTypeTierRelations[item.tierId];
@@ -8231,6 +8240,7 @@ var SeatMapContainer = function SeatMapContainer(props) {
8231
8240
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
8232
8241
  while (1) switch (_context6.prev = _context6.next) {
8233
8242
  case 0:
8243
+ setIsAddingToCart(true);
8234
8244
  ticketsDropdownsData = getTicketDropdownData(reservedSeats, seatMapData.ticketTypeTierRelations);
8235
8245
  selectedSeats = {};
8236
8246
  _forEach(ticketsDropdownsData, function (ticketData) {
@@ -8246,31 +8256,35 @@ var SeatMapContainer = function SeatMapContainer(props) {
8246
8256
  selectedTickets: selectedTickets,
8247
8257
  guestCounts: guestCounts
8248
8258
  });
8249
- _context6.prev = 4;
8250
- _context6.next = 7;
8259
+ _context6.prev = 5;
8260
+ _context6.next = 8;
8251
8261
  return addToCartFunc({
8252
8262
  eventId: eventId,
8253
8263
  data: addToCartData,
8254
8264
  ticketQuantity: addToCartData == null ? void 0 : (_addToCartData$attrib = addToCartData.attributes) == null ? void 0 : _addToCartData$attrib.product_cart_quantity
8255
8265
  });
8256
- case 7:
8266
+ case 8:
8257
8267
  response = _context6.sent;
8258
8268
  localStorage.removeItem('reservationData');
8259
8269
  onAddToCartSuccess(response);
8260
- _context6.next = 15;
8270
+ _context6.next = 16;
8261
8271
  break;
8262
- case 12:
8263
- _context6.prev = 12;
8264
- _context6.t0 = _context6["catch"](4);
8272
+ case 13:
8273
+ _context6.prev = 13;
8274
+ _context6.t0 = _context6["catch"](5);
8265
8275
  if (axios.isAxiosError(_context6.t0)) {
8266
8276
  message = _get(_context6.t0, 'response.data.message', '');
8267
8277
  setError(message);
8268
8278
  }
8269
- case 15:
8279
+ case 16:
8280
+ _context6.prev = 16;
8281
+ setIsAddingToCart(false);
8282
+ return _context6.finish(16);
8283
+ case 19:
8270
8284
  case "end":
8271
8285
  return _context6.stop();
8272
8286
  }
8273
- }, _callee6, null, [[4, 12]]);
8287
+ }, _callee6, null, [[5, 13, 16, 19]]);
8274
8288
  }));
8275
8289
  return function handleGetTicketBtnClick() {
8276
8290
  return _ref6.apply(this, arguments);
@@ -8325,6 +8339,7 @@ var SeatMapContainer = function SeatMapContainer(props) {
8325
8339
  return handleCancelSeatReservtion(eventId, tireId, seatId);
8326
8340
  },
8327
8341
  handleGetTicketClick: handleGetTicketBtnClick,
8342
+ isAddingToCart: isAddingToCart,
8328
8343
  reservedSeats: reservedSeats,
8329
8344
  ticketDeleteButtonContent: ticketDeleteButtonContent,
8330
8345
  ticketTypeTierRelations: seatMapData.ticketTypeTierRelations,