tf-checkout-react 1.3.5 → 1.3.7
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/components/ticketsContainer/PromoCodeSection.d.ts +3 -1
- package/dist/images/xmark.svg +92 -0
- package/dist/tf-checkout-react.cjs.development.js +32 -13
- 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 +32 -13
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/images/xmark.svg +92 -0
- package/src/components/confirmationContainer/index.tsx +7 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +16 -4
- package/src/components/ticketsContainer/index.tsx +4 -0
- package/src/env.ts +3 -3
|
@@ -4733,7 +4733,10 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4733
4733
|
className: "main"
|
|
4734
4734
|
}, confirmationMain), React.createElement("span", {
|
|
4735
4735
|
className: "helper"
|
|
4736
|
-
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper)))), data.
|
|
4736
|
+
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper)))), data.custom_confirmation_page_text ? React.createElement("div", {
|
|
4737
|
+
className: 'custom-confirmation-page-text',
|
|
4738
|
+
dangerouslySetInnerHTML: createMarkup(data.custom_confirmation_page_text)
|
|
4739
|
+
}) : null, data.disable_referral === false && isReferralEnabled && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
4737
4740
|
className: "referral_text_image_section"
|
|
4738
4741
|
}, React.createElement("div", {
|
|
4739
4742
|
className: "referral_text_section"
|
|
@@ -5100,7 +5103,9 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5100
5103
|
setCode = _ref.setCode,
|
|
5101
5104
|
setShowPromoInput = _ref.setShowPromoInput,
|
|
5102
5105
|
updateTickets = _ref.updateTickets,
|
|
5103
|
-
setCodeIsApplied = _ref.setCodeIsApplied
|
|
5106
|
+
setCodeIsApplied = _ref.setCodeIsApplied,
|
|
5107
|
+
codeIsInvalid = _ref.codeIsInvalid,
|
|
5108
|
+
setCodeIsInvalid = _ref.setCodeIsInvalid;
|
|
5104
5109
|
var isPromoCodeHasValue = !!code.trim();
|
|
5105
5110
|
|
|
5106
5111
|
var renderInputField = function renderInputField() {
|
|
@@ -5142,12 +5147,19 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5142
5147
|
}
|
|
5143
5148
|
}), React.createElement("p", {
|
|
5144
5149
|
className: "promo-code-success"
|
|
5145
|
-
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null,
|
|
5150
|
+
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null, codeIsInvalid ? React.createElement("div", {
|
|
5151
|
+
className: "alert-info fail"
|
|
5152
|
+
}, React.createElement(SVG, {
|
|
5153
|
+
src: getImage('xmark.svg')
|
|
5154
|
+
}), React.createElement("p", {
|
|
5155
|
+
className: "promo-code-fail"
|
|
5156
|
+
}, "Invalid Promo Code")) : null, !showPromoInput && React.createElement(Button$1, {
|
|
5146
5157
|
className: "promo-code-button",
|
|
5147
5158
|
placeholder: "Promo Codes",
|
|
5148
5159
|
onClick: function onClick() {
|
|
5149
5160
|
setCodeIsApplied(false);
|
|
5150
5161
|
setShowPromoInput(true);
|
|
5162
|
+
setCodeIsInvalid(false);
|
|
5151
5163
|
}
|
|
5152
5164
|
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
5153
5165
|
};
|
|
@@ -5431,17 +5443,21 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5431
5443
|
codeIsApplied = _useState12[0],
|
|
5432
5444
|
setCodeIsApplied = _useState12[1];
|
|
5433
5445
|
|
|
5434
|
-
var _useState13 = useState(
|
|
5435
|
-
|
|
5436
|
-
|
|
5446
|
+
var _useState13 = useState(false),
|
|
5447
|
+
codeIsInvalid = _useState13[0],
|
|
5448
|
+
setCodeIsInvalid = _useState13[1];
|
|
5437
5449
|
|
|
5438
|
-
var _useState14 = useState(
|
|
5439
|
-
|
|
5440
|
-
|
|
5450
|
+
var _useState14 = useState(isAccessCodeEnabled),
|
|
5451
|
+
showAccessCodeSection = _useState14[0],
|
|
5452
|
+
setShowAccessCodeSection = _useState14[1];
|
|
5441
5453
|
|
|
5442
|
-
var _useState15 = useState(
|
|
5443
|
-
|
|
5444
|
-
|
|
5454
|
+
var _useState15 = useState(isPromotionsEnabled),
|
|
5455
|
+
showPromoCodeSection = _useState15[0],
|
|
5456
|
+
setShowPromoCodeSection = _useState15[1];
|
|
5457
|
+
|
|
5458
|
+
var _useState16 = useState(null),
|
|
5459
|
+
error = _useState16[0],
|
|
5460
|
+
setError = _useState16[1];
|
|
5445
5461
|
|
|
5446
5462
|
var ticketsContainerRef = useRef(null);
|
|
5447
5463
|
useEffect(function () {
|
|
@@ -5553,6 +5569,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5553
5569
|
if (response.data.success) {
|
|
5554
5570
|
attributes = _get(response, 'data.data.attributes');
|
|
5555
5571
|
type === 'promo' && setCodeIsApplied(attributes.ValidPromoCode);
|
|
5572
|
+
type === 'promo' && setCodeIsInvalid(!attributes.ValidPromoCode);
|
|
5556
5573
|
setTickets(_get(attributes, 'tickets'));
|
|
5557
5574
|
setShowWaitingList(attributes.showWaitingList);
|
|
5558
5575
|
onGetTicketsSuccess(response.data);
|
|
@@ -5872,7 +5889,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5872
5889
|
showPromoInput: showPromoInput,
|
|
5873
5890
|
setShowPromoInput: setShowPromoInput,
|
|
5874
5891
|
setCode: setCode,
|
|
5875
|
-
updateTickets: updateTickets
|
|
5892
|
+
updateTickets: updateTickets,
|
|
5893
|
+
codeIsInvalid: codeIsInvalid,
|
|
5894
|
+
setCodeIsInvalid: setCodeIsInvalid
|
|
5876
5895
|
}) : null, wrappedActionsSectionComponent, canShowGetTicketBtn() && React.createElement(Button$1, {
|
|
5877
5896
|
"aria-hidden": true,
|
|
5878
5897
|
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n " + (!isLoggedIn ? 'on-bottom' : '') + "\n ",
|