@orderly.network/portfolio 2.11.2 → 2.12.0-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 +36 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -18
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React12, { createContext, useMemo, useId, useContext, useState, useCallback, useRef, createElement, useEffect } from 'react';
|
|
2
|
-
import { useLocalStorage, useAccount, useIndexPricesStream, useCollateral, usePrivateQuery, useStatisticsDaily, useUserStatistics, useBalanceTopic, useAssetsHistory, useFeeState, useMediaQuery, useAccountInfo, useWalletConnector, usePositionStream, useLeverage, useMaxWithdrawal, useGetClaimed, DistributionId, TWType, useCurEpochEstimate, useAllBrokers, noCacheConfig, useEpochInfo, useConfig, useGetEnv, useMutation, useOrderlyContext, useDebouncedCallback, useAppStore, parseJSON, useChains, useTransferHistory, useChainInfo, useSymbolsInfo, useFundingFeeHistory, useSubAccountQuery, useApiKeyManager, useDistributionHistory, useVaultsHistory } from '@orderly.network/hooks';
|
|
2
|
+
import { useLocalStorage, useAccount, useIndexPricesStream, useCollateral, usePrivateQuery, useStatisticsDaily, useUserStatistics, useBalanceTopic, useAssetsHistory, useFeeState, useMediaQuery, useAccountInfo, useWalletConnector, usePositionStream, useLeverage, useMaxWithdrawal, useGetClaimed, DistributionId, TWType, useCurEpochEstimate, useAllBrokers, noCacheConfig, useEpochInfo, useConfig, useGetEnv, useMutation, useOrderlyContext, useDebouncedCallback, useAppStore, parseJSON, useChains, useTransferHistory, useChainInfo, useBadgeBySymbol, useSymbolsInfo, useFundingFeeHistory, useSubAccountQuery, useApiKeyManager, useDistributionHistory, useVaultsHistory } from '@orderly.network/hooks';
|
|
3
3
|
import { useAppContext, useDataTap, useCanTrade } from '@orderly.network/react-app';
|
|
4
4
|
import { AccountStatusEnum, ChainNamespace, EMPTY_LIST, AssetHistoryStatusEnum, AssetHistorySideEnum } from '@orderly.network/types';
|
|
5
|
-
import { registerSimpleSheet, registerSimpleDialog, Tabs, TabPanel, Flex, Text, modal, useModal, SimpleDialog, DataTable, SimpleSheet, TokenIcon, Divider, toast, useScreen, CardTitle, Select, Box, cn, Statistic, CopyIcon, Grid, formatAddress, DataFilter, Tooltip, InfoCircleIcon, Button, EmptyDataState, Card, Either, gradientTextVariants, EyeIcon, EyeCloseIcon, useOrderlyTheme, ArrowDownSquareFillIcon, ArrowLeftRightIcon, ArrowUpSquareFillIcon, ArrowRightShortIcon, CalendarMinusIcon, AffiliateIcon, ChevronRightIcon, TraderMobileIcon, SettingFillIcon, Switch, ChainIcon, capitalizeFirstLetter, usePagination, ListView, Badge, ArrowDownShortIcon, ScrollIndicator, PlusIcon, FeeTierIcon, ServerFillIcon, ArrowLeftRightSquareFill, VaultsIcon } from '@orderly.network/ui';
|
|
5
|
+
import { registerSimpleSheet, registerSimpleDialog, Tabs, TabPanel, Flex, Text, modal, useModal, SimpleDialog, DataTable, SimpleSheet, TokenIcon, Divider, toast, useScreen, CardTitle, Select, Box, cn, Statistic, CopyIcon, Grid, formatAddress, DataFilter, Tooltip, InfoCircleIcon, Button, EmptyDataState, Card, Either, gradientTextVariants, EyeIcon, EyeCloseIcon, useOrderlyTheme, ArrowDownSquareFillIcon, ArrowLeftRightIcon, ArrowUpSquareFillIcon, ArrowRightShortIcon, CalendarMinusIcon, AffiliateIcon, ChevronRightIcon, TraderMobileIcon, SettingFillIcon, Switch, ChainIcon, capitalizeFirstLetter, usePagination, ListView, Badge, ArrowDownShortIcon, ScrollIndicator, PlusIcon, SymbolBadge as SymbolBadge$1, FeeTierIcon, ServerFillIcon, ArrowLeftRightSquareFill, VaultsIcon } from '@orderly.network/ui';
|
|
6
6
|
import { LeverageWidgetWithDialogId } from '@orderly.network/ui-leverage';
|
|
7
7
|
import { DepositAndWithdrawWithSheetId, DepositAndWithdrawWithDialogId, TransferSheetId, TransferDialogId, DepositStatusWidget } from '@orderly.network/ui-transfer';
|
|
8
8
|
import { i18n, useTranslation, Trans } from '@orderly.network/i18n';
|
|
@@ -838,9 +838,24 @@ var init_assetHistory = __esm({
|
|
|
838
838
|
init_assetHistory_widget();
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
|
-
var useFundingHistoryColumns;
|
|
841
|
+
var SymbolBadge, useFundingHistoryColumns;
|
|
842
842
|
var init_column2 = __esm({
|
|
843
843
|
"src/pages/overview/funding/column.tsx"() {
|
|
844
|
+
SymbolBadge = (props) => {
|
|
845
|
+
const { brokerId, brokerName, brokerNameRaw } = useBadgeBySymbol(
|
|
846
|
+
props.symbol
|
|
847
|
+
);
|
|
848
|
+
return /* @__PURE__ */ jsx(
|
|
849
|
+
Text.symbolBadge,
|
|
850
|
+
{
|
|
851
|
+
badge: brokerName ?? brokerId ?? void 0,
|
|
852
|
+
fullName: brokerNameRaw,
|
|
853
|
+
className: "oui-cursor-pointer",
|
|
854
|
+
showIcon: true,
|
|
855
|
+
children: props.symbol
|
|
856
|
+
}
|
|
857
|
+
);
|
|
858
|
+
};
|
|
844
859
|
useFundingHistoryColumns = () => {
|
|
845
860
|
const { t } = useTranslation();
|
|
846
861
|
const columns = useMemo(() => {
|
|
@@ -849,10 +864,7 @@ var init_column2 = __esm({
|
|
|
849
864
|
title: t("common.symbol"),
|
|
850
865
|
dataIndex: "symbol",
|
|
851
866
|
width: 80,
|
|
852
|
-
|
|
853
|
-
textProps: {
|
|
854
|
-
showIcon: true
|
|
855
|
-
}
|
|
867
|
+
render: (value) => /* @__PURE__ */ jsx(SymbolBadge, { symbol: value })
|
|
856
868
|
},
|
|
857
869
|
{
|
|
858
870
|
title: t("common.time"),
|
|
@@ -980,9 +992,22 @@ var init_fundingHistory_ui = __esm({
|
|
|
980
992
|
};
|
|
981
993
|
}
|
|
982
994
|
});
|
|
995
|
+
var SymbolBadge2;
|
|
996
|
+
var init_symbolBadge = __esm({
|
|
997
|
+
"src/pages/overview/funding/symbolBadge.tsx"() {
|
|
998
|
+
SymbolBadge2 = (props) => {
|
|
999
|
+
const { brokerId, brokerName, brokerNameRaw } = useBadgeBySymbol(
|
|
1000
|
+
props.symbol
|
|
1001
|
+
);
|
|
1002
|
+
const badge = brokerName ?? brokerId ?? void 0;
|
|
1003
|
+
return /* @__PURE__ */ jsx(SymbolBadge$1, { badge, fullName: brokerNameRaw });
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
983
1007
|
var FundingHistoryMobile;
|
|
984
1008
|
var init_fundingHistory_ui_mobile = __esm({
|
|
985
1009
|
"src/pages/overview/funding/fundingHistory.ui.mobile.tsx"() {
|
|
1010
|
+
init_symbolBadge();
|
|
986
1011
|
FundingHistoryMobile = (props) => {
|
|
987
1012
|
const { dataSource: dataSource2, queryParameter, onFilter, isLoading, pagination } = props;
|
|
988
1013
|
const symbols = useSymbolsInfo();
|
|
@@ -1019,11 +1044,16 @@ var init_fundingHistory_ui_mobile = __esm({
|
|
|
1019
1044
|
Text.formatted,
|
|
1020
1045
|
{
|
|
1021
1046
|
rule: "symbol",
|
|
1047
|
+
formatString: "base",
|
|
1022
1048
|
className: "oui-text-base-contrast oui-mr-1 oui-text-sm",
|
|
1049
|
+
suffix: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: 1, children: [
|
|
1050
|
+
" ",
|
|
1051
|
+
/* @__PURE__ */ jsx(Badge, { color: "neutral", size: "xs", children: switchPaymentType(item.payment_type) }),
|
|
1052
|
+
/* @__PURE__ */ jsx(SymbolBadge2, { symbol: item.symbol })
|
|
1053
|
+
] }),
|
|
1023
1054
|
children: item.symbol
|
|
1024
1055
|
}
|
|
1025
1056
|
),
|
|
1026
|
-
/* @__PURE__ */ jsx(Badge, { color: "neutral", size: "xs", children: switchPaymentType(item.payment_type) }),
|
|
1027
1057
|
/* @__PURE__ */ jsx(
|
|
1028
1058
|
Text.formatted,
|
|
1029
1059
|
{
|