@rainlanguage/ui-components 0.0.1-alpha.140 → 0.0.1-alpha.142
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/components/ListViewOrderbookFilters.svelte +5 -0
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +6 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte +149 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
- package/dist/components/tables/OrdersListTable.svelte +29 -4
- package/dist/components/tables/OrdersListTable.svelte.d.ts +1 -0
- package/dist/components/tables/VaultsListTable.svelte +23 -7
- package/dist/components/tables/VaultsListTable.svelte.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/queries/keys.d.ts +1 -0
- package/dist/queries/keys.js +1 -0
- package/dist/types/appStores.d.ts +1 -3
- package/dist/utils/tokens.d.ts +2 -0
- package/dist/utils/tokens.js +3 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { Alert } from "flowbite-svelte";
|
|
|
5
5
|
import Tooltip from "./Tooltip.svelte";
|
|
6
6
|
import CheckboxActiveOrders from "./checkbox/CheckboxActiveOrders.svelte";
|
|
7
7
|
import DropdownOrderListAccounts from "./dropdown/DropdownOrderListAccounts.svelte";
|
|
8
|
+
import DropdownTokensFilter from "./dropdown/DropdownTokensFilter.svelte";
|
|
8
9
|
import InputOrderHash from "./input/InputOrderHash.svelte";
|
|
9
10
|
import CheckboxZeroBalanceVault from "./CheckboxZeroBalanceVault.svelte";
|
|
10
11
|
import CheckboxMyItemsOnly from "./CheckboxMyItemsOnly.svelte";
|
|
@@ -17,6 +18,9 @@ export let showMyItemsOnly;
|
|
|
17
18
|
export let selectedChainIds;
|
|
18
19
|
export let showInactiveOrders;
|
|
19
20
|
export let orderHash;
|
|
21
|
+
export let activeTokens;
|
|
22
|
+
export let selectedTokens;
|
|
23
|
+
export let tokensQuery;
|
|
20
24
|
$: isVaultsPage = $page.url.pathname === "/vaults";
|
|
21
25
|
$: isOrdersPage = $page.url.pathname === "/orders";
|
|
22
26
|
const { account } = useAccount();
|
|
@@ -54,6 +58,7 @@ const { account } = useAccount();
|
|
|
54
58
|
{#if $accounts && Object.values($accounts).length > 0}
|
|
55
59
|
<DropdownOrderListAccounts {accounts} {activeAccountsItems} />
|
|
56
60
|
{/if}
|
|
61
|
+
<DropdownTokensFilter {tokensQuery} {activeTokens} {selectedTokens} label="Tokens" />
|
|
57
62
|
<DropdownActiveNetworks settings={$settings} {selectedChainIds} />
|
|
58
63
|
{/if}
|
|
59
64
|
</div>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { QueryObserverResult } from '@tanstack/svelte-query';
|
|
3
|
+
import type { Readable } from 'svelte/store';
|
|
4
|
+
import type { Address, RaindexVaultToken } from '@rainlanguage/orderbook';
|
|
2
5
|
import type { AppStoresInterface } from '../types/appStores';
|
|
3
6
|
declare class __sveltets_Render<T> {
|
|
4
7
|
props(): {
|
|
@@ -10,6 +13,9 @@ declare class __sveltets_Render<T> {
|
|
|
10
13
|
selectedChainIds: AppStoresInterface["selectedChainIds"];
|
|
11
14
|
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
12
15
|
orderHash: AppStoresInterface["orderHash"];
|
|
16
|
+
activeTokens: AppStoresInterface["activeTokens"];
|
|
17
|
+
selectedTokens: Address[];
|
|
18
|
+
tokensQuery: Readable<QueryObserverResult<RaindexVaultToken[], Error>>;
|
|
13
19
|
};
|
|
14
20
|
events(): {} & {
|
|
15
21
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<script>import { Button, Dropdown, Label, Checkbox, Input } from "flowbite-svelte";
|
|
2
|
+
import { ChevronDownSolid, SearchSolid } from "flowbite-svelte-icons";
|
|
3
|
+
import { isEmpty } from "lodash";
|
|
4
|
+
import { getTokenDisplayName } from "../../utils/tokens";
|
|
5
|
+
import { getNetworkName } from "../../utils/getNetworkName";
|
|
6
|
+
export let tokensQuery;
|
|
7
|
+
export let activeTokens;
|
|
8
|
+
export let selectedTokens;
|
|
9
|
+
export let label = "Filter by tokens";
|
|
10
|
+
export let allLabel = "All tokens";
|
|
11
|
+
export let emptyMessage = "No tokens available";
|
|
12
|
+
export let loadingMessage = "Loading tokens...";
|
|
13
|
+
let filteredTokens = [];
|
|
14
|
+
let searchTerm = "";
|
|
15
|
+
let selectedIndex = 0;
|
|
16
|
+
$: availableTokens = $tokensQuery?.data || [];
|
|
17
|
+
$: selectedCount = selectedTokens.length;
|
|
18
|
+
$: allSelected = selectedCount === availableTokens.length && availableTokens.length > 0;
|
|
19
|
+
$: buttonText = selectedCount === 0 ? "Select tokens" : allSelected ? allLabel : `${selectedCount} token${selectedCount > 1 ? "s" : ""}`;
|
|
20
|
+
$: {
|
|
21
|
+
let tokensToFilter = availableTokens;
|
|
22
|
+
const getKey = (token) => `${token.address}-${token.chainId}`;
|
|
23
|
+
const uniqueTokensMap = /* @__PURE__ */ new Map();
|
|
24
|
+
tokensToFilter.forEach((token) => {
|
|
25
|
+
const key = getKey(token);
|
|
26
|
+
if (token.address && !uniqueTokensMap.has(key)) {
|
|
27
|
+
uniqueTokensMap.set(key, token);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const uniqueTokens = Array.from(uniqueTokensMap.values());
|
|
31
|
+
if (searchTerm.trim() === "") {
|
|
32
|
+
filteredTokens = uniqueTokens;
|
|
33
|
+
} else {
|
|
34
|
+
const term = searchTerm.toLowerCase();
|
|
35
|
+
filteredTokens = uniqueTokens.filter(
|
|
36
|
+
(token) => token.symbol?.toLowerCase().includes(term) || token.name?.toLowerCase().includes(term) || token.address?.toLowerCase().includes(term)
|
|
37
|
+
);
|
|
38
|
+
selectedIndex = filteredTokens.length > 0 ? 0 : -1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
$: sortedFilteredTokens = filteredTokens.sort(
|
|
42
|
+
({ address }) => selectedTokens.includes(address) ? -1 : 1
|
|
43
|
+
);
|
|
44
|
+
function updateSelectedTokens(newSelection) {
|
|
45
|
+
activeTokens.set(newSelection);
|
|
46
|
+
}
|
|
47
|
+
function toggleToken({ address }) {
|
|
48
|
+
if (!address) return;
|
|
49
|
+
const idx = $activeTokens.indexOf(address);
|
|
50
|
+
const newSelection = idx !== -1 ? $activeTokens.filter((addr) => addr !== address) : [...$activeTokens, address];
|
|
51
|
+
updateSelectedTokens(newSelection);
|
|
52
|
+
}
|
|
53
|
+
function handleKeyDown(event) {
|
|
54
|
+
if (!filteredTokens.length) return;
|
|
55
|
+
switch (event.key) {
|
|
56
|
+
case "Enter":
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
if (filteredTokens.length > 0) {
|
|
59
|
+
const tokenToToggle = filteredTokens[selectedIndex];
|
|
60
|
+
if (tokenToToggle) {
|
|
61
|
+
toggleToken(tokenToToggle);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case "ArrowDown":
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
selectedIndex = Math.min(selectedIndex + 1, filteredTokens.length - 1);
|
|
68
|
+
break;
|
|
69
|
+
case "ArrowUp":
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
selectedIndex = Math.max(selectedIndex - 1, 0);
|
|
72
|
+
break;
|
|
73
|
+
case "Escape":
|
|
74
|
+
searchTerm = "";
|
|
75
|
+
selectedIndex = -1;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<div class="flex flex-col gap-x-2">
|
|
82
|
+
<Label>{label}</Label>
|
|
83
|
+
<div>
|
|
84
|
+
<Button
|
|
85
|
+
color="alternative"
|
|
86
|
+
class="flex w-full justify-between overflow-hidden pl-2 pr-0 text-left"
|
|
87
|
+
data-testid="dropdown-tokens-filter-button"
|
|
88
|
+
aria-label="Select tokens to filter"
|
|
89
|
+
aria-expanded="false"
|
|
90
|
+
aria-haspopup="listbox"
|
|
91
|
+
>
|
|
92
|
+
<div class="w-[90px] overflow-hidden text-ellipsis whitespace-nowrap">
|
|
93
|
+
{buttonText}
|
|
94
|
+
</div>
|
|
95
|
+
<ChevronDownSolid class="mx-2 h-3 w-3 text-black dark:text-white" />
|
|
96
|
+
</Button>
|
|
97
|
+
|
|
98
|
+
<Dropdown
|
|
99
|
+
class="max-h-[75vh] w-full min-w-60 overflow-y-auto py-0"
|
|
100
|
+
data-testid="dropdown-tokens-filter"
|
|
101
|
+
>
|
|
102
|
+
{#if $tokensQuery.isLoading}
|
|
103
|
+
<div class="ml-2 w-full rounded-lg p-3">{loadingMessage}</div>
|
|
104
|
+
{:else if $tokensQuery.isError}
|
|
105
|
+
<div class="ml-2 w-full rounded-lg p-3 text-red-500">
|
|
106
|
+
Cannot load tokens list: {$tokensQuery.error?.message || 'Unknown error'}
|
|
107
|
+
</div>
|
|
108
|
+
{:else if isEmpty(availableTokens)}
|
|
109
|
+
<div class="ml-2 w-full rounded-lg p-3">{emptyMessage}</div>
|
|
110
|
+
{:else}
|
|
111
|
+
<!-- Search input -->
|
|
112
|
+
<div class="sticky top-0 bg-white p-3 dark:bg-gray-800">
|
|
113
|
+
<Input
|
|
114
|
+
placeholder="Search tokens..."
|
|
115
|
+
bind:value={searchTerm}
|
|
116
|
+
autofocus
|
|
117
|
+
on:keydown={handleKeyDown}
|
|
118
|
+
data-testid="tokens-filter-search"
|
|
119
|
+
>
|
|
120
|
+
<SearchSolid slot="left" class="h-4 w-4 text-gray-500" />
|
|
121
|
+
</Input>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
{#if isEmpty(filteredTokens)}
|
|
125
|
+
<div class="ml-2 w-full rounded-lg p-3">No tokens match your search</div>
|
|
126
|
+
{:else}
|
|
127
|
+
{#each sortedFilteredTokens as token, index (`${token.address}-${token.chainId}`)}
|
|
128
|
+
<Checkbox
|
|
129
|
+
data-testid="dropdown-tokens-filter-option"
|
|
130
|
+
class="w-full rounded-lg p-3 hover:bg-gray-100 dark:hover:bg-gray-600 {selectedIndex ===
|
|
131
|
+
index
|
|
132
|
+
? 'bg-blue-100 dark:bg-blue-900'
|
|
133
|
+
: ''}"
|
|
134
|
+
on:click={() => toggleToken(token)}
|
|
135
|
+
checked={!!(token.address && $activeTokens.includes(token.address))}
|
|
136
|
+
>
|
|
137
|
+
<div class="ml-2 flex w-full">
|
|
138
|
+
<div class="flex-1 text-sm font-medium">{getTokenDisplayName(token)}</div>
|
|
139
|
+
<div class="text-xs text-gray-500">
|
|
140
|
+
{getNetworkName(token.chainId)}
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</Checkbox>
|
|
144
|
+
{/each}
|
|
145
|
+
{/if}
|
|
146
|
+
{/if}
|
|
147
|
+
</Dropdown>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { Address, RaindexVaultToken } from '@rainlanguage/orderbook';
|
|
3
|
+
import type { AppStoresInterface } from '../../types/appStores';
|
|
4
|
+
import type { Readable } from 'svelte/store';
|
|
5
|
+
import type { QueryObserverResult } from '@tanstack/svelte-query';
|
|
6
|
+
declare const __propDef: {
|
|
7
|
+
props: {
|
|
8
|
+
tokensQuery: Readable<QueryObserverResult<RaindexVaultToken[], Error>>;
|
|
9
|
+
activeTokens: AppStoresInterface["activeTokens"];
|
|
10
|
+
selectedTokens: Address[];
|
|
11
|
+
label?: string;
|
|
12
|
+
allLabel?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
loadingMessage?: string;
|
|
15
|
+
};
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {};
|
|
20
|
+
exports?: {} | undefined;
|
|
21
|
+
bindings?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type DropdownTokensFilterProps = typeof __propDef.props;
|
|
24
|
+
export type DropdownTokensFilterEvents = typeof __propDef.events;
|
|
25
|
+
export type DropdownTokensFilterSlots = typeof __propDef.slots;
|
|
26
|
+
export default class DropdownTokensFilter extends SvelteComponent<DropdownTokensFilterProps, DropdownTokensFilterEvents, DropdownTokensFilterSlots> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script generics="T">import { getNetworkName } from "../../utils/getNetworkName";
|
|
2
2
|
import { goto } from "$app/navigation";
|
|
3
3
|
import { DotsVerticalOutline } from "flowbite-svelte-icons";
|
|
4
|
-
import { createInfiniteQuery } from "@tanstack/svelte-query";
|
|
4
|
+
import { createInfiniteQuery, createQuery } from "@tanstack/svelte-query";
|
|
5
5
|
import { RaindexOrder } from "@rainlanguage/orderbook";
|
|
6
6
|
import TanstackAppTable from "../TanstackAppTable.svelte";
|
|
7
7
|
import { formatTimestampSecondsAsLocal } from "../../services/time";
|
|
8
8
|
import ListViewOrderbookFilters from "../ListViewOrderbookFilters.svelte";
|
|
9
9
|
import Hash, { HashType } from "../Hash.svelte";
|
|
10
10
|
import { DEFAULT_PAGE_SIZE, DEFAULT_REFRESH_INTERVAL } from "../../queries/constants";
|
|
11
|
-
import { QKEY_ORDERS } from "../../queries/keys";
|
|
11
|
+
import { QKEY_ORDERS, QKEY_TOKENS } from "../../queries/keys";
|
|
12
12
|
import {
|
|
13
13
|
Badge,
|
|
14
14
|
Button,
|
|
@@ -28,18 +28,40 @@ export let showInactiveOrders;
|
|
|
28
28
|
export let orderHash;
|
|
29
29
|
export let hideZeroBalanceVaults;
|
|
30
30
|
export let showMyItemsOnly;
|
|
31
|
+
export let activeTokens;
|
|
31
32
|
const { matchesAccount, account } = useAccount();
|
|
32
33
|
const raindexClient = useRaindexClient();
|
|
33
34
|
$: owners = $activeAccountsItems && Object.values($activeAccountsItems).length > 0 ? Object.values($activeAccountsItems) : $showMyItemsOnly && $account ? [$account] : [];
|
|
35
|
+
$: tokensQuery = createQuery({
|
|
36
|
+
queryKey: [QKEY_TOKENS, $selectedChainIds],
|
|
37
|
+
queryFn: async () => {
|
|
38
|
+
const result = await raindexClient.getAllVaultTokens($selectedChainIds);
|
|
39
|
+
if (result.error) throw new Error(result.error.readableMsg);
|
|
40
|
+
return result.value;
|
|
41
|
+
},
|
|
42
|
+
enabled: true
|
|
43
|
+
});
|
|
44
|
+
$: selectedTokens = $activeTokens?.filter(
|
|
45
|
+
(address) => !$tokensQuery.data || $tokensQuery.data.some((t) => t.address === address)
|
|
46
|
+
) ?? [];
|
|
34
47
|
$: query = createInfiniteQuery({
|
|
35
|
-
queryKey: [
|
|
48
|
+
queryKey: [
|
|
49
|
+
QKEY_ORDERS,
|
|
50
|
+
$selectedChainIds,
|
|
51
|
+
$settings,
|
|
52
|
+
owners,
|
|
53
|
+
$showInactiveOrders,
|
|
54
|
+
$orderHash,
|
|
55
|
+
selectedTokens
|
|
56
|
+
],
|
|
36
57
|
queryFn: async ({ pageParam }) => {
|
|
37
58
|
const result = await raindexClient.getOrders(
|
|
38
59
|
$selectedChainIds,
|
|
39
60
|
{
|
|
40
61
|
owners,
|
|
41
62
|
active: $showInactiveOrders ? void 0 : true,
|
|
42
|
-
orderHash: $orderHash || void 0
|
|
63
|
+
orderHash: $orderHash || void 0,
|
|
64
|
+
tokens: selectedTokens
|
|
43
65
|
},
|
|
44
66
|
pageParam + 1
|
|
45
67
|
);
|
|
@@ -65,6 +87,9 @@ const AppTable = TanstackAppTable;
|
|
|
65
87
|
{showInactiveOrders}
|
|
66
88
|
{orderHash}
|
|
67
89
|
{hideZeroBalanceVaults}
|
|
90
|
+
{tokensQuery}
|
|
91
|
+
{activeTokens}
|
|
92
|
+
{selectedTokens}
|
|
68
93
|
/>
|
|
69
94
|
|
|
70
95
|
<AppTable
|
|
@@ -11,6 +11,7 @@ declare class __sveltets_Render<T> {
|
|
|
11
11
|
orderHash: AppStoresInterface["orderHash"];
|
|
12
12
|
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
13
13
|
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
14
|
+
activeTokens: AppStoresInterface["activeTokens"];
|
|
14
15
|
};
|
|
15
16
|
events(): {} & {
|
|
16
17
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,7 +3,7 @@ import { useRaindexClient } from "../../hooks/useRaindexClient";
|
|
|
3
3
|
import { Button, Dropdown, DropdownItem, TableBodyCell, TableHeadCell } from "flowbite-svelte";
|
|
4
4
|
import { goto } from "$app/navigation";
|
|
5
5
|
import { DotsVerticalOutline } from "flowbite-svelte-icons";
|
|
6
|
-
import { createInfiniteQuery } from "@tanstack/svelte-query";
|
|
6
|
+
import { createInfiniteQuery, createQuery } from "@tanstack/svelte-query";
|
|
7
7
|
import TanstackAppTable from "../TanstackAppTable.svelte";
|
|
8
8
|
import ListViewOrderbookFilters from "../ListViewOrderbookFilters.svelte";
|
|
9
9
|
import OrderOrVaultHash from "../OrderOrVaultHash.svelte";
|
|
@@ -11,7 +11,7 @@ import Hash, { HashType } from "../Hash.svelte";
|
|
|
11
11
|
import { DEFAULT_PAGE_SIZE, DEFAULT_REFRESH_INTERVAL } from "../../queries/constants";
|
|
12
12
|
import { vaultBalanceDisplay } from "../../utils/vault";
|
|
13
13
|
import { RaindexVault } from "@rainlanguage/orderbook";
|
|
14
|
-
import { QKEY_VAULTS } from "../../queries/keys";
|
|
14
|
+
import { QKEY_TOKENS, QKEY_VAULTS } from "../../queries/keys";
|
|
15
15
|
import { useAccount } from "../../providers/wallet/useAccount";
|
|
16
16
|
import { getNetworkName } from "../../utils/getNetworkName";
|
|
17
17
|
export let accounts;
|
|
@@ -20,29 +20,42 @@ export let orderHash;
|
|
|
20
20
|
export let settings;
|
|
21
21
|
export let showInactiveOrders;
|
|
22
22
|
export let hideZeroBalanceVaults;
|
|
23
|
-
export let
|
|
23
|
+
export let activeTokens;
|
|
24
24
|
export let selectedChainIds;
|
|
25
|
+
export let showMyItemsOnly;
|
|
25
26
|
export let handleDepositModal = void 0;
|
|
26
27
|
export let handleWithdrawModal = void 0;
|
|
27
|
-
export let showMyItemsOnly;
|
|
28
28
|
const { account, matchesAccount } = useAccount();
|
|
29
29
|
const raindexClient = useRaindexClient();
|
|
30
30
|
$: owners = $activeAccountsItems && Object.values($activeAccountsItems).length > 0 ? Object.values($activeAccountsItems) : $showMyItemsOnly && $account ? [$account] : [];
|
|
31
|
+
$: tokensQuery = createQuery({
|
|
32
|
+
queryKey: [QKEY_TOKENS, $selectedChainIds],
|
|
33
|
+
queryFn: async () => {
|
|
34
|
+
const result = await raindexClient.getAllVaultTokens($selectedChainIds);
|
|
35
|
+
if (result.error) throw new Error(result.error.readableMsg);
|
|
36
|
+
return result.value;
|
|
37
|
+
},
|
|
38
|
+
enabled: true
|
|
39
|
+
});
|
|
40
|
+
$: selectedTokens = $activeTokens?.filter(
|
|
41
|
+
(address) => !$tokensQuery.data || $tokensQuery.data.some((t) => t.address === address)
|
|
42
|
+
) ?? [];
|
|
31
43
|
$: query = createInfiniteQuery({
|
|
32
44
|
queryKey: [
|
|
33
45
|
QKEY_VAULTS,
|
|
34
|
-
$activeAccounts,
|
|
35
46
|
$hideZeroBalanceVaults,
|
|
36
47
|
$selectedChainIds,
|
|
37
48
|
$settings,
|
|
38
|
-
owners
|
|
49
|
+
owners,
|
|
50
|
+
selectedTokens
|
|
39
51
|
],
|
|
40
52
|
queryFn: async ({ pageParam }) => {
|
|
41
53
|
const result = await raindexClient.getVaults(
|
|
42
54
|
$selectedChainIds,
|
|
43
55
|
{
|
|
44
56
|
owners,
|
|
45
|
-
hideZeroBalance: $hideZeroBalanceVaults
|
|
57
|
+
hideZeroBalance: $hideZeroBalanceVaults,
|
|
58
|
+
tokens: selectedTokens
|
|
46
59
|
},
|
|
47
60
|
pageParam + 1
|
|
48
61
|
);
|
|
@@ -69,6 +82,9 @@ const AppTable = TanstackAppTable;
|
|
|
69
82
|
{showInactiveOrders}
|
|
70
83
|
{orderHash}
|
|
71
84
|
{hideZeroBalanceVaults}
|
|
85
|
+
{activeTokens}
|
|
86
|
+
{tokensQuery}
|
|
87
|
+
{selectedTokens}
|
|
72
88
|
/>
|
|
73
89
|
<AppTable
|
|
74
90
|
{query}
|
|
@@ -9,11 +9,11 @@ declare class __sveltets_Render<T> {
|
|
|
9
9
|
settings: AppStoresInterface["settings"];
|
|
10
10
|
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
11
11
|
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
12
|
-
|
|
12
|
+
activeTokens: AppStoresInterface["activeTokens"];
|
|
13
13
|
selectedChainIds: AppStoresInterface["selectedChainIds"];
|
|
14
|
+
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
14
15
|
handleDepositModal?: ((vault: RaindexVault, refetch: () => void) => void) | undefined;
|
|
15
16
|
handleWithdrawModal?: ((vault: RaindexVault, refetch: () => void) => void) | undefined;
|
|
16
|
-
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
17
17
|
};
|
|
18
18
|
events(): {} & {
|
|
19
19
|
[evt: string]: CustomEvent<any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as CardProperty } from './components/CardProperty.svelte';
|
|
|
2
2
|
export { default as Hash, HashType } from './components/Hash.svelte';
|
|
3
3
|
export { default as TanstackAppTable } from './components/TanstackAppTable.svelte';
|
|
4
4
|
export { default as DropdownCheckbox } from './components/dropdown/DropdownCheckbox.svelte';
|
|
5
|
+
export { default as DropdownTokensFilter } from './components/dropdown/DropdownTokensFilter.svelte';
|
|
5
6
|
export { default as DropdownOrderListAccounts } from './components/dropdown/DropdownOrderListAccounts.svelte';
|
|
6
7
|
export { default as DropdownRadio } from './components/dropdown/DropdownRadio.svelte';
|
|
7
8
|
export { default as Refresh } from './components/icon/Refresh.svelte';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as CardProperty } from './components/CardProperty.svelte';
|
|
|
3
3
|
export { default as Hash, HashType } from './components/Hash.svelte';
|
|
4
4
|
export { default as TanstackAppTable } from './components/TanstackAppTable.svelte';
|
|
5
5
|
export { default as DropdownCheckbox } from './components/dropdown/DropdownCheckbox.svelte';
|
|
6
|
+
export { default as DropdownTokensFilter } from './components/dropdown/DropdownTokensFilter.svelte';
|
|
6
7
|
export { default as DropdownOrderListAccounts } from './components/dropdown/DropdownOrderListAccounts.svelte';
|
|
7
8
|
export { default as DropdownRadio } from './components/dropdown/DropdownRadio.svelte';
|
|
8
9
|
export { default as Refresh } from './components/icon/Refresh.svelte';
|
package/dist/queries/keys.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare const QKEY_ORDER_TRADES_LIST = "orderTradesList";
|
|
|
7
7
|
export declare const QKEY_ORDER_QUOTE = "orderQuote";
|
|
8
8
|
export declare const QKEY_VAULTS_VOL_LIST = "orderVaultsVolumeList";
|
|
9
9
|
export declare const QKEY_ORDER_APY = "orderApy";
|
|
10
|
+
export declare const QKEY_TOKENS = "tokens";
|
package/dist/queries/keys.js
CHANGED
|
@@ -8,8 +8,6 @@ export interface AppStoresInterface {
|
|
|
8
8
|
showInactiveOrders: Writable<boolean>;
|
|
9
9
|
orderHash: Writable<Hex>;
|
|
10
10
|
hideZeroBalanceVaults: Writable<boolean>;
|
|
11
|
-
|
|
12
|
-
[k: string]: AccountCfg;
|
|
13
|
-
}>;
|
|
11
|
+
activeTokens: Writable<Address[]>;
|
|
14
12
|
showMyItemsOnly: Writable<boolean>;
|
|
15
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainlanguage/ui-components",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.142",
|
|
4
4
|
"description": "A component library for building Svelte applications to be used with Raindex.",
|
|
5
5
|
"license": "LicenseRef-DCL-1.0",
|
|
6
6
|
"author": "Rain Open Source Software Ltd",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@fontsource/dm-sans": "5.1.0",
|
|
54
54
|
"@imask/svelte": "7.6.1",
|
|
55
55
|
"@observablehq/plot": "0.6.16",
|
|
56
|
-
"@rainlanguage/orderbook": "0.0.1-alpha.
|
|
56
|
+
"@rainlanguage/orderbook": "0.0.1-alpha.142",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|