@ape.swap/bonds-sdk 1.0.379 → 1.0.381

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.
@@ -208,7 +208,7 @@ var BondModal = function (_a) {
208
208
  !!v.currentTarget.value && isNumber(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
209
209
  ? v.currentTarget.value
210
210
  : v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
211
- } }) })), _jsxs(Flex, __assign({ className: "input-container token" }, { children: [_jsx(Flex, __assign({ className: "input-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 12, height: 12, icon: (_m = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _m !== void 0 ? _m : 'question' }), _jsx(TokenImage, { symbol: (_o = bond.principalTokenName) !== null && _o !== void 0 ? _o : bond.payoutTokenName, size: 30 })] })) })), _jsx(Flex, __assign({ className: "title-container tokenname-small" }, { children: bond === null || bond === void 0 ? void 0 : bond.principalTokenName }))] }))] })), _jsxs(Flex, __assign({ className: "input-container balancerow" }, { children: [_jsx(Flex, __assign({ className: "balancerow text" }, { children: "Balance: " })), _jsx(Flex, __assign({ className: "balancerow max" }, { children: _jsx(Button, { children: "Max" }) }))] }))] })), _jsxs(Flex, __assign({ className: "modal-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: approvalStatus === true ?
211
+ } }) })), _jsxs(Flex, __assign({ className: "input-container token" }, { children: [_jsx(Flex, __assign({ className: "input-container bondicon" }, { children: _jsxs("div", __assign({ className: "icon-container-small" }, { children: [_jsx(Svg, { width: 12, height: 12, icon: (_m = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bond.chainId]) !== null && _m !== void 0 ? _m : 'question' }), _jsx(TokenImage, { symbol: (_o = bond.principalTokenName) !== null && _o !== void 0 ? _o : bond.payoutTokenName, size: 30 })] })) })), _jsx(Flex, __assign({ className: "title-container tokenname-small" }, { children: bond === null || bond === void 0 ? void 0 : bond.principalTokenName }))] }))] })), isActive && account && (_jsxs(Flex, __assign({ className: "input-container balancerow" }, { children: [_jsx(Flex, __assign({ className: "balancerow text" }, { children: "Balance: BALANCE NUMBER PLACEHOLDER" })), _jsx(Flex, __assign({ className: "balancerow max" }, { children: _jsx(Button, { children: "Max" }) }))] })))] })), _jsxs(Flex, __assign({ className: "modal-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: approvalStatus === true ?
212
212
  _jsxs(Button, __assign({ onClick: handleBuy }, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] }))
213
213
  :
214
214
  _jsx(Button, __assign({ onClick: handleApprove }, { children: "Approve" })) }))] }))] }))] })) })) }, bond.billAddress));
@@ -187,7 +187,7 @@ var Bonds = function (_a) {
187
187
  var explorerLink = BLOCK_EXPLORER[selectedChain];
188
188
  return "".concat(explorerLink, "/address/").concat(bond === null || bond === void 0 ? void 0 : bond.billAddress);
189
189
  };
190
- return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _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-tokeninfoname" }, { children: "Tokens" })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsx(Flex, __assign({ className: "column column-discount" }, { 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 column-arr" }, { 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 column-term" }, { 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 column-tokensremaining" }, { 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, { className: "column column-hotbond" })] }))] })), sortedBonds.map(function (bond) {
190
+ return (_jsxs(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: [isActive && account && _jsx("p", { children: account }), isActive && account && _jsx("button", __assign({ onClick: handleApprove }, { children: "Approve USDT" })), _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-tokeninfoname" }, { children: "Tokens" })), _jsx(Flex, { className: "column column-tokenicons" })] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsx(Flex, __assign({ className: "column column-discount" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(18%, -4%)" }, { children: ["Discount", _jsxs(Flex, __assign({ className: "column header-icon" }, { children: [_jsx(Svg, { icon: "questionCircle", width: "12px" }), _jsx(Svg, { icon: "sort", width: "12px" })] }))] })) })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.ARR }), width: "230px", placement: "bottomLeft", transformTip: "translate(8%, -5%)" }, { children: ["ARR", _jsxs(Flex, __assign({ className: "column header-icon" }, { children: [_jsx(Svg, { icon: "questionCircle", width: "12px" }), _jsx(Svg, { icon: "sort", width: "12px" })] }))] })) })), _jsx(Flex, __assign({ className: "column column-term" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomRight", transformTip: "translate(11%, -5%)" }, { children: ["Terms", _jsxs(Flex, __assign({ className: "column header-icon" }, { children: [_jsx(Svg, { icon: "questionCircle", width: "12px" }), _jsx(Svg, { icon: "sort", width: "12px" })] }))] })) })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsxs(TooltipBubble, __assign({ body: _jsx(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomRight", transformTip: "translate(12%, -4%)" }, { children: ["Tokens Remaining", _jsxs(Flex, __assign({ className: "column header-icon" }, { children: [_jsx(Svg, { icon: "questionCircle", width: "12px" }), _jsx(Svg, { icon: "sort", width: "12px" })] }))] })) })), _jsx(Flex, { className: "column column-hotbond" })] }))] })), sortedBonds.map(function (bond) {
191
191
  var _a, _b, _c, _d, _e;
192
192
  return (_jsxs(Flex, __assign({ className: "container bondrow-container", onClick: function () { return rowClick(bond); } }, { children: [_jsxs(Flex, __assign({ className: "column column-tokens" }, { children: [_jsx(Flex, __assign({ className: "column column-tokeninfoname" }, { children: _jsx(TokenInfoAndName, { bill: bond }) })), _jsx(Flex, __assign({ className: "column column-tokenicons" }, { children: _jsx(TooltipBubble, __assign({ body: _jsx(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.payoutToken) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: "https://dashboard.ape.bond/bond/".concat((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()), thirdURLTitle: 'View Insights', twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: (_b = bond.chainId) !== null && _b !== void 0 ? _b : ChainId.BSC }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)" }, { children: _jsx(Svg, { icon: "more", width: "20px" }) })) }))] })), _jsxs(Flex, __assign({ className: "column column-bondinfo" }, { children: [_jsx(Flex, __assign({ className: "column column-discount ".concat(getDiscountColor(bond === null || bond === void 0 ? void 0 : bond.discount)) }, { children: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime(bond.vestingTerm).days).toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime(bond.vestingTerm).days ? "".concat(vestingTime(bond.vestingTerm).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: _jsx(ProgressBarWrapper, { title: '', value: _jsx(ProgressBar, { value: remainingPercentage(bond) }), style: {
193
193
  width: '127px',
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from './types';
3
+ declare const Sort: React.FC<SvgProps>;
4
+ export default Sort;
@@ -0,0 +1,27 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "theme-ui/jsx-runtime";
13
+ var Sort = function (_a) {
14
+ var _b = _a.direction, direction = _b === void 0 ? 'down' : _b, _c = _a.color, color = _c === void 0 ? 'text' : _c, width = _a.width, height = _a.height, getStyles = _a.getStyles;
15
+ var deg = {
16
+ left: 90,
17
+ up: 180,
18
+ right: 270,
19
+ down: 0,
20
+ };
21
+ var style = getStyles({
22
+ degree: deg[direction],
23
+ color: color,
24
+ });
25
+ return (_jsx("svg", __assign({ width: width || '12', height: height || '12', viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", sx: style }, { children: _jsx("path", { d: "M5.47015 0.970314C5.76312 0.677345 6.2389 0.677345 6.53187 0.970314L9.53187 3.97031C9.7475 4.18594 9.81078 4.50703 9.69359 4.78828C9.5764 5.06953 9.30453 5.25235 8.99984 5.25235H2.99984C2.6975 5.25235 2.42328 5.06953 2.30609 4.78828C2.1889 4.50703 2.25453 4.18594 2.46781 3.97031L5.46781 0.970314H5.47015ZM5.47015 11.032L2.47015 8.03203C2.25453 7.81641 2.19125 7.49531 2.30843 7.21406C2.42562 6.93281 2.6975 6.75 3.00218 6.75H8.99984C9.30218 6.75 9.5764 6.93281 9.69359 7.21406C9.81078 7.49531 9.74515 7.81641 9.53187 8.03203L6.53187 11.032C6.2389 11.325 5.76312 11.325 5.47015 11.032Z", fill: "#73728E" }) })));
26
+ };
27
+ export default Sort;
@@ -106,3 +106,4 @@ export { default as Warning } from './Warning';
106
106
  export { default as Insight } from './Insight';
107
107
  export { default as Expand } from './Expand';
108
108
  export { default as LineChart } from './LineChart';
109
+ export { default as Sort } from './Sort';
@@ -108,3 +108,4 @@ export { default as Warning } from './Warning';
108
108
  export { default as Insight } from './Insight';
109
109
  export { default as Expand } from './Expand';
110
110
  export { default as LineChart } from './LineChart';
111
+ export { default as Sort } from './Sort';
@@ -147,7 +147,8 @@ export declare enum icons {
147
147
  WhitepaperNew = "whitepapernew",
148
148
  TelegramNew = "telegramnew",
149
149
  CALENDAR = "calendar",
150
- QuestionFill = "questionFill"
150
+ QuestionFill = "questionFill",
151
+ Sort = "sort"
151
152
  }
152
153
  export declare enum directions {
153
154
  LEFT = "left",
@@ -153,6 +153,7 @@ export var icons;
153
153
  icons["TelegramNew"] = "telegramnew";
154
154
  icons["CALENDAR"] = "calendar";
155
155
  icons["QuestionFill"] = "questionFill";
156
+ icons["Sort"] = "sort";
156
157
  })(icons || (icons = {}));
157
158
  export var directions;
158
159
  (function (directions) {
@@ -313,15 +313,17 @@
313
313
  .input-container.balancerow {
314
314
  flex-direction: row;
315
315
  align-items: center;
316
+ justify-content: end;
316
317
  }
317
318
 
318
319
  .balancerow.text {
320
+ opacity: 0.8;
319
321
  align-items: center;
322
+ font-size: 12px;
320
323
  }
321
324
 
322
325
  .balancerow.max {
323
326
  align-items: center;
324
- justify-content: end;
325
327
  cursor: pointer;
326
328
 
327
329
  Button {
@@ -128,6 +128,7 @@
128
128
  .column.header-icon {
129
129
  padding-left: 5px;
130
130
  align-items: start;
131
+ justify-content: space-around;
131
132
  cursor: pointer;
132
133
  opacity: 0.6;
133
134
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.379",
6
+ "version": "1.0.381",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",