@stokr/components-library 2.3.41-beta.2 → 2.3.41-beta.20

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.
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = exports.HeaderHo = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
- var _jsCookie = _interopRequireDefault(require("js-cookie"));
9
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
9
  var sc = _interopRequireWildcard(require("../../constants/style"));
11
10
  var _RegisterModal = _interopRequireDefault(require("../RegisterModal/RegisterModal"));
@@ -23,6 +22,8 @@ var _fetchDataPublic = _interopRequireDefault(require("../../api/fetchDataPublic
23
22
  var _AuthContext = require("../../context/AuthContext");
24
23
  var _withRouter = require("../../utils/withRouter");
25
24
  var _customHooks = require("../../utils/customHooks");
25
+ var _auth2 = require("firebase/auth");
26
+ var _firebaseConfig = require("../../firebase-config");
26
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
29
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -92,7 +93,8 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
92
93
  message: undefined
93
94
  },
94
95
  isActionLoading: undefined,
95
- termsData: undefined
96
+ termsData: undefined,
97
+ isResettingExpiredToken: false
96
98
  });
97
99
  _defineProperty(_assertThisInitialized(_this), "checkForModals", function () {
98
100
  var _this$props = _this.props,
@@ -171,6 +173,8 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
171
173
  _this.setState(function (prevState) {
172
174
  return _objectSpread(_objectSpread({}, prevState), {}, {
173
175
  isModalOpen: _objectSpread(_objectSpread({}, isModalOpen), {}, _defineProperty({}, modalId, status))
176
+ }, modalId === 'forgot' && !status && {
177
+ isResettingExpiredToken: false
174
178
  });
175
179
  });
176
180
  });
@@ -271,8 +275,6 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
271
275
  this.props.navigate('/login');
272
276
  this.props.navigate(0);
273
277
  }
274
-
275
- // Run after page loaded
276
278
  if (!isFetchingUser) {
277
279
  this.checkForModals();
278
280
  }
@@ -285,7 +287,8 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
285
287
  isModalOpen = _this$state.isModalOpen,
286
288
  userInfo = _this$state.userInfo,
287
289
  isActionLoading = _this$state.isActionLoading,
288
- termsData = _this$state.termsData;
290
+ termsData = _this$state.termsData,
291
+ isResettingExpiredToken = _this$state.isResettingExpiredToken;
289
292
  var _this$props3 = this.props,
290
293
  fixed = _this$props3.fixed,
291
294
  activateMenu = _this$props3.activateMenu,
@@ -637,6 +640,7 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
637
640
  popupError: this.state.popupError,
638
641
  popupSuccess: this.state.popupSuccess,
639
642
  isModalOpen: isModalOpen.forgot,
643
+ isResettingExpiredToken: isResettingExpiredToken,
640
644
  onModalClose: function onModalClose() {
641
645
  _this2.setOpenModalStatus('forgot', false);
642
646
  _this2.clearPopupError();
@@ -731,7 +735,54 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
731
735
  return function (_x5) {
732
736
  return _ref11.apply(this, arguments);
733
737
  };
734
- }()
738
+ }(),
739
+ onLoad: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
740
+ var location, query, oobCode;
741
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
742
+ while (1) switch (_context7.prev = _context7.next) {
743
+ case 0:
744
+ location = _this2.props.location;
745
+ query = new URLSearchParams(location === null || location === void 0 ? void 0 : location.search);
746
+ oobCode = query.get('oobCode');
747
+ if (!(oobCode && oobCode !== '')) {
748
+ _context7.next = 16;
749
+ break;
750
+ }
751
+ _this2.setIsActionLoading('resetPassword');
752
+ _context7.prev = 5;
753
+ _context7.next = 8;
754
+ return (0, _auth2.checkActionCode)(_firebaseConfig.auth, oobCode);
755
+ case 8:
756
+ _this2.setIsActionLoading(undefined);
757
+ _context7.next = 15;
758
+ break;
759
+ case 11:
760
+ _context7.prev = 11;
761
+ _context7.t0 = _context7["catch"](5);
762
+ console.log('Password reset code error:', _context7.t0);
763
+ if ((_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.code) === 'auth/expired-action-code') {
764
+ _this2.setState(function (prevState) {
765
+ return _objectSpread(_objectSpread({}, prevState), {}, {
766
+ isResettingExpiredToken: true
767
+ });
768
+ });
769
+
770
+ // we use a special version of Forgot Password modal
771
+ // adjusted to handle and resend expired tokens.
772
+ // isResettingExpiredToken makes it adjust.
773
+ _this2.switchOpenModal('resetPassword', 'forgot');
774
+ _this2.setPopupError('forgot', 'This password reset link has expired or is invalid. Please request a new one.');
775
+ } else {
776
+ _this2.setPopupError('resetPassword', 'Something went wrong with the password reset link. Please try again.');
777
+ }
778
+ case 15:
779
+ _this2.setIsActionLoading(undefined);
780
+ case 16:
781
+ case "end":
782
+ return _context7.stop();
783
+ }
784
+ }, _callee7, null, [[5, 11]]);
785
+ }))
735
786
  }), /*#__PURE__*/_react.default.createElement(_ResetConfirmModal.default, {
736
787
  isModalOpen: isModalOpen.confirmReset,
737
788
  onModalClose: function onModalClose() {
@@ -768,37 +819,37 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
768
819
  _this2.setIsActionLoading(undefined);
769
820
  },
770
821
  onResend: /*#__PURE__*/function () {
771
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(values) {
822
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(values) {
772
823
  var email;
773
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
774
- while (1) switch (_context7.prev = _context7.next) {
824
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
825
+ while (1) switch (_context8.prev = _context8.next) {
775
826
  case 0:
776
827
  _this2.clearPopupSuccess();
777
828
  _this2.clearPopupError();
778
829
  _this2.setIsActionLoading('resend');
779
- _context7.prev = 3;
830
+ _context8.prev = 3;
780
831
  email = values === null || values === void 0 ? void 0 : values.email;
781
- _context7.next = 7;
832
+ _context8.next = 7;
782
833
  return resendActivationEmail(email);
783
834
  case 7:
784
835
  _this2.setPopupSuccess('resend', 'Email sent.');
785
836
  _this2.setIsActionLoading(undefined);
786
- _context7.next = 16;
837
+ _context8.next = 16;
787
838
  break;
788
839
  case 11:
789
- _context7.prev = 11;
790
- _context7.t0 = _context7["catch"](3);
791
- console.log(_context7.t0);
792
- _this2.setPopupError('resend', (_context7.t0 === null || _context7.t0 === void 0 ? void 0 : _context7.t0.message) || 'Something went wrong.');
840
+ _context8.prev = 11;
841
+ _context8.t0 = _context8["catch"](3);
842
+ console.log(_context8.t0);
843
+ _this2.setPopupError('resend', (_context8.t0 === null || _context8.t0 === void 0 ? void 0 : _context8.t0.message) || 'Something went wrong.');
793
844
  _this2.setIsActionLoading(undefined);
794
845
  case 16:
795
846
  case "end":
796
- return _context7.stop();
847
+ return _context8.stop();
797
848
  }
798
- }, _callee7, null, [[3, 11]]);
849
+ }, _callee8, null, [[3, 11]]);
799
850
  }));
800
851
  return function (_x6) {
801
- return _ref12.apply(this, arguments);
852
+ return _ref13.apply(this, arguments);
802
853
  };
803
854
  }()
804
855
  }));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.walletTypes = exports.platformURL = exports.platformDomain = exports.UserTypes = exports.ProjectTypes = exports.ProjectStatus = exports.ProjectStates = void 0;
6
+ exports.walletTypes = exports.platformURL = exports.platformDomain = exports.emailRegex = exports.UserTypes = exports.ProjectTypes = exports.ProjectStatus = exports.ProjectStates = void 0;
7
7
  var platformDomain = process.env.REACT_APP_WEBSITE_DOMAIN;
8
8
  exports.platformDomain = platformDomain;
9
9
  var platformURL = 'https://' + platformDomain;
@@ -37,4 +37,8 @@ var UserTypes = {
37
37
  investor: 'investor',
38
38
  investor_entity: 'investor_entity'
39
39
  };
40
- exports.UserTypes = UserTypes;
40
+
41
+ // should be used for all email form validation globally
42
+ exports.UserTypes = UserTypes;
43
+ var emailRegex = /^(([^<>()[\]\\.,;:\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,}))$/i;
44
+ exports.emailRegex = emailRegex;
@@ -761,58 +761,19 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
761
761
  return _ref14.apply(this, arguments);
762
762
  };
763
763
  }());
764
- _defineProperty(_assertThisInitialized(_this), "checkActivationLinkExpired", /*#__PURE__*/function () {
765
- var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(actionCode) {
766
- var actionCodeInfo;
767
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
768
- while (1) switch (_context15.prev = _context15.next) {
769
- case 0:
770
- console.log('does this even run??');
771
- _context15.prev = 1;
772
- _context15.next = 4;
773
- return (0, _auth.checkActionCode)(_firebaseConfig.auth, actionCode);
774
- case 4:
775
- actionCodeInfo = _context15.sent;
776
- console.log('actionCodeInfo', actionCodeInfo);
777
- return _context15.abrupt("return", {
778
- expired: false,
779
- info: actionCodeInfo
780
- });
781
- case 9:
782
- _context15.prev = 9;
783
- _context15.t0 = _context15["catch"](1);
784
- console.log('checkActivationLinkExpired error:', _context15.t0);
785
- if (!(_context15.t0.code === 'auth/expired-action-code' || _context15.t0.code === 'auth/invalid-action-code')) {
786
- _context15.next = 14;
787
- break;
788
- }
789
- return _context15.abrupt("return", {
790
- expired: true,
791
- error: _context15.t0
792
- });
793
- case 14:
794
- case "end":
795
- return _context15.stop();
796
- }
797
- }, _callee15, null, [[1, 9]]);
798
- }));
799
- return function (_x18) {
800
- return _ref15.apply(this, arguments);
801
- };
802
- }());
803
- _defineProperty(_assertThisInitialized(_this), "handleVerifyEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
764
+ _defineProperty(_assertThisInitialized(_this), "handleVerifyEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
804
765
  var location, query, oobCode, customToken, email;
805
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
806
- while (1) switch (_context16.prev = _context16.next) {
766
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
767
+ while (1) switch (_context15.prev = _context15.next) {
807
768
  case 0:
808
769
  _this.setState({
809
770
  isVerifyingEmail: true
810
771
  });
811
772
  location = _this.props.location;
812
773
  query = new URLSearchParams(location.search);
813
- _context16.prev = 3;
774
+ _context15.prev = 3;
814
775
  oobCode = query.get('oobCode');
815
- _context16.next = 7;
776
+ _context15.next = 7;
816
777
  return _Auth.default.handleVerifyEmail(oobCode);
817
778
  case 7:
818
779
  _this.setState({
@@ -822,188 +783,188 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
822
783
  if (customToken) {
823
784
  _this.loginUser(null, null, customToken);
824
785
  }
825
- _context16.next = 28;
786
+ _context15.next = 28;
826
787
  break;
827
788
  case 12:
828
- _context16.prev = 12;
829
- _context16.t0 = _context16["catch"](3);
830
- _context16.t1 = _context16.t0 === null || _context16.t0 === void 0 ? void 0 : _context16.t0.code;
831
- _context16.next = _context16.t1 === 'auth/expired-action-code' ? 17 : _context16.t1 === 'auth/invalid-action-code' ? 21 : _context16.t1 === 'auth/user-disabled' ? 23 : 25;
789
+ _context15.prev = 12;
790
+ _context15.t0 = _context15["catch"](3);
791
+ _context15.t1 = _context15.t0 === null || _context15.t0 === void 0 ? void 0 : _context15.t0.code;
792
+ _context15.next = _context15.t1 === 'auth/expired-action-code' ? 17 : _context15.t1 === 'auth/invalid-action-code' ? 21 : _context15.t1 === 'auth/user-disabled' ? 23 : 25;
832
793
  break;
833
794
  case 17:
834
- _context16.t0.message = 'The activation link has expired. We are sending you a new one right now.';
795
+ _context15.t0.message = 'The activation link has expired. We are sending you a new one right now.';
835
796
  email = query.get('email');
836
797
  if (email) {
837
- _context16.t0.email = email;
798
+ _context15.t0.email = email;
838
799
  //Auth.resendActivationEmail(email)
839
800
  }
840
- return _context16.abrupt("break", 26);
801
+ return _context15.abrupt("break", 26);
841
802
  case 21:
842
- _context16.t0.message = 'This link is invalid. Please try verifying email again.';
843
- return _context16.abrupt("break", 26);
803
+ _context15.t0.message = 'This link is invalid. Please try verifying email again.';
804
+ return _context15.abrupt("break", 26);
844
805
  case 23:
845
- _context16.t0.message = 'Your account has been disabled. Please contact our support.';
846
- return _context16.abrupt("break", 26);
806
+ _context15.t0.message = 'Your account has been disabled. Please contact our support.';
807
+ return _context15.abrupt("break", 26);
847
808
  case 25:
848
- return _context16.abrupt("break", 26);
809
+ return _context15.abrupt("break", 26);
849
810
  case 26:
850
- console.log('🚀 ~ file: AuthContext.js:446 ~ error:', _context16.t0);
811
+ console.log('🚀 ~ file: AuthContext.js:446 ~ error:', _context15.t0);
851
812
  _this.setState({
852
- verifyEmailError: _context16.t0,
813
+ verifyEmailError: _context15.t0,
853
814
  isVerifyingEmail: false,
854
815
  isFetchingUser: false
855
816
  });
856
817
  //throw error
857
818
  case 28:
858
819
  case "end":
859
- return _context16.stop();
820
+ return _context15.stop();
860
821
  }
861
- }, _callee16, null, [[3, 12]]);
822
+ }, _callee15, null, [[3, 12]]);
862
823
  })));
863
824
  _defineProperty(_assertThisInitialized(_this), "handleResetPassword", /*#__PURE__*/function () {
864
- var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(password) {
825
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(password) {
865
826
  var location, query, oobCode;
866
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
867
- while (1) switch (_context17.prev = _context17.next) {
827
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
828
+ while (1) switch (_context16.prev = _context16.next) {
868
829
  case 0:
869
830
  location = _this.props.location;
870
- _context17.prev = 1;
831
+ _context16.prev = 1;
871
832
  query = new URLSearchParams(location.search);
872
833
  oobCode = query.get('oobCode');
873
- _context17.next = 6;
834
+ _context16.next = 6;
874
835
  return _Auth.default.handleResetPassword(oobCode, password);
875
836
  case 6:
876
- _context17.next = 21;
837
+ _context16.next = 21;
877
838
  break;
878
839
  case 8:
879
- _context17.prev = 8;
880
- _context17.t0 = _context17["catch"](1);
881
- _context17.t1 = _context17.t0 === null || _context17.t0 === void 0 ? void 0 : _context17.t0.code;
882
- _context17.next = _context17.t1 === 'auth/expired-action-code' ? 13 : _context17.t1 === 'auth/invalid-action-code' ? 15 : _context17.t1 === 'auth/user-disabled' ? 17 : 19;
840
+ _context16.prev = 8;
841
+ _context16.t0 = _context16["catch"](1);
842
+ _context16.t1 = _context16.t0 === null || _context16.t0 === void 0 ? void 0 : _context16.t0.code;
843
+ _context16.next = _context16.t1 === 'auth/expired-action-code' ? 13 : _context16.t1 === 'auth/invalid-action-code' ? 15 : _context16.t1 === 'auth/user-disabled' ? 17 : 19;
883
844
  break;
884
845
  case 13:
885
- _context17.t0.message = 'This link has expired. Please try reseting password again.';
886
- return _context17.abrupt("break", 20);
846
+ _context16.t0.message = 'This link has expired. Please try reseting password again.';
847
+ return _context16.abrupt("break", 20);
887
848
  case 15:
888
- _context17.t0.message = 'This link is invalid. Please try reseting password again.';
889
- return _context17.abrupt("break", 20);
849
+ _context16.t0.message = 'This link is invalid. Please try reseting password again.';
850
+ return _context16.abrupt("break", 20);
890
851
  case 17:
891
- _context17.t0.message = 'Your account has been disabled. Please contact our support.';
892
- return _context17.abrupt("break", 20);
852
+ _context16.t0.message = 'Your account has been disabled. Please contact our support.';
853
+ return _context16.abrupt("break", 20);
893
854
  case 19:
894
- return _context17.abrupt("break", 20);
855
+ return _context16.abrupt("break", 20);
895
856
  case 20:
896
- throw _context17.t0;
857
+ throw _context16.t0;
897
858
  case 21:
898
859
  case "end":
899
- return _context17.stop();
860
+ return _context16.stop();
900
861
  }
901
- }, _callee17, null, [[1, 8]]);
862
+ }, _callee16, null, [[1, 8]]);
902
863
  }));
903
- return function (_x19) {
904
- return _ref17.apply(this, arguments);
864
+ return function (_x18) {
865
+ return _ref16.apply(this, arguments);
905
866
  };
906
867
  }());
907
- _defineProperty(_assertThisInitialized(_this), "sendWelcomeEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
908
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
909
- while (1) switch (_context18.prev = _context18.next) {
868
+ _defineProperty(_assertThisInitialized(_this), "sendWelcomeEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
869
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
870
+ while (1) switch (_context17.prev = _context17.next) {
910
871
  case 0:
911
- _context18.prev = 0;
912
- _context18.next = 3;
872
+ _context17.prev = 0;
873
+ _context17.next = 3;
913
874
  return _Auth.default.sendWelcomeEmail();
914
875
  case 3:
915
- _context18.next = 8;
876
+ _context17.next = 8;
916
877
  break;
917
878
  case 5:
918
- _context18.prev = 5;
919
- _context18.t0 = _context18["catch"](0);
920
- console.log("Error sending welcome email: ".concat(_context18.t0));
879
+ _context17.prev = 5;
880
+ _context17.t0 = _context17["catch"](0);
881
+ console.log("Error sending welcome email: ".concat(_context17.t0));
921
882
  // No need to throw error, let the app continue even if it fails
922
883
  case 8:
923
884
  case "end":
924
- return _context18.stop();
885
+ return _context17.stop();
925
886
  }
926
- }, _callee18, null, [[0, 5]]);
887
+ }, _callee17, null, [[0, 5]]);
927
888
  })));
928
889
  _defineProperty(_assertThisInitialized(_this), "uploaProofOfAddress", /*#__PURE__*/function () {
929
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(data, ip) {
890
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(data, ip) {
930
891
  var user;
931
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
932
- while (1) switch (_context19.prev = _context19.next) {
892
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
893
+ while (1) switch (_context18.prev = _context18.next) {
933
894
  case 0:
934
- _context19.prev = 0;
935
- _context19.next = 3;
895
+ _context18.prev = 0;
896
+ _context18.next = 3;
936
897
  return _Auth.default.uploaProofOfAddress(data, ip);
937
898
  case 3:
938
- user = _context19.sent;
899
+ user = _context18.sent;
939
900
  _this.setUser(user);
940
- _context19.next = 11;
901
+ _context18.next = 11;
941
902
  break;
942
903
  case 7:
943
- _context19.prev = 7;
944
- _context19.t0 = _context19["catch"](0);
945
- console.log("Error uploading proof of address: ".concat(_context19.t0));
946
- throw _context19.t0;
904
+ _context18.prev = 7;
905
+ _context18.t0 = _context18["catch"](0);
906
+ console.log("Error uploading proof of address: ".concat(_context18.t0));
907
+ throw _context18.t0;
947
908
  case 11:
948
909
  case "end":
949
- return _context19.stop();
910
+ return _context18.stop();
950
911
  }
951
- }, _callee19, null, [[0, 7]]);
912
+ }, _callee18, null, [[0, 7]]);
952
913
  }));
953
- return function (_x20, _x21) {
954
- return _ref19.apply(this, arguments);
914
+ return function (_x19, _x20) {
915
+ return _ref18.apply(this, arguments);
955
916
  };
956
917
  }());
957
918
  _defineProperty(_assertThisInitialized(_this), "validateGreenWalletId", /*#__PURE__*/function () {
958
- var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(id) {
959
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
960
- while (1) switch (_context20.prev = _context20.next) {
919
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(id) {
920
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
921
+ while (1) switch (_context19.prev = _context19.next) {
961
922
  case 0:
962
- _context20.prev = 0;
963
- _context20.next = 3;
923
+ _context19.prev = 0;
924
+ _context19.next = 3;
964
925
  return _Auth.default.validateGreenWalletId(id);
965
926
  case 3:
966
- return _context20.abrupt("return", _context20.sent);
927
+ return _context19.abrupt("return", _context19.sent);
967
928
  case 6:
968
- _context20.prev = 6;
969
- _context20.t0 = _context20["catch"](0);
970
- console.log("Error validating Green Wallet ID: ".concat(_context20.t0));
971
- throw _context20.t0;
929
+ _context19.prev = 6;
930
+ _context19.t0 = _context19["catch"](0);
931
+ console.log("Error validating Green Wallet ID: ".concat(_context19.t0));
932
+ throw _context19.t0;
972
933
  case 10:
973
934
  case "end":
974
- return _context20.stop();
935
+ return _context19.stop();
975
936
  }
976
- }, _callee20, null, [[0, 6]]);
937
+ }, _callee19, null, [[0, 6]]);
977
938
  }));
978
- return function (_x22) {
979
- return _ref20.apply(this, arguments);
939
+ return function (_x21) {
940
+ return _ref19.apply(this, arguments);
980
941
  };
981
942
  }());
982
943
  _defineProperty(_assertThisInitialized(_this), "createWallet", /*#__PURE__*/function () {
983
- var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(data) {
944
+ var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(data) {
984
945
  var wallet;
985
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
986
- while (1) switch (_context21.prev = _context21.next) {
946
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
947
+ while (1) switch (_context20.prev = _context20.next) {
987
948
  case 0:
988
- _context21.prev = 0;
989
- _context21.next = 3;
949
+ _context20.prev = 0;
950
+ _context20.next = 3;
990
951
  return _Auth.default.createWallet(data);
991
952
  case 3:
992
- wallet = _context21.sent;
993
- return _context21.abrupt("return", wallet);
953
+ wallet = _context20.sent;
954
+ return _context20.abrupt("return", wallet);
994
955
  case 7:
995
- _context21.prev = 7;
996
- _context21.t0 = _context21["catch"](0);
997
- console.log("Error creating wallet: ".concat(_context21.t0));
998
- throw _context21.t0;
956
+ _context20.prev = 7;
957
+ _context20.t0 = _context20["catch"](0);
958
+ console.log("Error creating wallet: ".concat(_context20.t0));
959
+ throw _context20.t0;
999
960
  case 11:
1000
961
  case "end":
1001
- return _context21.stop();
962
+ return _context20.stop();
1002
963
  }
1003
- }, _callee21, null, [[0, 7]]);
964
+ }, _callee20, null, [[0, 7]]);
1004
965
  }));
1005
- return function (_x23) {
1006
- return _ref21.apply(this, arguments);
966
+ return function (_x22) {
967
+ return _ref20.apply(this, arguments);
1007
968
  };
1008
969
  }());
1009
970
  _defineProperty(_assertThisInitialized(_this), "setUser", function (user) {
@@ -1015,12 +976,12 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
1015
976
  });
1016
977
  });
1017
978
  _defineProperty(_assertThisInitialized(_this), "fetchLastTime", /*#__PURE__*/function () {
1018
- var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(projectName, page, userId) {
979
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(projectName, page, userId) {
1019
980
  var filterBody, response;
1020
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1021
- while (1) switch (_context22.prev = _context22.next) {
981
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
982
+ while (1) switch (_context21.prev = _context21.next) {
1022
983
  case 0:
1023
- _context22.prev = 0;
984
+ _context21.prev = 0;
1024
985
  filterBody = {
1025
986
  projectName: projectName,
1026
987
  page: page
@@ -1028,25 +989,25 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
1028
989
  if (userId) {
1029
990
  filterBody.userId = userId;
1030
991
  }
1031
- _context22.next = 5;
992
+ _context21.next = 5;
1032
993
  return _Auth.default.fetchTrackingUserLastTime({
1033
994
  filter: filterBody
1034
995
  });
1035
996
  case 5:
1036
- response = _context22.sent;
1037
- return _context22.abrupt("return", response);
997
+ response = _context21.sent;
998
+ return _context21.abrupt("return", response);
1038
999
  case 9:
1039
- _context22.prev = 9;
1040
- _context22.t0 = _context22["catch"](0);
1041
- console.log(' error', _context22.t0);
1000
+ _context21.prev = 9;
1001
+ _context21.t0 = _context21["catch"](0);
1002
+ console.log(' error', _context21.t0);
1042
1003
  case 12:
1043
1004
  case "end":
1044
- return _context22.stop();
1005
+ return _context21.stop();
1045
1006
  }
1046
- }, _callee22, null, [[0, 9]]);
1007
+ }, _callee21, null, [[0, 9]]);
1047
1008
  }));
1048
- return function (_x24, _x25, _x26) {
1049
- return _ref22.apply(this, arguments);
1009
+ return function (_x23, _x24, _x25) {
1010
+ return _ref21.apply(this, arguments);
1050
1011
  };
1051
1012
  }());
1052
1013
  return _this;
@@ -1098,7 +1059,6 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
1098
1059
  updateFirebaseUser: _Auth.default.updateFirebaseUser,
1099
1060
  handleResetPassword: this.handleResetPassword,
1100
1061
  handleVerifyEmail: this.handleVerifyEmail,
1101
- checkActivationLinkExpired: this.checkActivationLinkExpired,
1102
1062
  setUser: this.setUser,
1103
1063
  refreshIdToken: _Auth.default.refreshIdToken
1104
1064
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.41-beta.2",
3
+ "version": "2.3.41-beta.20",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",