@stokr/components-library 0.6.7 → 0.6.8

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 (560) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/CHANGELOG.md +7 -0
  3. package/Dockerfile +20 -0
  4. package/build/asset-manifest.json +45 -0
  5. package/build/favicon.ico +0 -0
  6. package/build/index.html +1 -0
  7. package/build/logo192.png +0 -0
  8. package/build/logo512.png +0 -0
  9. package/build/manifest.json +25 -0
  10. package/build/robots.txt +3 -0
  11. package/build/static/css/main.e30a9d15.css +15 -0
  12. package/build/static/css/main.e30a9d15.css.map +1 -0
  13. package/build/static/js/main.3e5959c7.js +3 -0
  14. package/build/static/js/main.3e5959c7.js.LICENSE.txt +164 -0
  15. package/build/static/js/main.3e5959c7.js.map +1 -0
  16. package/build/static/media/Ionicons.4e528d6445ca1974c313.woff +0 -0
  17. package/build/static/media/Ionicons.643c37f102b41f7f90c3.woff2 +0 -0
  18. package/build/static/media/Ionicons.98b7d3182f652f021bc3.ttf +0 -0
  19. package/build/static/media/OpenSans-Bold.9bea22b57dc165ed4382.ttf +0 -0
  20. package/build/static/media/OpenSans-Bold.a750292d6a0b5a760679.woff +0 -0
  21. package/build/static/media/OpenSans-Bold.cbfc24090ef8bacab132.woff2 +0 -0
  22. package/build/static/media/OpenSans-ExtraBold.21e493d43617de76dbc7.woff2 +0 -0
  23. package/build/static/media/OpenSans-ExtraBold.81f3ef07b7952e249da1.woff +0 -0
  24. package/build/static/media/OpenSans-ExtraBold.bcb6531cf820152b7538.ttf +0 -0
  25. package/build/static/media/OpenSans-Light.179ef2df02cb0b68c9fd.woff2 +0 -0
  26. package/build/static/media/OpenSans-Light.55053cc0a8e6482eca64.ttf +0 -0
  27. package/build/static/media/OpenSans-Light.c6a4bc1bd034d6303053.woff +0 -0
  28. package/build/static/media/OpenSans-Regular.3caa0d4f9b7d58668066.woff2 +0 -0
  29. package/build/static/media/OpenSans-Regular.9ec738fbb66068dc1ca7.woff +0 -0
  30. package/build/static/media/OpenSans-Regular.d97d7385fe8771611848.ttf +0 -0
  31. package/build/static/media/OpenSans-SemiBold.311956ded96d3fd2813d.woff2 +0 -0
  32. package/build/static/media/OpenSans-SemiBold.39f5961b2d3eb4aa5bf5.woff +0 -0
  33. package/build/static/media/OpenSans-SemiBold.d2b1865643b98c0e8b54.ttf +0 -0
  34. package/build/static/media/address-refreshing.5fbb0cc56c384480118a.gif +0 -0
  35. package/build/static/media/arrow-down-black.fe92da3ac6ed16b45bf57713df82cea2.svg +21 -0
  36. package/build/static/media/avatar-placeholder.488a33b3f080a43e0d43.png +0 -0
  37. package/build/static/media/icomoon.2640959b1f9381cde047.eot +0 -0
  38. package/build/static/media/icomoon.35bce49b15feeae93572c36a08feecd9.svg +47 -0
  39. package/build/static/media/icomoon.4c3c428d0ce82f840710.woff +0 -0
  40. package/build/static/media/icomoon.a1d7666a48f976227722.ttf +0 -0
  41. package/build/static/media/lemonway.33e88c3a49e7ac73e3a9.png +0 -0
  42. package/build/static/media/sicos-logo.7fa3ac9d583b52c3987da529da67cb15.svg +1 -0
  43. package/build/static/media/slick.2630a3e3eab21c607e21.svg +14 -0
  44. package/build/static/media/slick.295183786cd8a1389865.woff +0 -0
  45. package/build/static/media/slick.a4e97f5a2a64f0ab1323.eot +0 -0
  46. package/build/static/media/slick.c94f7671dcc99dce43e2.ttf +0 -0
  47. package/build/static/media/whales.7a1e9453670d08b8b76a.png +0 -0
  48. package/buildpushndeploy.sh +9 -0
  49. package/devops/Dockerfile +20 -0
  50. package/devops/Jenkinsfile +56 -0
  51. package/devops/ansible/docker-stack-deploy.yml +32 -0
  52. package/devops/ansible/hosts.ini +7 -0
  53. package/devops/docker-compose.yml +25 -0
  54. package/dist/api/StokrWeb3.js +184 -0
  55. package/dist/api/fetchData.js +76 -0
  56. package/dist/api/fetchDataPublic.js +65 -0
  57. package/dist/components/AccountBalance/AccountBalance.js +53 -0
  58. package/dist/components/AccountBalance/AccountBalance.stories.js +88 -0
  59. package/dist/components/AccountBalance/AccountBalance.styles.js +40 -0
  60. package/dist/components/AdminDashboard/Table/Table.js +170 -0
  61. package/dist/components/AdminDashboard/Table/Table.styles.js +79 -0
  62. package/dist/components/AgreementItem/AgreementItem.js +51 -0
  63. package/dist/components/AgreementItem/AgreementItem.stories.js +109 -0
  64. package/dist/components/AgreementItem/AgreementItem.styles.js +35 -0
  65. package/dist/components/AnalyticGraphs/Analytic.js +781 -0
  66. package/dist/components/AnalyticGraphs/Analytic.styles.js +37 -0
  67. package/dist/components/BackButton/BackButton.js +32 -0
  68. package/dist/components/BackButton/BackButton.stories.js +35 -0
  69. package/dist/components/BackButton/BackButton.styles.js +76 -0
  70. package/dist/components/Background/Background.js +45 -0
  71. package/dist/components/Background/Background.stories.js +78 -0
  72. package/dist/components/Background/Background.styles.js +76 -0
  73. package/dist/components/BarChart/BarChart.js +304 -0
  74. package/dist/components/BarChart/BarChart.stories.js +47 -0
  75. package/dist/components/BarChart/BarChart.styles.js +33 -0
  76. package/dist/components/BarChartLegend/BarChartLegend.js +106 -0
  77. package/dist/components/BarChartLegend/BarChartLegend.styles.js +26 -0
  78. package/dist/components/BasicTable/BasicTable.js +32 -0
  79. package/dist/components/BasicTable/BasicTable.stories.js +63 -0
  80. package/dist/components/BasicTable/BasicTable.styles.js +52 -0
  81. package/dist/components/Button/Button.stories.js +79 -0
  82. package/dist/components/Button/Button.styles.js +83 -0
  83. package/dist/components/ButtonContainer/ButtonContainer.styles.js +18 -0
  84. package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +45 -0
  85. package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +34 -0
  86. package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +34 -0
  87. package/dist/components/ChartBox/ChartBox.js +44 -0
  88. package/dist/components/ChartBox/ChartBox.stories.js +20 -0
  89. package/dist/components/ChartBox/ChartBox.styles.js +33 -0
  90. package/dist/components/ChartBox/ChartBoxDistribution.js +30 -0
  91. package/dist/components/ChartBox/ChartBoxDistribution.stories.js +21 -0
  92. package/dist/components/ChartLegend/ChartLegend.js +62 -0
  93. package/dist/components/ChartLegend/ChartLegend.stories.js +87 -0
  94. package/dist/components/ChartLegend/ChartLegend.styles.js +64 -0
  95. package/dist/components/Checkbox/Checkbox.js +116 -0
  96. package/dist/components/Checkbox/Checkbox.stories.js +92 -0
  97. package/dist/components/Checkbox/Checkbox.styles.js +45 -0
  98. package/dist/components/Checklist/UserChecklist.js +284 -0
  99. package/dist/components/Checklist/UserChecklist.stories.js +143 -0
  100. package/dist/components/ComponentScroll/ComponentScroll.js +100 -0
  101. package/dist/components/ComponentScroll/ComponentScroll.stories.js +102 -0
  102. package/dist/components/ComponentScroll/ComponentScroll.styles.js +66 -0
  103. package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +68 -0
  104. package/dist/components/CryptoAddress/ComponentWrap.js +37 -0
  105. package/dist/components/CryptoAddress/CryptoAddress.js +145 -0
  106. package/dist/components/CryptoAddress/CryptoAddress.stories.js +173 -0
  107. package/dist/components/CryptoAddress/CryptoAddress.styles.js +186 -0
  108. package/dist/components/CryptoAddress/RadioWrap.js +49 -0
  109. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +54 -0
  110. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +74 -0
  111. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +67 -0
  112. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +40 -0
  113. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +59 -0
  114. package/dist/components/DonutChart/DonutChart.js +182 -0
  115. package/dist/components/DonutChart/DonutChart.stories.js +40 -0
  116. package/dist/components/DonutChart/DonutChart.styles.js +50 -0
  117. package/dist/components/DoubleButton/DoubleButton.styles.js +22 -0
  118. package/dist/components/ErrorMessage/ErrorMessage.styles.js +15 -0
  119. package/dist/components/FAQ/FAQ.js +75 -0
  120. package/dist/components/FAQ/FAQ.stories.js +74 -0
  121. package/dist/components/FAQ/FAQ.styles.js +48 -0
  122. package/dist/components/Footer/Footer.js +66 -0
  123. package/dist/components/Footer/Footer.stories.js +54 -0
  124. package/dist/components/Footer/Footer.styles.js +74 -0
  125. package/dist/components/Footer/FooterLayout.js +125 -0
  126. package/dist/components/Footer/FooterLayout.stories.js +31 -0
  127. package/dist/components/Footer/FooterMenu.js +117 -0
  128. package/dist/components/Footer/FooterMenu.stories.js +121 -0
  129. package/dist/components/Footer/FooterMenu.styles.js +80 -0
  130. package/dist/components/Footer/index.js +27 -0
  131. package/dist/components/Footer/lemonway.png +0 -0
  132. package/dist/components/Footer/sicos-logo.svg +1 -0
  133. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +127 -0
  134. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +42 -0
  135. package/dist/components/Form/Form.js +68 -0
  136. package/dist/components/Form/Form.stories.js +35 -0
  137. package/dist/components/Form/Form.styles.js +59 -0
  138. package/dist/components/FullscreenCard/FullscreenCard.styles.js +32 -0
  139. package/dist/components/Grid/Grid.styles.js +68 -0
  140. package/dist/components/Header/Header.js +457 -0
  141. package/dist/components/Header/Header.stories.js +190 -0
  142. package/dist/components/Header/Header.styles.js +182 -0
  143. package/dist/components/Icon/Icon.style.js +71 -0
  144. package/dist/components/InfoIcon/InfoIcon.js +50 -0
  145. package/dist/components/InfoIcon/InfoIcon.stories.js +52 -0
  146. package/dist/components/InfoIcon/InfoIcon.styles.js +31 -0
  147. package/dist/components/InfoPanel/InfoPanel.js +146 -0
  148. package/dist/components/Input/DatePickerInput.js +85 -0
  149. package/dist/components/Input/DatePickerInput.stories.js +91 -0
  150. package/dist/components/Input/DatePickerInput.styles.js +29 -0
  151. package/dist/components/Input/Input.js +108 -0
  152. package/dist/components/Input/Input.stories.js +148 -0
  153. package/dist/components/Input/Input.styles.js +53 -0
  154. package/dist/components/Input/InputPassword.js +151 -0
  155. package/dist/components/Input/InputPassword.stories.js +85 -0
  156. package/dist/components/Input/InputPassword.styles.js +80 -0
  157. package/dist/components/Input/RangeInput.js +60 -0
  158. package/dist/components/Input/RangeInput.stories.js +59 -0
  159. package/dist/components/Input/RangeInput.styles.js +53 -0
  160. package/dist/components/Input/Select.js +148 -0
  161. package/dist/components/Input/Select.stories.js +142 -0
  162. package/dist/components/Input/Select.styles.js +65 -0
  163. package/dist/components/InvestCalculator/InvestCalculator.js +367 -0
  164. package/dist/components/InvestCalculator/InvestCalculator.stories.js +137 -0
  165. package/dist/components/InvestCalculator/InvestCalculator.styles.js +66 -0
  166. package/dist/components/InvestmentStat/InvestmentStat.js +40 -0
  167. package/dist/components/InvestmentStat/InvestmentStat.stories.js +56 -0
  168. package/dist/components/InvestmentStat/InvestmentStat.styles.js +43 -0
  169. package/dist/components/KYCFlow/BasicInfo.js +489 -0
  170. package/dist/components/KYCFlow/Confirmation.js +51 -0
  171. package/dist/components/KYCFlow/DocumentFileUpload.js +276 -0
  172. package/dist/components/KYCFlow/DocumentScan.js +74 -0
  173. package/dist/components/KYCFlow/DocumentScanUpload.js +258 -0
  174. package/dist/components/KYCFlow/DocumentSelect.js +148 -0
  175. package/dist/components/KYCFlow/DocumentSuccess.js +64 -0
  176. package/dist/components/KYCFlow/DocumentUpload.js +54 -0
  177. package/dist/components/KYCFlow/DocumentVerificationType.js +161 -0
  178. package/dist/components/KYCFlow/FaceScan.js +55 -0
  179. package/dist/components/KYCFlow/FaceScanRecognition.js +60 -0
  180. package/dist/components/KYCFlow/FaceScanSuccess.js +59 -0
  181. package/dist/components/KYCFlow/Terms.js +142 -0
  182. package/dist/components/KYCFlow/_styles.js +160 -0
  183. package/dist/components/KYCFlow/index.js +97 -0
  184. package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +41 -0
  185. package/dist/components/LatestUpdate/LatestUpdate.js +51 -0
  186. package/dist/components/LatestUpdate/LatestUpdate.stories.js +62 -0
  187. package/dist/components/LatestUpdate/LatestUpdate.styles.js +71 -0
  188. package/dist/components/Layout/Layout-func-no-work.js +78 -0
  189. package/dist/components/Layout/Layout.js +103 -0
  190. package/dist/components/Layout/Layout.stories.js +67 -0
  191. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +47 -0
  192. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +70 -0
  193. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +43 -0
  194. package/dist/components/LearnMorePage/LearnMore.js +255 -0
  195. package/dist/components/LearnMorePage/LearnMore.shared.styles.js +40 -0
  196. package/dist/components/LearnMorePage/LearnMore.stories.js +51 -0
  197. package/dist/components/LearnMorePage/LearnMore.styles.js +120 -0
  198. package/dist/components/LearnMorePage/LearnMoreExampleObject.js +87 -0
  199. package/dist/components/LearnMorePage/LearnMoreItem.js +75 -0
  200. package/dist/components/LearnMorePage/LearnMoreItem.stories.js +65 -0
  201. package/dist/components/LearnMorePage/LearnMoreItem.styles.js +87 -0
  202. package/dist/components/LearnMoreSection/LearnMore.js +199 -0
  203. package/dist/components/LearnMoreSection/LearnMore.stories.js +33 -0
  204. package/dist/components/LearnMoreSection/LearnMore.styles.js +73 -0
  205. package/dist/components/LearnMoreSection/LearnMoreItem.js +52 -0
  206. package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +62 -0
  207. package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +50 -0
  208. package/dist/components/LoginModal/LoginModal.js +163 -0
  209. package/dist/components/MainMenu/DynamicMainMenu.js +50 -0
  210. package/dist/components/MainMenu/MainMenu.js +262 -0
  211. package/dist/components/MainMenu/MainMenu.styles.js +124 -0
  212. package/dist/components/MatomoConnect/Matomo.js +485 -0
  213. package/dist/components/MatomoConnect/Matomo_fuckup.js +383 -0
  214. package/dist/components/MenuNav/MenuNav.styles.js +42 -0
  215. package/dist/components/Modal/Modal.js +135 -0
  216. package/dist/components/Modal/Modal.stories.js +82 -0
  217. package/dist/components/Modal/Modal.styles.js +140 -0
  218. package/dist/components/MultiProgressBar/MultiProgressBar.js +48 -0
  219. package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +72 -0
  220. package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +41 -0
  221. package/dist/components/Newsletter/Newsletter.js +139 -0
  222. package/dist/components/Newsletter/Newsletter.stories.js +19 -0
  223. package/dist/components/Newsletter/Newsletter.styles.js +83 -0
  224. package/dist/components/NotificationContext/NotificationContext.js +173 -0
  225. package/dist/components/NotificationContext/NotificationContext.stories.js +33 -0
  226. package/dist/components/NotificationCounter/NotificationCounter.styles.js +22 -0
  227. package/dist/components/Number/Number.js +35 -0
  228. package/dist/components/Number/Number.stories.js +41 -0
  229. package/dist/components/Number/Number.styles.js +20 -0
  230. package/dist/components/PageTransition/PageTransition.js +57 -0
  231. package/dist/components/Process/Process.stories.js +47 -0
  232. package/dist/components/Process/Process.styles.js +33 -0
  233. package/dist/components/ProfileBadge/ProfileBadge.js +53 -0
  234. package/dist/components/ProfileBadge/ProfileBadge.stories.js +48 -0
  235. package/dist/components/ProfileBadge/ProfileBadge.styles.js +32 -0
  236. package/dist/components/ProfileBox/ProfileBox.js +39 -0
  237. package/dist/components/ProfileBox/ProfileBox.stories.js +38 -0
  238. package/dist/components/ProfileBox/ProfileBox.styles.js +49 -0
  239. package/dist/components/ProfileHeader/ProfileHeader-CLb4.js +477 -0
  240. package/dist/components/ProfileHeader/ProfileHeader.js +330 -0
  241. package/dist/components/ProfileHeader/ProfileHeader.styles.js +87 -0
  242. package/dist/components/ProfileStat/ProfileStat.js +42 -0
  243. package/dist/components/ProfileStat/ProfileStat.stories.js +71 -0
  244. package/dist/components/ProfileStat/ProfileStat.styles.js +42 -0
  245. package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +69 -0
  246. package/dist/components/ROI/ROI.js +312 -0
  247. package/dist/components/ROI/ROI.styles.js +63 -0
  248. package/dist/components/ROI/ROIChart.js +469 -0
  249. package/dist/components/ROI/ROIChart.styles.js +33 -0
  250. package/dist/components/ROI/ROIModal.js +91 -0
  251. package/dist/components/ROI/ROIScenarioBox.js +55 -0
  252. package/dist/components/ROI/ROIScenarioBox.styles.js +52 -0
  253. package/dist/components/Radio/Radio.js +68 -0
  254. package/dist/components/Radio/Radio.stories.js +76 -0
  255. package/dist/components/Radio/Radio.styles.js +31 -0
  256. package/dist/components/RefreshButton/RefreshButton.js +21 -0
  257. package/dist/components/RefreshButton/RefreshButton.stories.js +42 -0
  258. package/dist/components/RefreshButton/RefreshButton.styles.js +39 -0
  259. package/dist/components/RegisterAlgorand/AlgoAddressName.js +138 -0
  260. package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +444 -0
  261. package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +47 -0
  262. package/dist/components/RegisterAlgorand/AlgoSuccess.js +38 -0
  263. package/dist/components/RegisterAlgorand/Algorand.stories.js +78 -0
  264. package/dist/components/RegisterAlgorand/ChooseWallet.js +97 -0
  265. package/dist/components/RegisterAlgorand/SelectProject.js +90 -0
  266. package/dist/components/RegisterAlgorand/_styles.js +28 -0
  267. package/dist/components/RegisterAlgorand/flow.js +409 -0
  268. package/dist/components/RegisterAlgorand/flowWithMemo.js +410 -0
  269. package/dist/components/RegisterAlgorand/index.js +48 -0
  270. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +40 -0
  271. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +33 -0
  272. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +16 -0
  273. package/dist/components/RegisterEthereum/EthAddressLedger.js +226 -0
  274. package/dist/components/RegisterEthereum/EthAddressMetamask.js +205 -0
  275. package/dist/components/RegisterEthereum/EthAddressName.js +135 -0
  276. package/dist/components/RegisterEthereum/EthConnectLedger.js +194 -0
  277. package/dist/components/RegisterEthereum/EthConnectMetamask.js +35 -0
  278. package/dist/components/RegisterEthereum/EthFinish.js +41 -0
  279. package/dist/components/RegisterEthereum/EthIntro.js +95 -0
  280. package/dist/components/RegisterEthereum/_styles.js +28 -0
  281. package/dist/components/RegisterEthereum/index.js +68 -0
  282. package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.js +106 -0
  283. package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +66 -0
  284. package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +48 -0
  285. package/dist/components/RegisterLiquidSteps/complete.js +37 -0
  286. package/dist/components/RegisterLiquidSteps/flow.js +197 -0
  287. package/dist/components/RegisterLiquidSteps/index.js +52 -0
  288. package/dist/components/RegisterLiquidSteps/register-liquid.js +240 -0
  289. package/dist/components/RegisterModal/RegisterModal.js +180 -0
  290. package/dist/components/RegisterModal/RegisterModal.stories.js +46 -0
  291. package/dist/components/RequestDataBox/RequestDataBox.js +31 -0
  292. package/dist/components/RequestDataBox/RequestDataBox.stories.js +40 -0
  293. package/dist/components/RequestDataBox/RequestDataBox.styles.js +31 -0
  294. package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +185 -0
  295. package/dist/components/RiskQuestionnaire/_styles.js +15 -0
  296. package/dist/components/SEO/SEO.js +71 -0
  297. package/dist/components/SEO/SEO.stories.js +64 -0
  298. package/dist/components/SectionTitle/SectionTitle.styles.js +15 -0
  299. package/dist/components/SideLine/SideLine.js +15 -0
  300. package/dist/components/SideLine/SideLine.stories.js +31 -0
  301. package/dist/components/SideLine/SideLine.styles.js +26 -0
  302. package/dist/components/SigningSubflow/SignSubAddressMetamask.js +137 -0
  303. package/dist/components/SigningSubflow/SignSubConnectLedger.js +150 -0
  304. package/dist/components/SigningSubflow/SignSubConnectMetamask.js +137 -0
  305. package/dist/components/SigningSubflow/SignSubIntro.js +54 -0
  306. package/dist/components/SigningSubflow/SignSubSendLedger.js +150 -0
  307. package/dist/components/SigningSubflow/SignSubSendMetamask.js +62 -0
  308. package/dist/components/SigningSubflow/SignSubTransactionLedger.js +161 -0
  309. package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +166 -0
  310. package/dist/components/SigningSubflow/_styles.js +45 -0
  311. package/dist/components/SigningSubflow/index.js +74 -0
  312. package/dist/components/Slider/Slider.js +50 -0
  313. package/dist/components/Slider/Slider.stories.js +72 -0
  314. package/dist/components/Slider/Slider.styles.js +23 -0
  315. package/dist/components/SpanButton/SpanButton.styles.js +15 -0
  316. package/dist/components/StatusBadge/StatusBadge.styles.js +20 -0
  317. package/dist/components/StepController/StepController.js +111 -0
  318. package/dist/components/StepController/StepController.stories.js +63 -0
  319. package/dist/components/StepController/StepController.styles.js +26 -0
  320. package/dist/components/StepController/StepControllerContext.js +104 -0
  321. package/dist/components/StepController/StepControllerProgress.js +40 -0
  322. package/dist/components/StepController/StepControllerProgress.stories.js +52 -0
  323. package/dist/components/StepsProgress/StepsProgress.js +128 -0
  324. package/dist/components/StepsProgress/StepsProgress.stories.js +50 -0
  325. package/dist/components/StepsProgress/StepsProgress.styles.js +36 -0
  326. package/dist/components/StokrLoader/StokrLoader.js +32 -0
  327. package/dist/components/StokrLoader/media.js +27 -0
  328. package/dist/components/SvgIcons/AdminBadgeSvg.js +26 -0
  329. package/dist/components/SvgIcons/CameraSvg.js +36 -0
  330. package/dist/components/SvgIcons/CapsLockSvg.js +31 -0
  331. package/dist/components/SvgIcons/DocumentBackSvg.js +35 -0
  332. package/dist/components/SvgIcons/DocumentSmallSvg.js +61 -0
  333. package/dist/components/SvgIcons/DocumentSvg.js +38 -0
  334. package/dist/components/SvgIcons/Early.js +24 -0
  335. package/dist/components/SvgIcons/EthSvg.js +40 -0
  336. package/dist/components/SvgIcons/EurSvg.js +26 -0
  337. package/dist/components/SvgIcons/FaceScanIconSvg.js +31 -0
  338. package/dist/components/SvgIcons/FourSvg.js +21 -0
  339. package/dist/components/SvgIcons/Glassess.js +29 -0
  340. package/dist/components/SvgIcons/LogoSvg.js +24 -0
  341. package/dist/components/SvgIcons/OneSvg.js +23 -0
  342. package/dist/components/SvgIcons/PassportSvg.js +56 -0
  343. package/dist/components/SvgIcons/RefreshSvg.js +27 -0
  344. package/dist/components/SvgIcons/SocialFacebook.js +25 -0
  345. package/dist/components/SvgIcons/SocialInstagram.js +26 -0
  346. package/dist/components/SvgIcons/SocialLinkedIn.js +25 -0
  347. package/dist/components/SvgIcons/SocialMedium.js +25 -0
  348. package/dist/components/SvgIcons/SocialReddit.js +25 -0
  349. package/dist/components/SvgIcons/SocialTelegram.js +25 -0
  350. package/dist/components/SvgIcons/SocialTwitter.js +25 -0
  351. package/dist/components/SvgIcons/SocialYoutube.js +25 -0
  352. package/dist/components/SvgIcons/ThreeSvg.js +20 -0
  353. package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +82 -0
  354. package/dist/components/SvgIcons/TwoSvg.js +23 -0
  355. package/dist/components/SvgIcons/UpdateDefaultSvg.js +29 -0
  356. package/dist/components/SvgIcons/UpdateHardSvg.js +25 -0
  357. package/dist/components/SvgIcons/UpdateSoftSvg.js +27 -0
  358. package/dist/components/SvgIcons/UploadSvg.js +34 -0
  359. package/dist/components/SvgIcons/VerifiedBadge.js +23 -0
  360. package/dist/components/SvgIcons/index.js +223 -0
  361. package/dist/components/Switch/Switch.js +70 -0
  362. package/dist/components/Switch/Switch.stories.js +86 -0
  363. package/dist/components/Switch/Switch.styles.js +47 -0
  364. package/dist/components/Tabs/Tabs.js +70 -0
  365. package/dist/components/Tabs/Tabs.stories.js +29 -0
  366. package/dist/components/Tabs/Tabs.styles.js +18 -0
  367. package/dist/components/TabsNav/TabNav.js +31 -0
  368. package/dist/components/TabsNav/TabNav.stories.js +44 -0
  369. package/dist/components/TabsNav/TabsNav.js +43 -0
  370. package/dist/components/TabsNav/TabsNav.stories.js +26 -0
  371. package/dist/components/TabsNav/TabsNav.styles.js +43 -0
  372. package/dist/components/TeamOverview/TeamOverview.js +125 -0
  373. package/dist/components/TeamOverview/TeamOverview.stories.js +80 -0
  374. package/dist/components/TeamOverview/TeamOverview.styles.js +81 -0
  375. package/dist/components/Text/Headline.js +29 -0
  376. package/dist/components/Text/Headline.stories.js +51 -0
  377. package/dist/components/Text/StyledText.js +19 -0
  378. package/dist/components/Text/Text.stories.js +71 -0
  379. package/dist/components/Text/Text.styles.js +40 -0
  380. package/dist/components/TextLink/TextLink.styles.js +30 -0
  381. package/dist/components/ToDoList/ToDoList.js +184 -0
  382. package/dist/components/ToDoList/ToDoList.stories.js +137 -0
  383. package/dist/components/ToDoList/ToDoList.styles.js +83 -0
  384. package/dist/components/ToDoList/ToDoListTask.js +118 -0
  385. package/dist/components/ToDoList/ToDoListTask.stories.js +72 -0
  386. package/dist/components/ToDoList/ToDoListTask.styles.js +74 -0
  387. package/dist/components/TransactionDetails/TransactionDetails.js +46 -0
  388. package/dist/components/TransactionDetails/TransactionDetails.stories.js +59 -0
  389. package/dist/components/TransactionDetails/TransactionDetails.styles.js +31 -0
  390. package/dist/components/TransactionInfo/TransactionInfo.js +58 -0
  391. package/dist/components/TransactionInfo/TransactionInfo.stories.js +64 -0
  392. package/dist/components/TransactionInfo/TransactionInfo.styles.js +54 -0
  393. package/dist/components/TwoFactorModal/TwoFactorModal.js +122 -0
  394. package/dist/components/breakdown/Breakdown.js +56 -0
  395. package/dist/components/breakdown/index.js +27 -0
  396. package/dist/components/context/Auth.js +207 -0
  397. package/dist/components/context/AuthContext.js +335 -0
  398. package/dist/components/icons/Arrow.js +70 -0
  399. package/dist/components/icons/Arrow.stories.js +49 -0
  400. package/dist/components/icons/ArrowSimple.js +59 -0
  401. package/dist/components/icons/ArrowSimple.stories.js +55 -0
  402. package/dist/components/icons/Check.js +43 -0
  403. package/dist/components/icons/Check.stories.js +25 -0
  404. package/dist/components/icons/Facebook.js +26 -0
  405. package/dist/components/icons/Facebook.stories.js +24 -0
  406. package/dist/components/icons/Info.js +55 -0
  407. package/dist/components/icons/Info.stories.js +19 -0
  408. package/dist/components/icons/Instagram.js +26 -0
  409. package/dist/components/icons/Instagram.stories.js +24 -0
  410. package/dist/components/icons/LinkIcon.js +34 -0
  411. package/dist/components/icons/LinkIcon.stories.js +24 -0
  412. package/dist/components/icons/LinkedIn.js +43 -0
  413. package/dist/components/icons/LinkedIn.stories.js +19 -0
  414. package/dist/components/icons/Medium.js +42 -0
  415. package/dist/components/icons/Medium.stories.js +19 -0
  416. package/dist/components/icons/Reddit.js +32 -0
  417. package/dist/components/icons/Reddit.stories.js +24 -0
  418. package/dist/components/icons/Share.js +62 -0
  419. package/dist/components/icons/Share.stories.js +19 -0
  420. package/dist/components/icons/Telegram.js +42 -0
  421. package/dist/components/icons/Telegram.stories.js +19 -0
  422. package/dist/components/icons/Twitter.js +26 -0
  423. package/dist/components/icons/Twitter.stories.js +24 -0
  424. package/dist/components/icons/X.js +26 -0
  425. package/dist/components/icons/X.stories.js +19 -0
  426. package/dist/components/icons/Youtube.js +26 -0
  427. package/dist/components/icons/Youtube.stories.js +24 -0
  428. package/dist/components/icons/index.js +170 -0
  429. package/dist/components/renderToBody/index.js +27 -0
  430. package/dist/components/renderToBody/renderToBody.js +68 -0
  431. package/dist/components/taxId/TaxId.stories.js +54 -0
  432. package/dist/components/taxId/complete.js +32 -0
  433. package/dist/components/taxId/flow.js +65 -0
  434. package/dist/components/taxId/index.js +27 -0
  435. package/dist/components/taxId/register-taxid.js +195 -0
  436. package/dist/components/video/Video.js +174 -0
  437. package/dist/components/video/Video.stories.js +56 -0
  438. package/dist/components/video/index.js +27 -0
  439. package/dist/constants/globalVariables.js +10 -0
  440. package/dist/constants/style.js +52 -0
  441. package/dist/index.js +1 -0
  442. package/dist/model/axios.js +18 -0
  443. package/dist/model/axiosPublic.js +18 -0
  444. package/dist/static/fonts/Ionicons/Ionicons.ttf +0 -0
  445. package/dist/static/fonts/Ionicons/Ionicons.woff +0 -0
  446. package/dist/static/fonts/Ionicons/Ionicons.woff2 +0 -0
  447. package/dist/static/fonts/Ionicons/ionicons.min.css +13 -0
  448. package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
  449. package/dist/static/fonts/OpenSans/OpenSans-Bold.woff +0 -0
  450. package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2 +0 -0
  451. package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf +0 -0
  452. package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff +0 -0
  453. package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2 +0 -0
  454. package/dist/static/fonts/OpenSans/OpenSans-Light.ttf +0 -0
  455. package/dist/static/fonts/OpenSans/OpenSans-Light.woff +0 -0
  456. package/dist/static/fonts/OpenSans/OpenSans-Light.woff2 +0 -0
  457. package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf +0 -0
  458. package/dist/static/fonts/OpenSans/OpenSans-Regular.woff +0 -0
  459. package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2 +0 -0
  460. package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf +0 -0
  461. package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff +0 -0
  462. package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2 +0 -0
  463. package/dist/static/fonts/icomoon/icomoon.eot +0 -0
  464. package/dist/static/fonts/icomoon/icomoon.svg +47 -0
  465. package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
  466. package/dist/static/fonts/icomoon/icomoon.woff +0 -0
  467. package/dist/static/fonts/icomoon/selection.json +1 -0
  468. package/dist/static/fonts/icomoon/style.css +137 -0
  469. package/dist/static/images/1.svg +4 -0
  470. package/dist/static/images/2.svg +4 -0
  471. package/dist/static/images/3.svg +3 -0
  472. package/dist/static/images/4.svg +3 -0
  473. package/dist/static/images/Glassess.svg +5 -0
  474. package/dist/static/images/VerifiedBadge.svg +1 -0
  475. package/dist/static/images/address-refreshing.gif +0 -0
  476. package/dist/static/images/admin-badge.svg +3 -0
  477. package/dist/static/images/amazon-logo.png +0 -0
  478. package/dist/static/images/arrow-down-black.svg +21 -0
  479. package/dist/static/images/avatar-cog.png +0 -0
  480. package/dist/static/images/avatar-placeholder.png +0 -0
  481. package/dist/static/images/avatar.png +0 -0
  482. package/dist/static/images/background.png +0 -0
  483. package/dist/static/images/camera.svg +1 -0
  484. package/dist/static/images/caps-lock.svg +6 -0
  485. package/dist/static/images/covers/blockchain.png +0 -0
  486. package/dist/static/images/covers/country.jpg +0 -0
  487. package/dist/static/images/covers/ethereum.jpg +0 -0
  488. package/dist/static/images/covers/index.png +0 -0
  489. package/dist/static/images/covers/liquid.png +0 -0
  490. package/dist/static/images/covers/money.png +0 -0
  491. package/dist/static/images/covers/overview.jpg +0 -0
  492. package/dist/static/images/covers/risk-questionnaire.jpg +0 -0
  493. package/dist/static/images/covers/rocket.png +0 -0
  494. package/dist/static/images/covers/verify-identity.jpg +0 -0
  495. package/dist/static/images/covers/virtual-iban.jpg +0 -0
  496. package/dist/static/images/document-back.svg +1 -0
  497. package/dist/static/images/document-small.svg +1 -0
  498. package/dist/static/images/document.svg +1 -0
  499. package/dist/static/images/early-adopter.png +0 -0
  500. package/dist/static/images/early-adopter.svg +1 -0
  501. package/dist/static/images/eth.svg +10 -0
  502. package/dist/static/images/eur.svg +3 -0
  503. package/dist/static/images/face-scan-icon.svg +1 -0
  504. package/dist/static/images/favicon.png +0 -0
  505. package/dist/static/images/favicon.svg +57 -0
  506. package/dist/static/images/google-logo.png +0 -0
  507. package/dist/static/images/graduation.png +0 -0
  508. package/dist/static/images/hdd.png +0 -0
  509. package/dist/static/images/lemonway.png +0 -0
  510. package/dist/static/images/logo.svg +1 -0
  511. package/dist/static/images/member-item-picture.png +0 -0
  512. package/dist/static/images/one.jpg +0 -0
  513. package/dist/static/images/passport.svg +1 -0
  514. package/dist/static/images/process-waiting.gif +0 -0
  515. package/dist/static/images/profile-picture-placeholder.png +0 -0
  516. package/dist/static/images/profile-picture-placeholder.svg +1 -0
  517. package/dist/static/images/profile-picture.png +0 -0
  518. package/dist/static/images/refresh.svg +9 -0
  519. package/dist/static/images/shark.jpg +0 -0
  520. package/dist/static/images/sicos.png +0 -0
  521. package/dist/static/images/slider/1.jpg +0 -0
  522. package/dist/static/images/slider/2.jpg +0 -0
  523. package/dist/static/images/slider/3.jpg +0 -0
  524. package/dist/static/images/social/facebook.svg +3 -0
  525. package/dist/static/images/social/linkedin.svg +3 -0
  526. package/dist/static/images/social/medium.svg +3 -0
  527. package/dist/static/images/social/reddit.svg +3 -0
  528. package/dist/static/images/social/telegram.svg +3 -0
  529. package/dist/static/images/social/twitter.svg +3 -0
  530. package/dist/static/images/social/youtube.svg +3 -0
  531. package/dist/static/images/three.jpg +0 -0
  532. package/dist/static/images/two-sided-document.svg +26 -0
  533. package/dist/static/images/two.jpg +0 -0
  534. package/dist/static/images/upload.svg +1 -0
  535. package/dist/static/images/user-profile.png +0 -0
  536. package/dist/static/images/whales.png +0 -0
  537. package/dist/static/videos/Capybara-with-mandarin orange-on-head.mp4 +0 -0
  538. package/dist/styles/colors.js +55 -0
  539. package/dist/styles/fonts.js +34 -0
  540. package/dist/styles/global.js +19 -0
  541. package/dist/styles/grid.js +16 -0
  542. package/dist/styles/reactTippy.js +12 -0
  543. package/dist/styles/rwd.js +52 -0
  544. package/dist/styles/semanticUi.js +12 -0
  545. package/dist/styles/spacing.js +12 -0
  546. package/dist/styles/theme.js +43 -0
  547. package/dist/utils/allowed-countries-list.js +1375 -0
  548. package/dist/utils/breakpoint.js +19 -0
  549. package/dist/utils/countries-list.js +1008 -0
  550. package/dist/utils/customHooks.js +54 -0
  551. package/dist/utils/delete-redirect-cookie-and-navigate.js +20 -0
  552. package/dist/utils/fix-decimals.js +11 -0
  553. package/dist/utils/get-cookie-domain.js +16 -0
  554. package/dist/utils/get-short-address.js +10 -0
  555. package/dist/utils/lock-body.js +20 -0
  556. package/dist/utils/redirect-url.js +10 -0
  557. package/dist/utils/set-redirect-cookie.js +20 -0
  558. package/docker-compose.yml +25 -0
  559. package/package.json +77 -84
  560. package/storybook-static/favicon.ico +0 -0
@@ -0,0 +1,284 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
+ 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."); }
17
+ 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); }
18
+ 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; }
19
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
+ var UserChecklist = function UserChecklist(props) {
22
+ var _user$countryObj;
23
+ var _props$user = props.user,
24
+ user = _props$user === void 0 ? {} : _props$user,
25
+ additionalTasks = props.additionalTasks,
26
+ redirectCookie = props.redirectCookie,
27
+ getTasksCount = props.getTasksCount,
28
+ useRelativePath = props.useRelativePath;
29
+ var isFromAllowedCountry = (_user$countryObj = user.countryObj) === null || _user$countryObj === void 0 ? void 0 : _user$countryObj.isAllowed;
30
+ //const isFromAllowedCountry = isFromAllowedCountryFunction(user.country)
31
+
32
+ var _useState = (0, _react.useState)([]),
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ mandatoryTasks = _useState2[0],
35
+ setmandatoryTasks = _useState2[1];
36
+ var _useState3 = (0, _react.useState)(0),
37
+ _useState4 = _slicedToArray(_useState3, 2),
38
+ mandatoryTasksCount = _useState4[0],
39
+ setmandatoryTasksCount = _useState4[1];
40
+ var _useState5 = (0, _react.useState)([]),
41
+ _useState6 = _slicedToArray(_useState5, 2),
42
+ walletTasks = _useState6[0],
43
+ setwalletTasks = _useState6[1];
44
+ var _useState7 = (0, _react.useState)(0),
45
+ _useState8 = _slicedToArray(_useState7, 2),
46
+ walletTasksCount = _useState8[0],
47
+ setwalletTasksCount = _useState8[1];
48
+ var _useState9 = (0, _react.useState)([]),
49
+ _useState10 = _slicedToArray(_useState9, 2),
50
+ optionalTasks = _useState10[0],
51
+ setoptionalTasks = _useState10[1];
52
+ (0, _react.useEffect)(function () {
53
+ generateTodos(user);
54
+ }, []);
55
+ (0, _react.useEffect)(function () {
56
+ //calculate mandatory count from tasks
57
+ if (mandatoryTasks.length > 0) {
58
+ if (isFromAllowedCountry) {
59
+ var _mandatoryTasksCount = mandatoryTasks.reduce(function (count, task) {
60
+ if (task.state === _ToDoList.ToDoTaskState.APPROVED || task.state === _ToDoList.ToDoTaskState.IN_PROGRESS) {
61
+ return count;
62
+ }
63
+ return count + 1;
64
+ }, 0);
65
+ setmandatoryTasksCount(_mandatoryTasksCount);
66
+ }
67
+ }
68
+ }, [mandatoryTasks, isFromAllowedCountry]);
69
+ (0, _react.useEffect)(function () {
70
+ //calculate wallet count from tasks
71
+ if (walletTasks.length > 0) {
72
+ if (isFromAllowedCountry) {
73
+ var _walletTasksCount = walletTasks.reduce(function (count, task) {
74
+ if (task.title === 'Liquid Address') {
75
+ if (task.state === _ToDoList.ToDoTaskState.APPROVED || task.state === _ToDoList.ToDoTaskState.IN_PROGRESS) {
76
+ return count;
77
+ }
78
+ return count + 1;
79
+ }
80
+ return count;
81
+ }, 0);
82
+ setwalletTasksCount(_walletTasksCount);
83
+ }
84
+ }
85
+ }, [walletTasks, isFromAllowedCountry]);
86
+ (0, _react.useEffect)(function () {
87
+ //if you provide function to get tasks count, pass the counter into the function
88
+ if (getTasksCount) {
89
+ getTasksCount({
90
+ mandatoryTasksCount: mandatoryTasksCount,
91
+ walletTasksCount: walletTasksCount
92
+ });
93
+ }
94
+ }, [mandatoryTasksCount, walletTasksCount, getTasksCount]);
95
+ var generateTodos = function generateTodos(userData) {
96
+ var country = user.country,
97
+ entity_name = user.entity_name,
98
+ investor_eth_addresses = user.investor_eth_addresses,
99
+ investor_algo_addresses = user.investor_algo_addresses,
100
+ countryObj = user.countryObj,
101
+ _user$liquid_network = user.liquid_network,
102
+ liquid_network = _user$liquid_network === void 0 ? {} : _user$liquid_network,
103
+ is_risk_questionnaire_finished = user.is_risk_questionnaire_finished,
104
+ kyc_status = user.kyc_status,
105
+ KYCDocuments = user.KYCDocuments,
106
+ lemonwayWallet = user.lemonwayWallet;
107
+ var platformURL = useRelativePath === true ? '' : "https://signup.".concat(_globalVariables.platformDomain);
108
+ if (entity_name) {
109
+ setmandatoryTasks([{
110
+ title: 'Verify Identity',
111
+ message: 'You will be contacted by our compliance team dedicated to legal entities.',
112
+ state: _ToDoList.ToDoTaskState.APPROVED
113
+ // link: '',
114
+ }, {
115
+ title: 'Risk Questionnaire',
116
+ message: is_risk_questionnaire_finished ? 'You have read and understood the risks' : 'Read the risks, tick the boxes, ta-da!',
117
+ state: is_risk_questionnaire_finished ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
118
+ link: "".concat(platformURL, "/risk-questionnaire")
119
+ }]);
120
+ setwalletTasks([{
121
+ title: 'Liquid Address',
122
+ message: liquid_network && liquid_network.GAID ? 'Your address is registered' : 'Register a Liquid address where you will receive the securities',
123
+ state: liquid_network && liquid_network.GAID ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
124
+ link: "".concat(platformURL, "/register-liquid-securities")
125
+ }, {
126
+ title: 'Ethereum Address',
127
+ message: investor_eth_addresses ? 'Your address is registered' : 'Register an Ethereum address where you will receive the securities',
128
+ state: investor_eth_addresses ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
129
+ //link: '', //`${platformURL}/register-ethereum`,
130
+ disabled: true,
131
+ tooltip: 'Connecting your ethereum wallet is currently disabled until we have a new offer using the ethereum network.'
132
+ }, {
133
+ title: 'Algorand Address',
134
+ message: investor_algo_addresses ? 'Opt-in into more assets' : 'Register an Algorand address and opt-in into a project you want to invest in ',
135
+ state: investor_algo_addresses ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
136
+ //: '',
137
+ openModal: _ToDoList.ToDoModal.ALGO
138
+ }]);
139
+ setoptionalTasks([{
140
+ title: 'Tax ID',
141
+ message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
142
+ state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
143
+ openModal: _ToDoList.ToDoModal.TAX_ID,
144
+ 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."
145
+ }]);
146
+ } else {
147
+ setmandatoryTasks([{
148
+ title: 'Country of Residence',
149
+ message: !country ? 'Please select your country of residence' : !isFromAllowedCountry ? 'STOKR is not yet available where you live' : 'Your country of residence has been registered',
150
+ state: !country ? _ToDoList.ToDoTaskState.SKIPPED : !isFromAllowedCountry ? _ToDoList.ToDoTaskState.DENIED : _ToDoList.ToDoTaskState.APPROVED,
151
+ link: "".concat(platformURL, "/country-of-residence")
152
+ }, {
153
+ title: 'Verify Identity',
154
+ message: getVerifyIdentityChecklist(isFromAllowedCountry, user).message,
155
+ state: getVerifyIdentityChecklist(isFromAllowedCountry, user).state,
156
+ link: getVerifyIdentityChecklist(isFromAllowedCountry, user).hasLink && "".concat(platformURL, "/verify-identity")
157
+ }, {
158
+ title: 'Risk Questionnaire',
159
+ 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!',
160
+ state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : is_risk_questionnaire_finished ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
161
+ link: isFromAllowedCountry && "".concat(platformURL, "/risk-questionnaire")
162
+ }]);
163
+ setwalletTasks([{
164
+ title: 'Liquid Address',
165
+ message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : liquid_network && liquid_network.GAID ? 'Your address is registered' : 'Register a Liquid address where you will receive the securities',
166
+ state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : liquid_network && liquid_network.GAID ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
167
+ link: isFromAllowedCountry && "".concat(platformURL, "/register-liquid-securities")
168
+ }, {
169
+ title: 'Ethereum Address',
170
+ message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : investor_eth_addresses ? 'Your address is registered' : 'Register an Ethereum address where you will receive the securities',
171
+ state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : investor_eth_addresses ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
172
+ disabled: true,
173
+ tooltip: 'Connecting your ethereum wallet is currently disabled until we have a new offer using the ethereum network.'
174
+ }, {
175
+ title: 'Algorand Address',
176
+ message: investor_algo_addresses ? 'Opt-in into more assets' : 'Register an Algorand address and opt-in into a project you want to invest in ',
177
+ state: investor_algo_addresses ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
178
+ openModal: _ToDoList.ToDoModal.ALGO
179
+ //link: '',
180
+ }]);
181
+
182
+ setoptionalTasks([(countryObj === null || countryObj === void 0 ? void 0 : countryObj.SEPA) && {
183
+ title: 'Invest in Euro',
184
+ message: getInvestInEuroChecklist(isFromAllowedCountry, user).message,
185
+ state: getInvestInEuroChecklist(isFromAllowedCountry, user).state,
186
+ link: isFromAllowedCountry && kyc_status && kyc_status !== 'Draft' && "".concat(platformURL, "/verify-identity")
187
+ }, {
188
+ title: 'Tax ID',
189
+ message: !userData.taxId ? 'To invest in certain offerings, you need to provide your tax ID' : userData.taxId && 'You tax ID is submitted',
190
+ state: !userData.taxId ? _ToDoList.ToDoTaskState.SKIPPED : userData.taxId && _ToDoList.ToDoTaskState.APPROVED,
191
+ openModal: _ToDoList.ToDoModal.TAX_ID,
192
+ 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."
193
+ }]);
194
+ }
195
+ };
196
+ return /*#__PURE__*/_react.default.createElement(_ToDoList.default
197
+ // successText="Almost done!"
198
+ , {
199
+ mandatoryTasks: mandatoryTasks,
200
+ walletsTasks: walletTasks,
201
+ optionalTasks: optionalTasks,
202
+ additionalTasks: additionalTasks,
203
+ redirectCookie: redirectCookie,
204
+ mandatoryTasksCount: mandatoryTasksCount,
205
+ walletsTasksCount: walletTasksCount,
206
+ pendingTasksCount: mandatoryTasksCount + walletTasksCount
207
+ });
208
+ };
209
+ exports.UserChecklist = UserChecklist;
210
+ var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllowedCountry, user) {
211
+ var kyc_status = user.kyc_status;
212
+ var message;
213
+ var state;
214
+ var hasLink = false;
215
+ if (!isFromAllowedCountry) {
216
+ message = 'Sorry, you are living in a country where this is not available';
217
+ state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
218
+ } else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
219
+ message = 'Scan your ID to get the green light from the anti-fraud squad';
220
+ state = _ToDoList.ToDoTaskState.SKIPPED;
221
+ hasLink = true;
222
+ } 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() === 'PENDING') {
223
+ message = 'Our anti-fraud squad is still working';
224
+ state = _ToDoList.ToDoTaskState.IN_PROGRESS;
225
+ } else if (kyc_status.toUpperCase() === 'ACCEPTED') {
226
+ message = 'Your ID is verified';
227
+ state = _ToDoList.ToDoTaskState.APPROVED;
228
+ } else if (kyc_status.toUpperCase() === 'REAPPLY') {
229
+ message = 'Document unreadable. Reapply with new ID';
230
+ state = _ToDoList.ToDoTaskState.DENIED;
231
+ hasLink = true;
232
+ } else if (kyc_status.toUpperCase() === 'DENIED') {
233
+ message = 'There seems to be a problem. The compliance team will contact you.';
234
+ state = _ToDoList.ToDoTaskState.DENIED;
235
+ }
236
+ return {
237
+ message: message,
238
+ state: state,
239
+ hasLink: hasLink
240
+ };
241
+ };
242
+ var getInvestInEuroChecklist = function getInvestInEuroChecklist(isFromAllowedCountry, user) {
243
+ var _KYCDocuments$status, _KYCDocuments$status2, _KYCDocuments$status3;
244
+ var kyc_status = user.kyc_status,
245
+ KYCDocuments = user.KYCDocuments,
246
+ lemonwayWallet = user.lemonwayWallet;
247
+ var message;
248
+ var state;
249
+ if (!isFromAllowedCountry) {
250
+ message = 'Sorry, you are living in a country where this is not available';
251
+ state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
252
+ } else if ((lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '6') {
253
+ message = 'Your document is verified';
254
+ state = _ToDoList.ToDoTaskState.APPROVED;
255
+ } else if ((lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '3') {
256
+ message = 'There seems to be a problem. The compliance team will contact you';
257
+ state = _ToDoList.ToDoTaskState.DENIED;
258
+ } else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
259
+ message = 'In order to pay in EURO you need to verify your identity and provide a second identity document';
260
+ state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
261
+ } else if (!KYCDocuments || (kyc_status === null || kyc_status === void 0 ? void 0 : kyc_status.toUpperCase()) === 'ACCEPTED') {
262
+ message = 'In order to pay in EURO you need to provide a second identity document';
263
+ state = _ToDoList.ToDoTaskState.SKIPPED;
264
+ } else if (((_KYCDocuments$status = KYCDocuments.status) === null || _KYCDocuments$status === void 0 ? void 0 : _KYCDocuments$status.toUpperCase()) === 'PENDING' || ((_KYCDocuments$status2 = KYCDocuments.status) === null || _KYCDocuments$status2 === void 0 ? void 0 : _KYCDocuments$status2.toUpperCase()) === 'APPROVED' && !lemonwayWallet || (lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '5') {
265
+ message = 'The Lemonway team is having a look. This usually takes up to 24 hours';
266
+ state = _ToDoList.ToDoTaskState.IN_PROGRESS;
267
+ } else if (((_KYCDocuments$status3 = KYCDocuments.status) === null || _KYCDocuments$status3 === void 0 ? void 0 : _KYCDocuments$status3.toUpperCase()) === 'REJECTED') {
268
+ message = 'It seems there was a problem with your second identity document. Please try again or contact the compliance team at compliance@stokr.io';
269
+ state = _ToDoList.ToDoTaskState.DENIED;
270
+ }
271
+ return {
272
+ message: message,
273
+ state: state
274
+ };
275
+ };
276
+ UserChecklist.propTypes = {
277
+ user: _propTypes.default.object.isRequired,
278
+ additionalTasks: _propTypes.default.any,
279
+ redirectCookie: _propTypes.default.bool,
280
+ getTasksCount: _propTypes.default.func,
281
+ useRelativePath: _propTypes.default.bool
282
+ };
283
+ var _default = UserChecklist;
284
+ exports.default = _default;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.UserChecklist_user_dev_entity = exports.UserChecklist_user_dev = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
9
+ var _UserChecklist = _interopRequireDefault(require("./UserChecklist"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
+ 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; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ 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); }
17
+ var _default = {
18
+ title: 'Components Library/Checklist',
19
+ component: _UserChecklist.default,
20
+ argTypes: {
21
+ user: {
22
+ type: 'object',
23
+ defaultValue: {},
24
+ required: true
25
+ },
26
+ additionalTasks: {
27
+ type: 'node',
28
+ defaultValue: null
29
+ },
30
+ redirectCookie: {
31
+ type: 'bool',
32
+ defaultValue: false
33
+ },
34
+ useRelativePath: {
35
+ type: 'bool',
36
+ defaultValue: false
37
+ },
38
+ getTasksCount: {
39
+ type: 'function',
40
+ action: 'getTasksCount'
41
+ }
42
+ }
43
+ };
44
+ exports.default = _default;
45
+ var Template = function Template(args) {
46
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_UserChecklist.default, args));
47
+ };
48
+ var userDev = {
49
+ _id: '61851acd5b9a890013297b12',
50
+ email: 'user-dev@email.com',
51
+ user_type: 'investor',
52
+ name: 'bilal',
53
+ lastname: 'dev',
54
+ username: 'user-dev',
55
+ entity_name: '',
56
+ active: true,
57
+ country: 'Germany',
58
+ //is_risk_questionnaire_finished: true,
59
+ kyc_status: 'Accepted',
60
+ investor_algo_addresses: [{
61
+ name: 'another test',
62
+ address: 'TVNC3QHY5LXKBMX7RGJG3B25EJPW73V5WMMEMUB33V2HEPEA2H77UPOYTQ',
63
+ whitelistedAssets: ['20918100']
64
+ }, {
65
+ name: 'my algo test',
66
+ address: 'YFQD2RZIIZQSO67F6MG3DJVXLMF2QU4EKGBPVXVIF3XTLKGWUZ36WMG56A',
67
+ whitelistedAssets: ['20918100', '20013569', '92363258']
68
+ }, {
69
+ name: 'test algosigner',
70
+ address: 'Y4UGMCSV3B43Y7QAM2VUVPETDDO5JVHDRB3ZC5MBF2VTUTCP4X437A65JU',
71
+ whitelistedAssets: ['20918100', '20013569', '92363258']
72
+ }, {
73
+ name: 'test new address',
74
+ address: 'B36KBEDYKBUSEMNRITZFFE7VINEPMP5MJTNUCRM5S5AP6GNWMWW4B5PEQI',
75
+ whitelistedAssets: ['20918100', '92363258']
76
+ }, {
77
+ address: 'E3Q6B5Q7JHFCEWBGGXJGEMXVAL6MSJBUHCGURZRMASRTJFDD6RQTJHPF4A',
78
+ whitelistedAssets: ['20918100', '20013569']
79
+ }, {
80
+ name: 'test 30/05',
81
+ address: 'RTQWXHRWZCBT5FF474T4DTL3VRVHERY3Q6LWLMPP24IXNOYIXBDQXJ2Z6M',
82
+ whitelistedAssets: ['20918100']
83
+ }, {
84
+ name: 'test info 01/06',
85
+ address: 'U4EIZEMPRGC77P6HJSFCLWYE4NUMNILU5DBZCKV44QMJ3TQOADRETVVAZU',
86
+ whitelistedAssets: ['20918100', '92363258']
87
+ }],
88
+ liquid_network: {
89
+ GAID: 'GA2skwb5v5nKaaAKNd61knuRJC47Jr',
90
+ dt: '2021-11-19T16:19:33.390Z',
91
+ '2812e39a-ad94-4368-9db4-9d98c1c00f38': {
92
+ id: 6020,
93
+ GAID: 'GA2wpGUWe8uDz9VEdNXJ5v17UwD25f',
94
+ is_company: false,
95
+ name: '61851acd5b9a890013297b12',
96
+ categories: [3],
97
+ creator: 22,
98
+ whitelisted_gaids: ['GA2wpGUWe8uDz9VEdNXJ5v17UwD25f']
99
+ },
100
+ whitelisted_gaids: ['GA2wpGUWe8uDz9VEdNXJ5v17UwD25f', 'GA2skwb5v5nKaaAKNd61knuRJC47Jr', 'GA2skwb5v5nKaaAKNd61knuRJC47Jr'],
101
+ '35c3c8ed-59a3-4a87-9612-b48236aeab3b': {
102
+ id: 273,
103
+ GAID: 'GA2skwb5v5nKaaAKNd61knuRJC47Jr',
104
+ is_company: false,
105
+ name: '61851acd5b9a890013297b12',
106
+ categories: [24],
107
+ creator: 62,
108
+ whitelisted_gaids: ['GA2skwb5v5nKaaAKNd61knuRJC47Jr']
109
+ }
110
+ },
111
+ pass_reset: '',
112
+ taxId: '4355',
113
+ countryObj: {
114
+ _id: '630e0361b8d1fb0007929bc4',
115
+ name: 'Germany',
116
+ ISO2: 'DE',
117
+ ISO3: 'DEU',
118
+ isAllowed: true,
119
+ SEPA: true,
120
+ 'infinite-fleet': true,
121
+ 'la-boulangerie': true
122
+ }
123
+ };
124
+ var UserChecklist_user_dev = Template.bind({});
125
+ exports.UserChecklist_user_dev = UserChecklist_user_dev;
126
+ UserChecklist_user_dev.args = {
127
+ user: userDev,
128
+ useRelativePath: true,
129
+ getTasksCount: function getTasksCount(data) {
130
+ console.log(data);
131
+ }
132
+ };
133
+ var UserChecklist_user_dev_entity = Template.bind({});
134
+ exports.UserChecklist_user_dev_entity = UserChecklist_user_dev_entity;
135
+ UserChecklist_user_dev_entity.args = {
136
+ user: _objectSpread(_objectSpread({}, userDev), {}, {
137
+ entity_name: 'test'
138
+ }),
139
+ useRelativePath: true,
140
+ getTasksCount: function getTasksCount(data) {
141
+ console.log(data);
142
+ }
143
+ };
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.ComponentScroll = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _reactCustomScrollbars = require("react-custom-scrollbars-2");
11
+ var _ComponentScroll = require("./ComponentScroll.styles");
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
+ var ComponentScroll = function ComponentScroll(props) {
16
+ var children = props.children,
17
+ noMobileScroll = props.noMobileScroll,
18
+ autoHeight = props.autoHeight,
19
+ autoHeightMax = props.autoHeightMax,
20
+ autoHeightMin = props.autoHeightMin,
21
+ offset = props.offset,
22
+ barPadding = props.barPadding,
23
+ topPadding = props.topPadding,
24
+ className = props.className,
25
+ handleScroll = props.handleScroll;
26
+ var scrollRef = (0, _react.useRef)();
27
+ (0, _react.useEffect)(function () {
28
+ if (scrollRef.current) {
29
+ //set scroll ref on initial render
30
+ handleScroll && handleScroll({}, scrollRef.current);
31
+ }
32
+ }, []);
33
+ var onMouseMove = function onMouseMove() {};
34
+ var handleScrollFrame = function handleScrollFrame(values) {
35
+ if (values) {
36
+ //if we need scroll ref and scroll values, you can use handleScroll function to handle it
37
+ handleScroll && handleScroll(values, scrollRef.current);
38
+ }
39
+ };
40
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.Container, {
41
+ className: className,
42
+ noMobileScroll: noMobileScroll
43
+ }, /*#__PURE__*/_react.default.createElement(_ComponentScroll.Outer, {
44
+ offset: offset,
45
+ barPadding: barPadding,
46
+ topPadding: topPadding
47
+ }, /*#__PURE__*/_react.default.createElement(_reactCustomScrollbars.Scrollbars, {
48
+ ref: scrollRef,
49
+ style: {
50
+ height: '100%'
51
+ },
52
+ renderTrackHorizontal: function renderTrackHorizontal(props) {
53
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.TrackH, props);
54
+ },
55
+ renderThumbHorizontal: function renderThumbHorizontal(props) {
56
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.ThumbH, props);
57
+ },
58
+ renderTrackVertical: function renderTrackVertical(props) {
59
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.TrackV, props);
60
+ },
61
+ renderThumbVertical: function renderThumbVertical(props) {
62
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.ThumbV, props);
63
+ },
64
+ hideTracksWhenNotNeeded: true,
65
+ onMouseMove: onMouseMove,
66
+ onScrollFrame: handleScrollFrame,
67
+ autoHeight: autoHeight,
68
+ autoHeightMax: autoHeightMax,
69
+ autoHeightMin: autoHeightMin,
70
+ universal: true
71
+ }, /*#__PURE__*/_react.default.createElement(_ComponentScroll.Inner, {
72
+ offset: offset
73
+ }, children))));
74
+ };
75
+ exports.ComponentScroll = ComponentScroll;
76
+ ComponentScroll.propTypes = {
77
+ children: _propTypes.default.node.isRequired,
78
+ className: _propTypes.default.string,
79
+ noMobileScroll: _propTypes.default.bool,
80
+ autoHeight: _propTypes.default.bool,
81
+ autoHeightMax: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
82
+ autoHeightMin: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
83
+ barPadding: _propTypes.default.number,
84
+ topPadding: _propTypes.default.number,
85
+ offset: _propTypes.default.number,
86
+ handleScroll: _propTypes.default.func
87
+ };
88
+ ComponentScroll.defaultProps = {
89
+ className: '',
90
+ noMobileScroll: false,
91
+ autoHeight: false,
92
+ autoHeightMax: 0,
93
+ autoHeightMin: 0,
94
+ barPadding: 32,
95
+ topPadding: 0,
96
+ offset: 0,
97
+ handleScroll: null
98
+ };
99
+ var _default = ComponentScroll;
100
+ exports.default = _default;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.ScrollAutoHeight2000 = exports.ScrollAutoHeight1000 = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _ComponentScroll = require("./ComponentScroll");
9
+ var _SvgIcons = require("../SvgIcons");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var _default = {
12
+ title: 'Components Library/ComponentScroll',
13
+ component: _ComponentScroll.ComponentScroll,
14
+ argTypes: {
15
+ children: {
16
+ type: 'node',
17
+ defaultValue: [],
18
+ required: true
19
+ },
20
+ className: {
21
+ type: 'string',
22
+ defaultValue: ''
23
+ },
24
+ noMobileScroll: {
25
+ type: 'boolean',
26
+ defaultValue: false
27
+ },
28
+ autoHeight: {
29
+ type: 'boolean',
30
+ defaultValue: false
31
+ },
32
+ autoHeightMax: {
33
+ type: 'number or string',
34
+ defaultValue: 0
35
+ },
36
+ autoHeightMin: {
37
+ type: 'number or string',
38
+ defaultValue: 0
39
+ },
40
+ barPadding: {
41
+ type: 'number',
42
+ defaultValue: 32
43
+ },
44
+ topPadding: {
45
+ type: 'number',
46
+ defaultValue: 0
47
+ },
48
+ offset: {
49
+ type: 'number',
50
+ defaultValue: 0
51
+ },
52
+ handleScroll: {
53
+ type: 'function',
54
+ defaultValue: null
55
+ },
56
+ setRef: {
57
+ type: 'function',
58
+ action: 'setRef'
59
+ },
60
+ onMouseMove: {
61
+ type: 'function',
62
+ action: 'mouseMove'
63
+ },
64
+ onDebounce: {
65
+ type: 'function',
66
+ action: 'debounceRefresh'
67
+ },
68
+ refreshScrollBar: {
69
+ type: 'function',
70
+ action: 'refreshScrollbar'
71
+ },
72
+ onScroll: {
73
+ type: 'function',
74
+ action: 'handleScroll'
75
+ }
76
+ },
77
+ parameters: {
78
+ backgrounds: {
79
+ default: 'grey'
80
+ }
81
+ }
82
+ }; //making default background grey in story as this reveals height /offset properties ..
83
+ exports.default = _default;
84
+ var Template = function Template(args) {
85
+ return /*#__PURE__*/_react.default.createElement(_ComponentScroll.ComponentScroll, args);
86
+ };
87
+ var ScrollAutoHeight1000 = Template.bind({});
88
+ exports.ScrollAutoHeight1000 = ScrollAutoHeight1000;
89
+ ScrollAutoHeight1000.args = {
90
+ children: [/*#__PURE__*/_react.default.createElement(_SvgIcons.OneSvg, null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_SvgIcons.TwoSvg, null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_SvgIcons.FourSvg, null)],
91
+ autoHeight: true,
92
+ autoHeightMax: 1000,
93
+ autoHeightMin: 1000
94
+ };
95
+ var ScrollAutoHeight2000 = Template.bind({});
96
+ exports.ScrollAutoHeight2000 = ScrollAutoHeight2000;
97
+ ScrollAutoHeight2000.args = {
98
+ children: [/*#__PURE__*/_react.default.createElement(_SvgIcons.OneSvg, null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_SvgIcons.TwoSvg, null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_SvgIcons.FourSvg, null)],
99
+ autoHeight: true,
100
+ autoHeightMax: 2000,
101
+ autoHeightMin: 2000
102
+ };