@gearbox-protocol/ui-kit 3.6.0-next.3 → 3.6.0
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/composites/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/composites/pool-table/columns.js +175 -128
- package/dist/esm/components/compound-apy/compound-apy.js +1 -1
- package/dist/esm/components/graph/graph-view.js +38 -38
- package/dist/esm/components/index.js +378 -392
- package/dist/esm/index.js +520 -534
- package/dist/esm/locale/en.json.js +25 -10
- package/dist/globals.css +1 -1
- 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 +23 -9
- package/package.json +2 -2
- package/dist/cjs/components/pool-assets-table/index.cjs +0 -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-assets-table/types.cjs +0 -1
- package/dist/cjs/components/pool-credit-managers-table/index.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-credit-managers-table/pool-credit-managers-table.test-ids.cjs +0 -1
- package/dist/cjs/components/pool-credit-managers-table/types.cjs +0 -1
- package/dist/esm/components/pool-assets-table/index.js +0 -8
- package/dist/esm/components/pool-assets-table/pool-assets-table-head.js +0 -54
- package/dist/esm/components/pool-assets-table/pool-assets-table-row.js +0 -107
- package/dist/esm/components/pool-assets-table/pool-assets-table.js +0 -43
- package/dist/esm/components/pool-assets-table/types.js +0 -1
- package/dist/esm/components/pool-credit-managers-table/index.js +0 -10
- package/dist/esm/components/pool-credit-managers-table/pool-credit-managers-table-head.js +0 -54
- package/dist/esm/components/pool-credit-managers-table/pool-credit-managers-table-row.js +0 -71
- package/dist/esm/components/pool-credit-managers-table/pool-credit-managers-table.js +0 -42
- package/dist/esm/components/pool-credit-managers-table/pool-credit-managers-table.test-ids.js +0 -6
- package/dist/esm/components/pool-credit-managers-table/types.js +0 -1
- package/dist/types/components/pool-assets-table/index.d.ts +0 -7
- package/dist/types/components/pool-assets-table/pool-assets-table-head.d.ts +0 -6
- package/dist/types/components/pool-assets-table/pool-assets-table-row.d.ts +0 -11
- package/dist/types/components/pool-assets-table/pool-assets-table.d.ts +0 -12
- package/dist/types/components/pool-assets-table/types.d.ts +0 -18
- package/dist/types/components/pool-credit-managers-table/index.d.ts +0 -8
- package/dist/types/components/pool-credit-managers-table/pool-credit-managers-table-head.d.ts +0 -6
- package/dist/types/components/pool-credit-managers-table/pool-credit-managers-table-row.d.ts +0 -11
- package/dist/types/components/pool-credit-managers-table/pool-credit-managers-table.d.ts +0 -10
- package/dist/types/components/pool-credit-managers-table/pool-credit-managers-table.test-ids.d.ts +0 -4
- package/dist/types/components/pool-credit-managers-table/types.d.ts +0 -24
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { LocaleKeys } from '../../../locale';
|
|
1
2
|
import { PoolDTO, PoolTableCellContext, PoolTableColumnDef } from './types';
|
|
2
3
|
import type * as React from "react";
|
|
4
|
+
interface ColumnHeaderOptions {
|
|
5
|
+
header?: React.ReactNode;
|
|
6
|
+
headerMessageId?: LocaleKeys;
|
|
7
|
+
/** Pass `null` to hide the default tip. */
|
|
8
|
+
headerTip?: React.ReactNode | null;
|
|
9
|
+
headerTipMessageId?: LocaleKeys;
|
|
10
|
+
mobileTitle?: React.ReactNode;
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
13
|
* Pool name column — displays token icon, pool name and optional description.
|
|
5
14
|
*
|
|
6
15
|
* Used in both charts and client-v3.
|
|
7
16
|
*/
|
|
8
|
-
export declare function poolColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
9
|
-
header?: React.ReactNode;
|
|
17
|
+
export declare function poolColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
10
18
|
renderDescription?: (ctx: PoolTableCellContext<P>) => React.ReactNode;
|
|
11
19
|
/** Custom pool name formatter. Defaults to "TOKEN vN" for v3 pools. */
|
|
12
20
|
getPoolName?: (ctx: PoolTableCellContext<P>) => string;
|
|
@@ -17,8 +25,7 @@ export declare function poolColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
17
25
|
*
|
|
18
26
|
* Used in both charts and client-v3.
|
|
19
27
|
*/
|
|
20
|
-
export declare function supplyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
21
|
-
header?: React.ReactNode;
|
|
28
|
+
export declare function supplyColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
22
29
|
width?: string;
|
|
23
30
|
sortField?: string;
|
|
24
31
|
hideOnMedium?: boolean;
|
|
@@ -28,9 +35,7 @@ export declare function supplyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
28
35
|
*
|
|
29
36
|
* Used in both charts and client-v3.
|
|
30
37
|
*/
|
|
31
|
-
export declare function supplyApyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
32
|
-
header?: React.ReactNode;
|
|
33
|
-
headerTip?: React.ReactNode;
|
|
38
|
+
export declare function supplyApyColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
34
39
|
width?: string;
|
|
35
40
|
sortField?: string;
|
|
36
41
|
}): PoolTableColumnDef<P>;
|
|
@@ -39,8 +44,7 @@ export declare function supplyApyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
39
44
|
*
|
|
40
45
|
* Used in both charts and client-v3.
|
|
41
46
|
*/
|
|
42
|
-
export declare function borrowedColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
43
|
-
header?: React.ReactNode;
|
|
47
|
+
export declare function borrowedColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
44
48
|
width?: string;
|
|
45
49
|
}): PoolTableColumnDef<P>;
|
|
46
50
|
/**
|
|
@@ -48,9 +52,7 @@ export declare function borrowedColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
48
52
|
*
|
|
49
53
|
* Prefer `pool.borrowAPY` when the backend (or adapter) fills it; otherwise pass `getBorrowRate`.
|
|
50
54
|
*/
|
|
51
|
-
export declare function borrowApyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
52
|
-
header?: React.ReactNode;
|
|
53
|
-
headerTip?: React.ReactNode;
|
|
55
|
+
export declare function borrowApyColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
54
56
|
width?: string;
|
|
55
57
|
/** Custom getter for borrow rate (basis points). Used when `pool.borrowAPY` is undefined. */
|
|
56
58
|
getBorrowRate?: (pool: P) => number;
|
|
@@ -58,8 +60,7 @@ export declare function borrowApyColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
58
60
|
/**
|
|
59
61
|
* Utilization column — `pool.utilization` (0–100) with a progress bar.
|
|
60
62
|
*/
|
|
61
|
-
export declare function utilizationColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
62
|
-
header?: React.ReactNode;
|
|
63
|
+
export declare function utilizationColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
63
64
|
width?: string;
|
|
64
65
|
sortField?: string;
|
|
65
66
|
}): PoolTableColumnDef<P>;
|
|
@@ -69,8 +70,7 @@ export declare function utilizationColumn<P extends PoolDTO = PoolDTO>(options?:
|
|
|
69
70
|
* Default: reads `pool.collateralTokens` and renders {@link AssetsListCell}.
|
|
70
71
|
* Override with `cell` / `mobileCell` for custom asset shapes (e.g. client-v3 quota objects).
|
|
71
72
|
*/
|
|
72
|
-
export declare function collateralColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
73
|
-
header?: React.ReactNode;
|
|
73
|
+
export declare function collateralColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
74
74
|
width?: string;
|
|
75
75
|
gapBefore?: "sm" | "md" | "none";
|
|
76
76
|
cell?: (ctx: PoolTableCellContext<P>) => React.ReactNode;
|
|
@@ -84,8 +84,7 @@ export declare function collateralColumn<P extends PoolDTO = PoolDTO>(options?:
|
|
|
84
84
|
*
|
|
85
85
|
* Default: `pool.userBalanceInUSD`, `pool.userBalance`, `pool.poolTokenSymbol` (and underlying decimals for formatting).
|
|
86
86
|
*/
|
|
87
|
-
export declare function balanceColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
88
|
-
header?: React.ReactNode;
|
|
87
|
+
export declare function balanceColumn<P extends PoolDTO = PoolDTO>(options?: ColumnHeaderOptions & {
|
|
89
88
|
width?: string;
|
|
90
89
|
className?: string;
|
|
91
90
|
headerClassName?: string;
|
|
@@ -96,3 +95,4 @@ export declare function balanceColumn<P extends PoolDTO = PoolDTO>(options?: {
|
|
|
96
95
|
* Generic custom column — convenience helper to create a column with minimal boilerplate.
|
|
97
96
|
*/
|
|
98
97
|
export declare function customColumn<P extends PoolDTO = PoolDTO>(def: PoolTableColumnDef<P>): PoolTableColumnDef<P>;
|
|
98
|
+
export {};
|
|
@@ -82,8 +82,6 @@ export * from './page-title';
|
|
|
82
82
|
export * from './percent-indicator';
|
|
83
83
|
export * from './points-icon';
|
|
84
84
|
export * from './pool-apy-tooltip';
|
|
85
|
-
export * from './pool-assets-table';
|
|
86
|
-
export * from './pool-credit-managers-table';
|
|
87
85
|
export * from './pool-indicator-icon';
|
|
88
86
|
export * from './pool-points-indicator';
|
|
89
87
|
export * from './progress';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -81,8 +81,6 @@ export * from './components/page-title';
|
|
|
81
81
|
export * from './components/percent-indicator';
|
|
82
82
|
export * from './components/points-icon';
|
|
83
83
|
export * from './components/pool-apy-tooltip';
|
|
84
|
-
export * from './components/pool-assets-table';
|
|
85
|
-
export * from './components/pool-credit-managers-table';
|
|
86
84
|
export * from './components/pool-indicator-icon';
|
|
87
85
|
export * from './components/pool-points-indicator';
|
|
88
86
|
export * from './components/progress';
|
|
@@ -71,15 +71,29 @@ declare const _default: {
|
|
|
71
71
|
|
|
72
72
|
"components.openCopyButtons.copy": "Copy to clipboard",
|
|
73
73
|
|
|
74
|
-
"components.
|
|
75
|
-
"components.
|
|
76
|
-
"components.
|
|
77
|
-
"components.
|
|
78
|
-
"components.
|
|
79
|
-
"components.
|
|
80
|
-
"components.
|
|
81
|
-
|
|
82
|
-
"components.
|
|
74
|
+
"components.poolTable.pool": "Pool",
|
|
75
|
+
"components.poolTable.market": "Market",
|
|
76
|
+
"components.poolTable.description.universal": "Universal",
|
|
77
|
+
"components.poolTable.supply": "Supply",
|
|
78
|
+
"components.poolTable.borrowed": "Borrowed",
|
|
79
|
+
"components.poolTable.supplyApy": "Supply APY",
|
|
80
|
+
"components.poolTable.supplyApy.tip": "Annual percentage yield that you earn for supplying capital. This number constantly changes as the utilization of the Markets goes up and down",
|
|
81
|
+
"components.poolTable.depositApy": "Deposit APY",
|
|
82
|
+
"components.poolTable.depositApy.tip": "Deposit APY breakdown: base rate, extra rewards, and points",
|
|
83
|
+
"components.poolTable.borrowApy": "Borrow APY",
|
|
84
|
+
"components.poolTable.utilizationApy": "Utilization APY",
|
|
85
|
+
"components.poolTable.borrowApy.tip": "On top of the utilization borrow APY, there is a borrow quota APY for different assets",
|
|
86
|
+
"components.poolTable.utilization": "Utilization",
|
|
87
|
+
"components.poolTable.collateral": "Collateral",
|
|
88
|
+
"components.poolTable.collateral.showAll": "Show All",
|
|
89
|
+
"components.poolTable.balance": "Your Balance",
|
|
90
|
+
"components.poolTable.balance.tip": "You don't earn token rewards, only organic yield. Please migrate liquidity by using \"Migrate\" flow above.",
|
|
91
|
+
"components.poolTable.emptyList": "No Pools found",
|
|
92
|
+
"components.poolTable.notFound.dashboard": "You currently have no open Market positions.",
|
|
93
|
+
"components.poolTable.notFound.list": "No Markets found",
|
|
94
|
+
"components.poolTable.notFound.description.dashboard": "Choose earn above.",
|
|
95
|
+
"components.poolTable.notFound.description.list": "Choose another chain or toggle Show All Markets",
|
|
96
|
+
"components.poolTable.externalApy.tooltipShort": "{value} APY boost when depositing via {name}"
|
|
83
97
|
}
|
|
84
98
|
;
|
|
85
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/ui-kit",
|
|
3
|
-
"version": "3.6.0
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"repository": "https://github.com/gearbox-protocol/ui-kit",
|
|
6
6
|
"license": "MIT",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@commitlint/cli": "^20.1.0",
|
|
149
149
|
"@commitlint/config-conventional": "^20.0.0",
|
|
150
150
|
"@gearbox-protocol/biome-config": "^1.0.2",
|
|
151
|
-
"@gearbox-protocol/sdk": "13.
|
|
151
|
+
"@gearbox-protocol/sdk": "13.0.0",
|
|
152
152
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
153
153
|
"@storybook/addon-a11y": "^10.0.8",
|
|
154
154
|
"@storybook/addon-docs": "^10.0.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./pool-assets-table.cjs"),e=require("./pool-assets-table-head.cjs"),o=require("./pool-assets-table-row.cjs");exports.PoolAssetsTable=s.PoolAssetsTable;exports.PoolAssetsTableHead=e.PoolAssetsTableHead;exports.PoolAssetsTableRow=o.PoolAssetsTableRow;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const l=require("../../hooks/use-filter.cjs");require("@gearbox-protocol/sdk/common-utils");require("@gearbox-protocol/sdk");const n=require("../head-cell/head-cell.cjs"),s=require("../table/grid-table.cjs"),t=require("../typed-intl/index.cjs");function p({sort:i}){const o=t.useIntlTyped(),{state:r,set:a}=i,d=()=>a("usage","desc"),c=()=>a("rate","desc"),m=()=>a("name","desc");return e.jsxs(s.GridTableRow,{noHover:!0,height:"35px",children:[e.jsx(s.GridTableHead,{justify:"start",size:"sm",className:"pl-4",children:e.jsx(n.HeadCell,{arrowPosition:"right",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.asset"}),sortDirection:l.getSortForField("name",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.asset"}),onSort:m})}),e.jsx(s.GridTableHead,{justify:"end",size:"sm",children:e.jsx(n.HeadCell,{arrowPosition:"left",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.rate"}),sortDirection:l.getSortForField("rate",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.rate"}),onSort:c})}),e.jsx(s.GridTableHead,{justify:"end",size:"sm",className:"pr-4",children:e.jsx(n.HeadCell,{arrowPosition:"left",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.limits"}),sortDirection:l.getSortForField("usage",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.limits"}),onSort:d})})]})}exports.PoolAssetsTableHead=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk/common-utils");require("@gearbox-protocol/sdk");const m=require("../../hooks/use-media-query.cjs");require("clsx");require("tailwind-merge");require("sonner");const q=require("../../utils/format-money.cjs");require("luxon");require("../../utils/z-index.cjs");const S=require("../description/description.cjs"),u=require("../short-string/short-string.cjs"),s=require("../table/grid-table.cjs"),t=require("../table/table-sm.cjs"),_=require("../token-symbol/token-symbol.cjs"),d=require("../token-template/token-template.cjs"),l=require("../typed-intl/index.cjs");function y({poolName:p,token:o,currentQuota:x,underlyingToken:r,last:g}){const{limit:h,totalQuoted:T,rate:b}=x,n=m.useIsMobile(),j=m.useIsDesktop()?21:n?40:16,i=()=>e.jsxs("div",{className:"flex items-center flex-col-auto",children:[e.jsx(_.TokenSymbol,{token:o,size:32}),e.jsxs("span",{className:"ml-1.5 md:ml-2.5 text-left",children:[e.jsx(u.ShortString,{maxLength:j,children:o?.title}),e.jsx(S.Description,{children:e.jsx(u.ShortString,{maxLength:20,children:p})})]})]}),a=()=>q.percentageTemplate(b),c=()=>e.jsx("span",{children:e.jsx(l.FormattedMessageTyped,{messageId:"components.poolAssetsTable.usage",values:{amount:e.jsx(d.TokenTemplate,{value:T,token:r,decimalPartLength:2,precision:2,showSymbol:!1},"pool-assets-line-usage-amount"),total:e.jsx(d.TokenTemplate,{value:h,token:r,decimalPartLength:2,precision:2,showSymbol:!1},"pool-assets-line-usage-total")}})});return e.jsx(s.GridTableRow,{last:g,height:"auto",className:"cursor-default",onRowClick:()=>{},style:{minHeight:"75px"},children:n?e.jsx(s.GridTableCell,{span:"full",size:"sm",className:"px-3 py-0!",children:e.jsxs(t.TableLineSm,{columns:2,columnsXs:2,title:i(),className:"w-full",children:[e.jsx(t.TableCellSm,{title:e.jsx(l.FormattedMessageTyped,{messageId:"components.poolAssetsTable.rate"}),children:a()}),e.jsx(t.TableCellSm,{title:e.jsx(l.FormattedMessageTyped,{messageId:"components.poolAssetsTable.limits"}),children:c()})]})}):e.jsxs(e.Fragment,{children:[e.jsx(s.GridTableCell,{textAlign:"left",className:"pl-4",size:"sm",children:i()}),e.jsx(s.GridTableCell,{textAlign:"right",size:"sm",children:a()}),e.jsx(s.GridTableCell,{textAlign:"right",className:"pr-4",size:"sm",children:c()})]})})}exports.PoolAssetsTableRow=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk/common-utils");require("@gearbox-protocol/sdk");const b=require("../../hooks/use-media-query.cjs"),o=require("../table/grid-table.cjs"),d=require("./pool-assets-table-head.cjs"),p=require("./pool-assets-table-row.cjs");function T({list:r,poolName:t,sort:a,tokensList:n,underlyingToken:i}){const l=b.useIsMobile(),u=l?"1fr":"1fr 180px 1fr";return e.jsxs(o.GridTable,{cols:u,gap:0,size:"lg",wrapperClassName:"overflow-visible",children:[!l&&e.jsx(o.GridTableHeader,{children:e.jsx(d.PoolAssetsTableHead,{sort:a})}),e.jsx(o.GridTableBody,{children:r.map((s,c)=>e.jsx(p.PoolAssetsTableRow,{poolName:t,currentQuota:s,token:n[s.token],underlyingToken:i,last:c===r.length-1},s.token))})]})}exports.PoolAssetsTable=T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./pool-credit-managers-table.cjs"),a=require("./pool-credit-managers-table.test-ids.cjs"),o=require("./pool-credit-managers-table-head.cjs"),r=require("./pool-credit-managers-table-row.cjs");exports.PoolCreditManagersTable=e.PoolCreditManagersTable;exports.poolCreditManagersTableTestIds=a.poolCreditManagersTableTestIds;exports.PoolCreditManagersTableHead=o.PoolCreditManagersTableHead;exports.PoolCreditManagersTableRow=r.PoolCreditManagersTableRow;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const n=require("../../hooks/use-filter.cjs");require("@gearbox-protocol/sdk/common-utils");require("@gearbox-protocol/sdk");const l=require("../head-cell/head-cell.cjs"),s=require("../table/grid-table.cjs"),t=require("../typed-intl/index.cjs");function d({sort:i}){const o=t.useIntlTyped(),{state:r,set:a}=i;return e.jsxs(s.GridTableRow,{noHover:!0,height:"35px",children:[e.jsx(s.GridTableHead,{justify:"start",size:"sm",className:"pl-4",children:e.jsx(l.HeadCell,{arrowPosition:"right",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.head.name"}),sortDirection:n.getSortForField("name",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.head.name"}),onSort:()=>a("name")})}),e.jsx(s.GridTableHead,{justify:"end",size:"sm",children:e.jsx(l.HeadCell,{arrowPosition:"left",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.head.currentDebt"}),sortDirection:n.getSortForField("currentDebt",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.head.currentDebt"}),onSort:()=>a("currentDebt","desc")})}),e.jsx(s.GridTableHead,{justify:"end",size:"sm",className:"pr-4",children:e.jsx(l.HeadCell,{arrowPosition:"left",title:e.jsx(t.FormattedMessageTyped,{messageId:"components.poolAssetsTable.head.assets"}),sortDirection:n.getSortForField("assets",r),sortField:o.formatMessage({messageId:"components.poolAssetsTable.head.assets"}),onSort:()=>a("assets","desc")})})]})}exports.PoolCreditManagersTableHead=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@gearbox-protocol/sdk");require("react");require("clsx");require("tailwind-merge");require("sonner");const c=require("../../utils/format-money.cjs");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");const s=require("../table/grid-table.cjs"),d=require("../text-button/text-button.cjs"),u=require("../token-template/token-template.cjs"),x=require("../typed-intl/index.cjs"),r=require("../vertical-indicator/vertical-indicator.cjs"),m=require("./pool-credit-managers-table.test-ids.cjs");function p({creditManager:t,last:l,onClick:o,totalDebtMoney:i,underlyingToken:a}){return e.jsxs(s.GridTableRow,{last:l,height:"75px",onRowClick:o,"data-testid":m.poolCreditManagersTableTestIds.creditManagerLine,children:[e.jsx(s.GridTableCell,{textAlign:"left",className:"pl-4",size:"sm",children:e.jsx(r.VerticalIndicator,{label:t.name,description:n.shortAddress(t.address)})}),e.jsx(s.GridTableCell,{textAlign:"right",size:"sm",children:e.jsx("div",{className:"flex justify-end flex-col-auto",children:e.jsx("div",{className:"flex-col-auto",children:e.jsx(r.VerticalIndicator,{value:e.jsx(u.TokenTemplate,{value:t.totalDebt,token:a}),valueDescription:c.formatMoney(i)})})})}),e.jsx(s.GridTableCell,{textAlign:"right",className:"pr-4",size:"sm",children:e.jsx("div",{className:"flex justify-end flex-col-auto",children:e.jsx("div",{className:"flex-col-auto",children:e.jsx(r.VerticalIndicator,{label:e.jsx(d.TextButton,{as:"span",children:e.jsx(x.FormattedMessageTyped,{messageId:"components.poolCreditManagersTable.assets",values:{amount:t.collateralTokens.length}})}),description:" "})})})})]})}exports.PoolCreditManagersTableRow=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk/common-utils");require("@gearbox-protocol/sdk");const b=require("../../hooks/use-media-query.cjs"),o=require("../table/grid-table.cjs"),u=require("./pool-credit-managers-table-head.cjs"),c=require("./pool-credit-managers-table-row.cjs");function g({handleSelectCM:s,rows:l,sort:a,underlyingToken:i}){const n=b.useIsMobile()?"1fr 120px 0.75fr":"2fr 1fr 1fr";return e.jsxs(o.GridTable,{cols:n,gap:0,size:"lg",wrapperClassName:"overflow-visible",children:[e.jsx(o.GridTableHeader,{children:e.jsx(u.PoolCreditManagersTableHead,{sort:a})}),e.jsx(o.GridTableBody,{children:l.map(({creditManager:r,totalDebtMoney:t},d)=>e.jsx(c.PoolCreditManagersTableRow,{creditManager:r,last:d===l.length-1,onClick:s(r),totalDebtMoney:t,underlyingToken:i},r.address))})]})}exports.PoolCreditManagersTable=g;
|
package/dist/cjs/components/pool-credit-managers-table/pool-credit-managers-table.test-ids.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={creditManagerLine:"pool-credit-managers-line"};exports.poolCreditManagersTableTestIds=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PoolAssetsTable as s } from "./pool-assets-table.js";
|
|
2
|
-
import { PoolAssetsTableHead as r } from "./pool-assets-table-head.js";
|
|
3
|
-
import { PoolAssetsTableRow as a } from "./pool-assets-table-row.js";
|
|
4
|
-
export {
|
|
5
|
-
s as PoolAssetsTable,
|
|
6
|
-
r as PoolAssetsTableHead,
|
|
7
|
-
a as PoolAssetsTableRow
|
|
8
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { getSortForField as r } from "../../hooks/use-filter.js";
|
|
4
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
5
|
-
import "@gearbox-protocol/sdk";
|
|
6
|
-
import { HeadCell as a } from "../head-cell/head-cell.js";
|
|
7
|
-
import { GridTableRow as g, GridTableHead as i } from "../table/grid-table.js";
|
|
8
|
-
import { useIntlTyped as f, FormattedMessageTyped as n } from "../typed-intl/index.js";
|
|
9
|
-
function j({
|
|
10
|
-
sort: l
|
|
11
|
-
}) {
|
|
12
|
-
const s = f(), { state: t, set: o } = l, m = () => o("usage", "desc"), d = () => o("rate", "desc"), p = () => o("name", "desc");
|
|
13
|
-
return /* @__PURE__ */ c(g, { noHover: !0, height: "35px", children: [
|
|
14
|
-
/* @__PURE__ */ e(i, { justify: "start", size: "sm", className: "pl-4", children: /* @__PURE__ */ e(
|
|
15
|
-
a,
|
|
16
|
-
{
|
|
17
|
-
arrowPosition: "right",
|
|
18
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.asset" }),
|
|
19
|
-
sortDirection: r("name", t),
|
|
20
|
-
sortField: s.formatMessage({
|
|
21
|
-
messageId: "components.poolAssetsTable.asset"
|
|
22
|
-
}),
|
|
23
|
-
onSort: p
|
|
24
|
-
}
|
|
25
|
-
) }),
|
|
26
|
-
/* @__PURE__ */ e(i, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
27
|
-
a,
|
|
28
|
-
{
|
|
29
|
-
arrowPosition: "left",
|
|
30
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.rate" }),
|
|
31
|
-
sortDirection: r("rate", t),
|
|
32
|
-
sortField: s.formatMessage({
|
|
33
|
-
messageId: "components.poolAssetsTable.rate"
|
|
34
|
-
}),
|
|
35
|
-
onSort: d
|
|
36
|
-
}
|
|
37
|
-
) }),
|
|
38
|
-
/* @__PURE__ */ e(i, { justify: "end", size: "sm", className: "pr-4", children: /* @__PURE__ */ e(
|
|
39
|
-
a,
|
|
40
|
-
{
|
|
41
|
-
arrowPosition: "left",
|
|
42
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.limits" }),
|
|
43
|
-
sortDirection: r("usage", t),
|
|
44
|
-
sortField: s.formatMessage({
|
|
45
|
-
messageId: "components.poolAssetsTable.limits"
|
|
46
|
-
}),
|
|
47
|
-
onSort: m
|
|
48
|
-
}
|
|
49
|
-
) })
|
|
50
|
-
] });
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
j as PoolAssetsTableHead
|
|
54
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
-
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { useIsMobile as N, useIsDesktop as S } from "../../hooks/use-media-query.js";
|
|
6
|
-
import "clsx";
|
|
7
|
-
import "tailwind-merge";
|
|
8
|
-
import "sonner";
|
|
9
|
-
import { percentageTemplate as A } from "../../utils/format-money.js";
|
|
10
|
-
import "luxon";
|
|
11
|
-
import "../../utils/z-index.js";
|
|
12
|
-
import { Description as w } from "../description/description.js";
|
|
13
|
-
import { ShortString as c } from "../short-string/short-string.js";
|
|
14
|
-
import { GridTableRow as k, GridTableCell as s } from "../table/grid-table.js";
|
|
15
|
-
import { TableLineSm as y, TableCellSm as p } from "../table/table-sm.js";
|
|
16
|
-
import { TokenSymbol as z } from "../token-symbol/token-symbol.js";
|
|
17
|
-
import { TokenTemplate as d } from "../token-template/token-template.js";
|
|
18
|
-
import { FormattedMessageTyped as o } from "../typed-intl/index.js";
|
|
19
|
-
function O({
|
|
20
|
-
poolName: h,
|
|
21
|
-
token: l,
|
|
22
|
-
currentQuota: g,
|
|
23
|
-
underlyingToken: r,
|
|
24
|
-
last: u
|
|
25
|
-
}) {
|
|
26
|
-
const { limit: f, totalQuoted: x, rate: T } = g, i = N(), b = S() ? 21 : i ? 40 : 16, m = () => /* @__PURE__ */ t("div", { className: "flex items-center flex-col-auto", children: [
|
|
27
|
-
/* @__PURE__ */ e(z, { token: l, size: 32 }),
|
|
28
|
-
/* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
|
|
29
|
-
/* @__PURE__ */ e(c, { maxLength: b, children: l?.title }),
|
|
30
|
-
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(c, { maxLength: 20, children: h }) })
|
|
31
|
-
] })
|
|
32
|
-
] }), a = () => A(T), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
33
|
-
o,
|
|
34
|
-
{
|
|
35
|
-
messageId: "components.poolAssetsTable.usage",
|
|
36
|
-
values: {
|
|
37
|
-
amount: /* @__PURE__ */ e(
|
|
38
|
-
d,
|
|
39
|
-
{
|
|
40
|
-
value: x,
|
|
41
|
-
token: r,
|
|
42
|
-
decimalPartLength: 2,
|
|
43
|
-
precision: 2,
|
|
44
|
-
showSymbol: !1
|
|
45
|
-
},
|
|
46
|
-
"pool-assets-line-usage-amount"
|
|
47
|
-
),
|
|
48
|
-
total: /* @__PURE__ */ e(
|
|
49
|
-
d,
|
|
50
|
-
{
|
|
51
|
-
value: f,
|
|
52
|
-
token: r,
|
|
53
|
-
decimalPartLength: 2,
|
|
54
|
-
precision: 2,
|
|
55
|
-
showSymbol: !1
|
|
56
|
-
},
|
|
57
|
-
"pool-assets-line-usage-total"
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
) });
|
|
62
|
-
return /* @__PURE__ */ e(
|
|
63
|
-
k,
|
|
64
|
-
{
|
|
65
|
-
last: u,
|
|
66
|
-
height: "auto",
|
|
67
|
-
className: "cursor-default",
|
|
68
|
-
onRowClick: () => {
|
|
69
|
-
},
|
|
70
|
-
style: {
|
|
71
|
-
minHeight: "75px"
|
|
72
|
-
},
|
|
73
|
-
children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
|
|
74
|
-
y,
|
|
75
|
-
{
|
|
76
|
-
columns: 2,
|
|
77
|
-
columnsXs: 2,
|
|
78
|
-
title: m(),
|
|
79
|
-
className: "w-full",
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
-
p,
|
|
83
|
-
{
|
|
84
|
-
title: /* @__PURE__ */ e(o, { messageId: "components.poolAssetsTable.rate" }),
|
|
85
|
-
children: a()
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
p,
|
|
90
|
-
{
|
|
91
|
-
title: /* @__PURE__ */ e(o, { messageId: "components.poolAssetsTable.limits" }),
|
|
92
|
-
children: n()
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
) }) : /* @__PURE__ */ t(L, { children: [
|
|
98
|
-
/* @__PURE__ */ e(s, { textAlign: "left", className: "pl-4", size: "sm", children: m() }),
|
|
99
|
-
/* @__PURE__ */ e(s, { textAlign: "right", size: "sm", children: a() }),
|
|
100
|
-
/* @__PURE__ */ e(s, { textAlign: "right", className: "pr-4", size: "sm", children: n() })
|
|
101
|
-
] })
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
O as PoolAssetsTableRow
|
|
107
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
-
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { useIsMobile as n } from "../../hooks/use-media-query.js";
|
|
6
|
-
import { GridTable as d, GridTableHeader as f, GridTableBody as b } from "../table/grid-table.js";
|
|
7
|
-
import { PoolAssetsTableHead as c } from "./pool-assets-table-head.js";
|
|
8
|
-
import { PoolAssetsTableRow as T } from "./pool-assets-table-row.js";
|
|
9
|
-
function P({
|
|
10
|
-
list: e,
|
|
11
|
-
poolName: l,
|
|
12
|
-
sort: t,
|
|
13
|
-
tokensList: i,
|
|
14
|
-
underlyingToken: a
|
|
15
|
-
}) {
|
|
16
|
-
const s = n();
|
|
17
|
-
return /* @__PURE__ */ p(
|
|
18
|
-
d,
|
|
19
|
-
{
|
|
20
|
-
cols: s ? "1fr" : "1fr 180px 1fr",
|
|
21
|
-
gap: 0,
|
|
22
|
-
size: "lg",
|
|
23
|
-
wrapperClassName: "overflow-visible",
|
|
24
|
-
children: [
|
|
25
|
-
!s && /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(c, { sort: t }) }),
|
|
26
|
-
/* @__PURE__ */ o(b, { children: e.map((r, m) => /* @__PURE__ */ o(
|
|
27
|
-
T,
|
|
28
|
-
{
|
|
29
|
-
poolName: l,
|
|
30
|
-
currentQuota: r,
|
|
31
|
-
token: i[r.token],
|
|
32
|
-
underlyingToken: a,
|
|
33
|
-
last: m === e.length - 1
|
|
34
|
-
},
|
|
35
|
-
r.token
|
|
36
|
-
)) })
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
P as PoolAssetsTable
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PoolCreditManagersTable as r } from "./pool-credit-managers-table.js";
|
|
2
|
-
import { poolCreditManagersTableTestIds as t } from "./pool-credit-managers-table.test-ids.js";
|
|
3
|
-
import { PoolCreditManagersTableHead as d } from "./pool-credit-managers-table-head.js";
|
|
4
|
-
import { PoolCreditManagersTableRow as p } from "./pool-credit-managers-table-row.js";
|
|
5
|
-
export {
|
|
6
|
-
r as PoolCreditManagersTable,
|
|
7
|
-
d as PoolCreditManagersTableHead,
|
|
8
|
-
p as PoolCreditManagersTableRow,
|
|
9
|
-
t as poolCreditManagersTableTestIds
|
|
10
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { getSortForField as r } from "../../hooks/use-filter.js";
|
|
4
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
5
|
-
import "@gearbox-protocol/sdk";
|
|
6
|
-
import { HeadCell as a } from "../head-cell/head-cell.js";
|
|
7
|
-
import { GridTableRow as d, GridTableHead as i } from "../table/grid-table.js";
|
|
8
|
-
import { useIntlTyped as p, FormattedMessageTyped as n } from "../typed-intl/index.js";
|
|
9
|
-
function I({
|
|
10
|
-
sort: m
|
|
11
|
-
}) {
|
|
12
|
-
const s = p(), { state: t, set: o } = m;
|
|
13
|
-
return /* @__PURE__ */ l(d, { noHover: !0, height: "35px", children: [
|
|
14
|
-
/* @__PURE__ */ e(i, { justify: "start", size: "sm", className: "pl-4", children: /* @__PURE__ */ e(
|
|
15
|
-
a,
|
|
16
|
-
{
|
|
17
|
-
arrowPosition: "right",
|
|
18
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.name" }),
|
|
19
|
-
sortDirection: r("name", t),
|
|
20
|
-
sortField: s.formatMessage({
|
|
21
|
-
messageId: "components.poolAssetsTable.head.name"
|
|
22
|
-
}),
|
|
23
|
-
onSort: () => o("name")
|
|
24
|
-
}
|
|
25
|
-
) }),
|
|
26
|
-
/* @__PURE__ */ e(i, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
27
|
-
a,
|
|
28
|
-
{
|
|
29
|
-
arrowPosition: "left",
|
|
30
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.currentDebt" }),
|
|
31
|
-
sortDirection: r("currentDebt", t),
|
|
32
|
-
sortField: s.formatMessage({
|
|
33
|
-
messageId: "components.poolAssetsTable.head.currentDebt"
|
|
34
|
-
}),
|
|
35
|
-
onSort: () => o("currentDebt", "desc")
|
|
36
|
-
}
|
|
37
|
-
) }),
|
|
38
|
-
/* @__PURE__ */ e(i, { justify: "end", size: "sm", className: "pr-4", children: /* @__PURE__ */ e(
|
|
39
|
-
a,
|
|
40
|
-
{
|
|
41
|
-
arrowPosition: "left",
|
|
42
|
-
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.assets" }),
|
|
43
|
-
sortDirection: r("assets", t),
|
|
44
|
-
sortField: s.formatMessage({
|
|
45
|
-
messageId: "components.poolAssetsTable.head.assets"
|
|
46
|
-
}),
|
|
47
|
-
onSort: () => o("assets", "desc")
|
|
48
|
-
}
|
|
49
|
-
) })
|
|
50
|
-
] });
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
I as PoolCreditManagersTableHead
|
|
54
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { shortAddress as n } from "@gearbox-protocol/sdk";
|
|
3
|
-
import "react";
|
|
4
|
-
import "clsx";
|
|
5
|
-
import "tailwind-merge";
|
|
6
|
-
import "sonner";
|
|
7
|
-
import { formatMoney as d } from "../../utils/format-money.js";
|
|
8
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
9
|
-
import "luxon";
|
|
10
|
-
import "../../utils/z-index.js";
|
|
11
|
-
import { GridTableRow as p, GridTableCell as t } from "../table/grid-table.js";
|
|
12
|
-
import { TextButton as c } from "../text-button/text-button.js";
|
|
13
|
-
import { TokenTemplate as f } from "../token-template/token-template.js";
|
|
14
|
-
import { FormattedMessageTyped as h } from "../typed-intl/index.js";
|
|
15
|
-
import { VerticalIndicator as l } from "../vertical-indicator/vertical-indicator.js";
|
|
16
|
-
import { poolCreditManagersTableTestIds as u } from "./pool-credit-managers-table.test-ids.js";
|
|
17
|
-
function D({
|
|
18
|
-
creditManager: o,
|
|
19
|
-
last: i,
|
|
20
|
-
onClick: r,
|
|
21
|
-
totalDebtMoney: s,
|
|
22
|
-
underlyingToken: a
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ m(
|
|
25
|
-
p,
|
|
26
|
-
{
|
|
27
|
-
last: i,
|
|
28
|
-
height: "75px",
|
|
29
|
-
onRowClick: r,
|
|
30
|
-
"data-testid": u.creditManagerLine,
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ e(t, { textAlign: "left", className: "pl-4", size: "sm", children: /* @__PURE__ */ e(
|
|
33
|
-
l,
|
|
34
|
-
{
|
|
35
|
-
label: o.name,
|
|
36
|
-
description: n(o.address)
|
|
37
|
-
}
|
|
38
|
-
) }),
|
|
39
|
-
/* @__PURE__ */ e(t, { textAlign: "right", size: "sm", children: /* @__PURE__ */ e("div", { className: "flex justify-end flex-col-auto", children: /* @__PURE__ */ e("div", { className: "flex-col-auto", children: /* @__PURE__ */ e(
|
|
40
|
-
l,
|
|
41
|
-
{
|
|
42
|
-
value: /* @__PURE__ */ e(
|
|
43
|
-
f,
|
|
44
|
-
{
|
|
45
|
-
value: o.totalDebt,
|
|
46
|
-
token: a
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
valueDescription: d(s)
|
|
50
|
-
}
|
|
51
|
-
) }) }) }),
|
|
52
|
-
/* @__PURE__ */ e(t, { textAlign: "right", className: "pr-4", size: "sm", children: /* @__PURE__ */ e("div", { className: "flex justify-end flex-col-auto", children: /* @__PURE__ */ e("div", { className: "flex-col-auto", children: /* @__PURE__ */ e(
|
|
53
|
-
l,
|
|
54
|
-
{
|
|
55
|
-
label: /* @__PURE__ */ e(c, { as: "span", children: /* @__PURE__ */ e(
|
|
56
|
-
h,
|
|
57
|
-
{
|
|
58
|
-
messageId: "components.poolCreditManagersTable.assets",
|
|
59
|
-
values: { amount: o.collateralTokens.length }
|
|
60
|
-
}
|
|
61
|
-
) }),
|
|
62
|
-
description: " "
|
|
63
|
-
}
|
|
64
|
-
) }) }) })
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
D as PoolCreditManagersTableRow
|
|
71
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
-
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { useIsMobile as d } from "../../hooks/use-media-query.js";
|
|
6
|
-
import { GridTable as f, GridTableHeader as n, GridTableBody as b } from "../table/grid-table.js";
|
|
7
|
-
import { PoolCreditManagersTableHead as c } from "./pool-credit-managers-table-head.js";
|
|
8
|
-
import { PoolCreditManagersTableRow as C } from "./pool-credit-managers-table-row.js";
|
|
9
|
-
function w({
|
|
10
|
-
handleSelectCM: e,
|
|
11
|
-
rows: l,
|
|
12
|
-
sort: i,
|
|
13
|
-
underlyingToken: s
|
|
14
|
-
}) {
|
|
15
|
-
const a = d() ? "1fr 120px 0.75fr" : "2fr 1fr 1fr";
|
|
16
|
-
return /* @__PURE__ */ p(
|
|
17
|
-
f,
|
|
18
|
-
{
|
|
19
|
-
cols: a,
|
|
20
|
-
gap: 0,
|
|
21
|
-
size: "lg",
|
|
22
|
-
wrapperClassName: "overflow-visible",
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(c, { sort: i }) }),
|
|
25
|
-
/* @__PURE__ */ r(b, { children: l.map(({ creditManager: o, totalDebtMoney: m }, t) => /* @__PURE__ */ r(
|
|
26
|
-
C,
|
|
27
|
-
{
|
|
28
|
-
creditManager: o,
|
|
29
|
-
last: t === l.length - 1,
|
|
30
|
-
onClick: e(o),
|
|
31
|
-
totalDebtMoney: m,
|
|
32
|
-
underlyingToken: s
|
|
33
|
-
},
|
|
34
|
-
o.address
|
|
35
|
-
)) })
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
w as PoolCreditManagersTable
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|