@orderly.network/markets 3.1.0 → 3.1.1-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.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +639 -260
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +486 -107
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React7, { createContext, memo, useState, useRef, useCallback, useEffect, useMemo, createElement, useContext, isValidElement } from 'react';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { useSymbolsInfo, useBadgeBySymbol, useMarkets, MarketsType, isCurrentlyTrading, useFundingRate, useFundingDetails, useFundingRateBySymbol, usePositionStream, useFundingRateHistory, useFundingRates, useQuery, useMarketsStream, useLocalStorage, useGetRwaSymbolInfo, useTickerStream, useMarketsStore, useSessionStorage, useMarketCategoriesConfig, useMarketList, useRwaSymbolsInfo, useConfig, useAllBrokers } from '@orderly.network/hooks';
|
|
3
|
+
import { useSymbolsInfo, useBadgeBySymbol, useMarkets, MarketsType, useGetRwaSymbolOpenStatus, isCurrentlyTrading, useFundingRate, useFundingDetails, useFundingRateBySymbol, usePositionStream, useFundingRateHistory, useFundingRates, useQuery, useMarketsStream, useLocalStorage, useGetRwaSymbolInfo, useTickerStream, useMarketsStore, useSessionStorage, useMarketCategoriesConfig, useMarketList, useRwaSymbolsInfo, useRwaSymbolsInfoStore, useConfig, useAllBrokers } from '@orderly.network/hooks';
|
|
4
4
|
import { useTranslation, Trans, i18n } from '@orderly.network/i18n';
|
|
5
5
|
import { injectable, Flex, TokenIcon, Text, SymbolBadge as SymbolBadge$1, Tooltip, Box, cn, Marquee, Checkbox, Divider, useScreen, WarningIcon, NewsFillIcon, CloseIcon, modal, GradientText, useEmblaCarousel, Badge, CheckedSquareFillIcon, CheckSquareEmptyIcon, Button, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Input, CloseCircleFillIcon, PlusIcon, DataTable, usePagination, Tabs, TabPanel, EmptyDataState, RwaIcon, EmptyStateIcon, Picker, Select } from '@orderly.network/ui';
|
|
6
6
|
import { Decimal, formatSymbol } from '@orderly.network/utils';
|
|
@@ -56,9 +56,12 @@ var init_rwaDotTooltip = __esm({
|
|
|
56
56
|
"src/components/rwaDotTooltip.tsx"() {
|
|
57
57
|
RwaDotTooltip = ({ record }) => {
|
|
58
58
|
const { t } = useTranslation();
|
|
59
|
-
const
|
|
59
|
+
const { open: computedOpen } = useGetRwaSymbolOpenStatus(record.symbol);
|
|
60
|
+
const open = computedOpen ?? isCurrentlyTrading(
|
|
60
61
|
record.rwaNextClose,
|
|
61
|
-
record.rwaStatus
|
|
62
|
+
record.rwaStatus,
|
|
63
|
+
void 0,
|
|
64
|
+
record.rwaNextOpen
|
|
62
65
|
);
|
|
63
66
|
if (!record.isRwa) {
|
|
64
67
|
return null;
|
|
@@ -68,7 +71,7 @@ var init_rwaDotTooltip = __esm({
|
|
|
68
71
|
{
|
|
69
72
|
className: "oui-pointer-events-none",
|
|
70
73
|
disableHoverableContent: true,
|
|
71
|
-
content: /* @__PURE__ */ jsx(Text, { color:
|
|
74
|
+
content: /* @__PURE__ */ jsx(Text, { color: open ? "success" : "danger", children: open ? t("trading.rwa.marketHours") : t("trading.rwa.outsideMarketHours") }),
|
|
72
75
|
children: /* @__PURE__ */ jsx(
|
|
73
76
|
Box,
|
|
74
77
|
{
|
|
@@ -83,7 +86,7 @@ var init_rwaDotTooltip = __esm({
|
|
|
83
86
|
width: 4,
|
|
84
87
|
height: 4,
|
|
85
88
|
r: "full",
|
|
86
|
-
className:
|
|
89
|
+
className: open ? "oui-bg-success" : "oui-bg-danger"
|
|
87
90
|
}
|
|
88
91
|
)
|
|
89
92
|
}
|
|
@@ -101,7 +104,10 @@ var init_symbolBadge = __esm({
|
|
|
101
104
|
props.symbol
|
|
102
105
|
);
|
|
103
106
|
const badge = brokerName ?? brokerId ?? void 0;
|
|
104
|
-
|
|
107
|
+
if (!badge) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
return /* @__PURE__ */ jsx(Flex, { as: "span", display: "inlineFlex", className: props.className, children: /* @__PURE__ */ jsx(SymbolBadge$1, { badge, fullName: brokerNameRaw }) });
|
|
105
111
|
};
|
|
106
112
|
SymbolBadge = BrokerIdBadge;
|
|
107
113
|
}
|
|
@@ -115,7 +121,8 @@ var init_symbolDisplay = __esm({
|
|
|
115
121
|
const { children, size = "xs", showBadge = true, record, ...rest } = props;
|
|
116
122
|
const symbol = children;
|
|
117
123
|
const symbolsInfo = useSymbolsInfo();
|
|
118
|
-
const
|
|
124
|
+
const info = symbolsInfo[symbol];
|
|
125
|
+
const displayName = info("display_symbol_name")?.trim?.();
|
|
119
126
|
const suffix = record?.isRwa || showBadge ? /* @__PURE__ */ jsxs(Flex, { as: "span", display: "inlineFlex", gapX: 0, itemAlign: "center", children: [
|
|
120
127
|
record?.isRwa && /* @__PURE__ */ jsx(RwaDotTooltip, { record }),
|
|
121
128
|
showBadge && /* @__PURE__ */ jsx(SymbolBadge, { symbol })
|
|
@@ -772,7 +779,7 @@ function searchBySymbol(list, searchValue = "", formatString) {
|
|
|
772
779
|
list?.forEach((item) => {
|
|
773
780
|
const formattedSymbol = formatSymbol(item.symbol, formatString);
|
|
774
781
|
const symbolLower = formattedSymbol.toLowerCase();
|
|
775
|
-
const displayName = item.
|
|
782
|
+
const displayName = item.display_symbol_name;
|
|
776
783
|
const displayNameLower = displayName ? String(displayName).toLowerCase() : null;
|
|
777
784
|
const matchesSymbol = reg.test(formattedSymbol);
|
|
778
785
|
const matchesDisplayName = displayNameLower ? reg.test(displayNameLower) : false;
|
|
@@ -788,8 +795,8 @@ function searchBySymbol(list, searchValue = "", formatString) {
|
|
|
788
795
|
}
|
|
789
796
|
});
|
|
790
797
|
const compareSymbols = (a, b) => {
|
|
791
|
-
const textA = a.
|
|
792
|
-
const textB = b.
|
|
798
|
+
const textA = a.display_symbol_name || formatSymbol(a.symbol, formatString);
|
|
799
|
+
const textB = b.display_symbol_name || formatSymbol(b.symbol, formatString);
|
|
793
800
|
if (textA < textB) return -1;
|
|
794
801
|
if (textA > textB) return 1;
|
|
795
802
|
return 0;
|
|
@@ -1668,7 +1675,7 @@ function getSymbolColumn(favorite, isFavoriteList = false, options) {
|
|
|
1668
1675
|
return {
|
|
1669
1676
|
title: i18n.t("common.symbol"),
|
|
1670
1677
|
dataIndex: "symbol",
|
|
1671
|
-
width: 150,
|
|
1678
|
+
width: options?.symbolColumnWidth ?? 150,
|
|
1672
1679
|
className: "oui-z-10",
|
|
1673
1680
|
onSort: true,
|
|
1674
1681
|
render: (value, record) => {
|
|
@@ -1687,6 +1694,9 @@ function getSymbolColumn(favorite, isFavoriteList = false, options) {
|
|
|
1687
1694
|
) });
|
|
1688
1695
|
}
|
|
1689
1696
|
const stackLeverageInSecondRow = options?.stackLeverageInSecondRow;
|
|
1697
|
+
const hasLeverage = typeof record.leverage === "number";
|
|
1698
|
+
const showSymbolBadgeInLeverageRow = stackLeverageInSecondRow && Boolean(record.broker_id);
|
|
1699
|
+
const showSecondRow = hasLeverage || showSymbolBadgeInLeverageRow;
|
|
1690
1700
|
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1691
1701
|
favoritesIcon,
|
|
1692
1702
|
/* @__PURE__ */ jsxs(
|
|
@@ -1699,9 +1709,24 @@ function getSymbolColumn(favorite, isFavoriteList = false, options) {
|
|
|
1699
1709
|
children: [
|
|
1700
1710
|
/* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1701
1711
|
/* @__PURE__ */ jsx(TokenIcon, { symbol: value, className: "oui-size-[18px]" }),
|
|
1702
|
-
/* @__PURE__ */ jsx(
|
|
1712
|
+
/* @__PURE__ */ jsx(
|
|
1713
|
+
SymbolDisplay,
|
|
1714
|
+
{
|
|
1715
|
+
formatString: "base",
|
|
1716
|
+
size: "2xs",
|
|
1717
|
+
record,
|
|
1718
|
+
showBadge: !stackLeverageInSecondRow,
|
|
1719
|
+
children: value
|
|
1720
|
+
}
|
|
1721
|
+
)
|
|
1703
1722
|
] }),
|
|
1704
|
-
|
|
1723
|
+
stackLeverageInSecondRow ? showSecondRow && /* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
1724
|
+
showSymbolBadgeInLeverageRow && /* @__PURE__ */ jsx(SymbolBadge, { symbol: value }),
|
|
1725
|
+
hasLeverage && /* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1726
|
+
record.leverage,
|
|
1727
|
+
"x"
|
|
1728
|
+
] })
|
|
1729
|
+
] }) : hasLeverage && /* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
1705
1730
|
record.leverage,
|
|
1706
1731
|
"x"
|
|
1707
1732
|
] })
|
|
@@ -1870,6 +1895,7 @@ var init_column = __esm({
|
|
|
1870
1895
|
init_icons();
|
|
1871
1896
|
init_icons();
|
|
1872
1897
|
init_favoritesDropdownMenu();
|
|
1898
|
+
init_symbolBadge();
|
|
1873
1899
|
init_symbolDisplay();
|
|
1874
1900
|
}
|
|
1875
1901
|
});
|
|
@@ -1974,6 +2000,7 @@ var init_type = __esm({
|
|
|
1974
2000
|
MarketsTabName2["Recent"] = "recent";
|
|
1975
2001
|
MarketsTabName2["All"] = "all";
|
|
1976
2002
|
MarketsTabName2["Rwa"] = "rwa";
|
|
2003
|
+
MarketsTabName2["PreTge"] = "preTge";
|
|
1977
2004
|
MarketsTabName2["NewListing"] = "newListing";
|
|
1978
2005
|
MarketsTabName2["Community"] = "community";
|
|
1979
2006
|
return MarketsTabName2;
|
|
@@ -2001,6 +2028,7 @@ var init_marketsList_script = __esm({
|
|
|
2001
2028
|
["all" /* All */]: MarketsType.ALL,
|
|
2002
2029
|
["community" /* Community */]: MarketsType.COMMUNITY,
|
|
2003
2030
|
["rwa" /* Rwa */]: MarketsType.RWA,
|
|
2031
|
+
["preTge" /* PreTge */]: MarketsType.PRE_TGE,
|
|
2004
2032
|
["favorites" /* Favorites */]: MarketsType.FAVORITES,
|
|
2005
2033
|
["recent" /* Recent */]: MarketsType.RECENT,
|
|
2006
2034
|
["newListing" /* NewListing */]: MarketsType.NEW_LISTING
|
|
@@ -2080,6 +2108,104 @@ var init_marketsList = __esm({
|
|
|
2080
2108
|
init_marketsList_widget();
|
|
2081
2109
|
}
|
|
2082
2110
|
});
|
|
2111
|
+
function createRwaSubcategoryFilter(subcategory, rwaSymbolsInfo) {
|
|
2112
|
+
return (data) => {
|
|
2113
|
+
const targetSession = RWA_SUBCATEGORY_SESSION_MAP[subcategory];
|
|
2114
|
+
if (!targetSession) {
|
|
2115
|
+
return data;
|
|
2116
|
+
}
|
|
2117
|
+
return data.filter((item) => {
|
|
2118
|
+
const marketSession = item?.market_session ?? rwaSymbolsInfo?.[item?.symbol]?.market_session;
|
|
2119
|
+
return marketSession === targetSession;
|
|
2120
|
+
});
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
var RWA_SUBCATEGORY_CONFIGS, RWA_SUBCATEGORY_SESSION_MAP, RwaSubcategoryTabs;
|
|
2124
|
+
var init_rwaSubcategoryTabs_ui = __esm({
|
|
2125
|
+
"src/components/rwaSubcategoryTabs/rwaSubcategoryTabs.ui.tsx"() {
|
|
2126
|
+
RWA_SUBCATEGORY_CONFIGS = [
|
|
2127
|
+
// US_STOCK and US_STOCK_EXT intentionally remain available only under All.
|
|
2128
|
+
{ value: "all", title: "All" },
|
|
2129
|
+
{ value: "fx", title: "FX", marketSession: "FX" },
|
|
2130
|
+
{ value: "hk", title: "HK", marketSession: "HK_STOCK" },
|
|
2131
|
+
{ value: "kr", title: "KR", marketSession: "KR_STOCK" },
|
|
2132
|
+
{ value: "cn", title: "CN", marketSession: "CN_STOCK" }
|
|
2133
|
+
];
|
|
2134
|
+
RWA_SUBCATEGORY_SESSION_MAP = RWA_SUBCATEGORY_CONFIGS.reduce((acc, item) => {
|
|
2135
|
+
if (item.marketSession) {
|
|
2136
|
+
acc[item.value] = item.marketSession;
|
|
2137
|
+
}
|
|
2138
|
+
return acc;
|
|
2139
|
+
}, {});
|
|
2140
|
+
RwaSubcategoryTabs = (props) => {
|
|
2141
|
+
const {
|
|
2142
|
+
storageKey,
|
|
2143
|
+
className,
|
|
2144
|
+
classNames,
|
|
2145
|
+
variant = "contained",
|
|
2146
|
+
size = "sm",
|
|
2147
|
+
showScrollIndicator,
|
|
2148
|
+
renderPanel
|
|
2149
|
+
} = props;
|
|
2150
|
+
const { t } = useTranslation();
|
|
2151
|
+
const [subcategory, setSubcategory] = useLocalStorage(
|
|
2152
|
+
storageKey,
|
|
2153
|
+
"all"
|
|
2154
|
+
);
|
|
2155
|
+
const rwaSymbolsInfo = useRwaSymbolsInfoStore();
|
|
2156
|
+
const [rwaMarkets] = useMarkets(MarketsType.RWA);
|
|
2157
|
+
const visibleTabs = useMemo(() => {
|
|
2158
|
+
const sessions = new Set(
|
|
2159
|
+
rwaMarkets.map(
|
|
2160
|
+
(item) => item.market_session ?? rwaSymbolsInfo?.[item.symbol]?.market_session
|
|
2161
|
+
).filter(Boolean)
|
|
2162
|
+
);
|
|
2163
|
+
return RWA_SUBCATEGORY_CONFIGS.filter((tab) => {
|
|
2164
|
+
if (!tab.marketSession) {
|
|
2165
|
+
return true;
|
|
2166
|
+
}
|
|
2167
|
+
return sessions.has(tab.marketSession);
|
|
2168
|
+
});
|
|
2169
|
+
}, [rwaMarkets, rwaSymbolsInfo]);
|
|
2170
|
+
useEffect(() => {
|
|
2171
|
+
if (!visibleTabs.some((tab) => tab.value === subcategory)) {
|
|
2172
|
+
setSubcategory("all");
|
|
2173
|
+
}
|
|
2174
|
+
}, [subcategory, setSubcategory, visibleTabs]);
|
|
2175
|
+
return /* @__PURE__ */ jsx(
|
|
2176
|
+
Tabs,
|
|
2177
|
+
{
|
|
2178
|
+
variant,
|
|
2179
|
+
size,
|
|
2180
|
+
value: subcategory,
|
|
2181
|
+
onValueChange: (value) => setSubcategory(value),
|
|
2182
|
+
classNames,
|
|
2183
|
+
className,
|
|
2184
|
+
showScrollIndicator,
|
|
2185
|
+
children: visibleTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
2186
|
+
TabPanel,
|
|
2187
|
+
{
|
|
2188
|
+
title: tab.value === "all" ? t("common.all") : tab.title,
|
|
2189
|
+
value: tab.value,
|
|
2190
|
+
children: renderPanel(
|
|
2191
|
+
tab.value,
|
|
2192
|
+
createRwaSubcategoryFilter(tab.value, rwaSymbolsInfo)
|
|
2193
|
+
)
|
|
2194
|
+
},
|
|
2195
|
+
tab.value
|
|
2196
|
+
))
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
});
|
|
2202
|
+
|
|
2203
|
+
// src/components/rwaSubcategoryTabs/index.ts
|
|
2204
|
+
var init_rwaSubcategoryTabs = __esm({
|
|
2205
|
+
"src/components/rwaSubcategoryTabs/index.ts"() {
|
|
2206
|
+
init_rwaSubcategoryTabs_ui();
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2083
2209
|
var RwaIconTab, RwaTab;
|
|
2084
2210
|
var init_rwaTab = __esm({
|
|
2085
2211
|
"src/components/rwaTab.tsx"() {
|
|
@@ -2094,12 +2220,12 @@ var init_rwaTab = __esm({
|
|
|
2094
2220
|
className: "group-data-[state=active]:oui-text-base-contrast group-data-[state=inactive]:oui-text-base-contrast-36"
|
|
2095
2221
|
}
|
|
2096
2222
|
),
|
|
2097
|
-
/* @__PURE__ */ jsx(Text, { children: t("
|
|
2223
|
+
/* @__PURE__ */ jsx(Text, { children: t("markets.tradFi") })
|
|
2098
2224
|
] });
|
|
2099
2225
|
};
|
|
2100
2226
|
RwaTab = () => {
|
|
2101
2227
|
const { t } = useTranslation();
|
|
2102
|
-
return /* @__PURE__ */ jsx(Flex, { gap: 1, children: /* @__PURE__ */ jsx(Text, { children: t("
|
|
2228
|
+
return /* @__PURE__ */ jsx(Flex, { gap: 1, children: /* @__PURE__ */ jsx(Text, { children: t("markets.tradFi") }) });
|
|
2103
2229
|
};
|
|
2104
2230
|
}
|
|
2105
2231
|
});
|
|
@@ -2770,17 +2896,19 @@ var init_tabUtils = __esm({
|
|
|
2770
2896
|
BUILT_IN_TITLE_MAP = {
|
|
2771
2897
|
community: "markets.community",
|
|
2772
2898
|
all: "common.all",
|
|
2899
|
+
preTge: "markets.preTge",
|
|
2773
2900
|
newListing: "markets.newListings",
|
|
2774
2901
|
recent: "markets.recent"
|
|
2775
2902
|
};
|
|
2776
2903
|
}
|
|
2777
2904
|
});
|
|
2778
|
-
var MobileMarketsDataList;
|
|
2905
|
+
var TWO_LINE_MARKET_ROW_CLASS, MobileMarketsDataList;
|
|
2779
2906
|
var init_marketsDataList_mobile_ui = __esm({
|
|
2780
2907
|
"src/pages/home/marketsDataList/marketsDataList.mobile.ui.tsx"() {
|
|
2781
2908
|
init_communityBrokerTabs();
|
|
2782
2909
|
init_marketsList();
|
|
2783
2910
|
init_marketsProvider();
|
|
2911
|
+
init_rwaSubcategoryTabs();
|
|
2784
2912
|
init_rwaTab();
|
|
2785
2913
|
init_searchInput();
|
|
2786
2914
|
init_column();
|
|
@@ -2789,6 +2917,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2789
2917
|
init_useCommunityTabs();
|
|
2790
2918
|
init_icons();
|
|
2791
2919
|
init_type();
|
|
2920
|
+
TWO_LINE_MARKET_ROW_CLASS = "!oui-h-[54px]";
|
|
2792
2921
|
MobileMarketsDataList = (props) => {
|
|
2793
2922
|
const { activeTab, onTabChange, tabSort, onTabSort } = props;
|
|
2794
2923
|
const { t } = useTranslation();
|
|
@@ -2829,6 +2958,11 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2829
2958
|
value: "rwa",
|
|
2830
2959
|
tabName: "rwa" /* Rwa */
|
|
2831
2960
|
},
|
|
2961
|
+
preTge: {
|
|
2962
|
+
title: t("markets.preTge"),
|
|
2963
|
+
value: "preTge",
|
|
2964
|
+
tabName: "preTge" /* PreTge */
|
|
2965
|
+
},
|
|
2832
2966
|
newListing: {
|
|
2833
2967
|
title: t("markets.newListings"),
|
|
2834
2968
|
icon: /* @__PURE__ */ jsx(NewListingsIcon, {}),
|
|
@@ -2839,29 +2973,54 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2839
2973
|
[t]
|
|
2840
2974
|
);
|
|
2841
2975
|
const renderTab = (type) => {
|
|
2976
|
+
const list = /* @__PURE__ */ jsx(
|
|
2977
|
+
MarketsListWidget,
|
|
2978
|
+
{
|
|
2979
|
+
type,
|
|
2980
|
+
initialSort: tabSort[type],
|
|
2981
|
+
onSort: onTabSort(type),
|
|
2982
|
+
getColumns,
|
|
2983
|
+
rowClassName: TWO_LINE_MARKET_ROW_CLASS,
|
|
2984
|
+
...getFavoritesProps(type)
|
|
2985
|
+
}
|
|
2986
|
+
);
|
|
2842
2987
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2843
2988
|
/* @__PURE__ */ jsx(
|
|
2844
2989
|
SearchInput,
|
|
2845
2990
|
{
|
|
2846
2991
|
classNames: {
|
|
2847
2992
|
root: cn(
|
|
2848
|
-
"oui-mx-3 oui-
|
|
2849
|
-
activeTab
|
|
2993
|
+
"oui-mx-3 oui-mt-5",
|
|
2994
|
+
activeTab === "favorites" /* Favorites */ ? "oui-mb-4" : "oui-mb-2"
|
|
2850
2995
|
)
|
|
2851
2996
|
}
|
|
2852
2997
|
}
|
|
2853
2998
|
),
|
|
2854
|
-
/* @__PURE__ */ jsx(
|
|
2855
|
-
|
|
2999
|
+
type === "rwa" /* Rwa */ ? /* @__PURE__ */ jsx(
|
|
3000
|
+
RwaSubcategoryTabs,
|
|
2856
3001
|
{
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
3002
|
+
storageKey: "orderly_mobile_markets_datalist_rwa_sel_sub_tab",
|
|
3003
|
+
size: "md",
|
|
3004
|
+
classNames: {
|
|
3005
|
+
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
3006
|
+
tabsContent: "oui-h-full",
|
|
3007
|
+
scrollIndicator: "oui-mx-3"
|
|
3008
|
+
},
|
|
3009
|
+
className: "oui-mobileMarketsDataList-rwa-tabs",
|
|
3010
|
+
showScrollIndicator: true,
|
|
3011
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(
|
|
3012
|
+
MarketsListWidget,
|
|
3013
|
+
{
|
|
3014
|
+
type,
|
|
3015
|
+
dataFilter,
|
|
3016
|
+
initialSort: tabSort[type],
|
|
3017
|
+
onSort: onTabSort(type),
|
|
3018
|
+
getColumns,
|
|
3019
|
+
rowClassName: TWO_LINE_MARKET_ROW_CLASS
|
|
3020
|
+
}
|
|
3021
|
+
)
|
|
2863
3022
|
}
|
|
2864
|
-
)
|
|
3023
|
+
) : list
|
|
2865
3024
|
] });
|
|
2866
3025
|
};
|
|
2867
3026
|
const renderCommunityList = (selected) => {
|
|
@@ -2872,7 +3031,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2872
3031
|
initialSort: tabSort["community" /* Community */],
|
|
2873
3032
|
onSort: onTabSort("community" /* Community */),
|
|
2874
3033
|
getColumns,
|
|
2875
|
-
rowClassName:
|
|
3034
|
+
rowClassName: TWO_LINE_MARKET_ROW_CLASS,
|
|
2876
3035
|
dataFilter: createCommunityBrokerFilter(selected)
|
|
2877
3036
|
}
|
|
2878
3037
|
);
|
|
@@ -2910,7 +3069,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2910
3069
|
SearchInput,
|
|
2911
3070
|
{
|
|
2912
3071
|
classNames: {
|
|
2913
|
-
root:
|
|
3072
|
+
root: "oui-mx-3 oui-mb-2 oui-mt-5"
|
|
2914
3073
|
}
|
|
2915
3074
|
}
|
|
2916
3075
|
),
|
|
@@ -2947,7 +3106,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2947
3106
|
SearchInput,
|
|
2948
3107
|
{
|
|
2949
3108
|
classNames: {
|
|
2950
|
-
root:
|
|
3109
|
+
root: "oui-mx-3 oui-mb-2 oui-mt-5"
|
|
2951
3110
|
}
|
|
2952
3111
|
}
|
|
2953
3112
|
),
|
|
@@ -2959,7 +3118,7 @@ var init_marketsDataList_mobile_ui = __esm({
|
|
|
2959
3118
|
initialSort: tabSort[key],
|
|
2960
3119
|
onSort: onTabSort(key),
|
|
2961
3120
|
getColumns,
|
|
2962
|
-
rowClassName:
|
|
3121
|
+
rowClassName: TWO_LINE_MARKET_ROW_CLASS
|
|
2963
3122
|
}
|
|
2964
3123
|
)
|
|
2965
3124
|
]
|
|
@@ -3073,7 +3232,7 @@ var init_column3 = __esm({
|
|
|
3073
3232
|
onSort: true,
|
|
3074
3233
|
render: (value, record) => {
|
|
3075
3234
|
return /* @__PURE__ */ jsxs(Flex, { gapX: 1, itemAlign: "center", children: [
|
|
3076
|
-
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", showIcon: true, children: value }),
|
|
3235
|
+
/* @__PURE__ */ jsx(SymbolDisplay, { formatString: "base", showIcon: true, record, children: value }),
|
|
3077
3236
|
typeof record.leverage === "number" && /* @__PURE__ */ jsxs(Badge, { size: "xs", color: "primary", children: [
|
|
3078
3237
|
record.leverage,
|
|
3079
3238
|
"x"
|
|
@@ -3353,7 +3512,7 @@ var init_marketsListFull_ui = __esm({
|
|
|
3353
3512
|
onSymbolChange?.(record);
|
|
3354
3513
|
favorite.addToHistory(record);
|
|
3355
3514
|
},
|
|
3356
|
-
"data-testid": `oui-testid-markets-${type === "new" ? "newListing" : type === "rwa" ? "rwa" : "all"}-tr-${record.symbol}`
|
|
3515
|
+
"data-testid": `oui-testid-markets-${type === "new" ? "newListing" : type === "rwa" ? "rwa" : type === "preTge" ? "preTge" : "all"}-tr-${record.symbol}`
|
|
3357
3516
|
};
|
|
3358
3517
|
},
|
|
3359
3518
|
generatedRowKey: (record) => record.symbol,
|
|
@@ -3378,7 +3537,8 @@ var init_marketsListFull_script = __esm({
|
|
|
3378
3537
|
MarketsTypeMap2 = {
|
|
3379
3538
|
all: MarketsType.ALL,
|
|
3380
3539
|
new: MarketsType.NEW_LISTING,
|
|
3381
|
-
rwa: MarketsType.RWA
|
|
3540
|
+
rwa: MarketsType.RWA,
|
|
3541
|
+
preTge: MarketsType.PRE_TGE
|
|
3382
3542
|
};
|
|
3383
3543
|
useMarketsListFullScript = (options) => {
|
|
3384
3544
|
const { type = "all", dataFilter } = options;
|
|
@@ -3455,22 +3615,23 @@ var init_marketsDataList_ui = __esm({
|
|
|
3455
3615
|
init_communityBrokerTabs();
|
|
3456
3616
|
init_favoritesEmpty();
|
|
3457
3617
|
init_marketsProvider();
|
|
3618
|
+
init_rwaSubcategoryTabs();
|
|
3458
3619
|
init_rwaTab();
|
|
3459
3620
|
init_tabUtils();
|
|
3460
3621
|
init_useCommunityTabs();
|
|
3461
3622
|
init_icons();
|
|
3462
3623
|
init_type();
|
|
3463
|
-
LazySearchInput =
|
|
3624
|
+
LazySearchInput = React7.lazy(
|
|
3464
3625
|
() => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => {
|
|
3465
3626
|
return { default: mod.SearchInput };
|
|
3466
3627
|
})
|
|
3467
3628
|
);
|
|
3468
|
-
LazyFavoritesListFullWidget =
|
|
3629
|
+
LazyFavoritesListFullWidget = React7.lazy(
|
|
3469
3630
|
() => Promise.resolve().then(() => (init_favoritesListFull(), favoritesListFull_exports)).then((mod) => {
|
|
3470
3631
|
return { default: mod.FavoritesListFullWidget };
|
|
3471
3632
|
})
|
|
3472
3633
|
);
|
|
3473
|
-
LazyMarketsListFullWidget =
|
|
3634
|
+
LazyMarketsListFullWidget = React7.lazy(
|
|
3474
3635
|
() => Promise.resolve().then(() => (init_marketsListFull(), marketsListFull_exports)).then((mod) => {
|
|
3475
3636
|
return { default: mod.MarketsListFullWidget };
|
|
3476
3637
|
})
|
|
@@ -3510,6 +3671,13 @@ var init_marketsDataList_ui = __esm({
|
|
|
3510
3671
|
listType: "rwa",
|
|
3511
3672
|
initialSort: DEFAULT_SORT
|
|
3512
3673
|
},
|
|
3674
|
+
preTge: {
|
|
3675
|
+
title: t("markets.preTge"),
|
|
3676
|
+
value: "preTge",
|
|
3677
|
+
testid: "oui-testid-markets-preTge-tab",
|
|
3678
|
+
listType: "preTge",
|
|
3679
|
+
initialSort: DEFAULT_SORT
|
|
3680
|
+
},
|
|
3513
3681
|
newListing: {
|
|
3514
3682
|
title: t("markets.newListings"),
|
|
3515
3683
|
icon: /* @__PURE__ */ jsx(NewListingsIcon, {}),
|
|
@@ -3528,7 +3696,7 @@ var init_marketsDataList_ui = __esm({
|
|
|
3528
3696
|
size: "xl",
|
|
3529
3697
|
value: activeTab,
|
|
3530
3698
|
onValueChange: onTabChange,
|
|
3531
|
-
trailing: /* @__PURE__ */ jsx(
|
|
3699
|
+
trailing: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazySearchInput, { classNames: { root: "oui-my-1 oui-w-[240px]" } }) }),
|
|
3532
3700
|
classNames: {
|
|
3533
3701
|
tabsList: "oui-tabs-markets-list",
|
|
3534
3702
|
tabsContent: "oui-tabs-markets-content",
|
|
@@ -3558,7 +3726,7 @@ var init_marketsDataList_ui = __esm({
|
|
|
3558
3726
|
icon: tab.type === "favorites" || tab.type === "rwa" ? void 0 : resolveTabTriggerIcon(tab, meta.icon),
|
|
3559
3727
|
value: meta.value,
|
|
3560
3728
|
testid: meta.testid,
|
|
3561
|
-
children: /* @__PURE__ */ jsx(
|
|
3729
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: tab.type === "favorites" ? /* @__PURE__ */ jsx(
|
|
3562
3730
|
LazyFavoritesListFullWidget,
|
|
3563
3731
|
{
|
|
3564
3732
|
emptyView: !searchValue && /* @__PURE__ */ jsx(
|
|
@@ -3579,7 +3747,7 @@ var init_marketsDataList_ui = __esm({
|
|
|
3579
3747
|
},
|
|
3580
3748
|
className: "oui-marketsDataList-community-tabs",
|
|
3581
3749
|
showScrollIndicator: true,
|
|
3582
|
-
renderPanel: (selected) => /* @__PURE__ */ jsx(
|
|
3750
|
+
renderPanel: (selected) => /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3583
3751
|
LazyMarketsListFullWidget,
|
|
3584
3752
|
{
|
|
3585
3753
|
type: "all",
|
|
@@ -3588,6 +3756,26 @@ var init_marketsDataList_ui = __esm({
|
|
|
3588
3756
|
}
|
|
3589
3757
|
) })
|
|
3590
3758
|
}
|
|
3759
|
+
) : tab.type === "rwa" ? /* @__PURE__ */ jsx(
|
|
3760
|
+
RwaSubcategoryTabs,
|
|
3761
|
+
{
|
|
3762
|
+
storageKey: "orderly_markets_datalist_rwa_sel_sub_tab",
|
|
3763
|
+
size: "md",
|
|
3764
|
+
classNames: {
|
|
3765
|
+
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
3766
|
+
tabsContent: "oui-h-full"
|
|
3767
|
+
},
|
|
3768
|
+
className: "oui-marketsDataList-rwa-tabs",
|
|
3769
|
+
showScrollIndicator: true,
|
|
3770
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3771
|
+
LazyMarketsListFullWidget,
|
|
3772
|
+
{
|
|
3773
|
+
type: "rwa",
|
|
3774
|
+
initialSort: meta.initialSort,
|
|
3775
|
+
dataFilter
|
|
3776
|
+
}
|
|
3777
|
+
) })
|
|
3778
|
+
}
|
|
3591
3779
|
) : /* @__PURE__ */ jsx(
|
|
3592
3780
|
LazyMarketsListFullWidget,
|
|
3593
3781
|
{
|
|
@@ -3611,7 +3799,7 @@ var init_marketsDataList_ui = __esm({
|
|
|
3611
3799
|
suffix: tab.suffix
|
|
3612
3800
|
}),
|
|
3613
3801
|
value: key,
|
|
3614
|
-
children: /* @__PURE__ */ jsx(
|
|
3802
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3615
3803
|
LazyMarketsListFullWidget,
|
|
3616
3804
|
{
|
|
3617
3805
|
type: "all",
|
|
@@ -3663,15 +3851,16 @@ var init_expandMarkets_ui = __esm({
|
|
|
3663
3851
|
init_type();
|
|
3664
3852
|
init_communityBrokerTabs();
|
|
3665
3853
|
init_marketsProvider();
|
|
3854
|
+
init_rwaSubcategoryTabs();
|
|
3666
3855
|
init_rwaTab();
|
|
3667
3856
|
init_useFavoritesExtraProps();
|
|
3668
3857
|
init_tabUtils();
|
|
3669
|
-
LazySearchInput2 =
|
|
3858
|
+
LazySearchInput2 = React7.lazy(
|
|
3670
3859
|
() => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => {
|
|
3671
3860
|
return { default: mod.SearchInput };
|
|
3672
3861
|
})
|
|
3673
3862
|
);
|
|
3674
|
-
LazyMarketsListWidget =
|
|
3863
|
+
LazyMarketsListWidget = React7.lazy(
|
|
3675
3864
|
() => Promise.resolve().then(() => (init_marketsList(), marketsList_exports)).then((mod) => {
|
|
3676
3865
|
return { default: mod.MarketsListWidget };
|
|
3677
3866
|
})
|
|
@@ -3695,7 +3884,42 @@ var init_expandMarkets_ui = __esm({
|
|
|
3695
3884
|
const tabDataFilters = useCustomTabDataFilters(tabs);
|
|
3696
3885
|
const renderBuiltInContent = (type) => {
|
|
3697
3886
|
const tabType = type;
|
|
3698
|
-
|
|
3887
|
+
if (tabType === "rwa" /* Rwa */) {
|
|
3888
|
+
return /* @__PURE__ */ jsx(
|
|
3889
|
+
RwaSubcategoryTabs,
|
|
3890
|
+
{
|
|
3891
|
+
storageKey: "orderly_expand_markets_rwa_sel_sub_tab",
|
|
3892
|
+
classNames: {
|
|
3893
|
+
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
3894
|
+
tabsListContainer: "oui-shrink-0",
|
|
3895
|
+
tabsContent: "oui-min-h-0 oui-min-w-0 oui-w-full oui-flex-1 oui-overflow-hidden"
|
|
3896
|
+
},
|
|
3897
|
+
className: cn(
|
|
3898
|
+
"oui-expandMarkets-rwa-tabs",
|
|
3899
|
+
"oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
|
|
3900
|
+
),
|
|
3901
|
+
showScrollIndicator: true,
|
|
3902
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3903
|
+
LazyMarketsListWidget,
|
|
3904
|
+
{
|
|
3905
|
+
type: tabType,
|
|
3906
|
+
dataFilter,
|
|
3907
|
+
initialSort: tabSort[type],
|
|
3908
|
+
onSort: onTabSort(tabType),
|
|
3909
|
+
tableClassNames: {
|
|
3910
|
+
root: expandListTableClassNames.root,
|
|
3911
|
+
scroll: cn(
|
|
3912
|
+
expandListTableClassNames.scroll,
|
|
3913
|
+
"oui-px-1",
|
|
3914
|
+
"oui-pb-2"
|
|
3915
|
+
)
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
) }) })
|
|
3919
|
+
}
|
|
3920
|
+
);
|
|
3921
|
+
}
|
|
3922
|
+
return /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3699
3923
|
LazyMarketsListWidget,
|
|
3700
3924
|
{
|
|
3701
3925
|
type: tabType,
|
|
@@ -3734,7 +3958,7 @@ var init_expandMarkets_ui = __esm({
|
|
|
3734
3958
|
"oui-flex oui-size-full oui-min-h-0 oui-min-w-0 oui-flex-col"
|
|
3735
3959
|
),
|
|
3736
3960
|
showScrollIndicator: true,
|
|
3737
|
-
renderPanel: (selected) => /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(
|
|
3961
|
+
renderPanel: (selected) => /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3738
3962
|
LazyMarketsListWidget,
|
|
3739
3963
|
{
|
|
3740
3964
|
type: "all" /* All */,
|
|
@@ -3755,7 +3979,7 @@ var init_expandMarkets_ui = __esm({
|
|
|
3755
3979
|
);
|
|
3756
3980
|
};
|
|
3757
3981
|
const renderCustomContent = (key) => {
|
|
3758
|
-
return /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(
|
|
3982
|
+
return /* @__PURE__ */ jsx(ExpandMarketsListPanel, { children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3759
3983
|
LazyMarketsListWidget,
|
|
3760
3984
|
{
|
|
3761
3985
|
type: "all" /* All */,
|
|
@@ -3783,7 +4007,7 @@ var init_expandMarkets_ui = __esm({
|
|
|
3783
4007
|
),
|
|
3784
4008
|
height: "100%",
|
|
3785
4009
|
children: [
|
|
3786
|
-
/* @__PURE__ */ jsx(Box, { className: "oui-expandMarkets-header", px: 3, pb: 2, children: /* @__PURE__ */ jsx(
|
|
4010
|
+
/* @__PURE__ */ jsx(Box, { className: "oui-expandMarkets-header", px: 3, pb: 2, children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3787
4011
|
LazySearchInput2,
|
|
3788
4012
|
{
|
|
3789
4013
|
classNames: { root: "oui-expandMarkets-search-input" }
|
|
@@ -3898,6 +4122,14 @@ var init_builtInTabRegistry = __esm({
|
|
|
3898
4122
|
},
|
|
3899
4123
|
all: { type: "all" },
|
|
3900
4124
|
rwa: { type: "rwa" },
|
|
4125
|
+
preTge: {
|
|
4126
|
+
type: "preTge",
|
|
4127
|
+
isVisible: (symbolList, { symbolsInfo }) => {
|
|
4128
|
+
return symbolList.some(
|
|
4129
|
+
(m) => Boolean(m?.is_pretge ?? symbolsInfo?.[m.symbol]?.("is_pretge"))
|
|
4130
|
+
);
|
|
4131
|
+
}
|
|
4132
|
+
},
|
|
3901
4133
|
newListing: { type: "newListing" },
|
|
3902
4134
|
recent: { type: "recent" }
|
|
3903
4135
|
};
|
|
@@ -3906,7 +4138,8 @@ var init_builtInTabRegistry = __esm({
|
|
|
3906
4138
|
{ type: "favorites" },
|
|
3907
4139
|
{ type: "all" },
|
|
3908
4140
|
{ type: "rwa" },
|
|
3909
|
-
{ ...builtInTabs.community }
|
|
4141
|
+
{ ...builtInTabs.community },
|
|
4142
|
+
{ ...builtInTabs.preTge }
|
|
3910
4143
|
],
|
|
3911
4144
|
expandMarkets: [
|
|
3912
4145
|
{ type: "favorites" },
|
|
@@ -3914,7 +4147,8 @@ var init_builtInTabRegistry = __esm({
|
|
|
3914
4147
|
{ type: "rwa" },
|
|
3915
4148
|
{ ...builtInTabs.community },
|
|
3916
4149
|
{ type: "newListing" },
|
|
3917
|
-
{ type: "recent" }
|
|
4150
|
+
{ type: "recent" },
|
|
4151
|
+
{ ...builtInTabs.preTge }
|
|
3918
4152
|
],
|
|
3919
4153
|
dropDownMarkets: [
|
|
3920
4154
|
{ type: "favorites" },
|
|
@@ -3922,7 +4156,8 @@ var init_builtInTabRegistry = __esm({
|
|
|
3922
4156
|
{ type: "rwa" },
|
|
3923
4157
|
{ ...builtInTabs.community },
|
|
3924
4158
|
{ type: "newListing" },
|
|
3925
|
-
{ type: "recent" }
|
|
4159
|
+
{ type: "recent" },
|
|
4160
|
+
{ ...builtInTabs.preTge }
|
|
3926
4161
|
],
|
|
3927
4162
|
subMenuMarkets: [
|
|
3928
4163
|
{ type: "favorites" },
|
|
@@ -3930,14 +4165,16 @@ var init_builtInTabRegistry = __esm({
|
|
|
3930
4165
|
{ type: "rwa" },
|
|
3931
4166
|
{ ...builtInTabs.community },
|
|
3932
4167
|
{ type: "newListing" },
|
|
3933
|
-
{ type: "recent" }
|
|
4168
|
+
{ type: "recent" },
|
|
4169
|
+
{ ...builtInTabs.preTge }
|
|
3934
4170
|
],
|
|
3935
4171
|
marketsDataList: [
|
|
3936
4172
|
{ type: "favorites" },
|
|
3937
4173
|
{ type: "all" },
|
|
3938
4174
|
{ type: "rwa" },
|
|
3939
4175
|
{ ...builtInTabs.community },
|
|
3940
|
-
{ type: "newListing" }
|
|
4176
|
+
{ type: "newListing" },
|
|
4177
|
+
{ ...builtInTabs.preTge }
|
|
3941
4178
|
],
|
|
3942
4179
|
horizontalMarkets: [
|
|
3943
4180
|
{ type: "all" },
|
|
@@ -3953,13 +4190,21 @@ function useMarketCategories(componentKey) {
|
|
|
3953
4190
|
const { i18n: i18n2 } = useTranslation();
|
|
3954
4191
|
const symbolList = useMarketList();
|
|
3955
4192
|
const rwaSymbolsInfo = useRwaSymbolsInfo();
|
|
4193
|
+
const symbolsInfo = useSymbolsInfo();
|
|
3956
4194
|
return useMemo(() => {
|
|
3957
4195
|
const original = componentDefaultTabs[componentKey];
|
|
3958
4196
|
const resolved = marketTabs ? marketTabs(original, { componentKey, builtIn: builtInTabs }) : original;
|
|
3959
4197
|
return resolved.filter(
|
|
3960
|
-
(tab) => tab.isVisible?.(symbolList, { rwaSymbolsInfo }) ?? true
|
|
4198
|
+
(tab) => tab.isVisible?.(symbolList, { rwaSymbolsInfo, symbolsInfo }) ?? true
|
|
3961
4199
|
);
|
|
3962
|
-
}, [
|
|
4200
|
+
}, [
|
|
4201
|
+
marketTabs,
|
|
4202
|
+
componentKey,
|
|
4203
|
+
i18n2.language,
|
|
4204
|
+
symbolList,
|
|
4205
|
+
rwaSymbolsInfo,
|
|
4206
|
+
symbolsInfo
|
|
4207
|
+
]);
|
|
3963
4208
|
}
|
|
3964
4209
|
var init_useMarketCategories = __esm({
|
|
3965
4210
|
"src/components/shared/hooks/useMarketCategories.ts"() {
|
|
@@ -4675,9 +4920,11 @@ __export(sideMarkets_ui_exports, {
|
|
|
4675
4920
|
var SideMarkets;
|
|
4676
4921
|
var init_sideMarkets_ui = __esm({
|
|
4677
4922
|
"src/components/sideMarkets/sideMarkets.ui.tsx"() {
|
|
4923
|
+
init_type();
|
|
4678
4924
|
init_expandMarkets();
|
|
4679
4925
|
init_marketsList();
|
|
4680
4926
|
init_marketsProvider();
|
|
4927
|
+
init_rwaSubcategoryTabs();
|
|
4681
4928
|
init_useFavoritesExtraProps();
|
|
4682
4929
|
SideMarkets = (props) => {
|
|
4683
4930
|
const { activeTab, onTabChange, className, tabSort, panelSize } = props;
|
|
@@ -4695,6 +4942,30 @@ var init_sideMarkets_ui = __esm({
|
|
|
4695
4942
|
}
|
|
4696
4943
|
);
|
|
4697
4944
|
}
|
|
4945
|
+
if (activeTab === "rwa" /* Rwa */) {
|
|
4946
|
+
return /* @__PURE__ */ jsx(
|
|
4947
|
+
RwaSubcategoryTabs,
|
|
4948
|
+
{
|
|
4949
|
+
storageKey: "orderly_side_markets_rwa_sel_sub_tab",
|
|
4950
|
+
classNames: {
|
|
4951
|
+
tabsList: "oui-px-1 oui-pt-1 oui-pb-2",
|
|
4952
|
+
tabsContent: "oui-h-full",
|
|
4953
|
+
scrollIndicator: "oui-mx-1"
|
|
4954
|
+
},
|
|
4955
|
+
className: "oui-sideMarkets-rwa-tabs oui-h-full",
|
|
4956
|
+
showScrollIndicator: true,
|
|
4957
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(
|
|
4958
|
+
MarketsListWidget,
|
|
4959
|
+
{
|
|
4960
|
+
type: activeTab,
|
|
4961
|
+
dataFilter,
|
|
4962
|
+
initialSort: tabSort[activeTab],
|
|
4963
|
+
panelSize: "middle"
|
|
4964
|
+
}
|
|
4965
|
+
)
|
|
4966
|
+
}
|
|
4967
|
+
);
|
|
4968
|
+
}
|
|
4698
4969
|
return /* @__PURE__ */ jsx(
|
|
4699
4970
|
MarketsListWidget,
|
|
4700
4971
|
{
|
|
@@ -4727,7 +4998,9 @@ var init_column4 = __esm({
|
|
|
4727
4998
|
return useCallback(
|
|
4728
4999
|
(favorite, isFavoriteList = false) => {
|
|
4729
5000
|
return [
|
|
4730
|
-
getSymbolColumn(favorite, isFavoriteList
|
|
5001
|
+
getSymbolColumn(favorite, isFavoriteList, {
|
|
5002
|
+
symbolColumnWidth: 190
|
|
5003
|
+
}),
|
|
4731
5004
|
getLastColumn(),
|
|
4732
5005
|
get24hPercentageColumn(),
|
|
4733
5006
|
{
|
|
@@ -4821,6 +5094,7 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4821
5094
|
init_communityBrokerTabs();
|
|
4822
5095
|
init_marketsList();
|
|
4823
5096
|
init_marketsProvider();
|
|
5097
|
+
init_rwaSubcategoryTabs();
|
|
4824
5098
|
init_rwaTab();
|
|
4825
5099
|
init_searchInput();
|
|
4826
5100
|
init_useFavoritesExtraProps();
|
|
@@ -4874,6 +5148,35 @@ var init_dropDownMarkets_ui = __esm({
|
|
|
4874
5148
|
const { tabs } = useMarketsContext();
|
|
4875
5149
|
const tabDataFilters = useCustomTabDataFilters(tabs);
|
|
4876
5150
|
const renderBuiltInContent = (tabType) => {
|
|
5151
|
+
if (tabType === "rwa" /* Rwa */) {
|
|
5152
|
+
return /* @__PURE__ */ jsx(
|
|
5153
|
+
RwaSubcategoryTabs,
|
|
5154
|
+
{
|
|
5155
|
+
storageKey: "orderly_dropdown_markets_rwa_sel_sub_tab",
|
|
5156
|
+
classNames: {
|
|
5157
|
+
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
5158
|
+
tabsContent: "oui-h-full"
|
|
5159
|
+
},
|
|
5160
|
+
className: cn("oui-dropDownMarkets-rwa-tabs", cls2),
|
|
5161
|
+
showScrollIndicator: true,
|
|
5162
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx("div", { className: cls2, children: /* @__PURE__ */ jsx(
|
|
5163
|
+
MarketsListWidget,
|
|
5164
|
+
{
|
|
5165
|
+
type: "rwa" /* Rwa */,
|
|
5166
|
+
initialSort: tabSort[tabType],
|
|
5167
|
+
onSort: onTabSort(tabType),
|
|
5168
|
+
getColumns,
|
|
5169
|
+
tableClassNames: {
|
|
5170
|
+
root: cn("oui-dropDownMarkets-list", "!oui-bg-base-8"),
|
|
5171
|
+
scroll: "oui-pb-5 oui-px-1"
|
|
5172
|
+
},
|
|
5173
|
+
rowClassName: "!oui-h-[34px]",
|
|
5174
|
+
dataFilter
|
|
5175
|
+
}
|
|
5176
|
+
) })
|
|
5177
|
+
}
|
|
5178
|
+
);
|
|
5179
|
+
}
|
|
4877
5180
|
return /* @__PURE__ */ jsx("div", { className: cls2, children: /* @__PURE__ */ jsx(
|
|
4878
5181
|
MarketsListWidget,
|
|
4879
5182
|
{
|
|
@@ -5127,7 +5430,7 @@ var init_marketItem_ui = __esm({
|
|
|
5127
5430
|
init_symbolDisplay();
|
|
5128
5431
|
MarketItemComponent = (props) => {
|
|
5129
5432
|
const { symbol, tickerData, isActive, onSymbolClick } = props;
|
|
5130
|
-
const handleClick =
|
|
5433
|
+
const handleClick = React7.useCallback(() => {
|
|
5131
5434
|
onSymbolClick(symbol);
|
|
5132
5435
|
}, [symbol, onSymbolClick]);
|
|
5133
5436
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5177,7 +5480,7 @@ var init_marketItem_ui = __esm({
|
|
|
5177
5480
|
}
|
|
5178
5481
|
);
|
|
5179
5482
|
};
|
|
5180
|
-
MarketItem =
|
|
5483
|
+
MarketItem = React7.memo(
|
|
5181
5484
|
MarketItemComponent,
|
|
5182
5485
|
(prevProps, nextProps) => {
|
|
5183
5486
|
return prevProps.symbol === nextProps.symbol && prevProps.isActive === nextProps.isActive && prevProps.tickerData["24h_close"] === nextProps.tickerData["24h_close"] && prevProps.tickerData.change === nextProps.tickerData.change && prevProps.tickerData.quote_dp === nextProps.tickerData.quote_dp && prevProps.onSymbolClick === nextProps.onSymbolClick;
|
|
@@ -5200,13 +5503,13 @@ var init_marketTypeFilter_ui = __esm({
|
|
|
5200
5503
|
tabs
|
|
5201
5504
|
} = props;
|
|
5202
5505
|
const { t } = useTranslation();
|
|
5203
|
-
const orderedOptions =
|
|
5506
|
+
const orderedOptions = React7.useMemo(() => {
|
|
5204
5507
|
if (!tabs) return [];
|
|
5205
5508
|
return tabs.filter(
|
|
5206
5509
|
(tab) => isCustomMarketTab(tab) || isBuiltInMarketTab(tab) && tab.type !== "favorites"
|
|
5207
5510
|
);
|
|
5208
5511
|
}, [tabs]);
|
|
5209
|
-
const hasFavoritesTab =
|
|
5512
|
+
const hasFavoritesTab = React7.useMemo(() => {
|
|
5210
5513
|
return tabs?.some(
|
|
5211
5514
|
(tab) => isBuiltInMarketTab(tab) && tab.type === "favorites"
|
|
5212
5515
|
);
|
|
@@ -5215,17 +5518,19 @@ var init_marketTypeFilter_ui = __esm({
|
|
|
5215
5518
|
const dropdownRef = useRef(null);
|
|
5216
5519
|
const [, favorite] = useMarkets(MarketsType.FAVORITES);
|
|
5217
5520
|
const hasFavorites = (favorite?.favorites?.length || 0) > 0;
|
|
5218
|
-
const titleOverrides =
|
|
5521
|
+
const titleOverrides = React7.useMemo(
|
|
5219
5522
|
() => ({
|
|
5220
5523
|
all: t("markets.allMarkets"),
|
|
5221
5524
|
newListing: t("markets.newListings"),
|
|
5222
|
-
recent: t("markets.recent")
|
|
5525
|
+
recent: t("markets.recent"),
|
|
5526
|
+
rwa: t("markets.tradFi"),
|
|
5527
|
+
preTge: t("markets.preTge")
|
|
5223
5528
|
}),
|
|
5224
5529
|
[t]
|
|
5225
5530
|
);
|
|
5226
5531
|
const getOptionLabel = useCallback(
|
|
5227
|
-
(tab) => resolveTabTitle(tab, titleOverrides,
|
|
5228
|
-
[
|
|
5532
|
+
(tab) => resolveTabTitle(tab, titleOverrides, titleOverrides.rwa),
|
|
5533
|
+
[titleOverrides]
|
|
5229
5534
|
);
|
|
5230
5535
|
useEffect(() => {
|
|
5231
5536
|
const handleClickOutside = (event) => {
|
|
@@ -5413,7 +5718,7 @@ var init_horizontalMarkets_ui = __esm({
|
|
|
5413
5718
|
init_marketsProvider();
|
|
5414
5719
|
init_marketItem_ui();
|
|
5415
5720
|
init_marketTypeFilter_ui();
|
|
5416
|
-
HorizontalMarkets =
|
|
5721
|
+
HorizontalMarkets = React7.memo((props) => {
|
|
5417
5722
|
const {
|
|
5418
5723
|
symbols,
|
|
5419
5724
|
tickerData,
|
|
@@ -5425,7 +5730,7 @@ var init_horizontalMarkets_ui = __esm({
|
|
|
5425
5730
|
dropdownPos
|
|
5426
5731
|
} = props;
|
|
5427
5732
|
const { tabs } = useMarketsContext();
|
|
5428
|
-
const renderMarketItem =
|
|
5733
|
+
const renderMarketItem = React7.useCallback(
|
|
5429
5734
|
(symbol, index) => {
|
|
5430
5735
|
const data = tickerData[symbol];
|
|
5431
5736
|
const isActive = currentSymbol === symbol;
|
|
@@ -5445,7 +5750,7 @@ var init_horizontalMarkets_ui = __esm({
|
|
|
5445
5750
|
},
|
|
5446
5751
|
[tickerData, currentSymbol, onSymbolClick]
|
|
5447
5752
|
);
|
|
5448
|
-
const carouselOptions =
|
|
5753
|
+
const carouselOptions = React7.useMemo(
|
|
5449
5754
|
() => ({
|
|
5450
5755
|
loop: true,
|
|
5451
5756
|
align: "start",
|
|
@@ -5453,7 +5758,7 @@ var init_horizontalMarkets_ui = __esm({
|
|
|
5453
5758
|
}),
|
|
5454
5759
|
[]
|
|
5455
5760
|
);
|
|
5456
|
-
const autoScrollOptions =
|
|
5761
|
+
const autoScrollOptions = React7.useMemo(
|
|
5457
5762
|
() => ({
|
|
5458
5763
|
speed: 1,
|
|
5459
5764
|
direction: "forward",
|
|
@@ -5599,17 +5904,17 @@ var init_funding_script = __esm({
|
|
|
5599
5904
|
var LazySearchInput4, LazyFundingOverviewWidget, LazyFundingComparisonWidget, Funding;
|
|
5600
5905
|
var init_funding_ui = __esm({
|
|
5601
5906
|
"src/pages/home/funding/funding.ui.tsx"() {
|
|
5602
|
-
LazySearchInput4 =
|
|
5907
|
+
LazySearchInput4 = React7.lazy(
|
|
5603
5908
|
() => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => {
|
|
5604
5909
|
return { default: mod.SearchInput };
|
|
5605
5910
|
})
|
|
5606
5911
|
);
|
|
5607
|
-
LazyFundingOverviewWidget =
|
|
5912
|
+
LazyFundingOverviewWidget = React7.lazy(
|
|
5608
5913
|
() => Promise.resolve().then(() => (init_fundingOverview(), fundingOverview_exports)).then((mod) => {
|
|
5609
5914
|
return { default: mod.FundingOverviewWidget };
|
|
5610
5915
|
})
|
|
5611
5916
|
);
|
|
5612
|
-
LazyFundingComparisonWidget =
|
|
5917
|
+
LazyFundingComparisonWidget = React7.lazy(
|
|
5613
5918
|
() => Promise.resolve().then(() => (init_fundingComparison(), fundingComparison_exports)).then((mod) => {
|
|
5614
5919
|
return { default: mod.FundingComparisonWidget };
|
|
5615
5920
|
})
|
|
@@ -5631,7 +5936,7 @@ var init_funding_ui = __esm({
|
|
|
5631
5936
|
size: "lg",
|
|
5632
5937
|
value: props.activeTab,
|
|
5633
5938
|
onValueChange: props.onTabChange,
|
|
5634
|
-
trailing: /* @__PURE__ */ jsx(
|
|
5939
|
+
trailing: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazySearchInput4, { classNames: { root: "oui-my-1 oui-w-[240px]" } }) }),
|
|
5635
5940
|
children: [
|
|
5636
5941
|
/* @__PURE__ */ jsx(
|
|
5637
5942
|
TabPanel,
|
|
@@ -5643,7 +5948,7 @@ var init_funding_ui = __esm({
|
|
|
5643
5948
|
title: t("common.overview"),
|
|
5644
5949
|
value: "overview",
|
|
5645
5950
|
testid: "oui-testid-funding-overview-tab",
|
|
5646
|
-
children: /* @__PURE__ */ jsx(
|
|
5951
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyFundingOverviewWidget, {}) })
|
|
5647
5952
|
}
|
|
5648
5953
|
),
|
|
5649
5954
|
/* @__PURE__ */ jsx(
|
|
@@ -5656,7 +5961,7 @@ var init_funding_ui = __esm({
|
|
|
5656
5961
|
title: t("markets.funding.comparison"),
|
|
5657
5962
|
value: "comparison",
|
|
5658
5963
|
testid: "oui-testid-funding-comparison-tab",
|
|
5659
|
-
children: /* @__PURE__ */ jsx(
|
|
5964
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyFundingComparisonWidget, {}) })
|
|
5660
5965
|
}
|
|
5661
5966
|
)
|
|
5662
5967
|
]
|
|
@@ -5707,6 +6012,7 @@ init_communityBrokerTabs();
|
|
|
5707
6012
|
init_favoritesTabs();
|
|
5708
6013
|
init_marketsList();
|
|
5709
6014
|
init_marketsProvider();
|
|
6015
|
+
init_rwaSubcategoryTabs();
|
|
5710
6016
|
init_rwaTab();
|
|
5711
6017
|
init_useFavoritesExtraProps();
|
|
5712
6018
|
init_tabUtils();
|
|
@@ -5716,7 +6022,7 @@ var TABLE_CLASSNAMES = {
|
|
|
5716
6022
|
scroll: "oui-px-0",
|
|
5717
6023
|
header: "oui-hidden oui-h-0 oui-p-0"
|
|
5718
6024
|
};
|
|
5719
|
-
var LazySearchInput3 =
|
|
6025
|
+
var LazySearchInput3 = React7.lazy(
|
|
5720
6026
|
() => Promise.resolve().then(() => (init_searchInput(), searchInput_exports)).then((mod) => ({ default: mod.SearchInput }))
|
|
5721
6027
|
);
|
|
5722
6028
|
var cls = "oui-h-[calc(100%_-_36px)]";
|
|
@@ -5770,6 +6076,31 @@ var SubMenuMarkets = (props) => {
|
|
|
5770
6076
|
];
|
|
5771
6077
|
};
|
|
5772
6078
|
const renderBuiltInContent = (tabType) => {
|
|
6079
|
+
if (tabType === "rwa" /* Rwa */) {
|
|
6080
|
+
return /* @__PURE__ */ jsx(
|
|
6081
|
+
RwaSubcategoryTabs,
|
|
6082
|
+
{
|
|
6083
|
+
storageKey: "orderly_submenu_markets_rwa_sel_sub_tab",
|
|
6084
|
+
classNames: {
|
|
6085
|
+
tabsList: "oui-px-1 oui-pt-1 oui-pb-2",
|
|
6086
|
+
tabsContent: "oui-h-full",
|
|
6087
|
+
scrollIndicator: "oui-mx-1"
|
|
6088
|
+
},
|
|
6089
|
+
className: cn("oui-subMenuMarkets-rwa-tabs", cls),
|
|
6090
|
+
showScrollIndicator: true,
|
|
6091
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(
|
|
6092
|
+
MarketTabPanel,
|
|
6093
|
+
{
|
|
6094
|
+
type: tabType,
|
|
6095
|
+
getColumns,
|
|
6096
|
+
dataFilter,
|
|
6097
|
+
initialSort: tabSort[tabType],
|
|
6098
|
+
onSort: onTabSort(tabType)
|
|
6099
|
+
}
|
|
6100
|
+
)
|
|
6101
|
+
}
|
|
6102
|
+
);
|
|
6103
|
+
}
|
|
5773
6104
|
if (tabType === "favorites" /* Favorites */) {
|
|
5774
6105
|
const favProps = getFavoritesProps("favorites" /* Favorites */);
|
|
5775
6106
|
return /* @__PURE__ */ jsx(
|
|
@@ -5843,7 +6174,7 @@ var SubMenuMarkets = (props) => {
|
|
|
5843
6174
|
),
|
|
5844
6175
|
height: "100%",
|
|
5845
6176
|
children: [
|
|
5846
|
-
/* @__PURE__ */ jsx(Box, { className: "oui-p-1", children: /* @__PURE__ */ jsx(
|
|
6177
|
+
/* @__PURE__ */ jsx(Box, { className: "oui-p-1", children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazySearchInput3, {}) }) }),
|
|
5847
6178
|
/* @__PURE__ */ jsx(
|
|
5848
6179
|
Tabs,
|
|
5849
6180
|
{
|
|
@@ -5997,14 +6328,14 @@ var useSideMarketsScript = (options) => {
|
|
|
5997
6328
|
|
|
5998
6329
|
// src/components/sideMarkets/sideMarkets.widget.tsx
|
|
5999
6330
|
init_marketsProvider();
|
|
6000
|
-
var LazySideMarkets =
|
|
6331
|
+
var LazySideMarkets = React7.lazy(
|
|
6001
6332
|
() => Promise.resolve().then(() => (init_sideMarkets_ui(), sideMarkets_ui_exports)).then((mod) => {
|
|
6002
6333
|
return { default: mod.SideMarkets };
|
|
6003
6334
|
})
|
|
6004
6335
|
);
|
|
6005
6336
|
var SideMarketsWidget = (props) => {
|
|
6006
6337
|
const state = useSideMarketsScript(props);
|
|
6007
|
-
return /* @__PURE__ */ jsx(MarketsProvider, { ...pick(["symbol", "onSymbolChange"], props), children: /* @__PURE__ */ jsx(
|
|
6338
|
+
return /* @__PURE__ */ jsx(MarketsProvider, { ...pick(["symbol", "onSymbolChange"], props), children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazySideMarkets, { ...state, className: props.className }) }) });
|
|
6008
6339
|
};
|
|
6009
6340
|
|
|
6010
6341
|
// src/index.ts
|
|
@@ -6016,6 +6347,7 @@ init_type();
|
|
|
6016
6347
|
init_communityBrokerTabs();
|
|
6017
6348
|
init_marketsList();
|
|
6018
6349
|
init_marketsProvider();
|
|
6350
|
+
init_rwaSubcategoryTabs();
|
|
6019
6351
|
init_rwaTab();
|
|
6020
6352
|
init_searchInput();
|
|
6021
6353
|
init_useFavoritesExtraProps();
|
|
@@ -6041,6 +6373,40 @@ var MarketsSheet = (props) => {
|
|
|
6041
6373
|
const tabDataFilters = useCustomTabDataFilters(tabs);
|
|
6042
6374
|
const renderBuiltInContent = (tabType) => {
|
|
6043
6375
|
const isFavorites = tabType === "favorites" /* Favorites */;
|
|
6376
|
+
if (tabType === "rwa" /* Rwa */) {
|
|
6377
|
+
return /* @__PURE__ */ jsx(
|
|
6378
|
+
RwaSubcategoryTabs,
|
|
6379
|
+
{
|
|
6380
|
+
storageKey: "orderly_markets_sheet_rwa_sel_sub_tab",
|
|
6381
|
+
classNames: {
|
|
6382
|
+
tabsList: "oui-px-3 oui-pt-1 oui-pb-2",
|
|
6383
|
+
tabsContent: "oui-h-full"
|
|
6384
|
+
},
|
|
6385
|
+
className: cn(
|
|
6386
|
+
"oui-marketsSheet-rwa-tabs",
|
|
6387
|
+
"oui-h-[calc(100%_-_36px)]"
|
|
6388
|
+
),
|
|
6389
|
+
showScrollIndicator: true,
|
|
6390
|
+
renderPanel: (_, dataFilter) => /* @__PURE__ */ jsx(
|
|
6391
|
+
MarketsListWidget,
|
|
6392
|
+
{
|
|
6393
|
+
type: tabType,
|
|
6394
|
+
dataFilter,
|
|
6395
|
+
initialSort: tabSort[tabType],
|
|
6396
|
+
onSort: onTabSort(tabType),
|
|
6397
|
+
getColumns: getMarketsSheetColumns,
|
|
6398
|
+
tableClassNames: {
|
|
6399
|
+
root: cn("oui-marketsSheet-list", "!oui-bg-base-8"),
|
|
6400
|
+
scroll: cn(
|
|
6401
|
+
"oui-pb-[env(safe-area-inset-bottom,_20px)]",
|
|
6402
|
+
"oui-h-[calc(100%_-_40px)]"
|
|
6403
|
+
)
|
|
6404
|
+
}
|
|
6405
|
+
}
|
|
6406
|
+
)
|
|
6407
|
+
}
|
|
6408
|
+
);
|
|
6409
|
+
}
|
|
6044
6410
|
return /* @__PURE__ */ jsx(
|
|
6045
6411
|
MarketsListWidget,
|
|
6046
6412
|
{
|
|
@@ -6619,25 +6985,33 @@ var FundingRateHintWidget = (props) => {
|
|
|
6619
6985
|
// src/components/symbolInfoBarFull/symbolInfoBarFull.ui.tsx
|
|
6620
6986
|
init_symbolBadge();
|
|
6621
6987
|
init_symbolDisplay();
|
|
6622
|
-
var LazyDropDownMarketsWidget =
|
|
6988
|
+
var LazyDropDownMarketsWidget = React7.lazy(
|
|
6623
6989
|
() => Promise.resolve().then(() => (init_dropDownMarkets(), dropDownMarkets_exports)).then((mod) => {
|
|
6624
6990
|
return { default: mod.DropDownMarketsWidget };
|
|
6625
6991
|
})
|
|
6626
6992
|
);
|
|
6627
|
-
var LazyFavoritesDropdownMenuWidget =
|
|
6993
|
+
var LazyFavoritesDropdownMenuWidget = React7.lazy(
|
|
6628
6994
|
() => Promise.resolve().then(() => (init_favoritesDropdownMenu(), favoritesDropdownMenu_exports)).then((mod) => {
|
|
6629
6995
|
return { default: mod.FavoritesDropdownMenuWidget };
|
|
6630
6996
|
})
|
|
6631
6997
|
);
|
|
6632
|
-
var LazyDataItem =
|
|
6998
|
+
var LazyDataItem = React7.lazy(
|
|
6633
6999
|
() => Promise.resolve().then(() => (init_dataItem_ui(), dataItem_ui_exports)).then((mod) => {
|
|
6634
7000
|
return { default: mod.DataItem };
|
|
6635
7001
|
})
|
|
6636
7002
|
);
|
|
6637
|
-
var RISK_NOTICE_LEARN_MORE_URL = "https://orderly.network";
|
|
6638
|
-
var SymbolInfoBarRiskNotice = ({
|
|
7003
|
+
var RISK_NOTICE_LEARN_MORE_URL = "https://orderly.network/docs/introduction/trade-on-orderly/permissionless-listing";
|
|
7004
|
+
var SymbolInfoBarRiskNotice = ({
|
|
7005
|
+
className,
|
|
7006
|
+
visible,
|
|
7007
|
+
symbolWithBroker,
|
|
7008
|
+
brokerName,
|
|
7009
|
+
isPreTge,
|
|
7010
|
+
autoHeight
|
|
7011
|
+
}) => {
|
|
6639
7012
|
const { t } = useTranslation();
|
|
6640
7013
|
if (!visible) return null;
|
|
7014
|
+
const contentKey = isPreTge ? "markets.symbolInfoBar.riskNotice.preLaunch.content" : "markets.symbolInfoBar.riskNotice.content";
|
|
6641
7015
|
return /* @__PURE__ */ jsx(
|
|
6642
7016
|
"a",
|
|
6643
7017
|
{
|
|
@@ -6657,7 +7031,7 @@ var SymbolInfoBarRiskNotice = ({ className, visible, symbolWithBroker, brokerNam
|
|
|
6657
7031
|
children: [
|
|
6658
7032
|
/* @__PURE__ */ jsx(WarningIcon, { className: "oui-shrink-0 oui-size-4 oui-text-warning-darken" }),
|
|
6659
7033
|
/* @__PURE__ */ jsxs(Text, { size: "xs", className: "oui-text-warning-darken oui-flex-1", children: [
|
|
6660
|
-
t(
|
|
7034
|
+
t(contentKey, {
|
|
6661
7035
|
symbolWithBroker,
|
|
6662
7036
|
brokerName
|
|
6663
7037
|
}),
|
|
@@ -6744,11 +7118,13 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6744
7118
|
showCountdown
|
|
6745
7119
|
} = props;
|
|
6746
7120
|
const { t } = useTranslation();
|
|
6747
|
-
const
|
|
7121
|
+
const symbolsInfo = useSymbolsInfo();
|
|
7122
|
+
const { brokerId, brokerName, brokerNameRaw, displaySymbolName } = useBadgeBySymbol(symbol);
|
|
7123
|
+
const isPreTge = Boolean(symbolsInfo[symbol]?.("is_pretge"));
|
|
6748
7124
|
const isCommunityListed = Boolean(brokerId ?? brokerName);
|
|
6749
7125
|
const baseFromSymbol = symbol?.split("_")[1] ?? symbol;
|
|
6750
|
-
const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` :
|
|
6751
|
-
const favoriteIcon = /* @__PURE__ */ jsx(
|
|
7126
|
+
const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` : displaySymbolName ?? symbol;
|
|
7127
|
+
const favoriteIcon = /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyFavoritesDropdownMenuWidget, { row: { symbol }, favorite, children: /* @__PURE__ */ jsx(
|
|
6752
7128
|
Flex,
|
|
6753
7129
|
{
|
|
6754
7130
|
width: 12,
|
|
@@ -6759,7 +7135,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6759
7135
|
children: isFavorite ? /* @__PURE__ */ jsx(FavoritesIcon2, { className: "oui-size-3 oui-text-warning-darken" }) : /* @__PURE__ */ jsx(UnFavoritesIcon2, { className: "oui-size-3 oui-text-base-contrast-36 hover:oui-text-warning-darken" })
|
|
6760
7136
|
}
|
|
6761
7137
|
) }) });
|
|
6762
|
-
const symbolView = /* @__PURE__ */ jsx(
|
|
7138
|
+
const symbolView = /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsxs(
|
|
6763
7139
|
Flex,
|
|
6764
7140
|
{
|
|
6765
7141
|
direction: "column",
|
|
@@ -6769,7 +7145,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6769
7145
|
/* @__PURE__ */ jsx(
|
|
6770
7146
|
LazyDropDownMarketsWidget,
|
|
6771
7147
|
{
|
|
6772
|
-
contentClassName: "oui-w-[
|
|
7148
|
+
contentClassName: "oui-w-[620px] oui-h-[496px]",
|
|
6773
7149
|
symbol: props.symbol,
|
|
6774
7150
|
onSymbolChange: props.onSymbolChange,
|
|
6775
7151
|
children: /* @__PURE__ */ jsx(Flex, { direction: "column", gap: 1, children: /* @__PURE__ */ jsxs(Flex, { gapX: 1, className: "oui-cursor-pointer", children: [
|
|
@@ -6841,8 +7217,8 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6841
7217
|
}
|
|
6842
7218
|
);
|
|
6843
7219
|
const scrollableContent = /* @__PURE__ */ jsxs(Flex, { gapX: 8, height: "100%", children: [
|
|
6844
|
-
/* @__PURE__ */ jsx("div", { ref: leadingElementRef, children: /* @__PURE__ */ jsx(
|
|
6845
|
-
/* @__PURE__ */ jsx(
|
|
7220
|
+
/* @__PURE__ */ jsx("div", { ref: leadingElementRef, children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyDataItem, { label: t("markets.column.24hChange"), value: change }) }) }),
|
|
7221
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
6846
7222
|
LazyDataItem,
|
|
6847
7223
|
{
|
|
6848
7224
|
label: t("markets.symbolInfoBar.Mark"),
|
|
@@ -6857,7 +7233,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6857
7233
|
hint: t("markets.symbolInfoBar.Mark.tooltip")
|
|
6858
7234
|
}
|
|
6859
7235
|
) }),
|
|
6860
|
-
/* @__PURE__ */ jsx(
|
|
7236
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
6861
7237
|
LazyDataItem,
|
|
6862
7238
|
{
|
|
6863
7239
|
label: t("markets.symbolInfoBar.Index"),
|
|
@@ -6865,7 +7241,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6865
7241
|
hint: t("markets.symbolInfoBar.Index.tooltip")
|
|
6866
7242
|
}
|
|
6867
7243
|
) }),
|
|
6868
|
-
/* @__PURE__ */ jsx(
|
|
7244
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
6869
7245
|
LazyDataItem,
|
|
6870
7246
|
{
|
|
6871
7247
|
label: t("markets.symbolInfoBar.24hVolume"),
|
|
@@ -6873,7 +7249,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6873
7249
|
hint: t("markets.symbolInfoBar.24hVolume.tooltip")
|
|
6874
7250
|
}
|
|
6875
7251
|
) }),
|
|
6876
|
-
/* @__PURE__ */ jsx(
|
|
7252
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
6877
7253
|
LazyDataItem,
|
|
6878
7254
|
{
|
|
6879
7255
|
label: t("markets.symbolInfoBar.predFundingRate"),
|
|
@@ -6881,7 +7257,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6881
7257
|
hint: /* @__PURE__ */ jsx(FundingRateHintWidget, { symbol })
|
|
6882
7258
|
}
|
|
6883
7259
|
) }),
|
|
6884
|
-
/* @__PURE__ */ jsx("div", { ref: tailingElementRef, children: /* @__PURE__ */ jsx(
|
|
7260
|
+
/* @__PURE__ */ jsx("div", { ref: tailingElementRef, children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
6885
7261
|
LazyDataItem,
|
|
6886
7262
|
{
|
|
6887
7263
|
label: t("markets.openInterest"),
|
|
@@ -6900,6 +7276,7 @@ var SymbolInfoBarFull = (props) => {
|
|
|
6900
7276
|
visible: isCommunityListed,
|
|
6901
7277
|
symbolWithBroker,
|
|
6902
7278
|
brokerName: brokerNameRaw ?? brokerName ?? "",
|
|
7279
|
+
isPreTge,
|
|
6903
7280
|
autoHeight: true
|
|
6904
7281
|
}
|
|
6905
7282
|
),
|
|
@@ -7146,7 +7523,9 @@ var useHorizontalMarketsScript = (options) => {
|
|
|
7146
7523
|
all: MarketsType.ALL,
|
|
7147
7524
|
recent: MarketsType.RECENT,
|
|
7148
7525
|
newListing: MarketsType.NEW_LISTING,
|
|
7149
|
-
favorites: MarketsType.FAVORITES
|
|
7526
|
+
favorites: MarketsType.FAVORITES,
|
|
7527
|
+
rwa: MarketsType.RWA,
|
|
7528
|
+
preTge: MarketsType.PRE_TGE
|
|
7150
7529
|
};
|
|
7151
7530
|
const isCustomCategory = typeof selectedMarketType === "string" && !MarketsTypeMap3[selectedMarketType];
|
|
7152
7531
|
const marketTypeKey = isCustomCategory ? "all" : selectedMarketType || "all";
|
|
@@ -7248,7 +7627,7 @@ var useHorizontalMarketsScript = (options) => {
|
|
|
7248
7627
|
onMarketTypeChange
|
|
7249
7628
|
};
|
|
7250
7629
|
};
|
|
7251
|
-
var LazyHorizontalMarkets =
|
|
7630
|
+
var LazyHorizontalMarkets = React7.lazy(
|
|
7252
7631
|
() => Promise.resolve().then(() => (init_horizontalMarkets_ui(), horizontalMarkets_ui_exports)).then((mod) => {
|
|
7253
7632
|
return { default: mod.HorizontalMarkets };
|
|
7254
7633
|
})
|
|
@@ -7260,7 +7639,7 @@ var HorizontalMarketsInner = (props) => {
|
|
|
7260
7639
|
maxItems,
|
|
7261
7640
|
defaultMarketType
|
|
7262
7641
|
});
|
|
7263
|
-
return /* @__PURE__ */ jsx(
|
|
7642
|
+
return /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
7264
7643
|
LazyHorizontalMarkets,
|
|
7265
7644
|
{
|
|
7266
7645
|
...state,
|
|
@@ -7521,17 +7900,17 @@ init_type();
|
|
|
7521
7900
|
init_marketsProvider();
|
|
7522
7901
|
init_useMarketCategories();
|
|
7523
7902
|
init_type();
|
|
7524
|
-
var LazyMarketsHeaderWidget =
|
|
7903
|
+
var LazyMarketsHeaderWidget = React7.lazy(
|
|
7525
7904
|
() => Promise.resolve().then(() => (init_marketsHeader_widget(), marketsHeader_widget_exports)).then((mod) => {
|
|
7526
7905
|
return { default: mod.MarketsHeaderWidget };
|
|
7527
7906
|
})
|
|
7528
7907
|
);
|
|
7529
|
-
var LazyMarketsDataListWidget =
|
|
7908
|
+
var LazyMarketsDataListWidget = React7.lazy(
|
|
7530
7909
|
() => Promise.resolve().then(() => (init_marketsDataList(), marketsDataList_exports)).then((mod) => {
|
|
7531
7910
|
return { default: mod.MarketsDataListWidget };
|
|
7532
7911
|
})
|
|
7533
7912
|
);
|
|
7534
|
-
var LazyFundingWidget =
|
|
7913
|
+
var LazyFundingWidget = React7.lazy(
|
|
7535
7914
|
() => Promise.resolve().then(() => (init_funding_widget(), funding_widget_exports)).then((mod) => {
|
|
7536
7915
|
return { default: mod.FundingWidget };
|
|
7537
7916
|
})
|
|
@@ -7594,8 +7973,8 @@ var MarketsDesktopContent = (props) => {
|
|
|
7594
7973
|
value: "markets" /* Markets */,
|
|
7595
7974
|
testid: "oui-testid-markets-tab",
|
|
7596
7975
|
children: [
|
|
7597
|
-
/* @__PURE__ */ jsx(
|
|
7598
|
-
/* @__PURE__ */ jsx(
|
|
7976
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyMarketsHeaderWidget, { className: "oui-mt-4" }) }),
|
|
7977
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyMarketsDataListWidget, {}) })
|
|
7599
7978
|
]
|
|
7600
7979
|
}
|
|
7601
7980
|
),
|
|
@@ -7609,7 +7988,7 @@ var MarketsDesktopContent = (props) => {
|
|
|
7609
7988
|
title: t("common.funding"),
|
|
7610
7989
|
value: "funding" /* Funding */,
|
|
7611
7990
|
testid: "oui-testid-funding-tab",
|
|
7612
|
-
children: /* @__PURE__ */ jsx(
|
|
7991
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyFundingWidget, {}) })
|
|
7613
7992
|
}
|
|
7614
7993
|
)
|
|
7615
7994
|
]
|
|
@@ -7651,8 +8030,8 @@ var MarketsMobileContent = (props) => {
|
|
|
7651
8030
|
value: "markets",
|
|
7652
8031
|
testid: "oui-testid-markets-tab",
|
|
7653
8032
|
children: [
|
|
7654
|
-
/* @__PURE__ */ jsx(
|
|
7655
|
-
/* @__PURE__ */ jsx(
|
|
8033
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyMarketsHeaderWidget, { className: "oui-mt-2" }) }),
|
|
8034
|
+
/* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyMarketsDataListWidget, {}) })
|
|
7656
8035
|
]
|
|
7657
8036
|
}
|
|
7658
8037
|
),
|
|
@@ -7662,7 +8041,7 @@ var MarketsMobileContent = (props) => {
|
|
|
7662
8041
|
title: t("common.funding"),
|
|
7663
8042
|
value: "funding",
|
|
7664
8043
|
testid: "oui-testid-funding-tab",
|
|
7665
|
-
children: /* @__PURE__ */ jsx(
|
|
8044
|
+
children: /* @__PURE__ */ jsx(React7.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyFundingWidget, {}) })
|
|
7666
8045
|
}
|
|
7667
8046
|
)
|
|
7668
8047
|
]
|