@stokr/components-library 2.3.65-beta.1 → 2.3.65-beta.11

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.
Files changed (222) hide show
  1. package/dist/components/2FA/main-flow.js +28 -7
  2. package/dist/components/AdminDashboard/Table/ReactTable.js +123 -7
  3. package/dist/components/Chips/Chip.js +1 -2
  4. package/dist/components/Chips/Chip.styles.js +3 -2
  5. package/dist/components/Input/Input.js +33 -33
  6. package/dist/components/Input/MultiSelect.js +319 -0
  7. package/dist/components/Input/SearchInput.js +78 -0
  8. package/dist/components/Input/SearchInput.styles.js +25 -0
  9. package/dist/components/Input/Select.js +51 -28
  10. package/dist/components/Modal/SideModal.js +82 -0
  11. package/dist/components/Modal/SideModal.styles.js +21 -0
  12. package/dist/components/Payment/PaymentDetailsCard.js +189 -0
  13. package/dist/components/Payment/PaymentDisplay.js +2 -12
  14. package/dist/components/ProfileBox/ProfileBox.js +2 -1
  15. package/dist/components/Snackbar/Snackbar.js +193 -0
  16. package/dist/components/Snackbar/Snackbar.styles.js +97 -0
  17. package/dist/components/Snackbar/SnackbarProvider.js +81 -0
  18. package/dist/components/Snackbar/index.js +32 -0
  19. package/dist/components/Snackbar/useSnackbar.js +43 -0
  20. package/dist/components/StatusTag/StatusTag.js +175 -0
  21. package/dist/components/StatusTag/StatusTag.styles.js +37 -0
  22. package/dist/components/StepsProgress/StepIndicator.js +59 -0
  23. package/dist/components/StepsProgress/StepIndicator.styles.js +30 -0
  24. package/dist/components/TextLink/TextLink.styles.js +1 -1
  25. package/dist/components/Timeline/TimelineStep.js +2 -2
  26. package/dist/constants/globalVariables.js +41 -2
  27. package/dist/context/Checkbox/CheckboxContext.js +0 -1
  28. package/dist/index.js +66 -0
  29. package/dist/static/images/bmn2-logo.svg +9 -0
  30. package/dist/static/images/document-icon.svg +3 -0
  31. package/dist/static/images/plus-icon.svg +4 -0
  32. package/dist/static/images/search-icon.svg +3 -0
  33. package/dist/static/images/sent-icon.svg +10 -0
  34. package/dist/static/images/transfer-icon.svg +10 -0
  35. package/dist/utils/formatCurrencyValue.js +43 -3
  36. package/package.json +3 -2
  37. package/dist/components/2FA/EnterCode.stories.js +0 -35
  38. package/dist/components/2FA/disable-2fa-flow.stories.js +0 -31
  39. package/dist/components/2FA/enable-2fa-flow.stories.js +0 -31
  40. package/dist/components/2FA/login-with-otp-flow.stories.js +0 -31
  41. package/dist/components/2FA/main-flow.stories.js +0 -33
  42. package/dist/components/AccountBalance/AccountBalance.stories.js +0 -83
  43. package/dist/components/AdminDashboard/Table/ReactTable.stories.js +0 -406
  44. package/dist/components/AgreementItem/AgreementItem.stories.js +0 -105
  45. package/dist/components/AnalyticGraphs/Analytic.js +0 -541
  46. package/dist/components/AnalyticGraphs/Analytic.styles.js +0 -25
  47. package/dist/components/BackButton/BackButton.stories.js +0 -32
  48. package/dist/components/Background/Background.stories.js +0 -75
  49. package/dist/components/BarChart/BarChart.js +0 -263
  50. package/dist/components/BarChart/BarChart.stories.js +0 -66
  51. package/dist/components/BarChart/BarChart.styles.js +0 -26
  52. package/dist/components/BarChartLegend/BarChartLegend.js +0 -79
  53. package/dist/components/BarChartLegend/BarChartLegend.styles.js +0 -21
  54. package/dist/components/BasicTable/BasicTable.stories.js +0 -59
  55. package/dist/components/BlogPost/BlogPost.stories.js +0 -160
  56. package/dist/components/Button/Button.stories.js +0 -146
  57. package/dist/components/Button/GlareButton.stories.js +0 -132
  58. package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +0 -42
  59. package/dist/components/ChartBox/ChartBox.js +0 -41
  60. package/dist/components/ChartBox/ChartBox.stories.js +0 -17
  61. package/dist/components/ChartBox/ChartBox.styles.js +0 -27
  62. package/dist/components/ChartBox/ChartBoxDistribution.js +0 -27
  63. package/dist/components/ChartBox/ChartBoxDistribution.stories.js +0 -18
  64. package/dist/components/ChartLegend/ChartLegend.stories.js +0 -90
  65. package/dist/components/Checkbox/Checkbox.stories.js +0 -88
  66. package/dist/components/Checklist/ChecklistCard.stories.js +0 -102
  67. package/dist/components/Checklist/UserChecklist.js +0 -184
  68. package/dist/components/Checklist/UserChecklist.stories.js +0 -317
  69. package/dist/components/Chips/Chip.stories.js +0 -36
  70. package/dist/components/Chips/ChipsWrapper.stories.js +0 -47
  71. package/dist/components/ComponentScroll/ComponentScroll.stories.js +0 -111
  72. package/dist/components/CryptoAddress/CryptoAddress.stories.js +0 -205
  73. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +0 -70
  74. package/dist/components/DonutChart/DonutChart.stories.js +0 -54
  75. package/dist/components/FAQ/FAQ.stories.js +0 -76
  76. package/dist/components/Footer/Footer.stories.js +0 -49
  77. package/dist/components/Footer/FooterLayout.stories.js +0 -26
  78. package/dist/components/Footer/FooterMenu.stories.js +0 -113
  79. package/dist/components/Footer/mangopay.png +0 -0
  80. package/dist/components/Footer/mangopay.svg +0 -20
  81. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +0 -69
  82. package/dist/components/Form/Form.stories.js +0 -32
  83. package/dist/components/FullscreenCard/FullscreenCard.styles.js +0 -27
  84. package/dist/components/Header/Header.stories.js +0 -192
  85. package/dist/components/InfoIcon/InfoIcon.stories.js +0 -299
  86. package/dist/components/InfoPanel/InfoPanel.js +0 -124
  87. package/dist/components/Input/DatePickerInput.stories.js +0 -87
  88. package/dist/components/Input/Input.stories.js +0 -142
  89. package/dist/components/Input/InputPassword.stories.js +0 -80
  90. package/dist/components/Input/InputWithButton.stories.js +0 -75
  91. package/dist/components/Input/OtpInput.stories.js +0 -57
  92. package/dist/components/Input/RangeInput.stories.js +0 -58
  93. package/dist/components/Input/Select.stories.js +0 -139
  94. package/dist/components/InvestCalculator/InvestCalculator.stories.js +0 -135
  95. package/dist/components/InvestmentStat/InvestmentStat.stories.js +0 -52
  96. package/dist/components/KYCFlow/BasicInfo.js +0 -448
  97. package/dist/components/KYCFlow/Confirmation.js +0 -46
  98. package/dist/components/KYCFlow/DocumentFileUpload.js +0 -263
  99. package/dist/components/KYCFlow/DocumentScan.js +0 -75
  100. package/dist/components/KYCFlow/DocumentScanUpload.js +0 -251
  101. package/dist/components/KYCFlow/DocumentSelect.js +0 -118
  102. package/dist/components/KYCFlow/DocumentSuccess.js +0 -63
  103. package/dist/components/KYCFlow/DocumentUpload.js +0 -53
  104. package/dist/components/KYCFlow/DocumentVerificationType.js +0 -131
  105. package/dist/components/KYCFlow/FaceScan.js +0 -54
  106. package/dist/components/KYCFlow/FaceScanRecognition.js +0 -61
  107. package/dist/components/KYCFlow/FaceScanSuccess.js +0 -56
  108. package/dist/components/KYCFlow/Terms.js +0 -119
  109. package/dist/components/KYCFlow/_styles.js +0 -111
  110. package/dist/components/KYCFlow/index.js +0 -97
  111. package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +0 -29
  112. package/dist/components/LatestUpdate/LatestUpdate.stories.js +0 -58
  113. package/dist/components/Layout/Layout.stories.js +0 -60
  114. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +0 -66
  115. package/dist/components/LearnMorePage/LearnMore.stories.js +0 -48
  116. package/dist/components/LearnMorePage/LearnMoreItem.stories.js +0 -62
  117. package/dist/components/LearnMoreSection/LearnMore.stories.js +0 -30
  118. package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +0 -59
  119. package/dist/components/LoginModal/LoginModal.stories.js +0 -74
  120. package/dist/components/MatomoConnect/Matomo.js +0 -228
  121. package/dist/components/MatomoConnect/Matomo_fuckup.js +0 -387
  122. package/dist/components/Modal/Modal.stories.js +0 -75
  123. package/dist/components/Modal/NewVentureModal/NewVentureModal.stories.js +0 -150
  124. package/dist/components/Modal/PaymentModal.stories.js +0 -57
  125. package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +0 -67
  126. package/dist/components/Newsletter/Newsletter.stories.js +0 -16
  127. package/dist/components/NotificationContext/NotificationContext.js +0 -141
  128. package/dist/components/Number/Number.stories.js +0 -92
  129. package/dist/components/Pagination/Pagination.stories.js +0 -83
  130. package/dist/components/Pagination/PaginationControls.stories.js +0 -112
  131. package/dist/components/Payment/PaymentDisplay.stories.js +0 -302
  132. package/dist/components/Payment/TimerComponent.stories.js +0 -236
  133. package/dist/components/Process/Process.stories.js +0 -42
  134. package/dist/components/ProfileBadge/ProfileBadge.stories.js +0 -45
  135. package/dist/components/ProfileBox/ProfileBox.stories.js +0 -35
  136. package/dist/components/ProfileHeader/ProfileHeader.js +0 -252
  137. package/dist/components/ProfileHeader/ProfileHeader.styles.js +0 -65
  138. package/dist/components/ProfileStat/ProfileStat.stories.js +0 -66
  139. package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +0 -53
  140. package/dist/components/QRCode/QRCode.stories.js +0 -104
  141. package/dist/components/Radio/Radio.stories.js +0 -73
  142. package/dist/components/RefreshButton/RefreshButton.stories.js +0 -38
  143. package/dist/components/RegisterAlgorand/AlgoAddressName.js +0 -138
  144. package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +0 -443
  145. package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +0 -47
  146. package/dist/components/RegisterAlgorand/AlgoSuccess.js +0 -38
  147. package/dist/components/RegisterAlgorand/Algorand.stories.js +0 -80
  148. package/dist/components/RegisterAlgorand/ChooseWallet.js +0 -97
  149. package/dist/components/RegisterAlgorand/SelectProject.js +0 -89
  150. package/dist/components/RegisterAlgorand/_styles.js +0 -28
  151. package/dist/components/RegisterAlgorand/flow.js +0 -409
  152. package/dist/components/RegisterAlgorand/flowWithMemo.js +0 -410
  153. package/dist/components/RegisterAlgorand/index.js +0 -48
  154. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +0 -41
  155. package/dist/components/RegisterEthereum/EthAddressLedger.js +0 -226
  156. package/dist/components/RegisterEthereum/EthAddressMetamask.js +0 -204
  157. package/dist/components/RegisterEthereum/EthAddressName.js +0 -135
  158. package/dist/components/RegisterEthereum/EthConnectLedger.js +0 -194
  159. package/dist/components/RegisterEthereum/EthConnectMetamask.js +0 -35
  160. package/dist/components/RegisterEthereum/EthFinish.js +0 -41
  161. package/dist/components/RegisterEthereum/EthIntro.js +0 -95
  162. package/dist/components/RegisterEthereum/_styles.js +0 -28
  163. package/dist/components/RegisterEthereum/index.js +0 -68
  164. package/dist/components/RegisterModal/RegisterModal.stories.js +0 -49
  165. package/dist/components/RequestDataBox/RequestDataBox.stories.js +0 -37
  166. package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +0 -185
  167. package/dist/components/RiskQuestionnaire/_styles.js +0 -15
  168. package/dist/components/SEO/SEO.stories.js +0 -60
  169. package/dist/components/SideLine/SideLine.stories.js +0 -28
  170. package/dist/components/SigningSubflow/SignSubAddressMetamask.js +0 -137
  171. package/dist/components/SigningSubflow/SignSubConnectLedger.js +0 -150
  172. package/dist/components/SigningSubflow/SignSubConnectMetamask.js +0 -137
  173. package/dist/components/SigningSubflow/SignSubIntro.js +0 -55
  174. package/dist/components/SigningSubflow/SignSubSendLedger.js +0 -150
  175. package/dist/components/SigningSubflow/SignSubSendMetamask.js +0 -62
  176. package/dist/components/SigningSubflow/SignSubTransactionLedger.js +0 -161
  177. package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +0 -166
  178. package/dist/components/SigningSubflow/_styles.js +0 -34
  179. package/dist/components/SigningSubflow/index.js +0 -32
  180. package/dist/components/Slider/Slider.stories.js +0 -68
  181. package/dist/components/StepController/StepController.stories.js +0 -60
  182. package/dist/components/StepController/StepControllerProgress.stories.js +0 -49
  183. package/dist/components/StepsProgress/StepsProgress.stories.js +0 -49
  184. package/dist/components/Switch/Switch.stories.js +0 -81
  185. package/dist/components/Tabs/Tabs.stories.js +0 -36
  186. package/dist/components/TabsNav/TabNav.stories.js +0 -40
  187. package/dist/components/TabsNav/TabsNav.stories.js +0 -37
  188. package/dist/components/TeamOverview/TeamOverview.stories.js +0 -76
  189. package/dist/components/TermsModal/TermsModal.stories.js +0 -31
  190. package/dist/components/Text/Headline.stories.js +0 -48
  191. package/dist/components/Text/Text.stories.js +0 -70
  192. package/dist/components/Timeline/Timeline.stories.js +0 -393
  193. package/dist/components/ToDoList/ToDoList.stories.js +0 -133
  194. package/dist/components/ToDoList/ToDoListTask.stories.js +0 -70
  195. package/dist/components/TransactionDetails/TransactionDetails.stories.js +0 -55
  196. package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +0 -305
  197. package/dist/components/TransactionInfo/TransactionInfo.stories.js +0 -61
  198. package/dist/components/TwoFactorModal/TwoFactorModal.js +0 -100
  199. package/dist/components/VerifyEmailModal/VerifyEmailModal.stories.js +0 -59
  200. package/dist/components/headerHo/HeaderHo.stories.js +0 -35
  201. package/dist/components/icons/Arrow.stories.js +0 -42
  202. package/dist/components/icons/ArrowSimple.stories.js +0 -48
  203. package/dist/components/icons/Check.stories.js +0 -22
  204. package/dist/components/icons/Facebook.stories.js +0 -21
  205. package/dist/components/icons/Facebook_Logo.png +0 -0
  206. package/dist/components/icons/Info.stories.js +0 -16
  207. package/dist/components/icons/Instagram.stories.js +0 -21
  208. package/dist/components/icons/LI-In-Bug.png +0 -0
  209. package/dist/components/icons/LinkIcon.stories.js +0 -21
  210. package/dist/components/icons/LinkedIn.stories.js +0 -16
  211. package/dist/components/icons/Medium.stories.js +0 -16
  212. package/dist/components/icons/Reddit.stories.js +0 -21
  213. package/dist/components/icons/Share.stories.js +0 -16
  214. package/dist/components/icons/Telegram-Logo.png +0 -0
  215. package/dist/components/icons/Telegram.stories.js +0 -16
  216. package/dist/components/icons/Twitter.stories.js +0 -21
  217. package/dist/components/icons/X-logo-black.png +0 -0
  218. package/dist/components/icons/X.stories.js +0 -16
  219. package/dist/components/icons/Youtube.stories.js +0 -21
  220. package/dist/components/icons/youtube_social_circle_red.png +0 -0
  221. package/dist/components/taxId/TaxId.stories.js +0 -50
  222. package/dist/components/video/Video.stories.js +0 -52
@@ -1,90 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.ChartLegendFull = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _ChartLegend = require("./ChartLegend");
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _BasicTable = _interopRequireDefault(require("../BasicTable/BasicTable"));
11
- var _global = _interopRequireDefault(require("../../styles/global"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- var _default = exports.default = {
14
- title: 'Components Library/Chart Legend',
15
- component: _ChartLegend.ChartLegend,
16
- argTypes: {
17
- data: {
18
- type: 'array',
19
- defaultValue: [{
20
- value: 0
21
- }, {
22
- name: ''
23
- }, {
24
- color: ''
25
- }, {
26
- subname: ''
27
- }, {
28
- info: ''
29
- }],
30
- required: true
31
- },
32
- value: {
33
- type: 'number',
34
- required: true
35
- },
36
- name: {
37
- type: 'string'
38
- },
39
- color: {
40
- type: 'string',
41
- defaultValue: ''
42
- },
43
- subname: {
44
- type: 'string',
45
- defaultValue: ''
46
- },
47
- info: {
48
- type: 'string',
49
- defaultValue: ''
50
- }
51
- }
52
- };
53
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_ChartLegend.ChartLegend, args)));
54
- const Table = (balance, symbol, price, address, link, label) => /*#__PURE__*/_react.default.createElement(_BasicTable.default, {
55
- data: [{
56
- label: 'Token balance',
57
- value: balance.toString()
58
- }, {
59
- label: 'Token price',
60
- value: "".concat(symbol, " ").concat(price.toFixed(2))
61
- }, {
62
- label: 'Token value',
63
- value: "".concat(symbol, " ").concat((balance * price).toFixed(2))
64
- }, {
65
- label: label,
66
- value: address,
67
- isLink: true,
68
- link
69
- }]
70
- });
71
- const ChartLegendFull = exports.ChartLegendFull = Template.bind({});
72
- ChartLegendFull.args = {
73
- data: [{
74
- value: 1560,
75
- name: 'Name',
76
- color: 'red',
77
- subname: 'Sub Name',
78
- info: 'information',
79
- onNameClick: (e, data) => {
80
- e.preventDefault();
81
- e.stopPropagation();
82
- alert('name is clicked');
83
- },
84
- price: 10000,
85
- isPositive: false,
86
- marketValue: '20 %',
87
- marketInfo: '(30d change)',
88
- details: Table(1560, 'USD', 10000, 'some link', 'some label')
89
- }]
90
- };
@@ -1,88 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.CheckboxUnchecked = exports.CheckboxChecked = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _Checkbox = require("./Checkbox");
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- // import { Wrapper, Label, InputWrap } from './Input.styles'
13
- // import { useState } from 'react'
14
- var _default = exports.default = {
15
- title: 'Components Library/Checkbox',
16
- component: _Checkbox.Checkbox,
17
- argTypes: {
18
- id: {
19
- type: 'string',
20
- required: true
21
- },
22
- name: {
23
- type: 'string',
24
- required: true
25
- },
26
- text: {
27
- control: {
28
- type: 'object'
29
- }
30
- },
31
- label: {
32
- type: 'string',
33
- defaultValue: ''
34
- },
35
- value: {
36
- type: 'string'
37
- },
38
- checked: {
39
- type: 'boolean',
40
- defaultValue: false
41
- },
42
- large: {
43
- type: 'boolean',
44
- defaultValue: false
45
- },
46
- error: {
47
- type: 'boolean',
48
- defaultValue: false
49
- },
50
- touched: {
51
- type: 'boolean',
52
- defaultValue: false
53
- },
54
- disabled: {
55
- type: 'boolean',
56
- defaultValue: false
57
- },
58
- onChange: {
59
- type: 'function',
60
- action: 'onChange'
61
- },
62
- onClick: {
63
- type: 'function',
64
- action: 'onClick'
65
- },
66
- onBlur: {
67
- type: 'function',
68
- action: 'onBlur'
69
- },
70
- onFocus: {
71
- type: 'function',
72
- action: 'onFocus'
73
- },
74
- textStyle: {
75
- type: 'object'
76
- }
77
- }
78
- };
79
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_Checkbox.Checkbox, args)));
80
- const CheckboxUnchecked = exports.CheckboxUnchecked = Template.bind({});
81
- CheckboxUnchecked.args = {
82
- label: 'A Label'
83
- };
84
- const CheckboxChecked = exports.CheckboxChecked = Template.bind({});
85
- CheckboxChecked.args = {
86
- label: 'A Label',
87
- checked: true
88
- };
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.WithOnClick = exports.WithLink = exports.Missing = exports.InProgress = exports.GridOfCards = exports.DoneVerified = exports.DoneRegistered = exports.DoneApproved = exports.Disabled = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _ChecklistCard = _interopRequireDefault(require("./ChecklistCard"));
9
- var _global = _interopRequireDefault(require("../../styles/global"));
10
- var _styledComponents = _interopRequireDefault(require("styled-components"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- // Adjust path as needed
13
- var _default = exports.default = {
14
- title: 'Checklist/ChecklistCard',
15
- component: _ChecklistCard.default,
16
- decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(Story, null))]
17
- };
18
- const DoneRegistered = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
19
- iconState: "done",
20
- iconCopy: "REGISTERED",
21
- title: "Country of Residence",
22
- description: "We ask for your country of residence to ensure legal access to the right investment opportunities."
23
- });
24
- exports.DoneRegistered = DoneRegistered;
25
- const DoneVerified = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
26
- iconState: "done",
27
- iconCopy: "VERIFIED",
28
- title: "Verify Identity",
29
- description: "KYC is required to confirm your identity before you can invest or trade."
30
- });
31
- exports.DoneVerified = DoneVerified;
32
- const DoneApproved = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
33
- iconState: "done",
34
- iconCopy: "APPROVED",
35
- title: "Tax ID",
36
- description: "Some offers require you to provide your Tax ID before being able to invest in."
37
- });
38
- exports.DoneApproved = DoneApproved;
39
- const Missing = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
40
- iconState: "missing",
41
- iconCopy: "MISSING STEP",
42
- title: "Liquid Address",
43
- description: "This is your wallet address on the Liquid Network, required for token delivery."
44
- });
45
- exports.Missing = Missing;
46
- const InProgress = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
47
- iconState: "in_progress",
48
- iconCopy: "IN PROGRESS",
49
- title: "Verify Identity",
50
- description: "Our anti-fraud squad is still working."
51
- });
52
- exports.InProgress = InProgress;
53
- const WithLink = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
54
- iconState: "missing",
55
- iconCopy: "MISSING STEP",
56
- title: "Liquid Address",
57
- description: "Clicking this card will take you to the registration page.",
58
- link: "/register-liquid"
59
- });
60
- exports.WithLink = WithLink;
61
- const WithOnClick = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
62
- iconState: "done",
63
- iconCopy: "VERIFIED",
64
- title: "Clickable Card",
65
- description: "This card is clickable and calls an onClick handler.",
66
- onClick: () => alert('Card clicked!')
67
- });
68
- exports.WithOnClick = WithOnClick;
69
- const Disabled = () => /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
70
- iconState: "missing",
71
- iconCopy: "MISSING STEP",
72
- title: "Disabled Card",
73
- description: "This card is disabled and not interactive.",
74
- disabled: true
75
- });
76
- exports.Disabled = Disabled;
77
- const Grid = _styledComponents.default.div.withConfig({
78
- displayName: "ChecklistCardstories__Grid",
79
- componentId: "sc-no624-0"
80
- })(["display:grid;grid-template-columns:repeat(4,1fr);gap:32px;@media (max-width:900px){grid-template-columns:1fr;}"]);
81
- const GridOfCards = () => /*#__PURE__*/_react.default.createElement(Grid, null, /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
82
- iconState: "done",
83
- iconCopy: "REGISTERED",
84
- title: "Country of Residence",
85
- description: "We ask for your country of residence to ensure legal access to the right investment opportunities."
86
- }), /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
87
- iconState: "done",
88
- iconCopy: "VERIFIED",
89
- title: "Verify Identity",
90
- description: "KYC is required to confirm your identity before you can invest or trade."
91
- }), /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
92
- iconState: "missing",
93
- iconCopy: "MISSING STEP",
94
- title: "Liquid Address",
95
- description: "This is your wallet address on the Liquid Network, required for token delivery."
96
- }), /*#__PURE__*/_react.default.createElement(_ChecklistCard.default, {
97
- iconState: "in_progress",
98
- iconCopy: "IN PROGRESS",
99
- title: "Tax ID",
100
- description: "Some offers require you to provide your Tax ID before being able to invest in."
101
- }));
102
- exports.GridOfCards = GridOfCards;
@@ -1,184 +0,0 @@
1
- "use strict";
2
-
3
- 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); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.getVerifyIdentityChecklist = exports.default = exports.UserChecklist = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _ToDoList = _interopRequireWildcard(require("../ToDoList/ToDoList"));
11
- var _globalVariables = require("../../constants/globalVariables");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- 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); }
14
- 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; }
15
- 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
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
- 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
- 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
- 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
- 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
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
- var UserChecklist = function UserChecklist(props) {
23
- var _user$countryObj;
24
- var _props$user = props.user,
25
- user = _props$user === void 0 ? {} : _props$user,
26
- additionalTasks = props.additionalTasks,
27
- redirectCookie = props.redirectCookie,
28
- getTasksCount = props.getTasksCount,
29
- useRelativePath = props.useRelativePath,
30
- onTaxIdComplete = props.onTaxIdComplete;
31
- var isFromAllowedCountry = (_user$countryObj = user.countryObj) === null || _user$countryObj === void 0 ? void 0 : _user$countryObj.isAllowed;
32
- //const isFromAllowedCountry = isFromAllowedCountryFunction(user.country)
33
-
34
- var _useState = (0, _react.useState)([]),
35
- _useState2 = _slicedToArray(_useState, 2),
36
- mandatoryTasks = _useState2[0],
37
- setmandatoryTasks = _useState2[1];
38
- var _useState3 = (0, _react.useState)(0),
39
- _useState4 = _slicedToArray(_useState3, 2),
40
- mandatoryTasksCount = _useState4[0],
41
- setmandatoryTasksCount = _useState4[1];
42
- var _useState5 = (0, _react.useState)([]),
43
- _useState6 = _slicedToArray(_useState5, 2),
44
- walletTasks = _useState6[0],
45
- setwalletTasks = _useState6[1];
46
- var _useState7 = (0, _react.useState)(0),
47
- _useState8 = _slicedToArray(_useState7, 2),
48
- walletTasksCount = _useState8[0],
49
- setwalletTasksCount = _useState8[1];
50
- var _useState9 = (0, _react.useState)([]),
51
- _useState10 = _slicedToArray(_useState9, 2),
52
- optionalTasks = _useState10[0],
53
- setoptionalTasks = _useState10[1];
54
- (0, _react.useEffect)(function () {
55
- generateTodos(user);
56
- }, [user]);
57
- (0, _react.useEffect)(function () {
58
- //calculate mandatory count from tasks
59
- if (mandatoryTasks.length > 0) {
60
- if (isFromAllowedCountry) {
61
- var _mandatoryTasksCount = mandatoryTasks.reduce(function (count, task) {
62
- if (task.state === _ToDoList.ToDoTaskState.APPROVED || task.state === _ToDoList.ToDoTaskState.IN_PROGRESS) {
63
- return count;
64
- }
65
- return count + 1;
66
- }, 0);
67
- setmandatoryTasksCount(_mandatoryTasksCount);
68
- }
69
- }
70
- }, [mandatoryTasks, isFromAllowedCountry]);
71
- (0, _react.useEffect)(function () {
72
- //calculate wallet count from tasks
73
- if (walletTasks.length > 0) {
74
- if (isFromAllowedCountry) {
75
- var _walletTasksCount = walletTasks.reduce(function (count, task) {
76
- if (task.title === 'Liquid Address') {
77
- if (task.state === _ToDoList.ToDoTaskState.APPROVED || task.state === _ToDoList.ToDoTaskState.IN_PROGRESS) {
78
- return count;
79
- }
80
- return count + 1;
81
- }
82
- return count;
83
- }, 0);
84
- setwalletTasksCount(_walletTasksCount);
85
- }
86
- }
87
- }, [walletTasks, isFromAllowedCountry]);
88
- (0, _react.useEffect)(function () {
89
- //if you provide function to get tasks count, pass the counter into the function
90
- if (getTasksCount) {
91
- getTasksCount({
92
- mandatoryTasksCount: mandatoryTasksCount,
93
- walletTasksCount: walletTasksCount
94
- });
95
- }
96
- }, [mandatoryTasksCount, walletTasksCount, getTasksCount]);
97
- var generateTodos = function generateTodos(userData) {
98
- var country = user.country,
99
- user_type = user.user_type,
100
- _user$wallets = user.wallets,
101
- wallets = _user$wallets === void 0 ? [] : _user$wallets;
102
- var liquidWallets = wallets.filter(function (wallet) {
103
- return wallet.type === _globalVariables.walletTypes.LIQUID;
104
- }) || [];
105
- var platformURL = useRelativePath === true ? '' : "https://signup.".concat(_globalVariables.platformDomain);
106
- setmandatoryTasks([{
107
- title: user_type === _globalVariables.UserTypes.investor_entity ? 'Country of Entity Registration' : 'Country of Residence',
108
- message: !country ? "Please select your country of ".concat(user_type === _globalVariables.UserTypes.investor_entity ? 'entity registration' : 'residence') : !isFromAllowedCountry ? 'STOKR is not yet available where you live' : "Your country of ".concat(user_type === _globalVariables.UserTypes.investor_entity ? 'entity registration' : 'residence', " has been registered"),
109
- state: !country ? _ToDoList.ToDoTaskState.SKIPPED : !isFromAllowedCountry ? _ToDoList.ToDoTaskState.DENIED : _ToDoList.ToDoTaskState.APPROVED,
110
- link: "".concat(platformURL, "/country-of-residence")
111
- }, {
112
- title: user_type === _globalVariables.UserTypes.investor_entity ? 'Verify Entity' : 'Verify Identity',
113
- message: getVerifyIdentityChecklist(isFromAllowedCountry, user).message,
114
- state: getVerifyIdentityChecklist(isFromAllowedCountry, user).state,
115
- link: getVerifyIdentityChecklist(isFromAllowedCountry, user).hasLink && "".concat(platformURL, "/verify-identity")
116
- }]);
117
- setwalletTasks([{
118
- title: 'Liquid Address',
119
- 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',
120
- state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : liquidWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
121
- link: isFromAllowedCountry && "".concat(platformURL, "/register-liquid-securities")
122
- }]);
123
- var optionalTasks = [{
124
- title: 'Tax ID',
125
- message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
126
- state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
127
- openModal: _ToDoList.ToDoModal.TAX_ID,
128
- 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."
129
- }];
130
- setoptionalTasks(optionalTasks);
131
- };
132
- return /*#__PURE__*/_react.default.createElement(_ToDoList.default, _extends({}, props, {
133
- mandatoryTasks: mandatoryTasks,
134
- walletsTasks: walletTasks,
135
- optionalTasks: optionalTasks,
136
- additionalTasks: additionalTasks,
137
- redirectCookie: redirectCookie,
138
- mandatoryTasksCount: mandatoryTasksCount,
139
- walletsTasksCount: walletTasksCount,
140
- pendingTasksCount: mandatoryTasksCount + walletTasksCount
141
- }));
142
- };
143
- exports.UserChecklist = UserChecklist;
144
- var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllowedCountry, user) {
145
- var kyc_status = user.kyc_status,
146
- user_type = user.user_type;
147
- var message;
148
- var state;
149
- var hasLink = false;
150
- if (!isFromAllowedCountry) {
151
- message = 'Sorry, you are living in a country where this is not available.';
152
- state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
153
- } else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
154
- message = user_type === _globalVariables.UserTypes.investor_entity ? 'Submit your entity documents for verification.' : 'Submit identity verification for compliance clearance.';
155
- state = _ToDoList.ToDoTaskState.SKIPPED;
156
- hasLink = true;
157
- } 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') {
158
- message = 'Identity verification is in progress.';
159
- state = _ToDoList.ToDoTaskState.IN_PROGRESS;
160
- } else if (kyc_status.toUpperCase() === 'ACCEPTED') {
161
- message = user_type === _globalVariables.UserTypes.investor_entity ? 'Entity verification complete.' : 'Identity verification complete.';
162
- state = _ToDoList.ToDoTaskState.APPROVED;
163
- } else if (kyc_status.toUpperCase() === 'REAPPLY' || kyc_status.toUpperCase() === 'CANCELLED') {
164
- message = user_type === _globalVariables.UserTypes.investor_entity ? 'Please re-verify your entity documentation.' : 'Please re-verify your identity.';
165
- state = _ToDoList.ToDoTaskState.DENIED;
166
- hasLink = true;
167
- }
168
- return {
169
- message: message,
170
- state: state,
171
- hasLink: hasLink
172
- };
173
- };
174
- exports.getVerifyIdentityChecklist = getVerifyIdentityChecklist;
175
- UserChecklist.propTypes = {
176
- user: _propTypes.default.object.isRequired,
177
- additionalTasks: _propTypes.default.any,
178
- redirectCookie: _propTypes.default.bool,
179
- getTasksCount: _propTypes.default.func,
180
- useRelativePath: _propTypes.default.bool,
181
- onTaxIdComplete: _propTypes.default.func
182
- };
183
- var _default = UserChecklist;
184
- exports.default = _default;