summit-registration-lite 5.0.13 → 5.0.14
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/README.md +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +162 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ React component for the summit registration lite widget
|
|
|
55
55
|
|
|
56
56
|
**closeWidget** = method passed that will be called if the user tries to close the widget
|
|
57
57
|
|
|
58
|
-
**goToExtraQuestions** = method passed that will be called by component to redirect to extra questions page
|
|
58
|
+
**goToExtraQuestions** = method passed that will be called by component to redirect to extra questions page. Pass attendeeId
|
|
59
59
|
|
|
60
60
|
**goToEvent** = method passed that will be called to redirect the user to the current event
|
|
61
61
|
|
package/dist/index.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
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
|
-
.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.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}.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}
|
|
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
|
|
|
15
15
|
.title___DNZyl{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.summary___quWdZ{text-align:right}.promoCode___bqTCw{display:inline-flex}.promoCode___bqTCw abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:10ch}.crossOut___QZ7dy{text-decoration:line-through}.discount___sEK_Q{color:red}.taxes___fe8oJ{display:inline-flex}.taxes___fe8oJ abbr{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:15ch}.promo___F8lPO{font-weight:bold;display:flex;justify-content:flex-end}.form___aoo7w{display:flex;gap:10px;margin-top:10px}.dropdown____HWg0{flex:1 1 auto}.quantity___SIEQZ{flex-shrink:0}.quantity___SIEQZ input,.quantity___SIEQZ button{height:36px;text-align:center;border:1px solid var(--color_input_border_color)}.quantity___SIEQZ input{padding:0 8px;width:48px !important}.quantity___SIEQZ input,.quantity___SIEQZ input:read-only{border:1px solid var(--color_input_border_color);color:var(--color_input_text_color);background-color:var(--color_input_background_color)}.quantity___SIEQZ button{display:flex;align-items:center}.quantity___SIEQZ button:disabled,.quantity___SIEQZ button:disabled:hover{opacity:0.65;background:#dedede;border-color:#bebebe}.soldOut___Hatfr{height:36px;padding:0 16px;line-height:34px;font-weight:700px;background:#dedede;border:solid 1px #bebebe;border-radius:5px;opacity:0.65;font-weight:700;flex-shrink:0}.moreInfo___LmwOe{display:inline-block;margin-top:10px}.moreInfoTooltip___nOBf1{max-width:280px}.inPersonDisclaimer___PXGTz{margin-top:15px;padding-right:10px;max-height:150px;overflow-y:auto}
|
|
16
16
|
|
package/dist/index.js
CHANGED
|
@@ -373,7 +373,7 @@ module.exports = require("react");
|
|
|
373
373
|
/***/ ((module) => {
|
|
374
374
|
|
|
375
375
|
"use strict";
|
|
376
|
-
module.exports = JSON.parse('{"purchase_complete_step":{"title":" Your order is complete","initial_order_complete_1st_paragraph_label":"A ticket has been assigned to
|
|
376
|
+
module.exports = JSON.parse('{"purchase_complete_step":{"title":" Your order is complete","initial_order_complete_1st_paragraph_label":"A ticket has been assigned to {attendee}. To complete {adv} 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}"}}');
|
|
377
377
|
|
|
378
378
|
/***/ })
|
|
379
379
|
|
|
@@ -736,6 +736,7 @@ function actions_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
736
736
|
|
|
737
737
|
|
|
738
738
|
|
|
739
|
+
|
|
739
740
|
const START_WIDGET_LOADING = 'START_WIDGET_LOADING';
|
|
740
741
|
const STOP_WIDGET_LOADING = 'STOP_WIDGET_LOADING';
|
|
741
742
|
const LOAD_INITIAL_VARS = 'LOAD_INITIAL_VARS';
|
|
@@ -879,7 +880,8 @@ const reserveTicket = ({
|
|
|
879
880
|
lastName,
|
|
880
881
|
email,
|
|
881
882
|
company,
|
|
882
|
-
promoCode
|
|
883
|
+
promoCode,
|
|
884
|
+
attendee
|
|
883
885
|
} = personalInformation;
|
|
884
886
|
dispatch(startWidgetLoading());
|
|
885
887
|
const access_token = await getAccessToken();
|
|
@@ -887,6 +889,13 @@ const reserveTicket = ({
|
|
|
887
889
|
type_id: ticket.id,
|
|
888
890
|
promo_code: promoCode || null
|
|
889
891
|
}));
|
|
892
|
+
|
|
893
|
+
if (tickets.length === 1 && attendee) {
|
|
894
|
+
tickets[0].attendee_first_name = attendee.firstName;
|
|
895
|
+
tickets[0].attendee_last_name = attendee.lastName;
|
|
896
|
+
tickets[0].attendee_email = attendee.email;
|
|
897
|
+
}
|
|
898
|
+
|
|
890
899
|
let params = {
|
|
891
900
|
access_token,
|
|
892
901
|
expand: 'tickets,tickets.owner,tickets.ticket_type,tickets.ticket_type.taxes'
|
|
@@ -1454,6 +1463,10 @@ const VirtualAccessLevel = 'VIRTUAL';
|
|
|
1454
1463
|
const DefaultBGColor = '#000000';
|
|
1455
1464
|
const DefaultTextColor = '#FFFFFF';
|
|
1456
1465
|
const DefaultHintColor = 'rgb(58, 63, 65)';
|
|
1466
|
+
const EMAIL_REGEXP = /(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;
|
|
1467
|
+
const TICKET_OWNER_MYSELF = 'myself';
|
|
1468
|
+
const TICKET_OWNER_SOMEONE = 'someoneElse';
|
|
1469
|
+
const TICKET_OWNER_UNASSIGNED = 'unassigned';
|
|
1457
1470
|
;// CONCATENATED MODULE: ./src/components/lawpay-form/index.js
|
|
1458
1471
|
function lawpay_form_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1459
1472
|
|
|
@@ -2128,7 +2141,7 @@ const formatErrorMessage = string => {
|
|
|
2128
2141
|
};
|
|
2129
2142
|
;// CONCATENATED MODULE: ./src/components/personal-information/index.module.scss
|
|
2130
2143
|
// extracted by mini-css-extract-plugin
|
|
2131
|
-
/* harmony default export */ const personal_information_index_module = ({"title":"title___ECoNz","form":"form___lDFka","fieldWrapper":"fieldWrapper___Mi_nL","inputWrapper":"inputWrapper___PEQFR","readOnly":"readOnly___WRazF","fieldError":"fieldError___ksJVe","moreInfo":"moreInfo___cQYdZ","moreInfoTooltip":"moreInfoTooltip___lslgT","ticketQuantityNotice":"ticketQuantityNotice___L6gis","formErrors":"formErrors___dQQMe"});
|
|
2144
|
+
/* harmony default export */ const personal_information_index_module = ({"title":"title___ECoNz","form":"form___lDFka","fieldWrapper":"fieldWrapper___Mi_nL","fieldWrapperRadio":"fieldWrapperRadio___x18VG","inputWrapper":"inputWrapper___PEQFR","readOnly":"readOnly___WRazF","fieldError":"fieldError___ksJVe","moreInfo":"moreInfo___cQYdZ","moreInfoTooltip":"moreInfoTooltip___lslgT","ticketQuantityNotice":"ticketQuantityNotice___L6gis","formErrors":"formErrors___dQQMe"});
|
|
2132
2145
|
;// CONCATENATED MODULE: ./src/components/personal-information/index.js
|
|
2133
2146
|
function personal_information_extends() { personal_information_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return personal_information_extends.apply(this, arguments); }
|
|
2134
2147
|
|
|
@@ -2159,6 +2172,7 @@ function personal_information_defineProperty(obj, key, value) { if (key in obj)
|
|
|
2159
2172
|
|
|
2160
2173
|
|
|
2161
2174
|
|
|
2175
|
+
|
|
2162
2176
|
const PersonalInfoComponent = ({
|
|
2163
2177
|
isActive,
|
|
2164
2178
|
changeForm,
|
|
@@ -2178,6 +2192,21 @@ const PersonalInfoComponent = ({
|
|
|
2178
2192
|
}) => {
|
|
2179
2193
|
const initialFirstName = userProfile.given_name || (invitation ? invitation.first_name : '');
|
|
2180
2194
|
const initialLastName = userProfile.family_name || (invitation ? invitation.last_name : '');
|
|
2195
|
+
const [ticketOwnerOption, setTicketOwnerOption] = (0,external_react_.useState)('');
|
|
2196
|
+
const [ticketOwnerError, setTicketOwnerError] = (0,external_react_.useState)(false); // if there's only one ticket on the order and there is no invitation available, display the radio button to assign the ticket
|
|
2197
|
+
|
|
2198
|
+
const shouldDisplayTicketAssignment = () => formValues.ticketQuantity === 1 && !invitation;
|
|
2199
|
+
|
|
2200
|
+
const radioListOptions = [{
|
|
2201
|
+
label: "Myself",
|
|
2202
|
+
value: TICKET_OWNER_MYSELF
|
|
2203
|
+
}, {
|
|
2204
|
+
label: "Someone Else",
|
|
2205
|
+
value: TICKET_OWNER_SOMEONE
|
|
2206
|
+
}, {
|
|
2207
|
+
label: "Leave Unassigned",
|
|
2208
|
+
value: TICKET_OWNER_UNASSIGNED
|
|
2209
|
+
}];
|
|
2181
2210
|
const [personalInfo, setPersonalInfo] = (0,external_react_.useState)({
|
|
2182
2211
|
firstName: initialFirstName,
|
|
2183
2212
|
lastName: initialLastName,
|
|
@@ -2186,12 +2215,19 @@ const PersonalInfoComponent = ({
|
|
|
2186
2215
|
id: null,
|
|
2187
2216
|
name: ''
|
|
2188
2217
|
},
|
|
2189
|
-
promoCode: ''
|
|
2218
|
+
promoCode: '',
|
|
2219
|
+
attendee: {
|
|
2220
|
+
firstName: '',
|
|
2221
|
+
lastName: '',
|
|
2222
|
+
email: ''
|
|
2223
|
+
}
|
|
2190
2224
|
});
|
|
2191
2225
|
const [companyError, setCompanyError] = (0,external_react_.useState)(false);
|
|
2192
2226
|
const {
|
|
2193
2227
|
register,
|
|
2228
|
+
reset,
|
|
2194
2229
|
handleSubmit,
|
|
2230
|
+
getValues,
|
|
2195
2231
|
formState: {
|
|
2196
2232
|
errors
|
|
2197
2233
|
}
|
|
@@ -2225,10 +2261,49 @@ const PersonalInfoComponent = ({
|
|
|
2225
2261
|
return;
|
|
2226
2262
|
}
|
|
2227
2263
|
|
|
2264
|
+
if (shouldDisplayTicketAssignment()) {
|
|
2265
|
+
if (!ticketOwnerOption) {
|
|
2266
|
+
setTicketOwnerError(true);
|
|
2267
|
+
return;
|
|
2268
|
+
} // if the ticket is for someone else, set the attende with the data from form
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
const attendeeData = ticketOwnerOption === TICKET_OWNER_SOMEONE ? data.attendee : personalInfo.attendee;
|
|
2272
|
+
data = personal_information_objectSpread(personal_information_objectSpread({}, data), {}, {
|
|
2273
|
+
attendee: attendeeData
|
|
2274
|
+
});
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2228
2277
|
setPersonalInfo(personal_information_objectSpread(personal_information_objectSpread({}, personalInfo), data));
|
|
2229
2278
|
changeForm(personal_information_objectSpread(personal_information_objectSpread({}, personalInfo), data));
|
|
2230
2279
|
};
|
|
2231
2280
|
|
|
2281
|
+
const handleRadioButtonChange = ev => {
|
|
2282
|
+
const {
|
|
2283
|
+
value
|
|
2284
|
+
} = ev.target;
|
|
2285
|
+
setTicketOwnerOption(value);
|
|
2286
|
+
setTicketOwnerError(false);
|
|
2287
|
+
setPersonalInfo(personal_information_objectSpread(personal_information_objectSpread({}, personalInfo), {}, {
|
|
2288
|
+
attendee: value === TICKET_OWNER_UNASSIGNED ? null : value === TICKET_OWNER_MYSELF ? {
|
|
2289
|
+
firstName: personalInfo.firstName,
|
|
2290
|
+
lastName: personalInfo.lastName,
|
|
2291
|
+
email: personalInfo.email
|
|
2292
|
+
} : {
|
|
2293
|
+
firstName: '',
|
|
2294
|
+
lastName: '',
|
|
2295
|
+
email: ''
|
|
2296
|
+
}
|
|
2297
|
+
}));
|
|
2298
|
+
reset({
|
|
2299
|
+
attendee: {
|
|
2300
|
+
email: '',
|
|
2301
|
+
firstName: '',
|
|
2302
|
+
lastName: ''
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
};
|
|
2306
|
+
|
|
2232
2307
|
const [ref, {
|
|
2233
2308
|
height
|
|
2234
2309
|
}] = (0,external_react_use_namespaceObject.useMeasure)();
|
|
@@ -2268,7 +2343,7 @@ const PersonalInfoComponent = ({
|
|
|
2268
2343
|
className: `${personal_information_index_module.innerWrapper}`
|
|
2269
2344
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2270
2345
|
className: personal_information_index_module.title
|
|
2271
|
-
}, /*#__PURE__*/external_react_default().createElement("span", null, "
|
|
2346
|
+
}, /*#__PURE__*/external_react_default().createElement("span", null, "Purchaser Information"), !isActive && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2272
2347
|
"data-testid": "personal-info"
|
|
2273
2348
|
}, /*#__PURE__*/external_react_default().createElement("span", null, `${personalInfo.firstName} ${personalInfo.lastName}${personalInfo.company.name ? ` - ${personalInfo.company.name}` : ''}`), /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("span", null, personalInfo.email))), /*#__PURE__*/external_react_default().createElement(external_react_spring_namespaceObject.animated.div, {
|
|
2274
2349
|
style: personal_information_objectSpread({
|
|
@@ -2291,8 +2366,8 @@ const PersonalInfoComponent = ({
|
|
|
2291
2366
|
type: "text",
|
|
2292
2367
|
placeholder: "First name *",
|
|
2293
2368
|
defaultValue: personalInfo.firstName || '',
|
|
2294
|
-
readOnly:
|
|
2295
|
-
className:
|
|
2369
|
+
readOnly: initialFirstName !== '',
|
|
2370
|
+
className: initialFirstName !== '' ? personal_information_index_module.readOnly : ''
|
|
2296
2371
|
}, register("firstName", {
|
|
2297
2372
|
required: true,
|
|
2298
2373
|
maxLength: 80
|
|
@@ -2367,7 +2442,64 @@ const PersonalInfoComponent = ({
|
|
|
2367
2442
|
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2368
2443
|
type: "text",
|
|
2369
2444
|
placeholder: "Promo code"
|
|
2370
|
-
}, register("promoCode")))))
|
|
2445
|
+
}, register("promoCode"))))), shouldDisplayTicketAssignment() && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2446
|
+
className: personal_information_index_module.fieldWrapperRadio
|
|
2447
|
+
}, /*#__PURE__*/external_react_default().createElement("label", null, "Ticket is for:"), /*#__PURE__*/external_react_default().createElement(components_namespaceObject.RadioList, {
|
|
2448
|
+
id: `ticket-self-radio`,
|
|
2449
|
+
value: ticketOwnerOption,
|
|
2450
|
+
options: radioListOptions,
|
|
2451
|
+
onChange: handleRadioButtonChange,
|
|
2452
|
+
inline: true,
|
|
2453
|
+
html: true
|
|
2454
|
+
}), ticketOwnerError && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("br", null), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2455
|
+
className: personal_information_index_module.fieldError,
|
|
2456
|
+
"data-testid": "company-error"
|
|
2457
|
+
}, "This field is required."))), ticketOwnerOption === TICKET_OWNER_SOMEONE && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2458
|
+
className: personal_information_index_module.fieldWrapper
|
|
2459
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2460
|
+
className: personal_information_index_module.inputWrapper
|
|
2461
|
+
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2462
|
+
type: "text",
|
|
2463
|
+
placeholder: "Email *",
|
|
2464
|
+
defaultValue: personalInfo?.attendee?.email ?? ''
|
|
2465
|
+
}, register("attendee.email", {
|
|
2466
|
+
required: true,
|
|
2467
|
+
pattern: EMAIL_REGEXP
|
|
2468
|
+
}), {
|
|
2469
|
+
"data-testid": "attendee-email"
|
|
2470
|
+
}))), errors.attendee?.email?.type === 'emailRequired' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2471
|
+
className: personal_information_index_module.fieldError,
|
|
2472
|
+
"data-testid": "attendee-email-error-required"
|
|
2473
|
+
}, "This field is required."), errors.attendee?.email?.type === 'pattern' && /*#__PURE__*/external_react_default().createElement("div", {
|
|
2474
|
+
className: personal_information_index_module.fieldError,
|
|
2475
|
+
"data-testid": "attendee-email-error-invalid"
|
|
2476
|
+
}, "The email is invalid.")), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2477
|
+
className: personal_information_index_module.fieldWrapper
|
|
2478
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2479
|
+
className: personal_information_index_module.inputWrapper
|
|
2480
|
+
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2481
|
+
type: "text",
|
|
2482
|
+
placeholder: "First name *",
|
|
2483
|
+
defaultValue: personalInfo?.attendee?.firstName ?? ''
|
|
2484
|
+
}, register("attendee.firstName", {
|
|
2485
|
+
required: false,
|
|
2486
|
+
maxLength: 80
|
|
2487
|
+
}), {
|
|
2488
|
+
"data-testid": "attendee-first-name"
|
|
2489
|
+
})))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2490
|
+
className: personal_information_index_module.fieldWrapper
|
|
2491
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2492
|
+
className: personal_information_index_module.inputWrapper
|
|
2493
|
+
}, /*#__PURE__*/external_react_default().createElement("input", personal_information_extends({
|
|
2494
|
+
type: "text",
|
|
2495
|
+
placeholder: "Last name *",
|
|
2496
|
+
defaultValue: personalInfo?.attendee?.lastName ?? ''
|
|
2497
|
+
}, register("attendee.lastName", {
|
|
2498
|
+
required: false,
|
|
2499
|
+
maxLength: 100
|
|
2500
|
+
}), {
|
|
2501
|
+
"data-testid": "attendee-last-name"
|
|
2502
|
+
}))))))), allowPromoCodes && showMultipleTicketTexts && /*#__PURE__*/external_react_default().createElement("a", {
|
|
2371
2503
|
className: personal_information_index_module.moreInfo,
|
|
2372
2504
|
"data-tip": true,
|
|
2373
2505
|
"data-for": "promo-code-info"
|
|
@@ -2843,29 +2975,41 @@ const PurchaseComplete = _ref2 => {
|
|
|
2843
2975
|
(0,external_react_.useEffect)(() => {
|
|
2844
2976
|
onPurchaseComplete(checkout);
|
|
2845
2977
|
}, []);
|
|
2978
|
+
const [requireExtraQuestions, setRequireExtraQuestions] = (0,external_react_.useState)(null);
|
|
2979
|
+
const isMultiOrder = (0,external_react_.useMemo)(() => checkout?.tickets.length > 1, [checkout]);
|
|
2846
2980
|
const isActive = (0,external_react_.useMemo)(() => summit.start_date <= nowUtc && summit.end_date >= nowUtc, [summit, nowUtc]);
|
|
2847
|
-
const
|
|
2848
|
-
|
|
2981
|
+
const currentTicket = (0,external_react_.useMemo)(() => isMultiOrder ? checkout?.tickets.find(t => t?.owner?.email === user?.email) : checkout?.tickets.find(t => t?.owner), [user]);
|
|
2982
|
+
(0,external_react_.useEffect)(() => {
|
|
2983
|
+
completedExtraQuestions(currentTicket?.owner || null).then(res => {
|
|
2984
|
+
setRequireExtraQuestions(res);
|
|
2985
|
+
});
|
|
2986
|
+
}, [currentTicket]);
|
|
2987
|
+
|
|
2988
|
+
const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentTicket && ticketHasAccessLevel(currentTicket, VirtualAccessLevel); // attendeeId is only passed to event-site only if the ticket is for someone else. If not pass it as null to use the default flow
|
|
2849
2989
|
|
|
2850
|
-
const _hasVirtualAccessLevel = hasVirtualAccessLevel || currentUserTicket && ticketHasAccessLevel(currentUserTicket, VirtualAccessLevel);
|
|
2851
2990
|
|
|
2991
|
+
const attendeeTicket = checkout?.tickets.find(t => t?.owner?.email !== user?.email);
|
|
2992
|
+
const attendeeId = checkout?.tickets.length === 1 ? attendeeTicket?.owner?.id : null;
|
|
2852
2993
|
const startDateFormatted = {
|
|
2853
2994
|
date: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('MMMM D'),
|
|
2854
2995
|
time: (0,methods_namespaceObject.epochToMomentTimeZone)(summit.start_date, summit.time_zone_id).format('hh:mm A')
|
|
2855
2996
|
};
|
|
2856
2997
|
if (!checkout) return null;
|
|
2857
|
-
|
|
2858
|
-
let
|
|
2998
|
+
if (requireExtraQuestions == null) return null;
|
|
2999
|
+
let orderCompleteButtonText = currentTicket && requireExtraQuestions ? rest.hasOwnProperty('initialOrderCompleteButton') && !isEmptyString(rest.initialOrderCompleteButton) && typeof rest.initialOrderCompleteButton !== 'undefined' ? rest.initialOrderCompleteButton : external_i18n_react_default().translate('purchase_complete_step.initial_order_complete_button') : rest.hasOwnProperty('orderCompleteButton') && !isEmptyString(rest.orderCompleteButton) ? rest.orderCompleteButton : external_i18n_react_default().translate('purchase_complete_step.order_complete_button');
|
|
3000
|
+
let orderComplete1stParagraph = currentTicket ? rest.hasOwnProperty('initialOrderComplete1stParagraph') && typeof rest.initialOrderComplete1stParagraph !== 'undefined' ? rest.initialOrderComplete1stParagraph : external_i18n_react_default().translate('purchase_complete_step.initial_order_complete_1st_paragraph_label', {
|
|
3001
|
+
attendee: `${attendeeTicket ? ` ${attendeeTicket.owner.email}` : 'you'}`,
|
|
3002
|
+
adv: `${attendeeTicket ? `${attendeeTicket.owner.email}` : 'your'}`,
|
|
2859
3003
|
button: orderCompleteButtonText
|
|
2860
3004
|
}) : rest.hasOwnProperty('orderComplete1stParagraph') && typeof rest.orderComplete1stParagraph !== 'undefined' ? rest.orderComplete1stParagraph : external_i18n_react_default().translate('purchase_complete_step.order_complete_1st_paragraph_label');
|
|
2861
|
-
let orderComplete2ndParagraph =
|
|
3005
|
+
let orderComplete2ndParagraph = currentTicket ? rest.hasOwnProperty('initialOrderComplete2ndParagraph') && typeof rest.initialOrderComplete2ndParagraph !== 'undefined' ? rest.initialOrderComplete2ndParagraph : external_i18n_react_default().translate('purchase_complete_step.initial_order_footer_label') : rest.hasOwnProperty('orderComplete2ndParagraph') && typeof rest.orderComplete2ndParagraph !== 'undefined' ? rest.orderComplete2ndParagraph : '';
|
|
2862
3006
|
let footerHasTicketText = `${orderComplete2ndParagraph} ${external_i18n_react_default().translate('purchase_complete_step.footer_assistance_text', {
|
|
2863
3007
|
supportEmail: `${supportEmail}`
|
|
2864
3008
|
})}`;
|
|
2865
3009
|
|
|
2866
3010
|
const getCTAButton = () => {
|
|
2867
3011
|
return /*#__PURE__*/external_react_default().createElement(CTAButton, {
|
|
2868
|
-
cta:
|
|
3012
|
+
cta: currentTicket && requireExtraQuestions ? () => goToExtraQuestions(attendeeId) : goToMyOrders,
|
|
2869
3013
|
clear: clearWidgetState,
|
|
2870
3014
|
close: closeWidget
|
|
2871
3015
|
}, orderCompleteButtonText);
|
|
@@ -2879,7 +3023,7 @@ const PurchaseComplete = _ref2 => {
|
|
|
2879
3023
|
className: "fa fa-ticket"
|
|
2880
3024
|
})), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2881
3025
|
className: purchase_complete_index_module.complete
|
|
2882
|
-
}, external_i18n_react_default().translate('purchase_complete_step.title')), isActive ?
|
|
3026
|
+
}, external_i18n_react_default().translate('purchase_complete_step.title')), isActive ? currentTicket && requireExtraQuestions ? /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("span", null, orderComplete1stParagraph), getCTAButton()) : _hasVirtualAccessLevel ? /*#__PURE__*/external_react_default().createElement(CTAButton, {
|
|
2883
3027
|
cta: goToEvent,
|
|
2884
3028
|
clear: clearWidgetState,
|
|
2885
3029
|
close: closeWidget
|
|
@@ -3474,7 +3618,9 @@ RegistrationLite.propTypes = {
|
|
|
3474
3618
|
|
|
3475
3619
|
|
|
3476
3620
|
|
|
3621
|
+
// Access token is required to fetch registration company input. For standalone widget use
|
|
3477
3622
|
|
|
3623
|
+
if (false) {}
|
|
3478
3624
|
|
|
3479
3625
|
class RegistrationLiteWidget extends (external_react_default()).PureComponent {
|
|
3480
3626
|
constructor(props) {
|