summit-registration-lite 6.0.5-beta.1 → 6.0.6
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 +68 -40
- package/dist/index.js.map +1 -1
- package/package.json +12 -6
package/dist/index.js
CHANGED
|
@@ -1549,7 +1549,9 @@ const reserveTicket = ({
|
|
|
1549
1549
|
|
|
1550
1550
|
let params = {
|
|
1551
1551
|
access_token,
|
|
1552
|
-
|
|
1552
|
+
fields: "owner_first_name,owner_last_name,owner_email,owner_company,summit_id,id,currency,amount_in_cents,amount,raw_amount_in_cents,discount_amount,discount_amount_in_cents,hash,payment_gateway_client_token,status,payment_method,promo_code,taxes_amount,applied_taxes.id,applied_taxes.name,applied_taxes.amount,tickets.id,tickets.ticket_type_id",
|
|
1553
|
+
relations: "tickets,tickets.none,applied_taxes",
|
|
1554
|
+
expand: 'tickets,applied_taxes'
|
|
1553
1555
|
};
|
|
1554
1556
|
const normalizedEntity = normalizeReservation({
|
|
1555
1557
|
owner_email: email,
|
|
@@ -2868,6 +2870,9 @@ const PaymentComponent = ({
|
|
|
2868
2870
|
};
|
|
2869
2871
|
|
|
2870
2872
|
/* harmony default export */ const payment = (PaymentComponent);
|
|
2873
|
+
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/inputs/company-input-v2"
|
|
2874
|
+
const company_input_v2_namespaceObject = require("openstack-uicore-foundation/lib/components/inputs/company-input-v2");
|
|
2875
|
+
var company_input_v2_default = /*#__PURE__*/__webpack_require__.n(company_input_v2_namespaceObject);
|
|
2871
2876
|
// EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
|
|
2872
2877
|
var helpers = __webpack_require__(499);
|
|
2873
2878
|
;// CONCATENATED MODULE: ./src/components/personal-information/index.module.scss
|
|
@@ -2904,6 +2909,7 @@ function personal_information_defineProperty(obj, key, value) { if (key in obj)
|
|
|
2904
2909
|
|
|
2905
2910
|
|
|
2906
2911
|
|
|
2912
|
+
|
|
2907
2913
|
const PersonalInfoComponent = ({
|
|
2908
2914
|
isActive,
|
|
2909
2915
|
changeForm,
|
|
@@ -3049,21 +3055,34 @@ const PersonalInfoComponent = ({
|
|
|
3049
3055
|
}
|
|
3050
3056
|
});
|
|
3051
3057
|
const customStyles = {
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
}
|
|
3058
|
+
height: 36,
|
|
3059
|
+
"& .MuiFormControl-root": {
|
|
3060
|
+
marginTop: 0,
|
|
3061
|
+
marginBottom: 0
|
|
3062
|
+
},
|
|
3063
|
+
"& .MuiOutlinedInput-root": {
|
|
3064
|
+
height: 36,
|
|
3065
|
+
boxSizing: "border-box"
|
|
3066
|
+
},
|
|
3067
|
+
"& .MuiOutlinedInput-input": {
|
|
3068
|
+
height: "100%",
|
|
3069
|
+
lineHeight: 36,
|
|
3070
|
+
boxSizing: "border-box",
|
|
3071
|
+
fontSize: 16
|
|
3072
|
+
},
|
|
3073
|
+
"& .MuiOutlinedInput-input::placeholder": {
|
|
3074
|
+
fontSize: 14
|
|
3075
|
+
},
|
|
3076
|
+
"& .MuiAutocomplete-option": {
|
|
3077
|
+
fontSize: 16
|
|
3078
|
+
},
|
|
3079
|
+
"& .MuiAutocomplete-listbox": {
|
|
3080
|
+
maxHeight: 120
|
|
3081
|
+
},
|
|
3082
|
+
"& .MuiInputLabel-root:not(.MuiInputLabel-shrink)": {
|
|
3083
|
+
transform: "translate(12px, 10px)",
|
|
3084
|
+
fontSize: 14
|
|
3085
|
+
}
|
|
3067
3086
|
};
|
|
3068
3087
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
3069
3088
|
className: `${personal_information_index_module.outerWrapper} step-wrapper`
|
|
@@ -3145,21 +3164,26 @@ const PersonalInfoComponent = ({
|
|
|
3145
3164
|
"data-testid": "email-error-invalid"
|
|
3146
3165
|
}, "The email is invalid.")), showCompanyInput && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3147
3166
|
className: personal_information_index_module.fieldWrapper
|
|
3148
|
-
}, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(
|
|
3167
|
+
}, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement((company_input_v2_default()), {
|
|
3149
3168
|
id: "reg-comp-input",
|
|
3150
3169
|
name: "reg-comp-input",
|
|
3151
3170
|
"data-testid": "company",
|
|
3152
|
-
|
|
3171
|
+
sx: customStyles,
|
|
3153
3172
|
summitId: summitId,
|
|
3154
3173
|
onChange: onCompanyChange,
|
|
3155
3174
|
onError: handleCompanyError,
|
|
3156
3175
|
value: personalInfo.company,
|
|
3157
3176
|
placeholder: companyDDLPlaceholder,
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3177
|
+
options2Show: companyDDLOptions2Show,
|
|
3178
|
+
disableShrink: true,
|
|
3179
|
+
label: null,
|
|
3180
|
+
ListboxProps: {
|
|
3181
|
+
sx: {
|
|
3182
|
+
'& li.MuiAutocomplete-option': {
|
|
3183
|
+
fontSize: '16px'
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3163
3187
|
}), companyError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
3164
3188
|
className: personal_information_index_module.fieldError,
|
|
3165
3189
|
"data-testid": "company-error"
|
|
@@ -4168,8 +4192,8 @@ const RegistrationLite = _ref => {
|
|
|
4168
4192
|
},
|
|
4169
4193
|
errors: []
|
|
4170
4194
|
});
|
|
4171
|
-
const [
|
|
4172
|
-
const [
|
|
4195
|
+
const [ticketDataError, setTicketDataError] = (0,external_react_.useState)(false);
|
|
4196
|
+
const [ticketDataLoaded, setTicketDataLoaded] = (0,external_react_.useState)(false);
|
|
4173
4197
|
const {
|
|
4174
4198
|
values: formValues,
|
|
4175
4199
|
errors: formErrors
|
|
@@ -4187,9 +4211,9 @@ const RegistrationLite = _ref => {
|
|
|
4187
4211
|
publicKey,
|
|
4188
4212
|
provider
|
|
4189
4213
|
} = (0,utils/* getCurrentProvider */.U5)(summitData);
|
|
4190
|
-
const allowedTicketTypes =
|
|
4191
|
-
const noAvailableTickets = (0,external_react_.useMemo)(() => profileData &&
|
|
4192
|
-
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => profileData &&
|
|
4214
|
+
const allowedTicketTypes = ticketDataLoaded ? ticketTypes.filter(tt => tt.sub_type === constants.TICKET_TYPE_SUBTYPE_PREPAID || tt.sales_start_date === null && tt.sales_end_date === null || nowUtc >= tt.sales_start_date && nowUtc <= tt.sales_end_date) : [];
|
|
4215
|
+
const noAvailableTickets = (0,external_react_.useMemo)(() => profileData && ticketDataLoaded && !ticketDataError && allowedTicketTypes.length === 0 && step !== constants.STEP_COMPLETE, [allowedTicketTypes]);
|
|
4216
|
+
const alreadyOwnedTickets = (0,external_react_.useMemo)(() => profileData && ticketDataLoaded && !ticketDataError && allowedTicketTypes.length > 0 && ownedTickets.length > 0, [ownedTickets, allowedTicketTypes]);
|
|
4193
4217
|
(0,external_react_.useEffect)(() => {
|
|
4194
4218
|
if (profileData) loadProfileData(profileData);
|
|
4195
4219
|
}, [profileData]); // just initial load ( once )
|
|
@@ -4206,7 +4230,10 @@ const RegistrationLite = _ref => {
|
|
|
4206
4230
|
}, []);
|
|
4207
4231
|
(0,external_react_.useEffect)(() => {
|
|
4208
4232
|
if (summitData && profileData) {
|
|
4209
|
-
|
|
4233
|
+
const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(summitData.id) : Promise.resolve(); // no-op when not invite-only
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitData.id));
|
|
4210
4237
|
}
|
|
4211
4238
|
}, [summitData, profileData]);
|
|
4212
4239
|
(0,external_react_.useEffect)(() => {
|
|
@@ -4254,8 +4281,8 @@ const RegistrationLite = _ref => {
|
|
|
4254
4281
|
};
|
|
4255
4282
|
|
|
4256
4283
|
const handleGetTicketTypesAndTaxes = summitId => {
|
|
4257
|
-
|
|
4258
|
-
|
|
4284
|
+
setTicketDataError(false);
|
|
4285
|
+
setTicketDataLoaded(false);
|
|
4259
4286
|
getTicketTypesAndTaxes(summitId).then().catch(error => {
|
|
4260
4287
|
let {
|
|
4261
4288
|
message
|
|
@@ -4267,9 +4294,9 @@ const RegistrationLite = _ref => {
|
|
|
4267
4294
|
return authErrorCallback(error);
|
|
4268
4295
|
}
|
|
4269
4296
|
|
|
4270
|
-
|
|
4297
|
+
setTicketDataError(true);
|
|
4271
4298
|
}).finally(() => {
|
|
4272
|
-
|
|
4299
|
+
setTicketDataLoaded(true);
|
|
4273
4300
|
});
|
|
4274
4301
|
};
|
|
4275
4302
|
|
|
@@ -4301,11 +4328,12 @@ const RegistrationLite = _ref => {
|
|
|
4301
4328
|
trackEvent(constants.PURCHASE_COMPLETE, {
|
|
4302
4329
|
order
|
|
4303
4330
|
});
|
|
4304
|
-
}; //
|
|
4305
|
-
//
|
|
4331
|
+
}; // If user is logged in but ticket data hasn't loaded yet (and no error occurred),
|
|
4332
|
+
// don't render to avoid flash. Uses local state instead of Redux to prevent
|
|
4333
|
+
// race conditions with redux-persist rehydration.
|
|
4306
4334
|
|
|
4307
4335
|
|
|
4308
|
-
if (
|
|
4336
|
+
if (profileData && !ticketDataLoaded && !ticketDataError) return null;
|
|
4309
4337
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
4310
4338
|
id: `${general_module.modal}`,
|
|
4311
4339
|
className: "modal is-active"
|
|
@@ -4331,12 +4359,12 @@ const RegistrationLite = _ref => {
|
|
|
4331
4359
|
className: "fa fa-close",
|
|
4332
4360
|
"aria-label": "close",
|
|
4333
4361
|
onClick: handleCloseClick
|
|
4334
|
-
})), profileData &&
|
|
4362
|
+
})), profileData && ticketDataError && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
|
|
4335
4363
|
ticketTaxesErrorMessage: ticketTaxesErrorMessage,
|
|
4336
4364
|
retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData?.id)
|
|
4337
4365
|
}), noAvailableTickets && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
|
|
4338
4366
|
noAllowedTicketsMessage: noAllowedTicketsMessage
|
|
4339
|
-
}), !
|
|
4367
|
+
}), !ticketDataError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
4340
4368
|
className: general_module.stepsWrapper
|
|
4341
4369
|
}, !profileData && !passwordlessCodeSent && /*#__PURE__*/external_react_default().createElement(login["default"], {
|
|
4342
4370
|
summitData: summitData,
|
|
@@ -4459,7 +4487,7 @@ const RegistrationLite = _ref => {
|
|
|
4459
4487
|
orderComplete1stParagraph: rest.orderComplete1stParagraph,
|
|
4460
4488
|
orderComplete2ndParagraph: rest.orderComplete2ndParagraph,
|
|
4461
4489
|
orderCompleteButton: rest.orderCompleteButton
|
|
4462
|
-
})), !
|
|
4490
|
+
})), !ticketDataError && profileData && step !== constants.STEP_COMPLETE && /*#__PURE__*/external_react_default().createElement(button_bar, {
|
|
4463
4491
|
step: step,
|
|
4464
4492
|
inPersonDisclaimer: inPersonDisclaimer,
|
|
4465
4493
|
formValues: formValues,
|
|
@@ -4500,7 +4528,7 @@ RegistrationLite.defaultProps = {
|
|
|
4500
4528
|
noAllowedTicketsMessage: '<span>You already have purchased all available tickets for this event and/or there are no tickets available for you to purchase.</span><br/><span><a href="/a/my-tickets">Visit the my orders / my tickets page</a> to review your existing tickets.</span>',
|
|
4501
4529
|
ticketTaxesErrorMessage: '<span>There was an error getting the information for the tickets. Please try it again.</span>',
|
|
4502
4530
|
allowPromoCodes: true,
|
|
4503
|
-
companyDDLPlaceholder: '
|
|
4531
|
+
companyDDLPlaceholder: 'Company',
|
|
4504
4532
|
authErrorCallback: error => {
|
|
4505
4533
|
console.log(error);
|
|
4506
4534
|
},
|