summit-registration-lite 5.0.29 → 5.0.31
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/index.css +1 -1
- package/dist/index.js +48 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
.placeholder___pcdCn{border-radius:5px;width:100%;border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);padding:5px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;height:36px}.placeholder___pcdCn i{padding:2px 5px;border-left:1px solid var(--color_primary)}.placeholder___pcdCn .selectedTicket___qkbpH{max-height:25px;word-wrap:break-word;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:400px}@media screen and (max-width: 630px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:300px}}@media screen and (max-width: 500px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:200px}}@media screen and (max-width: 400px){.placeholder___pcdCn .selectedTicket___qkbpH{max-width:100px}}.inPersonDisclaimer___z_DzO{padding:4px}.dropdown___mfbPG{margin-top:10px;border-radius:5px;width:100%;border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color);cursor:pointer}.dropdown___mfbPG div{padding:5px}.dropdown___mfbPG div:hover{border-radius:5px;background-color:var(--color_primary50);color:var(--color_input_text_color)}.soldOut___rBLC0,.soldOut___rBLC0:hover,.soldOut___rBLC0:focus{color:inherit !important;background-color:#dedede !important;opacity:0.65;cursor:not-allowed}
|
|
18
18
|
|
|
19
|
-
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%;width:30%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1;height:33px;width:50%;min-width:220px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;padding:13px 8px;width:70%;height:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1.5px solid var(--color_input_border_color);border-radius:4px 0px 0px 4px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input.promoCodeActive___j7xnn{padding-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5{display:flex;align-items:center;width:30%;height:100%;background-color:#818181;border-radius:0px 4px 4px 0px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5.noCode___YUmVy{background-color:#CFCFCF;cursor:not-allowed}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5 button{color:#fff;font-size:14px;font-style:normal;font-weight:600;line-height:120%;letter-spacing:-0.14px;width:100%;height:100%;border:none;background-color:transparent}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .appliedCodeIcon___pa3B4{position:absolute;left:60%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{display:inline-block}
|
|
19
|
+
.promoCodeWrapper___aw3Zx{padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:15px}.promoCodeWrapper___aw3Zx span{color:var(--color_text_dark);font-size:14px;font-weight:600;line-height:140%;width:30%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{display:flex;align-items:center;position:relative;flex:1;height:33px;width:50%;min-width:220px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input{display:inline-flex;padding:13px 8px;width:70%;height:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:1.5px solid var(--color_input_border_color);border-radius:4px 0px 0px 4px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET input.promoCodeActive___j7xnn{padding-right:25px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5{display:flex;align-items:center;width:30%;height:100%;background-color:#818181;border-radius:0px 4px 4px 0px}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5.noCode___YUmVy{background-color:#CFCFCF;cursor:not-allowed}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .codeButtonWrapper___jVZh5 button{color:#fff;font-size:14px;font-style:normal;font-weight:600;line-height:120%;letter-spacing:-0.14px;width:100%;height:100%;border:none;background-color:transparent}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET .appliedCodeIcon___pa3B4{position:absolute;left:60%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{display:inline-block}@media screen and (max-width: 540px){.promoCodeWrapper___aw3Zx span{width:100%}.promoCodeWrapper___aw3Zx .promoCodeInput___rDiET{width:100%}.promoCodeWrapper___aw3Zx .moreInfo___Ru3Rv{width:100%}}.moreInfoTooltip___eaYWm{max-width:280px}
|
|
20
20
|
|
|
21
21
|
.button___MZBIY{font-weight:bold !important;font-size:1em !important;cursor:pointer !important;border:1px solid var(--color_input_border_color) !important;color:var(--color_input_text_color) !important;background-color:var(--color_input_background_color) !important}.button___MZBIY[disabled]{background-color:var(--color_secondary_contrast) !important}.button___MZBIY:hover{color:var(--color_input_text_color) !important}.button___MZBIY:active,.button___MZBIY:focus{color:var(--color_input_text_color) !important}.outerWrapper___XRnaq{padding:10px 0px 10px 10px;margin:10px}.outerWrapper___XRnaq .innerWrapper___LFsOH{display:flex;justify-content:space-between;align-items:center}.outerWrapper___XRnaq .innerWrapper___LFsOH span{font-size:14px}.outerWrapper___XRnaq .innerWrapper___LFsOH .registration___jdf6T{cursor:pointer;color:var(--color_primary);text-decoration:underline}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y{display:flex}.outerWrapper___XRnaq .innerWrapper___LFsOH .actions___Gsf0y button{margin-left:10px}
|
|
22
22
|
|
package/dist/index.js
CHANGED
|
@@ -1113,6 +1113,19 @@ const validatePromoCode = (ticketData, {
|
|
|
1113
1113
|
promoCode: currentPromoCode
|
|
1114
1114
|
}
|
|
1115
1115
|
} = getState();
|
|
1116
|
+
const {
|
|
1117
|
+
promoCode: formPromoCode
|
|
1118
|
+
} = ticketData;
|
|
1119
|
+
|
|
1120
|
+
if (formPromoCode && !currentPromoCode) {
|
|
1121
|
+
const defaultMessage = `You entered a promo code but it hasn't been applied. Make sure to click the 'Apply' button or remove it before continuing.`;
|
|
1122
|
+
const notAppliedCodeError = {
|
|
1123
|
+
body: {
|
|
1124
|
+
errors: [defaultMessage]
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
return onError(null, notAppliedCodeError);
|
|
1128
|
+
}
|
|
1116
1129
|
|
|
1117
1130
|
if (summitId && currentPromoCode) {
|
|
1118
1131
|
dispatch(startWidgetLoading());
|
|
@@ -2903,11 +2916,18 @@ const PromoCodeInput = ({
|
|
|
2903
2916
|
applyPromoCode,
|
|
2904
2917
|
promoCode,
|
|
2905
2918
|
removePromoCode,
|
|
2906
|
-
showMultipleTicketTexts
|
|
2919
|
+
showMultipleTicketTexts,
|
|
2920
|
+
onPromoCodeChange
|
|
2907
2921
|
}) => {
|
|
2908
2922
|
const [statePromoCode, setStatePromoCode] = (0,external_react_.useState)(promoCode);
|
|
2923
|
+
|
|
2924
|
+
const handlePromoCodeChange = value => {
|
|
2925
|
+
onPromoCodeChange(value);
|
|
2926
|
+
setStatePromoCode(value);
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2909
2929
|
(0,external_react_.useEffect)(() => {
|
|
2910
|
-
if (isEmptyString(promoCode))
|
|
2930
|
+
if (isEmptyString(promoCode)) handlePromoCodeChange(promoCode);
|
|
2911
2931
|
}, [promoCode]);
|
|
2912
2932
|
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2913
2933
|
className: promocode_input_index_module.promoCodeWrapper
|
|
@@ -2917,7 +2937,7 @@ const PromoCodeInput = ({
|
|
|
2917
2937
|
className: `${promoCode ? promocode_input_index_module.promoCodeActive : ''}`,
|
|
2918
2938
|
type: "text",
|
|
2919
2939
|
value: statePromoCode,
|
|
2920
|
-
onChange: ev =>
|
|
2940
|
+
onChange: ev => handlePromoCodeChange(ev.target.value),
|
|
2921
2941
|
placeholder: "Enter your promo code",
|
|
2922
2942
|
onKeyDown: e => {
|
|
2923
2943
|
if (e.key === "Enter") applyPromoCode(statePromoCode);
|
|
@@ -3042,6 +3062,10 @@ const TicketTypeComponent = ({
|
|
|
3042
3062
|
});
|
|
3043
3063
|
setTicket(updatedCurrentTicket);
|
|
3044
3064
|
}
|
|
3065
|
+
|
|
3066
|
+
if (!promoCode) changeForm({
|
|
3067
|
+
promoCode: ''
|
|
3068
|
+
});
|
|
3045
3069
|
}, [promoCode, originalTicketTypes]);
|
|
3046
3070
|
const isPrePaidReservation = (0,external_react_.useMemo)(() => reservation ? isPrePaidOrder(reservation) : false, [reservation]);
|
|
3047
3071
|
|
|
@@ -3050,6 +3074,12 @@ const TicketTypeComponent = ({
|
|
|
3050
3074
|
setQuantity(minQuantity);
|
|
3051
3075
|
};
|
|
3052
3076
|
|
|
3077
|
+
const handlePromoCodeChange = code => {
|
|
3078
|
+
changeForm({
|
|
3079
|
+
promoCode: code
|
|
3080
|
+
});
|
|
3081
|
+
};
|
|
3082
|
+
|
|
3053
3083
|
const incrementQuantity = () => setQuantity(quantity + 1);
|
|
3054
3084
|
|
|
3055
3085
|
const decrementQuantity = () => setQuantity(quantity - 1);
|
|
@@ -3134,8 +3164,10 @@ const TicketTypeComponent = ({
|
|
|
3134
3164
|
promoCode: promoCode,
|
|
3135
3165
|
applyPromoCode: applyPromoCode,
|
|
3136
3166
|
showMultipleTicketTexts: showMultipleTicketTexts,
|
|
3137
|
-
removePromoCode: removePromoCode
|
|
3138
|
-
|
|
3167
|
+
removePromoCode: removePromoCode,
|
|
3168
|
+
onPromoCodeChange: handlePromoCodeChange
|
|
3169
|
+
}), promoCodeError && Object.values(promoCodeError).map((er, index) => /*#__PURE__*/external_react_default().createElement("div", {
|
|
3170
|
+
key: `error-${index}`,
|
|
3139
3171
|
className: `${ticket_type_index_module.promocodeError} alert alert-danger`
|
|
3140
3172
|
}, er))), showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
3141
3173
|
className: ticket_type_index_module.moreInfo,
|
|
@@ -3192,7 +3224,8 @@ const ButtonBarComponent = ({
|
|
|
3192
3224
|
}) => {
|
|
3193
3225
|
const {
|
|
3194
3226
|
ticketType,
|
|
3195
|
-
ticketQuantity
|
|
3227
|
+
ticketQuantity,
|
|
3228
|
+
promoCode
|
|
3196
3229
|
} = formValues || {};
|
|
3197
3230
|
const nextButtonText = inPersonDisclaimer && ticketType && isInPersonTicketType(ticketType) ? 'Accept' : 'Next';
|
|
3198
3231
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3213,7 +3246,8 @@ const ButtonBarComponent = ({
|
|
|
3213
3246
|
disabled: !ticketType,
|
|
3214
3247
|
className: `${button_bar_index_module.button} button`,
|
|
3215
3248
|
onClick: () => validatePromoCode(button_bar_objectSpread(button_bar_objectSpread({}, ticketType), {}, {
|
|
3216
|
-
ticketQuantity
|
|
3249
|
+
ticketQuantity,
|
|
3250
|
+
promoCode
|
|
3217
3251
|
}), onValidateError)
|
|
3218
3252
|
}, nextButtonText), step === STEP_PERSONAL_INFO && ticketType?.cost === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
3219
3253
|
className: `${button_bar_index_module.button} button`,
|
|
@@ -3623,7 +3657,8 @@ const RegistrationLite = _ref => {
|
|
|
3623
3657
|
ticketType: null,
|
|
3624
3658
|
ticketQuantity: 1,
|
|
3625
3659
|
personalInformation: null,
|
|
3626
|
-
paymentInformation: null
|
|
3660
|
+
paymentInformation: null,
|
|
3661
|
+
promoCode: ''
|
|
3627
3662
|
},
|
|
3628
3663
|
errors: []
|
|
3629
3664
|
});
|
|
@@ -3646,6 +3681,9 @@ const RegistrationLite = _ref => {
|
|
|
3646
3681
|
publicKey,
|
|
3647
3682
|
provider
|
|
3648
3683
|
} = getCurrentProvider(summitData);
|
|
3684
|
+
const allowedTicketTypes = ticketTaxesLoaded ? ticketTypes.filter(tt => tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [];
|
|
3685
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length === 0 && step !== STEP_COMPLETE, [allowedTicketTypes]);
|
|
3686
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [ownedTickets, allowedTicketTypes]);
|
|
3649
3687
|
(0,external_react_.useEffect)(() => {
|
|
3650
3688
|
if (profileData) loadProfileData(profileData);
|
|
3651
3689
|
}, [profileData]); // just initial load ( once )
|
|
@@ -3732,7 +3770,6 @@ const RegistrationLite = _ref => {
|
|
|
3732
3770
|
|
|
3733
3771
|
|
|
3734
3772
|
if (ticketTypes.length === 0 && !requestedTicketTypes && profileData) return null;
|
|
3735
|
-
const allowedTicketTypes = ticketTaxesLoaded ? ticketTypes.filter(tt => tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [];
|
|
3736
3773
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3737
3774
|
id: `${general_module.modal}`,
|
|
3738
3775
|
className: "modal is-active"
|
|
@@ -3761,7 +3798,7 @@ const RegistrationLite = _ref => {
|
|
|
3761
3798
|
})), profileData && ticketTaxesError && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3762
3799
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3763
3800
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
3764
|
-
}),
|
|
3801
|
+
}), noAvailableTickets && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3765
3802
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3766
3803
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3767
3804
|
className: general_module.stepsWrapper
|
|
@@ -3786,7 +3823,7 @@ const RegistrationLite = _ref => {
|
|
|
3786
3823
|
idpLogoLight: idpLogoLight,
|
|
3787
3824
|
idpLogoDark: idpLogoDark,
|
|
3788
3825
|
idpLogoAlt: idpLogoAlt
|
|
3789
|
-
}), profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null,
|
|
3826
|
+
}), profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, alreadyOwnedTickets && /*#__PURE__*/external_react_default().createElement(ticket_owned, {
|
|
3790
3827
|
ownedTickets: ownedTickets
|
|
3791
3828
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
3792
3829
|
allowedTicketTypes: allowedTicketTypes,
|