@stokr/components-library 2.3.56 → 2.3.58-beta.3

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.
@@ -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 ? 'in_progress' : _ref$iconState,
43
+ iconState = _ref$iconState === void 0 ? 'missing' : _ref$iconState,
44
44
  title = _ref.title,
45
45
  description = _ref.description,
46
46
  link = _ref.link,
@@ -50,8 +50,8 @@ var ChecklistCard = function ChecklistCard(_ref) {
50
50
  _ref$disabled = _ref.disabled,
51
51
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
52
52
  rest = _objectWithoutProperties(_ref, _excluded);
53
- // Fallback to in_progress if iconState is not recognized
54
- var _ref2 = ICON_MAP[iconState] || ICON_MAP['in_progress'],
53
+ // Fallback to missing if iconState is not recognized
54
+ var _ref2 = ICON_MAP[iconState] || ICON_MAP['missing'],
55
55
  icon = _ref2.icon,
56
56
  color = _ref2.color;
57
57
 
@@ -57,7 +57,7 @@ var footerGroups = [{
57
57
  url: "".concat(_globalVariables.platformURL, "/101")
58
58
  }, {
59
59
  name: 'Support',
60
- url: 'https://support.stokr.io/',
60
+ url: 'https://stokr.zendesk.com/',
61
61
  external: true
62
62
  }, {
63
63
  name: 'STOKE POST',
@@ -47,7 +47,7 @@ FooterMenu1.args = {
47
47
  }, */
48
48
  {
49
49
  name: 'Support',
50
- url: 'https://support.stokr.io/',
50
+ url: 'https://stokr.zendesk.com/',
51
51
  external: true
52
52
  }, {
53
53
  name: 'STOKE POST',
@@ -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: (0, _checkTodoStatus.default)(user) > 0 ? "".concat(newPlatformUrlForUserMenu, "/checklist") : "".concat(newPlatformUrlForUserMenu, "/overview"),
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(_MainMenu.UserName, {
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, "/settings/profile-and-privacy");
132
+ return isAdmin ? window.location.href = "https://admin.".concat(_globalVariables.platformDomain) : window.location.href = "".concat(platformUrlForUserMenu, "/overview");
131
133
  }
132
- }, user !== null && user !== void 0 && user.username ? user === null || user === void 0 ? void 0 : user.username : user === null || user === void 0 ? void 0 : user.email)), isAdmin ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isVentureDashboard && /*#__PURE__*/_react.default.createElement(_MainMenu.MainMenuOption, {
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 flex-basis: 25%;\n\n ", "\n\n ", ";\n "])), function (_ref5) {
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) {
@@ -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(_UserChecklist.default, {
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, /*#__PURE__*/_react.default.createElement(_UserChecklist.default, {
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
  });
package/dist/index.js CHANGED
@@ -784,17 +784,6 @@ Object.keys(_RegisterConfirmModal).forEach(function (key) {
784
784
  }
785
785
  });
786
786
  });
787
- var _UserChecklist = require("./components/Checklist/UserChecklist");
788
- Object.keys(_UserChecklist).forEach(function (key) {
789
- if (key === "default" || key === "__esModule") return;
790
- if (key in exports && exports[key] === _UserChecklist[key]) return;
791
- Object.defineProperty(exports, key, {
792
- enumerable: true,
793
- get: function get() {
794
- return _UserChecklist[key];
795
- }
796
- });
797
- });
798
787
  var _taxId = require("./components/taxId");
799
788
  Object.keys(_taxId).forEach(function (key) {
800
789
  if (key === "default" || key === "__esModule") return;
@@ -1246,6 +1235,17 @@ Object.keys(_moment).forEach(function (key) {
1246
1235
  }
1247
1236
  });
1248
1237
  });
1238
+ var _checklistGenerator = require("./utils/checklistGenerator");
1239
+ Object.keys(_checklistGenerator).forEach(function (key) {
1240
+ if (key === "default" || key === "__esModule") return;
1241
+ if (key in exports && exports[key] === _checklistGenerator[key]) return;
1242
+ Object.defineProperty(exports, key, {
1243
+ enumerable: true,
1244
+ get: function get() {
1245
+ return _checklistGenerator[key];
1246
+ }
1247
+ });
1248
+ });
1249
1249
  var _FA = require("./components/2FA");
1250
1250
  Object.keys(_FA).forEach(function (key) {
1251
1251
  if (key === "default" || key === "__esModule") return;
@@ -1389,6 +1389,17 @@ Object.keys(_theme).forEach(function (key) {
1389
1389
  }
1390
1390
  });
1391
1391
  });
1392
+ var _rwd = require("./styles/rwd");
1393
+ Object.keys(_rwd).forEach(function (key) {
1394
+ if (key === "default" || key === "__esModule") return;
1395
+ if (key in exports && exports[key] === _rwd[key]) return;
1396
+ Object.defineProperty(exports, key, {
1397
+ enumerable: true,
1398
+ get: function get() {
1399
+ return _rwd[key];
1400
+ }
1401
+ });
1402
+ });
1392
1403
  var _logo = require("./components/logo");
1393
1404
  Object.keys(_logo).forEach(function (key) {
1394
1405
  if (key === "default" || key === "__esModule") return;
@@ -4,27 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.checkTodoStatus = void 0;
7
- var _globalVariables = require("../constants/globalVariables");
7
+ var _checklistGenerator = require("./checklistGenerator");
8
8
  var checkTodoStatus = function checkTodoStatus(user) {
9
- var _user$countryObj;
10
- var count = 0;
11
- if (!user) return count;
12
- var isFromAllowedCountry = user.country && ((_user$countryObj = user.countryObj) === null || _user$countryObj === void 0 ? void 0 : _user$countryObj.isAllowed);
13
-
14
- // Country
15
- if (isFromAllowedCountry && (user.user_type === 'investor' || user.user_type === 'investor-entity')) {
16
- var _user$wallets;
17
- //wallet (we only check for liquid wallet)
18
- !(user !== null && user !== void 0 && (_user$wallets = user.wallets) !== null && _user$wallets !== void 0 && _user$wallets.some(function (wallet) {
19
- return wallet.type === _globalVariables.walletTypes.LIQUID;
20
- })) && count++
21
-
22
- // KYC
23
- ;
24
- (!user.kyc_status || user.kyc_status.toUpperCase() === 'DRAFT' || user.kyc_status.toUpperCase() === 'REAPPLY' || user.kyc_status.toUpperCase() === 'CANCELLED') && count++;
25
- !user.taxId && count++;
26
- }
27
- return count;
9
+ var coreTasks = (0, _checklistGenerator.generateCoreChecklistTasks)(user);
10
+ return coreTasks.remainingCount;
28
11
  };
29
12
  exports.checkTodoStatus = checkTodoStatus;
30
13
  var _default = checkTodoStatus;
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ exports.generateCoreChecklistTasks = generateCoreChecklistTasks;
8
+ exports.getVerifyIdentityChecklist = void 0;
9
+ var _globalVariables = require("../constants/globalVariables");
10
+ var websiteUrl = process.env.REACT_APP_WEBSITE_DOMAIN;
11
+
12
+ // Unified copy for all checklist tasks - same everywhere
13
+ var TASK_COPY = {
14
+ country: {
15
+ title: {
16
+ entity: 'Country of Entity Registration',
17
+ individual: 'Country of Residence'
18
+ },
19
+ description: {
20
+ missing: {
21
+ entity: 'Please select your jurisdiction of incorporation.',
22
+ individual: 'Please select your country of residence.'
23
+ },
24
+ not_available: 'STOKR is not yet available in your country of residence.',
25
+ done: {
26
+ entity: 'Your jurisdiction of incorporation has been registered.',
27
+ individual: 'Your country of residence has been registered.'
28
+ }
29
+ },
30
+ iconCopy: {
31
+ missing: 'Missing step',
32
+ not_available: 'Not available',
33
+ done: 'Registered'
34
+ }
35
+ },
36
+ identity: {
37
+ title: {
38
+ entity: 'Verify Entity',
39
+ individual: 'Verify Identity'
40
+ },
41
+ description: {
42
+ not_available: 'Sorry, you are living in a country where this is not available.',
43
+ missing: {
44
+ entity: 'Submit your entity documents for verification.',
45
+ individual: 'Submit identity verification for compliance clearance.'
46
+ },
47
+ in_progress: 'Identity verification is in progress.',
48
+ done: {
49
+ entity: 'Entity verification complete.',
50
+ individual: 'Identity verification complete.'
51
+ },
52
+ reapply: {
53
+ entity: 'Please re-verify your entity documentation.',
54
+ individual: 'Please re-verify your identity.'
55
+ }
56
+ },
57
+ iconCopy: {
58
+ not_available: 'Not available',
59
+ missing: 'Missing step',
60
+ in_progress: 'Under review',
61
+ done: 'Verified'
62
+ }
63
+ },
64
+ wallet: {
65
+ title: 'Liquid Address',
66
+ description: {
67
+ missing: 'Register a Liquid address where you will receive the securities.',
68
+ not_available: 'Sorry, you are living in a country where this is not available.',
69
+ done: 'Your address is registered.'
70
+ },
71
+ iconCopy: {
72
+ missing: 'Missing step',
73
+ not_available: 'Not available',
74
+ done: 'Registered'
75
+ }
76
+ },
77
+ taxId: {
78
+ title: 'Tax ID',
79
+ description: {
80
+ missing: 'Certain investment products require tax identification before participation.',
81
+ done: 'Tax identification confirmed. You may now access products requiring tax compliance verification.'
82
+ },
83
+ iconCopy: {
84
+ missing: 'Missing step',
85
+ done: 'Submitted',
86
+ not_available: 'Not available'
87
+ },
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
+ }
90
+ };
91
+
92
+ // Identity verification checklist function -
93
+ var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllowedCountry, user, isEntity) {
94
+ var kyc_status = user.kyc_status;
95
+ var state;
96
+ var hasLink = false;
97
+ var message;
98
+ if (!isFromAllowedCountry) {
99
+ state = 'not_available';
100
+ message = TASK_COPY.identity.description.not_available;
101
+ } else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
102
+ state = 'missing';
103
+ hasLink = true;
104
+ message = isEntity ? TASK_COPY.identity.description.missing.entity : TASK_COPY.identity.description.missing.individual;
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') {
106
+ state = 'in_progress';
107
+ message = TASK_COPY.identity.description.in_progress;
108
+ } else if (kyc_status.toUpperCase() === 'ACCEPTED') {
109
+ state = 'done';
110
+ message = isEntity ? TASK_COPY.identity.description.done.entity : TASK_COPY.identity.description.done.individual;
111
+ } else if (kyc_status.toUpperCase() === 'REAPPLY' || kyc_status.toUpperCase() === 'CANCELLED') {
112
+ state = 'missing';
113
+ hasLink = true;
114
+ message = isEntity ? TASK_COPY.identity.description.reapply.entity : TASK_COPY.identity.description.reapply.individual;
115
+ }
116
+ return {
117
+ state: state,
118
+ hasLink: hasLink,
119
+ message: message
120
+ };
121
+ };
122
+ exports.getVerifyIdentityChecklist = getVerifyIdentityChecklist;
123
+ function getCountryDescription(user, isFromAllowedCountry) {
124
+ var country = user.country,
125
+ user_type = user.user_type;
126
+ var isEntity = user_type === _globalVariables.UserTypes.investor_entity;
127
+ if (!country) {
128
+ return isEntity ? TASK_COPY.country.description.missing.entity : TASK_COPY.country.description.missing.individual;
129
+ }
130
+ if (!isFromAllowedCountry) {
131
+ return TASK_COPY.country.description.not_available;
132
+ }
133
+ return isEntity ? TASK_COPY.country.description.done.entity : TASK_COPY.country.description.done.individual;
134
+ }
135
+
136
+ /**
137
+ * Generate core checklist tasks (country, identity, wallet, tax ID) with unified copy
138
+ * @param {Object} user - User object
139
+ * @returns {Object} Core checklist tasks with unified copy, country status, all tasks, and remaining count
140
+ */
141
+ function generateCoreChecklistTasks(user) {
142
+ if (!user) {
143
+ return {
144
+ country: null,
145
+ identity: null,
146
+ wallet: null,
147
+ taxId: null,
148
+ isFromAllowedCountry: false,
149
+ allTasks: [],
150
+ remainingCount: 0
151
+ };
152
+ }
153
+ var country = user.country,
154
+ user_type = user.user_type,
155
+ _user$wallets = user.wallets,
156
+ wallets = _user$wallets === void 0 ? [] : _user$wallets,
157
+ taxId = user.taxId,
158
+ countryObj = user.countryObj;
159
+ var isFromAllowedCountry = countryObj === null || countryObj === void 0 ? void 0 : countryObj.isAllowed;
160
+ var liquidWallets = wallets.filter(function (wallet) {
161
+ return wallet.type === _globalVariables.walletTypes.LIQUID;
162
+ }) || [];
163
+ var hasWallet = liquidWallets.length > 0;
164
+ var isEntity = user_type === _globalVariables.UserTypes.investor_entity;
165
+ var platformURL = "https://signup.".concat(websiteUrl);
166
+
167
+ // Country task
168
+ var countryStatus = !country ? 'missing' : !isFromAllowedCountry ? 'not_available' : 'done';
169
+ var countryTask = {
170
+ key: 'country',
171
+ title: isEntity ? TASK_COPY.country.title.entity : TASK_COPY.country.title.individual,
172
+ description: getCountryDescription(user, isFromAllowedCountry),
173
+ iconState: countryStatus,
174
+ iconCopy: TASK_COPY.country.iconCopy[countryStatus],
175
+ link: "".concat(platformURL, "/country-of-residence"),
176
+ isClickable: countryStatus !== 'done'
177
+ };
178
+
179
+ // Identity task
180
+ var verifyIdentityChecklist = getVerifyIdentityChecklist(isFromAllowedCountry, user, isEntity);
181
+ var identity = {
182
+ key: 'kyc',
183
+ title: isEntity ? TASK_COPY.identity.title.entity : TASK_COPY.identity.title.individual,
184
+ description: verifyIdentityChecklist.message,
185
+ iconState: verifyIdentityChecklist.state,
186
+ iconCopy: TASK_COPY.identity.iconCopy[verifyIdentityChecklist.state],
187
+ link: "".concat(platformURL, "/verify-identity"),
188
+ isClickable: verifyIdentityChecklist.hasLink
189
+ };
190
+
191
+ // Wallet
192
+ var walletStatus = hasWallet ? 'done' : 'missing';
193
+ var walletDescription = !isFromAllowedCountry ? TASK_COPY.wallet.description.not_available : hasWallet ? TASK_COPY.wallet.description.done : TASK_COPY.wallet.description.missing;
194
+ var wallet = {
195
+ key: 'wallet',
196
+ title: TASK_COPY.wallet.title,
197
+ description: walletDescription,
198
+ iconState: walletStatus,
199
+ iconCopy: TASK_COPY.wallet.iconCopy[walletStatus],
200
+ link: "".concat(platformURL, "/register-liquid-securities"),
201
+ isClickable: isFromAllowedCountry && walletStatus !== 'done'
202
+ };
203
+
204
+ // Tax ID
205
+ var taxStatus = taxId ? 'done' : 'missing';
206
+ var taxIdTask = {
207
+ key: 'taxId',
208
+ title: TASK_COPY.taxId.title,
209
+ description: TASK_COPY.taxId.description[taxStatus],
210
+ iconState: taxStatus,
211
+ iconCopy: TASK_COPY.taxId.iconCopy[taxStatus],
212
+ openModal: 'taxId',
213
+ tooltip: TASK_COPY.taxId.tooltip,
214
+ isClickable: taxStatus !== 'done'
215
+ };
216
+
217
+ // Create all tasks array
218
+ var allTasks = [countryTask, identity, wallet, taxIdTask].filter(Boolean);
219
+
220
+ // Calculate remaining count based on missing items
221
+ var remainingCount = allTasks.filter(function (task) {
222
+ return task.iconState === 'missing' || task.iconState === 'not_available';
223
+ }).length;
224
+ return {
225
+ country: countryTask,
226
+ identity: identity,
227
+ wallet: wallet,
228
+ taxId: taxIdTask,
229
+ isFromAllowedCountry: isFromAllowedCountry,
230
+ allTasks: allTasks,
231
+ remainingCount: remainingCount
232
+ };
233
+ }
234
+ var _default = generateCoreChecklistTasks;
235
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.56",
3
+ "version": "2.3.58-beta.3",
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-app-rewired build",
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-app-rewired test",
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",