summit-registration-lite 3.0.14 → 3.0.17

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.
Files changed (3) hide show
  1. package/README.md +10 -9
  2. package/dist/index.js +190 -115
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -5,11 +5,11 @@ React component for the summit registration lite widget
5
5
  ## Registration Lite config
6
6
 
7
7
  **apiBaseUrl** = base url for API
8
-
8
+
9
9
  **summitData** = object with the data from the summit
10
-
10
+
11
11
  **profileData** = object with the profile data from the user
12
-
12
+
13
13
  **marketingData** = object with the settings from the marketing API
14
14
 
15
15
  **supportEmail** = string with the email address for support
@@ -30,7 +30,7 @@ React component for the summit registration lite widget
30
30
 
31
31
 
32
32
  Example
33
-
33
+
34
34
  ```
35
35
  [
36
36
  { button_color: '#082238', provider_label: 'FNid', provider_param: 'fnid' },
@@ -39,15 +39,15 @@ React component for the summit registration lite widget
39
39
  ```
40
40
 
41
41
  **authUser** = method passed that will be called on user login. param -> (provider) => console.log('login with', provider)
42
-
42
+
43
43
  **getAccessToken** = method passed that will be called to request the access token
44
-
44
+
45
45
  **closeWidget** = method passed that will be called if the user tries to close the widget
46
-
46
+
47
47
  **goToExtraQuestions** = method passed that will be called by component to redirect to extra questions page
48
48
 
49
49
  **goToEvent** = method passed that will be called to redirect the user to the current event
50
-
50
+
51
51
  **getPasswordlessCode** = method passed that will be called when the user generates a code to login without password
52
52
 
53
53
  **loginWithCode** = method passed that will be called when the user tries to login with a code
@@ -55,7 +55,8 @@ React component for the summit registration lite widget
55
55
  **onPurchaseComplete** = method passed that will be called after the purchase of a ticket it's completed
56
56
 
57
57
  **handleCompanyError** = method passed that will be called if the company dropdown can't be fetched
58
-
58
+
59
+ **authErrorCallback** = method passed that will handle on client any auth error
59
60
 
60
61
  ## PUBLISH TO NPM:
61
62
 
package/dist/index.js CHANGED
@@ -383,6 +383,7 @@ const START_WIDGET_LOADING = 'START_WIDGET_LOADING';
383
383
  const STOP_WIDGET_LOADING = 'STOP_WIDGET_LOADING';
384
384
  const LOAD_INITIAL_VARS = 'LOAD_INITIAL_VARS';
385
385
  const CHANGE_STEP = 'CHANGE_STEP';
386
+ const REQUESTED_TICKET_TYPES = 'REQUESTED_TICKET_TYPES';
386
387
  const GET_TICKET_TYPES = 'GET_TICKET_TYPES';
387
388
  const GET_TAX_TYPES = 'GET_TAX_TYPES';
388
389
  const CREATE_RESERVATION = 'CREATE_RESERVATION';
@@ -399,11 +400,15 @@ const SET_PASSWORDLESS_ERROR = 'SET_PASSWORDLESS_ERROR';
399
400
  const GO_TO_LOGIN = 'GO_TO_LOGIN';
400
401
  const GET_MY_INVITATION = 'GET_MY_INVITATION';
401
402
  const CLEAR_MY_INVITATION = 'CLEAR_MY_INVITATION';
403
+ const CLEAR_WIDGET_STATE = 'CLEAR_WIDGET_STATE';
402
404
  const startWidgetLoading = (0,actions_namespaceObject.createAction)(START_WIDGET_LOADING);
403
405
  const stopWidgetLoading = (0,actions_namespaceObject.createAction)(STOP_WIDGET_LOADING);
404
406
  const loadSession = settings => dispatch => {
405
407
  dispatch((0,actions_namespaceObject.createAction)(LOAD_INITIAL_VARS)(settings));
406
408
  };
409
+ const clearWidgetState = () => dispatch => {
410
+ dispatch((0,actions_namespaceObject.createAction)(CLEAR_WIDGET_STATE)({}));
411
+ };
407
412
 
408
413
  const customErrorHandler = (err, res) => (dispatch, state) => {
409
414
  if (err.timeout) {
@@ -446,7 +451,7 @@ const getTicketTypes = summitId => async (dispatch, getState, {
446
451
  access_token: accessToken
447
452
  };
448
453
  dispatch(startWidgetLoading());
449
- return (0,actions_namespaceObject.getRequest)(null, (0,actions_namespaceObject.createAction)(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types/allowed`, customErrorHandler)(params)(dispatch).then(() => {
454
+ return (0,actions_namespaceObject.getRequest)((0,actions_namespaceObject.createAction)(REQUESTED_TICKET_TYPES), (0,actions_namespaceObject.createAction)(GET_TICKET_TYPES), `${apiBaseUrl}/api/v1/summits/${summitId}/ticket-types/allowed`, customErrorHandler)(params)(dispatch).then(() => {
450
455
  dispatch(stopWidgetLoading());
451
456
  }).catch(error => {
452
457
  dispatch(stopWidgetLoading());
@@ -491,134 +496,152 @@ const reserveTicket = ({
491
496
  apiBaseUrl,
492
497
  getAccessToken
493
498
  }) => {
494
- const {
495
- registrationLiteState: {
496
- settings: {
497
- summitId
499
+ try {
500
+ const {
501
+ registrationLiteState: {
502
+ settings: {
503
+ summitId
504
+ }
498
505
  }
499
- }
500
- } = getState();
501
- let {
502
- firstName,
503
- lastName,
504
- email,
505
- company,
506
- promoCode
507
- } = personalInformation;
508
- dispatch(startWidgetLoading());
509
- const access_token = await getAccessToken();
510
- const tickets = [...Array(ticketQuantity)].map(() => ({
511
- type_id: ticket.id,
512
- promo_code: promoCode || null
513
- })); // Only set the attendee for the first ticket.
514
-
515
- tickets[0].attendee_first_name = firstName;
516
- tickets[0].attendee_last_name = lastName;
517
- tickets[0].attendee_email = email;
518
- let params = {
519
- access_token,
520
- expand: 'tickets,tickets.owner,tickets.ticket_type,tickets.ticket_type.taxes'
521
- };
522
- const normalizedEntity = normalizeReservation({
523
- owner_email: email,
524
- owner_first_name: firstName,
525
- owner_last_name: lastName,
526
- owner_company: company,
527
- tickets
528
- });
506
+ } = getState();
507
+ let {
508
+ firstName,
509
+ lastName,
510
+ email,
511
+ company,
512
+ promoCode
513
+ } = personalInformation;
514
+ dispatch(startWidgetLoading());
515
+ const access_token = await getAccessToken();
516
+ const tickets = [...Array(ticketQuantity)].map(() => ({
517
+ type_id: ticket.id,
518
+ promo_code: promoCode || null
519
+ })); // Only set the attendee for the first ticket.
520
+
521
+ tickets[0].attendee_first_name = firstName;
522
+ tickets[0].attendee_last_name = lastName;
523
+ tickets[0].attendee_email = email;
524
+ let params = {
525
+ access_token,
526
+ expand: 'tickets,tickets.owner,tickets.ticket_type,tickets.ticket_type.taxes'
527
+ };
528
+ const normalizedEntity = normalizeReservation({
529
+ owner_email: email,
530
+ owner_first_name: firstName,
531
+ owner_last_name: lastName,
532
+ owner_company: company,
533
+ tickets
534
+ });
529
535
 
530
- const errorHandler = (err, res) => (dispatch, state) => {
531
- if (res && res.statusCode === 412 && onError) return onError(err, res);
536
+ const errorHandler = (err, res) => (dispatch, state) => {
537
+ if (res && res.statusCode === 412 && onError) return onError(err, res);
532
538
 
533
- if (res && res.statusCode === 404) {
534
- const msg = res.body.message;
535
- external_sweetalert2_default().fire("Validation Error", msg, "warning");
536
- return;
537
- }
539
+ if (res && res.statusCode === 404) {
540
+ const msg = res.body.message;
541
+ external_sweetalert2_default().fire("Validation Error", msg, "warning");
542
+ return;
543
+ }
538
544
 
539
- if (res && res.statusCode === 500) {
540
- const msg = res.body.message;
541
- external_sweetalert2_default().fire("Server Error", msg, "error");
542
- return;
543
- }
545
+ if (res && res.statusCode === 500) {
546
+ const msg = res.body.message;
547
+ external_sweetalert2_default().fire("Server Error", msg, "error");
548
+ return;
549
+ }
544
550
 
545
- return (0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
546
- };
551
+ return (0,actions_namespaceObject.authErrorHandler)(err, res)(dispatch, state);
552
+ };
547
553
 
548
- return (0,actions_namespaceObject.postRequest)((0,actions_namespaceObject.createAction)(CREATE_RESERVATION), (0,actions_namespaceObject.createAction)(CREATE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/reserve`, normalizedEntity, errorHandler // entity
549
- )(params)(dispatch).then(payload => {
550
- dispatch(stopWidgetLoading());
551
- payload.response.promo_code = promoCode || null;
554
+ return (0,actions_namespaceObject.postRequest)((0,actions_namespaceObject.createAction)(CREATE_RESERVATION), (0,actions_namespaceObject.createAction)(CREATE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/reserve`, normalizedEntity, errorHandler // entity
555
+ )(params)(dispatch).then(payload => {
556
+ dispatch(stopWidgetLoading());
557
+ payload.response.promo_code = promoCode || null;
552
558
 
553
- if (!payload.response.amount) {
554
- dispatch(payTicketWithProvider(provider));
555
- return payload;
556
- }
559
+ if (!payload.response.amount) {
560
+ dispatch(payTicketWithProvider(provider));
561
+ return payload;
562
+ }
557
563
 
558
- dispatch(changeStep(2));
559
- return payload;
560
- }).catch(e => {
564
+ dispatch(changeStep(2));
565
+ return payload;
566
+ }).catch(e => {
567
+ dispatch((0,actions_namespaceObject.createAction)(CREATE_RESERVATION_ERROR)(e));
568
+ dispatch(stopWidgetLoading());
569
+ return Promise.reject(e);
570
+ });
571
+ } catch (e) {
561
572
  dispatch((0,actions_namespaceObject.createAction)(CREATE_RESERVATION_ERROR)(e));
562
573
  dispatch(stopWidgetLoading());
563
- return e;
564
- });
574
+ return Promise.reject(e);
575
+ }
565
576
  };
566
577
  const removeReservedTicket = () => async (dispatch, getState, {
567
578
  apiBaseUrl,
568
579
  getAccessToken
569
580
  }) => {
570
- let {
571
- registrationLiteState: {
572
- settings: {
573
- summitId
574
- },
575
- reservation: {
576
- hash
581
+ try {
582
+ let {
583
+ registrationLiteState: {
584
+ settings: {
585
+ summitId
586
+ },
587
+ reservation: {
588
+ hash
589
+ }
577
590
  }
578
- }
579
- } = getState();
580
- const access_token = await getAccessToken();
581
- let params = {
582
- access_token,
583
- expand: 'tickets,tickets.owner'
584
- };
585
- dispatch(startWidgetLoading());
586
- return (0,actions_namespaceObject.deleteRequest)((0,actions_namespaceObject.createAction)(DELETE_RESERVATION), (0,actions_namespaceObject.createAction)(DELETE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${hash}`, {}, actions_namespaceObject.authErrorHandler // entity
587
- )(params)(dispatch).then(payload => {
588
- dispatch(stopWidgetLoading());
589
- dispatch(changeStep(1));
590
- return payload;
591
- }).catch(e => {
591
+ } = getState();
592
+ const access_token = await getAccessToken();
593
+ let params = {
594
+ access_token,
595
+ expand: 'tickets,tickets.owner'
596
+ };
597
+ dispatch(startWidgetLoading());
598
+ return (0,actions_namespaceObject.deleteRequest)((0,actions_namespaceObject.createAction)(DELETE_RESERVATION), (0,actions_namespaceObject.createAction)(DELETE_RESERVATION_SUCCESS), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${hash}`, {}, actions_namespaceObject.authErrorHandler // entity
599
+ )(params)(dispatch).then(payload => {
600
+ dispatch(stopWidgetLoading());
601
+ dispatch(changeStep(1));
602
+ return payload;
603
+ }).catch(e => {
604
+ dispatch((0,actions_namespaceObject.createAction)(DELETE_RESERVATION_ERROR)(e));
605
+ dispatch(changeStep(1));
606
+ dispatch(stopWidgetLoading());
607
+ return Promise.reject(e);
608
+ });
609
+ } catch (e) {
592
610
  dispatch((0,actions_namespaceObject.createAction)(DELETE_RESERVATION_ERROR)(e));
593
611
  dispatch(changeStep(1));
594
612
  dispatch(stopWidgetLoading());
595
- return e;
596
- });
613
+ return Promise.reject(e);
614
+ }
597
615
  };
598
616
  const payTicketWithProvider = (provider, params = {}) => async (dispatch, getState, {
599
617
  apiBaseUrl,
600
618
  getAccessToken
601
619
  }) => {
602
- let {
603
- registrationLiteState: {
604
- settings: {
605
- summitId,
606
- userProfile
607
- },
608
- reservation
609
- }
610
- } = getState();
611
- const access_token = await getAccessToken();
612
- dispatch(startWidgetLoading());
613
- const currentProvider = PaymentProviderFactory.build(provider, {
614
- reservation,
615
- summitId,
616
- userProfile,
617
- access_token,
618
- apiBaseUrl,
619
- dispatch
620
- });
621
- return dispatch(currentProvider.payTicket(actions_objectSpread({}, params)));
620
+ try {
621
+ let {
622
+ registrationLiteState: {
623
+ settings: {
624
+ summitId,
625
+ userProfile
626
+ },
627
+ reservation
628
+ }
629
+ } = getState();
630
+ const access_token = await getAccessToken();
631
+ dispatch(startWidgetLoading());
632
+ const currentProvider = PaymentProviderFactory.build(provider, {
633
+ reservation,
634
+ summitId,
635
+ userProfile,
636
+ access_token,
637
+ apiBaseUrl,
638
+ dispatch
639
+ });
640
+ return dispatch(currentProvider.payTicket(actions_objectSpread({}, params)));
641
+ } catch (e) {
642
+ dispatch(stopWidgetLoading());
643
+ return Promise.reject(e);
644
+ }
622
645
  };
623
646
  const changeStep = step => (dispatch, getState) => {
624
647
  dispatch(startWidgetLoading());
@@ -724,9 +747,11 @@ const getMyInvitation = summitId => async (dispatch, getState, {
724
747
  dispatch(stopWidgetLoading());
725
748
  });
726
749
  } catch (e) {
727
- return Promise.reject();
750
+ return Promise.reject(e);
728
751
  }
729
752
  };
753
+ ;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/security/actions"
754
+ const security_actions_namespaceObject = require("openstack-uicore-foundation/lib/security/actions");
730
755
  ;// CONCATENATED MODULE: ./src/reducer.js
731
756
  function reducer_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; }
732
757
 
@@ -747,6 +772,7 @@ function reducer_defineProperty(obj, key, value) { if (key in obj) { Object.defi
747
772
  * limitations under the License.
748
773
  **/
749
774
 
775
+
750
776
  const DEFAULT_STATE = {
751
777
  reservation: null,
752
778
  checkout: null,
@@ -759,6 +785,9 @@ const DEFAULT_STATE = {
759
785
  error: false
760
786
  },
761
787
  ticketTypes: [],
788
+ // added this flag to really know if we requested or not the ticket types collection
789
+ // ( empty bc initial value or empty bc api empty response)
790
+ requestedTicketTypes: false,
762
791
  taxTypes: [],
763
792
  invitation: null,
764
793
  settings: {
@@ -776,6 +805,19 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
776
805
  } = action;
777
806
 
778
807
  switch (type) {
808
+ case CLEAR_WIDGET_STATE:
809
+ case security_actions_namespaceObject.LOGOUT_USER:
810
+ {
811
+ return DEFAULT_STATE;
812
+ }
813
+
814
+ case REQUESTED_TICKET_TYPES:
815
+ {
816
+ return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
817
+ requestedTicketTypes: false
818
+ });
819
+ }
820
+
779
821
  case START_WIDGET_LOADING:
780
822
  {
781
823
  return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
@@ -826,7 +868,8 @@ const RegistrationLiteReducer = (state = DEFAULT_STATE, action) => {
826
868
  case GET_TICKET_TYPES:
827
869
  {
828
870
  return reducer_objectSpread(reducer_objectSpread({}, state), {}, {
829
- ticketTypes: payload.response.data
871
+ ticketTypes: payload.response.data,
872
+ requestedTicketTypes: true
830
873
  });
831
874
  }
832
875
 
@@ -987,6 +1030,8 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
987
1030
  const external_react_spring_namespaceObject = require("react-spring");
988
1031
  ;// CONCATENATED MODULE: external "react-use"
989
1032
  const external_react_use_namespaceObject = require("react-use");
1033
+ ;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/security/constants"
1034
+ const constants_namespaceObject = require("openstack-uicore-foundation/lib/security/constants");
990
1035
  ;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/ajaxloader"
991
1036
  const ajaxloader_namespaceObject = require("openstack-uicore-foundation/lib/components/ajaxloader");
992
1037
  var ajaxloader_default = /*#__PURE__*/__webpack_require__.n(ajaxloader_namespaceObject);
@@ -2653,7 +2698,7 @@ const TicketTaxesError = ({
2653
2698
 
2654
2699
  /* harmony default export */ const ticket_taxes_error = (TicketTaxesError);
2655
2700
  ;// CONCATENATED MODULE: ./src/components/registration-lite.js
2656
- const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToEvent", "goToRegistration", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions", "invitation", "loginInitialEmailInputValue", "getMyInvitation", "showMultipleTicketTexts", "noAllowedTicketsMessage", "ticketTaxesErrorMessage"];
2701
+ const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypesAndTaxes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToEvent", "goToRegistration", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions", "invitation", "loginInitialEmailInputValue", "getMyInvitation", "showMultipleTicketTexts", "noAllowedTicketsMessage", "ticketTaxesErrorMessage", "authErrorCallback", "clearWidgetState", "requestedTicketTypes"];
2657
2702
 
2658
2703
  function registration_lite_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; }
2659
2704
 
@@ -2696,6 +2741,7 @@ function registration_lite_objectWithoutPropertiesLoose(source, excluded) { if (
2696
2741
 
2697
2742
 
2698
2743
 
2744
+
2699
2745
 
2700
2746
 
2701
2747
  const RegistrationLite = _ref => {
@@ -2746,7 +2792,10 @@ const RegistrationLite = _ref => {
2746
2792
  getMyInvitation,
2747
2793
  showMultipleTicketTexts,
2748
2794
  noAllowedTicketsMessage,
2749
- ticketTaxesErrorMessage
2795
+ ticketTaxesErrorMessage,
2796
+ authErrorCallback,
2797
+ clearWidgetState,
2798
+ requestedTicketTypes
2750
2799
  } = _ref,
2751
2800
  rest = registration_lite_objectWithoutProperties(_ref, registration_lite_excluded);
2752
2801
 
@@ -2791,12 +2840,12 @@ const RegistrationLite = _ref => {
2791
2840
  if (summitData && profileData) {
2792
2841
  handleGetTicketTypesAndTaxes(summitData.id);
2793
2842
  }
2794
- }, []);
2843
+ }, [summitData, profileData]);
2795
2844
  (0,external_react_namespaceObject.useEffect)(() => {
2796
2845
  if (summitData && profileData) {
2797
2846
  getMyInvitation(summitData.id).catch(e => console.log(e));
2798
2847
  }
2799
- }, []);
2848
+ }, [summitData, profileData]);
2800
2849
  (0,external_react_namespaceObject.useEffect)(() => {
2801
2850
  if (step === 1 && formValues !== null && formValues !== void 0 && formValues.ticketType && formValues !== null && formValues !== void 0 && formValues.personalInformation) {
2802
2851
  reserveTicket({
@@ -2806,6 +2855,16 @@ const RegistrationLite = _ref => {
2806
2855
  ticketQuantity: formValues === null || formValues === void 0 ? void 0 : formValues.ticketQuantity
2807
2856
  }, {
2808
2857
  onError: (err, res) => setFormErrors(res.body.errors)
2858
+ }).catch(error => {
2859
+ let {
2860
+ message
2861
+ } = error;
2862
+
2863
+ if (message && (message.includes(constants_namespaceObject.AUTH_ERROR_MISSING_AUTH_INFO) || message.includes(constants_namespaceObject.AUTH_ERROR_MISSING_REFRESH_TOKEN) || message.includes(constants_namespaceObject.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR))) {
2864
+ // we dont have an access token, init log out process
2865
+ clearWidgetState();
2866
+ return authErrorCallback(error);
2867
+ }
2809
2868
  });
2810
2869
  }
2811
2870
 
@@ -2839,6 +2898,16 @@ const RegistrationLite = _ref => {
2839
2898
  const handleGetTicketTypesAndTaxes = summitId => {
2840
2899
  setTicketTaxesError(false);
2841
2900
  getTicketTypesAndTaxes(summitId).then().catch(error => {
2901
+ let {
2902
+ message
2903
+ } = error;
2904
+
2905
+ if (message && (message.includes(constants_namespaceObject.AUTH_ERROR_MISSING_AUTH_INFO) || message.includes(constants_namespaceObject.AUTH_ERROR_MISSING_REFRESH_TOKEN) || message.includes(constants_namespaceObject.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR))) {
2906
+ // we dont have an access token, init log out process
2907
+ clearWidgetState();
2908
+ return authErrorCallback(error);
2909
+ }
2910
+
2842
2911
  setTicketTaxesError(true);
2843
2912
  });
2844
2913
  };
@@ -2868,7 +2937,7 @@ const RegistrationLite = _ref => {
2868
2937
  })), ticketTaxesError && profileData && /*#__PURE__*/external_react_default().createElement(ticket_taxes_error, {
2869
2938
  ticketTaxesErrorMessage: ticketTaxesErrorMessage,
2870
2939
  retryTicketTaxes: () => handleGetTicketTypesAndTaxes(summitData === null || summitData === void 0 ? void 0 : summitData.id)
2871
- }), !ticketTaxesError && profileData && ticketTypes.length === 0 && !loading && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
2940
+ }), !ticketTaxesError && profileData && ticketTypes.length === 0 && requestedTicketTypes && /*#__PURE__*/external_react_default().createElement(no_allowed_tickets, {
2872
2941
  noAllowedTicketsMessage: noAllowedTicketsMessage
2873
2942
  }), !ticketTaxesError && /*#__PURE__*/external_react_default().createElement("div", {
2874
2943
  className: general_module.stepsWrapper
@@ -2951,6 +3020,7 @@ const registration_lite_mapStateToProps = ({
2951
3020
  userProfile: registrationLiteState.settings.userProfile,
2952
3021
  checkout: registrationLiteState.checkout,
2953
3022
  ticketTypes: registrationLiteState.ticketTypes,
3023
+ requestedTicketTypes: registrationLiteState.requestedTicketTypes,
2954
3024
  taxTypes: registrationLiteState.taxTypes,
2955
3025
  step: registrationLiteState.step,
2956
3026
  passwordlessEmail: registrationLiteState.passwordless.email,
@@ -2963,11 +3033,15 @@ RegistrationLite.defaultProps = {
2963
3033
  loginInitialEmailInputValue: '',
2964
3034
  showMultipleTicketTexts: true,
2965
3035
  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>',
2966
- ticketTaxesErrorMessage: '<span>There was an error getting the information for the tickets. Please try it again.</span>'
3036
+ ticketTaxesErrorMessage: '<span>There was an error getting the information for the tickets. Please try it again.</span>',
3037
+ authErrorCallback: error => {
3038
+ console.log(error);
3039
+ }
2967
3040
  };
2968
3041
  RegistrationLite.propTypes = {
2969
3042
  loginInitialEmailInputValue: (external_prop_types_default()).string,
2970
- showMultipleTicketTexts: (external_prop_types_default()).bool
3043
+ showMultipleTicketTexts: (external_prop_types_default()).bool,
3044
+ authErrorCallback: (external_prop_types_default()).func
2971
3045
  };
2972
3046
  /* harmony default export */ const registration_lite = ((0,external_react_redux_namespaceObject.connect)(registration_lite_mapStateToProps, {
2973
3047
  loadSession: loadSession,
@@ -2979,7 +3053,8 @@ RegistrationLite.propTypes = {
2979
3053
  getLoginCode: getLoginCode,
2980
3054
  passwordlessLogin: passwordlessLogin,
2981
3055
  goToLogin: goToLogin,
2982
- getMyInvitation: getMyInvitation
3056
+ getMyInvitation: getMyInvitation,
3057
+ clearWidgetState: clearWidgetState
2983
3058
  })(RegistrationLite));
2984
3059
  ;// CONCATENATED MODULE: ./src/summit-registration-lite.js
2985
3060
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "summit-registration-lite",
3
- "version": "3.0.14",
3
+ "version": "3.0.17",
4
4
  "description": "Summit Registration Lite",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -60,7 +60,7 @@
60
60
  "moment": "^2.22.2",
61
61
  "moment-timezone": "^0.5.21",
62
62
  "node-sass": "^7.0.1",
63
- "openstack-uicore-foundation": "^4.0.43",
63
+ "openstack-uicore-foundation": "^4.0.49",
64
64
  "optimize-css-assets-webpack-plugin": "^6.0.1",
65
65
  "path": "^0.12.7",
66
66
  "react": "^16.8.4",
@@ -109,7 +109,7 @@
109
109
  "lodash": "^4.17.14",
110
110
  "moment": "^2.22.2",
111
111
  "moment-timezone": "^0.5.21",
112
- "openstack-uicore-foundation": "^4.0.35",
112
+ "openstack-uicore-foundation": "^4.0.49",
113
113
  "react": "^16.8.4",
114
114
  "react-bootstrap": "^0.31.5",
115
115
  "react-datetime": "^2.16.2",