@stokr/components-library 2.3.58-beta.2 → 2.3.58-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Checklist/ChecklistCard.js +7 -4
- package/dist/components/Checklist/ChecklistCard.styles.js +4 -1
- package/dist/components/Footer/FooterLayout.js +1 -1
- package/dist/components/Footer/FooterMenu.stories.js +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/MainMenu/MainMenu.js +6 -12
- package/dist/components/MainMenu/MainMenu.styles.js +2 -2
- package/dist/components/ProfileBox/ProfileBox.js +18 -5
- package/dist/components/ProfileHeader/ProfileHeader.js +2 -27
- package/dist/utils/checklistGenerator.js +28 -32
- package/package.json +3 -4
|
@@ -12,7 +12,7 @@ var _ChecklistCard = require("./ChecklistCard.styles");
|
|
|
12
12
|
var _ToDoListTask = require("../ToDoList/ToDoListTask.styles");
|
|
13
13
|
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
14
14
|
var _warningFilled = require("../../static/images/warning-filled.svg");
|
|
15
|
-
var _excluded = ["iconState", "title", "description", "link", "onClick", "tooltip", "iconCopy", "disabled"];
|
|
15
|
+
var _excluded = ["iconState", "title", "description", "link", "onClick", "tooltip", "iconCopy", "disabled", "isClickable"];
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
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); }
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -40,7 +40,7 @@ var ICON_MAP = {
|
|
|
40
40
|
var ChecklistCard = function ChecklistCard(_ref) {
|
|
41
41
|
var _icon$props;
|
|
42
42
|
var _ref$iconState = _ref.iconState,
|
|
43
|
-
iconState = _ref$iconState === void 0 ? '
|
|
43
|
+
iconState = _ref$iconState === void 0 ? 'missing' : _ref$iconState,
|
|
44
44
|
title = _ref.title,
|
|
45
45
|
description = _ref.description,
|
|
46
46
|
link = _ref.link,
|
|
@@ -49,9 +49,11 @@ var ChecklistCard = function ChecklistCard(_ref) {
|
|
|
49
49
|
iconCopy = _ref.iconCopy,
|
|
50
50
|
_ref$disabled = _ref.disabled,
|
|
51
51
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
52
|
+
_ref$isClickable = _ref.isClickable,
|
|
53
|
+
isClickable = _ref$isClickable === void 0 ? true : _ref$isClickable,
|
|
52
54
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
|
-
// Fallback to
|
|
54
|
-
var _ref2 = ICON_MAP[iconState] || ICON_MAP['
|
|
55
|
+
// Fallback to missing if iconState is not recognized
|
|
56
|
+
var _ref2 = ICON_MAP[iconState] || ICON_MAP['missing'],
|
|
55
57
|
icon = _ref2.icon,
|
|
56
58
|
color = _ref2.color;
|
|
57
59
|
|
|
@@ -72,6 +74,7 @@ var ChecklistCard = function ChecklistCard(_ref) {
|
|
|
72
74
|
});
|
|
73
75
|
var content = /*#__PURE__*/_react.default.createElement(_ChecklistCard.CardContainer, _extends({
|
|
74
76
|
"aria-disabled": disabled,
|
|
77
|
+
isClickable: isClickable,
|
|
75
78
|
tabIndex: disabled ? -1 : 0
|
|
76
79
|
}, onClick ? {
|
|
77
80
|
role: 'button',
|
|
@@ -12,7 +12,10 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
12
12
|
var CardContainer = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "ChecklistCardstyles__CardContainer",
|
|
14
14
|
componentId: "sc-rufrg1-0"
|
|
15
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;border:1px solid #eaeaea;border-radius:1px;background:#fff;padding:32px 32px 32px 32px;min-width:320px;min-height:220px;height:100%;box-sizing:border-box;transition:box-shadow 0.2s;box-shadow:0 2px 8px rgba(0,0,0,0.01);position:relative;cursor:pointer;&:hover{box-shadow:0 4px 16px rgba(0,0,0,0.04);}&[aria-disabled='true']{opacity:0.5;cursor:not-allowed;}"])
|
|
15
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;border:1px solid #eaeaea;border-radius:1px;background:#fff;padding:32px 32px 32px 32px;min-width:320px;min-height:220px;height:100%;box-sizing:border-box;transition:box-shadow 0.2s;box-shadow:0 2px 8px rgba(0,0,0,0.01);position:relative;cursor:pointer;&:hover{box-shadow:0 4px 16px rgba(0,0,0,0.04);}", " &[aria-disabled='true']{opacity:0.5;cursor:not-allowed;}"], function (_ref) {
|
|
16
|
+
var isClickable = _ref.isClickable;
|
|
17
|
+
return !isClickable && "\n cursor: initial;\n ";
|
|
18
|
+
});
|
|
16
19
|
exports.CardContainer = CardContainer;
|
|
17
20
|
var IconBlock = _styledComponents.default.div.withConfig({
|
|
18
21
|
displayName: "ChecklistCardstyles__IconBlock",
|
|
@@ -348,7 +348,7 @@ var Header = function Header(_ref3) {
|
|
|
348
348
|
return toggleMenu('main');
|
|
349
349
|
}
|
|
350
350
|
}, "Dashboard"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
351
|
-
href:
|
|
351
|
+
href: "".concat(newPlatformUrlForUserMenu, "/overview"),
|
|
352
352
|
onClick: function onClick() {
|
|
353
353
|
return toggleMenu('main');
|
|
354
354
|
}
|
|
@@ -122,14 +122,16 @@ var MainMenu = /*#__PURE__*/function (_PureComponent) {
|
|
|
122
122
|
} : {},
|
|
123
123
|
hasNestedCollapse: true
|
|
124
124
|
}, /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOptions, null, !isVentureDashboard && /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOption, {
|
|
125
|
+
as: "button",
|
|
126
|
+
button: true,
|
|
125
127
|
nameOption: true,
|
|
126
128
|
isVenture: isAdmin
|
|
127
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
128
130
|
style: spanStyleForMenu,
|
|
129
131
|
onClick: function onClick() {
|
|
130
|
-
return isAdmin ? window.location.href = "https://admin.".concat(_globalVariables.platformDomain) : window.location.href = "".concat(platformUrlForUserMenu, "/
|
|
132
|
+
return isAdmin ? window.location.href = "https://admin.".concat(_globalVariables.platformDomain) : window.location.href = "".concat(platformUrlForUserMenu, "/overview");
|
|
131
133
|
}
|
|
132
|
-
},
|
|
134
|
+
}, "Dashboard")), isAdmin ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isVentureDashboard && /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOption, {
|
|
133
135
|
as: "button",
|
|
134
136
|
button: true,
|
|
135
137
|
onClick: function onClick() {
|
|
@@ -138,20 +140,12 @@ var MainMenu = /*#__PURE__*/function (_PureComponent) {
|
|
|
138
140
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
139
141
|
style: spanStyleForMenu
|
|
140
142
|
}, "Settings"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOption, {
|
|
141
|
-
isDashboard: true,
|
|
142
|
-
as: "button",
|
|
143
|
-
button: true,
|
|
144
|
-
onClick: function onClick() {
|
|
145
|
-
window.location.href = "".concat(platformUrlForUserMenu, "/checklist");
|
|
146
|
-
}
|
|
147
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
148
|
-
style: spanStyleForMenu
|
|
149
|
-
}, "Checklist"), notifications > 0 && /*#__PURE__*/_react.default.createElement(_MainMenu.Notifications, null, notifications)), /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOption, {
|
|
150
143
|
as: "button",
|
|
151
144
|
button: true,
|
|
152
145
|
isOpened: isSettingsActive,
|
|
153
146
|
onClick: this.toggleSettings,
|
|
154
147
|
isSettings: true
|
|
148
|
+
//isDashboard
|
|
155
149
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
156
150
|
style: spanStyleForMenu
|
|
157
151
|
}, "Settings"), /*#__PURE__*/_react.default.createElement(_MainMenu.ExpandArrow, {
|
|
@@ -40,7 +40,7 @@ var MainMenuOption = _styledComponents.default.div.withConfig({
|
|
|
40
40
|
return isDashboard && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-color: #e1e1e1 !important;\n "])));
|
|
41
41
|
}, function (_ref2) {
|
|
42
42
|
var isSettings = _ref2.isSettings;
|
|
43
|
-
return isSettings && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: none !important;\n "])));
|
|
43
|
+
return isSettings && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-right: none !important;\n "])));
|
|
44
44
|
}, _rwd.default.Medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 10px;\n border-bottom: 1px solid #e1e1e1;\n margin-bottom: -1px;\n transition: border-bottom-color .2s;\n\n & + & {\n border-top: 0;\n border-left: 1px solid #e1e1e1;\n\n ", "\n }\n\n ", ";\n\n ", "\n\n ", "\n\n "])), function (_ref3) {
|
|
45
45
|
var isDashboard = _ref3.isDashboard;
|
|
46
46
|
return isDashboard && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border-right: 1px solid #e1e1e1;\n "])));
|
|
@@ -53,7 +53,7 @@ var MainMenuOption = _styledComponents.default.div.withConfig({
|
|
|
53
53
|
return props.nameOption && "\n display: flex;\n ";
|
|
54
54
|
}), function (props) {
|
|
55
55
|
return props.nameOption && "\n display: none;\n ";
|
|
56
|
-
}, _rwd.default.Large(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n
|
|
56
|
+
}, _rwd.default.Large(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\n ", "\n\n ", ";\n "])), function (_ref5) {
|
|
57
57
|
var isVenture = _ref5.isVenture;
|
|
58
58
|
return isVenture && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex-basis: 75.5%;\n "])));
|
|
59
59
|
}, function (props) {
|
|
@@ -10,30 +10,43 @@ var _Background = _interopRequireDefault(require("../Background/Background"));
|
|
|
10
10
|
var _ComponentWrapper = _interopRequireDefault(require("../ComponentWrapper/ComponentWrapper.styles"));
|
|
11
11
|
var _ProfileBox = require("./ProfileBox.styles");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
19
|
var lineBreaker = {
|
|
14
20
|
wordBreak: 'break-all'
|
|
15
21
|
};
|
|
16
22
|
var ProfileBox = function ProfileBox(_ref) {
|
|
17
23
|
var pictureSrc = _ref.pictureSrc,
|
|
18
24
|
name = _ref.name,
|
|
19
|
-
handleEdit = _ref.handleEdit
|
|
25
|
+
handleEdit = _ref.handleEdit,
|
|
26
|
+
_ref$withEditButton = _ref.withEditButton,
|
|
27
|
+
withEditButton = _ref$withEditButton === void 0 ? true : _ref$withEditButton,
|
|
28
|
+
_ref$nameStyle = _ref.nameStyle,
|
|
29
|
+
nameStyle = _ref$nameStyle === void 0 ? {} : _ref$nameStyle;
|
|
20
30
|
return /*#__PURE__*/_react.default.createElement(_ProfileBox.Container, null, /*#__PURE__*/_react.default.createElement(_ProfileBox.ImageWrapper, null, /*#__PURE__*/_react.default.createElement(_Background.default, {
|
|
21
31
|
src: pictureSrc
|
|
22
32
|
})), /*#__PURE__*/_react.default.createElement(_ProfileBox.EditButton, {
|
|
23
33
|
onClick: handleEdit
|
|
24
34
|
}, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_ProfileBox.Name, {
|
|
25
|
-
style: lineBreaker
|
|
26
|
-
}, name, /*#__PURE__*/_react.default.createElement(_ProfileBox.EditIcon, null)))));
|
|
35
|
+
style: _objectSpread(_objectSpread({}, lineBreaker), nameStyle)
|
|
36
|
+
}, name, withEditButton && /*#__PURE__*/_react.default.createElement(_ProfileBox.EditIcon, null)))));
|
|
27
37
|
};
|
|
28
38
|
exports.ProfileBox = ProfileBox;
|
|
29
39
|
ProfileBox.propTypes = {
|
|
30
40
|
pictureSrc: _propTypes.default.string.isRequired,
|
|
31
41
|
name: _propTypes.default.string,
|
|
32
|
-
handleEdit: _propTypes.default.func
|
|
42
|
+
handleEdit: _propTypes.default.func,
|
|
43
|
+
withEditButton: _propTypes.default.bool,
|
|
44
|
+
nameStyle: _propTypes.default.object
|
|
33
45
|
};
|
|
34
46
|
ProfileBox.defaultProps = {
|
|
35
47
|
handleEdit: function handleEdit() {},
|
|
36
|
-
name: ''
|
|
48
|
+
name: '',
|
|
49
|
+
withEditButton: true
|
|
37
50
|
};
|
|
38
51
|
var _default = ProfileBox;
|
|
39
52
|
exports.default = _default;
|
|
@@ -23,7 +23,6 @@ var _EventDBContext = require("context/EventDBContext/EventDBContext");
|
|
|
23
23
|
var _NotificationContext = require("context/NotificationContext/NotificationContext");
|
|
24
24
|
var _ProfileHeader = require("./ProfileHeader.styles");
|
|
25
25
|
var _avatarPlaceholder = _interopRequireDefault(require("../../static/images/avatar-placeholder.png"));
|
|
26
|
-
var _UserChecklist = _interopRequireDefault(require("../Checklist/UserChecklist"));
|
|
27
26
|
var _customHooks = require("utils/customHooks");
|
|
28
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); }
|
|
@@ -259,19 +258,7 @@ var ProfileHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
259
258
|
breakpoint: "Medium"
|
|
260
259
|
}, /*#__PURE__*/_react.default.createElement(_reactCollapse.Collapse, {
|
|
261
260
|
isOpened: extendedPanel === PANEL.TODOS
|
|
262
|
-
}, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(
|
|
263
|
-
user: _this2.props.user
|
|
264
|
-
// redirectCookie
|
|
265
|
-
//additionalTasks={<AdditionalTask />}
|
|
266
|
-
// getTasksCount={taskCount => {
|
|
267
|
-
// this.setState({
|
|
268
|
-
// mandatoryTasksCount:
|
|
269
|
-
// taskCount.mandatoryTasksCount,
|
|
270
|
-
// walletsTasksCount:
|
|
271
|
-
// taskCount.walletTasksCount,
|
|
272
|
-
// })
|
|
273
|
-
// }}
|
|
274
|
-
})))))))), /*#__PURE__*/_react.default.createElement(_rwd.DisplayOnBreakpoint, {
|
|
261
|
+
}, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null))))))), /*#__PURE__*/_react.default.createElement(_rwd.DisplayOnBreakpoint, {
|
|
275
262
|
up: true,
|
|
276
263
|
breakpoint: "Medium"
|
|
277
264
|
}, /*#__PURE__*/_react.default.createElement(_ProfileHeader.TabsContainer, null, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
|
|
@@ -288,19 +275,7 @@ var ProfileHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
288
275
|
authUser: authUser
|
|
289
276
|
})), /*#__PURE__*/_react.default.createElement(_Tabs.Tab, {
|
|
290
277
|
tabId: PANEL.TODOS
|
|
291
|
-
}, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null
|
|
292
|
-
user: _this2.props.user
|
|
293
|
-
// redirectCookie
|
|
294
|
-
//additionalTasks={<AdditionalTask />}
|
|
295
|
-
// getTasksCount={taskCount => {
|
|
296
|
-
// this.setState({
|
|
297
|
-
// mandatoryTasksCount:
|
|
298
|
-
// taskCount.mandatoryTasksCount,
|
|
299
|
-
// walletsTasksCount:
|
|
300
|
-
// taskCount.walletTasksCount,
|
|
301
|
-
// })
|
|
302
|
-
// }}
|
|
303
|
-
})))))))));
|
|
278
|
+
}, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null))))))));
|
|
304
279
|
}));
|
|
305
280
|
});
|
|
306
281
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
exports.generateCoreChecklistTasks = generateCoreChecklistTasks;
|
|
8
|
-
exports.
|
|
8
|
+
exports.getVerifyIdentityChecklist = void 0;
|
|
9
9
|
var _globalVariables = require("../constants/globalVariables");
|
|
10
10
|
var websiteUrl = process.env.REACT_APP_WEBSITE_DOMAIN;
|
|
11
11
|
|
|
@@ -58,16 +58,15 @@ var TASK_COPY = {
|
|
|
58
58
|
not_available: 'Not available',
|
|
59
59
|
missing: 'Missing step',
|
|
60
60
|
in_progress: 'Under review',
|
|
61
|
-
done: 'Verified'
|
|
62
|
-
reapply: 'Missing step'
|
|
61
|
+
done: 'Verified'
|
|
63
62
|
}
|
|
64
63
|
},
|
|
65
64
|
wallet: {
|
|
66
65
|
title: 'Liquid Address',
|
|
67
66
|
description: {
|
|
68
|
-
missing: 'Register a Liquid address where you will receive the securities',
|
|
67
|
+
missing: 'Register a Liquid address where you will receive the securities.',
|
|
69
68
|
not_available: 'Sorry, you are living in a country where this is not available.',
|
|
70
|
-
done: 'Your address is registered'
|
|
69
|
+
done: 'Your address is registered.'
|
|
71
70
|
},
|
|
72
71
|
iconCopy: {
|
|
73
72
|
missing: 'Missing step',
|
|
@@ -83,51 +82,44 @@ var TASK_COPY = {
|
|
|
83
82
|
},
|
|
84
83
|
iconCopy: {
|
|
85
84
|
missing: 'Missing step',
|
|
86
|
-
done: 'Submitted'
|
|
85
|
+
done: 'Submitted',
|
|
86
|
+
not_available: 'Not available'
|
|
87
87
|
},
|
|
88
88
|
tooltip: "Some offers require you to provide your Tax ID before being able to invest.\nYour tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
// Identity verification checklist function -
|
|
93
|
-
var
|
|
92
|
+
// Identity verification checklist function -
|
|
93
|
+
var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllowedCountry, user, isEntity) {
|
|
94
94
|
var kyc_status = user.kyc_status;
|
|
95
95
|
var state;
|
|
96
96
|
var hasLink = false;
|
|
97
|
+
var message;
|
|
97
98
|
if (!isFromAllowedCountry) {
|
|
98
99
|
state = 'not_available';
|
|
100
|
+
message = TASK_COPY.identity.description.not_available;
|
|
99
101
|
} else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
|
|
100
102
|
state = 'missing';
|
|
101
103
|
hasLink = true;
|
|
104
|
+
message = isEntity ? TASK_COPY.identity.description.missing.entity : TASK_COPY.identity.description.missing.individual;
|
|
102
105
|
} else if (kyc_status.toUpperCase() === 'REJECTED' || kyc_status.toUpperCase() === 'ESCALATED' || kyc_status.toUpperCase() === 'IN PROGRESS' || kyc_status.toUpperCase() === 'INCONCLUSIVE' || kyc_status.toUpperCase() === 'APPROVED' || kyc_status.toUpperCase() === 'DENIED') {
|
|
103
106
|
state = 'in_progress';
|
|
107
|
+
message = TASK_COPY.identity.description.in_progress;
|
|
104
108
|
} else if (kyc_status.toUpperCase() === 'ACCEPTED') {
|
|
105
109
|
state = 'done';
|
|
110
|
+
message = isEntity ? TASK_COPY.identity.description.done.entity : TASK_COPY.identity.description.done.individual;
|
|
106
111
|
} else if (kyc_status.toUpperCase() === 'REAPPLY' || kyc_status.toUpperCase() === 'CANCELLED') {
|
|
107
|
-
state = '
|
|
112
|
+
state = 'missing';
|
|
108
113
|
hasLink = true;
|
|
114
|
+
message = isEntity ? TASK_COPY.identity.description.reapply.entity : TASK_COPY.identity.description.reapply.individual;
|
|
109
115
|
}
|
|
110
116
|
return {
|
|
111
117
|
state: state,
|
|
112
|
-
hasLink: hasLink
|
|
118
|
+
hasLink: hasLink,
|
|
119
|
+
message: message
|
|
113
120
|
};
|
|
114
121
|
};
|
|
115
|
-
exports.
|
|
116
|
-
var getIdentityDescription = function getIdentityDescription(state, isEntity) {
|
|
117
|
-
if (state === 'not_available') {
|
|
118
|
-
return TASK_COPY.identity.description.not_available;
|
|
119
|
-
}
|
|
120
|
-
if (state === 'in_progress') {
|
|
121
|
-
return TASK_COPY.identity.description.in_progress;
|
|
122
|
-
}
|
|
123
|
-
if (state === 'missing' || state === 'reapply') {
|
|
124
|
-
return isEntity ? TASK_COPY.identity.description.missing.entity : TASK_COPY.identity.description.missing.individual;
|
|
125
|
-
}
|
|
126
|
-
if (state === 'done') {
|
|
127
|
-
return isEntity ? TASK_COPY.identity.description.done.entity : TASK_COPY.identity.description.done.individual;
|
|
128
|
-
}
|
|
129
|
-
return TASK_COPY.identity.description.missing.individual;
|
|
130
|
-
};
|
|
122
|
+
exports.getVerifyIdentityChecklist = getVerifyIdentityChecklist;
|
|
131
123
|
function getCountryDescription(user, isFromAllowedCountry) {
|
|
132
124
|
var country = user.country,
|
|
133
125
|
user_type = user.user_type;
|
|
@@ -180,18 +172,20 @@ function generateCoreChecklistTasks(user) {
|
|
|
180
172
|
description: getCountryDescription(user, isFromAllowedCountry),
|
|
181
173
|
iconState: countryStatus,
|
|
182
174
|
iconCopy: TASK_COPY.country.iconCopy[countryStatus],
|
|
183
|
-
link: "".concat(platformURL, "/country-of-residence")
|
|
175
|
+
link: "".concat(platformURL, "/country-of-residence"),
|
|
176
|
+
isClickable: countryStatus !== 'done'
|
|
184
177
|
};
|
|
185
178
|
|
|
186
179
|
// Identity task
|
|
187
|
-
var verifyIdentityChecklist =
|
|
180
|
+
var verifyIdentityChecklist = getVerifyIdentityChecklist(isFromAllowedCountry, user, isEntity);
|
|
188
181
|
var identity = {
|
|
189
182
|
key: 'kyc',
|
|
190
183
|
title: isEntity ? TASK_COPY.identity.title.entity : TASK_COPY.identity.title.individual,
|
|
191
|
-
description:
|
|
184
|
+
description: verifyIdentityChecklist.message,
|
|
192
185
|
iconState: verifyIdentityChecklist.state,
|
|
193
186
|
iconCopy: TASK_COPY.identity.iconCopy[verifyIdentityChecklist.state],
|
|
194
|
-
link:
|
|
187
|
+
link: "".concat(platformURL, "/verify-identity"),
|
|
188
|
+
isClickable: verifyIdentityChecklist.hasLink
|
|
195
189
|
};
|
|
196
190
|
|
|
197
191
|
// Wallet
|
|
@@ -203,7 +197,8 @@ function generateCoreChecklistTasks(user) {
|
|
|
203
197
|
description: walletDescription,
|
|
204
198
|
iconState: walletStatus,
|
|
205
199
|
iconCopy: TASK_COPY.wallet.iconCopy[walletStatus],
|
|
206
|
-
link:
|
|
200
|
+
link: "".concat(platformURL, "/register-liquid-securities"),
|
|
201
|
+
isClickable: isFromAllowedCountry && walletStatus !== 'done'
|
|
207
202
|
};
|
|
208
203
|
|
|
209
204
|
// Tax ID
|
|
@@ -215,7 +210,8 @@ function generateCoreChecklistTasks(user) {
|
|
|
215
210
|
iconState: taxStatus,
|
|
216
211
|
iconCopy: TASK_COPY.taxId.iconCopy[taxStatus],
|
|
217
212
|
openModal: 'taxId',
|
|
218
|
-
tooltip: TASK_COPY.taxId.tooltip
|
|
213
|
+
tooltip: TASK_COPY.taxId.tooltip,
|
|
214
|
+
isClickable: taxStatus !== 'done'
|
|
219
215
|
};
|
|
220
216
|
|
|
221
217
|
// Create all tasks array
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stokr/components-library",
|
|
3
|
-
"version": "2.3.58-beta.
|
|
3
|
+
"version": "2.3.58-beta.4",
|
|
4
4
|
"description": "STOKR - Components Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"author": "Bilal Hodzic <bilal@stokr.io>",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "react-
|
|
18
|
+
"build": "react-scripts build",
|
|
19
19
|
"build-storybook": "storybook build",
|
|
20
20
|
"build-storybook-docs": "storybook build -s public --docs",
|
|
21
21
|
"build:dist": "cross-env BABEL_ENV=production babel src -d dist",
|
|
22
|
-
"test": "react-
|
|
22
|
+
"test": "react-scripts test",
|
|
23
23
|
"prepare": "npm run build",
|
|
24
24
|
"storybook": "storybook dev -p 6006",
|
|
25
25
|
"start": "npm run storybook",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"prop-types": "^15.8.1",
|
|
51
51
|
"qrcode.react": "^3.1.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
|
-
"react-app-rewired": "^2.2.1",
|
|
54
53
|
"react-collapse": "^5.1.1",
|
|
55
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
56
55
|
"react-countup": "^6.4.1",
|