@ape.swap/bonds-sdk 1.0.432 → 1.0.434
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/dist/components/Bonds/{BondRow → BondRows}/BondRowsByChain.js +1 -1
- package/dist/components/Bonds/{BondRow → BondRows}/BondRowsWithTitle.js +6 -1
- package/dist/components/Bonds/{BondRow → BondRows}/ChainTitle.js +1 -1
- package/dist/components/Bonds/Bonds.js +2 -35
- package/package.json +1 -1
- /package/dist/components/Bonds/{BondRow → BondRows}/BondRow.d.ts +0 -0
- /package/dist/components/Bonds/{BondRow → BondRows}/BondRow.js +0 -0
- /package/dist/components/Bonds/{BondRow → BondRows}/BondRowsByChain.d.ts +0 -0
- /package/dist/components/Bonds/{BondRow → BondRows}/BondRowsWithTitle.d.ts +0 -0
- /package/dist/components/Bonds/{BondRow → BondRows}/ChainTitle.d.ts +0 -0
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
|
-
import { Flex } from '
|
|
13
|
+
import { Flex } from '../../uikit-sdk';
|
|
14
14
|
import { ChainId, MAINNET_CHAINS } from '../../../config/constants/chains';
|
|
15
15
|
import BondRowsWithTitle from './BondRowsWithTitle';
|
|
16
16
|
var BondRowsByChain = function (_a) {
|
|
@@ -14,11 +14,16 @@ import { Flex } from "../../uikit-sdk";
|
|
|
14
14
|
import { AnimatePresence, motion } from "framer-motion";
|
|
15
15
|
import ChainTitle from "./ChainTitle";
|
|
16
16
|
import BondRow from "./BondRow";
|
|
17
|
+
import { useState } from "react";
|
|
17
18
|
var BondRowsWithTitle = function (_a) {
|
|
18
19
|
var chain = _a.chain, bonds = _a.bonds, hotBonds = _a.hotBonds, rowClick = _a.rowClick;
|
|
19
20
|
var billsFilteredByChain = bonds.filter(function (bill) { return bill.chainId === chain; });
|
|
20
21
|
var key = chain;
|
|
21
|
-
|
|
22
|
+
var _b = useState(false), isExpanded = _b[0], setIsExpanded = _b[1];
|
|
23
|
+
var toggleExpand = function () {
|
|
24
|
+
setIsExpanded(function (prev) { return !prev; });
|
|
25
|
+
};
|
|
26
|
+
return (_jsx(Flex, __assign({ sx: { width: '100%', flexDirection: 'column' } }, { children: _jsxs(AnimatePresence, __assign({ initial: false }, { children: [_jsx(ChainTitle, { chain: chain, pt: '5px' }), billsFilteredByChain.length > 0 && (_jsx(motion.div, __assign({ onClick: toggleExpand, initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
|
|
22
27
|
position: 'relative',
|
|
23
28
|
overflow: 'hidden',
|
|
24
29
|
width: '100%',
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
13
|
import { NETWORK_LABEL } from '../../../config/constants/chains';
|
|
14
|
-
import { Flex, Svg } from '
|
|
14
|
+
import { Flex, Svg } from '../../uikit-sdk';
|
|
15
15
|
var ChainTitle = function (_a) {
|
|
16
16
|
var chain = _a.chain, pt = _a.pt;
|
|
17
17
|
return (_jsxs(Flex, __assign({ sx: {
|
|
@@ -72,7 +72,7 @@ import { TooltipText } from '../../enum/tooltips';
|
|
|
72
72
|
import { TooltipBubble, Svg } from '../uikit-sdk';
|
|
73
73
|
import { BLOCK_EXPLORER } from '../../config/constants/chains';
|
|
74
74
|
import { Input } from '../uikit-sdk/Input';
|
|
75
|
-
import BondRowsByChain from './
|
|
75
|
+
import BondRowsByChain from './BondRows/BondRowsByChain';
|
|
76
76
|
var Bonds = function (_a) {
|
|
77
77
|
var connectionString = _a.connectionString;
|
|
78
78
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -269,39 +269,6 @@ var Bonds = function (_a) {
|
|
|
269
269
|
setBondsRendered(true);
|
|
270
270
|
}
|
|
271
271
|
}, [filteredBonds]);
|
|
272
|
-
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), bondsRendered && (_jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] } }, { children: _jsx(Input, { value: inputValue, onChange: handleInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px' }, width: '100%', placeholder: 'Search...' }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('discount'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-arr" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('arr'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-terms" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })),
|
|
273
|
-
// <Flex sx={{ width: '100%', flexDirection: 'column', mt: '5px' }}>
|
|
274
|
-
// {[ChainId.MAINNET].map((chain, index) => {
|
|
275
|
-
// return (
|
|
276
|
-
// <BondRow
|
|
277
|
-
// key={bond.billAddress}
|
|
278
|
-
// bond={bond}
|
|
279
|
-
// hotBonds={hotBonds}
|
|
280
|
-
// rowClick={rowClick}
|
|
281
|
-
// />
|
|
282
|
-
// )
|
|
283
|
-
// })}
|
|
284
|
-
// {[ChainId.BSC].map((chain, index) => {
|
|
285
|
-
// return (
|
|
286
|
-
// <BondRow
|
|
287
|
-
// key={bond.billAddress}
|
|
288
|
-
// bond={bond}
|
|
289
|
-
// hotBonds={hotBonds}
|
|
290
|
-
// rowClick={rowClick}
|
|
291
|
-
// />
|
|
292
|
-
// )
|
|
293
|
-
// })}
|
|
294
|
-
// {(MAINNET_CHAINS.slice(2, MAINNET_CHAINS.length).map((chain, index) => {
|
|
295
|
-
// return (
|
|
296
|
-
// <BondRow
|
|
297
|
-
// key={bond.billAddress}
|
|
298
|
-
// bond={bond}
|
|
299
|
-
// hotBonds={hotBonds}
|
|
300
|
-
// rowClick={rowClick}
|
|
301
|
-
// />
|
|
302
|
-
// )
|
|
303
|
-
// }))}
|
|
304
|
-
// </Flex>
|
|
305
|
-
); })] })))] })));
|
|
272
|
+
return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), bondsRendered && (_jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] } }, { children: _jsx(Input, { value: inputValue, onChange: handleInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px' }, width: '100%', placeholder: 'Search...' }) })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsxs(Flex, __assign({ className: "column column-discount" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('discount'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-arr" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('arr'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-terms" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('terms'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsxs(Flex, __assign({ className: "column column-tokensremaining" }, { children: [_jsx(Flex, __assign({ className: "column tooltip" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsx(Flex, __assign({ className: "column header-icon" }, { children: _jsx(Svg, { icon: "questionCircle", width: "12px" }) }))] })) })), _jsx(Flex, __assign({ className: "column header-icon", onClick: function () { return handleSort('tokensRemaining'); } }, { children: _jsx(Svg, { icon: "sort", width: "12px" }) }))] })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), _jsx(BondRowsByChain, { bonds: filteredBonds, hotBonds: hotBonds, rowClick: rowClick })] })))] })));
|
|
306
273
|
};
|
|
307
274
|
export default Bonds;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|