@rabbitio/ui-kit 1.0.0-beta.65 → 1.0.0-beta.68
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/coverage/clover.xml +6311 -4236
- package/coverage/coverage-final.json +160 -99
- package/coverage/index.html +442 -187
- package/coverage/{rabbit-ui-kit → ui-kit}/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/index.js.html +3 -3
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html → ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html} +8 -29
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/arrowIcon.jsx.html → ui-kit/src/assets/wrappedImages/arrowTosca.jsx.html} +9 -24
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/arrowWhite.jsx.html +7 -25
- package/coverage/ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html +106 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/determinedError.jsx.html +9 -42
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html → ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html} +28 -31
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/index.html +25 -25
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/darkRectangle.jsx.html → ui-kit/src/assets/wrappedImages/infoIcon.jsx.html} +13 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/assets/wrappedImages/noticeQuestionIcon.jsx.html +7 -25
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/walletIcon.jsx.html → ui-kit/src/assets/wrappedImages/successfulValidationIcon.jsx.html} +23 -59
- package/coverage/{rabbit-ui-kit/src/assets/wrappedImages/infoIcon.jsx.html → ui-kit/src/assets/wrappedImages/walletIcon.jsx.html} +16 -16
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/axiosAdapter.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/adapters/qrUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/amountUtils.js.html +44 -308
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/errorUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/apiGroups.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/index.html +14 -14
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/external-apis/ipAddressProviders.js.html +31 -178
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/fiatCurrenciesService.js.html +12 -36
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/index.html +20 -20
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/blockchain.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/coin.js.html +10 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/models/protocol.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/cache.js.html +23 -101
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/emailAPI.js.html +9 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/index.html +19 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/index.html +9 -9
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logger.js.html +14 -35
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/logging/logsStorage.js.html +5 -5
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/postponeExecution.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/common/utils/safeStringify.js.html +29 -29
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetIcon/AssetIcon.jsx.html +11 -41
- package/coverage/ui-kit/src/components/atoms/AssetIcon/index.html +116 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/AssetSelection.jsx.html +9 -33
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/AssetSelection/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx.html +8 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/BackgroundTitle/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/InformationMessage.jsx.html +8 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/InformationMessage/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/Input.jsx.html +15 -63
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Input/index.html +7 -7
- package/coverage/ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +196 -0
- package/coverage/{rabbit-ui-kit/src/components/atoms/RateSelector → ui-kit/src/components/atoms/LoadingDots}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/NoticeIcon/NoticeIcon.jsx.html +10 -40
- package/coverage/{rabbit-ui-kit/src/components/atoms/AssetIcon → ui-kit/src/components/atoms/NoticeIcon}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/QrCode.jsx.html +8 -26
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/QrCode/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/RateSelector/RateSelector.jsx.html +10 -34
- package/coverage/ui-kit/src/components/atoms/RateSelector/index.html +116 -0
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/SupportChat.jsx.html +7 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/SupportChat/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/Textarea.jsx.html +17 -53
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Textarea/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/TitleBox.jsx.html +13 -82
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TitleBox/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/Tooltip.jsx.html +12 -18
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Tooltip/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/TwoLinesOfText/LinesOfText.jsx.html +12 -30
- package/coverage/{rabbit-ui-kit/src/components/atoms/NoticeIcon → ui-kit/src/components/atoms/TwoLinesOfText}/index.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/Validation.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/Validation/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/Button.jsx.html +23 -113
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Button/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/Close.jsx.html +9 -27
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/Close/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/LinkButton.jsx.html +11 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/LinkButton/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx.html +13 -67
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/atoms/buttons/RadioButtonWithText/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useCallHandlingErrors.js.html +7 -19
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/hooks/useReferredState.js.html +4 -4
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/AmountInput.jsx.html +56 -407
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/AmountInput/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/CoinPicker.jsx.html +67 -466
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/CoinPicker/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx.html +7 -22
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/LineWithIconLink/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/TitledLineWithIconLink.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/molecules/TitledLineWithIconLink/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx.html +9 -15
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/CoinPickerDialogStep/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/Dialog.jsx.html +44 -194
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/DialogButtons.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/DialogStep.jsx.html +61 -523
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/DialogStep/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/Dialog/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/SwapForm.jsx.html +96 -762
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/organisms/SwapForm/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/DeterminedErrorDialogStep.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/templates/DeterminedErrorDialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/index.html +20 -20
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/inputValueProviders.js.html +11 -35
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/textUtils.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/uiUtils.js.html +7 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/components/utils/urlQueryUtils.js.html +18 -93
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/close.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Close/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/LinkButton/linkButton.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/atoms/Tooltip/tooltip.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/globalConstants.jsx.html +7 -10
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/dialogStep.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/dialog.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/constants/organisms/dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/index.js.html +8 -26
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js.html +30 -222
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js.html +24 -147
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/cancelProcessing.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js.html +19 -103
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalApiProvider.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/externalServicesStatsCollector.js.html +11 -23
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/index.html +38 -38
- package/coverage/{rabbit-ui-kit → ui-kit}/src/robustExteranlApiCallerService/robustExternalAPICallerService.js.html +53 -305
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/index.html +24 -24
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapProvider.js.html +10 -28
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/external-apis/swapspaceSwapProvider.js.html +277 -1009
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/baseSwapCreationInfo.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwap.js.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/existingSwapWithFiatData.js.html +9 -27
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/models/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/index.html +7 -7
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/services/publicSwapService.js.html +53 -374
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/index.html +13 -13
- package/coverage/{rabbit-ui-kit → ui-kit}/src/swaps-lib/utils/swapUtils.js.html +32 -179
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/BackgroundTitle.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LinesOfText.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/LoadingDots.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/QrCode.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/RateSelector.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/Validation.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Button.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/Close.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/LinkButton.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/buttons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/atoms/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/LineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/TitledLineWithIconLink.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/molecules/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/Dialog.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/DialogButtons.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogButtons/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/DialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/DialogStep/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/organisms/Dialog/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/exampleContent.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/stubs/index.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/DeterminedErrorDialogStep.stories.jsx.html +3 -3
- package/coverage/{rabbit-ui-kit → ui-kit}/stories/templates/index.html +3 -3
- package/dist/index.cjs +12 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +12 -13
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +12 -14
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +12 -14
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -3
- package/src/assets/wrappedImages/arrowIcon.jsx +1 -7
- package/src/assets/wrappedImages/arrowTosca.jsx +1 -7
- package/src/assets/wrappedImages/arrowWhite.jsx +1 -7
- package/src/assets/wrappedImages/darkRectangle.jsx +2 -13
- package/src/assets/wrappedImages/determinedError.jsx +2 -13
- package/src/assets/wrappedImages/failedValidationIcon.jsx +2 -16
- package/src/assets/wrappedImages/infoIcon.jsx +1 -7
- package/src/assets/wrappedImages/noticeQuestionIcon.jsx +1 -7
- package/src/assets/wrappedImages/successfulValidationIcon.jsx +2 -16
- package/src/assets/wrappedImages/walletIcon.jsx +3 -19
- package/src/common/amountUtils.js +36 -124
- package/src/common/external-apis/ipAddressProviders.js +22 -71
- package/src/common/fiatCurrenciesService.js +4 -12
- package/src/common/models/coin.js +2 -6
- package/src/common/tests/amountUtils/composeRateText.test.js +12 -69
- package/src/common/tests/integration/external-apis/ipAddressProviders/getClientIpAddress.test.js +1 -3
- package/src/common/utils/cache.js +10 -36
- package/src/common/utils/emailAPI.js +1 -3
- package/src/common/utils/logging/logger.js +5 -12
- package/src/components/atoms/AssetIcon/AssetIcon.jsx +4 -14
- package/src/components/atoms/AssetSelection/AssetSelection.jsx +3 -11
- package/src/components/atoms/BackgroundTitle/BackgroundTitle.jsx +2 -12
- package/src/components/atoms/InformationMessage/InformationMessage.jsx +2 -12
- package/src/components/atoms/InformationMessage/information-message.module.scss +4 -2
- package/src/components/atoms/Input/Input.jsx +9 -25
- package/src/components/atoms/LoadingDots/LoadingDots.jsx +8 -28
- package/src/components/atoms/NoticeIcon/NoticeIcon.jsx +4 -14
- package/src/components/atoms/QrCode/QrCode.jsx +2 -8
- package/src/components/atoms/RateSelector/RateSelector.jsx +4 -12
- package/src/components/atoms/SupportChat/SupportChat.jsx +1 -6
- package/src/components/atoms/Textarea/Textarea.jsx +11 -23
- package/src/components/atoms/TitleBox/TitleBox.jsx +7 -30
- package/src/components/atoms/TitleBox/title-box.module.scss +2 -0
- package/src/components/atoms/Tooltip/Tooltip.jsx +6 -8
- package/src/components/atoms/TwoLinesOfText/LinesOfText.jsx +5 -11
- package/src/components/atoms/buttons/Button/Button.jsx +17 -47
- package/src/components/atoms/buttons/Close/Close.jsx +3 -9
- package/src/components/atoms/buttons/LinkButton/LinkButton.jsx +5 -14
- package/src/components/atoms/buttons/RadioButtonWithText/RadioButtonWithText.jsx +7 -25
- package/src/components/hooks/useCallHandlingErrors.js +1 -5
- package/src/components/hooks/useReferredState.js +1 -1
- package/src/components/molecules/AmountInput/AmountInput.jsx +50 -167
- package/src/components/molecules/CoinPicker/CoinPicker.jsx +61 -194
- package/src/components/molecules/CoinPicker/coin-picker.module.scss +1 -4
- package/src/components/molecules/LineWithIconLink/LineWithIconLink.jsx +1 -6
- package/src/components/organisms/CoinPickerDialogStep/CoinPickerDialogStep.jsx +3 -5
- package/src/components/organisms/Dialog/Dialog.jsx +38 -88
- package/src/components/organisms/Dialog/DialogStep/DialogStep.jsx +55 -209
- package/src/components/organisms/Dialog/DialogStep/dialog-step.module.scss +2 -4
- package/src/components/organisms/SwapForm/SwapForm.jsx +90 -312
- package/src/components/tests/utils/inputValueProviders/provideFormatOfFloatValueByInputString.test.js +5 -12
- package/src/components/tests/utils/urlQueryUtils/getQueryParameterValues.test.js +3 -9
- package/src/components/tests/utils/urlQueryUtils/saveQueryParameterAndValues.test.js +11 -51
- package/src/components/utils/inputValueProviders.js +3 -11
- package/src/components/utils/uiUtils.js +1 -3
- package/src/components/utils/urlQueryUtils.js +10 -35
- package/src/constants/globalConstants.jsx +1 -2
- package/src/index.js +2 -8
- package/src/robustExteranlApiCallerService/cacheAndConcurrentRequestsResolver.js +22 -86
- package/src/robustExteranlApiCallerService/cachedRobustExternalApiCallerService.js +15 -56
- package/src/robustExteranlApiCallerService/concurrentCalculationsMetadataHolder.js +11 -39
- package/src/robustExteranlApiCallerService/externalServicesStatsCollector.js +3 -7
- package/src/robustExteranlApiCallerService/robustExternalAPICallerService.js +45 -129
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/_performCallAttempt.test.js +76 -330
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/callExternalAPI/callExternalAPI.test.js +57 -270
- package/src/robustExteranlApiCallerService/tests/robustExternalAPICallerService/robustExternalAPICallerService/constructor.test.js +3 -15
- package/src/swaps-lib/external-apis/swapProvider.js +1 -7
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +117 -361
- package/src/swaps-lib/models/existingSwapWithFiatData.js +1 -7
- package/src/swaps-lib/services/publicSwapService.js +47 -154
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/_fetchSupportedCurrenciesIfNeeded.test.js +33 -118
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/createSwap.test.js +23 -85
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getAllSupportedCurrencies.test.js +4 -14
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getDepositCurrencies.test.js +3 -9
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getSwapInfo.test.js +148 -460
- package/src/swaps-lib/test/external-apis/swapspaceSwapProvider/getWithdrawalCurrencies.test.js +5 -11
- package/src/swaps-lib/test/utils/swapUtils/safeHandleRequestsLimitExceeding.test.js +2 -10
- package/src/swaps-lib/utils/swapUtils.js +24 -73
- package/coverage/rabbit-ui-kit/src/assets/wrappedImages/failedValidationIcon.jsx.html +0 -244
- package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/LoadingDots.jsx.html +0 -256
- package/coverage/rabbit-ui-kit/src/components/atoms/LoadingDots/index.html +0 -116
- package/coverage/rabbit-ui-kit/src/components/atoms/TwoLinesOfText/index.html +0 -116
|
@@ -3,19 +3,12 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import { CSSTransition } from "react-transition-group";
|
|
4
4
|
import AnimateHeight from "react-animate-height";
|
|
5
5
|
import ResizeObserver from "resize-observer-polyfill";
|
|
6
|
-
import {
|
|
7
|
-
disableBodyScroll,
|
|
8
|
-
enableBodyScroll,
|
|
9
|
-
clearAllBodyScrollLocks,
|
|
10
|
-
} from "body-scroll-lock";
|
|
6
|
+
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from "body-scroll-lock";
|
|
11
7
|
import animateScrollTo from "animated-scroll-to";
|
|
12
8
|
|
|
13
9
|
import { useReferredState } from "../../hooks/useReferredState";
|
|
14
10
|
import { logErrorOrOutputToConsole } from "../../../common/errorUtils";
|
|
15
|
-
import {
|
|
16
|
-
DIALOG_TRANSITION_STEP_DURATION,
|
|
17
|
-
DIALOG_SIZES,
|
|
18
|
-
} from "../../../constants/organisms/dialog/dialog";
|
|
11
|
+
import { DIALOG_TRANSITION_STEP_DURATION, DIALOG_SIZES } from "../../../constants/organisms/dialog/dialog";
|
|
19
12
|
|
|
20
13
|
import s from "./dialog.module.scss";
|
|
21
14
|
import { Close } from "../../atoms/buttons/Close/Close";
|
|
@@ -76,16 +69,12 @@ export const Dialog = ({
|
|
|
76
69
|
dialogContainerOverflowDisabled: false,
|
|
77
70
|
hideMobileBottomButtonSection: false,
|
|
78
71
|
});
|
|
79
|
-
const [stepAnimationFinishedTrigger, setStepAnimationFinishedTrigger] =
|
|
80
|
-
useState(0);
|
|
72
|
+
const [stepAnimationFinishedTrigger, setStepAnimationFinishedTrigger] = useState(0);
|
|
81
73
|
const [dialogVerticalHeight, setDialogVerticalHeight] = useState(300);
|
|
82
74
|
const [currentStepRef, setCurrentStepRef] = useState({});
|
|
83
75
|
const [dimensions, setDimensions] = useState({ width: 0, height: 0 });
|
|
84
|
-
const [buttonsConfiguration, updateButtonsConfigurationState] = useState(
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
-
const [buttonControllingStep, updateButtonControllingStep] =
|
|
88
|
-
useReferredState("");
|
|
76
|
+
const [buttonsConfiguration, updateButtonsConfigurationState] = useState(buttonsConfigurationDefault);
|
|
77
|
+
const [buttonControllingStep, updateButtonControllingStep] = useReferredState("");
|
|
89
78
|
const [isMultiStep, setIsMultiStep] = useState(false);
|
|
90
79
|
|
|
91
80
|
const dialogWrapperRef = useRef();
|
|
@@ -94,10 +83,7 @@ export const Dialog = ({
|
|
|
94
83
|
const resizeObserverRef = useRef(null);
|
|
95
84
|
|
|
96
85
|
const updateButtonsConfiguration = (newConfiguration, stepName) => {
|
|
97
|
-
if (
|
|
98
|
-
buttonControllingStep.current === stepName ||
|
|
99
|
-
buttonControllingStep.current === ""
|
|
100
|
-
)
|
|
86
|
+
if (buttonControllingStep.current === stepName || buttonControllingStep.current === "")
|
|
101
87
|
updateButtonsConfigurationState(newConfiguration);
|
|
102
88
|
};
|
|
103
89
|
|
|
@@ -110,20 +96,17 @@ export const Dialog = ({
|
|
|
110
96
|
|
|
111
97
|
const showCornerButtonForStep = (stepName, stepButtonShowParam) => {
|
|
112
98
|
if (stepName !== "") {
|
|
113
|
-
let stepNameId = steps.findIndex(
|
|
114
|
-
return stepButtonShowParam !== null &&
|
|
115
|
-
typeof stepButtonShowParam === "boolean"
|
|
99
|
+
let stepNameId = steps.findIndex(step => step.name === stepName);
|
|
100
|
+
return stepButtonShowParam !== null && typeof stepButtonShowParam === "boolean"
|
|
116
101
|
? stepButtonShowParam
|
|
117
|
-
: stepNameId > steps.findIndex(
|
|
102
|
+
: stepNameId > steps.findIndex(step => step.hidden === false);
|
|
118
103
|
} else {
|
|
119
104
|
return false;
|
|
120
105
|
}
|
|
121
106
|
};
|
|
122
107
|
|
|
123
108
|
const nextStep = (animationControlEnabled = true) => {
|
|
124
|
-
const nextStep = steps.find(
|
|
125
|
-
(step, index) => index > currentStep && step.hidden === false
|
|
126
|
-
);
|
|
109
|
+
const nextStep = steps.find((step, index) => index > currentStep && step.hidden === false);
|
|
127
110
|
if (nextStep) {
|
|
128
111
|
goToStep(nextStep.name, animationControlEnabled);
|
|
129
112
|
return true;
|
|
@@ -135,11 +118,9 @@ export const Dialog = ({
|
|
|
135
118
|
const previousStep = (animationControlEnabled = true) => {
|
|
136
119
|
const prevSteps = steps
|
|
137
120
|
.map((step, index) => {
|
|
138
|
-
return index < currentStep && step.hidden === false
|
|
139
|
-
? step.name
|
|
140
|
-
: undefined;
|
|
121
|
+
return index < currentStep && step.hidden === false ? step.name : undefined;
|
|
141
122
|
})
|
|
142
|
-
.filter(
|
|
123
|
+
.filter(item => typeof item !== "undefined");
|
|
143
124
|
|
|
144
125
|
if (prevSteps.length > 0) {
|
|
145
126
|
goToStep(prevSteps[prevSteps.length - 1], animationControlEnabled);
|
|
@@ -149,46 +130,41 @@ export const Dialog = ({
|
|
|
149
130
|
}
|
|
150
131
|
};
|
|
151
132
|
|
|
152
|
-
const getStepClass =
|
|
133
|
+
const getStepClass = stepName => {
|
|
153
134
|
if (steps.length > 1) {
|
|
154
|
-
let stepNameId = steps.findIndex(
|
|
155
|
-
let stepClass =
|
|
156
|
-
currentStep > stepNameId
|
|
157
|
-
? "prev"
|
|
158
|
-
: currentStep === stepNameId
|
|
159
|
-
? "current"
|
|
160
|
-
: "next";
|
|
135
|
+
let stepNameId = steps.findIndex(step => step.name === stepName);
|
|
136
|
+
let stepClass = currentStep > stepNameId ? "prev" : currentStep === stepNameId ? "current" : "next";
|
|
161
137
|
return stepClass;
|
|
162
138
|
} else {
|
|
163
139
|
return "current";
|
|
164
140
|
}
|
|
165
141
|
};
|
|
166
142
|
|
|
167
|
-
const isCurrentStep =
|
|
143
|
+
const isCurrentStep = stepName => {
|
|
168
144
|
return steps[currentStep].name === stepName;
|
|
169
145
|
};
|
|
170
146
|
|
|
171
147
|
const toFirstStep = (animationControlEnabled = true) => {
|
|
172
148
|
if (animationControlEnabled) enableAnimation();
|
|
173
|
-
setCurrentStep(steps.findIndex(
|
|
149
|
+
setCurrentStep(steps.findIndex(step => step.hidden === false));
|
|
174
150
|
};
|
|
175
151
|
|
|
176
152
|
const goToStep = (stepName, animationControlEnabled = true) => {
|
|
177
153
|
if (animationControlEnabled) enableAnimation();
|
|
178
154
|
try {
|
|
179
|
-
let stepNameId = steps.findIndex(
|
|
155
|
+
let stepNameId = steps.findIndex(step => step.name === stepName);
|
|
180
156
|
setCurrentStep(stepNameId);
|
|
181
157
|
} catch (e) {
|
|
182
158
|
logErrorOrOutputToConsole(e);
|
|
183
159
|
}
|
|
184
160
|
};
|
|
185
161
|
|
|
186
|
-
const provideCurrentStepRef =
|
|
162
|
+
const provideCurrentStepRef = ref => {
|
|
187
163
|
setCurrentStepRef(ref);
|
|
188
164
|
};
|
|
189
165
|
|
|
190
166
|
const disableAnimation = (dispatch = false) => {
|
|
191
|
-
updateAnimationConfiguration(
|
|
167
|
+
updateAnimationConfiguration(prev => {
|
|
192
168
|
return {
|
|
193
169
|
...prev,
|
|
194
170
|
animateHeightTransitionEnabled: false,
|
|
@@ -200,7 +176,7 @@ export const Dialog = ({
|
|
|
200
176
|
};
|
|
201
177
|
});
|
|
202
178
|
if (dispatch) {
|
|
203
|
-
updateAnimationConfiguration(
|
|
179
|
+
updateAnimationConfiguration(prev => {
|
|
204
180
|
return {
|
|
205
181
|
...prev,
|
|
206
182
|
triggerAnimationFinishedDispatcher: true,
|
|
@@ -211,8 +187,8 @@ export const Dialog = ({
|
|
|
211
187
|
|
|
212
188
|
useEffect(() => {
|
|
213
189
|
if (animationConfiguration.triggerAnimationFinishedDispatcher) {
|
|
214
|
-
setStepAnimationFinishedTrigger(
|
|
215
|
-
updateAnimationConfiguration(
|
|
190
|
+
setStepAnimationFinishedTrigger(prev => prev + 1);
|
|
191
|
+
updateAnimationConfiguration(prev => {
|
|
216
192
|
return {
|
|
217
193
|
...prev,
|
|
218
194
|
triggerAnimationFinishedDispatcher: false,
|
|
@@ -223,7 +199,7 @@ export const Dialog = ({
|
|
|
223
199
|
}, [animationConfiguration]);
|
|
224
200
|
|
|
225
201
|
const enableAnimation = () => {
|
|
226
|
-
updateAnimationConfiguration(
|
|
202
|
+
updateAnimationConfiguration(prev => {
|
|
227
203
|
return {
|
|
228
204
|
...prev,
|
|
229
205
|
animateHeightTransitionEnabled: true,
|
|
@@ -255,7 +231,7 @@ export const Dialog = ({
|
|
|
255
231
|
|
|
256
232
|
useEffect(() => {
|
|
257
233
|
initControls &&
|
|
258
|
-
initControls(
|
|
234
|
+
initControls(prev => {
|
|
259
235
|
return {
|
|
260
236
|
...prev,
|
|
261
237
|
stepAnimationFinishedTrigger: stepAnimationFinishedTrigger,
|
|
@@ -266,7 +242,7 @@ export const Dialog = ({
|
|
|
266
242
|
|
|
267
243
|
useEffect(() => {
|
|
268
244
|
initControls &&
|
|
269
|
-
initControls(
|
|
245
|
+
initControls(prev => {
|
|
270
246
|
return {
|
|
271
247
|
...prev,
|
|
272
248
|
animationConfiguration: animationConfiguration,
|
|
@@ -278,32 +254,28 @@ export const Dialog = ({
|
|
|
278
254
|
useEffect(() => {
|
|
279
255
|
if (currentStepRef.current) {
|
|
280
256
|
resizeObserverRef.current = new ResizeObserver((entries = []) => {
|
|
281
|
-
entries.forEach(
|
|
257
|
+
entries.forEach(entry => {
|
|
282
258
|
const { width, height } = entry.contentRect;
|
|
283
259
|
setDimensions({ width, height });
|
|
284
260
|
});
|
|
285
261
|
});
|
|
286
|
-
if (currentStepRef.current)
|
|
287
|
-
resizeObserverRef.current.observe(currentStepRef.current);
|
|
262
|
+
if (currentStepRef.current) resizeObserverRef.current.observe(currentStepRef.current);
|
|
288
263
|
return () => {
|
|
289
|
-
if (resizeObserverRef.current)
|
|
290
|
-
resizeObserverRef.current.disconnect();
|
|
264
|
+
if (resizeObserverRef.current) resizeObserverRef.current.disconnect();
|
|
291
265
|
};
|
|
292
266
|
}
|
|
293
267
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
294
268
|
}, [currentStepRef]);
|
|
295
269
|
|
|
296
270
|
useEffect(() => {
|
|
297
|
-
setDialogVerticalHeight((prev)
|
|
298
|
-
prev !== 0 && dimensions.height === 0 ? prev : dimensions.height
|
|
299
|
-
);
|
|
271
|
+
setDialogVerticalHeight(prev => (prev !== 0 && dimensions.height === 0 ? prev : dimensions.height));
|
|
300
272
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
301
273
|
}, [dimensions]);
|
|
302
274
|
|
|
303
275
|
useEffect(() => {
|
|
304
276
|
const childrenFormatted = children.length > 1 ? children : [children];
|
|
305
277
|
|
|
306
|
-
let stepsArr = childrenFormatted.map(
|
|
278
|
+
let stepsArr = childrenFormatted.map(child => {
|
|
307
279
|
return {
|
|
308
280
|
name: child.props.stepName,
|
|
309
281
|
hidden: !!child.props.hidden,
|
|
@@ -392,9 +364,7 @@ export const Dialog = ({
|
|
|
392
364
|
className={
|
|
393
365
|
s["dialog"] +
|
|
394
366
|
" " +
|
|
395
|
-
(dialogVerticalHeight > 1 || !isMultiStep
|
|
396
|
-
? ""
|
|
397
|
-
: " " + s["hidden"]) +
|
|
367
|
+
(dialogVerticalHeight > 1 || !isMultiStep ? "" : " " + s["hidden"]) +
|
|
398
368
|
(animationConfiguration.dialogContainerOverflowDisabled
|
|
399
369
|
? " " + s["vertical-overflow-disabled"]
|
|
400
370
|
: "") +
|
|
@@ -402,18 +372,11 @@ export const Dialog = ({
|
|
|
402
372
|
}
|
|
403
373
|
ref={dialogRef}
|
|
404
374
|
>
|
|
405
|
-
<div
|
|
406
|
-
className={
|
|
407
|
-
s["scrollable"] + (inline ? " " + s["inline"] : "")
|
|
408
|
-
}
|
|
409
|
-
ref={scrollableRef}
|
|
410
|
-
>
|
|
375
|
+
<div className={s["scrollable"] + (inline ? " " + s["inline"] : "")} ref={scrollableRef}>
|
|
411
376
|
<div
|
|
412
377
|
className={
|
|
413
378
|
s["dialog-wrapper"] +
|
|
414
|
-
(animationConfiguration.wrapperWidthAnimationEnabled
|
|
415
|
-
? ""
|
|
416
|
-
: " " + s["animation-disabled"]) +
|
|
379
|
+
(animationConfiguration.wrapperWidthAnimationEnabled ? "" : " " + s["animation-disabled"]) +
|
|
417
380
|
(inline ? " " + s["inline"] : "")
|
|
418
381
|
}
|
|
419
382
|
ref={dialogWrapperRef}
|
|
@@ -443,11 +406,7 @@ export const Dialog = ({
|
|
|
443
406
|
""
|
|
444
407
|
) : (
|
|
445
408
|
<div className={s["dialog-wrapper-close"]}>
|
|
446
|
-
<Close
|
|
447
|
-
color="dark"
|
|
448
|
-
onClick={(e) => onClose()}
|
|
449
|
-
large
|
|
450
|
-
/>
|
|
409
|
+
<Close color="dark" onClick={e => onClose()} large />
|
|
451
410
|
</div>
|
|
452
411
|
)}
|
|
453
412
|
{children}
|
|
@@ -466,12 +425,10 @@ export const Dialog = ({
|
|
|
466
425
|
// classNames={s["fixed-buttons-container"]}
|
|
467
426
|
classNames={{
|
|
468
427
|
enter: s["fixed-buttons-container-enter"],
|
|
469
|
-
enterActive:
|
|
470
|
-
s["fixed-buttons-container-enter-active"],
|
|
428
|
+
enterActive: s["fixed-buttons-container-enter-active"],
|
|
471
429
|
enterDone: s["fixed-buttons-container-enter-done"],
|
|
472
430
|
exit: s["fixed-buttons-container-exit"],
|
|
473
|
-
exitActive:
|
|
474
|
-
s["fixed-buttons-container-exit-active"],
|
|
431
|
+
exitActive: s["fixed-buttons-container-exit-active"],
|
|
475
432
|
exitDone: s["fixed-buttons-container-exit-done"],
|
|
476
433
|
}}
|
|
477
434
|
unmountOnExit
|
|
@@ -491,14 +448,7 @@ Dialog.propTypes = {
|
|
|
491
448
|
onClose: PropTypes.func.isRequired,
|
|
492
449
|
initControls: PropTypes.func,
|
|
493
450
|
children: PropTypes.node,
|
|
494
|
-
width: PropTypes.oneOf([
|
|
495
|
-
"550px",
|
|
496
|
-
"600px",
|
|
497
|
-
"700px",
|
|
498
|
-
"750px",
|
|
499
|
-
"800px",
|
|
500
|
-
"1000px",
|
|
501
|
-
]),
|
|
451
|
+
width: PropTypes.oneOf(["550px", "600px", "700px", "750px", "800px", "1000px"]),
|
|
502
452
|
dispatchDialogOpened: PropTypes.func,
|
|
503
453
|
dispatchDialogClosed: PropTypes.func,
|
|
504
454
|
inline: PropTypes.bool,
|