tf-checkout-react 1.0.84 → 1.0.85
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/dist/tf-checkout-react.cjs.development.js +15 -7
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +15 -7
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +1 -1
- package/src/components/ticketsContainer/index.tsx +11 -5
- package/src/components/ticketsContainer/style.css +5 -0
- package/src/components/waitingList/index.tsx +2 -2
|
@@ -29,6 +29,7 @@ import { useStripe, useElements, CardNumberElement, CardExpiryElement, CardCvcEl
|
|
|
29
29
|
import { loadStripe } from '@stripe/stripe-js';
|
|
30
30
|
import { FacebookShareButton, FacebookIcon, FacebookMessengerShareButton, FacebookMessengerIcon, TwitterShareButton, TwitterIcon, LinkedinShareButton, LinkedinIcon, PinterestShareButton, PinterestIcon, VKShareButton, VKIcon, OKShareButton, OKIcon, TelegramShareButton, TelegramIcon, WhatsappShareButton, WhatsappIcon, RedditShareButton, RedditIcon, TumblrShareButton, TumblrIcon, MailruShareButton, MailruIcon, EmailShareButton, EmailIcon, LivejournalShareButton, LivejournalIcon, ViberShareButton, ViberIcon, WorkplaceShareButton, WorkplaceIcon, LineShareButton, LineIcon, PocketShareButton, PocketIcon, InstapaperShareButton, InstapaperIcon, WeiboShareButton, WeiboIcon, HatenaShareButton, HatenaIcon } from 'react-share';
|
|
31
31
|
import _some from 'lodash-es/some';
|
|
32
|
+
import _every from 'lodash-es/every';
|
|
32
33
|
import _find from 'lodash-es/find';
|
|
33
34
|
import _isEmpty from 'lodash-es/isEmpty';
|
|
34
35
|
import Button$1 from 'react-bootstrap/Button';
|
|
@@ -2334,7 +2335,7 @@ var BillingInfoContainer = function BillingInfoContainer(_ref3) {
|
|
|
2334
2335
|
|
|
2335
2336
|
var optedInFieldValue = _get(cartInfoData, 'optedIn', false);
|
|
2336
2337
|
|
|
2337
|
-
var ttfOptIn = _get(cartInfoData, 'ttfOptIn', false);
|
|
2338
|
+
var ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false));
|
|
2338
2339
|
|
|
2339
2340
|
var hideTtfOptIn = _get(cartInfoData, 'hide_ttf_opt_in', true); // Get prevProps
|
|
2340
2341
|
|
|
@@ -4021,7 +4022,7 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
4021
4022
|
className: "field-item"
|
|
4022
4023
|
}, React.createElement(Field, {
|
|
4023
4024
|
name: "ticketTypeId",
|
|
4024
|
-
label: "Ticket
|
|
4025
|
+
label: "Type of Ticket",
|
|
4025
4026
|
type: "select",
|
|
4026
4027
|
component: CustomField,
|
|
4027
4028
|
selectOptions: [{
|
|
@@ -4033,7 +4034,7 @@ var WaitingList = function WaitingList(_ref) {
|
|
|
4033
4034
|
className: "field-item"
|
|
4034
4035
|
}, React.createElement(Field, {
|
|
4035
4036
|
name: "quantity",
|
|
4036
|
-
label: "Quantity",
|
|
4037
|
+
label: "Quantity Requested",
|
|
4037
4038
|
type: "select",
|
|
4038
4039
|
component: CustomField,
|
|
4039
4040
|
selectOptions: [{
|
|
@@ -4555,9 +4556,14 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4555
4556
|
getTicketsApi();
|
|
4556
4557
|
};
|
|
4557
4558
|
|
|
4558
|
-
var isAllTicketsSoldOut =
|
|
4559
|
-
return
|
|
4559
|
+
var isAllTicketsSoldOut = _every(tickets, function (item) {
|
|
4560
|
+
return item.sold_out || item.soldOut;
|
|
4560
4561
|
});
|
|
4562
|
+
|
|
4563
|
+
var isTicketOnSale = _some(tickets, function (item) {
|
|
4564
|
+
return item.salesStarted && !item.salesEnded && !item.soldOut;
|
|
4565
|
+
});
|
|
4566
|
+
|
|
4561
4567
|
var themeMui = createTheme$1(themeOptions);
|
|
4562
4568
|
useEffect(function () {
|
|
4563
4569
|
isWindowDefined && window.document.addEventListener('custom-logout', handleLogout);
|
|
@@ -4581,7 +4587,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4581
4587
|
selectedTickets: selectedTickets,
|
|
4582
4588
|
handleTicketSelect: handleTicketSelect,
|
|
4583
4589
|
promoCodeIsApplied: promoCodeIsApplied
|
|
4584
|
-
}), event != null && event.salesEnded ? React.createElement("p",
|
|
4590
|
+
}), event != null && event.salesEnded ? React.createElement("p", {
|
|
4591
|
+
className: 'event-closed-message'
|
|
4592
|
+
}, "Sales for this event are closed.") : !(event != null && event.salesStarted) && event != null && event.salesStart ? React.createElement(Countdown, {
|
|
4585
4593
|
startDate: event.salesStart,
|
|
4586
4594
|
timezone: event.timezone,
|
|
4587
4595
|
title: "Sales start in:",
|
|
@@ -4600,7 +4608,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
4600
4608
|
isPromotionsEnabled: isPromotionsEnabled,
|
|
4601
4609
|
isAccessCodeEnabled: isAccessCodeEnabled,
|
|
4602
4610
|
isAllTicketsSoldOut: isAllTicketsSoldOut
|
|
4603
|
-
}),
|
|
4611
|
+
}), isTicketOnSale && React.createElement(Button$1, {
|
|
4604
4612
|
"aria-hidden": true,
|
|
4605
4613
|
className: "book-button " + (handleBookIsLoading || _isEmpty(selectedTickets) || Object.values(selectedTickets)[0] === 0 ? 'disabled' : ''),
|
|
4606
4614
|
onClick: !handleBookIsLoading && !_isEmpty(selectedTickets) && Object.values(selectedTickets)[0] > 0 ? handleBook : function () {}
|