@rainlanguage/ui-components 0.0.1-alpha.71 → 0.0.1-alpha.73
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 +8 -5
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +0 -2
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +9 -0
- package/dist/components/{dropdown/DropdownOrderStatus.svelte.d.ts → checkbox/CheckboxActiveOrders.svelte.d.ts} +4 -4
- package/dist/components/tables/OrdersListTable.svelte +0 -5
- package/dist/components/tables/OrdersListTable.svelte.d.ts +0 -1
- package/dist/components/tables/VaultsListTable.svelte +0 -5
- package/dist/components/tables/VaultsListTable.svelte.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<script generics="T">import {
|
|
1
|
+
<script generics="T">import { page } from "$app/stores";
|
|
2
|
+
import { isEmpty } from "lodash";
|
|
2
3
|
import { Alert } from "flowbite-svelte";
|
|
3
4
|
import Tooltip from "./Tooltip.svelte";
|
|
4
5
|
import DropdownActiveSubgraphs from "./dropdown/DropdownActiveSubgraphs.svelte";
|
|
5
|
-
import
|
|
6
|
+
import CheckboxActiveOrders from "./checkbox/CheckboxActiveOrders.svelte";
|
|
6
7
|
import DropdownOrderListAccounts from "./dropdown/DropdownOrderListAccounts.svelte";
|
|
7
8
|
import InputOrderHash from "./input/InputOrderHash.svelte";
|
|
8
9
|
import CheckboxZeroBalanceVault from "./CheckboxZeroBalanceVault.svelte";
|
|
@@ -16,8 +17,8 @@ export let showMyItemsOnly;
|
|
|
16
17
|
export let activeSubgraphs;
|
|
17
18
|
export let activeOrderStatus;
|
|
18
19
|
export let orderHash;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
$: isVaultsPage = $page.url.pathname === "/vaults";
|
|
21
|
+
$: isOrdersPage = $page.url.pathname === "/orders";
|
|
21
22
|
const { account } = useAccount();
|
|
22
23
|
</script>
|
|
23
24
|
|
|
@@ -46,7 +47,9 @@ const { account } = useAccount();
|
|
|
46
47
|
|
|
47
48
|
{#if isOrdersPage}
|
|
48
49
|
<InputOrderHash {orderHash} />
|
|
49
|
-
<
|
|
50
|
+
<div class="mt-4">
|
|
51
|
+
<CheckboxActiveOrders {activeOrderStatus} />
|
|
52
|
+
</div>
|
|
50
53
|
{/if}
|
|
51
54
|
{#if $accounts && Object.values($accounts).length > 0}
|
|
52
55
|
<DropdownOrderListAccounts {accounts} {activeAccountsItems} />
|
|
@@ -11,8 +11,6 @@ declare class __sveltets_Render<T> {
|
|
|
11
11
|
activeSubgraphs: Writable<Record<string, string>>;
|
|
12
12
|
activeOrderStatus: Writable<boolean | undefined>;
|
|
13
13
|
orderHash: Writable<string>;
|
|
14
|
-
isVaultsPage: boolean;
|
|
15
|
-
isOrdersPage: boolean;
|
|
16
14
|
};
|
|
17
15
|
events(): {} & {
|
|
18
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { Checkbox } from "flowbite-svelte";
|
|
2
|
+
export let activeOrderStatus;
|
|
3
|
+
let includeInactive = $activeOrderStatus;
|
|
4
|
+
$: activeOrderStatus.set(includeInactive ? void 0 : true);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div data-testid="order-status-checkbox">
|
|
8
|
+
<Checkbox bind:checked={includeInactive}>Include inactive orders</Checkbox>
|
|
9
|
+
</div>
|
|
@@ -11,9 +11,9 @@ declare const __propDef: {
|
|
|
11
11
|
exports?: {} | undefined;
|
|
12
12
|
bindings?: string | undefined;
|
|
13
13
|
};
|
|
14
|
-
export type
|
|
15
|
-
export type
|
|
16
|
-
export type
|
|
17
|
-
export default class
|
|
14
|
+
export type CheckboxActiveOrdersProps = typeof __propDef.props;
|
|
15
|
+
export type CheckboxActiveOrdersEvents = typeof __propDef.events;
|
|
16
|
+
export type CheckboxActiveOrdersSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CheckboxActiveOrders extends SvelteComponent<CheckboxActiveOrdersProps, CheckboxActiveOrdersEvents, CheckboxActiveOrdersSlots> {
|
|
18
18
|
}
|
|
19
19
|
export {};
|
|
@@ -28,7 +28,6 @@ export let activeOrderStatus;
|
|
|
28
28
|
export let orderHash;
|
|
29
29
|
export let hideZeroBalanceVaults;
|
|
30
30
|
export let showMyItemsOnly;
|
|
31
|
-
export let currentRoute;
|
|
32
31
|
export let activeNetworkRef;
|
|
33
32
|
export let activeOrderbookRef;
|
|
34
33
|
const { matchesAccount, account } = useAccount();
|
|
@@ -68,8 +67,6 @@ $: query = createInfiniteQuery({
|
|
|
68
67
|
enabled: true
|
|
69
68
|
});
|
|
70
69
|
const AppTable = TanstackAppTable;
|
|
71
|
-
$: isVaultsPage = currentRoute.startsWith("/vaults");
|
|
72
|
-
$: isOrdersPage = currentRoute.startsWith("/orders");
|
|
73
70
|
</script>
|
|
74
71
|
|
|
75
72
|
<ListViewOrderbookFilters
|
|
@@ -81,8 +78,6 @@ $: isOrdersPage = currentRoute.startsWith("/orders");
|
|
|
81
78
|
{activeOrderStatus}
|
|
82
79
|
{orderHash}
|
|
83
80
|
{hideZeroBalanceVaults}
|
|
84
|
-
{isVaultsPage}
|
|
85
|
-
{isOrdersPage}
|
|
86
81
|
/>
|
|
87
82
|
|
|
88
83
|
<AppTable
|
|
@@ -11,7 +11,6 @@ declare class __sveltets_Render<T> {
|
|
|
11
11
|
orderHash: AppStoresInterface["orderHash"];
|
|
12
12
|
hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
|
|
13
13
|
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
14
|
-
currentRoute: string;
|
|
15
14
|
activeNetworkRef: AppStoresInterface["activeNetworkRef"];
|
|
16
15
|
activeOrderbookRef: AppStoresInterface["activeOrderbookRef"];
|
|
17
16
|
};
|
|
@@ -32,7 +32,6 @@ export let activeAccounts;
|
|
|
32
32
|
export let handleDepositGenericModal = void 0;
|
|
33
33
|
export let handleDepositModal = void 0;
|
|
34
34
|
export let handleWithdrawModal = void 0;
|
|
35
|
-
export let currentRoute;
|
|
36
35
|
export let showMyItemsOnly;
|
|
37
36
|
const { account, matchesAccount } = useAccount();
|
|
38
37
|
$: multiSubgraphArgs = Object.entries(
|
|
@@ -73,8 +72,6 @@ const updateActiveNetworkAndOrderbook = (subgraphName) => {
|
|
|
73
72
|
activeNetworkRef.set(subgraphName);
|
|
74
73
|
activeOrderbookRef.set(subgraphName);
|
|
75
74
|
};
|
|
76
|
-
$: isVaultsPage = currentRoute.startsWith("/vaults");
|
|
77
|
-
$: isOrdersPage = currentRoute.startsWith("/orders");
|
|
78
75
|
const AppTable = TanstackAppTable;
|
|
79
76
|
</script>
|
|
80
77
|
|
|
@@ -88,8 +85,6 @@ const AppTable = TanstackAppTable;
|
|
|
88
85
|
{activeOrderStatus}
|
|
89
86
|
{orderHash}
|
|
90
87
|
{hideZeroBalanceVaults}
|
|
91
|
-
{isVaultsPage}
|
|
92
|
-
{isOrdersPage}
|
|
93
88
|
/>
|
|
94
89
|
<AppTable
|
|
95
90
|
{query}
|
|
@@ -22,7 +22,6 @@ declare class __sveltets_Render<T> {
|
|
|
22
22
|
handleDepositGenericModal?: (() => void) | undefined;
|
|
23
23
|
handleDepositModal?: ((vault: SgVault, refetch: () => void) => void) | undefined;
|
|
24
24
|
handleWithdrawModal?: ((vault: SgVault, refetch: () => void) => void) | undefined;
|
|
25
|
-
currentRoute: string;
|
|
26
25
|
showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
|
|
27
26
|
};
|
|
28
27
|
events(): {} & {
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as DropdownCheckbox } from './components/dropdown/DropdownCheck
|
|
|
6
6
|
export { default as DropdownOrderListAccounts } from './components/dropdown/DropdownOrderListAccounts.svelte';
|
|
7
7
|
export { default as DropdownRadio } from './components/dropdown/DropdownRadio.svelte';
|
|
8
8
|
export { default as Refresh } from './components/icon/Refresh.svelte';
|
|
9
|
-
export { default as
|
|
9
|
+
export { default as CheckboxActiveOrders } from './components/checkbox/CheckboxActiveOrders.svelte';
|
|
10
10
|
export { default as InputOrderHash } from './components/input/InputOrderHash.svelte';
|
|
11
11
|
export { default as CheckboxZeroBalanceVault } from './components/CheckboxZeroBalanceVault.svelte';
|
|
12
12
|
export { default as ListViewOrderbookFilters } from './components/ListViewOrderbookFilters.svelte';
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export { default as DropdownCheckbox } from './components/dropdown/DropdownCheck
|
|
|
7
7
|
export { default as DropdownOrderListAccounts } from './components/dropdown/DropdownOrderListAccounts.svelte';
|
|
8
8
|
export { default as DropdownRadio } from './components/dropdown/DropdownRadio.svelte';
|
|
9
9
|
export { default as Refresh } from './components/icon/Refresh.svelte';
|
|
10
|
-
export { default as
|
|
10
|
+
export { default as CheckboxActiveOrders } from './components/checkbox/CheckboxActiveOrders.svelte';
|
|
11
11
|
export { default as InputOrderHash } from './components/input/InputOrderHash.svelte';
|
|
12
12
|
export { default as CheckboxZeroBalanceVault } from './components/CheckboxZeroBalanceVault.svelte';
|
|
13
13
|
export { default as ListViewOrderbookFilters } from './components/ListViewOrderbookFilters.svelte';
|
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.73",
|
|
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.73",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script>import DropdownCheckbox from "./DropdownCheckbox.svelte";
|
|
2
|
-
export let activeOrderStatus;
|
|
3
|
-
const orderStatusOptions = {
|
|
4
|
-
Active: "active",
|
|
5
|
-
Inactive: "inactive"
|
|
6
|
-
};
|
|
7
|
-
function handleStatusChange(event) {
|
|
8
|
-
let status = void 0;
|
|
9
|
-
let items = Object.keys(event.detail);
|
|
10
|
-
if (items.length === 0 || items.length === 2) {
|
|
11
|
-
status = void 0;
|
|
12
|
-
} else if (items.includes("Active")) {
|
|
13
|
-
status = true;
|
|
14
|
-
} else if (items.includes("Inactive")) {
|
|
15
|
-
status = false;
|
|
16
|
-
}
|
|
17
|
-
activeOrderStatus.set(status);
|
|
18
|
-
}
|
|
19
|
-
$: value = $activeOrderStatus === void 0 ? {} : $activeOrderStatus ? { Active: "active" } : { Inactive: "inactive" };
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<div data-testid="order-status-dropdown">
|
|
23
|
-
<DropdownCheckbox
|
|
24
|
-
options={orderStatusOptions}
|
|
25
|
-
on:change={handleStatusChange}
|
|
26
|
-
label="Status"
|
|
27
|
-
showAllLabel={false}
|
|
28
|
-
onlyTitle={true}
|
|
29
|
-
{value}
|
|
30
|
-
/>
|
|
31
|
-
</div>
|