tf-checkout-react 1.6.6-beta.27 → 1.6.6-beta.29

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.
Files changed (27) hide show
  1. package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +1 -1
  2. package/dist/components/addonsContainer/index.d.ts +1 -1
  3. package/dist/components/billing-info-container/index.d.ts +1 -0
  4. package/dist/components/myTicketsContainer/index.d.ts +3 -2
  5. package/dist/components/paymentContainer/OrderDetails.d.ts +7 -1
  6. package/dist/components/paymentContainer/index.d.ts +2 -1
  7. package/dist/tf-checkout-react.cjs.development.js +310 -157
  8. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  9. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  10. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  11. package/dist/tf-checkout-react.esm.js +310 -157
  12. package/dist/tf-checkout-react.esm.js.map +1 -1
  13. package/dist/tf-checkout-styles.css +1 -1
  14. package/dist/utils/getDomain.d.ts +1 -1
  15. package/package.json +2 -2
  16. package/src/components/addonsContainer/SimpleAddonsContainer.tsx +4 -0
  17. package/src/components/addonsContainer/index.tsx +4 -0
  18. package/src/components/billing-info-container/index.tsx +84 -27
  19. package/src/components/common/SnackbarAlert.tsx +32 -34
  20. package/src/components/loginModal/style.css +3 -1
  21. package/src/components/myTicketsContainer/index.tsx +12 -8
  22. package/src/components/paymentContainer/OrderDetails.tsx +43 -3
  23. package/src/components/paymentContainer/index.tsx +25 -23
  24. package/src/components/paymentContainer/style.css +113 -0
  25. package/src/types/api/payment.d.ts +2 -2
  26. package/src/utils/cookies.ts +43 -12
  27. package/src/utils/getDomain.ts +10 -4
@@ -567,11 +567,18 @@ var ErrorFocusInternal = /*#__PURE__*/function (_Component) {
567
567
  }(Component);
568
568
  var ErrorFocus = /*#__PURE__*/connect(ErrorFocusInternal);
569
569
 
570
- function getDomain(url, subdomain) {
570
+ function getDomain(url, subdomain, publicSuffix) {
571
571
  var updatedUrl = url.replace(/(https?:\/\/)?(www.)?/i, '');
572
572
  if (!subdomain) {
573
- updatedUrl = updatedUrl.split('.');
574
- updatedUrl = updatedUrl.slice(updatedUrl.length - 2).join('.');
573
+ if (publicSuffix) {
574
+ var updatedPublicSuffix = publicSuffix.startsWith('.') ? publicSuffix : '.' + publicSuffix;
575
+ updatedUrl = url.replace(updatedPublicSuffix, '').split('.');
576
+ updatedUrl = updatedUrl.length > 0 ? updatedUrl[updatedUrl.length - 1] : '';
577
+ updatedUrl += updatedPublicSuffix;
578
+ } else {
579
+ updatedUrl = updatedUrl.split(".");
580
+ updatedUrl = updatedUrl.slice(updatedUrl.length - 2).join(".");
581
+ }
575
582
  }
576
583
  if (updatedUrl.indexOf('/') !== -1) {
577
584
  return updatedUrl.split('/')[0];
@@ -579,6 +586,7 @@ function getDomain(url, subdomain) {
579
586
  return updatedUrl;
580
587
  }
581
588
 
589
+ var generalDomain;
582
590
  function setCustomCookie(name, value, days) {
583
591
  if (days === void 0) {
584
592
  days = 5;
@@ -589,10 +597,22 @@ function setCustomCookie(name, value, days) {
589
597
  date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
590
598
  expires = '; expires=' + date.toUTCString();
591
599
  }
592
- if (typeof window !== 'undefined') {
593
- var domain = getDomain(window.location.hostname);
594
- document.cookie = name + '=' + (value || '') + expires + ("; path=/; domain=" + domain);
600
+ if (typeof window === 'undefined') {
601
+ return;
595
602
  }
603
+ var hostname = window.location.hostname;
604
+ if (generalDomain && generalDomain.endsWith(getDomain(hostname))) {
605
+ document.cookie = name + '=' + (value || '') + expires + ("; path=/;domain=" + generalDomain);
606
+ return;
607
+ }
608
+ var previousDomain = undefined;
609
+ var domain = undefined;
610
+ do {
611
+ previousDomain = domain;
612
+ domain = getDomain(hostname, undefined, previousDomain);
613
+ document.cookie = name + '=' + (value || '') + expires + ("; path=/;domain=" + domain);
614
+ } while (getCookieByName(name) === '' && hostname !== domain);
615
+ generalDomain = domain;
596
616
  }
597
617
  function getCookieByName(cname) {
598
618
  if (typeof window === 'undefined') return '';
@@ -610,10 +630,25 @@ function getCookieByName(cname) {
610
630
  return '';
611
631
  }
612
632
  function deleteCookieByName(name) {
613
- if (typeof window !== 'undefined') {
614
- var domain = getDomain(window.location.hostname);
615
- document.cookie = name + '=; Path=/' + ("; domain=" + domain) + '; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
633
+ if (getCookieByName(name) === '') {
634
+ return;
635
+ }
636
+ if (typeof window === 'undefined') {
637
+ return;
616
638
  }
639
+ var hostname = window.location.hostname;
640
+ if (generalDomain && generalDomain.endsWith(getDomain(hostname))) {
641
+ document.cookie = name + ("=; Path=/;domain=" + generalDomain + "; Expires=Thu, 01 Jan 1970 00:00:01 GMT;");
642
+ return;
643
+ }
644
+ var previousDomain = undefined;
645
+ var domain = undefined;
646
+ do {
647
+ previousDomain = domain;
648
+ domain = getDomain(hostname, undefined, previousDomain);
649
+ document.cookie = name + ("=; Path=/;domain=" + domain + "; Expires=Thu, 01 Jan 1970 00:00:01 GMT;");
650
+ } while (getCookieByName(name) !== '' && hostname !== domain);
651
+ generalDomain = domain;
617
652
  }
618
653
 
619
654
  var downloadPDF = function downloadPDF(pdfUrl) {
@@ -4066,6 +4101,9 @@ var AddonsContainter = function AddonsContainter(_ref) {
4066
4101
  size: 50
4067
4102
  }));
4068
4103
  }
4104
+ if ((addons == null ? void 0 : addons.length) === 0) {
4105
+ return null;
4106
+ }
4069
4107
  var params = new URL("" + window.location).searchParams;
4070
4108
  var addOnIsIncluded = params.get('include_add_on') === 'true';
4071
4109
  var isResale = params.get('resale') === 'true';
@@ -4385,6 +4423,9 @@ var SimpleAddonsContainer = function SimpleAddonsContainer(_ref) {
4385
4423
  size: 50
4386
4424
  }));
4387
4425
  }
4426
+ if ((addons == null ? void 0 : addons.length) === 0) {
4427
+ return null;
4428
+ }
4388
4429
  return React.createElement("div", {
4389
4430
  className: classNamePrefix + "_container"
4390
4431
  }, React.createElement("div", {
@@ -5408,15 +5449,6 @@ var PaymentPlanSection = function PaymentPlanSection(props) {
5408
5449
  };
5409
5450
 
5410
5451
  var publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || '';
5411
- var getStripePromise = function getStripePromise(reviewData) {
5412
- var stripePublishableKey = _get(reviewData, 'payment_method.stripe_publishable_key') || publishableKey || 'pk_test_3Ov1P1oP33A1cxaSjxWE0VjT';
5413
- var stripeAccount = _get(reviewData, 'payment_method.stripe_connected_account');
5414
- var options = {};
5415
- if (stripeAccount) {
5416
- options.stripeAccount = stripeAccount;
5417
- }
5418
- return loadStripe(stripePublishableKey, options);
5419
- };
5420
5452
  var initialPaymentPlanConfiguration = {
5421
5453
  requires_deposit: false,
5422
5454
  deposit: 0,
@@ -5455,7 +5487,8 @@ var initialReviewValues = {
5455
5487
  payment_method: {
5456
5488
  stripe_client_secret: '',
5457
5489
  stripe_payment_plan_enabled: false,
5458
- stripe_payment_plan_configuration: {}
5490
+ stripe_payment_plan_configuration: {},
5491
+ stripe_publishable_key: ''
5459
5492
  },
5460
5493
  billing_info: {},
5461
5494
  event_details: {
@@ -5500,7 +5533,8 @@ var PaymentContainer = function PaymentContainer(_ref) {
5500
5533
  _ref$isSinglePageChec = _ref.isSinglePageCheckout,
5501
5534
  isSinglePageCheckout = _ref$isSinglePageChec === void 0 ? false : _ref$isSinglePageChec,
5502
5535
  _ref$stripePaymentPro = _ref.stripePaymentProps,
5503
- stripePaymentProps = _ref$stripePaymentPro === void 0 ? {} : _ref$stripePaymentPro;
5536
+ stripePaymentProps = _ref$stripePaymentPro === void 0 ? {} : _ref$stripePaymentPro,
5537
+ stripePublishableKeyProps = _ref.stripePublishableKey;
5504
5538
  var _useState = useState(initialReviewValues),
5505
5539
  reviewData = _useState[0],
5506
5540
  setReviewData = _useState[1];
@@ -5578,14 +5612,16 @@ var PaymentContainer = function PaymentContainer(_ref) {
5578
5612
  }
5579
5613
  }, [showPaymentPlanSection, paymentPlanUseSavedCard, orderData == null ? void 0 : orderData.id]);
5580
5614
  useEffect(function () {
5581
- if (isSinglePageCheckout && !(orderData != null && orderData.total)) {
5582
- setPaymentDataIsLoading(false);
5583
- setOrderData(function (current) {
5584
- return _extends({}, current, {
5585
- pay_now: 1,
5586
- total: 1
5615
+ if (isSinglePageCheckout) {
5616
+ if (!(orderData != null && orderData.total)) {
5617
+ setOrderData(function (current) {
5618
+ return _extends({}, current, {
5619
+ pay_now: 1,
5620
+ total: 1
5621
+ });
5587
5622
  });
5588
- });
5623
+ setPaymentDataIsLoading(false);
5624
+ }
5589
5625
  return;
5590
5626
  }
5591
5627
  _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -5702,6 +5738,15 @@ var PaymentContainer = function PaymentContainer(_ref) {
5702
5738
  }
5703
5739
  return showPaymentForm;
5704
5740
  };
5741
+ var getStripePromise = useCallback(function () {
5742
+ var stripePublishableKey = stripePublishableKeyProps || _get(reviewData, 'payment_method.stripe_publishable_key') || publishableKey;
5743
+ var stripeAccount = _get(reviewData, 'payment_method.stripe_connected_account');
5744
+ var options = {};
5745
+ if (stripeAccount) {
5746
+ options.stripeAccount = stripeAccount;
5747
+ }
5748
+ return loadStripe(stripePublishableKey, options);
5749
+ }, [reviewData, stripePublishableKeyProps]);
5705
5750
  var themeMui = createTheme(themeOptions);
5706
5751
  var hasTableTypes = Boolean(Number(orderData.guest_count));
5707
5752
  var paymentFieldsData = hasTableTypes ? [{
@@ -5849,7 +5894,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
5849
5894
  }, paymentInfoLabel), showErrorText && React.createElement("p", {
5850
5895
  className: "payment_info__error"
5851
5896
  }, errorText), React.createElement("div", null, React.createElement(Elements, {
5852
- stripe: getStripePromise(reviewData),
5897
+ stripe: getStripePromise(),
5853
5898
  options: elementsOptions
5854
5899
  }, React.createElement(CheckoutForm, Object.assign({
5855
5900
  stripe_client_secret: paymentPlanIsAvailable && showPaymentPlanSection ? paymentPlanConfig.stripe_setup_intent_secret : _get(reviewData, 'payment_method.stripe_client_secret'),
@@ -6170,6 +6215,7 @@ var LogicRunner = function LogicRunner(_ref) {
6170
6215
  return null;
6171
6216
  };
6172
6217
  var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6218
+ var _reviewData$payment_m, _checkoutUpdateData$a, _checkoutUpdateData$a2;
6173
6219
  var _ref4$data = _ref4.data,
6174
6220
  data = _ref4$data === void 0 ? [] : _ref4$data,
6175
6221
  _ref4$ticketHoldersFi = _ref4.ticketHoldersFields,
@@ -6181,6 +6227,8 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6181
6227
  initialValues = _ref4$initialValues === void 0 ? {} : _ref4$initialValues,
6182
6228
  _ref4$buttonName = _ref4.buttonName,
6183
6229
  buttonName = _ref4$buttonName === void 0 ? 'Submit' : _ref4$buttonName,
6230
+ _ref4$freeOrderButton = _ref4.freeOrderButtonName,
6231
+ freeOrderButtonName = _ref4$freeOrderButton === void 0 ? 'Complete Registration' : _ref4$freeOrderButton,
6184
6232
  _ref4$handleSubmit = _ref4.handleSubmit,
6185
6233
  handleSubmit = _ref4$handleSubmit === void 0 ? _identity : _ref4$handleSubmit,
6186
6234
  _ref4$theme = _ref4.theme,
@@ -6408,11 +6456,18 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6408
6456
  var _useState24 = useState({}),
6409
6457
  checkoutData = _useState24[0],
6410
6458
  setCheckoutData = _useState24[1];
6459
+ var _useState25 = useState({}),
6460
+ checkoutUpdateData = _useState25[0],
6461
+ setCheckoutUpdateData = _useState25[1];
6411
6462
  var prevData = useRef(data);
6412
6463
  var addAddOnsInAttributes = useCallback(function (checkoutBody) {
6413
6464
  var selectedAddOns = window.localStorage.getItem('add_ons') || '{}';
6414
6465
  checkoutBody.attributes.add_ons = JSON.parse(selectedAddOns);
6415
6466
  }, []);
6467
+ var _useState26 = useState({}),
6468
+ singleCheckoutAddons = _useState26[0],
6469
+ setSingleCheckoutAddOns = _useState26[1];
6470
+ var orderIsFree = !Number(checkoutData == null ? void 0 : checkoutData.total);
6416
6471
  useEffect(function () {
6417
6472
  var hasUniqueId = _get(dataWithUniqueIds, '[0].uniqueId');
6418
6473
  var isEqualData = _isEqual(prevData.current, data);
@@ -6577,51 +6632,94 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6577
6632
  fetchCart();
6578
6633
  }, [isLoggedIn]);
6579
6634
  useEffect(function () {
6580
- var collectPaymentData = /*#__PURE__*/function () {
6635
+ var fetchCheckoutUpdate = /*#__PURE__*/function () {
6581
6636
  var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
6582
- var checkoutBody, checkoutResponse;
6637
+ var checkoutUpdateResponse;
6583
6638
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
6584
6639
  while (1) switch (_context5.prev = _context5.next) {
6640
+ case 0:
6641
+ if (eventId) {
6642
+ _context5.next = 2;
6643
+ break;
6644
+ }
6645
+ return _context5.abrupt("return");
6646
+ case 2:
6647
+ _context5.prev = 2;
6648
+ _context5.next = 5;
6649
+ return updateCheckout({
6650
+ attributes: {
6651
+ event_id: eventId
6652
+ }
6653
+ });
6654
+ case 5:
6655
+ checkoutUpdateResponse = _context5.sent;
6656
+ if (checkoutUpdateResponse.success) {
6657
+ setCheckoutUpdateData(checkoutUpdateResponse.data.attributes);
6658
+ }
6659
+ _context5.next = 12;
6660
+ break;
6661
+ case 9:
6662
+ _context5.prev = 9;
6663
+ _context5.t0 = _context5["catch"](2);
6664
+ console.error('Failed to fetch checkout update:', _context5.t0);
6665
+ case 12:
6666
+ case "end":
6667
+ return _context5.stop();
6668
+ }
6669
+ }, _callee5, null, [[2, 9]]);
6670
+ }));
6671
+ return function fetchCheckoutUpdate() {
6672
+ return _ref8.apply(this, arguments);
6673
+ };
6674
+ }();
6675
+ fetchCheckoutUpdate();
6676
+ }, [eventId]);
6677
+ useEffect(function () {
6678
+ var collectPaymentData = /*#__PURE__*/function () {
6679
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
6680
+ var checkoutBody, checkoutResponse;
6681
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
6682
+ while (1) switch (_context6.prev = _context6.next) {
6585
6683
  case 0:
6586
6684
  if (!(skipPage && !_isEmpty(ticketsQuantity) && !showDOB && !loading && !isNewUser)) {
6587
- _context5.next = 19;
6685
+ _context6.next = 19;
6588
6686
  break;
6589
6687
  }
6590
6688
  setLoading(true);
6591
6689
  checkoutBody = createCheckoutDataBodyWithDefaultHolder(ticketsQuantity.length, userData);
6592
- _context5.prev = 3;
6690
+ _context6.prev = 3;
6593
6691
  if (isBrowser) {
6594
6692
  addAddOnsInAttributes(checkoutBody);
6595
6693
  }
6596
- _context5.next = 7;
6694
+ _context6.next = 7;
6597
6695
  return postOnCheckout(checkoutBody, flagFreeTicket);
6598
6696
  case 7:
6599
- checkoutResponse = _context5.sent;
6697
+ checkoutResponse = _context6.sent;
6600
6698
  removeReferralKey();
6601
6699
  onSkipBillingPage(checkoutResponse.data.attributes);
6602
6700
  setLoading(false);
6603
- _context5.next = 17;
6701
+ _context6.next = 17;
6604
6702
  break;
6605
6703
  case 13:
6606
- _context5.prev = 13;
6607
- _context5.t0 = _context5["catch"](3);
6608
- onSubmitError(_context5.t0);
6609
- if (_get(_context5.t0, 'response.data.data.hasUnverifiedOrder')) {
6610
- setPendingVerificationMessage(_get(_context5.t0, 'response.data.message'));
6704
+ _context6.prev = 13;
6705
+ _context6.t0 = _context6["catch"](3);
6706
+ onSubmitError(_context6.t0);
6707
+ if (_get(_context6.t0, 'response.data.data.hasUnverifiedOrder')) {
6708
+ setPendingVerificationMessage(_get(_context6.t0, 'response.data.message'));
6611
6709
  }
6612
6710
  case 17:
6613
- _context5.next = 20;
6711
+ _context6.next = 20;
6614
6712
  break;
6615
6713
  case 19:
6616
6714
  setLoading(false);
6617
6715
  case 20:
6618
6716
  case "end":
6619
- return _context5.stop();
6717
+ return _context6.stop();
6620
6718
  }
6621
- }, _callee5, null, [[3, 13]]);
6719
+ }, _callee6, null, [[3, 13]]);
6622
6720
  }));
6623
6721
  return function collectPaymentData() {
6624
- return _ref8.apply(this, arguments);
6722
+ return _ref9.apply(this, arguments);
6625
6723
  };
6626
6724
  }();
6627
6725
  collectPaymentData();
@@ -6686,68 +6784,80 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6686
6784
  localStorage.removeItem('referral_key');
6687
6785
  }, []);
6688
6786
  var updateCheckoutWithAddOns = useCallback( /*#__PURE__*/function () {
6689
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(addOns) {
6690
- var checkoutUpdateData, checkoutResponse, errorMessage;
6691
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
6692
- while (1) switch (_context6.prev = _context6.next) {
6787
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(addOns) {
6788
+ var mergedAddOns, _checkoutUpdateData, checkoutResponse, errorMessage;
6789
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
6790
+ while (1) switch (_context7.prev = _context7.next) {
6693
6791
  case 0:
6694
6792
  if (addOns === void 0) {
6695
6793
  addOns = {};
6696
6794
  }
6697
6795
  if (isSinglePageCheckout) {
6698
- _context6.next = 3;
6796
+ _context7.next = 3;
6699
6797
  break;
6700
6798
  }
6701
- return _context6.abrupt("return");
6799
+ return _context7.abrupt("return");
6702
6800
  case 3:
6703
- _context6.prev = 3;
6704
- checkoutUpdateData = {
6801
+ mergedAddOns = _extends({}, singleCheckoutAddons); // Update existing entries and add new ones
6802
+ Object.entries(addOns).forEach(function (_ref11) {
6803
+ var key = _ref11[0],
6804
+ value = _ref11[1];
6805
+ var amount = Number(value);
6806
+ if (amount) {
6807
+ mergedAddOns[key] = amount;
6808
+ } else {
6809
+ delete mergedAddOns[key];
6810
+ }
6811
+ });
6812
+ _context7.prev = 5;
6813
+ _checkoutUpdateData = {
6705
6814
  attributes: {
6706
6815
  event_id: eventId,
6707
- add_ons: addOns
6816
+ add_ons: mergedAddOns
6708
6817
  }
6709
6818
  };
6710
- _context6.next = 7;
6711
- return updateCheckout(checkoutUpdateData);
6712
- case 7:
6713
- checkoutResponse = _context6.sent;
6819
+ _context7.next = 9;
6820
+ return updateCheckout(_checkoutUpdateData);
6821
+ case 9:
6822
+ checkoutResponse = _context7.sent;
6714
6823
  if (checkoutResponse.success) {
6715
6824
  setCheckoutData(_get(checkoutResponse, 'data.attributes.cart_price_breakdown', {}));
6716
6825
  onCheckoutUpdateSuccess(checkoutResponse.data.attributes);
6826
+ setSingleCheckoutAddOns(mergedAddOns);
6717
6827
  }
6718
- _context6.next = 16;
6828
+ _context7.next = 18;
6719
6829
  break;
6720
- case 11:
6721
- _context6.prev = 11;
6722
- _context6.t0 = _context6["catch"](3);
6723
- errorMessage = _get(_context6.t0, 'response.data.message', 'Failed to update add-ons');
6830
+ case 13:
6831
+ _context7.prev = 13;
6832
+ _context7.t0 = _context7["catch"](5);
6833
+ errorMessage = _get(_context7.t0, 'response.data.message', 'Failed to update add-ons');
6724
6834
  setError(errorMessage);
6725
- onCheckoutUpdateError(_context6.t0);
6726
- case 16:
6835
+ onCheckoutUpdateError(_context7.t0);
6836
+ case 18:
6727
6837
  case "end":
6728
- return _context6.stop();
6838
+ return _context7.stop();
6729
6839
  }
6730
- }, _callee6, null, [[3, 11]]);
6840
+ }, _callee7, null, [[5, 13]]);
6731
6841
  }));
6732
6842
  return function (_x) {
6733
- return _ref9.apply(this, arguments);
6843
+ return _ref10.apply(this, arguments);
6734
6844
  };
6735
6845
  }(), [eventId, isSinglePageCheckout, onCheckoutUpdateError, onCheckoutUpdateSuccess]);
6736
6846
  var handleAddOnSelect = useCallback( /*#__PURE__*/function () {
6737
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(selectedAddOns) {
6738
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
6739
- while (1) switch (_context7.prev = _context7.next) {
6847
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selectedAddOns) {
6848
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
6849
+ while (1) switch (_context8.prev = _context8.next) {
6740
6850
  case 0:
6741
- _context7.next = 2;
6851
+ _context8.next = 2;
6742
6852
  return updateCheckoutWithAddOns(selectedAddOns);
6743
6853
  case 2:
6744
6854
  case "end":
6745
- return _context7.stop();
6855
+ return _context8.stop();
6746
6856
  }
6747
- }, _callee7);
6857
+ }, _callee8);
6748
6858
  }));
6749
6859
  return function (_x2) {
6750
- return _ref10.apply(this, arguments);
6860
+ return _ref12.apply(this, arguments);
6751
6861
  };
6752
6862
  }(), [updateCheckoutWithAddOns]);
6753
6863
  var onAddOnSelect = useCallback(function (id, value, addon) {
@@ -6755,9 +6865,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6755
6865
  var addonId = addon.id || id;
6756
6866
  // Create updated add-ons object
6757
6867
  var updatedAddOns = {};
6758
- if (quantity > 0) {
6759
- updatedAddOns[addonId] = quantity;
6760
- }
6868
+ updatedAddOns[addonId] = quantity;
6761
6869
  // Call handleAddOnSelect with the updated addons object
6762
6870
  handleAddOnSelect(updatedAddOns);
6763
6871
  }, [handleAddOnSelect]);
@@ -6779,6 +6887,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6779
6887
  if (isTable) {
6780
6888
  dataWithUniqueIds[0].label = 'Get Your Tables';
6781
6889
  }
6890
+ var stripePublishableKey = (reviewData == null ? void 0 : (_reviewData$payment_m = reviewData.payment_method) == null ? void 0 : _reviewData$payment_m.stripe_publishable_key) || (checkoutUpdateData == null ? void 0 : (_checkoutUpdateData$a = checkoutUpdateData.additional_payment_information) == null ? void 0 : (_checkoutUpdateData$a2 = _checkoutUpdateData$a.basic_config) == null ? void 0 : _checkoutUpdateData$a2.apiKey);
6782
6891
  return React.createElement(ThemeProvider, {
6783
6892
  theme: themeMui
6784
6893
  }, (loading || cardLoading || isCountriesLoading || isConfigLoading) && React.createElement(Backdrop, {
@@ -6809,18 +6918,18 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6809
6918
  }, initialValues), userValues, ticketHoldersFields, ticketsQuantity),
6810
6919
  enableReinitialize: false,
6811
6920
  onSubmit: function () {
6812
- var _onSubmit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(values, formikHelpers) {
6813
- var checkoutBodyForRegistration, bodyFormData, resRegister, _xtfCookie, refreshToken, userProfile, hasUnverifiedOrder, message, profileData, profileSpecifiedData, profileDataObj, userDataObj, checkoutBody, checkoutResponse, checkoutUpdateResponse, _checkoutResponse$dat, hash, total, paymentDataResponse, _cart$, attributes, order_details, cart, _order_details$ticket, ticket, updatedOrderData, isFreeTickets, paymentMethod, paymentPlanAvailable, card, paymentMethodReq, _hasUnverifiedOrder, _message, _e$response, event;
6814
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
6815
- while (1) switch (_context8.prev = _context8.next) {
6921
+ var _onSubmit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(values, formikHelpers) {
6922
+ var checkoutBodyForRegistration, bodyFormData, resRegister, _xtfCookie, refreshToken, userProfile, hasUnverifiedOrder, message, profileData, profileSpecifiedData, profileDataObj, userDataObj, checkoutBody, checkoutResponse, checkoutUpdateResponse, paymentResponse, _checkoutResponse$dat, hash, total, paymentDataResponse, _cart$, attributes, order_details, cart, _order_details$ticket, ticket, updatedOrderData, isFreeTickets, paymentMethod, paymentPlanAvailable, card, paymentMethodReq, _hasUnverifiedOrder, _message, _e$response, event;
6923
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
6924
+ while (1) switch (_context9.prev = _context9.next) {
6816
6925
  case 0:
6817
- _context8.prev = 0;
6818
- if (!(!cardRef.current || !stripeRef.current)) {
6819
- _context8.next = 4;
6926
+ _context9.prev = 0;
6927
+ if (!((!cardRef.current || !stripeRef.current) && !orderIsFree)) {
6928
+ _context9.next = 4;
6820
6929
  break;
6821
6930
  }
6822
6931
  setError('Fill in the card details');
6823
- return _context8.abrupt("return");
6932
+ return _context9.abrupt("return");
6824
6933
  case 4:
6825
6934
  if (isBrowser) {
6826
6935
  window.localStorage.setItem('extraData', JSON.stringify({
@@ -6833,7 +6942,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6833
6942
  }));
6834
6943
  }
6835
6944
  if (isLoggedIn) {
6836
- _context8.next = 27;
6945
+ _context9.next = 27;
6837
6946
  break;
6838
6947
  }
6839
6948
  checkoutBodyForRegistration = createCheckoutDataBody(ticketsQuantity.length, values, {
@@ -6842,12 +6951,12 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6842
6951
  lastNameLogged: lastNameLogged
6843
6952
  }, showDOB);
6844
6953
  bodyFormData = createRegisterFormData(values, checkoutBodyForRegistration, flagFreeTicket);
6845
- _context8.prev = 8;
6954
+ _context9.prev = 8;
6846
6955
  setLoading(true);
6847
- _context8.next = 12;
6956
+ _context9.next = 12;
6848
6957
  return register(bodyFormData);
6849
6958
  case 12:
6850
- resRegister = _context8.sent;
6959
+ resRegister = _context9.sent;
6851
6960
  _xtfCookie = _get(resRegister, 'headers.x-tf-ecommerce');
6852
6961
  refreshToken = _get(resRegister, 'data.attributes.refresh_token');
6853
6962
  userProfile = _get(resRegister, 'data.attributes.user_profile');
@@ -6857,17 +6966,17 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6857
6966
  refreshToken: refreshToken,
6858
6967
  userProfile: userProfile
6859
6968
  });
6860
- _context8.next = 27;
6969
+ _context9.next = 27;
6861
6970
  break;
6862
6971
  case 20:
6863
- _context8.prev = 20;
6864
- _context8.t0 = _context8["catch"](8);
6972
+ _context9.prev = 20;
6973
+ _context9.t0 = _context9["catch"](8);
6865
6974
  setLoading(false);
6866
- hasUnverifiedOrder = _get(_context8.t0, 'response.data.data.hasUnverifiedOrder');
6867
- message = _get(_context8.t0, 'response.data.message', {});
6975
+ hasUnverifiedOrder = _get(_context9.t0, 'response.data.data.hasUnverifiedOrder');
6976
+ message = _get(_context9.t0, 'response.data.message', {});
6868
6977
  if (hasUnverifiedOrder && typeof message === 'string') {
6869
6978
  setPendingVerificationMessage(message);
6870
- } else if (axios.isAxiosError(_context8.t0)) {
6979
+ } else if (axios.isAxiosError(_context9.t0)) {
6871
6980
  if (_includes(message, 'You must be aged') && typeof message === 'string') {
6872
6981
  formikHelpers.setFieldError('holderAge', message);
6873
6982
  }
@@ -6883,14 +6992,14 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6883
6992
  if (_includes(error, 'The cart is expired') && !hideErrorsAlertSection) {
6884
6993
  setError(error);
6885
6994
  }
6886
- onRegisterError(_context8.t0, values.email);
6995
+ onRegisterError(_context9.t0, values.email);
6887
6996
  }
6888
- return _context8.abrupt("return");
6997
+ return _context9.abrupt("return");
6889
6998
  case 27:
6890
- _context8.next = 29;
6999
+ _context9.next = 29;
6891
7000
  return getProfileData();
6892
7001
  case 29:
6893
- profileData = _context8.sent;
7002
+ profileData = _context9.sent;
6894
7003
  profileSpecifiedData = _get(profileData, 'data');
6895
7004
  profileDataObj = setLoggedUserData(profileSpecifiedData);
6896
7005
  userDataObj = isLoggedIn ? userData : profileDataObj;
@@ -6898,32 +7007,36 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6898
7007
  window.localStorage.setItem('user_data', JSON.stringify(userDataObj));
6899
7008
  }
6900
7009
  checkoutBody = collectCheckoutBody(values, userDataObj);
6901
- if (isBrowser) {
7010
+ if (isBrowser && !isSinglePageCheckout) {
6902
7011
  addAddOnsInAttributes(checkoutBody);
6903
7012
  }
6904
- _context8.next = 38;
7013
+ if (isSinglePageCheckout) {
7014
+ checkoutBody.attributes.add_ons = singleCheckoutAddons;
7015
+ }
7016
+ _context9.next = 39;
6905
7017
  return postOnCheckout(checkoutBody, flagFreeTicket);
6906
- case 38:
6907
- checkoutResponse = _context8.sent;
6908
- _context8.next = 41;
7018
+ case 39:
7019
+ checkoutResponse = _context9.sent;
7020
+ _context9.next = 42;
6909
7021
  return updateCheckout({
6910
7022
  attributes: {
6911
7023
  event_id: eventId
6912
7024
  }
6913
7025
  });
6914
- case 41:
6915
- checkoutUpdateResponse = _context8.sent;
7026
+ case 42:
7027
+ checkoutUpdateResponse = _context9.sent;
7028
+ paymentResponse = null;
6916
7029
  if (!isSinglePageCheckout) {
6917
- _context8.next = 64;
7030
+ _context9.next = 67;
6918
7031
  break;
6919
7032
  }
6920
7033
  _checkoutResponse$dat = checkoutResponse.data.attributes, hash = _checkoutResponse$dat.hash, total = _checkoutResponse$dat.total;
6921
- _context8.next = 46;
7034
+ _context9.next = 48;
6922
7035
  return getPaymentData(String(hash));
6923
- case 46:
6924
- paymentDataResponse = _context8.sent;
7036
+ case 48:
7037
+ paymentDataResponse = _context9.sent;
6925
7038
  if (!paymentDataResponse.success) {
6926
- _context8.next = 64;
7039
+ _context9.next = 67;
6927
7040
  break;
6928
7041
  }
6929
7042
  attributes = paymentDataResponse.data.attributes;
@@ -6949,8 +7062,12 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6949
7062
  isFreeTickets = !Number(total) && !Number(updatedOrderData.total) || !Number((updatedOrderData == null ? void 0 : updatedOrderData.pay_now) || 0);
6950
7063
  paymentMethod = attributes.payment_method || {};
6951
7064
  paymentPlanAvailable = paymentMethod.stripe_payment_plan_enabled;
7065
+ if (isFreeTickets) {
7066
+ _context9.next = 65;
7067
+ break;
7068
+ }
6952
7069
  card = cardRef.current;
6953
- _context8.next = 59;
7070
+ _context9.next = 62;
6954
7071
  return stripeRef.current.createPaymentMethod({
6955
7072
  type: 'card',
6956
7073
  card: card || {
@@ -6960,43 +7077,47 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
6960
7077
  address: addressRef.current
6961
7078
  }
6962
7079
  });
6963
- case 59:
6964
- paymentMethodReq = _context8.sent;
6965
- _context8.next = 62;
7080
+ case 62:
7081
+ paymentMethodReq = _context9.sent;
7082
+ _context9.next = 65;
6966
7083
  return stripeRef.current.confirmCardPayment(paymentMethod.stripe_client_secret, {
6967
7084
  payment_method: paymentMethodReq.paymentMethod.id
6968
7085
  });
6969
- case 62:
6970
- _context8.next = 64;
7086
+ case 65:
7087
+ _context9.next = 67;
6971
7088
  return handlePaymentMiddleWare(null, {}, {
6972
7089
  reviewData: attributes,
6973
7090
  isFreeTickets: isFreeTickets,
6974
7091
  paymentPlanIsAvailable: paymentPlanAvailable,
6975
7092
  showPaymentPlanSection: true,
6976
- handlePayment: _identity,
7093
+ handlePayment: function handlePayment(data) {
7094
+ paymentResponse = data;
7095
+ },
6977
7096
  setPaymentIsLoading: _identity,
6978
7097
  setError: _identity,
6979
7098
  orderData: updatedOrderData,
6980
7099
  eventId: eventId,
6981
7100
  isBrowser: isBrowser,
6982
- onPaymentError: _identity
7101
+ onPaymentError: function onPaymentError(error) {
7102
+ throw error;
7103
+ }
6983
7104
  });
6984
- case 64:
7105
+ case 67:
6985
7106
  removeReferralKey();
6986
- handleSubmit(values, formikHelpers, eventId, checkoutResponse, checkoutUpdateResponse);
6987
- _context8.next = 75;
7107
+ handleSubmit(values, formikHelpers, eventId, checkoutResponse, checkoutUpdateResponse, paymentResponse);
7108
+ _context9.next = 78;
6988
7109
  break;
6989
- case 68:
6990
- _context8.prev = 68;
6991
- _context8.t1 = _context8["catch"](0);
7110
+ case 71:
7111
+ _context9.prev = 71;
7112
+ _context9.t1 = _context9["catch"](0);
6992
7113
  setLoading(false);
6993
- onSubmitError(_context8.t1);
6994
- _hasUnverifiedOrder = _get(_context8.t1, 'response.data.data.hasUnverifiedOrder');
6995
- _message = _get(_context8.t1, 'response.data.message', {});
7114
+ onSubmitError(_context9.t1);
7115
+ _hasUnverifiedOrder = _get(_context9.t1, 'response.data.data.hasUnverifiedOrder');
7116
+ _message = _get(_context9.t1, 'response.data.message', {});
6996
7117
  if (_hasUnverifiedOrder && typeof _message === 'string') {
6997
7118
  setPendingVerificationMessage(_message);
6998
- } else if (axios.isAxiosError(_context8.t1)) {
6999
- if (((_e$response = _context8.t1.response) == null ? void 0 : _e$response.status) === 401 || _get(_context8.t1, 'response.data.error') === 'invalid_token') {
7119
+ } else if (axios.isAxiosError(_context9.t1)) {
7120
+ if (((_e$response = _context9.t1.response) == null ? void 0 : _e$response.status) === 401 || _get(_context9.t1, 'response.data.error') === 'invalid_token') {
7000
7121
  if (isBrowser) {
7001
7122
  window.localStorage.removeItem('user_data');
7002
7123
  setUserExpired(true);
@@ -7012,17 +7133,17 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7012
7133
  if (_message && !hideErrorsAlertSection && typeof _message === 'string') {
7013
7134
  setError(_message);
7014
7135
  }
7015
- onSubmitError(_context8.t1);
7136
+ onSubmitError(_context9.t1);
7016
7137
  }
7017
- case 75:
7018
- _context8.prev = 75;
7019
- setLoading(false);
7020
- return _context8.finish(75);
7021
7138
  case 78:
7139
+ _context9.prev = 78;
7140
+ setLoading(false);
7141
+ return _context9.finish(78);
7142
+ case 81:
7022
7143
  case "end":
7023
- return _context8.stop();
7144
+ return _context9.stop();
7024
7145
  }
7025
- }, _callee8, null, [[0, 68, 75, 78], [8, 20]]);
7146
+ }, _callee9, null, [[0, 71, 78, 81], [8, 20]]);
7026
7147
  }));
7027
7148
  function onSubmit(_x3, _x4) {
7028
7149
  return _onSubmit.apply(this, arguments);
@@ -7053,7 +7174,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7053
7174
  setError(null);
7054
7175
  onErrorClose();
7055
7176
  }
7056
- }), !isLoggedIn && React.createElement("div", {
7177
+ }), !isLoggedIn && !isSinglePageCheckout && React.createElement("div", {
7057
7178
  className: "account-actions-block"
7058
7179
  }, React.createElement("div", {
7059
7180
  className: "action-item"
@@ -7178,7 +7299,8 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7178
7299
  })));
7179
7300
  })));
7180
7301
  }));
7181
- })), isSinglePageCheckout && React.createElement(PaymentContainer, {
7302
+ })), isSinglePageCheckout && !orderIsFree && stripePublishableKey && React.createElement(PaymentContainer, {
7303
+ stripePublishableKey: stripePublishableKey,
7182
7304
  formTitle: "Payment Information",
7183
7305
  orderInfoLabel: "",
7184
7306
  enableTimer: false,
@@ -7220,10 +7342,10 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7220
7342
  paymentButtonText: '',
7221
7343
  enableAddressElement: false,
7222
7344
  onPaymentFieldsUpdate: function () {
7223
- var _onPaymentFieldsUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_error, paymentFieldsData, stripe, card) {
7345
+ var _onPaymentFieldsUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_error, paymentFieldsData, stripe, card) {
7224
7346
  var _paymentFieldsData$bi, _paymentFieldsData$bi2, _paymentFieldsData$bi3, address;
7225
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
7226
- while (1) switch (_context9.prev = _context9.next) {
7347
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
7348
+ while (1) switch (_context10.prev = _context10.next) {
7227
7349
  case 0:
7228
7350
  try {
7229
7351
  address = {
@@ -7237,9 +7359,9 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7237
7359
  } catch (error) {}
7238
7360
  case 1:
7239
7361
  case "end":
7240
- return _context9.stop();
7362
+ return _context10.stop();
7241
7363
  }
7242
- }, _callee9);
7364
+ }, _callee10);
7243
7365
  }));
7244
7366
  function onPaymentFieldsUpdate(_x5, _x6, _x7, _x8) {
7245
7367
  return _onPaymentFieldsUpdate.apply(this, arguments);
@@ -7256,7 +7378,7 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
7256
7378
  disabled: props.isSubmitting || phoneValidationIsLoading
7257
7379
  }, props.isSubmitting ? React.createElement(CircularProgress, {
7258
7380
  size: 26
7259
- }) : buttonName))));
7381
+ }) : orderIsFree ? freeOrderButtonName : buttonName))));
7260
7382
  }), showModalLogin && React.createElement(LoginModal, {
7261
7383
  logo: logo,
7262
7384
  onClose: function onClose() {
@@ -9659,7 +9781,9 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
9659
9781
  hideDetailsButton = _ref$hideDetailsButto === void 0 ? false : _ref$hideDetailsButto,
9660
9782
  _ref$columns = _ref.columns,
9661
9783
  columns = _ref$columns === void 0 ? [] : _ref$columns,
9662
- openLoginModal = _ref.openLoginModal;
9784
+ openLoginModal = _ref.openLoginModal,
9785
+ _ref$customNoOrderCon = _ref.customNoOrderContent,
9786
+ customNoOrderContent = _ref$customNoOrderCon === void 0 ? null : _ref$customNoOrderCon;
9663
9787
  var _useState = useState(null),
9664
9788
  data = _useState[0],
9665
9789
  setData = _useState[1];
@@ -9742,6 +9866,15 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
9742
9866
  fetchData(1, limit, (eventFilter == null ? void 0 : eventFilter.url_name) || '');
9743
9867
  setFilter((eventFilter == null ? void 0 : eventFilter.url_name) || '');
9744
9868
  };
9869
+ var noOrderContent = customNoOrderContent || React.createElement("div", {
9870
+ className: "no_orders_section"
9871
+ }, React.createElement("div", {
9872
+ className: "nodata_title"
9873
+ }, "You have no current ticket orders on this account"), React.createElement("div", {
9874
+ className: "nodata_subtitle"
9875
+ }, "Discover your next nite out ", React.createElement("a", {
9876
+ href: "/events"
9877
+ }, "here"), "."));
9745
9878
  return React.createElement("div", {
9746
9879
  className: "my-ticket " + theme
9747
9880
  }, React.createElement(React.Fragment, null, showModalLogin || !isLogged ? openLoginModal ? openLoginModal() : React.createElement(LoginModal, {
@@ -9798,15 +9931,7 @@ var MyTicketsContainer = function MyTicketsContainer(_ref) {
9798
9931
  page: data.page,
9799
9932
  onPageChange: handleChangePage,
9800
9933
  onRowsPerPageChange: handleChangeRowsPerPage
9801
- }))) : !loading && React.createElement(React.Fragment, null, React.createElement("h2", null, "My Ticket Orders"), React.createElement("div", {
9802
- className: "no_orders_section"
9803
- }, React.createElement("div", {
9804
- className: "nodata_title"
9805
- }, "You have no current ticket orders on this account"), React.createElement("div", {
9806
- className: "nodata_subtitle"
9807
- }, "Discover your next nite out ", React.createElement("a", {
9808
- href: "/events"
9809
- }, "here"), "."))), React.createElement(React.Fragment, null, showModalLogin && React.createElement(LoginModal, {
9934
+ }))) : !loading && React.createElement(React.Fragment, null, React.createElement("h2", null, "My Ticket Orders"), noOrderContent), React.createElement(React.Fragment, null, showModalLogin && React.createElement(LoginModal, {
9810
9935
  onClose: function onClose() {
9811
9936
  setShowModalLogin(false);
9812
9937
  },
@@ -14605,14 +14730,42 @@ var OrderDetails = function OrderDetails(_ref) {
14605
14730
  var _ref$orderData = _ref.orderData,
14606
14731
  orderData = _ref$orderData === void 0 ? {} : _ref$orderData,
14607
14732
  _ref$paymentFieldsDat = _ref.paymentFieldsData,
14608
- paymentFieldsData = _ref$paymentFieldsDat === void 0 ? [] : _ref$paymentFieldsDat;
14733
+ paymentFieldsData = _ref$paymentFieldsDat === void 0 ? [] : _ref$paymentFieldsDat,
14734
+ _ref$customMobileText = _ref.customMobileText,
14735
+ customMobileText = _ref$customMobileText === void 0 ? 'Your order total' : _ref$customMobileText;
14609
14736
  var currency = orderData.currency,
14610
14737
  guest_count = orderData.guest_count;
14611
14738
  var hasTableTypes = Boolean(Number(guest_count));
14739
+ var _useState = useState(false),
14740
+ isExpanded = _useState[0],
14741
+ setIsExpanded = _useState[1];
14742
+ // Find the total field to display in the mobile view
14743
+ var totalField = paymentFieldsData.find(function (field) {
14744
+ return field.id === 'total';
14745
+ });
14746
+ var totalValue = totalField && orderData.total ? totalField.normalizer ? totalField.normalizer(orderData.total, currency, orderData) : orderData.total : '';
14747
+ var toggleExpand = function toggleExpand() {
14748
+ setIsExpanded(!isExpanded);
14749
+ };
14612
14750
  return React.createElement("div", {
14613
14751
  className: "payment_page payment_page_single"
14614
14752
  }, React.createElement("div", {
14615
- className: "order_info_section",
14753
+ className: "mobile-order-summary"
14754
+ }, React.createElement("div", {
14755
+ className: "mobile-order-summary-content",
14756
+ onClick: toggleExpand
14757
+ }, React.createElement("div", {
14758
+ className: "mobile-order-info"
14759
+ }, React.createElement("div", {
14760
+ className: "mobile-order-info-container order-info-container-left " + (isExpanded ? 'open' : '')
14761
+ }, React.createElement("div", {
14762
+ className: "mobile-order-text"
14763
+ }, customMobileText)), !isExpanded && React.createElement("div", {
14764
+ className: "mobile-order-info-container order-info-container-right"
14765
+ }, React.createElement("div", {
14766
+ className: "mobile-order-total"
14767
+ }, totalValue))))), React.createElement("div", {
14768
+ className: "order_info_section " + (isExpanded ? 'expanded' : 'collapsed'),
14616
14769
  style: {
14617
14770
  display: hasTableTypes ? 'block' : 'grid'
14618
14771
  }