@orderly.network/ui-transfer 3.0.0-beta.0 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +34 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -13
package/dist/index.d.mts
CHANGED
|
@@ -205,11 +205,22 @@ declare const WithdrawFormWidget: FC<WithdrawFormWidgetProps>;
|
|
|
205
205
|
|
|
206
206
|
declare const DepositAndWithdrawWithDialogId = "DepositAndWithdrawWithDialogId";
|
|
207
207
|
declare const DepositAndWithdrawWithSheetId = "DepositAndWithdrawWithSheetId";
|
|
208
|
+
interface DepositTabExtension {
|
|
209
|
+
id: string;
|
|
210
|
+
title: string;
|
|
211
|
+
icon: React.ReactNode;
|
|
212
|
+
component: React.ComponentType<{
|
|
213
|
+
close?: () => void;
|
|
214
|
+
}>;
|
|
215
|
+
order?: number;
|
|
216
|
+
}
|
|
208
217
|
type DepositAndWithdrawProps = {
|
|
209
|
-
activeTab?:
|
|
218
|
+
activeTab?: string;
|
|
210
219
|
close?: () => void;
|
|
220
|
+
extraTabs?: DepositTabExtension[];
|
|
211
221
|
};
|
|
212
222
|
declare const DepositAndWithdraw: FC<DepositAndWithdrawProps>;
|
|
223
|
+
declare const InjectableDepositAndWithdraw: react.ComponentType<DepositAndWithdrawProps>;
|
|
213
224
|
|
|
214
225
|
type TransferFormScriptReturn = ReturnType<typeof useTransferFormScript>;
|
|
215
226
|
type TransferFormScriptOptions = {
|
|
@@ -512,4 +523,4 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
|
|
|
512
523
|
type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
|
|
513
524
|
declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
|
|
514
525
|
|
|
515
|
-
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, ExchangeDivider, Fee, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
|
526
|
+
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
package/dist/index.d.ts
CHANGED
|
@@ -205,11 +205,22 @@ declare const WithdrawFormWidget: FC<WithdrawFormWidgetProps>;
|
|
|
205
205
|
|
|
206
206
|
declare const DepositAndWithdrawWithDialogId = "DepositAndWithdrawWithDialogId";
|
|
207
207
|
declare const DepositAndWithdrawWithSheetId = "DepositAndWithdrawWithSheetId";
|
|
208
|
+
interface DepositTabExtension {
|
|
209
|
+
id: string;
|
|
210
|
+
title: string;
|
|
211
|
+
icon: React.ReactNode;
|
|
212
|
+
component: React.ComponentType<{
|
|
213
|
+
close?: () => void;
|
|
214
|
+
}>;
|
|
215
|
+
order?: number;
|
|
216
|
+
}
|
|
208
217
|
type DepositAndWithdrawProps = {
|
|
209
|
-
activeTab?:
|
|
218
|
+
activeTab?: string;
|
|
210
219
|
close?: () => void;
|
|
220
|
+
extraTabs?: DepositTabExtension[];
|
|
211
221
|
};
|
|
212
222
|
declare const DepositAndWithdraw: FC<DepositAndWithdrawProps>;
|
|
223
|
+
declare const InjectableDepositAndWithdraw: react.ComponentType<DepositAndWithdrawProps>;
|
|
213
224
|
|
|
214
225
|
type TransferFormScriptReturn = ReturnType<typeof useTransferFormScript>;
|
|
215
226
|
type TransferFormScriptOptions = {
|
|
@@ -512,4 +523,4 @@ declare const DepositStatus: react__default.FC<DepositStatusProps>;
|
|
|
512
523
|
type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
|
|
513
524
|
declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
|
|
514
525
|
|
|
515
|
-
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, ExchangeDivider, Fee, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
|
526
|
+
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, DEPOSIT_ERROR_CODE_MAP, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, type DepositTabExtension, ExchangeDivider, Fee, InjectableDepositAndWithdraw, type InputStatus, QuantityInput, SwapCoin, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, YIELD_BEARING_ASSETS, type YieldBearingAsset, YieldBearingReminder, checkIsAccountId, feeDecimalsOffset, getDepositKnownErrorMessage, getTransferErrorMessage, getUSDCToken, getYieldBearingAsset, isYieldBearingAsset, sortTokensWithUSDCFirst, useConvertFormScript as useConvertForm, useDepositFormScript, useDepositStatusScript, useTransferFormScript, useWithdrawFormScript };
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var core = require('@orderly.network/core');
|
|
|
14
14
|
var uiChainSelector = require('@orderly.network/ui-chain-selector');
|
|
15
15
|
var web3_js = require('@solana/web3.js');
|
|
16
16
|
var ethers = require('ethers');
|
|
17
|
+
var pluginCore = require('@orderly.network/plugin-core');
|
|
17
18
|
var defaultSolanaAdapter = require('@orderly.network/default-solana-adapter');
|
|
18
19
|
|
|
19
20
|
// src/components/depositForm/depositForm.ui.tsx
|
|
@@ -5991,10 +5992,14 @@ var WithdrawSlot = (props) => {
|
|
|
5991
5992
|
var DepositAndWithdrawWithDialogId = "DepositAndWithdrawWithDialogId";
|
|
5992
5993
|
var DepositAndWithdrawWithSheetId = "DepositAndWithdrawWithSheetId";
|
|
5993
5994
|
var DepositAndWithdraw = (props) => {
|
|
5995
|
+
const { extraTabs = [] } = props;
|
|
5994
5996
|
const [activeTab, setActiveTab] = react.useState(
|
|
5995
5997
|
props.activeTab || "deposit"
|
|
5996
5998
|
);
|
|
5997
5999
|
const { t } = i18n.useTranslation();
|
|
6000
|
+
const sortedExtra = [...extraTabs].sort(
|
|
6001
|
+
(a, b) => (a.order ?? 100) - (b.order ?? 100)
|
|
6002
|
+
);
|
|
5998
6003
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5999
6004
|
ui.Tabs,
|
|
6000
6005
|
{
|
|
@@ -6024,18 +6029,39 @@ var DepositAndWithdraw = (props) => {
|
|
|
6024
6029
|
value: "withdraw",
|
|
6025
6030
|
children: /* @__PURE__ */ jsxRuntime.jsx(WithdrawSlot, { close: props.close })
|
|
6026
6031
|
}
|
|
6027
|
-
)
|
|
6032
|
+
),
|
|
6033
|
+
sortedExtra.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6034
|
+
ui.TabPanel,
|
|
6035
|
+
{
|
|
6036
|
+
title: tab.title,
|
|
6037
|
+
icon: react.isValidElement(tab.icon) ? tab.icon : void 0,
|
|
6038
|
+
value: tab.id,
|
|
6039
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(tab.component, { close: props.close })
|
|
6040
|
+
},
|
|
6041
|
+
tab.id
|
|
6042
|
+
))
|
|
6028
6043
|
]
|
|
6029
6044
|
}
|
|
6030
6045
|
);
|
|
6031
6046
|
};
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6047
|
+
var InjectableDepositAndWithdraw = pluginCore.injectable(
|
|
6048
|
+
DepositAndWithdraw,
|
|
6049
|
+
"Transfer.DepositAndWithdraw"
|
|
6050
|
+
);
|
|
6051
|
+
ui.registerSimpleDialog(
|
|
6052
|
+
DepositAndWithdrawWithDialogId,
|
|
6053
|
+
InjectableDepositAndWithdraw,
|
|
6054
|
+
{
|
|
6055
|
+
size: "md",
|
|
6056
|
+
classNames: {
|
|
6057
|
+
content: "oui-border oui-border-line-6"
|
|
6058
|
+
}
|
|
6036
6059
|
}
|
|
6037
|
-
|
|
6038
|
-
ui.registerSimpleSheet(
|
|
6060
|
+
);
|
|
6061
|
+
ui.registerSimpleSheet(
|
|
6062
|
+
DepositAndWithdrawWithSheetId,
|
|
6063
|
+
InjectableDepositAndWithdraw
|
|
6064
|
+
);
|
|
6039
6065
|
var AccountSelect = (props) => {
|
|
6040
6066
|
const { subAccounts = [], value } = props;
|
|
6041
6067
|
const [open, setOpen] = react.useState(false);
|
|
@@ -7890,6 +7916,7 @@ exports.DepositStatus = DepositStatus;
|
|
|
7890
7916
|
exports.DepositStatusWidget = DepositStatusWidget;
|
|
7891
7917
|
exports.ExchangeDivider = ExchangeDivider;
|
|
7892
7918
|
exports.Fee = Fee;
|
|
7919
|
+
exports.InjectableDepositAndWithdraw = InjectableDepositAndWithdraw;
|
|
7893
7920
|
exports.QuantityInput = QuantityInput;
|
|
7894
7921
|
exports.SwapCoin = SwapCoin;
|
|
7895
7922
|
exports.TransferDialogId = TransferDialogId;
|