@tanstack/query-devtools 5.83.1 → 5.84.0
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/build/DevtoolsComponent/{HKROQVJD.js → EDEL3XIZ.js} +1 -1
- package/build/DevtoolsComponent/{JH472VU3.js → LNWAZHJI.js} +1 -1
- package/build/DevtoolsPanelComponent/{OPQFORGE.js → MWZ6AO7Z.js} +1 -1
- package/build/DevtoolsPanelComponent/{UT2DTSDK.js → RN252AT2.js} +1 -1
- package/build/chunk/{SNNOUPG2.js → YPM2AS64.js} +273 -202
- package/build/chunk/{BWXLFTZP.js → YTSEMULZ.js} +273 -202
- package/build/dev.cjs +290 -205
- package/build/dev.js +18 -4
- package/build/index.cjs +290 -205
- package/build/index.d.cts +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +18 -4
- package/package.json +1 -1
- package/src/Devtools.tsx +85 -2
- package/src/TanstackQueryDevtools.tsx +7 -0
- package/src/TanstackQueryDevtoolsPanel.tsx +7 -0
- package/src/contexts/QueryDevtoolsContext.ts +1 -0
package/build/index.d.cts
CHANGED
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -13,6 +13,7 @@ var TanstackQueryDevtools = class {
|
|
|
13
13
|
#position;
|
|
14
14
|
#initialIsOpen;
|
|
15
15
|
#errorTypes;
|
|
16
|
+
#hideDisabledQueries;
|
|
16
17
|
#Component;
|
|
17
18
|
#dispose;
|
|
18
19
|
constructor(config) {
|
|
@@ -26,7 +27,8 @@ var TanstackQueryDevtools = class {
|
|
|
26
27
|
initialIsOpen,
|
|
27
28
|
errorTypes,
|
|
28
29
|
styleNonce,
|
|
29
|
-
shadowDOMTarget
|
|
30
|
+
shadowDOMTarget,
|
|
31
|
+
hideDisabledQueries
|
|
30
32
|
} = config;
|
|
31
33
|
this.#client = createSignal(client);
|
|
32
34
|
this.#queryFlavor = queryFlavor;
|
|
@@ -38,6 +40,7 @@ var TanstackQueryDevtools = class {
|
|
|
38
40
|
this.#position = createSignal(position);
|
|
39
41
|
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
40
42
|
this.#errorTypes = createSignal(errorTypes);
|
|
43
|
+
this.#hideDisabledQueries = createSignal(hideDisabledQueries);
|
|
41
44
|
}
|
|
42
45
|
setButtonPosition(position) {
|
|
43
46
|
this.#buttonPosition[1](position);
|
|
@@ -64,12 +67,13 @@ var TanstackQueryDevtools = class {
|
|
|
64
67
|
const [pos] = this.#position;
|
|
65
68
|
const [isOpen] = this.#initialIsOpen;
|
|
66
69
|
const [errors] = this.#errorTypes;
|
|
70
|
+
const [hideDisabledQueries] = this.#hideDisabledQueries;
|
|
67
71
|
const [queryClient] = this.#client;
|
|
68
72
|
let Devtools;
|
|
69
73
|
if (this.#Component) {
|
|
70
74
|
Devtools = this.#Component;
|
|
71
75
|
} else {
|
|
72
|
-
Devtools = lazy(() => import('./DevtoolsComponent/
|
|
76
|
+
Devtools = lazy(() => import('./DevtoolsComponent/LNWAZHJI.js'));
|
|
73
77
|
this.#Component = Devtools;
|
|
74
78
|
}
|
|
75
79
|
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
@@ -101,6 +105,9 @@ var TanstackQueryDevtools = class {
|
|
|
101
105
|
},
|
|
102
106
|
get errorTypes() {
|
|
103
107
|
return errors();
|
|
108
|
+
},
|
|
109
|
+
get hideDisabledQueries() {
|
|
110
|
+
return hideDisabledQueries();
|
|
104
111
|
}
|
|
105
112
|
}));
|
|
106
113
|
}, el);
|
|
@@ -129,6 +136,7 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
129
136
|
#position;
|
|
130
137
|
#initialIsOpen;
|
|
131
138
|
#errorTypes;
|
|
139
|
+
#hideDisabledQueries;
|
|
132
140
|
#onClose;
|
|
133
141
|
#Component;
|
|
134
142
|
#dispose;
|
|
@@ -144,7 +152,8 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
144
152
|
errorTypes,
|
|
145
153
|
styleNonce,
|
|
146
154
|
shadowDOMTarget,
|
|
147
|
-
onClose
|
|
155
|
+
onClose,
|
|
156
|
+
hideDisabledQueries
|
|
148
157
|
} = config;
|
|
149
158
|
this.#client = createSignal(client);
|
|
150
159
|
this.#queryFlavor = queryFlavor;
|
|
@@ -156,6 +165,7 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
156
165
|
this.#position = createSignal(position);
|
|
157
166
|
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
158
167
|
this.#errorTypes = createSignal(errorTypes);
|
|
168
|
+
this.#hideDisabledQueries = createSignal(hideDisabledQueries);
|
|
159
169
|
this.#onClose = createSignal(onClose);
|
|
160
170
|
}
|
|
161
171
|
setButtonPosition(position) {
|
|
@@ -186,13 +196,14 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
186
196
|
const [pos] = this.#position;
|
|
187
197
|
const [isOpen] = this.#initialIsOpen;
|
|
188
198
|
const [errors] = this.#errorTypes;
|
|
199
|
+
const [hideDisabledQueries] = this.#hideDisabledQueries;
|
|
189
200
|
const [queryClient] = this.#client;
|
|
190
201
|
const [onClose] = this.#onClose;
|
|
191
202
|
let Devtools;
|
|
192
203
|
if (this.#Component) {
|
|
193
204
|
Devtools = this.#Component;
|
|
194
205
|
} else {
|
|
195
|
-
Devtools = lazy(() => import('./DevtoolsPanelComponent/
|
|
206
|
+
Devtools = lazy(() => import('./DevtoolsPanelComponent/MWZ6AO7Z.js'));
|
|
196
207
|
this.#Component = Devtools;
|
|
197
208
|
}
|
|
198
209
|
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
@@ -225,6 +236,9 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
225
236
|
get errorTypes() {
|
|
226
237
|
return errors();
|
|
227
238
|
},
|
|
239
|
+
get hideDisabledQueries() {
|
|
240
|
+
return hideDisabledQueries();
|
|
241
|
+
},
|
|
228
242
|
get onClose() {
|
|
229
243
|
return onClose();
|
|
230
244
|
}
|
package/package.json
CHANGED
package/src/Devtools.tsx
CHANGED
|
@@ -659,17 +659,28 @@ export const ContentView: Component<ContentViewProps> = (props) => {
|
|
|
659
659
|
|
|
660
660
|
const queries = createMemo(
|
|
661
661
|
on(
|
|
662
|
-
() => [
|
|
662
|
+
() => [
|
|
663
|
+
queryCount(),
|
|
664
|
+
props.localStore.filter,
|
|
665
|
+
sort(),
|
|
666
|
+
sortOrder(),
|
|
667
|
+
props.localStore.hideDisabledQueries,
|
|
668
|
+
],
|
|
663
669
|
() => {
|
|
664
670
|
const curr = query_cache().getAll()
|
|
665
671
|
|
|
666
|
-
|
|
672
|
+
let filtered = props.localStore.filter
|
|
667
673
|
? curr.filter(
|
|
668
674
|
(item) =>
|
|
669
675
|
rankItem(item.queryHash, props.localStore.filter || '').passed,
|
|
670
676
|
)
|
|
671
677
|
: [...curr]
|
|
672
678
|
|
|
679
|
+
// Filter out disabled queries if hideDisabledQueries is enabled
|
|
680
|
+
if (props.localStore.hideDisabledQueries === 'true') {
|
|
681
|
+
filtered = filtered.filter((item) => !item.isDisabled())
|
|
682
|
+
}
|
|
683
|
+
|
|
673
684
|
const sorted = sortFn()
|
|
674
685
|
? filtered.sort((a, b) => sortFn()!(a, b) * sortOrder())
|
|
675
686
|
: filtered
|
|
@@ -1186,6 +1197,78 @@ export const ContentView: Component<ContentViewProps> = (props) => {
|
|
|
1186
1197
|
</DropdownMenu.SubContent>
|
|
1187
1198
|
</DropdownMenu.Portal>
|
|
1188
1199
|
</DropdownMenu.Sub>
|
|
1200
|
+
<DropdownMenu.Sub overlap gutter={8} shift={-4}>
|
|
1201
|
+
<DropdownMenu.SubTrigger
|
|
1202
|
+
class={cx(
|
|
1203
|
+
styles().settingsSubTrigger,
|
|
1204
|
+
'tsqd-settings-menu-sub-trigger',
|
|
1205
|
+
'tsqd-settings-menu-sub-trigger-disabled-queries',
|
|
1206
|
+
)}
|
|
1207
|
+
>
|
|
1208
|
+
<span>Disabled Queries</span>
|
|
1209
|
+
<ChevronDown />
|
|
1210
|
+
</DropdownMenu.SubTrigger>
|
|
1211
|
+
<DropdownMenu.Portal
|
|
1212
|
+
ref={(el) => setComputedVariables(el as HTMLDivElement)}
|
|
1213
|
+
mount={
|
|
1214
|
+
pip().pipWindow
|
|
1215
|
+
? pip().pipWindow!.document.body
|
|
1216
|
+
: document.body
|
|
1217
|
+
}
|
|
1218
|
+
>
|
|
1219
|
+
<DropdownMenu.SubContent
|
|
1220
|
+
class={cx(
|
|
1221
|
+
styles().settingsMenu,
|
|
1222
|
+
'tsqd-settings-submenu',
|
|
1223
|
+
)}
|
|
1224
|
+
>
|
|
1225
|
+
<DropdownMenu.Item
|
|
1226
|
+
onSelect={() => {
|
|
1227
|
+
props.setLocalStore('hideDisabledQueries', 'false')
|
|
1228
|
+
}}
|
|
1229
|
+
as="button"
|
|
1230
|
+
class={cx(
|
|
1231
|
+
styles().settingsSubButton,
|
|
1232
|
+
props.localStore.hideDisabledQueries !== 'true' &&
|
|
1233
|
+
styles().themeSelectedButton,
|
|
1234
|
+
'tsqd-settings-menu-position-btn',
|
|
1235
|
+
'tsqd-settings-menu-position-btn-show',
|
|
1236
|
+
)}
|
|
1237
|
+
>
|
|
1238
|
+
<span>Show</span>
|
|
1239
|
+
<Show
|
|
1240
|
+
when={
|
|
1241
|
+
props.localStore.hideDisabledQueries !== 'true'
|
|
1242
|
+
}
|
|
1243
|
+
>
|
|
1244
|
+
<CheckCircle />
|
|
1245
|
+
</Show>
|
|
1246
|
+
</DropdownMenu.Item>
|
|
1247
|
+
<DropdownMenu.Item
|
|
1248
|
+
onSelect={() => {
|
|
1249
|
+
props.setLocalStore('hideDisabledQueries', 'true')
|
|
1250
|
+
}}
|
|
1251
|
+
as="button"
|
|
1252
|
+
class={cx(
|
|
1253
|
+
styles().settingsSubButton,
|
|
1254
|
+
props.localStore.hideDisabledQueries === 'true' &&
|
|
1255
|
+
styles().themeSelectedButton,
|
|
1256
|
+
'tsqd-settings-menu-position-btn',
|
|
1257
|
+
'tsqd-settings-menu-position-btn-hide',
|
|
1258
|
+
)}
|
|
1259
|
+
>
|
|
1260
|
+
<span>Hide</span>
|
|
1261
|
+
<Show
|
|
1262
|
+
when={
|
|
1263
|
+
props.localStore.hideDisabledQueries === 'true'
|
|
1264
|
+
}
|
|
1265
|
+
>
|
|
1266
|
+
<CheckCircle />
|
|
1267
|
+
</Show>
|
|
1268
|
+
</DropdownMenu.Item>
|
|
1269
|
+
</DropdownMenu.SubContent>
|
|
1270
|
+
</DropdownMenu.Portal>
|
|
1271
|
+
</DropdownMenu.Sub>
|
|
1189
1272
|
</DropdownMenu.Content>
|
|
1190
1273
|
</DropdownMenu.Portal>
|
|
1191
1274
|
</DropdownMenu.Root>
|
|
@@ -31,6 +31,7 @@ class TanstackQueryDevtools {
|
|
|
31
31
|
#position: Signal<DevtoolsPosition | undefined>
|
|
32
32
|
#initialIsOpen: Signal<boolean | undefined>
|
|
33
33
|
#errorTypes: Signal<Array<DevtoolsErrorType> | undefined>
|
|
34
|
+
#hideDisabledQueries: Signal<boolean | undefined>
|
|
34
35
|
#Component: DevtoolsComponentType | undefined
|
|
35
36
|
#dispose?: () => void
|
|
36
37
|
|
|
@@ -46,6 +47,7 @@ class TanstackQueryDevtools {
|
|
|
46
47
|
errorTypes,
|
|
47
48
|
styleNonce,
|
|
48
49
|
shadowDOMTarget,
|
|
50
|
+
hideDisabledQueries,
|
|
49
51
|
} = config
|
|
50
52
|
this.#client = createSignal(client)
|
|
51
53
|
this.#queryFlavor = queryFlavor
|
|
@@ -57,6 +59,7 @@ class TanstackQueryDevtools {
|
|
|
57
59
|
this.#position = createSignal(position)
|
|
58
60
|
this.#initialIsOpen = createSignal(initialIsOpen)
|
|
59
61
|
this.#errorTypes = createSignal(errorTypes)
|
|
62
|
+
this.#hideDisabledQueries = createSignal(hideDisabledQueries)
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
setButtonPosition(position: DevtoolsButtonPosition) {
|
|
@@ -88,6 +91,7 @@ class TanstackQueryDevtools {
|
|
|
88
91
|
const [pos] = this.#position
|
|
89
92
|
const [isOpen] = this.#initialIsOpen
|
|
90
93
|
const [errors] = this.#errorTypes
|
|
94
|
+
const [hideDisabledQueries] = this.#hideDisabledQueries
|
|
91
95
|
const [queryClient] = this.#client
|
|
92
96
|
let Devtools: DevtoolsComponentType
|
|
93
97
|
|
|
@@ -121,6 +125,9 @@ class TanstackQueryDevtools {
|
|
|
121
125
|
get errorTypes() {
|
|
122
126
|
return errors()
|
|
123
127
|
},
|
|
128
|
+
get hideDisabledQueries() {
|
|
129
|
+
return hideDisabledQueries()
|
|
130
|
+
},
|
|
124
131
|
}}
|
|
125
132
|
/>
|
|
126
133
|
)
|
|
@@ -32,6 +32,7 @@ class TanstackQueryDevtoolsPanel {
|
|
|
32
32
|
#position: Signal<DevtoolsPosition | undefined>
|
|
33
33
|
#initialIsOpen: Signal<boolean | undefined>
|
|
34
34
|
#errorTypes: Signal<Array<DevtoolsErrorType> | undefined>
|
|
35
|
+
#hideDisabledQueries: Signal<boolean | undefined>
|
|
35
36
|
#onClose: Signal<(() => unknown) | undefined>
|
|
36
37
|
#Component: DevtoolsComponentType | undefined
|
|
37
38
|
#dispose?: () => void
|
|
@@ -49,6 +50,7 @@ class TanstackQueryDevtoolsPanel {
|
|
|
49
50
|
styleNonce,
|
|
50
51
|
shadowDOMTarget,
|
|
51
52
|
onClose,
|
|
53
|
+
hideDisabledQueries,
|
|
52
54
|
} = config
|
|
53
55
|
this.#client = createSignal(client)
|
|
54
56
|
this.#queryFlavor = queryFlavor
|
|
@@ -60,6 +62,7 @@ class TanstackQueryDevtoolsPanel {
|
|
|
60
62
|
this.#position = createSignal(position)
|
|
61
63
|
this.#initialIsOpen = createSignal(initialIsOpen)
|
|
62
64
|
this.#errorTypes = createSignal(errorTypes)
|
|
65
|
+
this.#hideDisabledQueries = createSignal(hideDisabledQueries)
|
|
63
66
|
this.#onClose = createSignal(onClose)
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -96,6 +99,7 @@ class TanstackQueryDevtoolsPanel {
|
|
|
96
99
|
const [pos] = this.#position
|
|
97
100
|
const [isOpen] = this.#initialIsOpen
|
|
98
101
|
const [errors] = this.#errorTypes
|
|
102
|
+
const [hideDisabledQueries] = this.#hideDisabledQueries
|
|
99
103
|
const [queryClient] = this.#client
|
|
100
104
|
const [onClose] = this.#onClose
|
|
101
105
|
let Devtools: DevtoolsComponentType
|
|
@@ -130,6 +134,9 @@ class TanstackQueryDevtoolsPanel {
|
|
|
130
134
|
get errorTypes() {
|
|
131
135
|
return errors()
|
|
132
136
|
},
|
|
137
|
+
get hideDisabledQueries() {
|
|
138
|
+
return hideDisabledQueries()
|
|
139
|
+
},
|
|
133
140
|
get onClose() {
|
|
134
141
|
return onClose()
|
|
135
142
|
},
|