@orderly.network/markets 2.11.1 → 2.11.2-alpha.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/index.js +233 -395
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -395
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1531,155 +1531,235 @@ var init_rwaDotTooltip = __esm({
|
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
});
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
return /* @__PURE__ */ jsxs(Flex, { children: [
|
|
1576
|
-
favoritesIcon,
|
|
1577
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gapY: 1, children: [
|
|
1578
|
-
/* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
1579
|
-
/* @__PURE__ */ jsx(TokenIcon, { symbol: record.symbol, className: "oui-size-[18px]" }),
|
|
1580
|
-
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: record.symbol }),
|
|
1581
|
-
/* @__PURE__ */ jsx(RwaDotTooltip, { record }),
|
|
1582
|
-
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1583
|
-
record.leverage,
|
|
1584
|
-
"x"
|
|
1585
|
-
] })
|
|
1586
|
-
] }),
|
|
1587
|
-
/* @__PURE__ */ jsx(
|
|
1588
|
-
Text.numeral,
|
|
1589
|
-
{
|
|
1590
|
-
intensity: 54,
|
|
1591
|
-
size: "2xs",
|
|
1592
|
-
rule: "human",
|
|
1593
|
-
dp: 2,
|
|
1594
|
-
rm: Decimal.ROUND_DOWN,
|
|
1595
|
-
children: value
|
|
1596
|
-
}
|
|
1597
|
-
)
|
|
1534
|
+
function getSymbolColumn(favorite, isFavoriteList = false, options) {
|
|
1535
|
+
return {
|
|
1536
|
+
title: i18n.t("common.symbol"),
|
|
1537
|
+
dataIndex: "symbol",
|
|
1538
|
+
width: 150,
|
|
1539
|
+
onSort: true,
|
|
1540
|
+
render: (value, record) => {
|
|
1541
|
+
let favoritesIcon;
|
|
1542
|
+
if (!isFavoriteList) {
|
|
1543
|
+
favoritesIcon = /* @__PURE__ */ jsx(FavoritesDropdownMenuWidget, { row: record, favorite, children: /* @__PURE__ */ jsx(
|
|
1544
|
+
Flex,
|
|
1545
|
+
{
|
|
1546
|
+
width: 12,
|
|
1547
|
+
height: 12,
|
|
1548
|
+
justify: "center",
|
|
1549
|
+
itemAlign: "center",
|
|
1550
|
+
className: "oui-mr-1 oui-cursor-pointer",
|
|
1551
|
+
children: record.isFavorite ? /* @__PURE__ */ jsx(FavoritesIcon2, { className: "oui-size-3" }) : /* @__PURE__ */ jsx(UnFavoritesIcon2, { className: "oui-size-3" })
|
|
1552
|
+
}
|
|
1553
|
+
) });
|
|
1554
|
+
}
|
|
1555
|
+
const stackLeverageInSecondRow = options?.stackLeverageInSecondRow;
|
|
1556
|
+
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1557
|
+
favoritesIcon,
|
|
1558
|
+
/* @__PURE__ */ jsxs(
|
|
1559
|
+
Flex,
|
|
1560
|
+
{
|
|
1561
|
+
direction: stackLeverageInSecondRow ? "column" : "row",
|
|
1562
|
+
itemAlign: stackLeverageInSecondRow ? "start" : "center",
|
|
1563
|
+
gapY: stackLeverageInSecondRow ? 1 : void 0,
|
|
1564
|
+
gapX: stackLeverageInSecondRow ? void 0 : 1,
|
|
1565
|
+
children: [
|
|
1566
|
+
/* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1567
|
+
/* @__PURE__ */ jsx(TokenIcon, { symbol: value, className: "oui-size-[18px]" }),
|
|
1568
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: value }),
|
|
1569
|
+
/* @__PURE__ */ jsx(RwaDotTooltip, { record })
|
|
1570
|
+
] }),
|
|
1571
|
+
typeof record.leverage === "number" && /* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1572
|
+
record.leverage,
|
|
1573
|
+
"x"
|
|
1598
1574
|
] })
|
|
1599
|
-
]
|
|
1575
|
+
]
|
|
1600
1576
|
}
|
|
1577
|
+
)
|
|
1578
|
+
] });
|
|
1579
|
+
}
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1582
|
+
function getLastColumn() {
|
|
1583
|
+
return {
|
|
1584
|
+
title: i18n.t("markets.column.last"),
|
|
1585
|
+
dataIndex: "24h_close",
|
|
1586
|
+
align: "right",
|
|
1587
|
+
onSort: true,
|
|
1588
|
+
width: 100,
|
|
1589
|
+
render: (value, record) => {
|
|
1590
|
+
return /* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: value });
|
|
1591
|
+
}
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
function get24hPercentageColumn() {
|
|
1595
|
+
return {
|
|
1596
|
+
title: i18n.t("markets.column.24hPercentage"),
|
|
1597
|
+
dataIndex: "change",
|
|
1598
|
+
align: "right",
|
|
1599
|
+
onSort: true,
|
|
1600
|
+
width: 80,
|
|
1601
|
+
render: (value) => {
|
|
1602
|
+
return /* @__PURE__ */ jsx(
|
|
1603
|
+
Text.numeral,
|
|
1604
|
+
{
|
|
1605
|
+
rule: "percentages",
|
|
1606
|
+
coloring: true,
|
|
1607
|
+
rm: Decimal.ROUND_DOWN,
|
|
1608
|
+
showIdentifier: true,
|
|
1609
|
+
size: "2xs",
|
|
1610
|
+
children: value
|
|
1611
|
+
}
|
|
1612
|
+
);
|
|
1613
|
+
}
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
function get24hVolOIColumn() {
|
|
1617
|
+
return {
|
|
1618
|
+
title: i18n.t("markets.column.24hVolOI"),
|
|
1619
|
+
dataIndex: "24h_amount",
|
|
1620
|
+
align: "right",
|
|
1621
|
+
className: "oui-h-[36px]",
|
|
1622
|
+
width: 100,
|
|
1623
|
+
multiSort: {
|
|
1624
|
+
fields: [
|
|
1625
|
+
{
|
|
1626
|
+
sortKey: "24h_amount",
|
|
1627
|
+
label: i18n.t("markets.column.24hVol")
|
|
1601
1628
|
},
|
|
1602
1629
|
{
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1630
|
+
sortKey: "openInterest",
|
|
1631
|
+
label: i18n.t("markets.column.OI")
|
|
1632
|
+
}
|
|
1633
|
+
]
|
|
1634
|
+
},
|
|
1635
|
+
render: (value, record) => /* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "end", gapY: 1, children: [
|
|
1636
|
+
/* @__PURE__ */ jsx(Text.numeral, { rule: "human", dp: 2, rm: Decimal.ROUND_DOWN, children: value }),
|
|
1637
|
+
/* @__PURE__ */ jsx(
|
|
1638
|
+
Text.numeral,
|
|
1639
|
+
{
|
|
1640
|
+
rule: "human",
|
|
1641
|
+
dp: 2,
|
|
1642
|
+
rm: Decimal.ROUND_DOWN,
|
|
1643
|
+
size: "2xs",
|
|
1644
|
+
intensity: 54,
|
|
1645
|
+
children: record.openInterest
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1648
|
+
] })
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
function getLastAnd24hPercentageColumn(favorite, isFavoriteList = false) {
|
|
1652
|
+
return {
|
|
1653
|
+
title: i18n.t("markets.column.last&24hPercentage"),
|
|
1654
|
+
dataIndex: "change",
|
|
1655
|
+
align: "right",
|
|
1656
|
+
onSort: true,
|
|
1657
|
+
className: "oui-h-[36px]",
|
|
1658
|
+
width: 100,
|
|
1659
|
+
render: (value, record) => {
|
|
1660
|
+
const onDelSymbol = (e) => {
|
|
1661
|
+
favorite.updateSymbolFavoriteState(
|
|
1662
|
+
record,
|
|
1663
|
+
favorite.selectedFavoriteTab,
|
|
1664
|
+
true
|
|
1665
|
+
);
|
|
1666
|
+
e.stopPropagation();
|
|
1667
|
+
};
|
|
1668
|
+
const iconCls = "oui-w-4 oui-h-4 oui-text-base-contrast-54 hover:oui-text-base-contrast";
|
|
1669
|
+
const actions = /* @__PURE__ */ jsx(
|
|
1670
|
+
"div",
|
|
1671
|
+
{
|
|
1672
|
+
className: cn(
|
|
1673
|
+
"oui-absolute oui-right-0 oui-top-[6.5px]",
|
|
1674
|
+
"oui-hidden group-hover:oui-block"
|
|
1675
|
+
),
|
|
1676
|
+
children: /* @__PURE__ */ jsxs(
|
|
1677
|
+
Flex,
|
|
1678
|
+
{
|
|
1679
|
+
className: cn(
|
|
1680
|
+
"oui-inline-flex",
|
|
1681
|
+
"oui-bg-primary-darken oui-py-[6px]"
|
|
1682
|
+
),
|
|
1683
|
+
r: "base",
|
|
1684
|
+
width: 52,
|
|
1685
|
+
justify: "center",
|
|
1686
|
+
itemAlign: "end",
|
|
1687
|
+
gapX: 2,
|
|
1688
|
+
children: [
|
|
1689
|
+
/* @__PURE__ */ jsx(
|
|
1690
|
+
TopIcon,
|
|
1627
1691
|
{
|
|
1628
|
-
className:
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
width: 52,
|
|
1634
|
-
justify: "center",
|
|
1635
|
-
itemAlign: "end",
|
|
1636
|
-
gapX: 2,
|
|
1637
|
-
children: [
|
|
1638
|
-
/* @__PURE__ */ jsx(
|
|
1639
|
-
TopIcon,
|
|
1640
|
-
{
|
|
1641
|
-
className: iconCls,
|
|
1642
|
-
onClick: (e) => {
|
|
1643
|
-
e.stopPropagation();
|
|
1644
|
-
favorite.pinToTop(record);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
),
|
|
1648
|
-
/* @__PURE__ */ jsx(DeleteIcon, { className: iconCls, onClick: onDelSymbol })
|
|
1649
|
-
]
|
|
1692
|
+
className: iconCls,
|
|
1693
|
+
onClick: (e) => {
|
|
1694
|
+
e.stopPropagation();
|
|
1695
|
+
favorite.pinToTop(record);
|
|
1696
|
+
}
|
|
1650
1697
|
}
|
|
1651
|
-
)
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1698
|
+
),
|
|
1699
|
+
/* @__PURE__ */ jsx(DeleteIcon, { className: iconCls, onClick: onDelSymbol })
|
|
1700
|
+
]
|
|
1701
|
+
}
|
|
1702
|
+
)
|
|
1703
|
+
}
|
|
1704
|
+
);
|
|
1705
|
+
return /* @__PURE__ */ jsxs("div", { className: "oui-relative", children: [
|
|
1706
|
+
isFavoriteList && actions,
|
|
1707
|
+
/* @__PURE__ */ jsxs(
|
|
1708
|
+
Flex,
|
|
1709
|
+
{
|
|
1710
|
+
direction: "column",
|
|
1711
|
+
justify: "end",
|
|
1712
|
+
itemAlign: "end",
|
|
1713
|
+
gapY: 1,
|
|
1714
|
+
className: cn(isFavoriteList && "group-hover:oui-invisible"),
|
|
1715
|
+
children: [
|
|
1716
|
+
/* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: record["24h_close"] }),
|
|
1717
|
+
/* @__PURE__ */ jsx(
|
|
1718
|
+
Text.numeral,
|
|
1658
1719
|
{
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
children:
|
|
1665
|
-
/* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: record["24h_close"] }),
|
|
1666
|
-
/* @__PURE__ */ jsx(
|
|
1667
|
-
Text.numeral,
|
|
1668
|
-
{
|
|
1669
|
-
rule: "percentages",
|
|
1670
|
-
coloring: true,
|
|
1671
|
-
rm: Decimal.ROUND_DOWN,
|
|
1672
|
-
showIdentifier: true,
|
|
1673
|
-
size: "2xs",
|
|
1674
|
-
children: value
|
|
1675
|
-
}
|
|
1676
|
-
)
|
|
1677
|
-
]
|
|
1720
|
+
rule: "percentages",
|
|
1721
|
+
coloring: true,
|
|
1722
|
+
rm: Decimal.ROUND_DOWN,
|
|
1723
|
+
showIdentifier: true,
|
|
1724
|
+
size: "2xs",
|
|
1725
|
+
children: value
|
|
1678
1726
|
}
|
|
1679
1727
|
)
|
|
1680
|
-
]
|
|
1728
|
+
]
|
|
1681
1729
|
}
|
|
1682
|
-
|
|
1730
|
+
)
|
|
1731
|
+
] });
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1735
|
+
var init_column = __esm({
|
|
1736
|
+
"src/components/shared/column.tsx"() {
|
|
1737
|
+
init_icons();
|
|
1738
|
+
init_icons();
|
|
1739
|
+
init_favoritesDropdownMenu();
|
|
1740
|
+
init_rwaDotTooltip();
|
|
1741
|
+
init_symbolDisplay();
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
|
|
1745
|
+
// src/components/sideMarkets/column.tsx
|
|
1746
|
+
var useSideMarketsColumns;
|
|
1747
|
+
var init_column2 = __esm({
|
|
1748
|
+
"src/components/sideMarkets/column.tsx"() {
|
|
1749
|
+
init_column();
|
|
1750
|
+
useSideMarketsColumns = (favorite, isFavoriteList = false) => {
|
|
1751
|
+
const symbolCol = getSymbolColumn(favorite, isFavoriteList, {
|
|
1752
|
+
stackLeverageInSecondRow: true
|
|
1753
|
+
});
|
|
1754
|
+
const volOiCol = get24hVolOIColumn();
|
|
1755
|
+
const lastPctCol = getLastAnd24hPercentageColumn(favorite, isFavoriteList);
|
|
1756
|
+
return [
|
|
1757
|
+
{
|
|
1758
|
+
...symbolCol,
|
|
1759
|
+
width: 115
|
|
1760
|
+
},
|
|
1761
|
+
volOiCol,
|
|
1762
|
+
lastPctCol
|
|
1683
1763
|
];
|
|
1684
1764
|
};
|
|
1685
1765
|
}
|
|
@@ -1689,7 +1769,7 @@ var init_marketsList_ui = __esm({
|
|
|
1689
1769
|
"src/components/marketsList/marketsList.ui.tsx"() {
|
|
1690
1770
|
init_collapseMarkets();
|
|
1691
1771
|
init_marketsProvider();
|
|
1692
|
-
|
|
1772
|
+
init_column2();
|
|
1693
1773
|
MarketsList = (props) => {
|
|
1694
1774
|
const {
|
|
1695
1775
|
loading,
|
|
@@ -1953,231 +2033,6 @@ var init_searchInput = __esm({
|
|
|
1953
2033
|
};
|
|
1954
2034
|
}
|
|
1955
2035
|
});
|
|
1956
|
-
function getSymbolColumn(favorite, isFavoriteList = false) {
|
|
1957
|
-
return {
|
|
1958
|
-
title: i18n.t("common.symbol"),
|
|
1959
|
-
dataIndex: "symbol",
|
|
1960
|
-
width: 150,
|
|
1961
|
-
onSort: true,
|
|
1962
|
-
render: (value, record) => {
|
|
1963
|
-
let favoritesIcon;
|
|
1964
|
-
if (!isFavoriteList) {
|
|
1965
|
-
favoritesIcon = /* @__PURE__ */ jsx(FavoritesDropdownMenuWidget, { row: record, favorite, children: /* @__PURE__ */ jsx(
|
|
1966
|
-
Flex,
|
|
1967
|
-
{
|
|
1968
|
-
width: 12,
|
|
1969
|
-
height: 12,
|
|
1970
|
-
justify: "center",
|
|
1971
|
-
itemAlign: "center",
|
|
1972
|
-
className: "oui-mr-1 oui-cursor-pointer",
|
|
1973
|
-
children: record.isFavorite ? /* @__PURE__ */ jsx(FavoritesIcon2, { className: "oui-size-3" }) : /* @__PURE__ */ jsx(UnFavoritesIcon2, { className: "oui-size-3" })
|
|
1974
|
-
}
|
|
1975
|
-
) });
|
|
1976
|
-
}
|
|
1977
|
-
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
1978
|
-
favoritesIcon,
|
|
1979
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gapY: 1, children: [
|
|
1980
|
-
/* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1981
|
-
/* @__PURE__ */ jsx(TokenIcon, { symbol: value, className: "oui-size-[18px]" }),
|
|
1982
|
-
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", size: "2xs", children: value }),
|
|
1983
|
-
/* @__PURE__ */ jsx(RwaDotTooltip, { record })
|
|
1984
|
-
] }),
|
|
1985
|
-
/* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1986
|
-
record.leverage,
|
|
1987
|
-
"x"
|
|
1988
|
-
] })
|
|
1989
|
-
] })
|
|
1990
|
-
] });
|
|
1991
|
-
}
|
|
1992
|
-
};
|
|
1993
|
-
}
|
|
1994
|
-
function getLastColumn() {
|
|
1995
|
-
return {
|
|
1996
|
-
title: i18n.t("markets.column.last"),
|
|
1997
|
-
dataIndex: "24h_close",
|
|
1998
|
-
align: "right",
|
|
1999
|
-
onSort: true,
|
|
2000
|
-
width: 100,
|
|
2001
|
-
render: (value, record) => {
|
|
2002
|
-
return /* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: value });
|
|
2003
|
-
}
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
function get24hPercentageColumn() {
|
|
2007
|
-
return {
|
|
2008
|
-
title: i18n.t("markets.column.24hPercentage"),
|
|
2009
|
-
dataIndex: "change",
|
|
2010
|
-
align: "right",
|
|
2011
|
-
onSort: true,
|
|
2012
|
-
width: 80,
|
|
2013
|
-
render: (value) => {
|
|
2014
|
-
return /* @__PURE__ */ jsx(
|
|
2015
|
-
Text.numeral,
|
|
2016
|
-
{
|
|
2017
|
-
rule: "percentages",
|
|
2018
|
-
coloring: true,
|
|
2019
|
-
rm: Decimal.ROUND_DOWN,
|
|
2020
|
-
showIdentifier: true,
|
|
2021
|
-
size: "2xs",
|
|
2022
|
-
children: value
|
|
2023
|
-
}
|
|
2024
|
-
);
|
|
2025
|
-
}
|
|
2026
|
-
};
|
|
2027
|
-
}
|
|
2028
|
-
function get24hVolOIColumn() {
|
|
2029
|
-
return {
|
|
2030
|
-
title: i18n.t("markets.column.24hVolOI"),
|
|
2031
|
-
dataIndex: "24h_amount",
|
|
2032
|
-
align: "right",
|
|
2033
|
-
className: "oui-h-[36px]",
|
|
2034
|
-
width: 100,
|
|
2035
|
-
multiSort: {
|
|
2036
|
-
fields: [
|
|
2037
|
-
{
|
|
2038
|
-
sortKey: "24h_amount",
|
|
2039
|
-
label: i18n.t("markets.column.24hVol")
|
|
2040
|
-
},
|
|
2041
|
-
{
|
|
2042
|
-
sortKey: "openInterest",
|
|
2043
|
-
label: i18n.t("markets.column.OI")
|
|
2044
|
-
}
|
|
2045
|
-
]
|
|
2046
|
-
},
|
|
2047
|
-
render: (value, record) => /* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "end", gapY: 1, children: [
|
|
2048
|
-
/* @__PURE__ */ jsx(Text.numeral, { rule: "human", dp: 2, rm: Decimal.ROUND_DOWN, children: value }),
|
|
2049
|
-
/* @__PURE__ */ jsx(
|
|
2050
|
-
Text.numeral,
|
|
2051
|
-
{
|
|
2052
|
-
rule: "human",
|
|
2053
|
-
dp: 2,
|
|
2054
|
-
rm: Decimal.ROUND_DOWN,
|
|
2055
|
-
size: "2xs",
|
|
2056
|
-
intensity: 54,
|
|
2057
|
-
children: record.openInterest
|
|
2058
|
-
}
|
|
2059
|
-
)
|
|
2060
|
-
] })
|
|
2061
|
-
};
|
|
2062
|
-
}
|
|
2063
|
-
function getLastAnd24hPercentageColumn(favorite, isFavoriteList = false) {
|
|
2064
|
-
return {
|
|
2065
|
-
title: i18n.t("markets.column.last&24hPercentage"),
|
|
2066
|
-
dataIndex: "change",
|
|
2067
|
-
align: "right",
|
|
2068
|
-
onSort: true,
|
|
2069
|
-
className: "oui-h-[36px]",
|
|
2070
|
-
width: 100,
|
|
2071
|
-
render: (value, record) => {
|
|
2072
|
-
const onDelSymbol = (e) => {
|
|
2073
|
-
favorite.updateSymbolFavoriteState(
|
|
2074
|
-
record,
|
|
2075
|
-
favorite.selectedFavoriteTab,
|
|
2076
|
-
true
|
|
2077
|
-
);
|
|
2078
|
-
e.stopPropagation();
|
|
2079
|
-
};
|
|
2080
|
-
const iconCls = "oui-w-4 oui-h-4 oui-text-base-contrast-54 hover:oui-text-base-contrast";
|
|
2081
|
-
const actions = /* @__PURE__ */ jsx(
|
|
2082
|
-
"div",
|
|
2083
|
-
{
|
|
2084
|
-
className: cn(
|
|
2085
|
-
"oui-absolute oui-right-0 oui-top-[6.5px]",
|
|
2086
|
-
"oui-hidden group-hover:oui-block"
|
|
2087
|
-
),
|
|
2088
|
-
children: /* @__PURE__ */ jsxs(
|
|
2089
|
-
Flex,
|
|
2090
|
-
{
|
|
2091
|
-
className: cn(
|
|
2092
|
-
"oui-inline-flex",
|
|
2093
|
-
"oui-bg-primary-darken oui-py-[6px]"
|
|
2094
|
-
),
|
|
2095
|
-
r: "base",
|
|
2096
|
-
width: 52,
|
|
2097
|
-
justify: "center",
|
|
2098
|
-
itemAlign: "end",
|
|
2099
|
-
gapX: 2,
|
|
2100
|
-
children: [
|
|
2101
|
-
/* @__PURE__ */ jsx(
|
|
2102
|
-
TopIcon,
|
|
2103
|
-
{
|
|
2104
|
-
className: iconCls,
|
|
2105
|
-
onClick: (e) => {
|
|
2106
|
-
e.stopPropagation();
|
|
2107
|
-
favorite.pinToTop(record);
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
),
|
|
2111
|
-
/* @__PURE__ */ jsx(DeleteIcon, { className: iconCls, onClick: onDelSymbol })
|
|
2112
|
-
]
|
|
2113
|
-
}
|
|
2114
|
-
)
|
|
2115
|
-
}
|
|
2116
|
-
);
|
|
2117
|
-
return /* @__PURE__ */ jsxs("div", { className: "oui-relative", children: [
|
|
2118
|
-
isFavoriteList && actions,
|
|
2119
|
-
/* @__PURE__ */ jsxs(
|
|
2120
|
-
Flex,
|
|
2121
|
-
{
|
|
2122
|
-
direction: "column",
|
|
2123
|
-
justify: "end",
|
|
2124
|
-
itemAlign: "end",
|
|
2125
|
-
gapY: 1,
|
|
2126
|
-
className: cn(isFavoriteList && "group-hover:oui-invisible"),
|
|
2127
|
-
children: [
|
|
2128
|
-
/* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: record["24h_close"] }),
|
|
2129
|
-
/* @__PURE__ */ jsx(
|
|
2130
|
-
Text.numeral,
|
|
2131
|
-
{
|
|
2132
|
-
rule: "percentages",
|
|
2133
|
-
coloring: true,
|
|
2134
|
-
rm: Decimal.ROUND_DOWN,
|
|
2135
|
-
showIdentifier: true,
|
|
2136
|
-
size: "2xs",
|
|
2137
|
-
children: value
|
|
2138
|
-
}
|
|
2139
|
-
)
|
|
2140
|
-
]
|
|
2141
|
-
}
|
|
2142
|
-
)
|
|
2143
|
-
] });
|
|
2144
|
-
}
|
|
2145
|
-
};
|
|
2146
|
-
}
|
|
2147
|
-
function getMarkIndexColumn() {
|
|
2148
|
-
return {
|
|
2149
|
-
title: i18n.t("markets.column.mark&Index"),
|
|
2150
|
-
dataIndex: "mark_price",
|
|
2151
|
-
align: "right",
|
|
2152
|
-
className: "oui-h-[36px]",
|
|
2153
|
-
width: 100,
|
|
2154
|
-
multiSort: {
|
|
2155
|
-
fields: [
|
|
2156
|
-
{
|
|
2157
|
-
sortKey: "mark_price",
|
|
2158
|
-
label: i18n.t("markets.column.mark")
|
|
2159
|
-
},
|
|
2160
|
-
{
|
|
2161
|
-
sortKey: "index_price",
|
|
2162
|
-
label: i18n.t("markets.column.index")
|
|
2163
|
-
}
|
|
2164
|
-
]
|
|
2165
|
-
},
|
|
2166
|
-
render: (value, record) => /* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "end", gapY: 1, children: [
|
|
2167
|
-
/* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", children: value }),
|
|
2168
|
-
/* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, size: "2xs", intensity: 54, children: record.index_price })
|
|
2169
|
-
] })
|
|
2170
|
-
};
|
|
2171
|
-
}
|
|
2172
|
-
var init_column2 = __esm({
|
|
2173
|
-
"src/components/shared/column.tsx"() {
|
|
2174
|
-
init_icons();
|
|
2175
|
-
init_icons();
|
|
2176
|
-
init_favoritesDropdownMenu();
|
|
2177
|
-
init_rwaDotTooltip();
|
|
2178
|
-
init_symbolDisplay();
|
|
2179
|
-
}
|
|
2180
|
-
});
|
|
2181
2036
|
var FavoritesEmpty;
|
|
2182
2037
|
var init_favoritesEmpty = __esm({
|
|
2183
2038
|
"src/components/favoritesEmpty/index.tsx"() {
|
|
@@ -2635,7 +2490,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2635
2490
|
init_marketsList();
|
|
2636
2491
|
init_rwaTab();
|
|
2637
2492
|
init_searchInput();
|
|
2638
|
-
|
|
2493
|
+
init_column();
|
|
2639
2494
|
init_useFavoritesExtraProps();
|
|
2640
2495
|
init_icons();
|
|
2641
2496
|
init_type();
|
|
@@ -2645,10 +2500,11 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2645
2500
|
const getColumns = useCallback(
|
|
2646
2501
|
(favorite, isFavoriteList = false) => {
|
|
2647
2502
|
return [
|
|
2648
|
-
getSymbolColumn(favorite, isFavoriteList
|
|
2503
|
+
getSymbolColumn(favorite, isFavoriteList, {
|
|
2504
|
+
stackLeverageInSecondRow: true
|
|
2505
|
+
}),
|
|
2649
2506
|
get24hVolOIColumn(),
|
|
2650
|
-
getLastAnd24hPercentageColumn(favorite, isFavoriteList)
|
|
2651
|
-
getMarkIndexColumn()
|
|
2507
|
+
getLastAnd24hPercentageColumn(favorite, isFavoriteList)
|
|
2652
2508
|
];
|
|
2653
2509
|
},
|
|
2654
2510
|
[]
|
|
@@ -2837,26 +2693,6 @@ var init_column3 = __esm({
|
|
|
2837
2693
|
return /* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, currency: "$", children: value });
|
|
2838
2694
|
}
|
|
2839
2695
|
},
|
|
2840
|
-
{
|
|
2841
|
-
title: t("markets.column.mark"),
|
|
2842
|
-
dataIndex: "mark_price",
|
|
2843
|
-
width: 100,
|
|
2844
|
-
align: "right",
|
|
2845
|
-
onSort: true,
|
|
2846
|
-
render: (value, record) => {
|
|
2847
|
-
return /* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, currency: "$", children: value });
|
|
2848
|
-
}
|
|
2849
|
-
},
|
|
2850
|
-
{
|
|
2851
|
-
title: t("markets.column.index"),
|
|
2852
|
-
dataIndex: "index_price",
|
|
2853
|
-
width: 100,
|
|
2854
|
-
align: "right",
|
|
2855
|
-
onSort: true,
|
|
2856
|
-
render: (value, record) => {
|
|
2857
|
-
return /* @__PURE__ */ jsx(Text.numeral, { dp: record.quote_dp || 2, currency: "$", children: value });
|
|
2858
|
-
}
|
|
2859
|
-
},
|
|
2860
2696
|
{
|
|
2861
2697
|
title: t("markets.column.24hChange"),
|
|
2862
2698
|
dataIndex: "change",
|
|
@@ -4371,7 +4207,7 @@ var useDropDownMarketsColumns;
|
|
|
4371
4207
|
var init_column4 = __esm({
|
|
4372
4208
|
"src/components/dropDownMarkets/column.tsx"() {
|
|
4373
4209
|
init_icons();
|
|
4374
|
-
|
|
4210
|
+
init_column();
|
|
4375
4211
|
useDropDownMarketsColumns = () => {
|
|
4376
4212
|
const { t } = useTranslation();
|
|
4377
4213
|
return useCallback(
|
|
@@ -5648,10 +5484,12 @@ init_searchInput();
|
|
|
5648
5484
|
init_useFavoritesExtraProps();
|
|
5649
5485
|
|
|
5650
5486
|
// src/components/marketsSheet/column.tsx
|
|
5651
|
-
|
|
5487
|
+
init_column();
|
|
5652
5488
|
var getMarketsSheetColumns = (favorite, isFavoriteList = false) => {
|
|
5653
5489
|
return [
|
|
5654
|
-
getSymbolColumn(favorite, isFavoriteList
|
|
5490
|
+
getSymbolColumn(favorite, isFavoriteList, {
|
|
5491
|
+
stackLeverageInSecondRow: true
|
|
5492
|
+
}),
|
|
5655
5493
|
get24hVolOIColumn(),
|
|
5656
5494
|
getLastAnd24hPercentageColumn(favorite, isFavoriteList)
|
|
5657
5495
|
];
|
|
@@ -6790,7 +6628,7 @@ init_marketItem_ui();
|
|
|
6790
6628
|
// src/deprecated/newListingList/newListingList.ui.tsx
|
|
6791
6629
|
init_collapseMarkets();
|
|
6792
6630
|
init_marketsProvider();
|
|
6793
|
-
|
|
6631
|
+
init_column2();
|
|
6794
6632
|
var NewListingList = (props) => {
|
|
6795
6633
|
const { dataSource, favorite, onSort, loading, getColumns, collapsed } = props;
|
|
6796
6634
|
const { symbol, onSymbolChange } = useMarketsContext();
|
|
@@ -6859,7 +6697,7 @@ var NewListingListWidget = (props) => {
|
|
|
6859
6697
|
init_collapseMarkets();
|
|
6860
6698
|
init_favoritesTabs();
|
|
6861
6699
|
init_marketsProvider();
|
|
6862
|
-
|
|
6700
|
+
init_column2();
|
|
6863
6701
|
var FavoritesList = (props) => {
|
|
6864
6702
|
const { dataSource, favorite, onSort, loading, getColumns, collapsed } = props;
|
|
6865
6703
|
const { symbol, onSymbolChange } = useMarketsContext();
|
|
@@ -6940,7 +6778,7 @@ var FavoritesListWidget = (props) => {
|
|
|
6940
6778
|
// src/deprecated/recentList/recentList.ui.tsx
|
|
6941
6779
|
init_collapseMarkets();
|
|
6942
6780
|
init_marketsProvider();
|
|
6943
|
-
|
|
6781
|
+
init_column2();
|
|
6944
6782
|
var RecentList = (props) => {
|
|
6945
6783
|
const { dataSource, favorite, onSort, loading, getColumns, collapsed } = props;
|
|
6946
6784
|
const { symbol, onSymbolChange } = useMarketsContext();
|