summit-registration-lite 5.0.29-beta.1 → 5.0.30
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 +84 -71
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
.form___zXb7s{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___zXb7s div.fieldWrapper___G4Wqw{width:100%;margin-bottom:5px}.form___zXb7s div.fieldWrapper___G4Wqw:first-of-type div.inputWrapper___Yz5zB{width:100%}.form___zXb7s div.fieldWrapper___G4Wqw .fieldRow___NfZdJ{justify-content:space-between;display:flex}.form___zXb7s div.fieldWrapper___G4Wqw div.inputWrapper___Yz5zB{width:48%}.form___zXb7s div.fieldWrapper___G4Wqw div.inputWrapper___Yz5zB.addressField___vmAQh{width:100%}.form___zXb7s div.lawpayWrapper___hpUBf{height:36px}.form___zXb7s div.dateWrapper___XDfqs{display:flex;justify-content:space-between}.form___zXb7s div.dateWrapper___XDfqs>div{width:48%}.form___zXb7s div.dateWrapper___XDfqs>div .dropdown___l3_bk{width:100%}.form___zXb7s div.dateWrapper___XDfqs>div .dropdown___l3_bk>div{border:1px solid var(--color_primary);width:100%}.form___zXb7s div.inputWrapper___Yz5zB{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___zXb7s div.inputWrapper___Yz5zB iframe{height:inherit;width:inherit}.form___zXb7s div.inputWrapper___Yz5zB input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___zXb7s div.inputWrapper___Yz5zB input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___zXb7s div.inputWrapper___Yz5zB input:focus-visible{outline:none}.form___zXb7s div.inputWrapper___Yz5zB i{position:relative}.form___zXb7s div.inputWrapper___Yz5zB>div{width:100%}.form___zXb7s div.inputWrapper___Yz5zB>div:first-of-type{width:95%}.form___zXb7s div.fieldError___Igq3U{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___zXb7s div.fieldError___Igq3U::before{font-family:FontAwesome;content:'\f071';margin-right:5px}
|
|
10
10
|
|
|
11
|
-
.form___DoT3x{display:flex;flex-wrap:wrap;
|
|
11
|
+
.form___DoT3x{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___DoT3x div.fieldWrapper___wa1Ks{width:48%;margin-bottom:5px}.form___DoT3x div.fieldWrapper___wa1Ks:first-of-type{width:100%}.form___DoT3x div.inputWrapper___CbXhF{display:flex;border-radius:5px;border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input{width:100%;color:var(--color_input_text_color);background-color:var(--color_input_background_color);border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___DoT3x div.inputWrapper___CbXhF input:focus-visible{outline:none}.form___DoT3x div.inputWrapper___CbXhF i{position:relative}.form___DoT3x div.inputWrapper___CbXhF>div{width:100%}.form___DoT3x div.inputWrapper___CbXhF>div:first-of-type{width:95%}.form___DoT3x div.fieldError___QrMYW{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___DoT3x div.fieldError___QrMYW::before{font-family:FontAwesome;content:'\f071';margin-right:5px}
|
|
12
12
|
|
|
13
13
|
.title___ECoNz{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.title___ECoNz div{font-weight:normal}.form___lDFka{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0 0}.form___lDFka div.fieldWrapper___Mi_nL{width:48%;margin-bottom:5px}.form___lDFka div.fieldWrapperRadio___x18VG{width:100%;margin-bottom:10px}.form___lDFka div.fieldWrapperRadio___x18VG label{display:inline-block;margin-bottom:5px}.form___lDFka div.fieldWrapperRadio___x18VG>div>div{padding-left:0px !important}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_input_border_color);background-color:var(--color_input_background_color);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;color:var(--color_input_text_color);border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___lDFka div.inputWrapper___PEQFR input:focus-visible{outline:none}.form___lDFka div.inputWrapper___PEQFR .readOnly___WRazF{opacity:0.6;cursor:default}.form___lDFka div.fieldError___ksJVe{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5;justify-content:left !important}.form___lDFka div.fieldError___ksJVe::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.form___lDFka .fieldWrapperRadio___x18VG>div{display:flex;flex-direction:row}.moreInfo___cQYdZ{display:inline-block;margin-top:10px}.moreInfoTooltip___lslgT{max-width:280px}.ticketQuantityNotice___L6gis{margin:10px 0 0 !important}.formErrors___dQQMe{margin-top:10px}.formErrors___dQQMe div+div{margin-top:10px}
|
|
14
14
|
|
package/dist/index.js
CHANGED
|
@@ -768,8 +768,7 @@ class StripeProvider {
|
|
|
768
768
|
dispatch: _dispatch
|
|
769
769
|
}) {
|
|
770
770
|
stripe_provider_defineProperty(this, "payTicket", ({
|
|
771
|
-
|
|
772
|
-
paymentMethod = null,
|
|
771
|
+
token = null,
|
|
773
772
|
stripe = null,
|
|
774
773
|
zipCode = null
|
|
775
774
|
}) => async dispatch => {
|
|
@@ -827,19 +826,20 @@ class StripeProvider {
|
|
|
827
826
|
} // regular flow
|
|
828
827
|
|
|
829
828
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
829
|
+
const {
|
|
830
|
+
id
|
|
831
|
+
} = token;
|
|
832
|
+
stripe.confirmCardPayment(this.reservation.payment_gateway_client_token, {
|
|
833
|
+
payment_method: {
|
|
834
|
+
card: {
|
|
835
|
+
token: id
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
838
|
}).then(result => {
|
|
839
839
|
if (result.error) {
|
|
840
840
|
// Reserve error.message in your UI.
|
|
841
|
-
external_sweetalert2_default().fire(result.error.message,
|
|
842
|
-
this.dispatch(changeStep(
|
|
841
|
+
external_sweetalert2_default().fire(result.error.message, 'Please retry purchase.', 'warning');
|
|
842
|
+
this.dispatch(changeStep(STEP_PERSONAL_INFO));
|
|
843
843
|
this.dispatch(removeReservedTicket());
|
|
844
844
|
this.dispatch(stopWidgetLoading());
|
|
845
845
|
} else {
|
|
@@ -847,7 +847,7 @@ class StripeProvider {
|
|
|
847
847
|
)(params)(this.dispatch).then(payload => {
|
|
848
848
|
this.dispatch(stopWidgetLoading());
|
|
849
849
|
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
850
|
-
this.dispatch(changeStep(
|
|
850
|
+
this.dispatch(changeStep(STEP_COMPLETE));
|
|
851
851
|
return payload;
|
|
852
852
|
}).catch(e => {
|
|
853
853
|
this.dispatch(stopWidgetLoading());
|
|
@@ -856,7 +856,7 @@ class StripeProvider {
|
|
|
856
856
|
}
|
|
857
857
|
}).catch(e => {
|
|
858
858
|
this.dispatch(removeReservedTicket());
|
|
859
|
-
this.dispatch(changeStep(
|
|
859
|
+
this.dispatch(changeStep(STEP_PERSONAL_INFO));
|
|
860
860
|
this.dispatch(stopWidgetLoading());
|
|
861
861
|
return e;
|
|
862
862
|
});
|
|
@@ -2201,61 +2201,45 @@ const StripeForm = ({
|
|
|
2201
2201
|
const onSubmit = async (data, ev) => {
|
|
2202
2202
|
setStripeErrors({});
|
|
2203
2203
|
|
|
2204
|
-
if (!stripe
|
|
2204
|
+
if (!stripe) {
|
|
2205
2205
|
// Stripe.js has not loaded yet. Make sure to disable
|
|
2206
2206
|
// form submission until Stripe.js has loaded.
|
|
2207
2207
|
return;
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
2210
|
const btn = document.getElementById('payment-form-btn');
|
|
2211
|
-
if (btn) btn.disabled = true;
|
|
2211
|
+
if (btn) btn.disabled = true;
|
|
2212
|
+
const cardElement = elements.getElement(react_stripe_js_namespaceObject.CardNumberElement); // @see https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
|
|
2212
2213
|
|
|
2213
2214
|
const {
|
|
2214
|
-
error
|
|
2215
|
-
|
|
2215
|
+
error,
|
|
2216
|
+
token
|
|
2217
|
+
} = await stripe.createToken(cardElement, {
|
|
2218
|
+
name: `${reservation.owner_first_name} ${reservation.owner_last_name}`,
|
|
2219
|
+
address_line1: userProfile.address1 || '',
|
|
2220
|
+
address_line2: userProfile.address2 || '',
|
|
2221
|
+
address_city: userProfile.locality || '',
|
|
2222
|
+
address_state: userProfile.region || '',
|
|
2223
|
+
address_zip: data.zipCode,
|
|
2224
|
+
address_country: userProfile.country || '',
|
|
2225
|
+
email: userProfile.email
|
|
2226
|
+
});
|
|
2216
2227
|
|
|
2217
|
-
if (
|
|
2228
|
+
if (token) {
|
|
2229
|
+
cardElement.update({
|
|
2230
|
+
disabled: true
|
|
2231
|
+
});
|
|
2232
|
+
payTicket(provider, {
|
|
2233
|
+
token,
|
|
2234
|
+
stripe,
|
|
2235
|
+
zipCode: data.zipCode
|
|
2236
|
+
});
|
|
2218
2237
|
return;
|
|
2219
2238
|
}
|
|
2220
2239
|
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
const {
|
|
2224
|
-
paymentMethod,
|
|
2225
|
-
error
|
|
2226
|
-
} = await stripe.createPaymentMethod({
|
|
2227
|
-
elements
|
|
2228
|
-
});
|
|
2229
|
-
|
|
2230
|
-
if (error) {
|
|
2231
|
-
if (stripeErrorCodeMap[error.code]) {
|
|
2232
|
-
setStripeErrors({
|
|
2233
|
-
[stripeErrorCodeMap[error.code].field]: stripeErrorCodeMap[error.code].message || error.message
|
|
2234
|
-
});
|
|
2235
|
-
}
|
|
2240
|
+
if (error) {
|
|
2241
|
+
if (btn) btn.disabled = false;
|
|
2236
2242
|
|
|
2237
|
-
if (btn) btn.disabled = false;
|
|
2238
|
-
} else {
|
|
2239
|
-
// Send the paymentMethod ID to your server
|
|
2240
|
-
if (paymentMethod) {
|
|
2241
|
-
payTicket(provider, {
|
|
2242
|
-
elements,
|
|
2243
|
-
paymentMethod,
|
|
2244
|
-
stripe,
|
|
2245
|
-
zipCode: data.zipCode
|
|
2246
|
-
});
|
|
2247
|
-
} else if (error) {
|
|
2248
|
-
if (stripeErrorCodeMap[error.code]) {
|
|
2249
|
-
setStripeErrors({
|
|
2250
|
-
[stripeErrorCodeMap[error.code].field]: stripeErrorCodeMap[error.code].message || error.message
|
|
2251
|
-
});
|
|
2252
|
-
} else {
|
|
2253
|
-
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
} catch (error) {
|
|
2258
|
-
// setPaymentError('Error processing payment');
|
|
2259
2243
|
if (stripeErrorCodeMap[error.code]) {
|
|
2260
2244
|
setStripeErrors({
|
|
2261
2245
|
[stripeErrorCodeMap[error.code].field]: stripeErrorCodeMap[error.code].message || error.message
|
|
@@ -2271,11 +2255,42 @@ const StripeForm = ({
|
|
|
2271
2255
|
className: stripe_form_index_module.form,
|
|
2272
2256
|
id: "payment-form",
|
|
2273
2257
|
onSubmit: handleSubmit(onSubmit)
|
|
2274
|
-
}, /*#__PURE__*/external_react_default().createElement(
|
|
2258
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2259
|
+
className: stripe_form_index_module.fieldWrapper
|
|
2260
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2261
|
+
className: stripe_form_index_module.inputWrapper
|
|
2262
|
+
}, /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.CardNumberElement, {
|
|
2275
2263
|
options: {
|
|
2276
|
-
style: stripeStyle
|
|
2264
|
+
style: stripeStyle,
|
|
2265
|
+
placeholder: '1234 1234 1234 1234 *'
|
|
2277
2266
|
}
|
|
2278
|
-
}), /*#__PURE__*/external_react_default().createElement("
|
|
2267
|
+
}), /*#__PURE__*/external_react_default().createElement("i", {
|
|
2268
|
+
className: "fa fa-credit-card"
|
|
2269
|
+
})), stripeErrors.cardNumber && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2270
|
+
className: stripe_form_index_module.fieldError
|
|
2271
|
+
}, stripeErrors.cardNumber)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2272
|
+
className: stripe_form_index_module.fieldWrapper
|
|
2273
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2274
|
+
className: stripe_form_index_module.inputWrapper
|
|
2275
|
+
}, /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.CardExpiryElement, {
|
|
2276
|
+
options: {
|
|
2277
|
+
style: stripeStyle,
|
|
2278
|
+
placeholder: 'MM / YY *'
|
|
2279
|
+
}
|
|
2280
|
+
})), stripeErrors.cardExpiry && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2281
|
+
className: stripe_form_index_module.fieldError
|
|
2282
|
+
}, stripeErrors.cardExpiry)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2283
|
+
className: stripe_form_index_module.fieldWrapper
|
|
2284
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2285
|
+
className: stripe_form_index_module.inputWrapper
|
|
2286
|
+
}, /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.CardCvcElement, {
|
|
2287
|
+
options: {
|
|
2288
|
+
style: stripeStyle,
|
|
2289
|
+
placeholder: 'CVC *'
|
|
2290
|
+
}
|
|
2291
|
+
})), stripeErrors.cardCvc && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2292
|
+
className: stripe_form_index_module.fieldError
|
|
2293
|
+
}, stripeErrors.cardCvc)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2279
2294
|
className: stripe_form_index_module.fieldWrapper
|
|
2280
2295
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2281
2296
|
className: stripe_form_index_module.inputWrapper
|
|
@@ -2319,22 +2334,18 @@ const stripe_component_StripeProvider = ({
|
|
|
2319
2334
|
}) => {
|
|
2320
2335
|
const stripePromise = (0,external_react_.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
2321
2336
|
const options = {
|
|
2322
|
-
fonts: stripeOptions?.fonts
|
|
2323
|
-
mode: 'payment',
|
|
2324
|
-
paymentMethodCreation: 'manual',
|
|
2325
|
-
currency: reservation?.currency.toLowerCase(),
|
|
2326
|
-
amount: reservation?.amount_in_cents
|
|
2337
|
+
fonts: stripeOptions?.fonts
|
|
2327
2338
|
};
|
|
2328
|
-
return
|
|
2329
|
-
|
|
2330
|
-
|
|
2339
|
+
return /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.Elements, {
|
|
2340
|
+
options: options,
|
|
2341
|
+
stripe: stripePromise
|
|
2331
2342
|
}, /*#__PURE__*/external_react_default().createElement(stripe_form, {
|
|
2332
2343
|
reservation: reservation,
|
|
2333
2344
|
payTicket: payTicket,
|
|
2334
2345
|
userProfile: userProfile,
|
|
2335
2346
|
stripeOptions: stripeOptions,
|
|
2336
2347
|
provider: provider
|
|
2337
|
-
}))
|
|
2348
|
+
}));
|
|
2338
2349
|
};
|
|
2339
2350
|
|
|
2340
2351
|
/* harmony default export */ const stripe_component = (stripe_component_StripeProvider);
|
|
@@ -3635,6 +3646,9 @@ const RegistrationLite = _ref => {
|
|
|
3635
3646
|
publicKey,
|
|
3636
3647
|
provider
|
|
3637
3648
|
} = getCurrentProvider(summitData);
|
|
3649
|
+
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) : [];
|
|
3650
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length === 0 && step !== STEP_COMPLETE, [allowedTicketTypes]);
|
|
3651
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => profileData && ticketTaxesLoaded && !ticketTaxesError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [ownedTickets, allowedTicketTypes]);
|
|
3638
3652
|
(0,external_react_.useEffect)(() => {
|
|
3639
3653
|
if (profileData) loadProfileData(profileData);
|
|
3640
3654
|
}, [profileData]); // just initial load ( once )
|
|
@@ -3721,7 +3735,6 @@ const RegistrationLite = _ref => {
|
|
|
3721
3735
|
|
|
3722
3736
|
|
|
3723
3737
|
if (ticketTypes.length === 0 && !requestedTicketTypes && profileData) return null;
|
|
3724
|
-
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) : [];
|
|
3725
3738
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3726
3739
|
id: `${general_module.modal}`,
|
|
3727
3740
|
className: "modal is-active"
|
|
@@ -3750,7 +3763,7 @@ const RegistrationLite = _ref => {
|
|
|
3750
3763
|
})), profileData && ticketTaxesError && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3751
3764
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3752
3765
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
3753
|
-
}),
|
|
3766
|
+
}), noAvailableTickets && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3754
3767
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3755
3768
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3756
3769
|
className: general_module.stepsWrapper
|
|
@@ -3775,7 +3788,7 @@ const RegistrationLite = _ref => {
|
|
|
3775
3788
|
idpLogoLight: idpLogoLight,
|
|
3776
3789
|
idpLogoDark: idpLogoDark,
|
|
3777
3790
|
idpLogoAlt: idpLogoAlt
|
|
3778
|
-
}), profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null,
|
|
3791
|
+
}), profileData && step !== STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, alreadyOwnedTickets && /*#__PURE__*/external_react_default().createElement(ticket_owned, {
|
|
3779
3792
|
ownedTickets: ownedTickets
|
|
3780
3793
|
}), /*#__PURE__*/external_react_default().createElement(ticket_type, {
|
|
3781
3794
|
allowedTicketTypes: allowedTicketTypes,
|