summit-registration-lite 4.0.21 → 4.0.23
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.js +59 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/.env +0 -3
package/dist/index.js
CHANGED
|
@@ -356,7 +356,7 @@ module.exports = require("react");
|
|
|
356
356
|
/***/ ((module) => {
|
|
357
357
|
|
|
358
358
|
"use strict";
|
|
359
|
-
module.exports = JSON.parse('{"purchase_complete_step":{"title":" Your order is complete","initial_order_complete_1st_paragraph_label":"A ticket has been assigned to you. To complete your additional ticket details, please click the \\"{button}\\" button.","initial_order_complete_button":"Finish Now","order_complete_1st_paragraph_label":"You may visit the \\"My Orders/Tickets\\" tab in the top right-hand corner of the navigation bar to\\n assign/reassign tickets or to complete any required ticket details.","order_complete_button":"View
|
|
359
|
+
module.exports = JSON.parse('{"purchase_complete_step":{"title":" Your order is complete","initial_order_complete_1st_paragraph_label":"A ticket has been assigned to you. To complete your additional ticket details, please click the \\"{button}\\" button.","initial_order_complete_button":"Finish Now","order_complete_1st_paragraph_label":"You may visit the \\"My Orders/Tickets\\" tab in the top right-hand corner of the navigation bar to\\n assign/reassign tickets or to complete any required ticket details.","order_complete_button":"View My Orders/Tickets","access_event_button":"Access Event Now","initial_order_footer_label":"If you wish to transfer your assigned ticket, close this window and visit the \\"My Orders/Tickets\\" tab in the top navigation bar. ","footer_assistance_text":"For further assistance, please email <a href=\\"mailto:{supportEmail}\\">{supportEmail}</a>","event_will_start_text":"The event will start on {date} at {time} {time_zone_label}"}}');
|
|
360
360
|
|
|
361
361
|
/***/ })
|
|
362
362
|
|
|
@@ -480,6 +480,8 @@ class LawPayProvider {
|
|
|
480
480
|
_defineProperty(this, "payTicket", ({
|
|
481
481
|
token = null
|
|
482
482
|
}) => async dispatch => {
|
|
483
|
+
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5, _this$userProfile6;
|
|
484
|
+
|
|
483
485
|
// Pay using affinity lawpay
|
|
484
486
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
485
487
|
let code = err.status;
|
|
@@ -510,12 +512,12 @@ class LawPayProvider {
|
|
|
510
512
|
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
511
513
|
};
|
|
512
514
|
let normalizedEntity = {
|
|
513
|
-
billing_address_1: token ? token.address1 : this.userProfile
|
|
514
|
-
billing_address_2: this.userProfile
|
|
515
|
-
billing_address_zip_code: token ? token.postal_code : this.userProfile
|
|
516
|
-
billing_address_city: this.userProfile
|
|
517
|
-
billing_address_state: this.userProfile
|
|
518
|
-
billing_address_country: this.userProfile
|
|
515
|
+
billing_address_1: token ? token.address1 : ((_this$userProfile = this.userProfile) === null || _this$userProfile === void 0 ? void 0 : _this$userProfile.address1) || '',
|
|
516
|
+
billing_address_2: ((_this$userProfile2 = this.userProfile) === null || _this$userProfile2 === void 0 ? void 0 : _this$userProfile2.address2) || '',
|
|
517
|
+
billing_address_zip_code: token ? token.postal_code : ((_this$userProfile3 = this.userProfile) === null || _this$userProfile3 === void 0 ? void 0 : _this$userProfile3.postal_code) || '',
|
|
518
|
+
billing_address_city: ((_this$userProfile4 = this.userProfile) === null || _this$userProfile4 === void 0 ? void 0 : _this$userProfile4.locality) || '',
|
|
519
|
+
billing_address_state: ((_this$userProfile5 = this.userProfile) === null || _this$userProfile5 === void 0 ? void 0 : _this$userProfile5.region) || '',
|
|
520
|
+
billing_address_country: ((_this$userProfile6 = this.userProfile) === null || _this$userProfile6 === void 0 ? void 0 : _this$userProfile6.country) || ''
|
|
519
521
|
};
|
|
520
522
|
|
|
521
523
|
if (token) {
|
|
@@ -567,6 +569,8 @@ class StripeProvider {
|
|
|
567
569
|
stripe = null,
|
|
568
570
|
zipCode = null
|
|
569
571
|
}) => async dispatch => {
|
|
572
|
+
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5;
|
|
573
|
+
|
|
570
574
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
571
575
|
let code = err.status;
|
|
572
576
|
|
|
@@ -596,12 +600,12 @@ class StripeProvider {
|
|
|
596
600
|
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
597
601
|
};
|
|
598
602
|
let normalizedEntity = {
|
|
599
|
-
billing_address_1: this.userProfile
|
|
600
|
-
billing_address_2: this.userProfile
|
|
603
|
+
billing_address_1: ((_this$userProfile = this.userProfile) === null || _this$userProfile === void 0 ? void 0 : _this$userProfile.address1) || '',
|
|
604
|
+
billing_address_2: ((_this$userProfile2 = this.userProfile) === null || _this$userProfile2 === void 0 ? void 0 : _this$userProfile2.address2) || '',
|
|
601
605
|
billing_address_zip_code: zipCode,
|
|
602
|
-
billing_address_city: this.userProfile
|
|
603
|
-
billing_address_state: this.userProfile
|
|
604
|
-
billing_address_country: this.userProfile
|
|
606
|
+
billing_address_city: ((_this$userProfile3 = this.userProfile) === null || _this$userProfile3 === void 0 ? void 0 : _this$userProfile3.locality) || '',
|
|
607
|
+
billing_address_state: ((_this$userProfile4 = this.userProfile) === null || _this$userProfile4 === void 0 ? void 0 : _this$userProfile4.region) || '',
|
|
608
|
+
billing_address_country: ((_this$userProfile5 = this.userProfile) === null || _this$userProfile5 === void 0 ? void 0 : _this$userProfile5.country) || ''
|
|
605
609
|
};
|
|
606
610
|
dispatch(startWidgetLoading());
|
|
607
611
|
|
|
@@ -1843,7 +1847,7 @@ const StripeForm = ({
|
|
|
1843
1847
|
color: '#3486cd'
|
|
1844
1848
|
}
|
|
1845
1849
|
}
|
|
1846
|
-
}, stripeOptions
|
|
1850
|
+
}, stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.style);
|
|
1847
1851
|
|
|
1848
1852
|
const onSubmit = async data => {
|
|
1849
1853
|
setStripeErrors({});
|
|
@@ -1977,7 +1981,7 @@ const stripe_component_StripeProvider = ({
|
|
|
1977
1981
|
}) => {
|
|
1978
1982
|
const stripePromise = (0,external_react_.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
1979
1983
|
const options = {
|
|
1980
|
-
fonts: stripeOptions
|
|
1984
|
+
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1981
1985
|
};
|
|
1982
1986
|
return /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.Elements, {
|
|
1983
1987
|
options: options,
|
|
@@ -2140,9 +2144,13 @@ const PersonalInfoComponent = ({
|
|
|
2140
2144
|
showCompanyInput = true,
|
|
2141
2145
|
companyDDLPlaceholder
|
|
2142
2146
|
}) => {
|
|
2147
|
+
var _errors$email, _errors$email2;
|
|
2148
|
+
|
|
2149
|
+
const initialFirstName = userProfile.given_name || (invitation ? invitation.first_name : '');
|
|
2150
|
+
const initialLastName = userProfile.family_name || (invitation ? invitation.last_name : '');
|
|
2143
2151
|
const [personalInfo, setPersonalInfo] = (0,external_react_.useState)({
|
|
2144
|
-
firstName:
|
|
2145
|
-
lastName:
|
|
2152
|
+
firstName: initialFirstName,
|
|
2153
|
+
lastName: initialLastName,
|
|
2146
2154
|
email: userProfile.email || '',
|
|
2147
2155
|
company: {
|
|
2148
2156
|
id: null,
|
|
@@ -2243,7 +2251,9 @@ const PersonalInfoComponent = ({
|
|
|
2243
2251
|
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2244
2252
|
type: "text",
|
|
2245
2253
|
placeholder: "First name *",
|
|
2246
|
-
defaultValue: personalInfo.firstName || ''
|
|
2254
|
+
defaultValue: personalInfo.firstName || '',
|
|
2255
|
+
readOnly: initialLastName !== '',
|
|
2256
|
+
className: initialLastName !== '' ? personal_information_index_module.readOnly : ''
|
|
2247
2257
|
}, register("firstName", {
|
|
2248
2258
|
required: true,
|
|
2249
2259
|
maxLength: 80
|
|
@@ -2259,7 +2269,9 @@ const PersonalInfoComponent = ({
|
|
|
2259
2269
|
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2260
2270
|
type: "text",
|
|
2261
2271
|
placeholder: "Last name *",
|
|
2262
|
-
defaultValue: personalInfo.lastName || ''
|
|
2272
|
+
defaultValue: personalInfo.lastName || '',
|
|
2273
|
+
readOnly: initialLastName !== '',
|
|
2274
|
+
className: initialLastName !== '' ? personal_information_index_module.readOnly : ''
|
|
2263
2275
|
}, register("lastName", {
|
|
2264
2276
|
required: true,
|
|
2265
2277
|
maxLength: 100
|
|
@@ -2283,10 +2295,10 @@ const PersonalInfoComponent = ({
|
|
|
2283
2295
|
pattern: /^\S+@\S+$/i
|
|
2284
2296
|
}), {
|
|
2285
2297
|
"data-testid": "email"
|
|
2286
|
-
}))), errors.email
|
|
2298
|
+
}))), ((_errors$email = errors.email) === null || _errors$email === void 0 ? void 0 : _errors$email.type) === 'required' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2287
2299
|
className: personal_information_index_module.fieldError,
|
|
2288
2300
|
"data-testid": "email-error-required"
|
|
2289
|
-
}, "This field is required."), errors.email
|
|
2301
|
+
}, "This field is required."), ((_errors$email2 = errors.email) === null || _errors$email2 === void 0 ? void 0 : _errors$email2.type) === 'pattern' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2290
2302
|
className: personal_information_index_module.fieldError,
|
|
2291
2303
|
"data-testid": "email-error-invalid"
|
|
2292
2304
|
}, "The email is invalid.")), showCompanyInput && /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -2493,7 +2505,9 @@ const TicketTypeComponent = ({
|
|
|
2493
2505
|
}
|
|
2494
2506
|
});
|
|
2495
2507
|
(0,external_react_.useEffect)(() => {
|
|
2496
|
-
|
|
2508
|
+
var _reservation$tickets;
|
|
2509
|
+
|
|
2510
|
+
if (reservation && ((_reservation$tickets = reservation.tickets) === null || _reservation$tickets === void 0 ? void 0 : _reservation$tickets.length) > 0) {
|
|
2497
2511
|
setTicket(ticketTypes.find(t => t.id === reservation.tickets[0].ticket_type_id));
|
|
2498
2512
|
}
|
|
2499
2513
|
}, []);
|
|
@@ -2523,7 +2537,7 @@ const TicketTypeComponent = ({
|
|
|
2523
2537
|
className: ticket_type_index_module.summary
|
|
2524
2538
|
}, /*#__PURE__*/external_react_default().createElement("span", null, ticket && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, `${ticket.name} (${quantity}): ${formatCurrency(ticket.cost * quantity, {
|
|
2525
2539
|
currency: ticket.currency
|
|
2526
|
-
})} ${ticket.currency}`, !isActive && reservation
|
|
2540
|
+
})} ${ticket.currency}`, !isActive && (reservation === null || reservation === void 0 ? void 0 : reservation.discount_amount) > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2527
2541
|
className: ticket_type_index_module.promoCode
|
|
2528
2542
|
}, "Promo code\xA0", /*#__PURE__*/external_react_default().createElement("abbr", {
|
|
2529
2543
|
title: reservation.promo_code
|
|
@@ -2533,7 +2547,7 @@ const TicketTypeComponent = ({
|
|
|
2533
2547
|
currency: ticket.currency
|
|
2534
2548
|
})} ${ticket.currency}`)), !isActive && reservation && /*#__PURE__*/external_react_default().createElement("span", {
|
|
2535
2549
|
className: ticket_type_index_module.promo
|
|
2536
|
-
}, "Subtotal: ", `${ticket
|
|
2550
|
+
}, "Subtotal: ", `${ticket === null || ticket === void 0 ? void 0 : ticket.currency_symbol} ${(((reservation === null || reservation === void 0 ? void 0 : reservation.raw_amount_in_cents) - (reservation === null || reservation === void 0 ? void 0 : reservation.discount_amount_in_cents)) / 100).toFixed(2)} ${ticket === null || ticket === void 0 ? void 0 : ticket.currency}`), !isActive && (reservation === null || reservation === void 0 ? void 0 : reservation.taxes_amount) > 0 && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, reservation === null || reservation === void 0 ? void 0 : reservation.applied_taxes.map(tax => {
|
|
2537
2551
|
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, {
|
|
2538
2552
|
key: tax.id
|
|
2539
2553
|
}, /*#__PURE__*/external_react_default().createElement("span", {
|
|
@@ -2655,11 +2669,11 @@ const ButtonBarComponent = ({
|
|
|
2655
2669
|
disabled: !ticketType,
|
|
2656
2670
|
className: `${button_bar_index_module.button} button`,
|
|
2657
2671
|
onClick: () => changeStep(step + 1)
|
|
2658
|
-
}, nextButtonText), step === 1 && ticketType
|
|
2672
|
+
}, nextButtonText), step === 1 && (ticketType === null || ticketType === void 0 ? void 0 : ticketType.cost) === 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
2659
2673
|
className: `${button_bar_index_module.button} button`,
|
|
2660
2674
|
type: "submit",
|
|
2661
2675
|
form: "personal-info-form"
|
|
2662
|
-
}, "Get Ticket"), step === 1 && ticketType
|
|
2676
|
+
}, "Get Ticket"), step === 1 && (ticketType === null || ticketType === void 0 ? void 0 : ticketType.cost) > 0 && /*#__PURE__*/external_react_default().createElement("button", {
|
|
2663
2677
|
className: `${button_bar_index_module.button} button`,
|
|
2664
2678
|
type: "submit",
|
|
2665
2679
|
form: "personal-info-form"
|
|
@@ -2703,8 +2717,10 @@ const getCurrentProvider = summit => {
|
|
|
2703
2717
|
};
|
|
2704
2718
|
};
|
|
2705
2719
|
const ticketHasAccessLevel = (ticket, accessLevel) => {
|
|
2720
|
+
var _ticket$badge, _ticket$badge$type;
|
|
2721
|
+
|
|
2706
2722
|
if (!ticket) return false;
|
|
2707
|
-
return ticket.badge
|
|
2723
|
+
return (_ticket$badge = ticket.badge) === null || _ticket$badge === void 0 ? void 0 : (_ticket$badge$type = _ticket$badge.type) === null || _ticket$badge$type === void 0 ? void 0 : _ticket$badge$type.access_levels.map(al => al.name).includes(accessLevel);
|
|
2708
2724
|
};
|
|
2709
2725
|
const getCurrentUserLanguage = () => {
|
|
2710
2726
|
let language = 'en';
|
|
@@ -2806,7 +2822,11 @@ const PurchaseComplete = _ref2 => {
|
|
|
2806
2822
|
onPurchaseComplete(checkout);
|
|
2807
2823
|
}, []);
|
|
2808
2824
|
const isActive = (0,external_react_.useMemo)(() => summit.start_date <= nowUtc && summit.end_date >= nowUtc, [summit, nowUtc]);
|
|
2809
|
-
const currentUserTicket = (0,external_react_.useMemo)(() => checkout
|
|
2825
|
+
const currentUserTicket = (0,external_react_.useMemo)(() => checkout === null || checkout === void 0 ? void 0 : checkout.tickets.find(t => {
|
|
2826
|
+
var _t$owner;
|
|
2827
|
+
|
|
2828
|
+
return (t === null || t === void 0 ? void 0 : (_t$owner = t.owner) === null || _t$owner === void 0 ? void 0 : _t$owner.email) == (user === null || user === void 0 ? void 0 : user.email);
|
|
2829
|
+
}), [user]);
|
|
2810
2830
|
const requireExtraQuestions = (0,external_react_.useMemo)(() => completedExtraQuestions(checkout), [user]);
|
|
2811
2831
|
|
|
2812
2832
|
const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentUserTicket && ticketHasAccessLevel(currentUserTicket, VirtualAccessLevel);
|
|
@@ -3032,6 +3052,8 @@ try {
|
|
|
3032
3052
|
}
|
|
3033
3053
|
|
|
3034
3054
|
const RegistrationLite = _ref => {
|
|
3055
|
+
var _formValues$ticketTyp, _formValues$ticketTyp2;
|
|
3056
|
+
|
|
3035
3057
|
let {
|
|
3036
3058
|
loadSession,
|
|
3037
3059
|
setMarketingSettings,
|
|
@@ -3140,8 +3162,10 @@ const RegistrationLite = _ref => {
|
|
|
3140
3162
|
}
|
|
3141
3163
|
}, [summitData, profileData]);
|
|
3142
3164
|
(0,external_react_.useEffect)(() => {
|
|
3165
|
+
var _registrationForm$val;
|
|
3166
|
+
|
|
3143
3167
|
// check if there's personal information data and no ticket data to reset widget
|
|
3144
|
-
if (step > 0 && !registrationForm.values
|
|
3168
|
+
if (step > 0 && !((_registrationForm$val = registrationForm.values) !== null && _registrationForm$val !== void 0 && _registrationForm$val.ticketType)) {
|
|
3145
3169
|
changeStep(0);
|
|
3146
3170
|
}
|
|
3147
3171
|
}, [registrationForm.values, step]);
|
|
@@ -3156,8 +3180,8 @@ const RegistrationLite = _ref => {
|
|
|
3156
3180
|
bounce: 0
|
|
3157
3181
|
}, external_react_spring_namespaceObject.config.stiff),
|
|
3158
3182
|
to: {
|
|
3159
|
-
opacity: formValues
|
|
3160
|
-
height: formValues
|
|
3183
|
+
opacity: (formValues === null || formValues === void 0 ? void 0 : (_formValues$ticketTyp = formValues.ticketType) === null || _formValues$ticketTyp === void 0 ? void 0 : _formValues$ticketTyp.cost) === 0 ? 0 : 1,
|
|
3184
|
+
height: (formValues === null || formValues === void 0 ? void 0 : (_formValues$ticketTyp2 = formValues.ticketType) === null || _formValues$ticketTyp2 === void 0 ? void 0 : _formValues$ticketTyp2.cost) === 0 ? 0 : height
|
|
3161
3185
|
}
|
|
3162
3186
|
});
|
|
3163
3187
|
|
|
@@ -3231,7 +3255,7 @@ const RegistrationLite = _ref => {
|
|
|
3231
3255
|
onClick: handleCloseClick
|
|
3232
3256
|
})), ticketTaxesError && profileData && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
3233
3257
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
3234
|
-
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData
|
|
3258
|
+
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData === null || summitData === void 0 ? void 0 : summitData.id)
|
|
3235
3259
|
}), !ticketTaxesError && profileData && allowedTicketTypes.length === 0 && requestedTicketTypes && step !== 3 && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
3236
3260
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
3237
3261
|
}), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -3270,14 +3294,16 @@ const RegistrationLite = _ref => {
|
|
|
3270
3294
|
invitation: invitation,
|
|
3271
3295
|
summitId: summitData.id,
|
|
3272
3296
|
changeForm: personalInformation => {
|
|
3297
|
+
var _registrationForm$val2, _registrationForm$val3;
|
|
3298
|
+
|
|
3273
3299
|
setFormValues(registration_lite_objectSpread(registration_lite_objectSpread({}, registrationForm.values), {}, {
|
|
3274
3300
|
personalInformation
|
|
3275
3301
|
}));
|
|
3276
3302
|
reserveTicket({
|
|
3277
3303
|
provider,
|
|
3278
3304
|
personalInformation: personalInformation,
|
|
3279
|
-
ticket: registrationForm.values
|
|
3280
|
-
ticketQuantity: registrationForm.values
|
|
3305
|
+
ticket: (_registrationForm$val2 = registrationForm.values) === null || _registrationForm$val2 === void 0 ? void 0 : _registrationForm$val2.ticketType,
|
|
3306
|
+
ticketQuantity: (_registrationForm$val3 = registrationForm.values) === null || _registrationForm$val3 === void 0 ? void 0 : _registrationForm$val3.ticketQuantity
|
|
3281
3307
|
}, {
|
|
3282
3308
|
onError: (err, res) => setFormErrors(res.body.errors)
|
|
3283
3309
|
}).catch(error => {
|