@rainlanguage/ui-components 0.0.1-alpha.22 → 0.0.1-alpha.221
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/__fixtures__/settings.yaml +125 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte +4 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte.d.ts +18 -0
- package/dist/__mocks__/MockComponent.svelte +4 -0
- package/dist/__mocks__/MockComponent.svelte.d.ts +3 -1
- package/dist/__mocks__/stores.d.ts +53 -43
- package/dist/__mocks__/stores.js +66 -49
- package/dist/components/ButtonLoading.svelte +1 -1
- package/dist/components/ButtonVaultLink.svelte +11 -11
- package/dist/components/ButtonVaultLink.svelte.d.ts +4 -3
- package/dist/components/CheckboxInactiveOrdersVault.svelte +20 -0
- package/dist/components/CheckboxInactiveOrdersVault.svelte.d.ts +19 -0
- package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
- package/dist/components/CodeMirrorDotrain.svelte +4 -0
- package/dist/components/CodeMirrorDotrain.svelte.d.ts +1 -0
- package/dist/components/CodeMirrorRainlang.svelte +3 -12
- package/dist/components/CodeMirrorRainlang.svelte.d.ts +2 -2
- package/dist/components/EditableSpan.svelte +3 -14
- package/dist/components/EditableSpan.svelte.d.ts +0 -1
- package/dist/components/Hash.svelte +3 -3
- package/dist/components/License.svelte +5 -4
- package/dist/components/ListViewOrderbookFilters.svelte +39 -33
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +26 -22
- package/dist/components/LocalDbStatusBadge.svelte +27 -0
- package/dist/components/LocalDbStatusBadge.svelte.d.ts +19 -0
- package/dist/components/LocalDbStatusCard.svelte +40 -0
- package/dist/components/LocalDbStatusCard.svelte.d.ts +20 -0
- package/dist/components/LocalDbStatusModal.svelte +103 -0
- package/dist/components/LocalDbStatusModal.svelte.d.ts +21 -0
- package/dist/components/OrderOrVaultHash.svelte +12 -12
- package/dist/components/OrderOrVaultHash.svelte.d.ts +4 -4
- package/dist/components/PageHeader.svelte +1 -1
- package/dist/components/TanstackAppTable.svelte +179 -28
- package/dist/components/TanstackAppTable.svelte.d.ts +14 -8
- package/dist/components/ToastDetail.svelte +42 -0
- package/dist/components/ToastDetail.svelte.d.ts +20 -0
- package/dist/components/Tooltip.svelte +8 -0
- package/dist/components/Tooltip.svelte.d.ts +21 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte +23 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte.d.ts +19 -0
- package/dist/components/VaultCard.svelte +18 -0
- package/dist/components/VaultCard.svelte.d.ts +19 -0
- package/dist/components/charts/LightweightChart.svelte +1 -1
- package/dist/components/charts/LightweightChart.svelte.d.ts +5 -5
- package/dist/components/charts/OrderTradesChart.svelte +300 -28
- package/dist/components/charts/OrderTradesChart.svelte.d.ts +4 -4
- package/dist/components/charts/TanstackLightweightChartLine.svelte +5 -9
- package/dist/components/charts/VaultBalanceChart.svelte +8 -26
- package/dist/components/charts/VaultBalanceChart.svelte.d.ts +1 -7
- package/dist/components/charts/transformAndSortData.d.ts +24 -0
- package/dist/components/charts/transformAndSortData.js +111 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +11 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +19 -0
- package/dist/components/deployment/ButtonSelectOption.svelte +2 -0
- package/dist/components/deployment/ButtonSelectOption.svelte.d.ts +1 -0
- package/dist/components/deployment/ComposedRainlangModal.svelte +2 -1
- package/dist/components/deployment/ComposedRainlangModal.svelte.d.ts +1 -4
- package/dist/components/deployment/DeploymentSectionHeader.svelte +7 -4
- package/dist/components/deployment/DeploymentSteps.svelte +209 -216
- package/dist/components/deployment/DeploymentSteps.svelte.d.ts +6 -12
- package/dist/components/deployment/DeploymentTile.svelte +2 -2
- package/dist/components/deployment/DeploymentTile.svelte.d.ts +1 -1
- package/dist/components/deployment/DeploymentsSection.svelte +15 -22
- package/dist/components/deployment/DeploymentsSection.svelte.d.ts +3 -2
- package/dist/components/deployment/DepositInput.svelte +8 -10
- package/dist/components/deployment/DepositInput.svelte.d.ts +1 -2
- package/dist/components/deployment/DisclaimerModal.svelte +6 -7
- package/dist/components/deployment/FieldDefinitionInput.svelte +7 -11
- package/dist/components/deployment/FieldDefinitionInput.svelte.d.ts +1 -2
- package/dist/components/deployment/InvalidOrdersSection.svelte +17 -0
- package/dist/components/deployment/InvalidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/{StrategyPage.svelte → OrderPage.svelte} +15 -24
- package/dist/components/deployment/OrderPage.svelte.d.ts +21 -0
- package/dist/components/deployment/SelectToken.svelte +125 -48
- package/dist/components/deployment/SelectToken.svelte.d.ts +4 -3
- package/dist/components/deployment/TokenBalance.svelte +19 -0
- package/dist/components/deployment/TokenBalance.svelte.d.ts +19 -0
- package/dist/components/deployment/TokenIOInput.svelte +25 -15
- package/dist/components/deployment/TokenIOInput.svelte.d.ts +3 -3
- package/dist/components/deployment/TokenSelectionModal.svelte +148 -0
- package/dist/components/deployment/TokenSelectionModal.svelte.d.ts +20 -0
- package/dist/components/deployment/{ValidStrategiesSection.svelte → ValidOrdersSection.svelte} +7 -7
- package/dist/components/deployment/ValidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/VaultIdInformation.svelte +17 -0
- package/dist/components/deployment/VaultIdInformation.svelte.d.ts +21 -0
- package/dist/components/detail/OrderDetail.svelte +184 -80
- package/dist/components/detail/OrderDetail.svelte.d.ts +21 -15
- package/dist/components/detail/TanstackOrderQuote.svelte +92 -46
- package/dist/components/detail/TanstackOrderQuote.svelte.d.ts +14 -16
- package/dist/components/detail/VaultDetail.svelte +78 -77
- package/dist/components/detail/VaultDetail.svelte.d.ts +12 -18
- package/dist/components/dropdown/DropdownActiveNetworks.svelte +44 -0
- package/dist/components/dropdown/DropdownActiveNetworks.svelte.d.ts +19 -0
- package/dist/components/dropdown/DropdownCheckbox.svelte +4 -4
- package/dist/components/dropdown/DropdownOrderbooksFilter.svelte +172 -0
- package/dist/components/dropdown/DropdownOrderbooksFilter.svelte.d.ts +25 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte +152 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
- package/dist/components/icon/Refresh.svelte +2 -1
- package/dist/components/icon/Refresh.svelte.d.ts +1 -0
- package/dist/components/input/InputOrderHash.svelte +1 -1
- package/dist/components/input/InputOrderHash.svelte.d.ts +3 -3
- package/dist/components/input/InputOwnerFilter.svelte +48 -0
- package/dist/components/input/InputOwnerFilter.svelte.d.ts +19 -0
- package/dist/components/input/InputRegistryUrl.svelte +36 -14
- package/dist/components/input/InputToken.svelte +2 -2
- package/dist/components/input/InputTokenAmount.svelte +16 -21
- package/dist/components/input/InputTokenAmount.svelte.d.ts +3 -3
- package/dist/components/tables/OrderAPY.svelte +6 -33
- package/dist/components/tables/OrderAPY.svelte.d.ts +1 -4
- package/dist/components/tables/OrderTradesListTable.svelte +84 -81
- package/dist/components/tables/OrderTradesListTable.svelte.d.ts +4 -4
- package/dist/components/tables/OrderVaultsVolTable.svelte +17 -22
- package/dist/components/tables/OrderVaultsVolTable.svelte.d.ts +2 -2
- package/dist/components/tables/OrdersListTable.svelte +204 -113
- package/dist/components/tables/OrdersListTable.svelte.d.ts +18 -23
- package/dist/components/tables/VaultBalanceChangesTable.svelte +83 -43
- package/dist/components/tables/VaultBalanceChangesTable.svelte.d.ts +13 -11
- package/dist/components/tables/VaultsListTable.svelte +270 -148
- package/dist/components/tables/VaultsListTable.svelte.d.ts +24 -33
- package/dist/components/transactions/FixedBottomTransaction.svelte +63 -0
- package/dist/components/transactions/FixedBottomTransaction.svelte.d.ts +16 -0
- package/dist/components/transactions/TransactionDetail.svelte +31 -0
- package/dist/components/transactions/TransactionDetail.svelte.d.ts +20 -0
- package/dist/components/transactions/TransactionList.svelte +17 -0
- package/dist/components/transactions/TransactionList.svelte.d.ts +16 -0
- package/dist/components/transactions/getStatusEmoji.d.ts +2 -0
- package/dist/components/transactions/getStatusEmoji.js +20 -0
- package/dist/components/wallet/WalletConnect.svelte +5 -4
- package/dist/components/wallet/WalletConnect.svelte.d.ts +0 -1
- package/dist/consts.d.ts +1 -0
- package/dist/consts.js +1 -0
- package/dist/errors/DeploymentStepsError.d.ts +8 -2
- package/dist/errors/DeploymentStepsError.js +7 -1
- package/dist/hooks/useGui.d.ts +1 -1
- package/dist/hooks/useGui.js +1 -1
- package/dist/hooks/useLocalDb.d.ts +3 -0
- package/dist/hooks/useLocalDb.js +10 -0
- package/dist/hooks/useRaindexClient.d.ts +3 -0
- package/dist/hooks/useRaindexClient.js +11 -0
- package/dist/index.d.ts +43 -20
- package/dist/index.js +42 -17
- package/dist/models/Transaction.d.ts +75 -0
- package/dist/models/Transaction.js +100 -0
- package/dist/providers/GuiProvider.svelte +1 -1
- package/dist/providers/GuiProvider.svelte.d.ts +1 -1
- package/dist/providers/LocalDbProvider.svelte +8 -0
- package/dist/providers/LocalDbProvider.svelte.d.ts +21 -0
- package/dist/providers/RaindexClientProvider.svelte +8 -0
- package/dist/providers/RaindexClientProvider.svelte.d.ts +21 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte +8 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte.d.ts +24 -0
- package/dist/providers/dotrainRegistry/context.d.ts +9 -0
- package/dist/providers/dotrainRegistry/context.js +40 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.d.ts +5 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.js +35 -0
- package/dist/providers/registry/RegistryManager.d.ts +65 -0
- package/dist/providers/registry/RegistryManager.js +133 -0
- package/dist/providers/registry/RegistryProvider.svelte +6 -0
- package/dist/providers/registry/RegistryProvider.svelte.d.ts +21 -0
- package/dist/providers/registry/context.d.ts +10 -0
- package/dist/providers/registry/context.js +46 -0
- package/dist/providers/registry/useRegistry.d.ts +7 -0
- package/dist/providers/registry/useRegistry.js +29 -0
- package/dist/providers/toasts/ToastProvider.svelte +17 -0
- package/dist/providers/toasts/ToastProvider.svelte.d.ts +18 -0
- package/dist/providers/toasts/context.d.ts +14 -0
- package/dist/providers/toasts/context.js +22 -0
- package/dist/providers/toasts/useToasts.d.ts +16 -0
- package/dist/providers/toasts/useToasts.js +63 -0
- package/dist/providers/transactions/TransactionManager.d.ts +235 -0
- package/dist/providers/transactions/TransactionManager.js +509 -0
- package/dist/providers/transactions/TransactionProvider.svelte +11 -0
- package/dist/providers/transactions/TransactionProvider.svelte.d.ts +24 -0
- package/dist/providers/transactions/context.d.ts +19 -0
- package/dist/providers/transactions/context.js +28 -0
- package/dist/providers/transactions/useTransactions.d.ts +13 -0
- package/dist/providers/transactions/useTransactions.js +18 -0
- package/dist/providers/wallet/WalletProvider.svelte +7 -0
- package/dist/providers/wallet/WalletProvider.svelte.d.ts +21 -0
- package/dist/providers/wallet/context.d.ts +10 -0
- package/dist/providers/wallet/context.js +47 -0
- package/dist/providers/wallet/useAccount.d.ts +8 -0
- package/dist/providers/wallet/useAccount.js +148 -0
- package/dist/queries/keys.d.ts +1 -0
- package/dist/queries/keys.js +1 -0
- package/dist/queries/queryClient.d.ts +1 -1
- package/dist/queries/queryClient.js +11 -6
- package/dist/services/awaitTransactionIndexing.d.ts +107 -0
- package/dist/services/awaitTransactionIndexing.js +58 -0
- package/dist/services/getExplorerLink.d.ts +1 -1
- package/dist/services/getExplorerLink.js +2 -4
- package/dist/services/handleShareChoices.d.ts +2 -2
- package/dist/services/handleShareChoices.js +7 -2
- package/dist/services/historicalOrderCharts.d.ts +2 -2
- package/dist/services/historicalOrderCharts.js +267 -333
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.js +2 -1
- package/dist/services/loadRegistryUrl.d.ts +2 -0
- package/dist/services/loadRegistryUrl.js +22 -0
- package/dist/services/pairTradesChartData.d.ts +47 -0
- package/dist/services/pairTradesChartData.js +190 -0
- package/dist/services/registry.d.ts +5 -5
- package/dist/services/registry.js +8 -208
- package/dist/services/time.d.ts +12 -0
- package/dist/services/time.js +88 -6
- package/dist/storesGeneric/cachedWritableStore.d.ts +57 -0
- package/dist/storesGeneric/cachedWritableStore.js +93 -0
- package/dist/types/account.d.ts +3 -0
- package/dist/types/appStores.d.ts +9 -16
- package/dist/types/modal.d.ts +26 -14
- package/dist/types/{strategy.d.ts → order.d.ts} +3 -3
- package/dist/types/order.js +1 -0
- package/dist/types/toast.d.ts +11 -0
- package/dist/types/toast.js +1 -0
- package/dist/types/tokenBalance.d.ts +6 -0
- package/dist/types/tokenBalance.js +1 -0
- package/dist/types/transaction.d.ts +66 -21
- package/dist/types/transaction.js +31 -1
- package/dist/utils/configHelpers.d.ts +4 -0
- package/dist/utils/configHelpers.js +21 -0
- package/dist/utils/constructHashLink.d.ts +24 -0
- package/dist/utils/constructHashLink.js +115 -0
- package/dist/utils/getNetworkName.d.ts +1 -0
- package/dist/utils/getNetworkName.js +13 -0
- package/dist/utils/number.d.ts +0 -7
- package/dist/utils/number.js +0 -27
- package/dist/utils/tokens.d.ts +2 -0
- package/dist/utils/tokens.js +3 -0
- package/dist/utils/vaultBalanceChangeLabels.d.ts +4 -0
- package/dist/utils/vaultBalanceChangeLabels.js +18 -0
- package/package.json +39 -34
- package/dist/__fixtures__/orderDetail.d.ts +0 -99
- package/dist/__fixtures__/orderDetail.js +0 -204
- package/dist/__fixtures__/settings-12-11-24.json +0 -160
- package/dist/__mocks__/mockTransactionStore.d.ts +0 -22
- package/dist/__mocks__/mockTransactionStore.js +0 -56
- package/dist/__mocks__/settings.d.ts +0 -3
- package/dist/__mocks__/settings.js +0 -37
- package/dist/components/CheckboxMyItemsOnly.svelte +0 -23
- package/dist/components/CheckboxMyItemsOnly.svelte.d.ts +0 -21
- package/dist/components/deployment/InvalidStrategiesSection.svelte +0 -19
- package/dist/components/deployment/InvalidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/StrategyPage.svelte.d.ts +0 -19
- package/dist/components/deployment/ValidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/getDeploymentTransactionArgs.d.ts +0 -17
- package/dist/components/deployment/getDeploymentTransactionArgs.js +0 -28
- package/dist/components/detail/DepositOrWithdrawButtons.svelte +0 -44
- package/dist/components/detail/DepositOrWithdrawButtons.svelte.d.ts +0 -26
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte +0 -38
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +0 -21
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte +0 -15
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +0 -20
- package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
- package/dist/components/dropdown/DropdownOrderStatus.svelte.d.ts +0 -19
- package/dist/stores/transactionStore.d.ts +0 -98
- package/dist/stores/transactionStore.js +0 -303
- package/dist/utils/time.d.ts +0 -12
- package/dist/utils/time.js +0 -27
- package/dist/utils/vault.d.ts +0 -2
- package/dist/utils/vault.js +0 -29
- /package/dist/types/{strategy.js → account.js} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
networks:
|
|
3
|
+
flare:
|
|
4
|
+
rpc: https://rpc.ankr.com/flare
|
|
5
|
+
chain-id: 14
|
|
6
|
+
currency: FLR
|
|
7
|
+
base:
|
|
8
|
+
rpc: https://mainnet.base.org
|
|
9
|
+
chain-id: 8453
|
|
10
|
+
currency: ETH
|
|
11
|
+
sepolia:
|
|
12
|
+
rpc: https://1rpc.io/sepolia
|
|
13
|
+
chain-id: 11155111
|
|
14
|
+
currency: ETH
|
|
15
|
+
polygon:
|
|
16
|
+
rpc: https://rpc.ankr.com/polygon
|
|
17
|
+
chain-id: 137
|
|
18
|
+
currency: POL
|
|
19
|
+
arbitrum:
|
|
20
|
+
rpc: https://rpc.ankr.com/arbitrum
|
|
21
|
+
chain-id: 42161
|
|
22
|
+
currency: ETH
|
|
23
|
+
matchain:
|
|
24
|
+
rpc: https://rpc.ankr.com/polygon
|
|
25
|
+
chain-id: 137
|
|
26
|
+
currency: POL
|
|
27
|
+
bsc:
|
|
28
|
+
rpc: https://rpc.ankr.com/bsc
|
|
29
|
+
chain-id: 56
|
|
30
|
+
currency: BNB
|
|
31
|
+
linea:
|
|
32
|
+
rpc: https://rpc.linea.build
|
|
33
|
+
chain-id: 59144
|
|
34
|
+
currency: ETH
|
|
35
|
+
ethereum:
|
|
36
|
+
rpc: https://rpc.ankr.com/eth
|
|
37
|
+
chain-id: 1
|
|
38
|
+
currency: ETH
|
|
39
|
+
subgraphs:
|
|
40
|
+
flare: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-flare/0.8/gn
|
|
41
|
+
base: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-base/0.9/gn
|
|
42
|
+
sepolia: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-sepolia/0.1/gn
|
|
43
|
+
polygon: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-polygon/0.1/gn
|
|
44
|
+
arbitrum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-arbitrum/0.2/gn
|
|
45
|
+
matchain: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-polygon/0.1/gn
|
|
46
|
+
bsc: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-bsc/2024-10-14-63f4/gn
|
|
47
|
+
linea: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-linea/2024-10-14-12fc/gn
|
|
48
|
+
ethereum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/metadata-mainnet/2024-10-25-2857/gn
|
|
49
|
+
metaboards:
|
|
50
|
+
flare: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-flare-0x893BBFB7/0.1/gn
|
|
51
|
+
base: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-base-0x59401C93/0.1/gn
|
|
52
|
+
sepolia: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-sepolia-0x77991674/0.1/gn
|
|
53
|
+
polygon: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-polygon/0.1/gn
|
|
54
|
+
arbitrum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-arbitrum/0.1/gn
|
|
55
|
+
matchain: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-polygon/0.1/gn
|
|
56
|
+
bsc: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-bsc/0.1/gn
|
|
57
|
+
linea: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-linea-0xed7d6156/1.0.0/gn
|
|
58
|
+
ethereum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/metadata-mainnet/2024-10-25-2857/gn
|
|
59
|
+
orderbooks:
|
|
60
|
+
flare:
|
|
61
|
+
address: 0xCEe8Cd002F151A536394E564b84076c41bBBcD4d
|
|
62
|
+
network: flare
|
|
63
|
+
subgraph: flare
|
|
64
|
+
base:
|
|
65
|
+
address: 0xd2938e7c9fe3597f78832ce780feb61945c377d7
|
|
66
|
+
network: base
|
|
67
|
+
subgraph: base
|
|
68
|
+
sepolia:
|
|
69
|
+
address: 0x0bB72B4C7c0d47b2CaED07c804D9243C1B8a0728
|
|
70
|
+
network: sepolia
|
|
71
|
+
subgraph: sepolia
|
|
72
|
+
polygon:
|
|
73
|
+
address: 0x7D2f700b1f6FD75734824EA4578960747bdF269A
|
|
74
|
+
network: polygon
|
|
75
|
+
subgraph: polygon
|
|
76
|
+
arbitrum:
|
|
77
|
+
address: 0x550878091b2B1506069F61ae59e3A5484Bca9166
|
|
78
|
+
network: arbitrum
|
|
79
|
+
subgraph: arbitrum
|
|
80
|
+
matchain:
|
|
81
|
+
address: 0x40312edab8fe65091354172ad79e9459f21094e2
|
|
82
|
+
network: matchain
|
|
83
|
+
subgraph: matchain
|
|
84
|
+
bsc:
|
|
85
|
+
address: 0xd2938E7c9fe3597F78832CE780Feb61945c377d7
|
|
86
|
+
network: bsc
|
|
87
|
+
subgraph: bsc
|
|
88
|
+
linea:
|
|
89
|
+
address: 0x22410e2a46261a1B1e3899a072f303022801C764
|
|
90
|
+
network: linea
|
|
91
|
+
subgraph: linea
|
|
92
|
+
ethereum:
|
|
93
|
+
address: 0x0eA6d458488d1cf51695e1D6e4744e6FB715d37C
|
|
94
|
+
network: ethereum
|
|
95
|
+
subgraph: ethereum
|
|
96
|
+
deployers:
|
|
97
|
+
flare:
|
|
98
|
+
address: 0xE3989Ea7486c0F418C764e6c511e86f6E8830FAb
|
|
99
|
+
network: flare
|
|
100
|
+
base:
|
|
101
|
+
address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
|
|
102
|
+
network: base
|
|
103
|
+
sepolia:
|
|
104
|
+
address: 0x7692BA8446Bb8B3140A2c02df073080BeD0a7F8E
|
|
105
|
+
network: sepolia
|
|
106
|
+
polygon:
|
|
107
|
+
address: 0xE7116BC05C8afe25e5B54b813A74F916B5D42aB1
|
|
108
|
+
network: polygon
|
|
109
|
+
arbitrum:
|
|
110
|
+
address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
|
|
111
|
+
network: arbitrum
|
|
112
|
+
matchain:
|
|
113
|
+
address: 0x582d9e838FE6cD9F8147C66A8f56A3FBE513a6A2
|
|
114
|
+
network: matchain
|
|
115
|
+
bsc:
|
|
116
|
+
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
|
|
117
|
+
network: bsc
|
|
118
|
+
linea:
|
|
119
|
+
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
|
|
120
|
+
network: linea
|
|
121
|
+
ethereum:
|
|
122
|
+
address: 0xd19581a021f4704ad4eBfF68258e7A0a9DB1CD77
|
|
123
|
+
accounts:
|
|
124
|
+
wallet1: 0xf08bCbce72f62c95Dcb7c07dCb5Ed26ACfCfBc11
|
|
125
|
+
wallet2: 0x6bc14a99ccf7f9037c98d75eec6c6d807f9d953f
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
rainlangText: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
exports?: {} | undefined;
|
|
11
|
+
bindings?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
export type CodeMirrorRainlangProps = typeof __propDef.props;
|
|
14
|
+
export type CodeMirrorRainlangEvents = typeof __propDef.events;
|
|
15
|
+
export type CodeMirrorRainlangSlots = typeof __propDef.slots;
|
|
16
|
+
export default class CodeMirrorRainlang extends SvelteComponent<CodeMirrorRainlangProps, CodeMirrorRainlangEvents, CodeMirrorRainlangSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Address } from '@rainlanguage/orderbook';
|
|
2
2
|
import { type Config } from '@wagmi/core';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
mockSetSubscribeValue: (value: Record<string, string>) => void;
|
|
26
|
-
};
|
|
27
|
-
export declare const mockActiveOrderStatusStore: {
|
|
28
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean | undefined>, invalidate?: import("svelte/store").Invalidator<boolean | undefined> | undefined) => import("svelte/store").Unsubscriber;
|
|
29
|
-
set: (this: void, value: boolean | undefined) => void;
|
|
30
|
-
mockSetSubscribeValue: (value: boolean | undefined) => void;
|
|
3
|
+
type MockDeployment = {
|
|
4
|
+
key: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
type MockPageState = {
|
|
9
|
+
data: Record<string, unknown> & {
|
|
10
|
+
deployment: MockDeployment;
|
|
11
|
+
};
|
|
12
|
+
url: URL;
|
|
13
|
+
params: Record<string, unknown>;
|
|
14
|
+
form: Record<string, unknown>;
|
|
15
|
+
status: number;
|
|
16
|
+
error: unknown;
|
|
17
|
+
route: {
|
|
18
|
+
id: string | null;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const mockShowInactiveOrdersStore: {
|
|
22
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
|
|
23
|
+
set: (this: void, value: boolean) => void;
|
|
24
|
+
mockSetSubscribeValue: (value: boolean) => void;
|
|
31
25
|
};
|
|
32
26
|
export declare const mockOrderHashStore: {
|
|
33
27
|
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
@@ -39,6 +33,11 @@ export declare const mockHideZeroBalanceVaultsStore: {
|
|
|
39
33
|
set: (this: void, value: boolean) => void;
|
|
40
34
|
mockSetSubscribeValue: (value: boolean) => void;
|
|
41
35
|
};
|
|
36
|
+
export declare const mockHideInactiveOrdersVaultsStore: {
|
|
37
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
|
|
38
|
+
set: (this: void, value: boolean) => void;
|
|
39
|
+
mockSetSubscribeValue: (value: boolean) => void;
|
|
40
|
+
};
|
|
42
41
|
export declare const mockActiveNetworkRefStore: {
|
|
43
42
|
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
44
43
|
set: (this: void, value: string) => void;
|
|
@@ -59,12 +58,6 @@ export declare const mockSubgraphUrlStore: {
|
|
|
59
58
|
set: (this: void, value: string) => void;
|
|
60
59
|
mockSetSubscribeValue: (value: string) => void;
|
|
61
60
|
};
|
|
62
|
-
export declare const mockSignerAddressStore: {
|
|
63
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
64
|
-
set: (this: void, value: string) => void;
|
|
65
|
-
mockSetSubscribeValue: (value: string) => void;
|
|
66
|
-
update: (this: void, updater: import("svelte/store").Updater<string>) => void;
|
|
67
|
-
};
|
|
68
61
|
export declare const mockChainIdStore: {
|
|
69
62
|
subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number> | undefined) => import("svelte/store").Unsubscriber;
|
|
70
63
|
set: (this: void, value: number) => void;
|
|
@@ -82,13 +75,30 @@ export declare const mockWagmiConfigStore: {
|
|
|
82
75
|
update: (this: void, updater: import("svelte/store").Updater<Config>) => void;
|
|
83
76
|
mockSetSubscribeValue: (value: Config) => void;
|
|
84
77
|
};
|
|
85
|
-
export declare const
|
|
86
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<
|
|
87
|
-
set: (this: void, value:
|
|
88
|
-
mockSetSubscribeValue: (value:
|
|
78
|
+
export declare const mockSelectedChainIdsStore: {
|
|
79
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<number[]>, invalidate?: import("svelte/store").Invalidator<number[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
80
|
+
set: (this: void, value: number[]) => void;
|
|
81
|
+
mockSetSubscribeValue: (value: number[]) => void;
|
|
89
82
|
};
|
|
90
83
|
export declare const mockPageStore: {
|
|
91
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<
|
|
92
|
-
set: (this: void, value:
|
|
93
|
-
mockSetSubscribeValue: (
|
|
94
|
-
|
|
84
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<MockPageState>, invalidate?: import("svelte/store").Invalidator<MockPageState> | undefined) => import("svelte/store").Unsubscriber;
|
|
85
|
+
set: (this: void, value: MockPageState) => void;
|
|
86
|
+
mockSetSubscribeValue: (newValue: Partial<MockPageState>) => void;
|
|
87
|
+
reset: () => void;
|
|
88
|
+
};
|
|
89
|
+
export declare const mockActiveTokensStore: {
|
|
90
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
91
|
+
set: (this: void, value: string[]) => void;
|
|
92
|
+
mockSetSubscribeValue: (value: string[]) => void;
|
|
93
|
+
};
|
|
94
|
+
export declare const mockActiveOrderbookAddressesStore: {
|
|
95
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
96
|
+
set: (this: void, value: string[]) => void;
|
|
97
|
+
mockSetSubscribeValue: (value: string[]) => void;
|
|
98
|
+
};
|
|
99
|
+
export declare const mockOwnerFilterStore: {
|
|
100
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<`0x${string}`>, invalidate?: import("svelte/store").Invalidator<`0x${string}`> | undefined) => import("svelte/store").Unsubscriber;
|
|
101
|
+
set: (this: void, value: `0x${string}`) => void;
|
|
102
|
+
mockSetSubscribeValue: (value: Address) => void;
|
|
103
|
+
};
|
|
104
|
+
export {};
|
package/dist/__mocks__/stores.js
CHANGED
|
@@ -1,52 +1,49 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
|
-
import settingsFixture from '../__fixtures__/settings-12-11-24.json';
|
|
3
2
|
import {} from '@wagmi/core';
|
|
4
3
|
import { mockWeb3Config } from './mockWeb3Config';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
if (import.meta.vitest) {
|
|
5
|
+
vi.mock(import('@rainlanguage/orderbook'), async (importOriginal) => {
|
|
6
|
+
const actual = await importOriginal();
|
|
7
|
+
return {
|
|
8
|
+
...actual
|
|
9
|
+
};
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
const initialPageState = {
|
|
13
|
+
data: {
|
|
14
|
+
dotrain: 'some dotrain content',
|
|
15
|
+
deployment: { key: 'deploy-key', name: '', description: '' },
|
|
16
|
+
orderDetail: {}
|
|
17
|
+
},
|
|
18
|
+
url: new URL('http://localhost:3000/deploy'),
|
|
19
|
+
params: {},
|
|
20
|
+
form: {},
|
|
21
|
+
status: 200,
|
|
22
|
+
error: null,
|
|
23
|
+
route: {
|
|
24
|
+
id: null
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const mockPageWritable = writable(initialPageState);
|
|
28
|
+
const mockShowInactiveOrdersWritable = writable(true);
|
|
10
29
|
const mockOrderHashWritable = writable('');
|
|
11
30
|
const mockHideZeroBalanceVaultsWritable = writable(false);
|
|
31
|
+
const mockHideInactiveOrdersVaultsWritable = writable(false);
|
|
12
32
|
const mockActiveNetworkRefWritable = writable('');
|
|
13
33
|
const mockActiveOrderbookRefWritable = writable('');
|
|
14
34
|
const mockActiveAccountsWritable = writable({});
|
|
15
35
|
const mockSubgraphUrlWritable = writable('');
|
|
16
|
-
const mockWalletAddressMatchesOrBlankWritable = writable(() => false);
|
|
17
|
-
const mockSignerAddressWritable = writable('');
|
|
18
36
|
const mockChainIdWritable = writable(0);
|
|
19
|
-
const mockConnectedWritable = writable(
|
|
37
|
+
const mockConnectedWritable = writable(true);
|
|
20
38
|
const mockWagmiConfigWritable = writable(mockWeb3Config);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
subscribe: mockSettingsWritable.subscribe,
|
|
30
|
-
set: mockSettingsWritable.set,
|
|
31
|
-
mockSetSubscribeValue: (value) => mockSettingsWritable.set(value)
|
|
32
|
-
};
|
|
33
|
-
export const mockActiveSubgraphsStore = {
|
|
34
|
-
subscribe: mockActiveSubgraphsWritable.subscribe,
|
|
35
|
-
set: mockActiveSubgraphsWritable.set,
|
|
36
|
-
mockSetSubscribeValue: (value) => mockActiveSubgraphsWritable.set(value)
|
|
37
|
-
};
|
|
38
|
-
export const mockAccountsStore = {
|
|
39
|
-
subscribe: mockAccountsWritable.subscribe
|
|
40
|
-
};
|
|
41
|
-
export const mockActiveAccountsItemsStore = {
|
|
42
|
-
subscribe: mockActiveAccountsItemsWritable.subscribe,
|
|
43
|
-
set: mockActiveAccountsItemsWritable.set,
|
|
44
|
-
mockSetSubscribeValue: (value) => mockActiveAccountsItemsWritable.set(value)
|
|
45
|
-
};
|
|
46
|
-
export const mockActiveOrderStatusStore = {
|
|
47
|
-
subscribe: mockActiveOrderStatusWritable.subscribe,
|
|
48
|
-
set: mockActiveOrderStatusWritable.set,
|
|
49
|
-
mockSetSubscribeValue: (value) => mockActiveOrderStatusWritable.set(value)
|
|
39
|
+
const mockSelectedChainIdsWritable = writable([]);
|
|
40
|
+
const mockActiveTokensWritable = writable([]);
|
|
41
|
+
const mockActiveOrderbookAddressesWritable = writable([]);
|
|
42
|
+
const mockOwnerFilterWritable = writable('');
|
|
43
|
+
export const mockShowInactiveOrdersStore = {
|
|
44
|
+
subscribe: mockShowInactiveOrdersWritable.subscribe,
|
|
45
|
+
set: mockShowInactiveOrdersWritable.set,
|
|
46
|
+
mockSetSubscribeValue: (value) => mockShowInactiveOrdersWritable.set(value)
|
|
50
47
|
};
|
|
51
48
|
export const mockOrderHashStore = {
|
|
52
49
|
subscribe: mockOrderHashWritable.subscribe,
|
|
@@ -58,6 +55,11 @@ export const mockHideZeroBalanceVaultsStore = {
|
|
|
58
55
|
set: mockHideZeroBalanceVaultsWritable.set,
|
|
59
56
|
mockSetSubscribeValue: (value) => mockHideZeroBalanceVaultsWritable.set(value)
|
|
60
57
|
};
|
|
58
|
+
export const mockHideInactiveOrdersVaultsStore = {
|
|
59
|
+
subscribe: mockHideInactiveOrdersVaultsWritable.subscribe,
|
|
60
|
+
set: mockHideInactiveOrdersVaultsWritable.set,
|
|
61
|
+
mockSetSubscribeValue: (value) => mockHideInactiveOrdersVaultsWritable.set(value)
|
|
62
|
+
};
|
|
61
63
|
export const mockActiveNetworkRefStore = {
|
|
62
64
|
subscribe: mockActiveNetworkRefWritable.subscribe,
|
|
63
65
|
set: mockActiveNetworkRefWritable.set,
|
|
@@ -78,12 +80,6 @@ export const mockSubgraphUrlStore = {
|
|
|
78
80
|
set: mockSubgraphUrlWritable.set,
|
|
79
81
|
mockSetSubscribeValue: (value) => mockSubgraphUrlWritable.set(value)
|
|
80
82
|
};
|
|
81
|
-
export const mockSignerAddressStore = {
|
|
82
|
-
subscribe: mockSignerAddressWritable.subscribe,
|
|
83
|
-
set: mockSignerAddressWritable.set,
|
|
84
|
-
mockSetSubscribeValue: (value) => mockSignerAddressWritable.set(value),
|
|
85
|
-
update: mockSignerAddressWritable.update
|
|
86
|
-
};
|
|
87
83
|
export const mockChainIdStore = {
|
|
88
84
|
subscribe: mockChainIdWritable.subscribe,
|
|
89
85
|
set: mockChainIdWritable.set,
|
|
@@ -101,13 +97,34 @@ export const mockWagmiConfigStore = {
|
|
|
101
97
|
update: mockWagmiConfigWritable.update,
|
|
102
98
|
mockSetSubscribeValue: (value) => mockWagmiConfigWritable.set(value)
|
|
103
99
|
};
|
|
104
|
-
export const
|
|
105
|
-
subscribe:
|
|
106
|
-
set:
|
|
107
|
-
mockSetSubscribeValue: (value) =>
|
|
100
|
+
export const mockSelectedChainIdsStore = {
|
|
101
|
+
subscribe: mockSelectedChainIdsWritable.subscribe,
|
|
102
|
+
set: mockSelectedChainIdsWritable.set,
|
|
103
|
+
mockSetSubscribeValue: (value) => mockSelectedChainIdsWritable.set(value)
|
|
108
104
|
};
|
|
109
105
|
export const mockPageStore = {
|
|
110
106
|
subscribe: mockPageWritable.subscribe,
|
|
111
107
|
set: mockPageWritable.set,
|
|
112
|
-
mockSetSubscribeValue: (
|
|
108
|
+
mockSetSubscribeValue: (newValue) => {
|
|
109
|
+
mockPageWritable.update((currentValue) => ({
|
|
110
|
+
...currentValue,
|
|
111
|
+
...newValue
|
|
112
|
+
}));
|
|
113
|
+
},
|
|
114
|
+
reset: () => mockPageWritable.set(initialPageState)
|
|
115
|
+
};
|
|
116
|
+
export const mockActiveTokensStore = {
|
|
117
|
+
subscribe: mockActiveTokensWritable.subscribe,
|
|
118
|
+
set: mockActiveTokensWritable.set,
|
|
119
|
+
mockSetSubscribeValue: (value) => mockActiveTokensWritable.set(value)
|
|
120
|
+
};
|
|
121
|
+
export const mockActiveOrderbookAddressesStore = {
|
|
122
|
+
subscribe: mockActiveOrderbookAddressesWritable.subscribe,
|
|
123
|
+
set: mockActiveOrderbookAddressesWritable.set,
|
|
124
|
+
mockSetSubscribeValue: (value) => mockActiveOrderbookAddressesWritable.set(value)
|
|
125
|
+
};
|
|
126
|
+
export const mockOwnerFilterStore = {
|
|
127
|
+
subscribe: mockOwnerFilterWritable.subscribe,
|
|
128
|
+
set: mockOwnerFilterWritable.set,
|
|
129
|
+
mockSetSubscribeValue: (value) => mockOwnerFilterWritable.set(value)
|
|
113
130
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import
|
|
3
|
-
import { formatUnits } from "viem";
|
|
1
|
+
<script>import { toHex } from "viem";
|
|
2
|
+
import Tooltip from "./Tooltip.svelte";
|
|
4
3
|
export let tokenVault;
|
|
5
|
-
export let
|
|
4
|
+
export let chainId;
|
|
5
|
+
export let orderbookAddress;
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<div
|
|
@@ -10,17 +10,17 @@ export let subgraphName;
|
|
|
10
10
|
data-testid="vault-link"
|
|
11
11
|
>
|
|
12
12
|
<div class="flex flex-col items-start gap-y-2">
|
|
13
|
-
<Tooltip triggeredBy=
|
|
14
|
-
ID: <span class="font-mono">{
|
|
13
|
+
<Tooltip triggeredBy={`#token-info-${tokenVault.vaultId}`}>
|
|
14
|
+
ID: <span class="font-mono">{toHex(tokenVault.vaultId)}</span>
|
|
15
15
|
</Tooltip>
|
|
16
|
-
<a
|
|
16
|
+
<a
|
|
17
|
+
href={`/vaults/${chainId}-${orderbookAddress}-${tokenVault.id}`}
|
|
18
|
+
id={`token-info-${tokenVault.vaultId}`}
|
|
19
|
+
>
|
|
17
20
|
{tokenVault.token.name} ({tokenVault.token.symbol})
|
|
18
21
|
</a>
|
|
19
22
|
<span class="text-sm text-gray-500 dark:text-gray-400">
|
|
20
|
-
Balance: {
|
|
21
|
-
BigInt(tokenVault.balance),
|
|
22
|
-
parseInt(tokenVault.token.decimals || '18')
|
|
23
|
-
)}
|
|
23
|
+
Balance: {tokenVault.formattedBalance}
|
|
24
24
|
</span>
|
|
25
25
|
</div>
|
|
26
26
|
<div>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Address, RaindexVault } from '@rainlanguage/orderbook';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
tokenVault:
|
|
6
|
-
|
|
5
|
+
tokenVault: RaindexVault;
|
|
6
|
+
chainId: number;
|
|
7
|
+
orderbookAddress: Address;
|
|
7
8
|
};
|
|
8
9
|
events: {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import { Checkbox, Label } from "flowbite-svelte";
|
|
2
|
+
export let hideInactiveOrdersVaults;
|
|
3
|
+
function handleHideInactiveOrdersVaultsChange() {
|
|
4
|
+
$hideInactiveOrdersVaults = !$hideInactiveOrdersVaults;
|
|
5
|
+
}
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div data-testid="inactive-orders-vault-checkbox" class="flex items-center gap-x-2">
|
|
9
|
+
<Label
|
|
10
|
+
for="hide-inactive-orders-vaults"
|
|
11
|
+
class="cursor-pointer whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
12
|
+
>
|
|
13
|
+
Hide vaults without active orders
|
|
14
|
+
</Label>
|
|
15
|
+
<Checkbox
|
|
16
|
+
id="hide-inactive-orders-vaults"
|
|
17
|
+
checked={$hideInactiveOrdersVaults}
|
|
18
|
+
on:change={handleHideInactiveOrdersVaultsChange}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { AppStoresInterface } from '../types/appStores';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
hideInactiveOrdersVaults: AppStoresInterface["hideInactiveOrdersVaults"];
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type CheckboxInactiveOrdersVaultProps = typeof __propDef.props;
|
|
15
|
+
export type CheckboxInactiveOrdersVaultEvents = typeof __propDef.events;
|
|
16
|
+
export type CheckboxInactiveOrdersVaultSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CheckboxInactiveOrdersVault extends SvelteComponent<CheckboxInactiveOrdersVaultProps, CheckboxInactiveOrdersVaultEvents, CheckboxInactiveOrdersVaultSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AppStoresInterface } from '../types/appStores';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
hideZeroBalanceVaults:
|
|
5
|
+
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,6 +6,7 @@ export let disabled = false;
|
|
|
6
6
|
export let styles = {};
|
|
7
7
|
export let rainlangExtension;
|
|
8
8
|
export let codeMirrorTheme;
|
|
9
|
+
export let onTextChange;
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<div data-testid="codemirror-dotrain">
|
|
@@ -22,6 +23,9 @@ export let codeMirrorTheme;
|
|
|
22
23
|
},
|
|
23
24
|
...styles
|
|
24
25
|
}}
|
|
26
|
+
on:change={(e) => {
|
|
27
|
+
onTextChange(e.detail);
|
|
28
|
+
}}
|
|
25
29
|
on:ready={(e) => {
|
|
26
30
|
openLintPanel(e.detail);
|
|
27
31
|
}}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import CodeMirror from "svelte-codemirror-editor";
|
|
1
|
+
<script>import CodeMirror from "svelte-codemirror-editor";
|
|
3
2
|
import { RainlangLR } from "codemirror-rainlang";
|
|
4
3
|
export let order = void 0;
|
|
5
4
|
export let rainlangText = void 0;
|
|
6
5
|
export let codeMirrorTheme;
|
|
7
6
|
export let codeMirrorDisabled = true;
|
|
8
7
|
export let codeMirrorStyles = {};
|
|
9
|
-
$: extendedOrder = order ? extendOrder(order) : void 0;
|
|
10
8
|
</script>
|
|
11
9
|
|
|
12
|
-
{#if rainlangText ||
|
|
10
|
+
{#if rainlangText || order?.rainlang}
|
|
13
11
|
<CodeMirror
|
|
14
|
-
value={rainlangText ||
|
|
12
|
+
value={rainlangText || order?.rainlang}
|
|
15
13
|
extensions={[RainlangLR]}
|
|
16
14
|
theme={codeMirrorTheme}
|
|
17
15
|
readonly={codeMirrorDisabled}
|
|
@@ -24,11 +22,4 @@ $: extendedOrder = order ? extendOrder(order) : void 0;
|
|
|
24
22
|
...codeMirrorStyles
|
|
25
23
|
}}
|
|
26
24
|
/>
|
|
27
|
-
{:else if !extendedOrder?.rainlang && !rainlangText}
|
|
28
|
-
<div
|
|
29
|
-
class="w-full tracking-tight text-gray-900 dark:text-white"
|
|
30
|
-
data-testid="rainlang-not-included"
|
|
31
|
-
>
|
|
32
|
-
Rain source not included in order meta
|
|
33
|
-
</div>
|
|
34
25
|
{/if}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RaindexOrder } from '@rainlanguage/orderbook';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
order?:
|
|
5
|
+
order?: RaindexOrder | undefined;
|
|
6
6
|
rainlangText?: string | undefined;
|
|
7
7
|
codeMirrorTheme: any;
|
|
8
8
|
codeMirrorDisabled?: boolean;
|