@rainlanguage/ui-components 0.0.1-alpha.84 → 0.0.1-alpha.86
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/__mocks__/stores.d.ts +1 -1
- package/dist/__mocks__/stores.js +5 -5
- package/dist/components/ListViewOrderbookFilters.svelte +2 -2
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +1 -1
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +3 -3
- package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +1 -1
- package/dist/components/tables/OrdersListTable.svelte +4 -4
- package/dist/components/tables/OrdersListTable.svelte.d.ts +1 -1
- package/dist/components/tables/VaultsListTable.svelte +2 -2
- package/dist/components/tables/VaultsListTable.svelte.d.ts +1 -1
- package/dist/queries/queryClient.d.ts +1 -1
- package/dist/queries/queryClient.js +11 -6
- package/dist/types/appStores.d.ts +1 -1
- package/package.json +2 -2
|
@@ -38,7 +38,7 @@ export declare const mockActiveAccountsItemsStore: {
|
|
|
38
38
|
set: (this: void, value: Record<string, string>) => void;
|
|
39
39
|
mockSetSubscribeValue: (value: Record<string, string>) => void;
|
|
40
40
|
};
|
|
41
|
-
export declare const
|
|
41
|
+
export declare const mockShowInactiveOrdersStore: {
|
|
42
42
|
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
|
|
43
43
|
set: (this: void, value: boolean) => void;
|
|
44
44
|
mockSetSubscribeValue: (value: boolean) => void;
|
package/dist/__mocks__/stores.js
CHANGED
|
@@ -23,7 +23,7 @@ const mockSettingsWritable = writable(settingsFixture);
|
|
|
23
23
|
const mockActiveSubgraphsWritable = writable({});
|
|
24
24
|
const mockAccountsWritable = writable({});
|
|
25
25
|
const mockActiveAccountsItemsWritable = writable({});
|
|
26
|
-
const
|
|
26
|
+
const mockShowInactiveOrdersWritable = writable(true);
|
|
27
27
|
const mockOrderHashWritable = writable('');
|
|
28
28
|
const mockHideZeroBalanceVaultsWritable = writable(false);
|
|
29
29
|
const mockActiveNetworkRefWritable = writable('');
|
|
@@ -52,10 +52,10 @@ export const mockActiveAccountsItemsStore = {
|
|
|
52
52
|
set: mockActiveAccountsItemsWritable.set,
|
|
53
53
|
mockSetSubscribeValue: (value) => mockActiveAccountsItemsWritable.set(value)
|
|
54
54
|
};
|
|
55
|
-
export const
|
|
56
|
-
subscribe:
|
|
57
|
-
set:
|
|
58
|
-
mockSetSubscribeValue: (value) =>
|
|
55
|
+
export const mockShowInactiveOrdersStore = {
|
|
56
|
+
subscribe: mockShowInactiveOrdersWritable.subscribe,
|
|
57
|
+
set: mockShowInactiveOrdersWritable.set,
|
|
58
|
+
mockSetSubscribeValue: (value) => mockShowInactiveOrdersWritable.set(value)
|
|
59
59
|
};
|
|
60
60
|
export const mockOrderHashStore = {
|
|
61
61
|
subscribe: mockOrderHashWritable.subscribe,
|
|
@@ -15,7 +15,7 @@ export let hideZeroBalanceVaults;
|
|
|
15
15
|
export let activeAccountsItems;
|
|
16
16
|
export let showMyItemsOnly;
|
|
17
17
|
export let activeSubgraphs;
|
|
18
|
-
export let
|
|
18
|
+
export let showInactiveOrders;
|
|
19
19
|
export let orderHash;
|
|
20
20
|
$: isVaultsPage = $page.url.pathname === "/vaults";
|
|
21
21
|
$: isOrdersPage = $page.url.pathname === "/orders";
|
|
@@ -48,7 +48,7 @@ const { account } = useAccount();
|
|
|
48
48
|
{#if isOrdersPage}
|
|
49
49
|
<InputOrderHash {orderHash} />
|
|
50
50
|
<div class="mt-4">
|
|
51
|
-
<CheckboxActiveOrders {
|
|
51
|
+
<CheckboxActiveOrders {showInactiveOrders} />
|
|
52
52
|
</div>
|
|
53
53
|
{/if}
|
|
54
54
|
{#if $accounts && Object.values($accounts).length > 0}
|
|
@@ -9,7 +9,7 @@ declare class __sveltets_Render<T> {
|
|
|
9
9
|
activeAccountsItems: Writable<Record<string, string>> | undefined;
|
|
10
10
|
showMyItemsOnly: Writable<boolean>;
|
|
11
11
|
activeSubgraphs: Writable<Record<string, string>>;
|
|
12
|
-
|
|
12
|
+
showInactiveOrders: Writable<boolean>;
|
|
13
13
|
orderHash: Writable<string>;
|
|
14
14
|
};
|
|
15
15
|
events(): {} & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>import { Checkbox } from "flowbite-svelte";
|
|
2
|
-
export let
|
|
3
|
-
let checked = $
|
|
2
|
+
export let showInactiveOrders;
|
|
3
|
+
let checked = $showInactiveOrders ? true : false;
|
|
4
4
|
function handleChange() {
|
|
5
|
-
$
|
|
5
|
+
$showInactiveOrders = !$showInactiveOrders;
|
|
6
6
|
}
|
|
7
7
|
</script>
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ export let activeSubgraphs;
|
|
|
24
24
|
export let settings;
|
|
25
25
|
export let accounts;
|
|
26
26
|
export let activeAccountsItems;
|
|
27
|
-
export let
|
|
27
|
+
export let showInactiveOrders;
|
|
28
28
|
export let orderHash;
|
|
29
29
|
export let hideZeroBalanceVaults;
|
|
30
30
|
export let showMyItemsOnly;
|
|
@@ -45,7 +45,7 @@ $: query = createInfiniteQuery({
|
|
|
45
45
|
$settings,
|
|
46
46
|
multiSubgraphArgs,
|
|
47
47
|
owners,
|
|
48
|
-
$
|
|
48
|
+
$showInactiveOrders,
|
|
49
49
|
$orderHash
|
|
50
50
|
],
|
|
51
51
|
queryFn: ({ pageParam }) => {
|
|
@@ -53,7 +53,7 @@ $: query = createInfiniteQuery({
|
|
|
53
53
|
multiSubgraphArgs,
|
|
54
54
|
{
|
|
55
55
|
owners,
|
|
56
|
-
active:
|
|
56
|
+
active: $showInactiveOrders ? void 0 : true,
|
|
57
57
|
orderHash: $orderHash || void 0
|
|
58
58
|
},
|
|
59
59
|
{ page: pageParam + 1, pageSize: DEFAULT_PAGE_SIZE }
|
|
@@ -75,7 +75,7 @@ const AppTable = TanstackAppTable;
|
|
|
75
75
|
{accounts}
|
|
76
76
|
{activeAccountsItems}
|
|
77
77
|
{showMyItemsOnly}
|
|
78
|
-
{
|
|
78
|
+
{showInactiveOrders}
|
|
79
79
|
{orderHash}
|
|
80
80
|
{hideZeroBalanceVaults}
|
|
81
81
|
/>
|
|
@@ -7,7 +7,7 @@ declare class __sveltets_Render<T> {
|
|
|
7
7
|
settings: AppStoresInterface["settings"];
|
|
8
8
|
accounts: AppStoresInterface["accounts"] | undefined;
|
|
9
9
|
activeAccountsItems: AppStoresInterface["activeAccountsItems"] | undefined;
|
|
10
|
-
|
|
10
|
+
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
11
11
|
orderHash: AppStoresInterface["orderHash"];
|
|
12
12
|
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
13
13
|
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
@@ -24,7 +24,7 @@ export let activeAccountsItems;
|
|
|
24
24
|
export let orderHash;
|
|
25
25
|
export let activeSubgraphs;
|
|
26
26
|
export let settings;
|
|
27
|
-
export let
|
|
27
|
+
export let showInactiveOrders;
|
|
28
28
|
export let hideZeroBalanceVaults;
|
|
29
29
|
export let activeNetworkRef;
|
|
30
30
|
export let activeOrderbookRef;
|
|
@@ -82,7 +82,7 @@ const AppTable = TanstackAppTable;
|
|
|
82
82
|
{accounts}
|
|
83
83
|
{activeAccountsItems}
|
|
84
84
|
{showMyItemsOnly}
|
|
85
|
-
{
|
|
85
|
+
{showInactiveOrders}
|
|
86
86
|
{orderHash}
|
|
87
87
|
{hideZeroBalanceVaults}
|
|
88
88
|
/>
|
|
@@ -12,7 +12,7 @@ declare class __sveltets_Render<T> {
|
|
|
12
12
|
orderHash: Writable<string>;
|
|
13
13
|
activeSubgraphs: Writable<Record<string, string>>;
|
|
14
14
|
settings: Writable<ConfigSource | undefined>;
|
|
15
|
-
|
|
15
|
+
showInactiveOrders: Writable<boolean>;
|
|
16
16
|
hideZeroBalanceVaults: Writable<boolean>;
|
|
17
17
|
activeNetworkRef: Writable<string | undefined>;
|
|
18
18
|
activeOrderbookRef: Writable<string | undefined>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/svelte-query';
|
|
2
2
|
export declare const queryClient: QueryClient;
|
|
3
|
-
export declare const invalidateTanstackQueries: (queryClient: QueryClient, queryKey: string[]) => void
|
|
3
|
+
export declare const invalidateTanstackQueries: (queryClient: QueryClient, queryKey: string[]) => Promise<void>;
|
|
@@ -7,10 +7,15 @@ export const queryClient = new QueryClient({
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
|
-
export const invalidateTanstackQueries = (queryClient, queryKey) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export const invalidateTanstackQueries = async (queryClient, queryKey) => {
|
|
11
|
+
try {
|
|
12
|
+
await queryClient.invalidateQueries({
|
|
13
|
+
queryKey,
|
|
14
|
+
refetchType: 'all',
|
|
15
|
+
exact: false
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
throw new Error('Failed to refresh data.');
|
|
20
|
+
}
|
|
16
21
|
};
|
|
@@ -5,7 +5,7 @@ export interface AppStoresInterface {
|
|
|
5
5
|
activeSubgraphs: Writable<Record<string, string>>;
|
|
6
6
|
accounts: Readable<Record<string, string>>;
|
|
7
7
|
activeAccountsItems: Writable<Record<string, string>>;
|
|
8
|
-
|
|
8
|
+
showInactiveOrders: Writable<boolean>;
|
|
9
9
|
orderHash: Writable<string>;
|
|
10
10
|
hideZeroBalanceVaults: Writable<boolean>;
|
|
11
11
|
activeNetworkRef: Writable<string | undefined>;
|
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.86",
|
|
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.86",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|