@onepercentio/one-ui 0.19.2 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +17 -0
- package/.prod.babelrc +22 -0
- package/dist/assets/styles/variables.scss +1 -0
- package/dist/components/AdaptiveButton/AdaptiveButton.js +24 -25
- package/dist/components/AdaptiveButton/index.js +12 -8
- package/dist/components/AdaptiveContainer/AdaptiveContainer.js +95 -114
- package/dist/components/AdaptiveContainer/index.js +12 -8
- package/dist/components/AdaptiveDialog/AdaptiveDialog.js +85 -65
- package/dist/components/AdaptiveDialog/index.js +12 -8
- package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +84 -76
- package/dist/components/AdaptiveSidebar/index.js +12 -8
- package/dist/components/AnchoredTooltip/AnchoredTooltip.js +155 -160
- package/dist/components/AnchoredTooltip/index.js +12 -8
- package/dist/components/AnimatedEntrance/AnimatedEntrance.js +172 -139
- package/dist/components/AnimatedEntrance/index.js +26 -10
- package/dist/components/AsyncWrapper/AsyncWrapper.js +33 -21
- package/dist/components/AsyncWrapper/index.js +12 -8
- package/dist/components/Avatar/Avatar.js +34 -40
- package/dist/components/Avatar/index.js +12 -8
- package/dist/components/BucketFill/BucketFill.js +47 -58
- package/dist/components/BucketFill/index.js +12 -8
- package/dist/components/Button/Button.js +32 -49
- package/dist/components/Button/README.md +8 -0
- package/dist/components/Button/index.js +12 -8
- package/dist/components/Card/Card.js +16 -11
- package/dist/components/Card/index.js +12 -8
- package/dist/components/Chart/Chart.logic.js +10 -10
- package/dist/components/Chart/Chart.types.js +4 -2
- package/dist/components/Chart/Chart.view.js +212 -131
- package/dist/components/Chart/index.js +12 -8
- package/dist/components/CheckBox/CheckBox.d.ts +3 -1
- package/dist/components/CheckBox/CheckBox.js +43 -30
- package/dist/components/CheckBox/CheckBox.module.scss +6 -0
- package/dist/components/CheckBox/index.js +12 -8
- package/dist/components/Collapsable/Collapsable.d.ts +26 -27
- package/dist/components/Collapsable/Collapsable.js +173 -143
- package/dist/components/Collapsable/index.js +12 -8
- package/dist/components/Countdown/Countdown.js +87 -100
- package/dist/components/Countdown/index.js +12 -8
- package/dist/components/Divider/Divider.js +15 -12
- package/dist/components/Divider/index.js +12 -8
- package/dist/components/EmailInput/EmailInput.d.ts +4 -3
- package/dist/components/EmailInput/EmailInput.js +45 -43
- package/dist/components/EmailInput/README.md +10 -0
- package/dist/components/EmailInput/index.js +20 -9
- package/dist/components/FadeIn/FadeIn.js +62 -69
- package/dist/components/FadeIn/index.js +12 -8
- package/dist/components/FileInput/FileInput.d.ts +25 -9
- package/dist/components/FileInput/FileInput.js +41 -70
- package/dist/components/FileInput/FileInput.module.scss +0 -21
- package/dist/components/FileInput/View/BigFactory/BigFactory.d.ts +6 -0
- package/dist/components/FileInput/View/BigFactory/BigFactory.js +46 -0
- package/dist/components/FileInput/View/BigFactory/BigFactory.module.scss +20 -0
- package/dist/components/FileInput/View/BigFactory/index.d.ts +1 -0
- package/dist/components/FileInput/View/BigFactory/index.js +13 -0
- package/dist/components/FileInput/View/Compact/Compact.d.ts +5 -0
- package/dist/components/FileInput/View/Compact/Compact.js +88 -0
- package/dist/components/FileInput/View/Compact/Compact.module.scss +59 -0
- package/dist/components/FileInput/View/Compact/index.d.ts +1 -0
- package/dist/components/FileInput/View/Compact/index.js +13 -0
- package/dist/components/FileInput/View/View.types.d.ts +8 -0
- package/dist/components/FileInput/View/View.types.js +5 -0
- package/dist/components/FileInput/index.js +12 -8
- package/dist/components/FlowController/FlowController.js +60 -29
- package/dist/components/FlowController/README.md +13 -0
- package/dist/components/FlowController/index.js +12 -8
- package/dist/components/Form/Form.js +157 -96
- package/dist/components/Form/index.js +12 -8
- package/dist/components/Freeze/Freeze.js +11 -10
- package/dist/components/Freeze/index.js +12 -8
- package/dist/components/HSForms/HSForms.js +48 -68
- package/dist/components/HSForms/index.js +12 -8
- package/dist/components/Header/Header.js +100 -69
- package/dist/components/Header/index.js +12 -8
- package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +17 -13
- package/dist/components/HeaderCloseBtn/index.js +12 -8
- package/dist/components/InfinityScroll/InfinityScroll.js +137 -117
- package/dist/components/InfinityScroll/index.js +12 -8
- package/dist/components/Input/Input.d.ts +8 -6
- package/dist/components/Input/Input.js +105 -90
- package/dist/components/Input/Input.module.scss +4 -2
- package/dist/components/Input/README.md +10 -0
- package/dist/components/Input/index.js +12 -8
- package/dist/components/InstantCounter/InstantCounter.js +61 -52
- package/dist/components/InstantCounter/index.js +12 -8
- package/dist/components/LavaLamp/LavaLamp.data.js +95 -87
- package/dist/components/LavaLamp/LavaLamp.js +107 -70
- package/dist/components/LavaLamp/index.js +12 -8
- package/dist/components/LavaLamp/v2/LavaLamp.js +200 -182
- package/dist/components/LinkToId/LinkToId.js +42 -28
- package/dist/components/LinkToId/index.js +20 -9
- package/dist/components/Loader/Loader.js +20 -26
- package/dist/components/Loader/index.js +12 -8
- package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +34 -37
- package/dist/components/LoaderDotsIndicator/index.js +12 -8
- package/dist/components/LoopableVideo/LoopableVideo.js +29 -30
- package/dist/components/LoopableVideo/index.js +12 -8
- package/dist/components/MainGrid/MainGrid.js +44 -50
- package/dist/components/MainGrid/index.js +12 -8
- package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +26 -26
- package/dist/components/MutableHamburgerButton/index.js +12 -8
- package/dist/components/Notification/Notification.js +16 -12
- package/dist/components/Notification/index.js +12 -8
- package/dist/components/OrderableList/OrderableList.js +406 -374
- package/dist/components/OrderableList/index.js +12 -8
- package/dist/components/PaginationIndicator/PaginationIndicator.js +230 -196
- package/dist/components/PaginationIndicator/index.js +12 -8
- package/dist/components/Parallax/Parallax.js +164 -161
- package/dist/components/Parallax/index.js +12 -8
- package/dist/components/Parallax/math/helpers.js +128 -217
- package/dist/components/PasswordInput/PasswordInput.d.ts +4 -3
- package/dist/components/PasswordInput/PasswordInput.js +120 -97
- package/dist/components/PasswordInput/index.js +12 -8
- package/dist/components/PingPongText/PingPongText.d.ts +6 -0
- package/dist/components/PingPongText/PingPongText.js +69 -0
- package/dist/components/PingPongText/PingPongText.module.scss +4 -0
- package/dist/components/PingPongText/index.d.ts +1 -0
- package/dist/components/PingPongText/index.js +13 -0
- package/dist/components/PixelatedScan/PixelatedScan.js +140 -97
- package/dist/components/PixelatedScan/index.js +12 -8
- package/dist/components/Portal/Portal.js +54 -64
- package/dist/components/Portal/index.js +20 -9
- package/dist/components/ProgressBar/ProgressBar.js +48 -45
- package/dist/components/ProgressBar/ProgressBar.module.scss +4 -0
- package/dist/components/ProgressBar/index.js +20 -9
- package/dist/components/ProgressTexts/ProgressTexts.js +42 -34
- package/dist/components/ProgressTexts/README.md +12 -0
- package/dist/components/ProgressTexts/index.js +12 -8
- package/dist/components/Radio/Radio.d.ts +13 -0
- package/dist/components/Radio/Radio.js +47 -0
- package/dist/components/Radio/Radio.module.scss +34 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.js +13 -0
- package/dist/components/SectionContainer/SectionContainer.js +35 -39
- package/dist/components/SectionContainer/index.js +12 -8
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +133 -82
- package/dist/components/Select/Select.module.scss +14 -2
- package/dist/components/Select/index.js +12 -8
- package/dist/components/Skeleton/Skeleton.js +21 -15
- package/dist/components/Skeleton/index.js +12 -8
- package/dist/components/Spacing/Spacing.js +14 -11
- package/dist/components/Spacing/index.js +12 -8
- package/dist/components/StaticScroller/StaticScroller.js +61 -81
- package/dist/components/StaticScroller/index.js +12 -8
- package/dist/components/Switch/Switch.js +29 -25
- package/dist/components/Switch/index.js +12 -8
- package/dist/components/Table/Table.js +111 -80
- package/dist/components/Table/index.js +12 -8
- package/dist/components/Tabs/Tabs.js +42 -52
- package/dist/components/Tabs/index.js +12 -8
- package/dist/components/Text/Text.js +31 -50
- package/dist/components/Text/index.js +12 -8
- package/dist/components/Transition/MasksFactory/DiagonalReveal.js +46 -22
- package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js +71 -57
- package/dist/components/Transition/MasksFactory/PhysicsSquares.js +97 -80
- package/dist/components/Transition/MasksFactory/SquareToBalls.js +59 -50
- package/dist/components/Transition/MasksFactory/utils.js +25 -28
- package/dist/components/Transition/Transition.js +316 -309
- package/dist/components/Transition/index.js +20 -9
- package/dist/components/UncontrolledTransition/UncontrolledTransition.js +110 -86
- package/dist/components/UncontrolledTransition/index.js +12 -8
- package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +116 -105
- package/dist/components/WalletConnectionWrapper/index.js +20 -9
- package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +51 -69
- package/dist/components/utilitary/ScrollAndFocusLock/index.js +12 -8
- package/dist/context/AsyncProcess.js +77 -63
- package/dist/context/CustomBrowserRouter.js +40 -52
- package/dist/context/OneUIProvider.d.ts +8 -2
- package/dist/context/OneUIProvider.js +90 -104
- package/dist/hooks/logs/README.md +3 -0
- package/dist/hooks/logs/useDependencyChangeDetection.js +17 -17
- package/dist/hooks/logs/useIsMounting.js +10 -8
- package/dist/hooks/persistence/useLocalStorage.js +40 -30
- package/dist/hooks/shims/ObjectWatchShim.d.ts +1 -0
- package/dist/hooks/shims/ObjectWatchShim.js +49 -46
- package/dist/hooks/ui/useAdaptiveImage.js +43 -35
- package/dist/hooks/ui/useBreakpoint.js +34 -19
- package/dist/hooks/ui/useCustomScrollbar.js +26 -21
- package/dist/hooks/ui/useMouseHover.js +29 -16
- package/dist/hooks/ui/usePaginationControls.d.ts +0 -4
- package/dist/hooks/ui/usePaginationControls.e2e.d.ts +4 -0
- package/dist/hooks/ui/usePaginationControls.js +125 -153
- package/dist/hooks/ui/useTilt.js +156 -128
- package/dist/hooks/ui/useZoomable.js +114 -138
- package/dist/hooks/useAsyncControl.js +82 -47
- package/dist/hooks/useContainedRepositioning.js +75 -72
- package/dist/hooks/useCustomHistory.js +21 -13
- package/dist/hooks/useElementFit.js +42 -34
- package/dist/hooks/useFirestoreWatch.js +54 -35
- package/dist/hooks/useForm.js +47 -22
- package/dist/hooks/useFreeze.js +11 -9
- package/dist/hooks/useHero.d.ts +4 -0
- package/dist/hooks/useHero.js +171 -159
- package/dist/hooks/useIntersection.js +33 -27
- package/dist/hooks/useMergeRefs.js +26 -23
- package/dist/hooks/useObserve.js +28 -15
- package/dist/hooks/usePagination.js +151 -129
- package/dist/hooks/usePooledOperation.js +43 -58
- package/dist/hooks/usePooling.js +62 -48
- package/dist/hooks/useRebound.js +36 -22
- package/dist/hooks/useShortIntl.js +79 -51
- package/dist/hooks/utility/useEvents.js +28 -22
- package/dist/hooks/utility/useModule.js +21 -10
- package/dist/hooks/utility/useQuery.js +14 -8
- package/dist/models/DebugLogger.js +7 -6
- package/dist/models/GenericContract.js +39 -12
- package/dist/reac-app-env.d.js +1 -0
- package/dist/storybook/assets/video/txt-reversed.mp4 +0 -0
- package/dist/storybookUtils/index.js +42 -24
- package/dist/type-utils.js +4 -2
- package/dist/types.js +4 -2
- package/dist/utility.d.js +17 -0
- package/dist/utils/blockchain.js +60 -54
- package/dist/utils/flatten.js +23 -13
- package/dist/utils/html.utils.js +9 -6
- package/dist/utils/ownEvent.js +9 -8
- package/package.json +14 -9
- package/tsconfig.json +3 -2
- package/cypress/support/commands.ts +0 -49
- package/cypress/support/component-index.html +0 -30
- package/cypress/support/component.ts +0 -39
- package/cypress/support/e2e.js +0 -49
- package/dist/components/AdaptiveButton/AdaptiveButton.js.map +0 -1
- package/dist/components/AdaptiveButton/index.js.map +0 -1
- package/dist/components/AdaptiveContainer/AdaptiveContainer.js.map +0 -1
- package/dist/components/AdaptiveContainer/index.js.map +0 -1
- package/dist/components/AdaptiveDialog/AdaptiveDialog.js.map +0 -1
- package/dist/components/AdaptiveDialog/index.js.map +0 -1
- package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js.map +0 -1
- package/dist/components/AdaptiveSidebar/index.js.map +0 -1
- package/dist/components/AnchoredTooltip/AnchoredTooltip.js.map +0 -1
- package/dist/components/AnchoredTooltip/index.js.map +0 -1
- package/dist/components/AnimatedEntrance/AnimatedEntrance.js.map +0 -1
- package/dist/components/AnimatedEntrance/index.js.map +0 -1
- package/dist/components/AsyncWrapper/AsyncWrapper.js.map +0 -1
- package/dist/components/AsyncWrapper/index.js.map +0 -1
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Avatar/index.js.map +0 -1
- package/dist/components/BucketFill/BucketFill.js.map +0 -1
- package/dist/components/BucketFill/index.js.map +0 -1
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/index.js.map +0 -1
- package/dist/components/Chart/Chart.e2e.js +0 -9
- package/dist/components/Chart/Chart.e2e.js.map +0 -1
- package/dist/components/Chart/Chart.logic.js.map +0 -1
- package/dist/components/Chart/Chart.types.js.map +0 -1
- package/dist/components/Chart/Chart.view.js.map +0 -1
- package/dist/components/Chart/index.js.map +0 -1
- package/dist/components/CheckBox/CheckBox.js.map +0 -1
- package/dist/components/CheckBox/index.js.map +0 -1
- package/dist/components/Collapsable/Collapsable.js.map +0 -1
- package/dist/components/Collapsable/index.js.map +0 -1
- package/dist/components/Countdown/Countdown.js.map +0 -1
- package/dist/components/Countdown/index.js.map +0 -1
- package/dist/components/Divider/Divider.js.map +0 -1
- package/dist/components/Divider/index.js.map +0 -1
- package/dist/components/EmailInput/EmailInput.js.map +0 -1
- package/dist/components/EmailInput/index.js.map +0 -1
- package/dist/components/FadeIn/FadeIn.js.map +0 -1
- package/dist/components/FadeIn/index.js.map +0 -1
- package/dist/components/FileInput/FileInput.js.map +0 -1
- package/dist/components/FileInput/index.js.map +0 -1
- package/dist/components/FlowController/FlowController.js.map +0 -1
- package/dist/components/FlowController/index.js.map +0 -1
- package/dist/components/Form/Form.js.map +0 -1
- package/dist/components/Form/index.js.map +0 -1
- package/dist/components/Freeze/Freeze.js.map +0 -1
- package/dist/components/Freeze/index.js.map +0 -1
- package/dist/components/HSForms/HSForms.js.map +0 -1
- package/dist/components/HSForms/index.js.map +0 -1
- package/dist/components/Header/Header.js.map +0 -1
- package/dist/components/Header/index.js.map +0 -1
- package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js.map +0 -1
- package/dist/components/HeaderCloseBtn/index.js.map +0 -1
- package/dist/components/InfinityScroll/InfinityScroll.js.map +0 -1
- package/dist/components/InfinityScroll/index.js.map +0 -1
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/index.js.map +0 -1
- package/dist/components/InstantCounter/InstantCounter.js.map +0 -1
- package/dist/components/InstantCounter/index.js.map +0 -1
- package/dist/components/LavaLamp/LavaLamp.data.js.map +0 -1
- package/dist/components/LavaLamp/LavaLamp.js.map +0 -1
- package/dist/components/LavaLamp/index.js.map +0 -1
- package/dist/components/LavaLamp/v2/LavaLamp.js.map +0 -1
- package/dist/components/LinkToId/LinkToId.js.map +0 -1
- package/dist/components/LinkToId/index.js.map +0 -1
- package/dist/components/Loader/Loader.js.map +0 -1
- package/dist/components/Loader/index.js.map +0 -1
- package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js.map +0 -1
- package/dist/components/LoaderDotsIndicator/index.js.map +0 -1
- package/dist/components/LoopableVideo/LoopableVideo.js.map +0 -1
- package/dist/components/LoopableVideo/index.js.map +0 -1
- package/dist/components/MainGrid/MainGrid.js.map +0 -1
- package/dist/components/MainGrid/index.js.map +0 -1
- package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js.map +0 -1
- package/dist/components/MutableHamburgerButton/index.js.map +0 -1
- package/dist/components/Notification/Notification.js.map +0 -1
- package/dist/components/Notification/index.js.map +0 -1
- package/dist/components/OrderableList/OrderableList.js.map +0 -1
- package/dist/components/OrderableList/index.js.map +0 -1
- package/dist/components/PaginationIndicator/PaginationIndicator.js.map +0 -1
- package/dist/components/PaginationIndicator/index.js.map +0 -1
- package/dist/components/Parallax/Parallax.js.map +0 -1
- package/dist/components/Parallax/index.js.map +0 -1
- package/dist/components/Parallax/math/helpers.js.map +0 -1
- package/dist/components/PasswordInput/PasswordInput.js.map +0 -1
- package/dist/components/PasswordInput/index.js.map +0 -1
- package/dist/components/PixelatedScan/PixelatedScan.js.map +0 -1
- package/dist/components/PixelatedScan/index.js.map +0 -1
- package/dist/components/Portal/Portal.js.map +0 -1
- package/dist/components/Portal/index.js.map +0 -1
- package/dist/components/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/components/ProgressBar/index.js.map +0 -1
- package/dist/components/ProgressTexts/ProgressTexts.js.map +0 -1
- package/dist/components/ProgressTexts/index.js.map +0 -1
- package/dist/components/SectionContainer/SectionContainer.js.map +0 -1
- package/dist/components/SectionContainer/index.js.map +0 -1
- package/dist/components/Select/Select.js.map +0 -1
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/Skeleton/index.js.map +0 -1
- package/dist/components/Spacing/Spacing.js.map +0 -1
- package/dist/components/Spacing/index.js.map +0 -1
- package/dist/components/StaticScroller/StaticScroller.js.map +0 -1
- package/dist/components/StaticScroller/index.js.map +0 -1
- package/dist/components/Switch/Switch.js.map +0 -1
- package/dist/components/Switch/index.js.map +0 -1
- package/dist/components/Table/Table.js.map +0 -1
- package/dist/components/Table/index.js.map +0 -1
- package/dist/components/Tabs/Tabs.js.map +0 -1
- package/dist/components/Tabs/index.js.map +0 -1
- package/dist/components/Text/Text.js.map +0 -1
- package/dist/components/Text/index.js.map +0 -1
- package/dist/components/Transition/MasksFactory/DiagonalReveal.js.map +0 -1
- package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js.map +0 -1
- package/dist/components/Transition/MasksFactory/PhysicsSquares.js.map +0 -1
- package/dist/components/Transition/MasksFactory/SquareToBalls.js.map +0 -1
- package/dist/components/Transition/MasksFactory/utils.js.map +0 -1
- package/dist/components/Transition/Transition.js.map +0 -1
- package/dist/components/Transition/index.js.map +0 -1
- package/dist/components/UncontrolledTransition/UncontrolledTransition.js.map +0 -1
- package/dist/components/UncontrolledTransition/index.js.map +0 -1
- package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +0 -1
- package/dist/components/WalletConnectionWrapper/index.js.map +0 -1
- package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js.map +0 -1
- package/dist/components/utilitary/ScrollAndFocusLock/index.js.map +0 -1
- package/dist/context/AsyncProcess.js.map +0 -1
- package/dist/context/CustomBrowserRouter.js.map +0 -1
- package/dist/context/OneUIProvider.js.map +0 -1
- package/dist/hooks/logs/useDependencyChangeDetection.js.map +0 -1
- package/dist/hooks/logs/useIsMounting.js.map +0 -1
- package/dist/hooks/persistence/useLocalStorage.js.map +0 -1
- package/dist/hooks/shims/ObjectWatchShim.js.map +0 -1
- package/dist/hooks/ui/useAdaptiveImage.js.map +0 -1
- package/dist/hooks/ui/useBreakpoint.js.map +0 -1
- package/dist/hooks/ui/useCustomScrollbar.js.map +0 -1
- package/dist/hooks/ui/useMouseHover.js.map +0 -1
- package/dist/hooks/ui/usePaginationControls.js.map +0 -1
- package/dist/hooks/ui/useTilt.js.map +0 -1
- package/dist/hooks/ui/useZoomable.js.map +0 -1
- package/dist/hooks/useAsyncControl.js.map +0 -1
- package/dist/hooks/useContainedRepositioning.js.map +0 -1
- package/dist/hooks/useCustomHistory.js.map +0 -1
- package/dist/hooks/useElementFit.js.map +0 -1
- package/dist/hooks/useFirestoreWatch.js.map +0 -1
- package/dist/hooks/useForm.js.map +0 -1
- package/dist/hooks/useFreeze.js.map +0 -1
- package/dist/hooks/useHero.js.map +0 -1
- package/dist/hooks/useHero.module.scss +0 -5
- package/dist/hooks/useIntersection.js.map +0 -1
- package/dist/hooks/useMergeRefs.js.map +0 -1
- package/dist/hooks/useObserve.js.map +0 -1
- package/dist/hooks/usePagination.js.map +0 -1
- package/dist/hooks/usePooledOperation.js.map +0 -1
- package/dist/hooks/usePooling.js.map +0 -1
- package/dist/hooks/useRebound.js.map +0 -1
- package/dist/hooks/useShortIntl.js.map +0 -1
- package/dist/hooks/utility/useEvents.js.map +0 -1
- package/dist/hooks/utility/useModule.js.map +0 -1
- package/dist/hooks/utility/useQuery.js.map +0 -1
- package/dist/models/DebugLogger.js.map +0 -1
- package/dist/models/GenericContract.js.map +0 -1
- package/dist/storybookUtils/index.js.map +0 -1
- package/dist/type-utils.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/blockchain.js.map +0 -1
- package/dist/utils/flatten.js.map +0 -1
- package/dist/utils/html.utils.js.map +0 -1
- package/dist/utils/ownEvent.js.map +0 -1
|
@@ -1,56 +1,84 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 = useShortIntl;
|
|
8
|
+
exports.isolateMessages = isolateMessages;
|
|
9
|
+
var _reactIntl = require("react-intl");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
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; }
|
|
6
22
|
function useShortIntl() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
const intl = (0, _reactIntl.useIntl)();
|
|
24
|
+
const formatMessage = intl.formatMessage,
|
|
25
|
+
formatNumber = intl.formatNumber;
|
|
26
|
+
const _useState = (0, _react.useState)(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
devMode = _useState2[0],
|
|
29
|
+
setDevMode = _useState2[1];
|
|
30
|
+
(0, _react.useEffect)(function () {
|
|
31
|
+
if (process.env.NODE_ENV === "development") {
|
|
32
|
+
const keyDownDetect = function keyDownDetect(ev) {
|
|
33
|
+
if (ev.key === "i" && ev.ctrlKey) {
|
|
34
|
+
const keyUpDetect = function keyUpDetect(ev) {
|
|
35
|
+
if (ev.key === "i") {
|
|
36
|
+
setDevMode(false);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
setDevMode(true);
|
|
40
|
+
window.addEventListener("keyup", keyUpDetect);
|
|
24
41
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
};
|
|
43
|
+
window.addEventListener("keydown", keyDownDetect);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return _objectSpread(_objectSpread({}, intl), {}, {
|
|
47
|
+
txt: function txt(id, params) {
|
|
48
|
+
return devMode ? id : formatMessage({
|
|
49
|
+
id: id
|
|
50
|
+
}, params);
|
|
51
|
+
},
|
|
52
|
+
formatToDoubleDecimal: function formatToDoubleDecimal(val) {
|
|
53
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
54
|
+
return formatNumber(val, _objectSpread({
|
|
55
|
+
minimumFractionDigits: 2,
|
|
56
|
+
maximumFractionDigits: 2
|
|
57
|
+
}, options));
|
|
58
|
+
},
|
|
59
|
+
formatBigNumber: function formatBigNumber(bigNumber, options) {
|
|
60
|
+
const _intl$formatNumberToP = intl.formatNumberToParts(1000.1).reduce(function (r, a) {
|
|
61
|
+
if (a.type === "decimal") return _objectSpread(_objectSpread({}, r), {}, {
|
|
62
|
+
decimalSeparator: a.value
|
|
63
|
+
});
|
|
64
|
+
if (a.type === "group") return _objectSpread(_objectSpread({}, r), {}, {
|
|
65
|
+
thousandSeparator: a.value
|
|
66
|
+
});
|
|
67
|
+
return r;
|
|
68
|
+
}, {}),
|
|
69
|
+
decimalSeparator = _intl$formatNumberToP.decimalSeparator;
|
|
70
|
+
const integerPart = bigNumber.integerValue(1);
|
|
71
|
+
const integer = intl.formatNumber(integerPart.toNumber(), options);
|
|
72
|
+
const decimals = bigNumber.minus(integerPart).decimalPlaces((options === null || options === void 0 ? void 0 : options.maximumFractionDigits) || bigNumber.decimalPlaces(), 5).toString().replace("0.", "");
|
|
73
|
+
return "".concat(integer).concat(decimals !== "0" ? "".concat(decimalSeparator).concat(decimals) : "");
|
|
74
|
+
}
|
|
75
|
+
});
|
|
50
76
|
}
|
|
51
|
-
exports.default = useShortIntl;
|
|
52
77
|
function isolateMessages(preffix, strings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
return Object.entries(strings).reduce(function (r, _ref) {
|
|
79
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
80
|
+
k = _ref2[0],
|
|
81
|
+
v = _ref2[1];
|
|
82
|
+
return _objectSpread(_objectSpread({}, r), {}, _defineProperty({}, "".concat(preffix, ".").concat(k), v));
|
|
83
|
+
}, {});
|
|
84
|
+
}
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useEvents;
|
|
7
|
+
var _react = require("react");
|
|
4
8
|
/**
|
|
5
9
|
* This hook allows for easier declaration of events and unsubscribers
|
|
6
10
|
*/
|
|
7
11
|
function useEvents() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
arr.splice(arr.indexOf(cb), 1);
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
const dispatcher = (eventName, ...args) => {
|
|
19
|
-
const subscriptions = _eventSUbscriptionsMap.current[eventName] || [];
|
|
20
|
-
subscriptions.forEach((cb) => cb(...args));
|
|
12
|
+
const _eventSUbscriptionsMap = (0, _react.useRef)({});
|
|
13
|
+
const subscriber = function subscriber(e, cb) {
|
|
14
|
+
if (!_eventSUbscriptionsMap.current[e]) _eventSUbscriptionsMap.current[e] = [];
|
|
15
|
+
_eventSUbscriptionsMap.current[e].push(cb);
|
|
16
|
+
return function () {
|
|
17
|
+
const arr = _eventSUbscriptionsMap.current[e];
|
|
18
|
+
arr.splice(arr.indexOf(cb), 1);
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
};
|
|
21
|
+
const dispatcher = function dispatcher(eventName) {
|
|
22
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
23
|
+
args[_key - 1] = arguments[_key];
|
|
24
|
+
}
|
|
25
|
+
const subscriptions = _eventSUbscriptionsMap.current[eventName] || [];
|
|
26
|
+
subscriptions.forEach(function (cb) {
|
|
27
|
+
return cb.apply(void 0, args);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
subscriber: subscriber,
|
|
32
|
+
dispatcher: dispatcher
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useModule;
|
|
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 provides an interface for async loading of modules
|
|
6
16
|
*/
|
|
7
17
|
function useModule(moduleLoadPromiseFactory) {
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const _useState = (0, _react.useState)(),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
moduleLoaded = _useState2[0],
|
|
21
|
+
setModuleLoaded = _useState2[1];
|
|
22
|
+
(0, _react.useLayoutEffect)(function () {
|
|
23
|
+
moduleLoadPromiseFactory().then(setModuleLoaded);
|
|
24
|
+
}, []);
|
|
25
|
+
return moduleLoaded;
|
|
26
|
+
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useQuery;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRouterDom = require("react-router-dom");
|
|
2
9
|
/**
|
|
3
10
|
*
|
|
4
11
|
* @returns A hook to obtain the query params from a url
|
|
5
12
|
*/
|
|
6
|
-
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
13
|
+
|
|
9
14
|
function useQuery() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const _useLocation = (0, _reactRouterDom.useLocation)(),
|
|
16
|
+
search = _useLocation.search;
|
|
17
|
+
return (0, _react.useMemo)(function () {
|
|
18
|
+
return new URLSearchParams(search);
|
|
19
|
+
}, [search]);
|
|
20
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = log;
|
|
3
7
|
const rand = require("color-seed");
|
|
4
8
|
const win = window;
|
|
5
9
|
function log(filter, obj) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
exports.default = log;
|
|
10
|
-
//# sourceMappingURL=DebugLogger.js.map
|
|
10
|
+
if (win.DEBUG === "*" || filter.includes(win.DEBUG)) console.log("%c ".concat(filter), "color: ".concat(rand.getColor(filter)), obj);
|
|
11
|
+
}
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 = void 0;
|
|
8
|
+
var _web3EthContract = require("web3-eth-contract");
|
|
9
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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 _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
15
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
16
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } // @ts-nocheck
|
|
23
|
+
// oh boy don't do this
|
|
24
|
+
// TS4.0+
|
|
25
|
+
// TS4.1+
|
|
26
|
+
let GenericContract = /*#__PURE__*/function (_Contract) {
|
|
27
|
+
_inherits(GenericContract, _Contract);
|
|
28
|
+
var _super = _createSuper(GenericContract);
|
|
29
|
+
function GenericContract(jsonInterface, address, options) {
|
|
30
|
+
_classCallCheck(this, GenericContract);
|
|
31
|
+
return _super.call(this, jsonInterface, address, options);
|
|
32
|
+
}
|
|
33
|
+
_createClass(GenericContract, [{
|
|
34
|
+
key: "getPastEvents",
|
|
35
|
+
value: function getPastEvents(event, options, callback) {
|
|
36
|
+
return _get(_getPrototypeOf(GenericContract.prototype), "getPastEvents", this).call(this, event, options, callback);
|
|
8
37
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.default = GenericContract;
|
|
14
|
-
//# sourceMappingURL=GenericContract.js.map
|
|
38
|
+
}]);
|
|
39
|
+
return GenericContract;
|
|
40
|
+
}(_web3EthContract.Contract);
|
|
41
|
+
exports.default = GenericContract;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
Binary file
|
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.SideBySideContainer =
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Spacing_1 = __importDefault(require("../components/Spacing"));
|
|
9
|
-
function extractAllPossibilitiesFromEnumProp(component, propName) {
|
|
10
|
-
return component.__docgenInfo.props[propName].type.value.map((a) => JSON.parse(a.value));
|
|
11
|
-
}
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SideBySideContainer = SideBySideContainer;
|
|
12
7
|
exports.extractAllPossibilitiesFromEnumProp = extractAllPossibilitiesFromEnumProp;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Spacing = _interopRequireDefault(require("../components/Spacing"));
|
|
10
|
+
var _Text2 = require("../components/Text/Text");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function extractAllPossibilitiesFromEnumProp(component, propName) {
|
|
13
|
+
console.log(component, _Text2._Text, component === _Text2._Text);
|
|
14
|
+
if (component === _Text2._Text) _Text2._Text.__docgenInfo.props[propName] = {
|
|
15
|
+
type: {
|
|
16
|
+
value: ["title", "description", "error", "caption", "highlightTitle", "highlight", "subtitle", "boldTitle", "link", "boldTitleBig", "content"].map(function (a) {
|
|
17
|
+
return {
|
|
18
|
+
value: JSON.stringify(a)
|
|
19
|
+
};
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return component.__docgenInfo.props[propName].type.value.map(function (a) {
|
|
24
|
+
return JSON.parse(a.value);
|
|
25
|
+
});
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
function SideBySideContainer(_ref) {
|
|
28
|
+
let children = _ref.children,
|
|
29
|
+
exampleName = _ref.exampleName;
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
+
style: {
|
|
32
|
+
width: "25%",
|
|
33
|
+
marginRight: 24,
|
|
34
|
+
display: "inline-flex",
|
|
35
|
+
flexDirection: "column"
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
38
|
+
style: {
|
|
39
|
+
borderBottom: "2px solid black",
|
|
40
|
+
marginBottom: 14
|
|
41
|
+
}
|
|
42
|
+
}, "Tipo: ", /*#__PURE__*/_react.default.createElement("b", null, exampleName)), children, /*#__PURE__*/_react.default.createElement(_Spacing.default, {
|
|
43
|
+
size: "large"
|
|
44
|
+
}));
|
|
45
|
+
}
|
package/dist/type-utils.js
CHANGED
package/dist/types.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* These are typings made to support separated function and prevent excessive Generics usage accross the application
|
|
5
|
+
*
|
|
6
|
+
* Redeclare this namespace with the usefull typings for your project and enjoy intelisense :)
|
|
7
|
+
*/
|
|
8
|
+
let OnepercentUtility;
|
|
9
|
+
(function () {
|
|
10
|
+
/** The ids used by the useShortIntl hooks */
|
|
11
|
+
/** A type hint to bind the LinkToId action and the SectionContainer identifier */
|
|
12
|
+
/** A type hint to autocomplete functions related to the AsyncProcess context */
|
|
13
|
+
let AsyncQueue;
|
|
14
|
+
(function () {})(AsyncQueue || (AsyncQueue = {}));
|
|
15
|
+
let UIElements;
|
|
16
|
+
(function () {})(UIElements || (UIElements = {}));
|
|
17
|
+
})(OnepercentUtility || (OnepercentUtility = {}));
|
package/dist/utils/blockchain.js
CHANGED
|
@@ -1,61 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
exports.sendAndWaitForConfirmation = exports.dispatchAndWait = exports.waitForConfirmation = exports.isTransactionMined = void 0;
|
|
13
|
-
function isTransactionMined(transactionHash, provider) {
|
|
14
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
const transaction = yield provider.eth.getTransactionReceipt(transactionHash);
|
|
16
|
-
if (!transaction ||
|
|
17
|
-
!transaction.blockHash ||
|
|
18
|
-
transaction.status === undefined)
|
|
19
|
-
return undefined; // I still don't know if it's loaded
|
|
20
|
-
else
|
|
21
|
-
return !!transaction.status === true;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dispatchAndWait = dispatchAndWait;
|
|
24
7
|
exports.isTransactionMined = isTransactionMined;
|
|
25
|
-
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
return new Promise((r, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
while (true) {
|
|
29
|
-
const bought = yield isTransactionMined(tHash, provider);
|
|
30
|
-
if (bought === undefined)
|
|
31
|
-
yield new Promise((r) => setTimeout(() => r(), 2000));
|
|
32
|
-
else {
|
|
33
|
-
if (bought)
|
|
34
|
-
r();
|
|
35
|
-
else
|
|
36
|
-
rej('TRANSACTION_FAILED');
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
});
|
|
42
|
-
}
|
|
8
|
+
exports.sendAndWaitForConfirmation = sendAndWaitForConfirmation;
|
|
43
9
|
exports.waitForConfirmation = waitForConfirmation;
|
|
10
|
+
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); } }
|
|
11
|
+
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); }); }; }
|
|
12
|
+
function isTransactionMined() {
|
|
13
|
+
return _isTransactionMined.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
function _isTransactionMined() {
|
|
16
|
+
_isTransactionMined = _asyncToGenerator(function* (transactionHash, provider) {
|
|
17
|
+
const transaction = yield provider.eth.getTransactionReceipt(transactionHash);
|
|
18
|
+
if (!transaction || !transaction.blockHash || transaction.status === undefined) return undefined; // I still don't know if it's loaded
|
|
19
|
+
else return !!transaction.status === true;
|
|
20
|
+
});
|
|
21
|
+
return _isTransactionMined.apply(this, arguments);
|
|
22
|
+
}
|
|
23
|
+
function waitForConfirmation() {
|
|
24
|
+
return _waitForConfirmation.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
function _waitForConfirmation() {
|
|
27
|
+
_waitForConfirmation = _asyncToGenerator(function* (tHash, provider) {
|
|
28
|
+
return new Promise( /*#__PURE__*/function () {
|
|
29
|
+
var _ref = _asyncToGenerator(function* (r, rej) {
|
|
30
|
+
while (true) {
|
|
31
|
+
const bought = yield isTransactionMined(tHash, provider);
|
|
32
|
+
if (bought === undefined) yield new Promise(function (r) {
|
|
33
|
+
return setTimeout(function () {
|
|
34
|
+
return r();
|
|
35
|
+
}, 2000);
|
|
36
|
+
});else {
|
|
37
|
+
if (bought) r();else rej('TRANSACTION_FAILED');
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return function () {
|
|
43
|
+
return _ref.apply(this, arguments);
|
|
44
|
+
};
|
|
45
|
+
}());
|
|
46
|
+
});
|
|
47
|
+
return _waitForConfirmation.apply(this, arguments);
|
|
48
|
+
}
|
|
44
49
|
function dispatchAndWait(func) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
50
|
-
_func.catch(rej);
|
|
50
|
+
const _func = func;
|
|
51
|
+
return new Promise(function (r, rej) {
|
|
52
|
+
_func.on('transactionHash', function (tX) {
|
|
53
|
+
r(tX);
|
|
51
54
|
});
|
|
55
|
+
_func.catch(rej);
|
|
56
|
+
});
|
|
52
57
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const tHash = yield dispatchAndWait(func);
|
|
57
|
-
yield waitForConfirmation(tHash, provider);
|
|
58
|
-
});
|
|
58
|
+
function sendAndWaitForConfirmation() {
|
|
59
|
+
return _sendAndWaitForConfirmation.apply(this, arguments);
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
function _sendAndWaitForConfirmation() {
|
|
62
|
+
_sendAndWaitForConfirmation = _asyncToGenerator(function* (func, provider) {
|
|
63
|
+
const tHash = yield dispatchAndWait(func);
|
|
64
|
+
yield waitForConfirmation(tHash, provider);
|
|
65
|
+
});
|
|
66
|
+
return _sendAndWaitForConfirmation.apply(this, arguments);
|
|
67
|
+
}
|
package/dist/utils/flatten.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return [].concat(...Object.keys(o).map((_k) => {
|
|
7
|
-
const k = _k;
|
|
8
|
-
return typeof o[k] === "object"
|
|
9
|
-
? _flatten(o[k], prevKey ? `${prevKey}.${k}` : k)
|
|
10
|
-
: { [prevKey ? `${prevKey}.${k}` : k]: o[k] };
|
|
11
|
-
}));
|
|
12
|
-
})(obj));
|
|
13
|
-
}
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
14
6
|
exports.flatten = flatten;
|
|
15
|
-
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
10
|
+
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); }
|
|
11
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
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; }
|
|
17
|
+
function flatten(obj) {
|
|
18
|
+
return Object.assign.apply(Object, [{}].concat(_toConsumableArray(function _flatten(o, _ref) {
|
|
19
|
+
let prevKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
20
|
+
return (_ref = []).concat.apply(_ref, _toConsumableArray(Object.keys(o).map(function (_k) {
|
|
21
|
+
const k = _k;
|
|
22
|
+
return _typeof(o[k]) === "object" ? _flatten(o[k], prevKey ? "".concat(prevKey, ".").concat(k) : k) : _defineProperty({}, prevKey ? "".concat(prevKey, ".").concat(k) : k, o[k]);
|
|
23
|
+
})));
|
|
24
|
+
}(obj))));
|
|
25
|
+
}
|