@edgex-web/components 0.1.0-beta.9 → 0.2.0-beta.10
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/ccip-F1d9zsBO.mjs +150 -0
- package/dist/ccip-F1d9zsBO.mjs.map +1 -0
- package/dist/components/Deposit/index.d.ts +1 -8
- package/dist/components/Deposit/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/DepositManager.d.ts +2 -0
- package/dist/components/Deposit/src/DepositManager.d.ts.map +1 -1
- package/dist/components/Deposit/src/components/evm/hooks/index.d.ts +3 -0
- package/dist/components/Deposit/src/components/evm/hooks/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/hooks/useApprove.d.ts +4 -0
- package/dist/components/Deposit/src/components/evm/hooks/useApprove.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/hooks/useDepositButtonState.d.ts +14 -0
- package/dist/components/Deposit/src/components/evm/hooks/useDepositButtonState.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/index.d.ts +6 -0
- package/dist/components/Deposit/src/components/evm/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/types/approve.d.ts +15 -0
- package/dist/components/Deposit/src/components/evm/types/approve.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/types/index.d.ts +16 -0
- package/dist/components/Deposit/src/components/evm/types/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/utils/format.d.ts +12 -0
- package/dist/components/Deposit/src/components/evm/utils/format.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/evm/utils/index.d.ts +8 -0
- package/dist/components/Deposit/src/components/evm/utils/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/mpc/index.d.ts +6 -0
- package/dist/components/Deposit/src/components/mpc/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/components/mpc/types/index.d.ts +17 -0
- package/dist/components/Deposit/src/components/mpc/types/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/constants/index.d.ts +4 -0
- package/dist/components/Deposit/src/constants/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/hooks/useErc20BalanceOfWatcher.d.ts +14 -0
- package/dist/components/Deposit/src/hooks/useErc20BalanceOfWatcher.d.ts.map +1 -0
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts +3 -4
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts.map +1 -1
- package/dist/components/Deposit/src/index.d.ts +2 -2
- package/dist/components/Deposit/src/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/utils.d.ts +7 -41
- package/dist/components/Deposit/src/utils.d.ts.map +1 -1
- package/dist/components/Deposit/types/index.d.ts +31 -37
- package/dist/components/Deposit/types/index.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/LoadingSpinner/index.d.ts +4 -0
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/components/Provider/index.d.ts +6 -1
- package/dist/components/Provider/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.d.ts +6 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/src/Tab.d.ts +5 -0
- package/dist/components/Tabs/src/Tab.d.ts.map +1 -0
- package/dist/components/Tabs/src/Tabs.d.ts +5 -0
- package/dist/components/Tabs/src/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/src/TabsList.d.ts +5 -0
- package/dist/components/Tabs/src/TabsList.d.ts.map +1 -0
- package/dist/components/Tabs/src/TabsPanel.d.ts +5 -0
- package/dist/components/Tabs/src/TabsPanel.d.ts.map +1 -0
- package/dist/components/Tabs/src/context.d.ts +16 -0
- package/dist/components/Tabs/src/context.d.ts.map +1 -0
- package/dist/components/Tabs/src/index.d.ts +6 -0
- package/dist/components/Tabs/src/index.d.ts.map +1 -0
- package/dist/components/Tabs/types/index.d.ts +28 -0
- package/dist/components/Tabs/types/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts +5 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts +5 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts.map +1 -0
- package/dist/components/Tooltip/src/index.d.ts +3 -0
- package/dist/components/Tooltip/src/index.d.ts.map +1 -0
- package/dist/components/Tooltip/types/index.d.ts +52 -0
- package/dist/components/Tooltip/types/index.d.ts.map +1 -0
- package/dist/components/Withdraw/constants/index.d.ts +7 -0
- package/dist/components/Withdraw/constants/index.d.ts.map +1 -0
- package/dist/components/Withdraw/index.d.ts +6 -10
- package/dist/components/Withdraw/index.d.ts.map +1 -1
- package/dist/components/Withdraw/src/Speed.d.ts +10 -0
- package/dist/components/Withdraw/src/Speed.d.ts.map +1 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts +12 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts.map +1 -0
- package/dist/components/Withdraw/src/constants.d.ts +24 -0
- package/dist/components/Withdraw/src/constants.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts +24 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/index.d.ts +44 -0
- package/dist/components/Withdraw/src/evm/index.d.ts.map +1 -0
- package/dist/components/Withdraw/src/index.d.ts +5 -0
- package/dist/components/Withdraw/src/index.d.ts.map +1 -0
- package/dist/components/Withdraw/types/index.d.ts +85 -0
- package/dist/components/Withdraw/types/index.d.ts.map +1 -0
- package/dist/components/shared/components/SpeedLevel/ActiveSpeed.d.ts +5 -0
- package/dist/components/shared/components/SpeedLevel/ActiveSpeed.d.ts.map +1 -0
- package/dist/components/shared/components/SpeedLevel/InactiveSpeed.d.ts +5 -0
- package/dist/components/shared/components/SpeedLevel/InactiveSpeed.d.ts.map +1 -0
- package/dist/components/shared/components/SpeedLevel/index.d.ts +6 -0
- package/dist/components/shared/components/SpeedLevel/index.d.ts.map +1 -0
- package/dist/components/shared/components/SpeedLevel/types/index.d.ts +6 -0
- package/dist/components/shared/components/SpeedLevel/types/index.d.ts.map +1 -0
- package/dist/components/shared/components/selector/Account.d.ts +13 -0
- package/dist/components/shared/components/selector/Account.d.ts.map +1 -0
- package/dist/components/shared/components/selector/Asset.d.ts +5 -0
- package/dist/components/shared/components/selector/Asset.d.ts.map +1 -0
- package/dist/components/shared/components/selector/Chain.d.ts +5 -0
- package/dist/components/shared/components/selector/Chain.d.ts.map +1 -0
- package/dist/components/shared/components/selector/index.d.ts +5 -0
- package/dist/components/shared/components/selector/index.d.ts.map +1 -0
- package/dist/components/shared/components/selector/types/index.d.ts +52 -0
- package/dist/components/shared/components/selector/types/index.d.ts.map +1 -0
- package/dist/components/shared/constants/index.d.ts +5 -0
- package/dist/components/shared/constants/index.d.ts.map +1 -0
- package/dist/components/shared/hooks/index.d.ts +1 -0
- package/dist/components/shared/hooks/index.d.ts.map +1 -0
- package/dist/components/shared/types/index.d.ts +10 -0
- package/dist/components/shared/types/index.d.ts.map +1 -0
- package/dist/components/shared/utils/format.d.ts +2 -0
- package/dist/components/shared/utils/format.d.ts.map +1 -0
- package/dist/components/shared/utils/index.d.ts +23 -0
- package/dist/components/shared/utils/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/usePoolBalance.d.ts +20 -0
- package/dist/hooks/usePoolBalance.d.ts.map +1 -0
- package/dist/hooks/useTranslation.d.ts +165 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/index-DGLETIrg.mjs +20451 -0
- package/dist/index-DGLETIrg.mjs.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +30 -6751
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +105 -32
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/en-US.d.ts +65 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/locales/index.d.ts +16 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/ja-JP.d.ts +65 -0
- package/dist/locales/ja-JP.d.ts.map +1 -0
- package/dist/locales/ru-RU.d.ts +65 -0
- package/dist/locales/ru-RU.d.ts.map +1 -0
- package/dist/locales/zh-CN.d.ts +66 -0
- package/dist/locales/zh-CN.d.ts.map +1 -0
- package/dist/locales/zh-TW.d.ts +65 -0
- package/dist/locales/zh-TW.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +18 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/token.d.ts +25 -0
- package/dist/types/token.d.ts.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +13 -7
- package/dist/components/Deposit/src/WalletProvider.d.ts +0 -23
- package/dist/components/Deposit/src/WalletProvider.d.ts.map +0 -1
- package/dist/components/Deposit/src/evm/WalletView.d.ts +0 -19
- package/dist/components/Deposit/src/evm/WalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/evm/index.d.ts +0 -32
- package/dist/components/Deposit/src/evm/index.d.ts.map +0 -1
- package/dist/components/Deposit/src/mpc/WalletView.d.ts +0 -12
- package/dist/components/Deposit/src/mpc/WalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/mpc/index.d.ts +0 -22
- package/dist/components/Deposit/src/mpc/index.d.ts.map +0 -1
- package/dist/components/Deposit/src/selector/Asset.d.ts +0 -20
- package/dist/components/Deposit/src/selector/Asset.d.ts.map +0 -1
- package/dist/components/Deposit/src/selector/Chain.d.ts +0 -16
- package/dist/components/Deposit/src/selector/Chain.d.ts.map +0 -1
- package/dist/components/Deposit/src/selector/index.d.ts +0 -14
- package/dist/components/Deposit/src/selector/index.d.ts.map +0 -1
- package/dist/components/Deposit/src/walletAdapters.d.ts +0 -67
- package/dist/components/Deposit/src/walletAdapters.d.ts.map +0 -1
- package/dist/components/Deposit/types/wallet-hooks.d.ts +0 -78
- package/dist/components/Deposit/types/wallet-hooks.d.ts.map +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const enUS: {
|
|
2
|
+
deposit: {
|
|
3
|
+
title: string;
|
|
4
|
+
chain: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
available: string;
|
|
8
|
+
equity: string;
|
|
9
|
+
confirmDeposit: string;
|
|
10
|
+
switchNetwork: string;
|
|
11
|
+
max: string;
|
|
12
|
+
arrivalTime: string;
|
|
13
|
+
ethCrossChainDepositInitiated: string;
|
|
14
|
+
minDeposit: string;
|
|
15
|
+
minDepositParsed: string;
|
|
16
|
+
maxDeposit: string;
|
|
17
|
+
depositTipFor25w: string;
|
|
18
|
+
depositAllTip: string;
|
|
19
|
+
crossChainDepositFeeTip: string;
|
|
20
|
+
enableSystemProWithToken: string;
|
|
21
|
+
enableTokenDesc: string;
|
|
22
|
+
enableWithToken: string;
|
|
23
|
+
arrivaltimeTooltip1: string;
|
|
24
|
+
arrivaltimeTooltip2: string;
|
|
25
|
+
arrivalEstimated: string;
|
|
26
|
+
availableDesc: string;
|
|
27
|
+
noPrivateKeyWalletWarning: string;
|
|
28
|
+
layerZeroDepositTip: string;
|
|
29
|
+
layerZeroDepositTipExceedPool: string;
|
|
30
|
+
layerZeroDepositTipGte200k: string;
|
|
31
|
+
layerZeroDepositButton: string;
|
|
32
|
+
};
|
|
33
|
+
withdraw: {
|
|
34
|
+
noticeDesc: string;
|
|
35
|
+
crossChainTips: string;
|
|
36
|
+
commonWithdraw: string;
|
|
37
|
+
withdraw: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
confirmWithdraw: string;
|
|
40
|
+
speedNote: string;
|
|
41
|
+
speedNoteSpeed1: string;
|
|
42
|
+
speedNoteSpeed2: string;
|
|
43
|
+
speedNoteSpeed3: string;
|
|
44
|
+
receiverAddress: string;
|
|
45
|
+
fee: string;
|
|
46
|
+
feeRate: string;
|
|
47
|
+
withdrawlAmount: string;
|
|
48
|
+
amountToReceive: string;
|
|
49
|
+
minWithdraw: string;
|
|
50
|
+
minWithdrawParsed: string;
|
|
51
|
+
invalidReceiverAddress: string;
|
|
52
|
+
availableDesc: string;
|
|
53
|
+
feeCalculationTip: string;
|
|
54
|
+
crossChainPoolBalance: string;
|
|
55
|
+
poolBalance: string;
|
|
56
|
+
poolBalanceInsufficientTip: string;
|
|
57
|
+
};
|
|
58
|
+
account: {
|
|
59
|
+
title: string;
|
|
60
|
+
perpetual: string;
|
|
61
|
+
spot: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default enUS;
|
|
65
|
+
//# sourceMappingURL=en-US.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../src/locales/en-US.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFhB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as zhCN, TranslationKeys } from './zh-CN';
|
|
2
|
+
import { default as enUS } from './en-US';
|
|
3
|
+
import { default as jaJP } from './ja-JP';
|
|
4
|
+
import { default as ruRU } from './ru-RU';
|
|
5
|
+
import { default as zhTW } from './zh-TW';
|
|
6
|
+
|
|
7
|
+
export declare const SUPPORTED_LOCALES: readonly ["en-US", "ja-JP", "ru-RU", "zh-CN", "zh-TW"];
|
|
8
|
+
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
|
|
9
|
+
export declare const localeResources: Record<SupportedLocale, TranslationKeys>;
|
|
10
|
+
export declare const DEFAULT_LOCALE: SupportedLocale;
|
|
11
|
+
export declare const LOCALE_NAMES: Record<SupportedLocale, string>;
|
|
12
|
+
export declare const getLocaleResource: (locale: string) => TranslationKeys;
|
|
13
|
+
export declare const isSupportedLocale: (locale: string) => locale is SupportedLocale;
|
|
14
|
+
export { zhCN, enUS, jaJP, ruRU, zhTW };
|
|
15
|
+
export type { TranslationKeys };
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAG1B,eAAO,MAAM,iBAAiB,wDAMpB,CAAA;AACV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAGhE,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAMpE,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,eAAyB,CAAA;AAGtD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAMxD,CAAA;AAGD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,eAKlD,CAAA;AAGD,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,KACb,MAAM,IAAI,eAEZ,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AACvC,YAAY,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const jaJP: {
|
|
2
|
+
deposit: {
|
|
3
|
+
title: string;
|
|
4
|
+
chain: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
available: string;
|
|
8
|
+
equity: string;
|
|
9
|
+
confirmDeposit: string;
|
|
10
|
+
switchNetwork: string;
|
|
11
|
+
max: string;
|
|
12
|
+
arrivalTime: string;
|
|
13
|
+
ethCrossChainDepositInitiated: string;
|
|
14
|
+
minDeposit: string;
|
|
15
|
+
minDepositParsed: string;
|
|
16
|
+
maxDeposit: string;
|
|
17
|
+
depositTipFor25w: string;
|
|
18
|
+
depositAllTip: string;
|
|
19
|
+
crossChainDepositFeeTip: string;
|
|
20
|
+
enableSystemProWithToken: string;
|
|
21
|
+
enableTokenDesc: string;
|
|
22
|
+
enableWithToken: string;
|
|
23
|
+
arrivaltimeTooltip1: string;
|
|
24
|
+
arrivaltimeTooltip2: string;
|
|
25
|
+
arrivalEstimated: string;
|
|
26
|
+
availableDesc: string;
|
|
27
|
+
noPrivateKeyWalletWarning: string;
|
|
28
|
+
layerZeroDepositTip: string;
|
|
29
|
+
layerZeroDepositTipExceedPool: string;
|
|
30
|
+
layerZeroDepositTipGte200k: string;
|
|
31
|
+
layerZeroDepositButton: string;
|
|
32
|
+
};
|
|
33
|
+
withdraw: {
|
|
34
|
+
noticeDesc: string;
|
|
35
|
+
crossChainTips: string;
|
|
36
|
+
commonWithdraw: string;
|
|
37
|
+
withdraw: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
confirmWithdraw: string;
|
|
40
|
+
speedNote: string;
|
|
41
|
+
speedNoteSpeed1: string;
|
|
42
|
+
speedNoteSpeed2: string;
|
|
43
|
+
speedNoteSpeed3: string;
|
|
44
|
+
receiverAddress: string;
|
|
45
|
+
fee: string;
|
|
46
|
+
feeRate: string;
|
|
47
|
+
withdrawlAmount: string;
|
|
48
|
+
amountToReceive: string;
|
|
49
|
+
minWithdraw: string;
|
|
50
|
+
minWithdrawParsed: string;
|
|
51
|
+
invalidReceiverAddress: string;
|
|
52
|
+
availableDesc: string;
|
|
53
|
+
feeCalculationTip: string;
|
|
54
|
+
crossChainPoolBalance: string;
|
|
55
|
+
poolBalance: string;
|
|
56
|
+
poolBalanceInsufficientTip: string;
|
|
57
|
+
};
|
|
58
|
+
account: {
|
|
59
|
+
title: string;
|
|
60
|
+
perpetual: string;
|
|
61
|
+
spot: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default jaJP;
|
|
65
|
+
//# sourceMappingURL=ja-JP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja-JP.d.ts","sourceRoot":"","sources":["../../src/locales/ja-JP.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFhB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const ruRU: {
|
|
2
|
+
deposit: {
|
|
3
|
+
title: string;
|
|
4
|
+
chain: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
available: string;
|
|
8
|
+
equity: string;
|
|
9
|
+
confirmDeposit: string;
|
|
10
|
+
switchNetwork: string;
|
|
11
|
+
max: string;
|
|
12
|
+
arrivalTime: string;
|
|
13
|
+
ethCrossChainDepositInitiated: string;
|
|
14
|
+
minDeposit: string;
|
|
15
|
+
minDepositParsed: string;
|
|
16
|
+
maxDeposit: string;
|
|
17
|
+
depositTipFor25w: string;
|
|
18
|
+
depositAllTip: string;
|
|
19
|
+
crossChainDepositFeeTip: string;
|
|
20
|
+
enableSystemProWithToken: string;
|
|
21
|
+
enableTokenDesc: string;
|
|
22
|
+
enableWithToken: string;
|
|
23
|
+
arrivaltimeTooltip1: string;
|
|
24
|
+
arrivaltimeTooltip2: string;
|
|
25
|
+
arrivalEstimated: string;
|
|
26
|
+
availableDesc: string;
|
|
27
|
+
noPrivateKeyWalletWarning: string;
|
|
28
|
+
layerZeroDepositTip: string;
|
|
29
|
+
layerZeroDepositTipExceedPool: string;
|
|
30
|
+
layerZeroDepositTipGte200k: string;
|
|
31
|
+
layerZeroDepositButton: string;
|
|
32
|
+
};
|
|
33
|
+
withdraw: {
|
|
34
|
+
noticeDesc: string;
|
|
35
|
+
crossChainTips: string;
|
|
36
|
+
commonWithdraw: string;
|
|
37
|
+
withdraw: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
confirmWithdraw: string;
|
|
40
|
+
speedNote: string;
|
|
41
|
+
speedNoteSpeed1: string;
|
|
42
|
+
speedNoteSpeed2: string;
|
|
43
|
+
speedNoteSpeed3: string;
|
|
44
|
+
receiverAddress: string;
|
|
45
|
+
fee: string;
|
|
46
|
+
feeRate: string;
|
|
47
|
+
withdrawlAmount: string;
|
|
48
|
+
amountToReceive: string;
|
|
49
|
+
minWithdraw: string;
|
|
50
|
+
minWithdrawParsed: string;
|
|
51
|
+
invalidReceiverAddress: string;
|
|
52
|
+
availableDesc: string;
|
|
53
|
+
feeCalculationTip: string;
|
|
54
|
+
crossChainPoolBalance: string;
|
|
55
|
+
poolBalance: string;
|
|
56
|
+
poolBalanceInsufficientTip: string;
|
|
57
|
+
};
|
|
58
|
+
account: {
|
|
59
|
+
title: string;
|
|
60
|
+
perpetual: string;
|
|
61
|
+
spot: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default ruRU;
|
|
65
|
+
//# sourceMappingURL=ru-RU.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru-RU.d.ts","sourceRoot":"","sources":["../../src/locales/ru-RU.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFhB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const zhCN: {
|
|
2
|
+
deposit: {
|
|
3
|
+
title: string;
|
|
4
|
+
chain: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
available: string;
|
|
8
|
+
equity: string;
|
|
9
|
+
confirmDeposit: string;
|
|
10
|
+
switchNetwork: string;
|
|
11
|
+
max: string;
|
|
12
|
+
arrivalTime: string;
|
|
13
|
+
ethCrossChainDepositInitiated: string;
|
|
14
|
+
minDeposit: string;
|
|
15
|
+
minDepositParsed: string;
|
|
16
|
+
maxDeposit: string;
|
|
17
|
+
depositTipFor25w: string;
|
|
18
|
+
depositAllTip: string;
|
|
19
|
+
crossChainDepositFeeTip: string;
|
|
20
|
+
enableSystemProWithToken: string;
|
|
21
|
+
enableTokenDesc: string;
|
|
22
|
+
enableWithToken: string;
|
|
23
|
+
arrivaltimeTooltip1: string;
|
|
24
|
+
arrivaltimeTooltip2: string;
|
|
25
|
+
arrivalEstimated: string;
|
|
26
|
+
availableDesc: string;
|
|
27
|
+
noPrivateKeyWalletWarning: string;
|
|
28
|
+
layerZeroDepositTip: string;
|
|
29
|
+
layerZeroDepositTipExceedPool: string;
|
|
30
|
+
layerZeroDepositTipGte200k: string;
|
|
31
|
+
layerZeroDepositButton: string;
|
|
32
|
+
};
|
|
33
|
+
withdraw: {
|
|
34
|
+
noticeDesc: string;
|
|
35
|
+
crossChainTips: string;
|
|
36
|
+
commonWithdraw: string;
|
|
37
|
+
withdraw: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
confirmWithdraw: string;
|
|
40
|
+
speedNote: string;
|
|
41
|
+
speedNoteSpeed1: string;
|
|
42
|
+
speedNoteSpeed2: string;
|
|
43
|
+
speedNoteSpeed3: string;
|
|
44
|
+
receiverAddress: string;
|
|
45
|
+
fee: string;
|
|
46
|
+
feeRate: string;
|
|
47
|
+
withdrawlAmount: string;
|
|
48
|
+
amountToReceive: string;
|
|
49
|
+
minWithdraw: string;
|
|
50
|
+
minWithdrawParsed: string;
|
|
51
|
+
invalidReceiverAddress: string;
|
|
52
|
+
availableDesc: string;
|
|
53
|
+
feeCalculationTip: string;
|
|
54
|
+
crossChainPoolBalance: string;
|
|
55
|
+
poolBalance: string;
|
|
56
|
+
poolBalanceInsufficientTip: string;
|
|
57
|
+
};
|
|
58
|
+
account: {
|
|
59
|
+
title: string;
|
|
60
|
+
perpetual: string;
|
|
61
|
+
spot: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default zhCN;
|
|
65
|
+
export type TranslationKeys = typeof zhCN;
|
|
66
|
+
//# sourceMappingURL=zh-CN.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EhB,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,MAAM,MAAM,eAAe,GAAG,OAAO,IAAI,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const zhTW: {
|
|
2
|
+
deposit: {
|
|
3
|
+
title: string;
|
|
4
|
+
chain: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
available: string;
|
|
8
|
+
equity: string;
|
|
9
|
+
confirmDeposit: string;
|
|
10
|
+
switchNetwork: string;
|
|
11
|
+
max: string;
|
|
12
|
+
arrivalTime: string;
|
|
13
|
+
ethCrossChainDepositInitiated: string;
|
|
14
|
+
minDeposit: string;
|
|
15
|
+
minDepositParsed: string;
|
|
16
|
+
maxDeposit: string;
|
|
17
|
+
depositTipFor25w: string;
|
|
18
|
+
depositAllTip: string;
|
|
19
|
+
crossChainDepositFeeTip: string;
|
|
20
|
+
enableSystemProWithToken: string;
|
|
21
|
+
enableTokenDesc: string;
|
|
22
|
+
enableWithToken: string;
|
|
23
|
+
arrivaltimeTooltip1: string;
|
|
24
|
+
arrivaltimeTooltip2: string;
|
|
25
|
+
arrivalEstimated: string;
|
|
26
|
+
availableDesc: string;
|
|
27
|
+
noPrivateKeyWalletWarning: string;
|
|
28
|
+
layerZeroDepositTip: string;
|
|
29
|
+
layerZeroDepositTipExceedPool: string;
|
|
30
|
+
layerZeroDepositTipGte200k: string;
|
|
31
|
+
layerZeroDepositButton: string;
|
|
32
|
+
};
|
|
33
|
+
withdraw: {
|
|
34
|
+
noticeDesc: string;
|
|
35
|
+
crossChainTips: string;
|
|
36
|
+
commonWithdraw: string;
|
|
37
|
+
withdraw: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
confirmWithdraw: string;
|
|
40
|
+
speedNote: string;
|
|
41
|
+
speedNoteSpeed1: string;
|
|
42
|
+
speedNoteSpeed2: string;
|
|
43
|
+
speedNoteSpeed3: string;
|
|
44
|
+
receiverAddress: string;
|
|
45
|
+
fee: string;
|
|
46
|
+
feeRate: string;
|
|
47
|
+
withdrawlAmount: string;
|
|
48
|
+
amountToReceive: string;
|
|
49
|
+
minWithdraw: string;
|
|
50
|
+
minWithdrawParsed: string;
|
|
51
|
+
invalidReceiverAddress: string;
|
|
52
|
+
availableDesc: string;
|
|
53
|
+
feeCalculationTip: string;
|
|
54
|
+
crossChainPoolBalance: string;
|
|
55
|
+
poolBalance: string;
|
|
56
|
+
poolBalanceInsufficientTip: string;
|
|
57
|
+
};
|
|
58
|
+
account: {
|
|
59
|
+
title: string;
|
|
60
|
+
perpetual: string;
|
|
61
|
+
spot: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default zhTW;
|
|
65
|
+
//# sourceMappingURL=zh-TW.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EhB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.loading{pointer-events:none;aspect-ratio:1;background-color:currentColor;width:1.5rem;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-md{width:1.5rem}.loading-lg{width:2rem}.loading[aria-label]{position:relative}.loading[aria-label]:focus{outline:2px solid currentColor;outline-offset:2px}.loading.loading-primary{color:#3b82f6}.loading.loading-secondary{color:#6b7280}.loading.loading-success{color:#10b981}.loading.loading-warning{color:#f59e0b}.loading.loading-error{color:#ef4444}.loading.loading-inline{vertical-align:middle;margin:0 .25rem}.loading{will-change:transform;transform:translateZ(0)}@media (prefers-contrast: high){.loading{border:1px solid currentColor}}@media (prefers-reduced-motion: reduce){.loading{animation-duration:3s}}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { SupportedLocale } from '../locales';
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
ENV?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
1
8
|
export interface ComponentConfig {
|
|
2
9
|
theme?: 'light' | 'dark';
|
|
3
|
-
locale?: string;
|
|
10
|
+
locale?: SupportedLocale | string;
|
|
4
11
|
apiBaseUrl?: string;
|
|
5
12
|
debug?: boolean;
|
|
6
13
|
}
|
|
@@ -66,6 +73,7 @@ export interface TokenInfo {
|
|
|
66
73
|
decimals: number;
|
|
67
74
|
iconUrl: string;
|
|
68
75
|
tokenAddress: string;
|
|
76
|
+
contractAddress?: string;
|
|
69
77
|
balance?: {
|
|
70
78
|
formatted: string;
|
|
71
79
|
raw: string;
|
|
@@ -77,6 +85,13 @@ export interface TokenInfo {
|
|
|
77
85
|
minDeposit?: string;
|
|
78
86
|
maxDeposit?: string;
|
|
79
87
|
isActive?: boolean;
|
|
88
|
+
coinId?: string;
|
|
89
|
+
withdrawEnable?: boolean;
|
|
90
|
+
pullOff?: boolean;
|
|
91
|
+
coinName?: string;
|
|
92
|
+
minWithdrawSize?: string;
|
|
93
|
+
minDepositSize?: string;
|
|
94
|
+
withdrawFeeRate?: string;
|
|
80
95
|
}
|
|
81
96
|
export interface ChainInfo {
|
|
82
97
|
chainId: number;
|
|
@@ -85,6 +100,7 @@ export interface ChainInfo {
|
|
|
85
100
|
blockTime: number;
|
|
86
101
|
txConfirm: number;
|
|
87
102
|
allowDeposit: boolean;
|
|
103
|
+
contractAddress?: string;
|
|
88
104
|
tokenList: TokenInfo[];
|
|
89
105
|
rpcUrl?: string;
|
|
90
106
|
explorerUrl?: string;
|
|
@@ -120,4 +136,5 @@ export interface DepositFormData {
|
|
|
120
136
|
selectedTokenAddress: string;
|
|
121
137
|
slippage: number;
|
|
122
138
|
}
|
|
139
|
+
export * from './token';
|
|
123
140
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAC7B;CACF;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAA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IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface Token {
|
|
2
|
+
token: string;
|
|
3
|
+
symbol: string;
|
|
4
|
+
decimals: number;
|
|
5
|
+
iconUrl: string;
|
|
6
|
+
tokenAddress: string;
|
|
7
|
+
contractAddress?: string;
|
|
8
|
+
balance?: {
|
|
9
|
+
formatted: string;
|
|
10
|
+
raw: string;
|
|
11
|
+
};
|
|
12
|
+
allowance?: {
|
|
13
|
+
formatted: string;
|
|
14
|
+
raw: string;
|
|
15
|
+
};
|
|
16
|
+
minDeposit?: string;
|
|
17
|
+
maxDeposit?: string;
|
|
18
|
+
isActive?: boolean;
|
|
19
|
+
coinId?: string;
|
|
20
|
+
withdrawEnable?: boolean;
|
|
21
|
+
pullOff?: boolean;
|
|
22
|
+
coinName?: string;
|
|
23
|
+
chainId?: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,SAAS,CAAC,EAAE;QACV,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,OAAO,CAAC,EAAE,MAAM,CAAA;CAEjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 格式化数字为千分位显示
|
|
3
|
+
* @param value - 要格式化的数字或字符串
|
|
4
|
+
* @param decimals - 保留的小数位数,默认为6位
|
|
5
|
+
* @returns 格式化后的字符串
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* formatThousands(10001.123, 6) // "10,001.123000"
|
|
9
|
+
* formatThousands(10001.1234567, 6) // "10,001.123456"
|
|
10
|
+
* formatThousands("1000000", 2) // "1,000,000.00"
|
|
11
|
+
* formatThousands(0.123456789, 4) // "0.1234"
|
|
12
|
+
*/
|
|
13
|
+
export declare const formatThousands: (value: number | string, decimals?: number) => string;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,MAAM,EACtB,WAAU,MAAU,KACnB,MA8BF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgex-web/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-beta.10",
|
|
4
4
|
"description": "EdgeX Universal UI Components Library - Reusable React components for deposit, withdraw and other common UI patterns",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -47,13 +47,17 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^18.2.0",
|
|
50
|
-
"react-dom": "^18.2.0"
|
|
50
|
+
"react-dom": "^18.2.0",
|
|
51
|
+
"viem": ">=2.18.0 <3",
|
|
52
|
+
"wagmi": ">=2.10.9 <3"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
55
|
+
"@tanstack/react-query": "^5.85.5",
|
|
53
56
|
"@testing-library/jest-dom": "^6.1.5",
|
|
54
57
|
"@testing-library/react": "^14.1.2",
|
|
55
58
|
"@testing-library/user-event": "^14.5.1",
|
|
56
59
|
"@types/react": "^18.2.43",
|
|
60
|
+
"@types/react-copy-to-clipboard": "^5.0.7",
|
|
57
61
|
"@types/react-dom": "^18.2.17",
|
|
58
62
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
59
63
|
"@typescript-eslint/parser": "^6.14.0",
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
"@vitest/coverage-v8": "^1.0.4",
|
|
62
66
|
"@vitest/ui": "^1.0.4",
|
|
63
67
|
"autoprefixer": "^10.4.21",
|
|
68
|
+
"clsx": "^2.0.0",
|
|
64
69
|
"eslint": "^8.55.0",
|
|
65
70
|
"eslint-config-prettier": "^9.1.0",
|
|
66
71
|
"eslint-plugin-react": "^7.33.2",
|
|
@@ -75,19 +80,20 @@
|
|
|
75
80
|
"react-dom": "^18.2.0",
|
|
76
81
|
"tailwindcss": "^3.4.17",
|
|
77
82
|
"typescript": "^5.3.3",
|
|
83
|
+
"viem": "^2.34.0",
|
|
78
84
|
"vite": "^5.0.8",
|
|
79
85
|
"vite-plugin-dts": "^3.6.4",
|
|
80
|
-
"vitest": "^1.0.4"
|
|
86
|
+
"vitest": "^1.0.4",
|
|
87
|
+
"wagmi": "^2.16.4"
|
|
81
88
|
},
|
|
82
89
|
"dependencies": {
|
|
90
|
+
"@floating-ui/react": "^0.27.16",
|
|
83
91
|
"@headlessui/react": "^2.2.7",
|
|
84
92
|
"@heroicons/react": "^2.2.0",
|
|
85
|
-
"
|
|
86
|
-
"clsx": "^2.0.0",
|
|
93
|
+
"bignumber.js": "^9.1.2",
|
|
87
94
|
"lucide-react": "^0.540.0",
|
|
88
95
|
"qrcode.react": "^4.2.0",
|
|
89
|
-
"
|
|
90
|
-
"wagmi": "^2.16.4"
|
|
96
|
+
"react-copy-to-clipboard": "^5.1.0"
|
|
91
97
|
},
|
|
92
98
|
"lint-staged": {
|
|
93
99
|
"*.{ts,tsx}": [
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { WalletHooks } from '../types/wallet-hooks';
|
|
3
|
-
|
|
4
|
-
interface WalletProviderProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
walletHooks?: WalletHooks;
|
|
7
|
-
useMockWallet?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const WalletProvider: React.FC<WalletProviderProps>;
|
|
10
|
-
export declare const useWalletHooks: () => WalletHooks;
|
|
11
|
-
export declare const useWalletAccount: () => import('..').AccountInfo;
|
|
12
|
-
export declare const useWalletBalance: (config?: Parameters<WalletHooks["useBalance"]>[0]) => import('..').BalanceInfo;
|
|
13
|
-
export declare const useWalletConnect: () => import('..').ConnectWalletResult;
|
|
14
|
-
export declare const useWalletWriteContract: () => import('..').WriteContractResult;
|
|
15
|
-
export declare const useWalletSwitchChain: () => import('..').SwitchChainResult;
|
|
16
|
-
export declare const useWalletWaitForTransaction: () => import('..').TransactionWaitResult;
|
|
17
|
-
export declare const useWalletReadContract: (config: Parameters<WalletHooks["useReadContract"]>[0]) => {
|
|
18
|
-
data?: any;
|
|
19
|
-
isLoading: boolean;
|
|
20
|
-
error?: Error;
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=WalletProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/src/WalletProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAE,WAAW,EAAyB,MAAM,uBAAuB,CAAA;AAM1E,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAGD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoBxD,CAAA;AAGD,eAAO,MAAM,cAAc,QAAO,WAWjC,CAAA;AAGD,eAAO,MAAM,gBAAgB,gCAG5B,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,SAAS,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,6BAGjF,CAAA;AAED,eAAO,MAAM,gBAAgB,wCAG5B,CAAA;AAED,eAAO,MAAM,sBAAsB,wCAGlC,CAAA;AAED,eAAO,MAAM,oBAAoB,sCAGhC,CAAA;AAED,eAAO,MAAM,2BAA2B,0CAGvC,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,QAAQ,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;;;;CAG1F,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
interface EVMWalletViewProps {
|
|
4
|
-
depositAmount: string;
|
|
5
|
-
curSelectToken: string;
|
|
6
|
-
curSelectTokenData: any;
|
|
7
|
-
approved: boolean;
|
|
8
|
-
currentActiveChain: any;
|
|
9
|
-
currentEquity: number;
|
|
10
|
-
amount: string;
|
|
11
|
-
decimals: number;
|
|
12
|
-
tokenBalance?: string;
|
|
13
|
-
platformBalance?: string;
|
|
14
|
-
onDepositAmountChange: (amount: string) => void;
|
|
15
|
-
onApprove: () => Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
export declare const EVMWalletView: React.FC<EVMWalletViewProps>;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=WalletView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/evm/WalletView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,GAAG,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,kBAAkB,EAAE,GAAG,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAEhB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0ItD,CAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ChainInfo } from '../../../../types';
|
|
3
|
-
|
|
4
|
-
interface EVMDepositViewProps {
|
|
5
|
-
chains: ChainInfo[];
|
|
6
|
-
defaultChainId?: number;
|
|
7
|
-
defaultTokenAddress?: string;
|
|
8
|
-
defaultAmount?: string;
|
|
9
|
-
walletAdapter: any;
|
|
10
|
-
metadata?: any;
|
|
11
|
-
currentEquity?: number;
|
|
12
|
-
platformBalance?: string;
|
|
13
|
-
wagmiHooks?: {
|
|
14
|
-
useBalance: any;
|
|
15
|
-
useReadContract: any;
|
|
16
|
-
useAccount: any;
|
|
17
|
-
};
|
|
18
|
-
approved?: boolean;
|
|
19
|
-
onApproved?: () => void | Promise<void>;
|
|
20
|
-
onDeposit?: (depositInfo: {
|
|
21
|
-
amount: string;
|
|
22
|
-
chainId: number;
|
|
23
|
-
tokenAddress: string;
|
|
24
|
-
tokenSymbol: string;
|
|
25
|
-
}) => void;
|
|
26
|
-
onClose: () => void;
|
|
27
|
-
onChainChange?: (chainId: number) => void;
|
|
28
|
-
onTokenChange?: (tokenSymbol: string) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const EVMDepositView: React.FC<EVMDepositViewProps>;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAInC,UAAU,mBAAmB;IAC3B,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,aAAa,EAAE,GAAG,CAAA;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IAGxB,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,GAAG,CAAA;QACf,eAAe,EAAE,GAAG,CAAA;QACpB,UAAU,EAAE,GAAG,CAAA;KAChB,CAAA;IAGD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAGvC,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE;QACxB,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;KACpB,KAAK,IAAI,CAAA;IACV,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsRxD,CAAA"}
|