@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.
@@ -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 mockActiveOrderStatusStore: {
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;
@@ -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 mockActiveOrderStatusWritable = writable(true);
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 mockActiveOrderStatusStore = {
56
- subscribe: mockActiveOrderStatusWritable.subscribe,
57
- set: mockActiveOrderStatusWritable.set,
58
- mockSetSubscribeValue: (value) => mockActiveOrderStatusWritable.set(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 activeOrderStatus;
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 {activeOrderStatus} />
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
- activeOrderStatus: Writable<boolean>;
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 activeOrderStatus;
3
- let checked = $activeOrderStatus ? false : true;
2
+ export let showInactiveOrders;
3
+ let checked = $showInactiveOrders ? true : false;
4
4
  function handleChange() {
5
- $activeOrderStatus = $activeOrderStatus ? false : true;
5
+ $showInactiveOrders = !$showInactiveOrders;
6
6
  }
7
7
  </script>
8
8
 
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import type { Writable } from 'svelte/store';
3
3
  declare const __propDef: {
4
4
  props: {
5
- activeOrderStatus: Writable<boolean>;
5
+ showInactiveOrders: Writable<boolean>;
6
6
  };
7
7
  events: {
8
8
  [evt: string]: CustomEvent<any>;
@@ -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 activeOrderStatus;
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
- $activeOrderStatus,
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: !$activeOrderStatus ? void 0 : true,
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
- {activeOrderStatus}
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
- activeOrderStatus: AppStoresInterface["activeOrderStatus"];
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 activeOrderStatus;
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
- {activeOrderStatus}
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
- activeOrderStatus: Writable<boolean>;
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
- queryClient.invalidateQueries({
12
- queryKey,
13
- refetchType: 'all',
14
- exact: false
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
- activeOrderStatus: Writable<boolean>;
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.84",
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.84",
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",