summit-registration-lite 6.0.4-beta.1 → 6.0.5

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 CHANGED
@@ -1981,6 +1981,12 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
1981
1981
  }
1982
1982
 
1983
1983
  case DELETE_RESERVATION_SUCCESS:
1984
+ {
1985
+ return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
1986
+ reservation: null
1987
+ });
1988
+ }
1989
+
1984
1990
  case CLEAR_RESERVATION:
1985
1991
  {
1986
1992
  return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
@@ -2566,20 +2572,22 @@ const StripeForm = ({
2566
2572
  let createPaymentMethodOptions = {
2567
2573
  elements
2568
2574
  };
2575
+ let address = {}; // stripe payment payload requires data that's not an empty string
2576
+
2577
+ if (userProfile.locality) address.city = userProfile.locality;
2578
+ if (userProfile.country) address.country = userProfile.country;
2579
+ if (userProfile.address1) address.line1 = userProfile.address1;
2580
+ if (userProfile.address2) address.line2 = userProfile.address2;
2581
+ if (!hidePostalCode && userProfile.postal_code) address.postal_code = userProfile.postal_code;
2582
+ if (userProfile.region) address.state = userProfile.region;
2569
2583
  createPaymentMethodOptions = stripe_form_objectSpread(stripe_form_objectSpread({}, createPaymentMethodOptions), {}, {
2570
2584
  params: {
2571
- billing_details: {
2572
- address: {
2573
- city: userProfile.locality || "",
2574
- country: userProfile.country || "",
2575
- line1: userProfile.address1 || "",
2576
- line2: userProfile.address2 || "",
2577
- postal_code: hidePostalCode ? "" : userProfile.postal_code || "",
2578
- state: userProfile.region || ""
2579
- },
2585
+ billing_details: stripe_form_objectSpread(stripe_form_objectSpread({}, Object.keys(address).length > 0 && {
2586
+ address
2587
+ }), {}, {
2580
2588
  email: userProfile.email,
2581
2589
  name: `${reservation.owner_first_name} ${reservation.owner_last_name}`
2582
- }
2590
+ })
2583
2591
  }
2584
2592
  });
2585
2593
  const {
@@ -2860,6 +2868,9 @@ const PaymentComponent = ({
2860
2868
  };
2861
2869
 
2862
2870
  /* harmony default export */ const payment = (PaymentComponent);
2871
+ ;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/inputs/company-input-v2"
2872
+ const company_input_v2_namespaceObject = require("openstack-uicore-foundation/lib/components/inputs/company-input-v2");
2873
+ var company_input_v2_default = /*#__PURE__*/__webpack_require__.n(company_input_v2_namespaceObject);
2863
2874
  // EXTERNAL MODULE: ./src/helpers/index.js + 1 modules
2864
2875
  var helpers = __webpack_require__(499);
2865
2876
  ;// CONCATENATED MODULE: ./src/components/personal-information/index.module.scss
@@ -2896,6 +2907,7 @@ function personal_information_defineProperty(obj, key, value) { if (key in obj)
2896
2907
 
2897
2908
 
2898
2909
 
2910
+
2899
2911
  const PersonalInfoComponent = ({
2900
2912
  isActive,
2901
2913
  changeForm,
@@ -3041,21 +3053,34 @@ const PersonalInfoComponent = ({
3041
3053
  }
3042
3054
  });
3043
3055
  const customStyles = {
3044
- control: provided => personal_information_objectSpread(personal_information_objectSpread({}, provided), {}, {
3045
- minHeight: '36px',
3046
- height: '36px'
3047
- }),
3048
- menuList: provided => personal_information_objectSpread(personal_information_objectSpread({}, provided), {}, {
3049
- maxHeight: '120px'
3050
- }),
3051
- placeholder: provided => personal_information_objectSpread(personal_information_objectSpread({}, provided), {}, {
3052
- fontSize: '12px',
3053
- textOverflow: 'ellipsis',
3054
- whiteSpace: 'nowrap',
3055
- overflow: 'hidden',
3056
- width: '95%',
3057
- paddingRight: '10px'
3058
- })
3056
+ height: 36,
3057
+ "& .MuiFormControl-root": {
3058
+ marginTop: 0,
3059
+ marginBottom: 0
3060
+ },
3061
+ "& .MuiOutlinedInput-root": {
3062
+ height: 36,
3063
+ boxSizing: "border-box"
3064
+ },
3065
+ "& .MuiOutlinedInput-input": {
3066
+ height: "100%",
3067
+ lineHeight: 36,
3068
+ boxSizing: "border-box",
3069
+ fontSize: 16
3070
+ },
3071
+ "& .MuiOutlinedInput-input::placeholder": {
3072
+ fontSize: 14
3073
+ },
3074
+ "& .MuiAutocomplete-option": {
3075
+ fontSize: 16
3076
+ },
3077
+ "& .MuiAutocomplete-listbox": {
3078
+ maxHeight: 120
3079
+ },
3080
+ "& .MuiInputLabel-root:not(.MuiInputLabel-shrink)": {
3081
+ transform: "translate(12px, 10px)",
3082
+ fontSize: 14
3083
+ }
3059
3084
  };
3060
3085
  return /*#__PURE__*/external_react_default().createElement("div", {
3061
3086
  className: `${personal_information_index_module.outerWrapper} step-wrapper`
@@ -3137,21 +3162,26 @@ const PersonalInfoComponent = ({
3137
3162
  "data-testid": "email-error-invalid"
3138
3163
  }, "The email is invalid.")), showCompanyInput && /*#__PURE__*/external_react_default().createElement("div", {
3139
3164
  className: personal_information_index_module.fieldWrapper
3140
- }, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(components_namespaceObject.RegistrationCompanyInput, {
3165
+ }, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement((company_input_v2_default()), {
3141
3166
  id: "reg-comp-input",
3142
3167
  name: "reg-comp-input",
3143
3168
  "data-testid": "company",
3144
- styles: customStyles,
3169
+ sx: customStyles,
3145
3170
  summitId: summitId,
3146
3171
  onChange: onCompanyChange,
3147
3172
  onError: handleCompanyError,
3148
3173
  value: personalInfo.company,
3149
3174
  placeholder: companyDDLPlaceholder,
3150
- isClearable: true,
3151
- defaultOptions: showCompanyInputDefaultOptions,
3152
- openMenuOnFocus: showCompanyInputDefaultOptions,
3153
- openMenuOnClick: showCompanyInputDefaultOptions,
3154
- options2Show: companyDDLOptions2Show
3175
+ options2Show: companyDDLOptions2Show,
3176
+ disableShrink: true,
3177
+ label: null,
3178
+ ListboxProps: {
3179
+ sx: {
3180
+ '& li.MuiAutocomplete-option': {
3181
+ fontSize: '16px'
3182
+ }
3183
+ }
3184
+ }
3155
3185
  }), companyError && /*#__PURE__*/external_react_default().createElement("div", {
3156
3186
  className: personal_information_index_module.fieldError,
3157
3187
  "data-testid": "company-error"
@@ -4198,7 +4228,10 @@ const RegistrationLite = _ref => {
4198
4228
  }, []);
4199
4229
  (0,external_react_.useEffect)(() => {
4200
4230
  if (summitData && profileData) {
4201
- getMyInvitation(summitData.id).catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitData.id));
4231
+ const ensureInvitation = () => summitData.invite_only_registration ? getMyInvitation(summitData.id) : Promise.resolve(); // no-op when not invite-only
4232
+
4233
+
4234
+ ensureInvitation().catch(e => console.log(e)).finally(() => handleGetTicketTypesAndTaxes(summitData.id));
4202
4235
  }
4203
4236
  }, [summitData, profileData]);
4204
4237
  (0,external_react_.useEffect)(() => {
@@ -4492,7 +4525,7 @@ RegistrationLite.defaultProps = {
4492
4525
  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>',
4493
4526
  ticketTaxesErrorMessage: '<span>There was an error getting the information for the tickets. Please try it again.</span>',
4494
4527
  allowPromoCodes: true,
4495
- companyDDLPlaceholder: 'Type to select company',
4528
+ companyDDLPlaceholder: 'Company',
4496
4529
  authErrorCallback: error => {
4497
4530
  console.log(error);
4498
4531
  },