@edgex-web/components 0.1.0-beta.10 → 0.1.0-beta.11

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.
@@ -1,11 +1,5 @@
1
- import { default as React } from 'react';
2
- import { WithdrawConfig } from '../../types';
3
-
4
- interface WithdrawProps {
5
- isOpen: boolean;
6
- onClose: () => void;
7
- config: WithdrawConfig;
8
- }
9
- export declare const Withdraw: React.FC<WithdrawProps>;
10
- export {};
1
+ export { Withdraw } from './src/index';
2
+ export { WithdrawManager, openWithdraw, closeWithdraw, updateWithdrawOptions, useWithdraw, } from './src/WithdrawManager';
3
+ export { EVMWithdrawView } from './src/evm/WalletView';
4
+ export type { WithdrawProps, OpenWithdrawOptions, WithdrawAPI } from './types';
11
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,UAAU,aAAa;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,cAAc,CAAA;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkB5C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { OpenWithdrawOptions, WithdrawAPI } from '../types';
3
+
4
+ export declare const WithdrawManager: React.ForwardRefExoticComponent<React.RefAttributes<WithdrawAPI>>;
5
+ export declare const openWithdraw: (options?: OpenWithdrawOptions) => void;
6
+ export declare const closeWithdraw: () => void;
7
+ export declare const updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
8
+ export declare const isWithdrawOpen: () => boolean;
9
+ export declare const useWithdraw: () => WithdrawAPI;
10
+ //# sourceMappingURL=WithdrawManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithdrawManager.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/WithdrawManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAA;AAEzE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAS3D,eAAO,MAAM,eAAe,mEAwE1B,CAAA;AAKF,eAAO,MAAM,YAAY,GAAI,UAAU,mBAAmB,SAQzD,CAAA;AAED,eAAO,MAAM,aAAa,YAQzB,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,SAAS,OAAO,CAAC,mBAAmB,CAAC,SAStC,CAAA;AAED,eAAO,MAAM,cAAc,eAK1B,CAAA;AAGD,eAAO,MAAM,WAAW,QAAO,WAO9B,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface EVMWithdrawViewProps {
4
+ withdrawAmount: string;
5
+ curSelectToken: string;
6
+ curSelectTokenData: any;
7
+ approved: boolean;
8
+ currentActiveChain: any;
9
+ currentEquity: number;
10
+ amount: string;
11
+ decimals: number;
12
+ platformBalance?: string;
13
+ onWithdrawAmountChange: (amount: string) => void;
14
+ onWithdraw: () => Promise<void>;
15
+ }
16
+ export declare const EVMWithdrawView: React.FC<EVMWithdrawViewProps>;
17
+ export {};
18
+ //# sourceMappingURL=WalletView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/WalletView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,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,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgH1D,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ import { ChainInfo } from '../../types';
3
+
4
+ interface EVMWithdrawViewProps {
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
+ onWithdraw?: (withdrawInfo: {
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 EVMWithdrawView: React.FC<EVMWithdrawViewProps>;
31
+ export {};
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,UAAU,oBAAoB;IAC5B,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,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE;QAC1B,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,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4I1D,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { WithdrawProps } from '../types';
3
+
4
+ export declare const Withdraw: React.FC<WithdrawProps>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAMxC,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyE5C,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { ChainInfo as BaseChainInfo } from '../../../types';
2
+
3
+ export interface ChainInfo extends BaseChainInfo {
4
+ }
5
+ export interface WithdrawProps {
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ chains: ChainInfo[];
9
+ defaultChainId?: number;
10
+ defaultTokenAddress?: string;
11
+ defaultAmount?: string;
12
+ metadata?: {
13
+ multiChain?: {
14
+ minWithdraw: number;
15
+ };
16
+ };
17
+ currentEquity?: number;
18
+ platformBalance?: string;
19
+ wagmiHooks?: {
20
+ useBalance: any;
21
+ useReadContract: any;
22
+ useAccount: any;
23
+ };
24
+ approved?: boolean;
25
+ onApproved?: () => void | Promise<void>;
26
+ onWithdraw?: (withdrawInfo: {
27
+ amount: string;
28
+ chainId: number;
29
+ tokenAddress: string;
30
+ tokenSymbol: string;
31
+ }) => void;
32
+ onChainChange?: (chainId: number) => void;
33
+ onTokenChange?: (tokenSymbol: string) => void;
34
+ }
35
+ export interface OpenWithdrawOptions {
36
+ chains: ChainInfo[];
37
+ defaultChainId?: number;
38
+ defaultTokenAddress?: string;
39
+ defaultAmount?: string;
40
+ metadata?: WithdrawProps['metadata'];
41
+ currentEquity?: number;
42
+ platformBalance?: string;
43
+ wagmiHooks?: WithdrawProps['wagmiHooks'];
44
+ approved?: boolean;
45
+ onApproved?: () => void | Promise<void>;
46
+ onWithdraw?: WithdrawProps['onWithdraw'];
47
+ onChainChange?: (chainId: number) => void;
48
+ onTokenChange?: (tokenSymbol: string) => void;
49
+ onClose?: () => void;
50
+ }
51
+ export interface WithdrawAPI {
52
+ openWithdraw: (options?: OpenWithdrawOptions) => void;
53
+ closeWithdraw: () => void;
54
+ updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
55
+ isOpen: () => boolean;
56
+ }
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE3D,MAAM,WAAW,SAAU,SAAQ,aAAa;CAE/C;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IAGnB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE;YACX,WAAW,EAAE,MAAM,CAAA;SACpB,CAAA;KACF,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,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE;QAC1B,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CA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ositConfig, WithdrawConfig, ComponentConfig, EventCallbacks, }
4
4
  export { Deposit } from './components/Deposit';
5
5
  export { Withdraw } from './components/Withdraw';
6
6
  export { DepositManager, openDeposit, closeDeposit, updateDepositOptions, useDeposit as useDepositManager, } from './components/Deposit/src/DepositManager';
7
+ export { WithdrawManager, openWithdraw, closeWithdraw, updateWithdrawOptions, useWithdraw as useWithdrawManager, } from './components/Withdraw/src/WithdrawManager';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,UAAU,IAAI,iBAAiB,GAChC,MAAM,yCAAyC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,UAAU,IAAI,iBAAiB,GAChC,MAAM,yCAAyC,CAAA;AAGhD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,WAAW,IAAI,kBAAkB,GAClC,MAAM,2CAA2C,CAAA"}