@reef-chain/react-lib 2.6.4 → 3.0.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.
Files changed (66) hide show
  1. package/dist/components/AccountSelector/AccountInlineInfo.d.ts +1 -0
  2. package/dist/components/AccountSelector/AccountSelector.d.ts +1 -0
  3. package/dist/components/AddLiquidity/index.d.ts +1 -0
  4. package/dist/components/EvmBind/EvmBindComponent.d.ts +1 -0
  5. package/dist/components/NFT/index.d.ts +1 -0
  6. package/dist/components/OverlayAction/index.d.ts +2 -1
  7. package/dist/components/Overlays/OverlayNFT.d.ts +3 -1
  8. package/dist/components/Overlays/OverlaySend.d.ts +1 -0
  9. package/dist/components/Overlays/OverlaySendNft.d.ts +3 -1
  10. package/dist/components/Overlays/OverlaySwap.d.ts +1 -0
  11. package/dist/components/PoolActions/ConfirmPopups/Address.d.ts +1 -0
  12. package/dist/components/PoolActions/ConfirmPopups/Bond.d.ts +1 -0
  13. package/dist/components/PoolActions/ConfirmPopups/Provide.d.ts +1 -0
  14. package/dist/components/PoolActions/ConfirmPopups/Send.d.ts +1 -0
  15. package/dist/components/PoolActions/ConfirmPopups/SummaryItem.d.ts +1 -0
  16. package/dist/components/PoolActions/ConfirmPopups/Token.d.ts +1 -0
  17. package/dist/components/PoolActions/ConfirmPopups/Trade.d.ts +1 -0
  18. package/dist/components/PoolActions/ConfirmPopups/Withdraw.d.ts +1 -0
  19. package/dist/components/PoolActions/Finalizing.d.ts +1 -0
  20. package/dist/components/PoolActions/Provide.d.ts +1 -0
  21. package/dist/components/PoolActions/TokenDropdown.d.ts +1 -0
  22. package/dist/components/PoolActions/TokenField.d.ts +1 -0
  23. package/dist/components/PoolActions/Trade.d.ts +1 -0
  24. package/dist/components/PoolActions/UsdAmountField.d.ts +1 -0
  25. package/dist/components/PoolActions/Withdraw.d.ts +1 -0
  26. package/dist/components/RemoveLiquidity/RemoveConfirmationModal.d.ts +1 -0
  27. package/dist/components/RemoveLiquidity/index.d.ts +1 -0
  28. package/dist/components/SelectToken/index.d.ts +1 -0
  29. package/dist/components/SwapComponent/SwapConfirmationModal.d.ts +1 -0
  30. package/dist/components/SwapComponent/index.d.ts +1 -0
  31. package/dist/components/TokenFields/TokenAmountField.d.ts +2 -2
  32. package/dist/components/TokenFields/TokenAmountView.d.ts +1 -0
  33. package/dist/components/Tokens/Skeleton.d.ts +7 -0
  34. package/dist/components/Tokens/TokenCard.d.ts +24 -0
  35. package/dist/components/Tokens/index.d.ts +2 -0
  36. package/dist/components/Transfer/Send.d.ts +1 -0
  37. package/dist/components/Transfer/SendConfirmationModal.d.ts +1 -0
  38. package/dist/components/Transfer/TransferComponent.d.ts +1 -0
  39. package/dist/components/WalletSelector/WalletSelector.d.ts +1 -0
  40. package/dist/components/common/Alert/index.d.ts +1 -1
  41. package/dist/components/common/Button/index.d.ts +5 -5
  42. package/dist/components/common/Card/index.d.ts +3 -3
  43. package/dist/components/common/Display/index.d.ts +12 -12
  44. package/dist/components/common/Dropdown/index.d.ts +2 -2
  45. package/dist/components/common/Icons/index.d.ts +1 -1
  46. package/dist/components/common/Input/index.d.ts +2 -2
  47. package/dist/components/common/Label/index.d.ts +3 -3
  48. package/dist/components/common/List/index.d.ts +2 -2
  49. package/dist/components/common/Loading/index.d.ts +1 -0
  50. package/dist/components/common/Logos/MetaMaskLogo.d.ts +1 -0
  51. package/dist/components/common/Logos/WalletConnectLogo.d.ts +1 -0
  52. package/dist/components/common/Modal/index.d.ts +7 -7
  53. package/dist/components/common/Text/index.d.ts +6 -6
  54. package/dist/components/common/Tooltip/index.d.ts +1 -1
  55. package/dist/components/index.d.ts +1 -0
  56. package/dist/index.css +1 -1
  57. package/dist/index.css.map +1 -1
  58. package/dist/index.js +4 -4
  59. package/dist/index.js.map +1 -1
  60. package/dist/index.modern.js +4 -4
  61. package/dist/index.modern.js.map +1 -1
  62. package/dist/l10n/l10n.d.ts +176 -0
  63. package/dist/utils/displayBalance.d.ts +4 -0
  64. package/dist/utils/tokenUtil.d.ts +0 -1
  65. package/dist/utils/utils.d.ts +3 -0
  66. package/package.json +10 -10
@@ -0,0 +1,176 @@
1
+ /// <reference types="react-localization" />
2
+ export declare const localizedStrings: import("react-localization").LocalizedStrings<{
3
+ bonds: string;
4
+ can_not_retrieve: string;
5
+ fiat_validity_error: string;
6
+ error_occured_while_authorizing: string;
7
+ error_occured_while_creating_a_trade: string;
8
+ buy_reef_tokens: string;
9
+ get_reef_tokens: string;
10
+ confirm_your_token: string;
11
+ create_token: string;
12
+ token_name: string;
13
+ token_symbol: string;
14
+ initial_supply: string;
15
+ burnable: string;
16
+ mintable: string;
17
+ token_logo: string;
18
+ logo: string;
19
+ view_in_explorer: string;
20
+ create_a_pool: string;
21
+ error_creating_token: string;
22
+ return_to_creator: string;
23
+ token_preview: string;
24
+ create_own_token: string;
25
+ create_your_token: string;
26
+ deploying_token: string;
27
+ sending_token_contract: string;
28
+ deploying_contract_failed: string;
29
+ verifying_deployed_token: string;
30
+ smart_contract_bytecode_validated: string;
31
+ token_created: string;
32
+ existing_tokens: string;
33
+ be_destroyed: string;
34
+ new_tokens: string;
35
+ be_created: string;
36
+ my_token: string;
37
+ token_icon: string;
38
+ open_explorer: string;
39
+ no_bonds_available: string;
40
+ no_pool_data: string;
41
+ create_your_account: string;
42
+ use_reef_chain_extension: string;
43
+ app_uses_browser_extension: string;
44
+ please_install_extension: string;
45
+ this_browser_extension: string;
46
+ download_for_chrome: string;
47
+ download_for_firefox: string;
48
+ open_source: string;
49
+ github: string;
50
+ create_pool: string;
51
+ tradingview_lightweight: string;
52
+ select_pool: string;
53
+ transactions: string;
54
+ show_transactions: string;
55
+ type: string;
56
+ amount: string;
57
+ account: string;
58
+ time: string;
59
+ total_supply: string;
60
+ pools: string;
61
+ pair: string;
62
+ tvl: string;
63
+ vol: string;
64
+ vol_percentage: string;
65
+ stake: string;
66
+ unstake: string;
67
+ search: string;
68
+ yes: string;
69
+ no: string;
70
+ not: string;
71
+ can: string;
72
+ generated: string;
73
+ custom: string;
74
+ token_symbol_name: string;
75
+ activity: string;
76
+ no_recent_transfer: string;
77
+ sent: string;
78
+ received: string;
79
+ send: string;
80
+ swap: string;
81
+ create_token_db: string;
82
+ tokens_pill: string;
83
+ nfts: string;
84
+ dashboard: string;
85
+ creator: string;
86
+ balance: string;
87
+ get_nfts_on_sqwid: string;
88
+ does_not_hold: string;
89
+ } | {
90
+ bonds: string;
91
+ can_not_retrieve: string;
92
+ fiat_validity_error: string;
93
+ error_occured_while_authorizing: string;
94
+ error_occured_while_creating_a_trade: string;
95
+ buy_reef_tokens: string;
96
+ get_reef_tokens: string;
97
+ confirm_your_token: string;
98
+ create_token: string;
99
+ token_name: string;
100
+ token_symbol: string;
101
+ initial_supply: string;
102
+ burnable: string;
103
+ mintable: string;
104
+ token_logo: string;
105
+ logo: string;
106
+ view_in_explorer: string;
107
+ create_a_pool: string;
108
+ error_creating_token: string;
109
+ return_to_creator: string;
110
+ token_preview: string;
111
+ create_own_token: string;
112
+ create_your_token: string;
113
+ deploying_token: string;
114
+ sending_token_contract: string;
115
+ deploying_contract_failed: string;
116
+ verifying_deployed_token: string;
117
+ smart_contract_bytecode_validated: string;
118
+ token_created: string;
119
+ existing_tokens: string;
120
+ be_destroyed: string;
121
+ new_tokens: string;
122
+ be_created: string;
123
+ my_token: string;
124
+ token_icon: string;
125
+ open_explorer: string;
126
+ no_bonds_available: string;
127
+ no_pool_data: string;
128
+ create_your_account: string;
129
+ use_reef_chain_extension: string;
130
+ app_uses_browser_extension: string;
131
+ please_install_extension: string;
132
+ this_browser_extension: string;
133
+ download_for_chrome: string;
134
+ download_for_firefox: string;
135
+ open_source: string;
136
+ github: string;
137
+ create_pool: string;
138
+ tradingview_lightweight: string;
139
+ select_pool: string;
140
+ transactions: string;
141
+ show_transactions: string;
142
+ type: string;
143
+ amount: string;
144
+ account: string;
145
+ time: string;
146
+ total_supply: string;
147
+ pools: string;
148
+ pair: string;
149
+ tvl: string;
150
+ vol: string;
151
+ vol_percentage: string;
152
+ stake: string;
153
+ unstake: string;
154
+ search: string;
155
+ yes: string;
156
+ no: string;
157
+ not: string;
158
+ can: string;
159
+ generated: string;
160
+ custom: string;
161
+ token_symbol_name: string;
162
+ activity: string;
163
+ no_recent_transfer: string;
164
+ sent: string;
165
+ received: string;
166
+ send: string;
167
+ swap: string;
168
+ create_token_db: string;
169
+ tokens_pill: string;
170
+ nfts: string;
171
+ dashboard: string;
172
+ creator: string;
173
+ balance: string;
174
+ get_nfts_on_sqwid: string;
175
+ does_not_hold: string;
176
+ }>;
@@ -0,0 +1,4 @@
1
+ import { Token } from '@reef-chain/util-lib/dist/dts/token';
2
+ export declare const formatHumanAmount: (value?: string) => string;
3
+ export declare const displayBalance: (value: string | number) => string;
4
+ export declare const displayBalanceFromToken: (token: Token) => string;
@@ -8,5 +8,4 @@ export declare const calculateBalanceValue: ({ price, balance, }: {
8
8
  price: DataWithProgress<number>;
9
9
  balance: BigNumber;
10
10
  } | TokenWithAmount) => DataWithProgress<number>;
11
- export declare const toCurrencyFormat: (value: number, options?: {}) => string;
12
11
  export declare const normalize: (amount: string | number, decimals: number) => BN;
@@ -1,5 +1,8 @@
1
1
  import { BigNumber } from 'ethers';
2
+ import { Notify } from '../state';
2
3
  export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
4
+ export declare const notify: (message: string, type?: Notify) => void;
5
+ export declare const toCurrencyFormat: (value: number, options?: Intl.NumberFormatOptions) => string;
3
6
  export declare const REEF_ADDRESS = "0x0000000000000000000000000000000001000000";
4
7
  export declare const EMPTY_ADDRESS = "0x";
5
8
  export declare const REEF_ADDRESS_SPECIFIC_STRING = "(ONLY for Reef chain!)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-chain/react-lib",
3
- "version": "2.6.4",
3
+ "version": "3.0.0",
4
4
  "description": "Reef React Library",
5
5
  "author": "Reef chain",
6
6
  "license": "MIT",
@@ -14,7 +14,8 @@
14
14
  "scripts": {
15
15
  "mb": "microbundle --jsx 'React.createElement' --jsxImportSource react --globals react/jsx-runtime=jsx --format modern,cjs",
16
16
  "build": "yarn run mb",
17
- "build:clean": "rm -rf node_modules&&rm -f yarn.lock&&yarn install&&yarn build",
17
+ "clean": "rm -rf node_modules&&rm -f yarn.lock&&yarn install",
18
+ "build:clean": "yarn clean&&yarn build",
18
19
  "start": "yarn run mb watch --no-compress",
19
20
  "prepare": "run-s build",
20
21
  "test": "run-s test:unit test:lint test:build",
@@ -31,7 +32,7 @@
31
32
  "@fortawesome/react-fontawesome": "^0.2.0",
32
33
  "@polkadot/react-identicon": "^3.6.6",
33
34
  "@reef-chain/evm-provider": "^2.0.3",
34
- "@reef-chain/ui-kit": "^2.0.7",
35
+ "@reef-chain/ui-kit": "^3.0.0",
35
36
  "@reef-chain/util-lib": "^2.5.7",
36
37
  "@types/react-router-dom": "^5.3.0",
37
38
  "axios": "^1.6.5",
@@ -43,16 +44,15 @@
43
44
  "process": "^0.11.10",
44
45
  "react-copy-to-clipboard": "^5.0.4",
45
46
  "react-router-dom": "^5.3.0",
47
+ "react-toastify": "^10.0.5",
46
48
  "react-tooltip": "^4.2.21",
47
49
  "rxjs": "^7.5.4"
48
50
  },
49
51
  "resolutions": {
50
- "@types/react": "17.0.2",
51
- "@types/react-dom": "17.0.2",
52
52
  "ethers": "^5.7.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "react": "^17.0.2"
55
+ "react": "^18.2.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/jest-dom": "^4.2.4",
@@ -61,9 +61,9 @@
61
61
  "@types/bootstrap": "^5.1.12",
62
62
  "@types/jest": "^25.1.4",
63
63
  "@types/node": "^12.12.38",
64
- "@types/react": "^17.0.2",
64
+ "@types/react": "^18.2.45",
65
65
  "@types/react-copy-to-clipboard": "^5.0.1",
66
- "@types/react-dom": "^17.0.2",
66
+ "@types/react-dom": "^18.2.18",
67
67
  "@types/react-tooltip": "^4.2.4",
68
68
  "@types/validator": "^13.1.0",
69
69
  "@typescript-eslint/eslint-plugin": "^6.11.0",
@@ -74,8 +74,8 @@
74
74
  "eslint-config-airbnb": "^18.2.1",
75
75
  "eslint-plugin-import": "^2.23.4",
76
76
  "eslint-plugin-jsx-a11y": "^6.4.1",
77
- "eslint-plugin-react": "^7.24.0",
78
- "eslint-plugin-react-hooks": "^4.2.0",
77
+ "eslint-plugin-react": "^7.33.2",
78
+ "eslint-plugin-react-hooks": "^4.6.0",
79
79
  "gh-pages": "^2.2.0",
80
80
  "microbundle": "^0.14.2",
81
81
  "npm-run-all": "^4.1.5",