tf-checkout-react 1.3.6 → 1.3.8
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 -18
- 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 -18
- 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 +23 -17
- package/src/components/ticketsContainer/PromoCodeSection.tsx +16 -4
- package/src/components/ticketsContainer/index.tsx +4 -0
- package/src/env.ts +3 -3
|
@@ -7,5 +7,7 @@ export interface IPromoCodeSectionProps {
|
|
|
7
7
|
setShowPromoInput: (value: boolean) => void;
|
|
8
8
|
updateTickets: (value: boolean, type: string) => void;
|
|
9
9
|
setCodeIsApplied: (value: boolean) => void;
|
|
10
|
+
codeIsInvalid: boolean;
|
|
11
|
+
setCodeIsInvalid: (value: boolean) => void;
|
|
10
12
|
}
|
|
11
|
-
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied }: IPromoCodeSectionProps) => JSX.Element;
|
|
13
|
+
export declare const PromoCodeSection: ({ code, codeIsApplied, showPromoInput, setCode, setShowPromoInput, updateTickets, setCodeIsApplied, codeIsInvalid, setCodeIsInvalid }: IPromoCodeSectionProps) => JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
|
4
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
5
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
6
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
7
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
viewBox="0 0 48 48"
|
|
12
|
+
version="1.1"
|
|
13
|
+
id="svg15"
|
|
14
|
+
sodipodi:docname="cross red circle.svg"
|
|
15
|
+
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
|
16
|
+
<metadata
|
|
17
|
+
id="metadata19">
|
|
18
|
+
<rdf:RDF>
|
|
19
|
+
<cc:Work
|
|
20
|
+
rdf:about="">
|
|
21
|
+
<dc:format>image/svg+xml</dc:format>
|
|
22
|
+
<dc:type
|
|
23
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
24
|
+
<dc:title />
|
|
25
|
+
</cc:Work>
|
|
26
|
+
</rdf:RDF>
|
|
27
|
+
</metadata>
|
|
28
|
+
<sodipodi:namedview
|
|
29
|
+
pagecolor="#ffffff"
|
|
30
|
+
bordercolor="#666666"
|
|
31
|
+
borderopacity="1"
|
|
32
|
+
objecttolerance="10"
|
|
33
|
+
gridtolerance="10"
|
|
34
|
+
guidetolerance="10"
|
|
35
|
+
inkscape:pageopacity="0"
|
|
36
|
+
inkscape:pageshadow="2"
|
|
37
|
+
inkscape:window-width="1920"
|
|
38
|
+
inkscape:window-height="1027"
|
|
39
|
+
id="namedview17"
|
|
40
|
+
showgrid="false"
|
|
41
|
+
inkscape:zoom="4.9166667"
|
|
42
|
+
inkscape:cx="-11.694915"
|
|
43
|
+
inkscape:cy="40.271186"
|
|
44
|
+
inkscape:window-x="-8"
|
|
45
|
+
inkscape:window-y="-8"
|
|
46
|
+
inkscape:window-maximized="1"
|
|
47
|
+
inkscape:current-layer="g13" />
|
|
48
|
+
<defs
|
|
49
|
+
id="defs7">
|
|
50
|
+
<linearGradient
|
|
51
|
+
id="linearGradient828"
|
|
52
|
+
osb:paint="solid">
|
|
53
|
+
<stop
|
|
54
|
+
style="stop-color:#ff0000;stop-opacity:1;"
|
|
55
|
+
offset="0"
|
|
56
|
+
id="stop826" />
|
|
57
|
+
</linearGradient>
|
|
58
|
+
<linearGradient
|
|
59
|
+
id="0"
|
|
60
|
+
gradientUnits="userSpaceOnUse"
|
|
61
|
+
y1="47.37"
|
|
62
|
+
x2="0"
|
|
63
|
+
y2="-1.429">
|
|
64
|
+
<stop
|
|
65
|
+
stop-color="#c52828"
|
|
66
|
+
id="stop2" />
|
|
67
|
+
<stop
|
|
68
|
+
offset="1"
|
|
69
|
+
stop-color="#ff5454"
|
|
70
|
+
id="stop4" />
|
|
71
|
+
</linearGradient>
|
|
72
|
+
</defs>
|
|
73
|
+
<g
|
|
74
|
+
transform="matrix(.99999 0 0 .99999-58.37.882)"
|
|
75
|
+
enable-background="new"
|
|
76
|
+
id="g13"
|
|
77
|
+
style="fill-opacity:1">
|
|
78
|
+
<circle
|
|
79
|
+
cx="82.37"
|
|
80
|
+
cy="23.12"
|
|
81
|
+
r="24"
|
|
82
|
+
fill="url(#0)"
|
|
83
|
+
id="circle9"
|
|
84
|
+
style="fill-opacity:1;fill:#dd3333" />
|
|
85
|
+
<path
|
|
86
|
+
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"
|
|
87
|
+
fill="#fff"
|
|
88
|
+
fill-opacity=".842"
|
|
89
|
+
id="path11"
|
|
90
|
+
style="fill-opacity:1;fill:#ffffff" />
|
|
91
|
+
</g>
|
|
92
|
+
</svg>
|
|
@@ -4728,17 +4728,15 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
|
|
|
4728
4728
|
}, React__default.createElement("p", {
|
|
4729
4729
|
className: "title"
|
|
4730
4730
|
}, confirmationTitle), React__default.createElement("div", {
|
|
4731
|
-
className: "share-message-section"
|
|
4732
|
-
|
|
4731
|
+
className: "share-message-section",
|
|
4732
|
+
dangerouslySetInnerHTML: data.custom_confirmation_page_text ? createMarkup(data.custom_confirmation_page_text) : undefined
|
|
4733
|
+
}, data.custom_confirmation_page_text ? undefined : React__default.createElement(React__default.Fragment, null, data.attach_tickets ? React__default.createElement("span", {
|
|
4733
4734
|
className: "main"
|
|
4734
4735
|
}, "Your tickets have been emailed to you") : React__default.createElement("span", {
|
|
4735
4736
|
className: "main"
|
|
4736
4737
|
}, confirmationMain), React__default.createElement("span", {
|
|
4737
4738
|
className: "helper"
|
|
4738
|
-
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper)))), data.
|
|
4739
|
-
className: 'custom-confirmation-page-text',
|
|
4740
|
-
dangerouslySetInnerHTML: createMarkup(data.custom_confirmation_page_text)
|
|
4741
|
-
}) : null, data.disable_referral === false && isReferralEnabled && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
4739
|
+
}, data.attach_tickets ? 'Please bring them with you to the event' : confirmationHelper))))), data.disable_referral === false && isReferralEnabled && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
4742
4740
|
className: "referral_text_image_section"
|
|
4743
4741
|
}, React__default.createElement("div", {
|
|
4744
4742
|
className: "referral_text_section"
|
|
@@ -5105,7 +5103,9 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5105
5103
|
setCode = _ref.setCode,
|
|
5106
5104
|
setShowPromoInput = _ref.setShowPromoInput,
|
|
5107
5105
|
updateTickets = _ref.updateTickets,
|
|
5108
|
-
setCodeIsApplied = _ref.setCodeIsApplied
|
|
5106
|
+
setCodeIsApplied = _ref.setCodeIsApplied,
|
|
5107
|
+
codeIsInvalid = _ref.codeIsInvalid,
|
|
5108
|
+
setCodeIsInvalid = _ref.setCodeIsInvalid;
|
|
5109
5109
|
var isPromoCodeHasValue = !!code.trim();
|
|
5110
5110
|
|
|
5111
5111
|
var renderInputField = function renderInputField() {
|
|
@@ -5147,12 +5147,19 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5147
5147
|
}
|
|
5148
5148
|
}), React__default.createElement("p", {
|
|
5149
5149
|
className: "promo-code-success"
|
|
5150
|
-
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null,
|
|
5150
|
+
}, "PROMO CODE APPLIED SUCCESSFULLY")) : null, codeIsInvalid ? React__default.createElement("div", {
|
|
5151
|
+
className: "alert-info fail"
|
|
5152
|
+
}, React__default.createElement(SVG, {
|
|
5153
|
+
src: getImage('xmark.svg')
|
|
5154
|
+
}), React__default.createElement("p", {
|
|
5155
|
+
className: "promo-code-fail"
|
|
5156
|
+
}, "Invalid Promo Code")) : null, !showPromoInput && React__default.createElement(Button$1, {
|
|
5151
5157
|
className: "promo-code-button",
|
|
5152
5158
|
placeholder: "Promo Codes",
|
|
5153
5159
|
onClick: function onClick() {
|
|
5154
5160
|
setCodeIsApplied(false);
|
|
5155
5161
|
setShowPromoInput(true);
|
|
5162
|
+
setCodeIsInvalid(false);
|
|
5156
5163
|
}
|
|
5157
5164
|
}, "Got a promo code? Click here"), showPromoInput && renderInputField());
|
|
5158
5165
|
};
|
|
@@ -5436,17 +5443,21 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5436
5443
|
codeIsApplied = _useState12[0],
|
|
5437
5444
|
setCodeIsApplied = _useState12[1];
|
|
5438
5445
|
|
|
5439
|
-
var _useState13 = React.useState(
|
|
5440
|
-
|
|
5441
|
-
|
|
5446
|
+
var _useState13 = React.useState(false),
|
|
5447
|
+
codeIsInvalid = _useState13[0],
|
|
5448
|
+
setCodeIsInvalid = _useState13[1];
|
|
5442
5449
|
|
|
5443
|
-
var _useState14 = React.useState(
|
|
5444
|
-
|
|
5445
|
-
|
|
5450
|
+
var _useState14 = React.useState(isAccessCodeEnabled),
|
|
5451
|
+
showAccessCodeSection = _useState14[0],
|
|
5452
|
+
setShowAccessCodeSection = _useState14[1];
|
|
5446
5453
|
|
|
5447
|
-
var _useState15 = React.useState(
|
|
5448
|
-
|
|
5449
|
-
|
|
5454
|
+
var _useState15 = React.useState(isPromotionsEnabled),
|
|
5455
|
+
showPromoCodeSection = _useState15[0],
|
|
5456
|
+
setShowPromoCodeSection = _useState15[1];
|
|
5457
|
+
|
|
5458
|
+
var _useState16 = React.useState(null),
|
|
5459
|
+
error = _useState16[0],
|
|
5460
|
+
setError = _useState16[1];
|
|
5450
5461
|
|
|
5451
5462
|
var ticketsContainerRef = React.useRef(null);
|
|
5452
5463
|
React.useEffect(function () {
|
|
@@ -5558,6 +5569,7 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5558
5569
|
if (response.data.success) {
|
|
5559
5570
|
attributes = _get(response, 'data.data.attributes');
|
|
5560
5571
|
type === 'promo' && setCodeIsApplied(attributes.ValidPromoCode);
|
|
5572
|
+
type === 'promo' && setCodeIsInvalid(!attributes.ValidPromoCode);
|
|
5561
5573
|
setTickets(_get(attributes, 'tickets'));
|
|
5562
5574
|
setShowWaitingList(attributes.showWaitingList);
|
|
5563
5575
|
onGetTicketsSuccess(response.data);
|
|
@@ -5877,7 +5889,9 @@ var TicketsContainer = function TicketsContainer(_ref) {
|
|
|
5877
5889
|
showPromoInput: showPromoInput,
|
|
5878
5890
|
setShowPromoInput: setShowPromoInput,
|
|
5879
5891
|
setCode: setCode,
|
|
5880
|
-
updateTickets: updateTickets
|
|
5892
|
+
updateTickets: updateTickets,
|
|
5893
|
+
codeIsInvalid: codeIsInvalid,
|
|
5894
|
+
setCodeIsInvalid: setCodeIsInvalid
|
|
5881
5895
|
}) : null, wrappedActionsSectionComponent, canShowGetTicketBtn() && React__default.createElement(Button$1, {
|
|
5882
5896
|
"aria-hidden": true,
|
|
5883
5897
|
className: "book-button \n " + (bookButtonIsDisabled ? 'disabled' : '') + " \n " + (isButtonScrollable ? 'is-scrollable' : '') + "\n " + (!isLoggedIn ? 'on-bottom' : '') + "\n ",
|