@onepercentio/one-ui 0.19.2 → 0.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/.babelrc +17 -0
  2. package/.prod.babelrc +22 -0
  3. package/dist/assets/styles/variables.scss +1 -0
  4. package/dist/components/AdaptiveButton/AdaptiveButton.js +24 -25
  5. package/dist/components/AdaptiveButton/index.js +12 -8
  6. package/dist/components/AdaptiveContainer/AdaptiveContainer.js +95 -114
  7. package/dist/components/AdaptiveContainer/index.js +12 -8
  8. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +85 -65
  9. package/dist/components/AdaptiveDialog/index.js +12 -8
  10. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +84 -76
  11. package/dist/components/AdaptiveSidebar/index.js +12 -8
  12. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +155 -160
  13. package/dist/components/AnchoredTooltip/index.js +12 -8
  14. package/dist/components/AnimatedEntrance/AnimatedEntrance.js +172 -139
  15. package/dist/components/AnimatedEntrance/index.js +26 -10
  16. package/dist/components/AsyncWrapper/AsyncWrapper.js +33 -21
  17. package/dist/components/AsyncWrapper/index.js +12 -8
  18. package/dist/components/Avatar/Avatar.js +34 -40
  19. package/dist/components/Avatar/index.js +12 -8
  20. package/dist/components/BucketFill/BucketFill.js +47 -58
  21. package/dist/components/BucketFill/index.js +12 -8
  22. package/dist/components/Button/Button.js +32 -49
  23. package/dist/components/Button/README.md +8 -0
  24. package/dist/components/Button/index.js +12 -8
  25. package/dist/components/Card/Card.js +16 -11
  26. package/dist/components/Card/index.js +12 -8
  27. package/dist/components/Chart/Chart.logic.js +10 -10
  28. package/dist/components/Chart/Chart.types.js +4 -2
  29. package/dist/components/Chart/Chart.view.js +212 -131
  30. package/dist/components/Chart/index.js +12 -8
  31. package/dist/components/CheckBox/CheckBox.d.ts +3 -1
  32. package/dist/components/CheckBox/CheckBox.js +43 -30
  33. package/dist/components/CheckBox/CheckBox.module.scss +4 -0
  34. package/dist/components/CheckBox/index.js +12 -8
  35. package/dist/components/Collapsable/Collapsable.d.ts +26 -27
  36. package/dist/components/Collapsable/Collapsable.js +173 -143
  37. package/dist/components/Collapsable/index.js +12 -8
  38. package/dist/components/Countdown/Countdown.js +87 -100
  39. package/dist/components/Countdown/index.js +12 -8
  40. package/dist/components/Divider/Divider.js +15 -12
  41. package/dist/components/Divider/index.js +12 -8
  42. package/dist/components/EmailInput/EmailInput.d.ts +4 -3
  43. package/dist/components/EmailInput/EmailInput.js +45 -43
  44. package/dist/components/EmailInput/README.md +10 -0
  45. package/dist/components/EmailInput/index.js +20 -9
  46. package/dist/components/FadeIn/FadeIn.js +62 -69
  47. package/dist/components/FadeIn/index.js +12 -8
  48. package/dist/components/FileInput/FileInput.d.ts +25 -9
  49. package/dist/components/FileInput/FileInput.js +41 -70
  50. package/dist/components/FileInput/FileInput.module.scss +0 -21
  51. package/dist/components/FileInput/View/BigFactory/BigFactory.d.ts +6 -0
  52. package/dist/components/FileInput/View/BigFactory/BigFactory.js +46 -0
  53. package/dist/components/FileInput/View/BigFactory/BigFactory.module.scss +20 -0
  54. package/dist/components/FileInput/View/BigFactory/index.d.ts +1 -0
  55. package/dist/components/FileInput/View/BigFactory/index.js +13 -0
  56. package/dist/components/FileInput/View/Compact/Compact.d.ts +5 -0
  57. package/dist/components/FileInput/View/Compact/Compact.js +88 -0
  58. package/dist/components/FileInput/View/Compact/Compact.module.scss +59 -0
  59. package/dist/components/FileInput/View/Compact/index.d.ts +1 -0
  60. package/dist/components/FileInput/View/Compact/index.js +13 -0
  61. package/dist/components/FileInput/View/View.types.d.ts +8 -0
  62. package/dist/components/FileInput/View/View.types.js +5 -0
  63. package/dist/components/FileInput/index.js +12 -8
  64. package/dist/components/FlowController/FlowController.js +60 -29
  65. package/dist/components/FlowController/README.md +13 -0
  66. package/dist/components/FlowController/index.js +12 -8
  67. package/dist/components/Form/Form.js +157 -96
  68. package/dist/components/Form/index.js +12 -8
  69. package/dist/components/Freeze/Freeze.js +11 -10
  70. package/dist/components/Freeze/index.js +12 -8
  71. package/dist/components/HSForms/HSForms.js +48 -68
  72. package/dist/components/HSForms/index.js +12 -8
  73. package/dist/components/Header/Header.js +100 -69
  74. package/dist/components/Header/index.js +12 -8
  75. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +17 -13
  76. package/dist/components/HeaderCloseBtn/index.js +12 -8
  77. package/dist/components/InfinityScroll/InfinityScroll.js +137 -117
  78. package/dist/components/InfinityScroll/index.js +12 -8
  79. package/dist/components/Input/Input.d.ts +8 -6
  80. package/dist/components/Input/Input.js +105 -90
  81. package/dist/components/Input/Input.module.scss +4 -2
  82. package/dist/components/Input/README.md +10 -0
  83. package/dist/components/Input/index.js +12 -8
  84. package/dist/components/InstantCounter/InstantCounter.js +61 -52
  85. package/dist/components/InstantCounter/index.js +12 -8
  86. package/dist/components/LavaLamp/LavaLamp.data.js +95 -87
  87. package/dist/components/LavaLamp/LavaLamp.js +107 -70
  88. package/dist/components/LavaLamp/index.js +12 -8
  89. package/dist/components/LavaLamp/v2/LavaLamp.js +200 -182
  90. package/dist/components/LinkToId/LinkToId.js +42 -28
  91. package/dist/components/LinkToId/index.js +20 -9
  92. package/dist/components/Loader/Loader.js +20 -26
  93. package/dist/components/Loader/index.js +12 -8
  94. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +34 -37
  95. package/dist/components/LoaderDotsIndicator/index.js +12 -8
  96. package/dist/components/LoopableVideo/LoopableVideo.js +29 -30
  97. package/dist/components/LoopableVideo/index.js +12 -8
  98. package/dist/components/MainGrid/MainGrid.js +44 -50
  99. package/dist/components/MainGrid/index.js +12 -8
  100. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +26 -26
  101. package/dist/components/MutableHamburgerButton/index.js +12 -8
  102. package/dist/components/Notification/Notification.js +16 -12
  103. package/dist/components/Notification/index.js +12 -8
  104. package/dist/components/OrderableList/OrderableList.js +406 -374
  105. package/dist/components/OrderableList/index.js +12 -8
  106. package/dist/components/PaginationIndicator/PaginationIndicator.js +230 -196
  107. package/dist/components/PaginationIndicator/index.js +12 -8
  108. package/dist/components/Parallax/Parallax.js +164 -161
  109. package/dist/components/Parallax/index.js +12 -8
  110. package/dist/components/Parallax/math/helpers.js +128 -217
  111. package/dist/components/PasswordInput/PasswordInput.d.ts +4 -3
  112. package/dist/components/PasswordInput/PasswordInput.js +120 -97
  113. package/dist/components/PasswordInput/index.js +12 -8
  114. package/dist/components/PixelatedScan/PixelatedScan.js +140 -97
  115. package/dist/components/PixelatedScan/index.js +12 -8
  116. package/dist/components/Portal/Portal.js +54 -64
  117. package/dist/components/Portal/index.js +20 -9
  118. package/dist/components/ProgressBar/ProgressBar.js +48 -45
  119. package/dist/components/ProgressBar/index.js +20 -9
  120. package/dist/components/ProgressTexts/ProgressTexts.js +42 -34
  121. package/dist/components/ProgressTexts/README.md +12 -0
  122. package/dist/components/ProgressTexts/index.js +12 -8
  123. package/dist/components/Radio/Radio.d.ts +13 -0
  124. package/dist/components/Radio/Radio.js +47 -0
  125. package/dist/components/Radio/Radio.module.scss +33 -0
  126. package/dist/components/Radio/index.d.ts +1 -0
  127. package/dist/components/Radio/index.js +13 -0
  128. package/dist/components/SectionContainer/SectionContainer.js +35 -39
  129. package/dist/components/SectionContainer/index.js +12 -8
  130. package/dist/components/Select/Select.d.ts +2 -1
  131. package/dist/components/Select/Select.js +133 -82
  132. package/dist/components/Select/Select.module.scss +14 -2
  133. package/dist/components/Select/index.js +12 -8
  134. package/dist/components/Skeleton/Skeleton.js +21 -15
  135. package/dist/components/Skeleton/index.js +12 -8
  136. package/dist/components/Spacing/Spacing.js +14 -11
  137. package/dist/components/Spacing/index.js +12 -8
  138. package/dist/components/StaticScroller/StaticScroller.js +61 -81
  139. package/dist/components/StaticScroller/index.js +12 -8
  140. package/dist/components/Switch/Switch.js +29 -25
  141. package/dist/components/Switch/index.js +12 -8
  142. package/dist/components/Table/Table.js +111 -80
  143. package/dist/components/Table/index.js +12 -8
  144. package/dist/components/Tabs/Tabs.js +42 -52
  145. package/dist/components/Tabs/index.js +12 -8
  146. package/dist/components/Text/Text.js +31 -50
  147. package/dist/components/Text/index.js +12 -8
  148. package/dist/components/Transition/MasksFactory/DiagonalReveal.js +46 -22
  149. package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js +71 -57
  150. package/dist/components/Transition/MasksFactory/PhysicsSquares.js +97 -80
  151. package/dist/components/Transition/MasksFactory/SquareToBalls.js +59 -50
  152. package/dist/components/Transition/MasksFactory/utils.js +25 -28
  153. package/dist/components/Transition/Transition.js +316 -309
  154. package/dist/components/Transition/index.js +20 -9
  155. package/dist/components/UncontrolledTransition/UncontrolledTransition.js +110 -86
  156. package/dist/components/UncontrolledTransition/index.js +12 -8
  157. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +116 -105
  158. package/dist/components/WalletConnectionWrapper/index.js +20 -9
  159. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +51 -69
  160. package/dist/components/utilitary/ScrollAndFocusLock/index.js +12 -8
  161. package/dist/context/AsyncProcess.js +77 -63
  162. package/dist/context/CustomBrowserRouter.js +40 -52
  163. package/dist/context/OneUIProvider.d.ts +8 -2
  164. package/dist/context/OneUIProvider.js +90 -104
  165. package/dist/hooks/logs/README.md +3 -0
  166. package/dist/hooks/logs/useDependencyChangeDetection.js +17 -17
  167. package/dist/hooks/logs/useIsMounting.js +10 -8
  168. package/dist/hooks/persistence/useLocalStorage.js +40 -30
  169. package/dist/hooks/shims/ObjectWatchShim.d.ts +1 -0
  170. package/dist/hooks/shims/ObjectWatchShim.js +49 -46
  171. package/dist/hooks/ui/useAdaptiveImage.js +43 -35
  172. package/dist/hooks/ui/useBreakpoint.js +34 -19
  173. package/dist/hooks/ui/useCustomScrollbar.js +26 -21
  174. package/dist/hooks/ui/useMouseHover.js +29 -16
  175. package/dist/hooks/ui/usePaginationControls.d.ts +0 -4
  176. package/dist/hooks/ui/usePaginationControls.e2e.d.ts +4 -0
  177. package/dist/hooks/ui/usePaginationControls.js +125 -153
  178. package/dist/hooks/ui/useTilt.js +156 -128
  179. package/dist/hooks/ui/useZoomable.js +114 -138
  180. package/dist/hooks/useAsyncControl.js +82 -47
  181. package/dist/hooks/useContainedRepositioning.js +75 -72
  182. package/dist/hooks/useCustomHistory.js +21 -13
  183. package/dist/hooks/useElementFit.js +42 -34
  184. package/dist/hooks/useFirestoreWatch.js +54 -35
  185. package/dist/hooks/useForm.js +47 -22
  186. package/dist/hooks/useFreeze.js +11 -9
  187. package/dist/hooks/useHero.d.ts +4 -0
  188. package/dist/hooks/useHero.js +171 -159
  189. package/dist/hooks/useIntersection.js +33 -27
  190. package/dist/hooks/useMergeRefs.js +26 -23
  191. package/dist/hooks/useObserve.js +28 -15
  192. package/dist/hooks/usePagination.js +151 -129
  193. package/dist/hooks/usePooledOperation.js +43 -58
  194. package/dist/hooks/usePooling.js +62 -48
  195. package/dist/hooks/useRebound.js +36 -22
  196. package/dist/hooks/useShortIntl.js +79 -51
  197. package/dist/hooks/utility/useEvents.js +28 -22
  198. package/dist/hooks/utility/useModule.js +21 -10
  199. package/dist/hooks/utility/useQuery.js +14 -8
  200. package/dist/models/DebugLogger.js +7 -6
  201. package/dist/models/GenericContract.js +39 -12
  202. package/dist/reac-app-env.d.js +1 -0
  203. package/dist/storybook/assets/video/txt-reversed.mp4 +0 -0
  204. package/dist/storybookUtils/index.js +42 -24
  205. package/dist/type-utils.js +4 -2
  206. package/dist/types.js +4 -2
  207. package/dist/utility.d.js +17 -0
  208. package/dist/utils/blockchain.js +60 -54
  209. package/dist/utils/flatten.js +23 -13
  210. package/dist/utils/html.utils.js +9 -6
  211. package/dist/utils/ownEvent.js +9 -8
  212. package/package.json +13 -8
  213. package/tsconfig.json +3 -2
  214. package/cypress/support/commands.ts +0 -49
  215. package/cypress/support/component-index.html +0 -30
  216. package/cypress/support/component.ts +0 -39
  217. package/cypress/support/e2e.js +0 -49
  218. package/dist/components/AdaptiveButton/AdaptiveButton.js.map +0 -1
  219. package/dist/components/AdaptiveButton/index.js.map +0 -1
  220. package/dist/components/AdaptiveContainer/AdaptiveContainer.js.map +0 -1
  221. package/dist/components/AdaptiveContainer/index.js.map +0 -1
  222. package/dist/components/AdaptiveDialog/AdaptiveDialog.js.map +0 -1
  223. package/dist/components/AdaptiveDialog/index.js.map +0 -1
  224. package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js.map +0 -1
  225. package/dist/components/AdaptiveSidebar/index.js.map +0 -1
  226. package/dist/components/AnchoredTooltip/AnchoredTooltip.js.map +0 -1
  227. package/dist/components/AnchoredTooltip/index.js.map +0 -1
  228. package/dist/components/AnimatedEntrance/AnimatedEntrance.js.map +0 -1
  229. package/dist/components/AnimatedEntrance/index.js.map +0 -1
  230. package/dist/components/AsyncWrapper/AsyncWrapper.js.map +0 -1
  231. package/dist/components/AsyncWrapper/index.js.map +0 -1
  232. package/dist/components/Avatar/Avatar.js.map +0 -1
  233. package/dist/components/Avatar/index.js.map +0 -1
  234. package/dist/components/BucketFill/BucketFill.js.map +0 -1
  235. package/dist/components/BucketFill/index.js.map +0 -1
  236. package/dist/components/Button/Button.js.map +0 -1
  237. package/dist/components/Button/index.js.map +0 -1
  238. package/dist/components/Card/Card.js.map +0 -1
  239. package/dist/components/Card/index.js.map +0 -1
  240. package/dist/components/Chart/Chart.e2e.js +0 -9
  241. package/dist/components/Chart/Chart.e2e.js.map +0 -1
  242. package/dist/components/Chart/Chart.logic.js.map +0 -1
  243. package/dist/components/Chart/Chart.types.js.map +0 -1
  244. package/dist/components/Chart/Chart.view.js.map +0 -1
  245. package/dist/components/Chart/index.js.map +0 -1
  246. package/dist/components/CheckBox/CheckBox.js.map +0 -1
  247. package/dist/components/CheckBox/index.js.map +0 -1
  248. package/dist/components/Collapsable/Collapsable.js.map +0 -1
  249. package/dist/components/Collapsable/index.js.map +0 -1
  250. package/dist/components/Countdown/Countdown.js.map +0 -1
  251. package/dist/components/Countdown/index.js.map +0 -1
  252. package/dist/components/Divider/Divider.js.map +0 -1
  253. package/dist/components/Divider/index.js.map +0 -1
  254. package/dist/components/EmailInput/EmailInput.js.map +0 -1
  255. package/dist/components/EmailInput/index.js.map +0 -1
  256. package/dist/components/FadeIn/FadeIn.js.map +0 -1
  257. package/dist/components/FadeIn/index.js.map +0 -1
  258. package/dist/components/FileInput/FileInput.js.map +0 -1
  259. package/dist/components/FileInput/index.js.map +0 -1
  260. package/dist/components/FlowController/FlowController.js.map +0 -1
  261. package/dist/components/FlowController/index.js.map +0 -1
  262. package/dist/components/Form/Form.js.map +0 -1
  263. package/dist/components/Form/index.js.map +0 -1
  264. package/dist/components/Freeze/Freeze.js.map +0 -1
  265. package/dist/components/Freeze/index.js.map +0 -1
  266. package/dist/components/HSForms/HSForms.js.map +0 -1
  267. package/dist/components/HSForms/index.js.map +0 -1
  268. package/dist/components/Header/Header.js.map +0 -1
  269. package/dist/components/Header/index.js.map +0 -1
  270. package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js.map +0 -1
  271. package/dist/components/HeaderCloseBtn/index.js.map +0 -1
  272. package/dist/components/InfinityScroll/InfinityScroll.js.map +0 -1
  273. package/dist/components/InfinityScroll/index.js.map +0 -1
  274. package/dist/components/Input/Input.js.map +0 -1
  275. package/dist/components/Input/index.js.map +0 -1
  276. package/dist/components/InstantCounter/InstantCounter.js.map +0 -1
  277. package/dist/components/InstantCounter/index.js.map +0 -1
  278. package/dist/components/LavaLamp/LavaLamp.data.js.map +0 -1
  279. package/dist/components/LavaLamp/LavaLamp.js.map +0 -1
  280. package/dist/components/LavaLamp/index.js.map +0 -1
  281. package/dist/components/LavaLamp/v2/LavaLamp.js.map +0 -1
  282. package/dist/components/LinkToId/LinkToId.js.map +0 -1
  283. package/dist/components/LinkToId/index.js.map +0 -1
  284. package/dist/components/Loader/Loader.js.map +0 -1
  285. package/dist/components/Loader/index.js.map +0 -1
  286. package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js.map +0 -1
  287. package/dist/components/LoaderDotsIndicator/index.js.map +0 -1
  288. package/dist/components/LoopableVideo/LoopableVideo.js.map +0 -1
  289. package/dist/components/LoopableVideo/index.js.map +0 -1
  290. package/dist/components/MainGrid/MainGrid.js.map +0 -1
  291. package/dist/components/MainGrid/index.js.map +0 -1
  292. package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js.map +0 -1
  293. package/dist/components/MutableHamburgerButton/index.js.map +0 -1
  294. package/dist/components/Notification/Notification.js.map +0 -1
  295. package/dist/components/Notification/index.js.map +0 -1
  296. package/dist/components/OrderableList/OrderableList.js.map +0 -1
  297. package/dist/components/OrderableList/index.js.map +0 -1
  298. package/dist/components/PaginationIndicator/PaginationIndicator.js.map +0 -1
  299. package/dist/components/PaginationIndicator/index.js.map +0 -1
  300. package/dist/components/Parallax/Parallax.js.map +0 -1
  301. package/dist/components/Parallax/index.js.map +0 -1
  302. package/dist/components/Parallax/math/helpers.js.map +0 -1
  303. package/dist/components/PasswordInput/PasswordInput.js.map +0 -1
  304. package/dist/components/PasswordInput/index.js.map +0 -1
  305. package/dist/components/PixelatedScan/PixelatedScan.js.map +0 -1
  306. package/dist/components/PixelatedScan/index.js.map +0 -1
  307. package/dist/components/Portal/Portal.js.map +0 -1
  308. package/dist/components/Portal/index.js.map +0 -1
  309. package/dist/components/ProgressBar/ProgressBar.js.map +0 -1
  310. package/dist/components/ProgressBar/index.js.map +0 -1
  311. package/dist/components/ProgressTexts/ProgressTexts.js.map +0 -1
  312. package/dist/components/ProgressTexts/index.js.map +0 -1
  313. package/dist/components/SectionContainer/SectionContainer.js.map +0 -1
  314. package/dist/components/SectionContainer/index.js.map +0 -1
  315. package/dist/components/Select/Select.js.map +0 -1
  316. package/dist/components/Select/index.js.map +0 -1
  317. package/dist/components/Skeleton/Skeleton.js.map +0 -1
  318. package/dist/components/Skeleton/index.js.map +0 -1
  319. package/dist/components/Spacing/Spacing.js.map +0 -1
  320. package/dist/components/Spacing/index.js.map +0 -1
  321. package/dist/components/StaticScroller/StaticScroller.js.map +0 -1
  322. package/dist/components/StaticScroller/index.js.map +0 -1
  323. package/dist/components/Switch/Switch.js.map +0 -1
  324. package/dist/components/Switch/index.js.map +0 -1
  325. package/dist/components/Table/Table.js.map +0 -1
  326. package/dist/components/Table/index.js.map +0 -1
  327. package/dist/components/Tabs/Tabs.js.map +0 -1
  328. package/dist/components/Tabs/index.js.map +0 -1
  329. package/dist/components/Text/Text.js.map +0 -1
  330. package/dist/components/Text/index.js.map +0 -1
  331. package/dist/components/Transition/MasksFactory/DiagonalReveal.js.map +0 -1
  332. package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js.map +0 -1
  333. package/dist/components/Transition/MasksFactory/PhysicsSquares.js.map +0 -1
  334. package/dist/components/Transition/MasksFactory/SquareToBalls.js.map +0 -1
  335. package/dist/components/Transition/MasksFactory/utils.js.map +0 -1
  336. package/dist/components/Transition/Transition.js.map +0 -1
  337. package/dist/components/Transition/index.js.map +0 -1
  338. package/dist/components/UncontrolledTransition/UncontrolledTransition.js.map +0 -1
  339. package/dist/components/UncontrolledTransition/index.js.map +0 -1
  340. package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +0 -1
  341. package/dist/components/WalletConnectionWrapper/index.js.map +0 -1
  342. package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js.map +0 -1
  343. package/dist/components/utilitary/ScrollAndFocusLock/index.js.map +0 -1
  344. package/dist/context/AsyncProcess.js.map +0 -1
  345. package/dist/context/CustomBrowserRouter.js.map +0 -1
  346. package/dist/context/OneUIProvider.js.map +0 -1
  347. package/dist/hooks/logs/useDependencyChangeDetection.js.map +0 -1
  348. package/dist/hooks/logs/useIsMounting.js.map +0 -1
  349. package/dist/hooks/persistence/useLocalStorage.js.map +0 -1
  350. package/dist/hooks/shims/ObjectWatchShim.js.map +0 -1
  351. package/dist/hooks/ui/useAdaptiveImage.js.map +0 -1
  352. package/dist/hooks/ui/useBreakpoint.js.map +0 -1
  353. package/dist/hooks/ui/useCustomScrollbar.js.map +0 -1
  354. package/dist/hooks/ui/useMouseHover.js.map +0 -1
  355. package/dist/hooks/ui/usePaginationControls.js.map +0 -1
  356. package/dist/hooks/ui/useTilt.js.map +0 -1
  357. package/dist/hooks/ui/useZoomable.js.map +0 -1
  358. package/dist/hooks/useAsyncControl.js.map +0 -1
  359. package/dist/hooks/useContainedRepositioning.js.map +0 -1
  360. package/dist/hooks/useCustomHistory.js.map +0 -1
  361. package/dist/hooks/useElementFit.js.map +0 -1
  362. package/dist/hooks/useFirestoreWatch.js.map +0 -1
  363. package/dist/hooks/useForm.js.map +0 -1
  364. package/dist/hooks/useFreeze.js.map +0 -1
  365. package/dist/hooks/useHero.js.map +0 -1
  366. package/dist/hooks/useHero.module.scss +0 -5
  367. package/dist/hooks/useIntersection.js.map +0 -1
  368. package/dist/hooks/useMergeRefs.js.map +0 -1
  369. package/dist/hooks/useObserve.js.map +0 -1
  370. package/dist/hooks/usePagination.js.map +0 -1
  371. package/dist/hooks/usePooledOperation.js.map +0 -1
  372. package/dist/hooks/usePooling.js.map +0 -1
  373. package/dist/hooks/useRebound.js.map +0 -1
  374. package/dist/hooks/useShortIntl.js.map +0 -1
  375. package/dist/hooks/utility/useEvents.js.map +0 -1
  376. package/dist/hooks/utility/useModule.js.map +0 -1
  377. package/dist/hooks/utility/useQuery.js.map +0 -1
  378. package/dist/models/DebugLogger.js.map +0 -1
  379. package/dist/models/GenericContract.js.map +0 -1
  380. package/dist/storybookUtils/index.js.map +0 -1
  381. package/dist/type-utils.js.map +0 -1
  382. package/dist/types.js.map +0 -1
  383. package/dist/utils/blockchain.js.map +0 -1
  384. package/dist/utils/flatten.js.map +0 -1
  385. package/dist/utils/html.utils.js.map +0 -1
  386. package/dist/utils/ownEvent.js.map +0 -1
@@ -1,50 +1,85 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const react_1 = require("react");
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 = useAsyncControl;
8
+ var _react = require("react");
9
+ 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; }
10
+ 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; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ 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); }
14
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
15
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
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(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; } }
21
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
22
  function useAsyncControl(functionsToWrap) {
14
- const [error, setError] = (0, react_1.useState)();
15
- const [loading, setLoading] = (0, react_1.useState)(false);
16
- const _process = (0, react_1.useCallback)((asyncFn) => __awaiter(this, void 0, void 0, function* () {
17
- try {
18
- setLoading(true);
19
- setError(undefined);
20
- return yield asyncFn();
21
- }
22
- catch (e) {
23
- if (process.env.NODE_ENV === "development")
24
- console.error(e);
25
- setError(e);
26
- throw e;
27
- }
28
- finally {
29
- setLoading(false);
30
- }
31
- }), []);
32
- const { functionsToMemoize, other } = Object.entries(functionsToWrap || {}).reduce((r, [k, func]) => {
33
- return Object.assign(Object.assign({}, r), (typeof func === "function"
34
- ? {
35
- functionsToMemoize: Object.assign(Object.assign({}, r.functionsToMemoize), { [k]: func }),
36
- }
37
- : {
38
- other: Object.assign(Object.assign({}, r.other), { [k]: func }),
39
- }));
40
- }, {
41
- functionsToMemoize: {},
42
- other: {},
23
+ const _useState = (0, _react.useState)(),
24
+ _useState2 = _slicedToArray(_useState, 2),
25
+ error = _useState2[0],
26
+ setError = _useState2[1];
27
+ const _useState3 = (0, _react.useState)(false),
28
+ _useState4 = _slicedToArray(_useState3, 2),
29
+ loading = _useState4[0],
30
+ setLoading = _useState4[1];
31
+ const _process = (0, _react.useCallback)( /*#__PURE__*/function () {
32
+ var _ref = _asyncToGenerator(function* (asyncFn) {
33
+ try {
34
+ setLoading(true);
35
+ setError(undefined);
36
+ return yield asyncFn();
37
+ } catch (e) {
38
+ if (process.env.NODE_ENV === "development") console.error(e);
39
+ setError(e);
40
+ throw e;
41
+ } finally {
42
+ setLoading(false);
43
+ }
43
44
  });
44
- return Object.assign(Object.assign({ process: _process, loading,
45
- error,
46
- setError,
47
- setLoading }, other), Object.entries(functionsToMemoize).reduce((r, [k, v]) => (Object.assign(Object.assign({}, r), { [k]: (0, react_1.useMemo)(() => (...args) => _process(() => v(...args)), [v]) })), {}));
48
- }
49
- exports.default = useAsyncControl;
50
- //# sourceMappingURL=useAsyncControl.js.map
45
+ return function () {
46
+ return _ref.apply(this, arguments);
47
+ };
48
+ }(), []);
49
+ const _Object$entries$reduc = Object.entries(functionsToWrap || {}).reduce(function (r, _ref2) {
50
+ let _ref3 = _slicedToArray(_ref2, 2),
51
+ k = _ref3[0],
52
+ func = _ref3[1];
53
+ return _objectSpread(_objectSpread({}, r), typeof func === "function" ? {
54
+ functionsToMemoize: _objectSpread(_objectSpread({}, r.functionsToMemoize), {}, _defineProperty({}, k, func))
55
+ } : {
56
+ other: _objectSpread(_objectSpread({}, r.other), {}, _defineProperty({}, k, func))
57
+ });
58
+ }, {
59
+ functionsToMemoize: {},
60
+ other: {}
61
+ }),
62
+ functionsToMemoize = _Object$entries$reduc.functionsToMemoize,
63
+ other = _Object$entries$reduc.other;
64
+ return _objectSpread(_objectSpread({
65
+ process: _process,
66
+ loading: loading,
67
+ error: error,
68
+ setError: setError,
69
+ setLoading: setLoading
70
+ }, other), Object.entries(functionsToMemoize).reduce(function (r, _ref4) {
71
+ let _ref5 = _slicedToArray(_ref4, 2),
72
+ k = _ref5[0],
73
+ v = _ref5[1];
74
+ return _objectSpread(_objectSpread({}, r), {}, _defineProperty({}, k, (0, _react.useMemo)(function () {
75
+ return function () {
76
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
77
+ args[_key] = arguments[_key];
78
+ }
79
+ return _process(function () {
80
+ return v.apply(void 0, args);
81
+ });
82
+ };
83
+ }, [v])));
84
+ }, {}));
85
+ }
@@ -1,79 +1,82 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const debounce_1 = __importDefault(require("lodash/debounce"));
7
- const react_1 = require("react");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useContainedRepositioning;
7
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
8
+ var _react = require("react");
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
10
  /**
9
11
  * This hook takes an html and checks if its outside its parent
10
12
  * If it is, it should move it so it can be totally visible inside the container
11
13
  */
12
- function useContainedRepositioning(focused, getParent, { offset = 16, scale = 1, offsetLimit = Number.POSITIVE_INFINITY, } = {}) {
13
- const elementToCheck = (0, react_1.useRef)(null);
14
- (0, react_1.useEffect)(() => {
15
- const el = elementToCheck.current;
16
- if (!el)
17
- return;
18
- const curr = el;
19
- const relativeParent = getParent(curr);
20
- if (process.env.NODE_ENV === "development") {
21
- if (window.getComputedStyle(el).position !== "relative")
22
- throw new Error("The target element MUST have position relative so it can be moved");
23
- if (window.getComputedStyle(relativeParent).position !== "relative")
24
- throw new Error("The relative to element MUST have position relative so it can calculate correctly the target position");
14
+ function useContainedRepositioning(focused, getParent) {
15
+ let _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
16
+ _ref$offset = _ref.offset,
17
+ offset = _ref$offset === void 0 ? 16 : _ref$offset,
18
+ _ref$scale = _ref.scale,
19
+ scale = _ref$scale === void 0 ? 1 : _ref$scale,
20
+ _ref$offsetLimit = _ref.offsetLimit,
21
+ offsetLimit = _ref$offsetLimit === void 0 ? Number.POSITIVE_INFINITY : _ref$offsetLimit;
22
+ const elementToCheck = (0, _react.useRef)(null);
23
+ (0, _react.useEffect)(function () {
24
+ const el = elementToCheck.current;
25
+ if (!el) return;
26
+ const curr = el;
27
+ const relativeParent = getParent(curr);
28
+ if (process.env.NODE_ENV === "development") {
29
+ if (window.getComputedStyle(el).position !== "relative") throw new Error("The target element MUST have position relative so it can be moved");
30
+ if (window.getComputedStyle(relativeParent).position !== "relative") throw new Error("The relative to element MUST have position relative so it can calculate correctly the target position");
31
+ }
32
+ if (focused) {
33
+ curr.style.right = "0px";
34
+ const reposition = (0, _debounce.default)(function () {
35
+ const alreadyRight = Number(curr.style.right.replace("px", ""));
36
+ const limitOffset = relativeParent.scrollLeft + relativeParent.clientWidth;
37
+ const elWidth = curr.clientWidth * scale;
38
+ const offsetOfScale = (elWidth - curr.clientWidth) / 2;
39
+ const cardLimit = curr.offsetLeft - offsetOfScale + alreadyRight + elWidth;
40
+ const exceedingSpace = cardLimit - limitOffset;
41
+ const offsetLeft = curr.offsetLeft - offsetOfScale + alreadyRight - relativeParent.scrollLeft;
42
+ const isOverflowedRight = exceedingSpace > 0;
43
+ const isOverflowedLeft = offsetLeft < 0;
44
+ const limit = exceedingSpace + -offsetLeft;
45
+ if (isOverflowedRight) {
46
+ const val = Math.min(exceedingSpace - -Math.min(Math.abs(limit / 2), offset), offsetLimit);
47
+ curr.style.right = "".concat(val, "px");
25
48
  }
26
- if (focused) {
27
- curr.style.right = `0px`;
28
- const reposition = (0, debounce_1.default)(() => {
29
- const alreadyRight = Number(curr.style.right.replace("px", ""));
30
- const limitOffset = relativeParent.scrollLeft + relativeParent.clientWidth;
31
- const elWidth = curr.clientWidth * scale;
32
- const offsetOfScale = (elWidth - curr.clientWidth) / 2;
33
- const cardLimit = curr.offsetLeft - offsetOfScale + alreadyRight + elWidth;
34
- const exceedingSpace = cardLimit - limitOffset;
35
- const offsetLeft = curr.offsetLeft -
36
- offsetOfScale +
37
- alreadyRight -
38
- relativeParent.scrollLeft;
39
- const isOverflowedRight = exceedingSpace > 0;
40
- const isOverflowedLeft = offsetLeft < 0;
41
- const limit = exceedingSpace + -offsetLeft;
42
- if (isOverflowedRight) {
43
- const val = Math.min(exceedingSpace - -Math.min(Math.abs(limit / 2), offset), offsetLimit);
44
- curr.style.right = `${val}px`;
45
- }
46
- if (isOverflowedLeft) {
47
- const val = Math.max(offsetLeft - Math.min(Math.abs(limit) / 2, offset), -offsetLimit);
48
- curr.style.right = `${val}px`;
49
- }
50
- if (isOverflowedLeft || isOverflowedRight) {
51
- curr.style.zIndex = "1000";
52
- }
53
- }, 50);
54
- reposition();
55
- reposition.flush();
56
- relativeParent.addEventListener("scroll", reposition, {
57
- passive: true
58
- });
59
- return () => {
60
- reposition.cancel();
61
- relativeParent.removeEventListener("scroll", reposition);
62
- el.style.right = `0px`;
63
- const restore = ({ propertyName, currentTarget }) => {
64
- const targetTransformation = window.getComputedStyle(currentTarget).right;
65
- if (propertyName === "right" && targetTransformation === "0px") {
66
- curr.style.zIndex = "";
67
- el.removeEventListener("transitionend", restore);
68
- }
69
- };
70
- el.addEventListener("transitionend", restore);
71
- };
49
+ if (isOverflowedLeft) {
50
+ const val = Math.max(offsetLeft - Math.min(Math.abs(limit) / 2, offset), -offsetLimit);
51
+ curr.style.right = "".concat(val, "px");
72
52
  }
73
- }, [focused]);
74
- return {
75
- elementToCheck,
76
- };
77
- }
78
- exports.default = useContainedRepositioning;
79
- //# sourceMappingURL=useContainedRepositioning.js.map
53
+ if (isOverflowedLeft || isOverflowedRight) {
54
+ curr.style.zIndex = "1000";
55
+ }
56
+ }, 50);
57
+ reposition();
58
+ reposition.flush();
59
+ relativeParent.addEventListener("scroll", reposition, {
60
+ passive: true
61
+ });
62
+ return function () {
63
+ reposition.cancel();
64
+ relativeParent.removeEventListener("scroll", reposition);
65
+ el.style.right = "0px";
66
+ const restore = function restore(_ref2) {
67
+ let propertyName = _ref2.propertyName,
68
+ currentTarget = _ref2.currentTarget;
69
+ const targetTransformation = window.getComputedStyle(currentTarget).right;
70
+ if (propertyName === "right" && targetTransformation === "0px") {
71
+ curr.style.zIndex = "";
72
+ el.removeEventListener("transitionend", restore);
73
+ }
74
+ };
75
+ el.addEventListener("transitionend", restore);
76
+ };
77
+ }
78
+ }, [focused]);
79
+ return {
80
+ elementToCheck: elementToCheck
81
+ };
82
+ }
@@ -1,15 +1,23 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_router_dom_1 = require("react-router-dom");
4
- function useCustomHistory() {
5
- const customHistory = (0, react_router_dom_1.useHistory)();
6
- const { state } = (0, react_router_dom_1.useLocation)();
7
- return Object.assign(Object.assign({}, customHistory), { goBackWithFallback(fallbackRoute) {
8
- if (state === null || state === void 0 ? void 0 : state.internalNavigation)
9
- customHistory.goBack();
10
- else
11
- customHistory.push(fallbackRoute);
12
- } });
13
- }
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
14
6
  exports.default = useCustomHistory;
15
- //# sourceMappingURL=useCustomHistory.js.map
7
+ var _reactRouterDom = require("react-router-dom");
8
+ 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); }
9
+ 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; }
10
+ 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; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ 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); }
14
+ function useCustomHistory() {
15
+ const customHistory = (0, _reactRouterDom.useHistory)();
16
+ const _useLocation = (0, _reactRouterDom.useLocation)(),
17
+ state = _useLocation.state;
18
+ return _objectSpread(_objectSpread({}, customHistory), {}, {
19
+ goBackWithFallback: function goBackWithFallback(fallbackRoute) {
20
+ if (state !== null && state !== void 0 && state.internalNavigation) customHistory.goBack();else customHistory.push(fallbackRoute);
21
+ }
22
+ });
23
+ }
@@ -1,43 +1,51 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useElementFit;
7
+ var _react = require("react");
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ 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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4
14
  /**
5
15
  * This hook receives a base width of an element and returns how much items fit **vertically** inside the referenced html element
6
16
  *
7
17
  * @param baseWidth The base width of each element
8
18
  */
9
19
  function useElementFit(baseWidth, baseHeight) {
10
- const ref = (0, react_1.useRef)(null);
11
- function calculateDimension() {
12
- var _a, _b;
13
- function fittingRows() {
14
- if (!ref.current || baseHeight === undefined)
15
- return 1;
16
- return Math.ceil(ref.current.clientHeight / baseHeight);
17
- }
18
- if (window.PRERENDER)
19
- return 4;
20
- const width = ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.clientWidth) || window.visualViewport.width;
21
- const maxItemsVertically = Math.floor(width / baseWidth) || 1;
22
- if (process.env.NODE_ENV === "development")
23
- require('../models/DebugLogger').default(`${useElementFit.name}:clientWidth`, (_b = ref.current) === null || _b === void 0 ? void 0 : _b.clientWidth);
24
- return maxItemsVertically * fittingRows();
20
+ const ref = (0, _react.useRef)(null);
21
+ function calculateDimension() {
22
+ var _ref$current, _ref$current2;
23
+ function fittingRows() {
24
+ if (!ref.current || baseHeight === undefined) return 1;
25
+ return Math.ceil(ref.current.clientHeight / baseHeight);
26
+ }
27
+ if (window.PRERENDER) return 4;
28
+ const width = ((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.clientWidth) || window.visualViewport.width;
29
+ const maxItemsVertically = Math.floor(width / baseWidth) || 1;
30
+ if (process.env.NODE_ENV === "development") require('../models/DebugLogger').default("".concat(useElementFit.name, ":clientWidth"), (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.clientWidth);
31
+ return maxItemsVertically * fittingRows();
32
+ }
33
+ const _useState = (0, _react.useState)(window.PRERENDER ? 4 : undefined),
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ itemsToShow = _useState2[0],
36
+ setItemsToShow = _useState2[1];
37
+ (0, _react.useLayoutEffect)(function () {
38
+ setItemsToShow(calculateDimension());
39
+ function onResize() {
40
+ setItemsToShow(calculateDimension());
25
41
  }
26
- const [itemsToShow, setItemsToShow] = (0, react_1.useState)(window.PRERENDER ? 4 : undefined);
27
- (0, react_1.useLayoutEffect)(() => {
28
- setItemsToShow(calculateDimension());
29
- function onResize() {
30
- setItemsToShow(calculateDimension());
31
- }
32
- window.addEventListener("resize", onResize);
33
- return () => {
34
- window.removeEventListener("resize", onResize);
35
- };
36
- }, []);
37
- return {
38
- itemsToShow,
39
- ref,
42
+ window.addEventListener("resize", onResize);
43
+ return function () {
44
+ window.removeEventListener("resize", onResize);
40
45
  };
41
- }
42
- exports.default = useElementFit;
43
- //# sourceMappingURL=useElementFit.js.map
46
+ }, []);
47
+ return {
48
+ itemsToShow: itemsToShow,
49
+ ref: ref
50
+ };
51
+ }
@@ -1,38 +1,57 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useFirestoreWatch;
7
+ var _react = require("react");
8
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ 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."); }
14
+ 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); }
15
+ 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; }
16
+ 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; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4
18
  function useFirestoreWatch(queryFactory, params) {
5
- const [docsList, updateList] = (0, react_1.useState)();
6
- (0, react_1.useEffect)(() => {
7
- const unsub = queryFactory(...params)((changes) => {
8
- updateList((prevList = []) => {
9
- for (let docChange of changes) {
10
- switch (docChange.type) {
11
- case 'added':
12
- if (!prevList.find((f) => f.id === docChange.doc.id)) {
13
- prevList.unshift(docChange.doc);
14
- }
15
- break;
16
- case 'modified':
17
- prevList = prevList.map((item) => {
18
- if (item.id === docChange.doc.id)
19
- for (let key in docChange.doc) {
20
- item[key] = docChange.doc[key];
21
- }
22
- return item;
23
- });
24
- break;
25
- case 'removed':
26
- prevList = prevList.filter((item) => item.id !== docChange.doc.id);
27
- break;
28
- }
19
+ const _useState = (0, _react.useState)(),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ docsList = _useState2[0],
22
+ updateList = _useState2[1];
23
+ (0, _react.useEffect)(function () {
24
+ const unsub = queryFactory.apply(void 0, _toConsumableArray(params))(function (changes) {
25
+ updateList(function () {
26
+ let prevList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
27
+ for (let docChange of changes) {
28
+ switch (docChange.type) {
29
+ case 'added':
30
+ if (!prevList.find(function (f) {
31
+ return f.id === docChange.doc.id;
32
+ })) {
33
+ prevList.unshift(docChange.doc);
34
+ }
35
+ break;
36
+ case 'modified':
37
+ prevList = prevList.map(function (item) {
38
+ if (item.id === docChange.doc.id) for (let key in docChange.doc) {
39
+ item[key] = docChange.doc[key];
29
40
  }
30
- return [...prevList];
31
- });
32
- });
33
- return unsub;
34
- }, params);
35
- return docsList;
36
- }
37
- exports.default = useFirestoreWatch;
38
- //# sourceMappingURL=useFirestoreWatch.js.map
41
+ return item;
42
+ });
43
+ break;
44
+ case 'removed':
45
+ prevList = prevList.filter(function (item) {
46
+ return item.id !== docChange.doc.id;
47
+ });
48
+ break;
49
+ }
50
+ }
51
+ return _toConsumableArray(prevList);
52
+ });
53
+ });
54
+ return unsub;
55
+ }, params);
56
+ return docsList;
57
+ }
@@ -1,24 +1,49 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
4
- function useContextForm(config, initialState) {
5
- const [form, setForm] = (0, react_1.useState)(initialState);
6
- const isValid = (0, react_1.useMemo)(() => !Object.keys(config).some((a) => typeof config[a].validator(form[a], form) === "string"), [form]);
7
- const _setFormField = (key, value) => {
8
- setForm(prev => (Object.assign(Object.assign({}, prev), { [key]: value })));
9
- };
10
- const validFormFields = (0, react_1.useMemo)(() => {
11
- return Object.keys(config).reduce((result, field) => {
12
- const fieldConfig = config[field];
13
- const invalidMessage = fieldConfig.validator(form[field], form);
14
- return Object.assign(Object.assign({}, result), { [field]: invalidMessage });
15
- }, { isValid });
16
- }, [form, isValid]);
17
- return {
18
- form: form,
19
- formValidation: validFormFields,
20
- set: _setFormField
21
- };
22
- }
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
+ });
23
7
  exports.default = useContextForm;
24
- //# sourceMappingURL=useForm.js.map
8
+ var _react = require("react");
9
+ 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; }
10
+ 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; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ 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); }
14
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ 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."); }
16
+ 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); }
17
+ 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; }
18
+ 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; } }
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+ function useContextForm(config, initialState) {
21
+ const _useState = (0, _react.useState)(initialState),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ form = _useState2[0],
24
+ setForm = _useState2[1];
25
+ const isValid = (0, _react.useMemo)(function () {
26
+ return !Object.keys(config).some(function (a) {
27
+ return typeof config[a].validator(form[a], form) === "string";
28
+ });
29
+ }, [form]);
30
+ const _setFormField = function _setFormField(key, value) {
31
+ setForm(function (prev) {
32
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, key, value));
33
+ });
34
+ };
35
+ const validFormFields = (0, _react.useMemo)(function () {
36
+ return Object.keys(config).reduce(function (result, field) {
37
+ const fieldConfig = config[field];
38
+ const invalidMessage = fieldConfig.validator(form[field], form);
39
+ return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, field, invalidMessage));
40
+ }, {
41
+ isValid: isValid
42
+ });
43
+ }, [form, isValid]);
44
+ return {
45
+ form: form,
46
+ formValidation: validFormFields,
47
+ set: _setFormField
48
+ };
49
+ }
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useFreeze;
7
+ var _react = require("react");
4
8
  /**
5
- * This hook pipes a data and when it is set to a falsy value ("", undefined, null, 0),
9
+ * This hook pipes a data and when it is set to a falsy value ("", undefined, null, 0),
6
10
  * it returns the previous valid value
7
11
  */
8
12
  function useFreeze(something) {
9
- const currChildOrPrev = (0, react_1.useRef)();
10
- currChildOrPrev.current = something || currChildOrPrev.current;
11
- return currChildOrPrev.current || null;
12
- }
13
- exports.default = useFreeze;
14
- //# sourceMappingURL=useFreeze.js.map
13
+ const currChildOrPrev = (0, _react.useRef)();
14
+ currChildOrPrev.current = something || currChildOrPrev.current;
15
+ return currChildOrPrev.current || null;
16
+ }
@@ -41,6 +41,10 @@ export default function useHero(id: string, options?: Partial<{
41
41
  * @returns If the hero should be skipped or not
42
42
  */
43
43
  onHeroSkip?: (origin: HTMLDivElement, target: HTMLDivElement) => ShouldSkip;
44
+ /**
45
+ * Called when a hero is skipped
46
+ */
47
+ onHeroSkipped?: () => void;
44
48
  /**
45
49
  * Before transition start, setup the properties that will be used for hero animation
46
50
  * @returns The container that will be used to check if the hero is out or in the view