@rainlanguage/ui-components 0.0.1-alpha.85 → 0.0.1-alpha.87
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/CheckboxMyItemsOnly.svelte.d.ts +2 -2
- package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
- package/dist/components/ListViewOrderbookFilters.svelte +2 -2
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +9 -10
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +3 -3
- package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +2 -2
- package/dist/components/detail/VaultDetail.svelte.d.ts +1 -1
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +3 -3
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +3 -3
- package/dist/components/input/InputOrderHash.svelte.d.ts +2 -2
- 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 -4
- package/dist/components/tables/VaultsListTable.svelte.d.ts +12 -16
- package/dist/types/appStores.d.ts +3 -3
- 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,
|
|
@@ -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
|
-
showMyItemsOnly:
|
|
5
|
+
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
6
6
|
context: "orders" | "vaults";
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
@@ -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>;
|
|
@@ -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}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type {
|
|
3
|
-
import type { ConfigSource } from '@rainlanguage/orderbook';
|
|
2
|
+
import type { AppStoresInterface } from '../types/appStores';
|
|
4
3
|
declare class __sveltets_Render<T> {
|
|
5
4
|
props(): {
|
|
6
|
-
settings:
|
|
7
|
-
accounts:
|
|
8
|
-
hideZeroBalanceVaults:
|
|
9
|
-
activeAccountsItems:
|
|
10
|
-
showMyItemsOnly:
|
|
11
|
-
activeSubgraphs:
|
|
12
|
-
|
|
13
|
-
orderHash:
|
|
5
|
+
settings: AppStoresInterface["settings"];
|
|
6
|
+
accounts: AppStoresInterface["accounts"];
|
|
7
|
+
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
8
|
+
activeAccountsItems: AppStoresInterface["activeAccountsItems"];
|
|
9
|
+
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
10
|
+
activeSubgraphs: AppStoresInterface["activeSubgraphs"];
|
|
11
|
+
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
12
|
+
orderHash: AppStoresInterface["orderHash"];
|
|
14
13
|
};
|
|
15
14
|
events(): {} & {
|
|
16
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -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
|
|
|
@@ -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
|
-
|
|
5
|
+
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
lightweightChartsTheme?: Readable<ChartTheme> | undefined;
|
|
11
11
|
activeNetworkRef: AppStoresInterface["activeNetworkRef"];
|
|
12
12
|
activeOrderbookRef: AppStoresInterface["activeOrderbookRef"];
|
|
13
|
-
settings:
|
|
13
|
+
settings: AppStoresInterface["settings"];
|
|
14
14
|
/**
|
|
15
15
|
* Required callback function when deposit action is triggered for a vault
|
|
16
16
|
* @param vault The vault to deposit into
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { Writable } from 'svelte/store';
|
|
3
2
|
import type { ConfigSource } from '@rainlanguage/orderbook';
|
|
3
|
+
import type { AppStoresInterface } from '../../types/appStores';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
|
-
settings: ConfigSource;
|
|
7
|
-
activeSubgraphs:
|
|
6
|
+
settings: ConfigSource | undefined;
|
|
7
|
+
activeSubgraphs: AppStoresInterface["activeSubgraphs"];
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
accounts:
|
|
6
|
-
activeAccountsItems:
|
|
5
|
+
accounts: AppStoresInterface["accounts"];
|
|
6
|
+
activeAccountsItems: AppStoresInterface["activeAccountsItems"];
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -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
|
-
orderHash:
|
|
5
|
+
orderHash: AppStoresInterface["orderHash"];
|
|
6
6
|
value?: string;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
@@ -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"];
|
|
@@ -10,12 +10,10 @@ import { DEFAULT_PAGE_SIZE, DEFAULT_REFRESH_INTERVAL } from "../../queries/const
|
|
|
10
10
|
import { vaultBalanceDisplay } from "../../utils/vault";
|
|
11
11
|
import { bigintStringToHex } from "../../utils/hex";
|
|
12
12
|
import {} from "@rainlanguage/orderbook";
|
|
13
|
-
import {} from "@rainlanguage/orderbook";
|
|
14
13
|
import { QKEY_VAULTS } from "../../queries/keys";
|
|
15
14
|
import {
|
|
16
15
|
getVaults
|
|
17
16
|
} from "@rainlanguage/orderbook";
|
|
18
|
-
import {} from "svelte/store";
|
|
19
17
|
import { useAccount } from "../../providers/wallet/useAccount";
|
|
20
18
|
export let activeOrderbook;
|
|
21
19
|
export let subgraphUrl;
|
|
@@ -24,7 +22,7 @@ export let activeAccountsItems;
|
|
|
24
22
|
export let orderHash;
|
|
25
23
|
export let activeSubgraphs;
|
|
26
24
|
export let settings;
|
|
27
|
-
export let
|
|
25
|
+
export let showInactiveOrders;
|
|
28
26
|
export let hideZeroBalanceVaults;
|
|
29
27
|
export let activeNetworkRef;
|
|
30
28
|
export let activeOrderbookRef;
|
|
@@ -82,7 +80,7 @@ const AppTable = TanstackAppTable;
|
|
|
82
80
|
{accounts}
|
|
83
81
|
{activeAccountsItems}
|
|
84
82
|
{showMyItemsOnly}
|
|
85
|
-
{
|
|
83
|
+
{showInactiveOrders}
|
|
86
84
|
{orderHash}
|
|
87
85
|
{hideZeroBalanceVaults}
|
|
88
86
|
/>
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { type ConfigSource, type OrderbookConfigSource } from '@rainlanguage/orderbook';
|
|
3
2
|
import { type SgVault } from '@rainlanguage/orderbook';
|
|
4
|
-
import { type Writable, type Readable } from 'svelte/store';
|
|
5
3
|
import type { AppStoresInterface } from '../../types/appStores.ts';
|
|
6
4
|
declare class __sveltets_Render<T> {
|
|
7
5
|
props(): {
|
|
8
|
-
activeOrderbook:
|
|
9
|
-
subgraphUrl:
|
|
10
|
-
accounts: AppStoresInterface["accounts"]
|
|
11
|
-
activeAccountsItems: AppStoresInterface["activeAccountsItems"]
|
|
12
|
-
orderHash:
|
|
13
|
-
activeSubgraphs:
|
|
14
|
-
settings:
|
|
15
|
-
|
|
16
|
-
hideZeroBalanceVaults:
|
|
17
|
-
activeNetworkRef:
|
|
18
|
-
activeOrderbookRef:
|
|
19
|
-
activeAccounts:
|
|
20
|
-
[k: string]: string;
|
|
21
|
-
}>;
|
|
6
|
+
activeOrderbook: AppStoresInterface["activeOrderbook"];
|
|
7
|
+
subgraphUrl: AppStoresInterface["subgraphUrl"];
|
|
8
|
+
accounts: AppStoresInterface["accounts"];
|
|
9
|
+
activeAccountsItems: AppStoresInterface["activeAccountsItems"];
|
|
10
|
+
orderHash: AppStoresInterface["orderHash"];
|
|
11
|
+
activeSubgraphs: AppStoresInterface["activeSubgraphs"];
|
|
12
|
+
settings: AppStoresInterface["settings"];
|
|
13
|
+
showInactiveOrders: AppStoresInterface["showInactiveOrders"];
|
|
14
|
+
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
15
|
+
activeNetworkRef: AppStoresInterface["activeNetworkRef"];
|
|
16
|
+
activeOrderbookRef: AppStoresInterface["activeOrderbookRef"];
|
|
17
|
+
activeAccounts: AppStoresInterface["activeAccounts"];
|
|
22
18
|
handleDepositGenericModal?: (() => void) | undefined;
|
|
23
19
|
handleDepositModal?: ((vault: SgVault, refetch: () => void) => void) | undefined;
|
|
24
20
|
handleWithdrawModal?: ((vault: SgVault, refetch: () => void) => void) | undefined;
|
|
@@ -3,9 +3,9 @@ import type { ConfigSource, OrderbookConfigSource } from '@rainlanguage/orderboo
|
|
|
3
3
|
export interface AppStoresInterface {
|
|
4
4
|
settings: Writable<ConfigSource | undefined>;
|
|
5
5
|
activeSubgraphs: Writable<Record<string, string>>;
|
|
6
|
-
accounts: Readable<Record<string, string
|
|
7
|
-
activeAccountsItems: Writable<Record<string, string
|
|
8
|
-
|
|
6
|
+
accounts: Readable<Record<string, string>> | undefined;
|
|
7
|
+
activeAccountsItems: Writable<Record<string, string>> | undefined;
|
|
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.87",
|
|
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.87",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|