@stokr/components-library 2.3.48 → 2.3.49
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.
|
@@ -106,7 +106,7 @@ var Select = function Select(props) {
|
|
|
106
106
|
active: hasFocus,
|
|
107
107
|
error: error && touched,
|
|
108
108
|
htmlFor: id
|
|
109
|
-
}, label), /*#__PURE__*/_react.default.createElement(_reactSelect.default, _extends({
|
|
109
|
+
}, label), /*#__PURE__*/_react.default.createElement(_reactSelect.default, _extends({}, otherProps, {
|
|
110
110
|
id: id,
|
|
111
111
|
name: name,
|
|
112
112
|
options: options,
|
|
@@ -153,7 +153,7 @@ var Select = function Select(props) {
|
|
|
153
153
|
IndicatorSeparator: null,
|
|
154
154
|
MenuList: SelectMenuListWithScroll
|
|
155
155
|
}
|
|
156
|
-
}
|
|
156
|
+
})));
|
|
157
157
|
};
|
|
158
158
|
exports.Select = Select;
|
|
159
159
|
Select.propTypes = {
|
|
@@ -28,7 +28,10 @@ var formatCurrencyValue = function formatCurrencyValue(currency, value) {
|
|
|
28
28
|
lusdt: ['USDT', 2],
|
|
29
29
|
'bitcoin-private': ['EUR', 2],
|
|
30
30
|
'lbtc-private': ['BTC', 8],
|
|
31
|
-
bmn1: ['BMN1', 2]
|
|
31
|
+
bmn1: ['BMN1', 2],
|
|
32
|
+
'btc-fb': ['BTC', 8],
|
|
33
|
+
'usdc-fb': ['USDC', 2],
|
|
34
|
+
'usdq-fb': ['USDQ', 2]
|
|
32
35
|
}[currency] || [currency, tokenDecimals],
|
|
33
36
|
_ref2 = _slicedToArray(_ref, 2),
|
|
34
37
|
symbol = _ref2[0],
|
|
@@ -49,7 +52,10 @@ var getCurrencySymbol = function getCurrencySymbol(currencySelected) {
|
|
|
49
52
|
'lusdt-bfx': 'USDT',
|
|
50
53
|
'lbtc-bfx': 'LBTC',
|
|
51
54
|
'btc-bfx': 'BTC',
|
|
52
|
-
bmn1: 'BMN1'
|
|
55
|
+
bmn1: 'BMN1',
|
|
56
|
+
'btc-fb': 'BTC',
|
|
57
|
+
'usdc-fb': 'USDC',
|
|
58
|
+
'usdq-fb': 'USDQ'
|
|
53
59
|
}[currencySelected] || currencySelected;
|
|
54
60
|
};
|
|
55
61
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
@@ -4,8 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.scrollToElement = exports.default = void 0;
|
|
7
|
+
exports.useScrollActions = exports.scrollToElement = exports.default = exports.ScrollToTop = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactRouterDom = require("react-router-dom");
|
|
9
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
12
|
/**
|
|
@@ -121,5 +122,20 @@ var useScrollActions = function useScrollActions() {
|
|
|
121
122
|
scrollToElementWithOffset: scrollToElementWithOffset
|
|
122
123
|
};
|
|
123
124
|
};
|
|
125
|
+
exports.useScrollActions = useScrollActions;
|
|
126
|
+
var ScrollToTop = function ScrollToTop() {
|
|
127
|
+
var _useLocation = (0, _reactRouterDom.useLocation)(),
|
|
128
|
+
pathname = _useLocation.pathname;
|
|
129
|
+
(0, _react.useEffect)(function () {
|
|
130
|
+
// Reset scroll position on route change
|
|
131
|
+
window.scrollTo({
|
|
132
|
+
top: 0,
|
|
133
|
+
left: 0,
|
|
134
|
+
behavior: 'smooth'
|
|
135
|
+
});
|
|
136
|
+
}, [pathname]);
|
|
137
|
+
return null;
|
|
138
|
+
};
|
|
139
|
+
exports.ScrollToTop = ScrollToTop;
|
|
124
140
|
var _default = useScrollActions;
|
|
125
141
|
exports.default = _default;
|