@stokr/components-library 2.3.13 → 2.3.15

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.
@@ -106,63 +106,36 @@ var UserChecklist = function UserChecklist(props) {
106
106
  return wallet.type === _globalVariables.walletTypes.LIQUID;
107
107
  }) || [];
108
108
  var platformURL = useRelativePath === true ? '' : "https://signup.".concat(_globalVariables.platformDomain);
109
- if (entity_name) {
110
- setmandatoryTasks([{
111
- title: 'Verify Identity',
112
- message: 'You will be contacted by our compliance team dedicated to legal entities.',
113
- state: _ToDoList.ToDoTaskState.APPROVED
114
- // link: '',
115
- }, {
116
- title: 'Risk Questionnaire',
117
- message: is_risk_questionnaire_finished ? 'You have read and understood the risks' : 'Read the risks, tick the boxes, ta-da!',
118
- state: is_risk_questionnaire_finished ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
119
- link: "".concat(platformURL, "/risk-questionnaire")
120
- }]);
121
- setwalletTasks([{
122
- title: 'Liquid Address',
123
- message: liquidWallets.length > 0 ? 'Your address is registered' : 'Register a Liquid address where you will receive the securities',
124
- state: liquidWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
125
- link: "".concat(platformURL, "/register-liquid-securities")
126
- }]);
127
- setoptionalTasks([{
128
- title: 'Tax ID',
129
- message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
130
- state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
131
- openModal: _ToDoList.ToDoModal.TAX_ID,
132
- tooltip: "Some offers require you to provide your Tax ID before being able to invest.\n\nYour tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
133
- }]);
134
- } else {
135
- setmandatoryTasks([{
136
- title: 'Country of Residence',
137
- message: !country ? 'Please select your country of residence' : !isFromAllowedCountry ? 'STOKR is not yet available where you live' : 'Your country of residence has been registered',
138
- state: !country ? _ToDoList.ToDoTaskState.SKIPPED : !isFromAllowedCountry ? _ToDoList.ToDoTaskState.DENIED : _ToDoList.ToDoTaskState.APPROVED,
139
- link: "".concat(platformURL, "/country-of-residence")
140
- }, {
141
- title: 'Verify Identity',
142
- message: getVerifyIdentityChecklist(isFromAllowedCountry, user).message,
143
- state: getVerifyIdentityChecklist(isFromAllowedCountry, user).state,
144
- link: getVerifyIdentityChecklist(isFromAllowedCountry, user).hasLink && "".concat(platformURL, "/verify-identity")
145
- }, {
146
- title: 'Risk Questionnaire',
147
- message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : is_risk_questionnaire_finished ? 'You have read and understood the risks' : 'Read the risks, tick the boxes, ta-da!',
148
- state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : is_risk_questionnaire_finished ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
149
- link: isFromAllowedCountry && "".concat(platformURL, "/risk-questionnaire")
150
- }]);
151
- setwalletTasks([{
152
- title: 'Liquid Address',
153
- message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : liquidWallets.length > 0 ? 'Your address is registered' : 'Register a Liquid address where you will receive the securities',
154
- state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : liquidWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
155
- link: isFromAllowedCountry && "".concat(platformURL, "/register-liquid-securities")
156
- }]);
157
- var optionalTasks = [{
158
- title: 'Tax ID',
159
- message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
160
- state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
161
- openModal: _ToDoList.ToDoModal.TAX_ID,
162
- tooltip: "Some offers require you to provide your Tax ID before being able to invest.\n\nYour tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
163
- }];
164
- setoptionalTasks(optionalTasks);
165
- }
109
+ setmandatoryTasks([{
110
+ title: 'Country of Residence',
111
+ message: !country ? 'Please select your country of residence' : !isFromAllowedCountry ? 'STOKR is not yet available where you live' : 'Your country of residence has been registered',
112
+ state: !country ? _ToDoList.ToDoTaskState.SKIPPED : !isFromAllowedCountry ? _ToDoList.ToDoTaskState.DENIED : _ToDoList.ToDoTaskState.APPROVED,
113
+ link: "".concat(platformURL, "/country-of-residence")
114
+ }, {
115
+ title: 'Verify Identity',
116
+ message: getVerifyIdentityChecklist(isFromAllowedCountry, user).message,
117
+ state: getVerifyIdentityChecklist(isFromAllowedCountry, user).state,
118
+ link: getVerifyIdentityChecklist(isFromAllowedCountry, user).hasLink && "".concat(platformURL, "/verify-identity")
119
+ }, {
120
+ title: 'Risk Questionnaire',
121
+ message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : is_risk_questionnaire_finished ? 'You have read and understood the risks' : 'Read the risks, tick the boxes, ta-da!',
122
+ state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : is_risk_questionnaire_finished ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
123
+ link: isFromAllowedCountry && "".concat(platformURL, "/risk-questionnaire")
124
+ }]);
125
+ setwalletTasks([{
126
+ title: 'Liquid Address',
127
+ message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : liquidWallets.length > 0 ? 'Your address is registered' : 'Register a Liquid address where you will receive the securities',
128
+ state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : liquidWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
129
+ link: isFromAllowedCountry && "".concat(platformURL, "/register-liquid-securities")
130
+ }]);
131
+ var optionalTasks = [{
132
+ title: 'Tax ID',
133
+ message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
134
+ state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
135
+ openModal: _ToDoList.ToDoModal.TAX_ID,
136
+ tooltip: "Some offers require you to provide your Tax ID before being able to invest.\n\nYour tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
137
+ }];
138
+ setoptionalTasks(optionalTasks);
166
139
  };
167
140
  return /*#__PURE__*/_react.default.createElement(_ToDoList.default, _extends({}, props, {
168
141
  mandatoryTasks: mandatoryTasks,
@@ -136,7 +136,10 @@ var Newsletter = /*#__PURE__*/function (_React$Component) {
136
136
  compact: true
137
137
  }, /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeTitle, {
138
138
  as: "h3"
139
- }, "SIGN UP FOR THE STOKR NEWSLETTER"), /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeForm, null, /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeInputBox, null, /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeInput, {
139
+ }, "SIGN UP FOR THE STOKR NEWSLETTER"), /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeForm, {
140
+ onSubmit: this.handleSubmit,
141
+ id: "newsletter-form"
142
+ }, /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeInputBox, null, /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeInput, {
140
143
  name: "name",
141
144
  type: "text",
142
145
  placeholder: "Your Name",
@@ -151,7 +154,8 @@ var Newsletter = /*#__PURE__*/function (_React$Component) {
151
154
  }), errorEmail && /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeInputError, null, errorEmail)), /*#__PURE__*/_react.default.createElement(_Newsletter.SubscribeSubmit, {
152
155
  submitSuccess: submitSuccess,
153
156
  transparent: true,
154
- onClick: this.handleSubmit
157
+ id: "newsletter-button-submit",
158
+ type: "submit"
155
159
  }, submitSuccess ? 'Success!' : 'Submit'))))));
156
160
  }
157
161
  }]);
@@ -51,8 +51,7 @@ var RegisterLiquid = function RegisterLiquid(_ref) {
51
51
  setShowComplete = _ref.setShowComplete;
52
52
  var _useContext = (0, _react.useContext)(_AuthContext.AuthContext),
53
53
  user = _useContext.user;
54
- var entity_name = user.entity_name,
55
- _user$liquid_network = user.liquid_network,
54
+ var _user$liquid_network = user.liquid_network,
56
55
  liquid_network = _user$liquid_network === void 0 ? {} : _user$liquid_network;
57
56
  var _useState = (0, _react.useState)(false),
58
57
  _useState2 = _slicedToArray(_useState, 2),
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.RegisterModal = void 0;
7
+ exports.emailRegex = exports.default = exports.RegisterModal = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _reactRouterDom = require("react-router-dom");
@@ -45,6 +45,8 @@ var TermsStyled = _styledComponents.styled.span.withConfig({
45
45
  displayName: "RegisterModal__TermsStyled",
46
46
  componentId: "sc-18f337m-0"
47
47
  })(["cursor:pointer;font-size:12px;text-decoration:underline;&:hover{opacity:0.7;}"]);
48
+ 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;
49
+ exports.emailRegex = emailRegex;
48
50
  var RegisterModal = function RegisterModal(props) {
49
51
  var _useState = (0, _react.useState)(null),
50
52
  _useState2 = _slicedToArray(_useState, 2),
@@ -44,7 +44,9 @@ var Template = function Template(args) {
44
44
  var RegisterModalDefault = Template.bind({});
45
45
  exports.RegisterModalDefault = RegisterModalDefault;
46
46
  RegisterModalDefault.args = {
47
- popupError: {}
47
+ popupError: {},
48
+ clearPopupError: function clearPopupError() {},
49
+ isModalOpen: true
48
50
  };
49
51
 
50
52
  //doublecheck:
@@ -16,7 +16,6 @@ var StepsProgressSignup = function StepsProgressSignup(props) {
16
16
  var user = props.user;
17
17
  var country = user.country,
18
18
  kyc_status = user.kyc_status,
19
- entity_name = user.entity_name,
20
19
  is_risk_questionnaire_finished = user.is_risk_questionnaire_finished,
21
20
  taxId = user.taxId,
22
21
  _user$wallets = user.wallets,
@@ -28,28 +27,7 @@ var StepsProgressSignup = function StepsProgressSignup(props) {
28
27
  var isActiveStep = function isActiveStep(path) {
29
28
  return window.location.pathname.includes(path);
30
29
  };
31
- var items = entity_name ? [{
32
- id: 'taxId',
33
- handleClick: function handleClick() {
34
- return navigate('/taxid');
35
- },
36
- isDone: !!taxId,
37
- isActive: isActiveStep('/taxid')
38
- }, {
39
- id: 'ampID',
40
- handleClick: function handleClick() {
41
- return navigate('/register-liquid-securities');
42
- },
43
- isDone: hasLiquidWallet,
44
- isActive: isActiveStep('/register-liquid-securities')
45
- }, {
46
- id: 'risk',
47
- handleClick: function handleClick() {
48
- return navigate('/risk-questionnaire');
49
- },
50
- isDone: !!is_risk_questionnaire_finished,
51
- isActive: isActiveStep('/risk-questionnaire')
52
- }] : [{
30
+ var items = [{
53
31
  id: 'country',
54
32
  handleClick: function handleClick() {
55
33
  return navigate('/country-of-residence');
@@ -49,7 +49,8 @@ var colors = {
49
49
  progressBlueStop: '#66A3FE',
50
50
  grey2: '#9b9b9b',
51
51
  grey3: '#f8f8f8',
52
- midRed: '#e3210d'
52
+ midRed: '#e3210d',
53
+ warningYellow: '#facc33'
53
54
  };
54
55
  exports.colors = colors;
55
56
  var _default = colors;
@@ -29,6 +29,7 @@ var theme = _objectSpread({
29
29
  cProgressDone: _colors.default.progressGreen,
30
30
  cYellow: _colors.default.yellow,
31
31
  cYellowLight: _colors.default.yellowLight,
32
+ cYellowWarning: _colors.default.warningYellow,
32
33
  cLighterGreen: _colors.default.lighterGreen,
33
34
  cSuccess: _colors.default.freshGreen,
34
35
  cDarkGreen: _colors.default.pine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.13",
3
+ "version": "2.3.15",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",