@stokr/components-library 2.3.17 → 2.3.19

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.
@@ -83,6 +83,7 @@ function ReactTable(props) {
83
83
  withSubTable = props.withSubTable,
84
84
  isSubTable = props.isSubTable,
85
85
  customTdStyles = props.customTdStyles,
86
+ customThStyles = props.customThStyles,
86
87
  calculateSubData = props.calculateSubData;
87
88
 
88
89
  // Use the state and functions returned from useTable to build UI
@@ -107,8 +108,10 @@ function ReactTable(props) {
107
108
  pageSize = _useTable$state.pageSize;
108
109
  return /*#__PURE__*/_react.default.createElement(_Table.Styles, null, /*#__PURE__*/_react.default.createElement(_Table.TableWrap, null, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable, getTableProps(), /*#__PURE__*/_react.default.createElement("thead", null, headerGroups.map(function (headerGroup) {
109
110
  return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Tr, headerGroup.getHeaderGroupProps(), headerGroup.headers.map(function (column) {
111
+ var cellStyles = customThStyles ? customThStyles(column) : {};
110
112
  return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Th, _extends({}, column.getHeaderProps({
111
- className: column.collapse ? 'collapse' : ''
113
+ className: column.collapse ? 'collapse' : '',
114
+ style: _objectSpread({}, cellStyles)
112
115
  }), {
113
116
  blue: blue
114
117
  }), column.render('Header'));
@@ -54,6 +54,13 @@ var customTdStyles = function customTdStyles(index, row) {
54
54
  return {}; // default style
55
55
  };
56
56
 
57
+ // Custom styling function
58
+ var customThStyles = function customThStyles(column) {
59
+ return {
60
+ backgroundColor: 'lightblue'
61
+ }; // default style
62
+ };
63
+
57
64
  var Template = function Template(args) {
58
65
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTable.ReactTable, args));
59
66
  };
@@ -68,7 +75,8 @@ var WithCustomStyling = function WithCustomStyling() {
68
75
  return /*#__PURE__*/_react.default.createElement(Template, {
69
76
  columns: columns,
70
77
  data: data,
71
- customTdStyles: customTdStyles
78
+ customTdStyles: customTdStyles,
79
+ customThStyles: customThStyles
72
80
  });
73
81
  };
74
82
  exports.WithCustomStyling = WithCustomStyling;
@@ -253,19 +253,24 @@ var Header = function Header(_ref3) {
253
253
  }, /*#__PURE__*/_react.default.createElement(_Header.Logo, {
254
254
  isHighlight: currentActiveMenu === 'main'
255
255
  }, /*#__PURE__*/_react.default.createElement("a", {
256
- href: _globalVariables.platformURL
256
+ href: _globalVariables.platformURL,
257
+ "data-cy": "logo-nav-link"
257
258
  }, /*#__PURE__*/_react.default.createElement(_SvgIcons.LogoSvg, null))), !progress && /*#__PURE__*/_react.default.createElement(_Header.HeaderMainNav, null, /*#__PURE__*/_react.default.createElement(_MenuNav.default, null, /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
258
- href: newPlatformUrl + '/featured-assets'
259
+ href: newPlatformUrl + '/featured-assets',
260
+ "data-cy": "invest-nav-link"
259
261
  }, "Invest")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
260
262
  onClick: function onClick() {
261
263
  return toggleMenu('products');
262
- }
264
+ },
265
+ "data-cy": "products-nav-link"
263
266
  }, "Products")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
264
267
  onClick: function onClick() {
265
268
  return toggleMenu('media');
266
- }
269
+ },
270
+ "data-cy": "media-nav-link"
267
271
  }, "Media")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
268
- href: newPlatformUrl + '/team'
272
+ href: newPlatformUrl + '/team',
273
+ "data-cy": "team-nav-link"
269
274
  }, "Team")))))), progress && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, signupFlow ? /*#__PURE__*/_react.default.createElement(_StepsProgress.StepsProgressSignup, {
270
275
  user: user
271
276
  }) : /*#__PURE__*/_react.default.createElement(_Header.ProgressWrap, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.StepsProgressHeader, {
@@ -292,7 +297,8 @@ var Header = function Header(_ref3) {
292
297
  }, /*#__PURE__*/_react.default.createElement(_breakdown.default, null, /*#__PURE__*/_react.default.createElement(_Header.LoginButton, {
293
298
  onClick: function onClick() {
294
299
  isAdmin ? window.location.href = 'https://admin.' + _globalVariables.platformDomain : window.location.href = "".concat(newPlatformUrlForUserMenu, "/overview");
295
- }
300
+ },
301
+ "data-cy": "dashboard-nav-link"
296
302
  }, "Dashboard")), /*#__PURE__*/_react.default.createElement(_Header.UserAccount, null, /*#__PURE__*/_react.default.createElement(_Header.UserButton, {
297
303
  onClick: function onClick() {
298
304
  return toggleMenu('main');
@@ -302,9 +308,11 @@ var Header = function Header(_ref3) {
302
308
  })), (0, _checkTodoStatus.default)(user) > 0 && /*#__PURE__*/_react.default.createElement(_NotificationCounter.default, {
303
309
  avatar: true
304
310
  }, (0, _checkTodoStatus.default)(user))))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, withoutLoginSignupButton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_breakdown.default, null, /*#__PURE__*/_react.default.createElement(_Header.LoginButton, {
305
- onClick: onLoginClick
311
+ onClick: onLoginClick,
312
+ "data-cy": "login-nav-button"
306
313
  }, "Log in")), /*#__PURE__*/_react.default.createElement(_Header.SignupButton, {
307
- onClick: onSignUpClick
314
+ onClick: onSignUpClick,
315
+ "data-cy": "signup-nav-button"
308
316
  }, "Sign Up")))))), /*#__PURE__*/_react.default.createElement(_Header.MobileMenu, {
309
317
  isActive: currentActiveMenu === 'main',
310
318
  withSidebar: withSidebar
@@ -313,7 +321,8 @@ var Header = function Header(_ref3) {
313
321
  }, /*#__PURE__*/_react.default.createElement(_MenuNav.default, {
314
322
  mobile: true
315
323
  }, /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement("a", {
316
- href: newPlatformUrl + '/featured-assets'
324
+ href: newPlatformUrl + '/featured-assets',
325
+ "data-cy": "invest-nav-link"
317
326
  }, "Invest")), /*#__PURE__*/_react.default.createElement(RenderSubMenu, {
318
327
  title: "products",
319
328
  isActive: currentActiveSubMenu === 'products',
@@ -61,7 +61,7 @@ exports.SubscribeInputBox = SubscribeInputBox;
61
61
  var SubscribeInput = _styledComponents.default.input.withConfig({
62
62
  displayName: "Newsletterstyles__SubscribeInput",
63
63
  componentId: "sc-53m39a-5"
64
- })(["text-transform:initial;letter-spacing:2.1px;font-size:11px;white-space:nowrap;line-height:2.18;color:white;font-weight:400;flex:1 0 auto;margin-right:56px;padding:8px 0;background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,0.2);outline:none;", " &::-webkit-input-placeholder{color:white;text-transform:uppercase;}&::-moz-placeholder{color:white;text-transform:uppercase;}&::placeholder{color:white;text-transform:uppercase;}"], _rwd.rwdMax.MLarge(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-right: 0;\n display: block;\n width: 100%;\n margin-bottom: 36px;\n "]))));
64
+ })(["text-transform:initial;letter-spacing:2.1px;font-size:11px;white-space:nowrap;line-height:2.18;color:white;font-weight:400;flex:1 0 auto;margin-right:56px;padding:8px 0;background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,0.2);outline:none;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:white !important;-webkit-box-shadow:0 0 0 30px ", " inset !important;transition:background-color 5000s ease-in-out 0s;caret-color:white !important;}", " &::-webkit-input-placeholder{color:white;text-transform:uppercase;}&::-moz-placeholder{color:white;text-transform:uppercase;}&::placeholder{color:white;text-transform:uppercase;}"], sc.RED_BASE_HEX, _rwd.rwdMax.MLarge(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-right: 0;\n display: block;\n width: 100%;\n margin-bottom: 36px;\n "]))));
65
65
  exports.SubscribeInput = SubscribeInput;
66
66
  var SubscribeInputError = _styledComponents.default.p.withConfig({
67
67
  displayName: "Newsletterstyles__SubscribeInputError",
@@ -79,5 +79,5 @@ exports.SubscribeSubmit = SubscribeSubmit;
79
79
  var SubscribeForm = _styledComponents.default.form.withConfig({
80
80
  displayName: "Newsletterstyles__SubscribeForm",
81
81
  componentId: "sc-53m39a-8"
82
- })(["display:flex;", ""], _rwd.rwdMax.MLarge(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: block;\n "]))));
82
+ })(["display:flex;", ""], _rwd.rwdMax.MLarge(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral([" display: block;\n "]))));
83
83
  exports.SubscribeForm = SubscribeForm;
@@ -10,22 +10,27 @@ var _Modal = require("../Modal/Modal");
10
10
  var _registerTaxid = _interopRequireDefault(require("./register-taxid"));
11
11
  var _ComponentScroll = _interopRequireDefault(require("../ComponentScroll/ComponentScroll"));
12
12
  var _complete = _interopRequireDefault(require("./complete"));
13
+ var _excluded = ["showFlow", "setShowFlow", "showBackButton", "showSkipButton", "redirectUrl", "onComplete"];
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
15
  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); }
15
16
  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; }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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 _extends.apply(this, arguments); }
16
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
19
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18
20
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
21
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
20
22
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
21
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
26
  var RegisterTaxIdFlow = function RegisterTaxIdFlow(_ref) {
23
27
  var showFlow = _ref.showFlow,
24
28
  setShowFlow = _ref.setShowFlow,
25
29
  showBackButton = _ref.showBackButton,
26
30
  showSkipButton = _ref.showSkipButton,
27
31
  redirectUrl = _ref.redirectUrl,
28
- onComplete = _ref.onComplete;
32
+ onComplete = _ref.onComplete,
33
+ props = _objectWithoutProperties(_ref, _excluded);
29
34
  var _useState = (0, _react.useState)(false),
30
35
  _useState2 = _slicedToArray(_useState, 2),
31
36
  showComplete = _useState2[0],
@@ -60,13 +65,13 @@ var RegisterTaxIdFlow = function RegisterTaxIdFlow(_ref) {
60
65
  setShowComplete(false);
61
66
  setShowFlow(false);
62
67
  }
63
- }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_registerTaxid.default, {
68
+ }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_registerTaxid.default, _extends({
64
69
  setShowComplete: setShowComplete,
65
70
  showBackButton: showBackButton,
66
71
  showSkipButton: showSkipButton,
67
72
  scrollRef: scrollRef,
68
73
  redirectUrl: redirectUrl
69
- })))));
74
+ }, props))))));
70
75
  };
71
76
  var _default = RegisterTaxIdFlow;
72
77
  exports.default = _default;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
8
  var _react = _interopRequireWildcard(require("react"));
10
9
  var _reactRouterDom = require("react-router-dom");
11
10
  var _AuthContext = require("../../context/AuthContext");
@@ -25,10 +24,9 @@ var _RefreshButton = _interopRequireDefault(require("../RefreshButton/RefreshBut
25
24
  var _SectionTitle = _interopRequireDefault(require("../SectionTitle/SectionTitle.styles"));
26
25
  var _FAQ = _interopRequireDefault(require("../FAQ/FAQ"));
27
26
  var _deleteRedirectCookieAndNavigate = _interopRequireDefault(require("../../utils/delete-redirect-cookie-and-navigate"));
28
- var _colors = _interopRequireDefault(require("../../styles/colors"));
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
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); }
30
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; }
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
30
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
33
31
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
34
32
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -38,10 +36,6 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
38
36
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39
37
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
40
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
- var LiquidDescription = _styledComponents.default.div.withConfig({
42
- displayName: "register-taxid__LiquidDescription",
43
- componentId: "sc-104ll31-0"
44
- })(["li{font-size:20px !important;line-height:1.5em;img{vertical-align:middle;padding-bottom:2px;}}"]);
45
39
  var RegisterTaxId = function RegisterTaxId(_ref) {
46
40
  var _ref$setShowComplete = _ref.setShowComplete,
47
41
  setShowComplete = _ref$setShowComplete === void 0 ? function () {} : _ref$setShowComplete,
@@ -49,7 +43,26 @@ var RegisterTaxId = function RegisterTaxId(_ref) {
49
43
  showSkipButton = _ref.showSkipButton,
50
44
  scrollRef = _ref.scrollRef,
51
45
  redirectUrl = _ref.redirectUrl,
52
- onContinueClick = _ref.onContinueClick;
46
+ onContinueClick = _ref.onContinueClick,
47
+ _ref$additionalTextHe = _ref.additionalTextHeader,
48
+ additionalTextHeader = _ref$additionalTextHe === void 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null) : _ref$additionalTextHe,
49
+ _ref$backButtonText = _ref.backButtonText,
50
+ backButtonText = _ref$backButtonText === void 0 ? "Back to verify identity" : _ref$backButtonText,
51
+ _ref$textHeader = _ref.textHeader,
52
+ textHeader = _ref$textHeader === void 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h1", null, "Provide your tax id"), /*#__PURE__*/_react.default.createElement("p", null, "Some offers require you to provide your Tax ID before being able to invest in.")) : _ref$textHeader,
53
+ _ref$textFieldLabel = _ref.textFieldLabel,
54
+ textFieldLabel = _ref$textFieldLabel === void 0 ? "enter your tax id" : _ref$textFieldLabel,
55
+ _ref$faqItems = _ref.faqItems,
56
+ faqItems = _ref$faqItems === void 0 ? [{
57
+ title: 'Why do I need to provide my Tax ID?',
58
+ content: "We ask for the Tax ID when an offering may fall under speciific reporting requirements. For example the Common Reporting Standard requires investors to provide more information on their tax status."
59
+ }, {
60
+ title: 'How will my information be used?',
61
+ content: "Your tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
62
+ }, {
63
+ title: "What if I'd like to do this later?",
64
+ content: 'You can always skip this step and complete it at a later point in time. However, you will not be able to invest before doing so and being verified.'
65
+ }] : _ref$faqItems;
53
66
  var navigate = (0, _reactRouterDom.useNavigate)();
54
67
  var _useContext = (0, _react.useContext)(_AuthContext.AuthContext),
55
68
  _useContext$user = _useContext.user,
@@ -109,15 +122,11 @@ var RegisterTaxId = function RegisterTaxId(_ref) {
109
122
  onClick: function onClick() {
110
123
  return navigate('/verify-identity');
111
124
  }
112
- }, "Back to verify identity")) : /*#__PURE__*/_react.default.createElement("div", {
125
+ }, backButtonText)) : /*#__PURE__*/_react.default.createElement("div", {
113
126
  style: {
114
127
  height: 14
115
128
  }
116
- }), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("h1", null, "Provide your tax id"), /*#__PURE__*/_react.default.createElement("p", null, "Some offers require you to provide your Tax ID before being able to invest in."), !taxId && /*#__PURE__*/_react.default.createElement("p", {
117
- style: {
118
- color: _colors.default.orangishRed
119
- }
120
- }, "Providing your tax ID is not required for your KPMG donation."))), taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
129
+ }), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, textHeader && textHeader, additionalTextHeader && additionalTextHeader)), taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
121
130
  noPaddingTop: true
122
131
  }, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("p", null, "You have successfully submitted your Tax ID information."))), !isUpdatingUser && !error && !taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
123
132
  noPaddingVertical: true
@@ -138,7 +147,7 @@ var RegisterTaxId = function RegisterTaxId(_ref) {
138
147
  id: "tax-id",
139
148
  name: "taxId",
140
149
  type: "input",
141
- label: "enter your tax id",
150
+ label: textFieldLabel,
142
151
  value: values.taxId,
143
152
  onChange: handleChange,
144
153
  onBlur: handleBlur,
@@ -191,16 +200,7 @@ var RegisterTaxId = function RegisterTaxId(_ref) {
191
200
  noPaddingBottom: true
192
201
  }, /*#__PURE__*/_react.default.createElement(_SectionTitle.default, null, "Frequently Asked Questions")), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_FAQ.default, {
193
202
  scrollRef: scrollRef,
194
- items: [{
195
- title: 'Why do I need to provide my Tax ID?',
196
- content: "We ask for the Tax ID when an offering may fall under speciific reporting requirements. For example the Common Reporting Standard requires investors to provide more information on their tax status."
197
- }, {
198
- title: 'How will my information be used?',
199
- content: "Your tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
200
- }, {
201
- title: "What if I'd like to do this later?",
202
- content: 'You can always skip this step and complete it at a later point in time. However, you will not be able to invest before doing so and being verified.'
203
- }]
203
+ items: faqItems
204
204
  })));
205
205
  };
206
206
  var _default = RegisterTaxId;
@@ -657,76 +657,123 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
657
657
  return _ref12.apply(this, arguments);
658
658
  };
659
659
  }());
660
+ _defineProperty(_assertThisInitialized(_this), "checkPrivateInvestorAll", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
661
+ var user,
662
+ returnData,
663
+ _yield$Auth$checkPriv,
664
+ list,
665
+ userCopy,
666
+ _args13 = arguments;
667
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
668
+ while (1) switch (_context13.prev = _context13.next) {
669
+ case 0:
670
+ user = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : _this.state.user;
671
+ returnData = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : false;
672
+ _context13.prev = 2;
673
+ _context13.next = 5;
674
+ return _Auth.default.checkPrivateInvestor();
675
+ case 5:
676
+ _yield$Auth$checkPriv = _context13.sent;
677
+ list = _yield$Auth$checkPriv.list;
678
+ if (!list) {
679
+ _context13.next = 15;
680
+ break;
681
+ }
682
+ userCopy = _objectSpread({}, user);
683
+ userCopy.privateInvestorProjects = list;
684
+ if (!returnData) {
685
+ _context13.next = 14;
686
+ break;
687
+ }
688
+ return _context13.abrupt("return", userCopy);
689
+ case 14:
690
+ _this.setState({
691
+ user: userCopy
692
+ });
693
+ case 15:
694
+ _context13.next = 21;
695
+ break;
696
+ case 17:
697
+ _context13.prev = 17;
698
+ _context13.t0 = _context13["catch"](2);
699
+ console.log('🚀 ~ error in checkPrivateInvestorAll', _context13.t0);
700
+ throw _context13.t0;
701
+ case 21:
702
+ case "end":
703
+ return _context13.stop();
704
+ }
705
+ }, _callee13, null, [[2, 17]]);
706
+ })));
660
707
  _defineProperty(_assertThisInitialized(_this), "checkIfUserSubscribed", /*#__PURE__*/function () {
661
- var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(project) {
708
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(project) {
662
709
  var user,
663
710
  returnData,
664
711
  dataToSend,
665
712
  isSubscribed,
666
713
  userCopy,
667
- _args13 = arguments;
668
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
669
- while (1) switch (_context13.prev = _context13.next) {
714
+ _args14 = arguments;
715
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
716
+ while (1) switch (_context14.prev = _context14.next) {
670
717
  case 0:
671
- user = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : _this.state.user;
672
- returnData = _args13.length > 2 && _args13[2] !== undefined ? _args13[2] : false;
718
+ user = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : _this.state.user;
719
+ returnData = _args14.length > 2 && _args14[2] !== undefined ? _args14[2] : false;
673
720
  if (!(!user || !project)) {
674
- _context13.next = 4;
721
+ _context14.next = 4;
675
722
  break;
676
723
  }
677
- return _context13.abrupt("return");
724
+ return _context14.abrupt("return");
678
725
  case 4:
679
- _context13.prev = 4;
726
+ _context14.prev = 4;
680
727
  dataToSend = {
681
728
  listName: project.name,
682
729
  email: user.email
683
730
  };
684
- _context13.next = 8;
731
+ _context14.next = 8;
685
732
  return _Auth.default.checkIfUserSubscribed(dataToSend);
686
733
  case 8:
687
- isSubscribed = _context13.sent;
734
+ isSubscribed = _context14.sent;
688
735
  userCopy = _objectSpread({}, user);
689
736
  userCopy.isSubscribed = isSubscribed;
690
737
  if (!returnData) {
691
- _context13.next = 15;
738
+ _context14.next = 15;
692
739
  break;
693
740
  }
694
- return _context13.abrupt("return", userCopy);
741
+ return _context14.abrupt("return", userCopy);
695
742
  case 15:
696
743
  _this.setState({
697
744
  user: userCopy
698
745
  });
699
746
  case 16:
700
- _context13.next = 22;
747
+ _context14.next = 22;
701
748
  break;
702
749
  case 18:
703
- _context13.prev = 18;
704
- _context13.t0 = _context13["catch"](4);
705
- console.log('🚀 ~ error in checkIfUserSubscribed', _context13.t0);
706
- throw _context13.t0;
750
+ _context14.prev = 18;
751
+ _context14.t0 = _context14["catch"](4);
752
+ console.log('🚀 ~ error in checkIfUserSubscribed', _context14.t0);
753
+ throw _context14.t0;
707
754
  case 22:
708
755
  case "end":
709
- return _context13.stop();
756
+ return _context14.stop();
710
757
  }
711
- }, _callee13, null, [[4, 18]]);
758
+ }, _callee14, null, [[4, 18]]);
712
759
  }));
713
760
  return function (_x17) {
714
- return _ref13.apply(this, arguments);
761
+ return _ref14.apply(this, arguments);
715
762
  };
716
763
  }());
717
- _defineProperty(_assertThisInitialized(_this), "handleVerifyEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
764
+ _defineProperty(_assertThisInitialized(_this), "handleVerifyEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
718
765
  var location, query, oobCode, customToken, email;
719
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
720
- while (1) switch (_context14.prev = _context14.next) {
766
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
767
+ while (1) switch (_context15.prev = _context15.next) {
721
768
  case 0:
722
769
  _this.setState({
723
770
  isVerifyingEmail: true
724
771
  });
725
772
  location = _this.props.location;
726
773
  query = new URLSearchParams(location.search);
727
- _context14.prev = 3;
774
+ _context15.prev = 3;
728
775
  oobCode = query.get('oobCode');
729
- _context14.next = 7;
776
+ _context15.next = 7;
730
777
  return _Auth.default.handleVerifyEmail(oobCode);
731
778
  case 7:
732
779
  _this.setState({
@@ -736,188 +783,188 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
736
783
  if (customToken) {
737
784
  _this.loginUser(null, null, customToken);
738
785
  }
739
- _context14.next = 28;
786
+ _context15.next = 28;
740
787
  break;
741
788
  case 12:
742
- _context14.prev = 12;
743
- _context14.t0 = _context14["catch"](3);
744
- _context14.t1 = _context14.t0 === null || _context14.t0 === void 0 ? void 0 : _context14.t0.code;
745
- _context14.next = _context14.t1 === 'auth/expired-action-code' ? 17 : _context14.t1 === 'auth/invalid-action-code' ? 21 : _context14.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;
746
793
  break;
747
794
  case 17:
748
- _context14.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.';
749
796
  email = query.get('email');
750
797
  if (email) {
751
- _context14.t0.email = email;
798
+ _context15.t0.email = email;
752
799
  //Auth.resendActivationEmail(email)
753
800
  }
754
- return _context14.abrupt("break", 26);
801
+ return _context15.abrupt("break", 26);
755
802
  case 21:
756
- _context14.t0.message = 'This link is invalid. Please try verifying email again.';
757
- return _context14.abrupt("break", 26);
803
+ _context15.t0.message = 'This link is invalid. Please try verifying email again.';
804
+ return _context15.abrupt("break", 26);
758
805
  case 23:
759
- _context14.t0.message = 'Your account has been disabled. Please contact our support.';
760
- return _context14.abrupt("break", 26);
806
+ _context15.t0.message = 'Your account has been disabled. Please contact our support.';
807
+ return _context15.abrupt("break", 26);
761
808
  case 25:
762
- return _context14.abrupt("break", 26);
809
+ return _context15.abrupt("break", 26);
763
810
  case 26:
764
- console.log('🚀 ~ file: AuthContext.js:446 ~ error:', _context14.t0);
811
+ console.log('🚀 ~ file: AuthContext.js:446 ~ error:', _context15.t0);
765
812
  _this.setState({
766
- verifyEmailError: _context14.t0,
813
+ verifyEmailError: _context15.t0,
767
814
  isVerifyingEmail: false,
768
815
  isFetchingUser: false
769
816
  });
770
817
  //throw error
771
818
  case 28:
772
819
  case "end":
773
- return _context14.stop();
820
+ return _context15.stop();
774
821
  }
775
- }, _callee14, null, [[3, 12]]);
822
+ }, _callee15, null, [[3, 12]]);
776
823
  })));
777
824
  _defineProperty(_assertThisInitialized(_this), "handleResetPassword", /*#__PURE__*/function () {
778
- var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(password) {
825
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(password) {
779
826
  var location, query, oobCode;
780
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
781
- while (1) switch (_context15.prev = _context15.next) {
827
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
828
+ while (1) switch (_context16.prev = _context16.next) {
782
829
  case 0:
783
830
  location = _this.props.location;
784
- _context15.prev = 1;
831
+ _context16.prev = 1;
785
832
  query = new URLSearchParams(location.search);
786
833
  oobCode = query.get('oobCode');
787
- _context15.next = 6;
834
+ _context16.next = 6;
788
835
  return _Auth.default.handleResetPassword(oobCode, password);
789
836
  case 6:
790
- _context15.next = 21;
837
+ _context16.next = 21;
791
838
  break;
792
839
  case 8:
793
- _context15.prev = 8;
794
- _context15.t0 = _context15["catch"](1);
795
- _context15.t1 = _context15.t0 === null || _context15.t0 === void 0 ? void 0 : _context15.t0.code;
796
- _context15.next = _context15.t1 === 'auth/expired-action-code' ? 13 : _context15.t1 === 'auth/invalid-action-code' ? 15 : _context15.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;
797
844
  break;
798
845
  case 13:
799
- _context15.t0.message = 'This link has expired. Please try reseting password again.';
800
- return _context15.abrupt("break", 20);
846
+ _context16.t0.message = 'This link has expired. Please try reseting password again.';
847
+ return _context16.abrupt("break", 20);
801
848
  case 15:
802
- _context15.t0.message = 'This link is invalid. Please try reseting password again.';
803
- return _context15.abrupt("break", 20);
849
+ _context16.t0.message = 'This link is invalid. Please try reseting password again.';
850
+ return _context16.abrupt("break", 20);
804
851
  case 17:
805
- _context15.t0.message = 'Your account has been disabled. Please contact our support.';
806
- return _context15.abrupt("break", 20);
852
+ _context16.t0.message = 'Your account has been disabled. Please contact our support.';
853
+ return _context16.abrupt("break", 20);
807
854
  case 19:
808
- return _context15.abrupt("break", 20);
855
+ return _context16.abrupt("break", 20);
809
856
  case 20:
810
- throw _context15.t0;
857
+ throw _context16.t0;
811
858
  case 21:
812
859
  case "end":
813
- return _context15.stop();
860
+ return _context16.stop();
814
861
  }
815
- }, _callee15, null, [[1, 8]]);
862
+ }, _callee16, null, [[1, 8]]);
816
863
  }));
817
864
  return function (_x18) {
818
- return _ref15.apply(this, arguments);
865
+ return _ref16.apply(this, arguments);
819
866
  };
820
867
  }());
821
- _defineProperty(_assertThisInitialized(_this), "sendWelcomeEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
822
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
823
- while (1) switch (_context16.prev = _context16.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) {
824
871
  case 0:
825
- _context16.prev = 0;
826
- _context16.next = 3;
872
+ _context17.prev = 0;
873
+ _context17.next = 3;
827
874
  return _Auth.default.sendWelcomeEmail();
828
875
  case 3:
829
- _context16.next = 8;
876
+ _context17.next = 8;
830
877
  break;
831
878
  case 5:
832
- _context16.prev = 5;
833
- _context16.t0 = _context16["catch"](0);
834
- console.log("Error sending welcome email: ".concat(_context16.t0));
879
+ _context17.prev = 5;
880
+ _context17.t0 = _context17["catch"](0);
881
+ console.log("Error sending welcome email: ".concat(_context17.t0));
835
882
  // No need to throw error, let the app continue even if it fails
836
883
  case 8:
837
884
  case "end":
838
- return _context16.stop();
885
+ return _context17.stop();
839
886
  }
840
- }, _callee16, null, [[0, 5]]);
887
+ }, _callee17, null, [[0, 5]]);
841
888
  })));
842
889
  _defineProperty(_assertThisInitialized(_this), "uploaProofOfAddress", /*#__PURE__*/function () {
843
- var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(data, ip) {
890
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(data, ip) {
844
891
  var user;
845
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
846
- while (1) switch (_context17.prev = _context17.next) {
892
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
893
+ while (1) switch (_context18.prev = _context18.next) {
847
894
  case 0:
848
- _context17.prev = 0;
849
- _context17.next = 3;
895
+ _context18.prev = 0;
896
+ _context18.next = 3;
850
897
  return _Auth.default.uploaProofOfAddress(data, ip);
851
898
  case 3:
852
- user = _context17.sent;
899
+ user = _context18.sent;
853
900
  _this.setUser(user);
854
- _context17.next = 11;
901
+ _context18.next = 11;
855
902
  break;
856
903
  case 7:
857
- _context17.prev = 7;
858
- _context17.t0 = _context17["catch"](0);
859
- console.log("Error uploading proof of address: ".concat(_context17.t0));
860
- throw _context17.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;
861
908
  case 11:
862
909
  case "end":
863
- return _context17.stop();
910
+ return _context18.stop();
864
911
  }
865
- }, _callee17, null, [[0, 7]]);
912
+ }, _callee18, null, [[0, 7]]);
866
913
  }));
867
914
  return function (_x19, _x20) {
868
- return _ref17.apply(this, arguments);
915
+ return _ref18.apply(this, arguments);
869
916
  };
870
917
  }());
871
918
  _defineProperty(_assertThisInitialized(_this), "validateGreenWalletId", /*#__PURE__*/function () {
872
- var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(id) {
873
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
874
- while (1) switch (_context18.prev = _context18.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) {
875
922
  case 0:
876
- _context18.prev = 0;
877
- _context18.next = 3;
923
+ _context19.prev = 0;
924
+ _context19.next = 3;
878
925
  return _Auth.default.validateGreenWalletId(id);
879
926
  case 3:
880
- return _context18.abrupt("return", _context18.sent);
927
+ return _context19.abrupt("return", _context19.sent);
881
928
  case 6:
882
- _context18.prev = 6;
883
- _context18.t0 = _context18["catch"](0);
884
- console.log("Error validating Green Wallet ID: ".concat(_context18.t0));
885
- throw _context18.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;
886
933
  case 10:
887
934
  case "end":
888
- return _context18.stop();
935
+ return _context19.stop();
889
936
  }
890
- }, _callee18, null, [[0, 6]]);
937
+ }, _callee19, null, [[0, 6]]);
891
938
  }));
892
939
  return function (_x21) {
893
- return _ref18.apply(this, arguments);
940
+ return _ref19.apply(this, arguments);
894
941
  };
895
942
  }());
896
943
  _defineProperty(_assertThisInitialized(_this), "createWallet", /*#__PURE__*/function () {
897
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(data) {
944
+ var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(data) {
898
945
  var wallet;
899
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
900
- while (1) switch (_context19.prev = _context19.next) {
946
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
947
+ while (1) switch (_context20.prev = _context20.next) {
901
948
  case 0:
902
- _context19.prev = 0;
903
- _context19.next = 3;
949
+ _context20.prev = 0;
950
+ _context20.next = 3;
904
951
  return _Auth.default.createWallet(data);
905
952
  case 3:
906
- wallet = _context19.sent;
907
- return _context19.abrupt("return", wallet);
953
+ wallet = _context20.sent;
954
+ return _context20.abrupt("return", wallet);
908
955
  case 7:
909
- _context19.prev = 7;
910
- _context19.t0 = _context19["catch"](0);
911
- console.log("Error creating wallet: ".concat(_context19.t0));
912
- throw _context19.t0;
956
+ _context20.prev = 7;
957
+ _context20.t0 = _context20["catch"](0);
958
+ console.log("Error creating wallet: ".concat(_context20.t0));
959
+ throw _context20.t0;
913
960
  case 11:
914
961
  case "end":
915
- return _context19.stop();
962
+ return _context20.stop();
916
963
  }
917
- }, _callee19, null, [[0, 7]]);
964
+ }, _callee20, null, [[0, 7]]);
918
965
  }));
919
966
  return function (_x22) {
920
- return _ref19.apply(this, arguments);
967
+ return _ref20.apply(this, arguments);
921
968
  };
922
969
  }());
923
970
  _defineProperty(_assertThisInitialized(_this), "setUser", function (user) {
@@ -929,12 +976,12 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
929
976
  });
930
977
  });
931
978
  _defineProperty(_assertThisInitialized(_this), "fetchLastTime", /*#__PURE__*/function () {
932
- var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(projectName, page, userId) {
979
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(projectName, page, userId) {
933
980
  var filterBody, response;
934
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
935
- while (1) switch (_context20.prev = _context20.next) {
981
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
982
+ while (1) switch (_context21.prev = _context21.next) {
936
983
  case 0:
937
- _context20.prev = 0;
984
+ _context21.prev = 0;
938
985
  filterBody = {
939
986
  projectName: projectName,
940
987
  page: page
@@ -942,25 +989,25 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
942
989
  if (userId) {
943
990
  filterBody.userId = userId;
944
991
  }
945
- _context20.next = 5;
992
+ _context21.next = 5;
946
993
  return _Auth.default.fetchTrackingUserLastTime({
947
994
  filter: filterBody
948
995
  });
949
996
  case 5:
950
- response = _context20.sent;
951
- return _context20.abrupt("return", response);
997
+ response = _context21.sent;
998
+ return _context21.abrupt("return", response);
952
999
  case 9:
953
- _context20.prev = 9;
954
- _context20.t0 = _context20["catch"](0);
955
- console.log(' error', _context20.t0);
1000
+ _context21.prev = 9;
1001
+ _context21.t0 = _context21["catch"](0);
1002
+ console.log(' error', _context21.t0);
956
1003
  case 12:
957
1004
  case "end":
958
- return _context20.stop();
1005
+ return _context21.stop();
959
1006
  }
960
- }, _callee20, null, [[0, 9]]);
1007
+ }, _callee21, null, [[0, 9]]);
961
1008
  }));
962
1009
  return function (_x23, _x24, _x25) {
963
- return _ref20.apply(this, arguments);
1010
+ return _ref21.apply(this, arguments);
964
1011
  };
965
1012
  }());
966
1013
  return _this;
@@ -998,6 +1045,7 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
998
1045
  getUser: this.getUser,
999
1046
  updateUser: this.updateUser,
1000
1047
  checkIfPrivateInvestor: this.checkIfPrivateInvestor,
1048
+ checkPrivateInvestorAll: this.checkPrivateInvestorAll,
1001
1049
  checkIfUserSubscribed: this.checkIfUserSubscribed,
1002
1050
  sendWelcomeEmail: this.sendWelcomeEmail,
1003
1051
  resendActivationEmail: _Auth.default.resendActivationEmail,
@@ -24,6 +24,7 @@ var formatCurrencyValue = function formatCurrencyValue(currency, value) {
24
24
  'btc-bfx': ['BTC', 8],
25
25
  euro: ['EUR', 2],
26
26
  usd: ['USD', 2],
27
+ chf: ['CHF', 2],
27
28
  lusdt: ['USDT', 2],
28
29
  'bitcoin-private': ['EUR', 2],
29
30
  'lbtc-private': ['BTC', 8],
@@ -40,6 +41,7 @@ var getCurrencySymbol = function getCurrencySymbol(currencySelected) {
40
41
  euro: '€',
41
42
  usd: '$',
42
43
  ether: 'ETH',
44
+ chf: 'CHF',
43
45
  tether: 'USDT',
44
46
  bitcoin: 'BTC',
45
47
  lbtc: 'LBTC',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.17",
3
+ "version": "2.3.19",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",