@gearbox-protocol/ui-kit 3.6.0-next.3 → 3.7.0-next.1
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/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-manager-info/index.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-manager-info/overflow-layout.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-manager-info/pool-credit-manager-info.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-manager-info/test-ids.cjs +1 -0
- package/dist/cjs/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table.cjs +1 -0
- package/dist/cjs/components/composites/pool-credit-managers-table/types.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +8 -8
- package/dist/esm/components/block-sync/block-sync.js +8 -8
- package/dist/esm/components/checkbox/checkbox-labeled.js +8 -8
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +8 -8
- package/dist/esm/components/complex-input/complex-input.js +9 -9
- package/dist/esm/components/composites/index.js +33 -12
- package/dist/esm/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table-head.js +4 -4
- package/dist/esm/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table-row.js +10 -10
- package/dist/esm/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table.js +2 -2
- package/dist/esm/components/composites/pool-credit-manager-info/index.js +9 -0
- package/dist/esm/components/composites/pool-credit-manager-info/overflow-layout.js +5 -0
- package/dist/esm/components/composites/pool-credit-manager-info/pool-credit-manager-info.js +187 -0
- package/dist/esm/components/composites/pool-credit-manager-info/test-ids.js +6 -0
- package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table-head.js +4 -4
- package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table-row.js +7 -7
- package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table.js +2 -2
- package/dist/esm/components/composites/pool-credit-managers-table/types.js +1 -0
- package/dist/esm/components/composites/pool-table/columns.js +175 -128
- package/dist/esm/components/compound-apy/compound-apy.js +7 -7
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +8 -8
- package/dist/esm/components/graph/graph-view.js +38 -38
- package/dist/esm/components/index.js +616 -609
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +8 -8
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +8 -8
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +8 -8
- package/dist/esm/components/with-copy/with-copy.js +8 -8
- package/dist/esm/index.js +807 -800
- package/dist/esm/locale/en.json.js +37 -3
- package/dist/globals.css +1 -1
- package/dist/types/components/composites/index.d.ts +3 -0
- package/dist/types/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table-head.d.ts +4 -0
- package/dist/types/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table-row.d.ts +4 -0
- package/dist/types/components/{pool-assets-table → composites/pool-assets-table}/pool-assets-table.d.ts +12 -0
- package/dist/types/components/{pool-assets-table → composites/pool-assets-table}/types.d.ts +10 -3
- package/dist/types/components/composites/pool-credit-manager-info/index.d.ts +6 -0
- package/dist/types/components/composites/pool-credit-manager-info/overflow-layout.d.ts +4 -0
- package/dist/types/components/composites/pool-credit-manager-info/pool-credit-manager-info.d.ts +20 -0
- package/dist/types/components/composites/pool-credit-manager-info/test-ids.d.ts +4 -0
- package/dist/types/components/composites/pool-credit-manager-info/types.d.ts +16 -0
- package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table-head.d.ts +4 -0
- package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table-row.d.ts +5 -0
- package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table.d.ts +11 -0
- package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table.test-ids.d.ts +3 -1
- package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/types.d.ts +13 -4
- package/dist/types/components/composites/pool-table/columns.d.ts +18 -18
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/index.d.ts +0 -2
- package/dist/types/locale/en.json.d.ts +38 -1
- package/package.json +1 -1
- package/dist/cjs/components/pool-assets-table/pool-assets-table-head.cjs +0 -1
- package/dist/cjs/components/pool-assets-table/pool-assets-table-row.cjs +0 -1
- package/dist/cjs/components/pool-assets-table/pool-assets-table.cjs +0 -1
- package/dist/cjs/components/pool-credit-managers-table/pool-credit-managers-table-head.cjs +0 -1
- package/dist/cjs/components/pool-credit-managers-table/pool-credit-managers-table-row.cjs +0 -1
- package/dist/cjs/components/pool-credit-managers-table/pool-credit-managers-table.cjs +0 -1
- /package/dist/cjs/components/{pool-assets-table → composites/pool-assets-table}/index.cjs +0 -0
- /package/dist/cjs/components/{pool-assets-table → composites/pool-assets-table}/types.cjs +0 -0
- /package/dist/cjs/components/{pool-credit-managers-table → composites/pool-credit-manager-info}/types.cjs +0 -0
- /package/dist/cjs/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table.test-ids.cjs +0 -0
- /package/dist/esm/components/{pool-assets-table → composites/pool-assets-table}/index.js +0 -0
- /package/dist/esm/components/{pool-assets-table → composites/pool-assets-table}/types.js +0 -0
- /package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-manager-info}/types.js +0 -0
- /package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/index.js +0 -0
- /package/dist/esm/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/pool-credit-managers-table.test-ids.js +0 -0
- /package/dist/types/components/{pool-assets-table → composites/pool-assets-table}/index.d.ts +0 -0
- /package/dist/types/components/{pool-credit-managers-table → composites/pool-credit-managers-table}/index.d.ts +0 -0
|
@@ -1,51 +1,66 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { AssetsListCell as
|
|
3
|
-
import { CompoundAPY as
|
|
4
|
-
import { Description as
|
|
5
|
-
import { NetworkIcon as
|
|
6
|
-
import { PercentIndicator as
|
|
7
|
-
import { PoolAPYTooltip as
|
|
8
|
-
import { PoolIndicatorIcon as
|
|
9
|
-
import { PoolPointsIndicator as
|
|
10
|
-
import { Skeleton as
|
|
1
|
+
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { AssetsListCell as A } from "../../assets-list-cell/assets-list-cell.js";
|
|
3
|
+
import { CompoundAPY as P } from "../../compound-apy/compound-apy.js";
|
|
4
|
+
import { Description as m } from "../../description/description.js";
|
|
5
|
+
import { NetworkIcon as C } from "../../network-icon/network-icon.js";
|
|
6
|
+
import { PercentIndicator as x } from "../../percent-indicator/percent-indicator.js";
|
|
7
|
+
import { PoolAPYTooltip as N } from "../../pool-apy-tooltip/pool-apy-tooltip.js";
|
|
8
|
+
import { PoolIndicatorIcon as v } from "../../pool-indicator-icon/pool-indicator-icon.js";
|
|
9
|
+
import { PoolPointsIndicator as D } from "../../pool-points-indicator/pool-points-indicator.js";
|
|
10
|
+
import { Skeleton as u } from "../../skeleton/skeleton.js";
|
|
11
11
|
import "react";
|
|
12
12
|
import "@gearbox-protocol/sdk";
|
|
13
13
|
import "clsx";
|
|
14
14
|
import "tailwind-merge";
|
|
15
15
|
import "sonner";
|
|
16
|
-
import { percentageTemplate as
|
|
17
|
-
import { tokenTemplate as
|
|
16
|
+
import { percentageTemplate as I, formatMoney as p } from "../../../utils/format-money.js";
|
|
17
|
+
import { tokenTemplate as f } from "../../../utils/templates.js";
|
|
18
18
|
import "luxon";
|
|
19
19
|
import "../../../utils/z-index.js";
|
|
20
|
-
import { TokenSymbol as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import { TokenSymbol as Y } from "../../token-symbol/token-symbol.js";
|
|
21
|
+
import { FormattedMessageTyped as h } from "../../typed-intl/index.js";
|
|
22
|
+
function a(e, l, o) {
|
|
23
|
+
const t = e?.header ?? /* @__PURE__ */ i(
|
|
24
|
+
h,
|
|
25
25
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
messageId: e?.headerMessageId ?? l
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
let r;
|
|
30
|
+
if (e?.headerTip !== null) {
|
|
31
|
+
const n = e?.headerTipMessageId ?? o;
|
|
32
|
+
r = e?.headerTip ?? (n && /* @__PURE__ */ i(h, { messageId: n }));
|
|
33
|
+
}
|
|
34
|
+
return { header: t, headerTip: r, mobileTitle: e?.mobileTitle ?? t };
|
|
35
|
+
}
|
|
36
|
+
function z({ ctx: e }) {
|
|
37
|
+
const { pool: l, underlyingToken: o, points: t, apy: r, isMobile: n } = e, d = n ? 20 : 24, c = /* @__PURE__ */ i(Y, { token: o, size: d });
|
|
38
|
+
return t && t.length > 0 && r ? /* @__PURE__ */ i(
|
|
39
|
+
N,
|
|
40
|
+
{
|
|
41
|
+
totalAPY: r.totalAPY,
|
|
42
|
+
baseAPY: r.baseAPY,
|
|
43
|
+
extraAPY: r.extraAPY,
|
|
29
44
|
points: t,
|
|
30
45
|
tokensList: e.tokensList,
|
|
31
|
-
children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
46
|
+
children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(v, { size: d, children: c }) })
|
|
32
47
|
}
|
|
33
|
-
) : l.hasPoints ? /* @__PURE__ */ i(
|
|
48
|
+
) : l.hasPoints ? /* @__PURE__ */ i(D, { size: d, children: c }) : c;
|
|
34
49
|
}
|
|
35
|
-
function
|
|
36
|
-
const l = e.underlyingToken?.title ?? e.underlyingToken?.symbol ?? "",
|
|
37
|
-
return
|
|
50
|
+
function B(e) {
|
|
51
|
+
const l = e.underlyingToken?.title ?? e.underlyingToken?.symbol ?? "", o = e.pool.version;
|
|
52
|
+
return o && o >= 300 && o < 310 ? `${l} v${Math.floor(o / 100)}` : l;
|
|
38
53
|
}
|
|
39
|
-
function
|
|
54
|
+
function M({
|
|
40
55
|
ctx: e,
|
|
41
56
|
renderDescription: l,
|
|
42
|
-
getPoolName:
|
|
57
|
+
getPoolName: o
|
|
43
58
|
}) {
|
|
44
|
-
const { pool: t } = e,
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
59
|
+
const { pool: t } = e, r = o ? o(e) : B(e);
|
|
60
|
+
return /* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr] gap-x-3", children: [
|
|
61
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-3 shrink-0 leading-0", children: [
|
|
47
62
|
t.network && /* @__PURE__ */ i(
|
|
48
|
-
|
|
63
|
+
C,
|
|
49
64
|
{
|
|
50
65
|
network: t.network,
|
|
51
66
|
isTest: !1,
|
|
@@ -53,196 +68,228 @@ function v({
|
|
|
53
68
|
showTooltip: !0
|
|
54
69
|
}
|
|
55
70
|
),
|
|
56
|
-
/* @__PURE__ */ i(
|
|
71
|
+
/* @__PURE__ */ i(z, { ctx: e })
|
|
57
72
|
] }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */ i("span", { className: "truncate max-w-full", children:
|
|
60
|
-
l && /* @__PURE__ */ i(
|
|
73
|
+
/* @__PURE__ */ s("div", { className: "flex md:flex-col min-w-0 overflow-hidden items-center md:items-start gap-2 md:gap-0", children: [
|
|
74
|
+
/* @__PURE__ */ i("span", { className: "truncate max-w-full", children: r }),
|
|
75
|
+
l && /* @__PURE__ */ i(m, { className: "min-w-0 text-xs", children: l(e) })
|
|
61
76
|
] })
|
|
62
77
|
] });
|
|
63
78
|
}
|
|
64
|
-
function
|
|
65
|
-
const { pool: l, underlyingToken:
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ i(
|
|
68
|
-
/* @__PURE__ */ i(
|
|
79
|
+
function S({ ctx: e }) {
|
|
80
|
+
const { pool: l, underlyingToken: o, loading: t } = e;
|
|
81
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
|
|
82
|
+
/* @__PURE__ */ i(u, { loading: !!t, width: 60, children: p(l.expectedLiquidityInUSD ?? 0) }),
|
|
83
|
+
/* @__PURE__ */ i(m, { children: f(
|
|
69
84
|
l.expectedLiquidity,
|
|
70
|
-
|
|
85
|
+
o
|
|
71
86
|
) })
|
|
72
87
|
] });
|
|
73
88
|
}
|
|
74
|
-
function
|
|
75
|
-
const { pool: l, underlyingToken:
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */ i(
|
|
78
|
-
/* @__PURE__ */ i(
|
|
89
|
+
function F({ ctx: e }) {
|
|
90
|
+
const { pool: l, underlyingToken: o, loading: t } = e;
|
|
91
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
|
|
92
|
+
/* @__PURE__ */ i(u, { loading: !!t, width: 60, children: p(l.totalBorrowedInUSD ?? 0) }),
|
|
93
|
+
/* @__PURE__ */ i(m, { children: f(
|
|
79
94
|
l.totalBorrowed,
|
|
80
|
-
|
|
95
|
+
o
|
|
81
96
|
) })
|
|
82
97
|
] });
|
|
83
98
|
}
|
|
84
|
-
function
|
|
85
|
-
const { pool: l, loading:
|
|
99
|
+
function L({ ctx: e }) {
|
|
100
|
+
const { pool: l, loading: o, underlyingToken: t } = e, r = t?.decimals ?? 18, n = l.poolTokenSymbol != null ? {
|
|
86
101
|
title: l.poolTokenSymbol,
|
|
87
|
-
decimals:
|
|
102
|
+
decimals: r
|
|
88
103
|
} : t;
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */ i(
|
|
91
|
-
l.userBalance !== void 0 && n && /* @__PURE__ */ i(
|
|
104
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
|
|
105
|
+
/* @__PURE__ */ i(u, { loading: !!o, width: 60, children: p(l.userBalanceInUSD ?? 0) }),
|
|
106
|
+
l.userBalance !== void 0 && n && /* @__PURE__ */ i(m, { children: f(l.userBalance, n) })
|
|
92
107
|
] });
|
|
93
108
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
return !
|
|
97
|
-
|
|
109
|
+
function j(e, l) {
|
|
110
|
+
const o = e.pool.collateralTokens, { tokensList: t, isMobile: r } = e;
|
|
111
|
+
return !o?.length || !t ? null : /* @__PURE__ */ i(
|
|
112
|
+
A,
|
|
98
113
|
{
|
|
99
114
|
maxAssets: l,
|
|
100
115
|
tokensList: t,
|
|
101
|
-
balances:
|
|
102
|
-
iconSize:
|
|
116
|
+
balances: o.map((n) => ({ token: n })),
|
|
117
|
+
iconSize: r ? 20 : 24,
|
|
103
118
|
options: { mode: "cascade" }
|
|
104
119
|
}
|
|
105
120
|
);
|
|
106
121
|
}
|
|
107
|
-
function
|
|
122
|
+
function re(e) {
|
|
123
|
+
const { header: l, mobileTitle: o } = a(
|
|
124
|
+
e,
|
|
125
|
+
"components.poolTable.pool"
|
|
126
|
+
);
|
|
108
127
|
return {
|
|
109
128
|
id: "pool",
|
|
110
|
-
header:
|
|
129
|
+
header: l,
|
|
111
130
|
width: e?.width ?? "186px",
|
|
112
131
|
align: "left",
|
|
113
132
|
className: "pl-4",
|
|
114
|
-
cell: (
|
|
115
|
-
|
|
133
|
+
cell: (t) => /* @__PURE__ */ i(
|
|
134
|
+
M,
|
|
116
135
|
{
|
|
117
|
-
ctx:
|
|
136
|
+
ctx: t,
|
|
118
137
|
renderDescription: e?.renderDescription,
|
|
119
138
|
getPoolName: e?.getPoolName
|
|
120
139
|
}
|
|
121
140
|
),
|
|
122
|
-
mobileTitle:
|
|
141
|
+
mobileTitle: o
|
|
123
142
|
};
|
|
124
143
|
}
|
|
125
|
-
function
|
|
144
|
+
function ne(e) {
|
|
145
|
+
const { header: l, mobileTitle: o } = a(
|
|
146
|
+
e,
|
|
147
|
+
"components.poolTable.supply"
|
|
148
|
+
);
|
|
126
149
|
return {
|
|
127
150
|
id: "supply",
|
|
128
|
-
header:
|
|
151
|
+
header: l,
|
|
129
152
|
width: e?.width ?? "1fr",
|
|
130
153
|
align: "right",
|
|
131
154
|
hideOnMedium: e?.hideOnMedium,
|
|
132
155
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "supply", defaultDirection: "desc" },
|
|
133
|
-
cell: (
|
|
134
|
-
mobileTitle:
|
|
156
|
+
cell: (t) => /* @__PURE__ */ i(S, { ctx: t }),
|
|
157
|
+
mobileTitle: o
|
|
135
158
|
};
|
|
136
159
|
}
|
|
137
|
-
function
|
|
160
|
+
function ae(e) {
|
|
161
|
+
const { header: l, headerTip: o, mobileTitle: t } = a(
|
|
162
|
+
e,
|
|
163
|
+
"components.poolTable.supplyApy",
|
|
164
|
+
"components.poolTable.supplyApy.tip"
|
|
165
|
+
);
|
|
138
166
|
return {
|
|
139
167
|
id: "supplyApy",
|
|
140
|
-
header:
|
|
141
|
-
headerTip:
|
|
168
|
+
header: l,
|
|
169
|
+
headerTip: o,
|
|
142
170
|
width: e?.width ?? "1.25fr",
|
|
143
171
|
align: "right",
|
|
144
172
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
|
|
145
|
-
cell: (
|
|
146
|
-
const { apy:
|
|
147
|
-
totalAPY:
|
|
148
|
-
baseAPY:
|
|
149
|
-
extraAPY:
|
|
150
|
-
externalAPY:
|
|
151
|
-
apy7DAgo:
|
|
152
|
-
} =
|
|
153
|
-
return /* @__PURE__ */ i(
|
|
154
|
-
|
|
173
|
+
cell: (r) => {
|
|
174
|
+
const { apy: n, loading: d, points: c, tokensList: g } = r, {
|
|
175
|
+
totalAPY: b = 0,
|
|
176
|
+
baseAPY: T = [],
|
|
177
|
+
extraAPY: w = [],
|
|
178
|
+
externalAPY: y,
|
|
179
|
+
apy7DAgo: k
|
|
180
|
+
} = n ?? {};
|
|
181
|
+
return /* @__PURE__ */ i(u, { width: 60, loading: !!d, children: /* @__PURE__ */ i(
|
|
182
|
+
P,
|
|
155
183
|
{
|
|
156
|
-
totalAPY:
|
|
157
|
-
totalAPYLoading: !!
|
|
158
|
-
baseAPY:
|
|
159
|
-
extraAPY:
|
|
160
|
-
points:
|
|
161
|
-
apy7DAgo:
|
|
162
|
-
tokensList:
|
|
163
|
-
externalAPY:
|
|
184
|
+
totalAPY: b,
|
|
185
|
+
totalAPYLoading: !!d,
|
|
186
|
+
baseAPY: T,
|
|
187
|
+
extraAPY: w,
|
|
188
|
+
points: c,
|
|
189
|
+
apy7DAgo: k,
|
|
190
|
+
tokensList: g,
|
|
191
|
+
externalAPY: y
|
|
164
192
|
}
|
|
165
193
|
) });
|
|
166
194
|
},
|
|
167
|
-
mobileTitle:
|
|
195
|
+
mobileTitle: t
|
|
168
196
|
};
|
|
169
197
|
}
|
|
170
|
-
function
|
|
198
|
+
function de(e) {
|
|
199
|
+
const { header: l, mobileTitle: o } = a(
|
|
200
|
+
e,
|
|
201
|
+
"components.poolTable.borrowed"
|
|
202
|
+
);
|
|
171
203
|
return {
|
|
172
204
|
id: "borrowed",
|
|
173
|
-
header:
|
|
205
|
+
header: l,
|
|
174
206
|
width: e?.width ?? "1.15fr",
|
|
175
207
|
align: "right",
|
|
176
|
-
cell: (
|
|
177
|
-
mobileTitle:
|
|
208
|
+
cell: (t) => /* @__PURE__ */ i(F, { ctx: t }),
|
|
209
|
+
mobileTitle: o
|
|
178
210
|
};
|
|
179
211
|
}
|
|
180
|
-
function
|
|
212
|
+
function se(e) {
|
|
213
|
+
const { header: l, headerTip: o, mobileTitle: t } = a(
|
|
214
|
+
e,
|
|
215
|
+
"components.poolTable.borrowApy"
|
|
216
|
+
);
|
|
181
217
|
return {
|
|
182
218
|
id: "borrowApy",
|
|
183
|
-
header:
|
|
184
|
-
headerTip:
|
|
219
|
+
header: l,
|
|
220
|
+
headerTip: o,
|
|
185
221
|
width: e?.width ?? "150px",
|
|
186
222
|
align: "right",
|
|
187
|
-
cell: (
|
|
188
|
-
const
|
|
189
|
-
return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children:
|
|
223
|
+
cell: (r) => {
|
|
224
|
+
const n = r.pool.borrowAPY ?? e?.getBorrowRate?.(r.pool) ?? 0;
|
|
225
|
+
return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: I(n) });
|
|
190
226
|
},
|
|
191
|
-
mobileTitle:
|
|
227
|
+
mobileTitle: t
|
|
192
228
|
};
|
|
193
229
|
}
|
|
194
|
-
function
|
|
230
|
+
function ce(e) {
|
|
231
|
+
const { header: l, mobileTitle: o } = a(
|
|
232
|
+
e,
|
|
233
|
+
"components.poolTable.utilization"
|
|
234
|
+
);
|
|
195
235
|
return {
|
|
196
236
|
id: "utilization",
|
|
197
|
-
header:
|
|
237
|
+
header: l,
|
|
198
238
|
width: e?.width ?? "150px",
|
|
199
239
|
align: "right",
|
|
200
240
|
className: "pr-4",
|
|
201
241
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "utilization", defaultDirection: "desc" },
|
|
202
|
-
cell: (
|
|
203
|
-
const r =
|
|
204
|
-
return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: /* @__PURE__ */ i(
|
|
242
|
+
cell: (t) => {
|
|
243
|
+
const r = t.pool.utilization ?? 0;
|
|
244
|
+
return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: /* @__PURE__ */ i(x, { percent: r }) });
|
|
205
245
|
},
|
|
206
|
-
mobileTitle:
|
|
246
|
+
mobileTitle: o
|
|
207
247
|
};
|
|
208
248
|
}
|
|
209
|
-
function
|
|
210
|
-
const l = e?.maxAssets ?? 5,
|
|
249
|
+
function me(e) {
|
|
250
|
+
const l = e?.maxAssets ?? 5, o = (n) => j(n, l), { header: t, mobileTitle: r } = a(
|
|
251
|
+
e,
|
|
252
|
+
"components.poolTable.collateral"
|
|
253
|
+
);
|
|
211
254
|
return {
|
|
212
255
|
id: "collateral",
|
|
213
|
-
header:
|
|
256
|
+
header: t,
|
|
214
257
|
width: e?.width ?? "148px",
|
|
215
258
|
align: e?.align ?? "left",
|
|
216
259
|
gapBefore: e?.gapBefore ?? "md",
|
|
217
|
-
cell: e?.cell ??
|
|
218
|
-
mobileCell: e?.mobileCell ?? e?.cell ??
|
|
219
|
-
mobileTitle:
|
|
260
|
+
cell: e?.cell ?? o,
|
|
261
|
+
mobileCell: e?.mobileCell ?? e?.cell ?? o,
|
|
262
|
+
mobileTitle: r
|
|
220
263
|
};
|
|
221
264
|
}
|
|
222
|
-
function
|
|
265
|
+
function ue(e) {
|
|
266
|
+
const { header: l, mobileTitle: o } = a(
|
|
267
|
+
e,
|
|
268
|
+
"components.poolTable.balance"
|
|
269
|
+
);
|
|
223
270
|
return {
|
|
224
271
|
id: "balance",
|
|
225
|
-
header:
|
|
272
|
+
header: l,
|
|
226
273
|
width: e?.width ?? "1.15fr",
|
|
227
274
|
align: "right",
|
|
228
275
|
className: e?.className ?? "pr-4",
|
|
229
276
|
headerClassName: e?.headerClassName ?? "pr-4",
|
|
230
277
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "balance", defaultDirection: "desc" },
|
|
231
|
-
cell: e?.cell ?? ((
|
|
232
|
-
mobileTitle:
|
|
278
|
+
cell: e?.cell ?? ((t) => /* @__PURE__ */ i(L, { ctx: t })),
|
|
279
|
+
mobileTitle: o
|
|
233
280
|
};
|
|
234
281
|
}
|
|
235
|
-
function
|
|
282
|
+
function pe(e) {
|
|
236
283
|
return e;
|
|
237
284
|
}
|
|
238
285
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
286
|
+
ue as balanceColumn,
|
|
287
|
+
se as borrowApyColumn,
|
|
288
|
+
de as borrowedColumn,
|
|
289
|
+
me as collateralColumn,
|
|
290
|
+
pe as customColumn,
|
|
291
|
+
re as poolColumn,
|
|
292
|
+
ae as supplyApyColumn,
|
|
293
|
+
ne as supplyColumn,
|
|
294
|
+
ce as utilizationColumn
|
|
248
295
|
};
|
|
@@ -52,15 +52,18 @@ import "../input/input.js";
|
|
|
52
52
|
import "../with-title/with-title.js";
|
|
53
53
|
import "../smart-number-input/balance-indicator.js";
|
|
54
54
|
import "../smart-number-input/smart-number-input.js";
|
|
55
|
+
import "../table/grid-table.js";
|
|
56
|
+
import "../help-tip/help-tip.js";
|
|
55
57
|
import "../description/description.js";
|
|
58
|
+
import { getSymbolOrIcon as C } from "../token-symbol/token-symbol.js";
|
|
59
|
+
import "../confirm-menu/confirm-menu.js";
|
|
60
|
+
import "../dialog/dialog-modal-container.js";
|
|
61
|
+
import "../text-button/text-button.js";
|
|
62
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
56
63
|
import "../rounded-image/rounded-image.js";
|
|
57
64
|
import "../progress/progress.js";
|
|
58
65
|
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
59
66
|
import "../skeleton/skeleton.js";
|
|
60
|
-
import { getSymbolOrIcon as C } from "../token-symbol/token-symbol.js";
|
|
61
|
-
import "../help-tip/help-tip.js";
|
|
62
|
-
import "../table/grid-table.js";
|
|
63
|
-
import "../confirm-menu/confirm-menu.js";
|
|
64
67
|
import "../currency-button/currency-button.js";
|
|
65
68
|
import "../detailed-apy/detailed-apy.js";
|
|
66
69
|
import "../detailed-page-title/detailed-page-title.js";
|
|
@@ -74,7 +77,6 @@ import "../dialog/dialog-description.js";
|
|
|
74
77
|
import "../dialog/dialog-footer.js";
|
|
75
78
|
import "../dialog/dialog-header.js";
|
|
76
79
|
import "../dialog/dialog-title.js";
|
|
77
|
-
import "../dialog/dialog-modal-container.js";
|
|
78
80
|
import "../dialog/dialog-overlay.js";
|
|
79
81
|
import "viem";
|
|
80
82
|
import "../label/label.js";
|
|
@@ -121,7 +123,6 @@ import "../layout/social-icons/social-icons.js";
|
|
|
121
123
|
import "../link/link.js";
|
|
122
124
|
import "../../utils/reactochart-compat.js";
|
|
123
125
|
import "../status-elements/status-elements.js";
|
|
124
|
-
import "../text-button/text-button.js";
|
|
125
126
|
import "../loader/loader.js";
|
|
126
127
|
import "../loading/loading.js";
|
|
127
128
|
import "../loading-bar/loading-bar.js";
|
|
@@ -132,7 +133,6 @@ import "../navbar/navbar-indicator-context.js";
|
|
|
132
133
|
import "../app-bar/app-bar.js";
|
|
133
134
|
import "../navitem/navitem.js";
|
|
134
135
|
import "../simple-dropdown/simple-dropdown.js";
|
|
135
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
136
136
|
import "../progress-bar/progress-bar.js";
|
|
137
137
|
import "../radio-group/radio-group.js";
|
|
138
138
|
import "../search-bar/search-bar.js";
|
|
@@ -48,18 +48,20 @@ import "../input/input.js";
|
|
|
48
48
|
import "../with-title/with-title.js";
|
|
49
49
|
import "../smart-number-input/balance-indicator.js";
|
|
50
50
|
import "../smart-number-input/smart-number-input.js";
|
|
51
|
+
import "../table/grid-table.js";
|
|
52
|
+
import "../help-tip/help-tip.js";
|
|
53
|
+
import "../description/description.js";
|
|
54
|
+
import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
|
|
55
|
+
import "../confirm-menu/confirm-menu.js";
|
|
56
|
+
import "../dialog/dialog-modal-container.js";
|
|
57
|
+
import "../text-button/text-button.js";
|
|
58
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
51
59
|
import "../points-icon/points-icon.js";
|
|
52
60
|
import "../skeleton/skeleton.js";
|
|
53
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
54
61
|
import "../vertical-list/vertical-list.js";
|
|
55
|
-
import "../description/description.js";
|
|
56
62
|
import "../rounded-image/rounded-image.js";
|
|
57
63
|
import "../progress/progress.js";
|
|
58
64
|
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
59
|
-
import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
|
|
60
|
-
import "../help-tip/help-tip.js";
|
|
61
|
-
import "../table/grid-table.js";
|
|
62
|
-
import "../confirm-menu/confirm-menu.js";
|
|
63
65
|
import "../currency-button/currency-button.js";
|
|
64
66
|
import "../detailed-apy/detailed-apy.js";
|
|
65
67
|
import { DetailedPageTitleCopyButton as h } from "./detailed-page-title-copy-button.js";
|
|
@@ -72,7 +74,6 @@ import "../dialog/dialog-description.js";
|
|
|
72
74
|
import "../dialog/dialog-footer.js";
|
|
73
75
|
import "../dialog/dialog-header.js";
|
|
74
76
|
import "../dialog/dialog-title.js";
|
|
75
|
-
import "../dialog/dialog-modal-container.js";
|
|
76
77
|
import "../dialog/dialog-overlay.js";
|
|
77
78
|
import "viem";
|
|
78
79
|
import "../label/label.js";
|
|
@@ -118,7 +119,6 @@ import "../layout/social-icons/social-icons.js";
|
|
|
118
119
|
import "../link/link.js";
|
|
119
120
|
import "../../utils/reactochart-compat.js";
|
|
120
121
|
import "../status-elements/status-elements.js";
|
|
121
|
-
import "../text-button/text-button.js";
|
|
122
122
|
import "../loader/loader.js";
|
|
123
123
|
import "../loading/loading.js";
|
|
124
124
|
import "../loading-bar/loading-bar.js";
|