@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
|
@@ -13,8 +13,7 @@ export const QrCode = ({ address, fill = false }) => {
|
|
|
13
13
|
(async () => {
|
|
14
14
|
try {
|
|
15
15
|
if (address) {
|
|
16
|
-
canvasRef.current.innerHTML =
|
|
17
|
-
await generateQrAndShowInCanvas(address);
|
|
16
|
+
canvasRef.current.innerHTML = await generateQrAndShowInCanvas(address);
|
|
18
17
|
}
|
|
19
18
|
} catch (e) {
|
|
20
19
|
logErrorOrOutputToConsole(e);
|
|
@@ -22,12 +21,7 @@ export const QrCode = ({ address, fill = false }) => {
|
|
|
22
21
|
})();
|
|
23
22
|
}, [address]);
|
|
24
23
|
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className={s["qr-code"] + (fill ? " " + s["fill"] : "")}
|
|
28
|
-
ref={canvasRef}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
24
|
+
return <div className={s["qr-code"] + (fill ? " " + s["fill"] : "")} ref={canvasRef} />;
|
|
31
25
|
};
|
|
32
26
|
|
|
33
27
|
QrCode.propTypes = {
|
|
@@ -13,24 +13,16 @@ export const RateSelector = ({
|
|
|
13
13
|
return (
|
|
14
14
|
<div className={s["rate-selector"]}>
|
|
15
15
|
<div
|
|
16
|
-
className={`${s["rate-selector-item"]} ${
|
|
17
|
-
!isFixed ? s["selected"] : ""
|
|
18
|
-
}`}
|
|
16
|
+
className={`${s["rate-selector-item"]} ${!isFixed ? s["selected"] : ""}`}
|
|
19
17
|
onClick={() => setIsFixed(false)}
|
|
20
18
|
>
|
|
21
|
-
<div className={s["rate-selector-item-text"]}>
|
|
22
|
-
{translations.floatingRate}
|
|
23
|
-
</div>
|
|
19
|
+
<div className={s["rate-selector-item-text"]}>{translations.floatingRate}</div>
|
|
24
20
|
</div>
|
|
25
21
|
<div
|
|
26
|
-
className={`${s["rate-selector-item"]} ${
|
|
27
|
-
isFixed ? s["selected"] : ""
|
|
28
|
-
}`}
|
|
22
|
+
className={`${s["rate-selector-item"]} ${isFixed ? s["selected"] : ""}`}
|
|
29
23
|
onClick={() => setIsFixed(true)}
|
|
30
24
|
>
|
|
31
|
-
<div className={s["rate-selector-item-text"]}>
|
|
32
|
-
{translations.fixedRate}
|
|
33
|
-
</div>
|
|
25
|
+
<div className={s["rate-selector-item-text"]}>{translations.fixedRate}</div>
|
|
34
26
|
</div>
|
|
35
27
|
</div>
|
|
36
28
|
);
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
export const SupportChat = ({
|
|
5
|
-
url,
|
|
6
|
-
websiteToken,
|
|
7
|
-
welcomeMessage = "",
|
|
8
|
-
locale = "en",
|
|
9
|
-
}) => {
|
|
4
|
+
export const SupportChat = ({ url, websiteToken, welcomeMessage = "", locale = "en" }) => {
|
|
10
5
|
useEffect(() => {
|
|
11
6
|
window.chatwootSettings = {
|
|
12
7
|
position: "right",
|
|
@@ -49,21 +49,14 @@ export const Textarea = forwardRef(
|
|
|
49
49
|
) => {
|
|
50
50
|
const callHandlingErrors = useCallHandlingErrors();
|
|
51
51
|
|
|
52
|
-
const onChangeProxy =
|
|
53
|
-
if (ignoreEnter)
|
|
54
|
-
e.target.value = e.target.value.replace(/(\r\n|\n|\r)/gm, "");
|
|
52
|
+
const onChangeProxy = e => {
|
|
53
|
+
if (ignoreEnter) e.target.value = e.target.value.replace(/(\r\n|\n|\r)/gm, "");
|
|
55
54
|
|
|
56
|
-
if (e.target?.value.indexOf("\n") === -1 || !ignoreEnter)
|
|
57
|
-
onChange(e);
|
|
55
|
+
if (e.target?.value.indexOf("\n") === -1 || !ignoreEnter) onChange(e);
|
|
58
56
|
};
|
|
59
57
|
|
|
60
58
|
return (
|
|
61
|
-
<div
|
|
62
|
-
className={
|
|
63
|
-
s["textarea"] +
|
|
64
|
-
` ${fullHeight ? " " + s["full-height"] : ""}`
|
|
65
|
-
}
|
|
66
|
-
>
|
|
59
|
+
<div className={s["textarea"] + ` ${fullHeight ? " " + s["full-height"] : ""}`}>
|
|
67
60
|
{label ? (
|
|
68
61
|
<label htmlFor={id} className={s["textarea-input-label"]}>
|
|
69
62
|
{label}
|
|
@@ -77,13 +70,11 @@ export const Textarea = forwardRef(
|
|
|
77
70
|
" " +
|
|
78
71
|
s["adaptive-height"] +
|
|
79
72
|
(disabled ? " " + s["disabled"] : "") +
|
|
80
|
-
(errorEncountered
|
|
81
|
-
? " " + s["error-encountered"]
|
|
82
|
-
: "")
|
|
73
|
+
(errorEncountered ? " " + s["error-encountered"] : "")
|
|
83
74
|
}
|
|
84
75
|
minRows={1}
|
|
85
76
|
maxRows={3}
|
|
86
|
-
onChange={
|
|
77
|
+
onChange={e => callHandlingErrors(onChangeProxy, e)}
|
|
87
78
|
placeholder={placeholder}
|
|
88
79
|
value={value}
|
|
89
80
|
id={id}
|
|
@@ -96,11 +87,11 @@ export const Textarea = forwardRef(
|
|
|
96
87
|
name={name}
|
|
97
88
|
className={
|
|
98
89
|
s["textarea-input"] +
|
|
99
|
-
` ${fullHeight ? s["full-height"] : ""} ${
|
|
100
|
-
|
|
101
|
-
}
|
|
90
|
+
` ${fullHeight ? s["full-height"] : ""} ${smallText ? s["small-text"] : ""} ${
|
|
91
|
+
disabled ? s["disabled"] : ""
|
|
92
|
+
}`
|
|
102
93
|
}
|
|
103
|
-
onChange={
|
|
94
|
+
onChange={e => callHandlingErrors(onChange, e)}
|
|
104
95
|
placeholder={placeholder}
|
|
105
96
|
value={value}
|
|
106
97
|
id={id}
|
|
@@ -111,10 +102,7 @@ export const Textarea = forwardRef(
|
|
|
111
102
|
)}
|
|
112
103
|
|
|
113
104
|
{alertText || successAlertText ? (
|
|
114
|
-
<Validation
|
|
115
|
-
text={alertText || successAlertText}
|
|
116
|
-
isSuccessAlert={!alertText}
|
|
117
|
-
/>
|
|
105
|
+
<Validation text={alertText || successAlertText} isSuccessAlert={!alertText} />
|
|
118
106
|
) : null}
|
|
119
107
|
</div>
|
|
120
108
|
);
|
|
@@ -34,7 +34,7 @@ import { Tooltip } from "../Tooltip/Tooltip.jsx";
|
|
|
34
34
|
export const TitleBox = ({
|
|
35
35
|
title = "",
|
|
36
36
|
linkText = "",
|
|
37
|
-
linkButtonClick =
|
|
37
|
+
linkButtonClick = resetButtonLoader => {},
|
|
38
38
|
isLinkButtonDisabled = false,
|
|
39
39
|
children,
|
|
40
40
|
linkButtonLoader = false,
|
|
@@ -50,13 +50,11 @@ export const TitleBox = ({
|
|
|
50
50
|
}) => {
|
|
51
51
|
const handleError = useCallHandlingErrors();
|
|
52
52
|
|
|
53
|
-
const transparentTitleClass = transparentTitle
|
|
54
|
-
? s["transparent-title"]
|
|
55
|
-
: "";
|
|
53
|
+
const transparentTitleClass = transparentTitle ? s["transparent-title"] : "";
|
|
56
54
|
|
|
57
55
|
const [showCopyNotice, setShowCopyNotice] = useState(false);
|
|
58
56
|
|
|
59
|
-
const handleCopyButton =
|
|
57
|
+
const handleCopyButton = e => {
|
|
60
58
|
handleError(() => {
|
|
61
59
|
setShowCopyNotice(true);
|
|
62
60
|
copyBrowserTextToClipboard(copyButtonContent);
|
|
@@ -67,31 +65,13 @@ export const TitleBox = ({
|
|
|
67
65
|
};
|
|
68
66
|
|
|
69
67
|
return (
|
|
70
|
-
<div
|
|
71
|
-
className={`${s["title-box"]} ${fullWidth ? s["full-width"] : ""}`}
|
|
72
|
-
>
|
|
68
|
+
<div className={`${s["title-box"]} ${fullWidth ? s["full-width"] : ""}`}>
|
|
73
69
|
{title || titleNoticeText || linkText ? (
|
|
74
70
|
<div className={s["title-box-wrapper"]}>
|
|
75
71
|
{bigTitle ? (
|
|
76
|
-
<h5
|
|
77
|
-
className={
|
|
78
|
-
s["title-box-wrapper-title"] +
|
|
79
|
-
" " +
|
|
80
|
-
transparentTitleClass
|
|
81
|
-
}
|
|
82
|
-
>
|
|
83
|
-
{title}
|
|
84
|
-
</h5>
|
|
72
|
+
<h5 className={s["title-box-wrapper-title"] + " " + transparentTitleClass}>{title}</h5>
|
|
85
73
|
) : (
|
|
86
|
-
<h6
|
|
87
|
-
className={
|
|
88
|
-
s["title-box-wrapper-title"] +
|
|
89
|
-
" " +
|
|
90
|
-
transparentTitleClass
|
|
91
|
-
}
|
|
92
|
-
>
|
|
93
|
-
{title}
|
|
94
|
-
</h6>
|
|
74
|
+
<h6 className={s["title-box-wrapper-title"] + " " + transparentTitleClass}>{title}</h6>
|
|
95
75
|
)}
|
|
96
76
|
{titleNoticeText ? (
|
|
97
77
|
<NoticeIcon
|
|
@@ -108,10 +88,7 @@ export const TitleBox = ({
|
|
|
108
88
|
isLoadable={false}
|
|
109
89
|
isDisabled={false}
|
|
110
90
|
/>
|
|
111
|
-
<Tooltip
|
|
112
|
-
position={TOOLTIP_POSITIONS.TOP_LEFT}
|
|
113
|
-
showTooltip={showCopyNotice}
|
|
114
|
-
>
|
|
91
|
+
<Tooltip position={TOOLTIP_POSITIONS.TOP_LEFT} showTooltip={showCopyNotice}>
|
|
115
92
|
{copyButtonTooltipContent}
|
|
116
93
|
</Tooltip>
|
|
117
94
|
</div>
|
|
@@ -29,7 +29,7 @@ export const Tooltip = ({
|
|
|
29
29
|
}) => {
|
|
30
30
|
const handleError = useCallHandlingErrors();
|
|
31
31
|
|
|
32
|
-
const onClick =
|
|
32
|
+
const onClick = e => {
|
|
33
33
|
e.stopPropagation();
|
|
34
34
|
handleClick();
|
|
35
35
|
};
|
|
@@ -37,13 +37,11 @@ export const Tooltip = ({
|
|
|
37
37
|
return (
|
|
38
38
|
<CSSTransition in={showTooltip} timeout={400} unmountOnExit>
|
|
39
39
|
<span
|
|
40
|
-
className={`${s["tooltip"]} ${wide ? s["wide"] : ""} ${
|
|
41
|
-
s[
|
|
42
|
-
}
|
|
43
|
-
onClick={
|
|
44
|
-
onDoubleClick={(e)
|
|
45
|
-
handleError((e) => e.stopPropagation(), e)
|
|
46
|
-
}
|
|
40
|
+
className={`${s["tooltip"]} ${wide ? s["wide"] : ""} ${s[position]} ${
|
|
41
|
+
ignorePointerEvents ? s["ignore-pointer"] : ""
|
|
42
|
+
}`}
|
|
43
|
+
onClick={e => handleError(onClick, e)}
|
|
44
|
+
onDoubleClick={e => handleError(e => e.stopPropagation(), e)}
|
|
47
45
|
>
|
|
48
46
|
<DarkRectangle />
|
|
49
47
|
{/*<img src={darkRectangle} alt="dark rectangle" />*/}
|
|
@@ -34,23 +34,17 @@ export const LinesOfText = ({
|
|
|
34
34
|
<div className={isHorizontal ? s["horizontal"] : ""}>
|
|
35
35
|
<h5 className={s["first-line-text"]}>
|
|
36
36
|
<span
|
|
37
|
-
className={`${
|
|
38
|
-
|
|
39
|
-
} ${
|
|
40
|
-
breakFirstLine ? " " + s["break"] : ""
|
|
41
|
-
}`}
|
|
37
|
+
className={`${isFirstLineTextReducible ? s["shorted"] : s["full-text"]} ${
|
|
38
|
+
wrapFirstLine ? " " + s["wrap"] : ""
|
|
39
|
+
} ${breakFirstLine ? " " + s["break"] : ""}`}
|
|
42
40
|
>
|
|
43
41
|
{firstLineText}
|
|
44
42
|
</span>
|
|
45
43
|
{`\u00A0${firstLineNotReducibleSuffix}`}
|
|
46
44
|
</h5>
|
|
47
45
|
{isHorizontal ? <div className={s["line"]} /> : null}
|
|
48
|
-
{secondLineText ?
|
|
49
|
-
|
|
50
|
-
) : null}
|
|
51
|
-
{thirdLineText ? (
|
|
52
|
-
<p className={s["second-line-text"]}>{thirdLineText}</p>
|
|
53
|
-
) : null}
|
|
46
|
+
{secondLineText ? <p className={s["second-line-text"]}>{secondLineText}</p> : null}
|
|
47
|
+
{thirdLineText ? <p className={s["second-line-text"]}>{thirdLineText}</p> : null}
|
|
54
48
|
</div>
|
|
55
49
|
);
|
|
56
50
|
};
|
|
@@ -46,7 +46,7 @@ export const Button = ({
|
|
|
46
46
|
icon = "",
|
|
47
47
|
content = "",
|
|
48
48
|
isDisabled = false,
|
|
49
|
-
setClickTrigger =
|
|
49
|
+
setClickTrigger = p => {},
|
|
50
50
|
isFormSubmittingButton = false,
|
|
51
51
|
bigIcon = false,
|
|
52
52
|
checkmarkOnClick = false,
|
|
@@ -72,7 +72,7 @@ export const Button = ({
|
|
|
72
72
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
73
|
}, [isLoading]);
|
|
74
74
|
|
|
75
|
-
const buttonClick =
|
|
75
|
+
const buttonClick = e => {
|
|
76
76
|
if (isLoading || isDisabled) {
|
|
77
77
|
return false;
|
|
78
78
|
}
|
|
@@ -103,77 +103,47 @@ export const Button = ({
|
|
|
103
103
|
(fullWidthOnMobiles ? ` ${styles["full-width-on-mobiles"]}` : "") +
|
|
104
104
|
(fullWidthOnTablets ? ` ${styles["full-width-on-tablets"]}` : "") +
|
|
105
105
|
(isDisabled ? ` ${styles.disable}` : "") +
|
|
106
|
-
(smallPaddingOnSmallMobiles
|
|
107
|
-
? ` ${styles["small-padding-on-small-mobiles"]}`
|
|
108
|
-
: "");
|
|
106
|
+
(smallPaddingOnSmallMobiles ? ` ${styles["small-padding-on-small-mobiles"]}` : "");
|
|
109
107
|
|
|
110
108
|
return (
|
|
111
109
|
<>
|
|
112
110
|
{isFormSubmittingButton ? <input type="submit" hidden /> : null}
|
|
113
111
|
{to ? (
|
|
114
|
-
<a
|
|
115
|
-
className={classNames}
|
|
116
|
-
onClick={(e) => handleError(buttonClick, e)}
|
|
117
|
-
href={to}
|
|
118
|
-
ref={buttonRef}
|
|
119
|
-
>
|
|
112
|
+
<a className={classNames} onClick={e => handleError(buttonClick, e)} href={to} ref={buttonRef}>
|
|
120
113
|
{icon ? (
|
|
121
|
-
<div
|
|
122
|
-
className={
|
|
123
|
-
styles["button-with-icon"] +
|
|
124
|
-
(bigIcon ? ` ${styles["big-icon"]}` : "")
|
|
125
|
-
}
|
|
126
|
-
>
|
|
114
|
+
<div className={styles["button-with-icon"] + (bigIcon ? ` ${styles["big-icon"]}` : "")}>
|
|
127
115
|
<img src={icon} alt="button icon" />
|
|
128
|
-
<span className={styles["button-with-icon-text"]}>
|
|
129
|
-
{content}
|
|
130
|
-
</span>
|
|
116
|
+
<span className={styles["button-with-icon-text"]}>{content}</span>
|
|
131
117
|
</div>
|
|
132
118
|
) : (
|
|
133
119
|
content
|
|
134
120
|
)}
|
|
135
121
|
</a>
|
|
136
122
|
) : (
|
|
137
|
-
<div
|
|
138
|
-
className={classNames}
|
|
139
|
-
onClick={(e) => handleError(buttonClick, e)}
|
|
140
|
-
ref={buttonRef}
|
|
141
|
-
>
|
|
123
|
+
<div className={classNames} onClick={e => handleError(buttonClick, e)} ref={buttonRef}>
|
|
142
124
|
<div
|
|
143
|
-
className={`${styles["button-primary-dots-wrapper"]} ${
|
|
144
|
-
isLoading && loader ? styles.show : ""
|
|
145
|
-
}`}
|
|
125
|
+
className={`${styles["button-primary-dots-wrapper"]} ${isLoading && loader ? styles.show : ""}`}
|
|
146
126
|
>
|
|
147
|
-
{loader && isLoading ?
|
|
148
|
-
<LoadingDots isColored={mode === "white"} />
|
|
149
|
-
) : null}
|
|
127
|
+
{loader && isLoading ? <LoadingDots isColored={mode === "white"} /> : null}
|
|
150
128
|
</div>
|
|
151
129
|
<div
|
|
152
|
-
className={`${styles["button-success-icon"]} ${
|
|
153
|
-
styles[
|
|
154
|
-
}
|
|
130
|
+
className={`${styles["button-success-icon"]} ${styles[mode]} ${
|
|
131
|
+
isCheckShown ? styles["show"] : ""
|
|
132
|
+
}`}
|
|
155
133
|
></div>
|
|
156
134
|
{icon ? (
|
|
157
135
|
<div
|
|
158
136
|
className={`${styles["button-with-icon"]} ${
|
|
159
|
-
(isLoading && loader) ||
|
|
160
|
-
(checkmarkOnClick && isCheckShown)
|
|
161
|
-
? styles["hide"]
|
|
162
|
-
: ""
|
|
137
|
+
(isLoading && loader) || (checkmarkOnClick && isCheckShown) ? styles["hide"] : ""
|
|
163
138
|
} ${bigIcon ? styles["big-icon"] : ""}`}
|
|
164
139
|
>
|
|
165
140
|
<img src={icon} alt="button icon" />
|
|
166
|
-
<span className={styles["button-with-icon-text"]}>
|
|
167
|
-
{content}
|
|
168
|
-
</span>
|
|
141
|
+
<span className={styles["button-with-icon-text"]}>{content}</span>
|
|
169
142
|
</div>
|
|
170
143
|
) : (
|
|
171
144
|
<span
|
|
172
145
|
className={`${styles["button-text"]} ${
|
|
173
|
-
(isLoading && loader) ||
|
|
174
|
-
(checkmarkOnClick && isCheckShown)
|
|
175
|
-
? styles["hide"]
|
|
176
|
-
: ""
|
|
146
|
+
(isLoading && loader) || (checkmarkOnClick && isCheckShown) ? styles["hide"] : ""
|
|
177
147
|
}`}
|
|
178
148
|
>
|
|
179
149
|
{content}
|
|
@@ -229,11 +199,11 @@ Button.defaultProps = {
|
|
|
229
199
|
icon: "",
|
|
230
200
|
content: "",
|
|
231
201
|
isDisabled: false,
|
|
232
|
-
setClickTrigger:
|
|
202
|
+
setClickTrigger: p => {},
|
|
233
203
|
isFormSubmittingButton: false,
|
|
234
204
|
bigIcon: false,
|
|
235
205
|
checkmarkOnClick: false,
|
|
236
206
|
propagatePrimaryButtonClick: true,
|
|
237
207
|
smallPaddingOnSmallMobiles: false,
|
|
238
|
-
handleError:
|
|
208
|
+
handleError: func => func(),
|
|
239
209
|
};
|
|
@@ -17,19 +17,13 @@ import { CLOSE_COLORS } from "../../../../constants/atoms/Close/close";
|
|
|
17
17
|
* @param {Function} props.onClick - The function to call when the icon is clicked.
|
|
18
18
|
* @param {boolean} props.large - Whether the icon should be displayed in a larger size.
|
|
19
19
|
*/
|
|
20
|
-
export const Close = ({
|
|
21
|
-
color = CLOSE_COLORS.WHITE,
|
|
22
|
-
onClick = () => {},
|
|
23
|
-
large = false,
|
|
24
|
-
}) => {
|
|
20
|
+
export const Close = ({ color = CLOSE_COLORS.WHITE, onClick = () => {}, large = false }) => {
|
|
25
21
|
const callHandlingErrors = useCallHandlingErrors();
|
|
26
22
|
|
|
27
23
|
return (
|
|
28
24
|
<svg
|
|
29
|
-
className={
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
onClick={(e) => callHandlingErrors(onClick, e)}
|
|
25
|
+
className={s["close"] + " " + s[color] + (large ? " " + s["large"] : "")}
|
|
26
|
+
onClick={e => callHandlingErrors(onClick, e)}
|
|
33
27
|
style={{ cursor: "pointer" }}
|
|
34
28
|
xmlns="http://www.w3.org/2000/svg"
|
|
35
29
|
viewBox={`0 0 50 50`}
|
|
@@ -25,7 +25,7 @@ import { LoadingDots } from "../../LoadingDots/LoadingDots";
|
|
|
25
25
|
* @returns {JSX.Element} A React component that renders a clickable and optionally loadable and icon-displaying button.
|
|
26
26
|
*/
|
|
27
27
|
export const LinkButton = ({
|
|
28
|
-
onClick =
|
|
28
|
+
onClick = resetButtonLoader => {},
|
|
29
29
|
isDisabled = false,
|
|
30
30
|
isLoadable = false,
|
|
31
31
|
content = "",
|
|
@@ -52,12 +52,7 @@ export const LinkButton = ({
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
useEffect(() => {
|
|
55
|
-
if (
|
|
56
|
-
iconRotate &&
|
|
57
|
-
Object.keys(ICON_ROTATE_OPTIONS).find(
|
|
58
|
-
(key) => ICON_ROTATE_OPTIONS[key] === iconRotate
|
|
59
|
-
)
|
|
60
|
-
)
|
|
55
|
+
if (iconRotate && Object.keys(ICON_ROTATE_OPTIONS).find(key => ICON_ROTATE_OPTIONS[key] === iconRotate))
|
|
61
56
|
setProcessedIconRotation(iconRotate);
|
|
62
57
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
63
58
|
}, [iconRotate]);
|
|
@@ -69,8 +64,7 @@ export const LinkButton = ({
|
|
|
69
64
|
className={
|
|
70
65
|
s["link-button"] +
|
|
71
66
|
` ${
|
|
72
|
-
processedIconRotation &&
|
|
73
|
-
processedIconRotation !== ICON_ROTATE_OPTIONS.rotate0
|
|
67
|
+
processedIconRotation && processedIconRotation !== ICON_ROTATE_OPTIONS.rotate0
|
|
74
68
|
? " " + s["icon-rotate-" + processedIconRotation]
|
|
75
69
|
: ""
|
|
76
70
|
} ${isDisabled ? " " + s["disabled"] : ""}`
|
|
@@ -81,10 +75,7 @@ export const LinkButton = ({
|
|
|
81
75
|
{IconComponent ? <IconComponent /> : null}
|
|
82
76
|
<p
|
|
83
77
|
className={
|
|
84
|
-
s["link-button-text"] +
|
|
85
|
-
` ${isColored ? s["colored"] : ""} ${
|
|
86
|
-
isDisabled ? s["disabled"] : ""
|
|
87
|
-
}`
|
|
78
|
+
s["link-button-text"] + ` ${isColored ? s["colored"] : ""} ${isDisabled ? s["disabled"] : ""}`
|
|
88
79
|
}
|
|
89
80
|
>
|
|
90
81
|
{content}
|
|
@@ -105,7 +96,7 @@ LinkButton.propTypes = {
|
|
|
105
96
|
};
|
|
106
97
|
|
|
107
98
|
LinkButton.defaultProps = {
|
|
108
|
-
onClick:
|
|
99
|
+
onClick: resetButtonLoader => {},
|
|
109
100
|
isDisabled: false,
|
|
110
101
|
isLoadable: false,
|
|
111
102
|
content: "",
|
|
@@ -42,9 +42,7 @@ export const RadioButtonWithText = ({
|
|
|
42
42
|
|
|
43
43
|
const onMouseEnter = () => {
|
|
44
44
|
if (tooltipText) {
|
|
45
|
-
setShowTooltipTimeoutId(
|
|
46
|
-
setTimeout(() => setShowTooltip(true), 700)
|
|
47
|
-
);
|
|
45
|
+
setShowTooltipTimeoutId(setTimeout(() => setShowTooltip(true), 700));
|
|
48
46
|
}
|
|
49
47
|
};
|
|
50
48
|
|
|
@@ -66,44 +64,28 @@ export const RadioButtonWithText = ({
|
|
|
66
64
|
isLoading ? s["hide"] : "",
|
|
67
65
|
isDisabled ? s["disabled"] : "",
|
|
68
66
|
].join(" ")}
|
|
69
|
-
onMouseEnter={
|
|
70
|
-
onMouseLeave={
|
|
67
|
+
onMouseEnter={e => handleError(onMouseEnter, e)}
|
|
68
|
+
onMouseLeave={e => handleError(onMouseLeave, e)}
|
|
71
69
|
>
|
|
72
70
|
{tooltipText && showTooltip ? (
|
|
73
71
|
<div>
|
|
74
72
|
{/*TODO: [bug, critical] click is still propagated*/}
|
|
75
|
-
<Tooltip
|
|
76
|
-
showTooltip={showTooltip}
|
|
77
|
-
handleClick={() => setShowTooltip(false)}
|
|
78
|
-
>
|
|
73
|
+
<Tooltip showTooltip={showTooltip} handleClick={() => setShowTooltip(false)}>
|
|
79
74
|
{tooltipText}
|
|
80
75
|
</Tooltip>
|
|
81
76
|
</div>
|
|
82
77
|
) : null}
|
|
83
|
-
<div
|
|
84
|
-
className={
|
|
85
|
-
s["radio-button-with-text-dots"] +
|
|
86
|
-
(isLoading ? s["show"] : "")
|
|
87
|
-
}
|
|
88
|
-
>
|
|
78
|
+
<div className={s["radio-button-with-text-dots"] + (isLoading ? s["show"] : "")}>
|
|
89
79
|
<LoadingDots />
|
|
90
80
|
</div>
|
|
91
|
-
<div
|
|
92
|
-
className={
|
|
93
|
-
s["radio-button-with-text-content"] +
|
|
94
|
-
" " +
|
|
95
|
-
(false ? s["hide"] : "")
|
|
96
|
-
}
|
|
97
|
-
>
|
|
81
|
+
<div className={s["radio-button-with-text-content"] + " " + (false ? s["hide"] : "")}>
|
|
98
82
|
<input
|
|
99
83
|
id={"radio-button-with-text-" + id}
|
|
100
84
|
type="checkbox"
|
|
101
85
|
value={isSwitchedOn}
|
|
102
86
|
onChange={handleChange}
|
|
103
87
|
/>
|
|
104
|
-
<span className={s["radio-button-with-text-wrapper"]}>
|
|
105
|
-
{text}
|
|
106
|
-
</span>
|
|
88
|
+
<span className={s["radio-button-with-text-wrapper"]}>{text}</span>
|
|
107
89
|
</div>
|
|
108
90
|
</label>
|
|
109
91
|
</div>
|
|
@@ -9,11 +9,7 @@ export function useCallHandlingErrors() {
|
|
|
9
9
|
try {
|
|
10
10
|
await functionToBeCalled(event);
|
|
11
11
|
} catch (error) {
|
|
12
|
-
Logger.logError(
|
|
13
|
-
error,
|
|
14
|
-
functionToBeCalled?.name || "errorBoundaryTrigger",
|
|
15
|
-
"Caught by ErrorBoundary"
|
|
16
|
-
);
|
|
12
|
+
Logger.logError(error, functionToBeCalled?.name || "errorBoundaryTrigger", "Caught by ErrorBoundary");
|
|
17
13
|
// Triggering ErrorBoundary
|
|
18
14
|
setState(() => {
|
|
19
15
|
throw error;
|
|
@@ -11,7 +11,7 @@ export function useReferredState(initialValue) {
|
|
|
11
11
|
const [state, setState] = React.useState(initialValue);
|
|
12
12
|
const reference = React.useRef(state);
|
|
13
13
|
|
|
14
|
-
const setReferredState =
|
|
14
|
+
const setReferredState = value => {
|
|
15
15
|
if (value && {}.toString.call(value) === "[object Function]") {
|
|
16
16
|
value = value(reference.current);
|
|
17
17
|
}
|