@tanstack/query-devtools
Advanced tools
Comparing version 5.0.0-rc.13 to 5.0.0-rc.14
@@ -5,3 +5,13 @@ import { createSignal, render, lazy, createComponent, mergeProps } from './chunk/L2WNRKEK.js'; | ||
var TanstackQueryDevtools = class { | ||
isMounted = false; | ||
#client; | ||
#onlineManager; | ||
#queryFlavor; | ||
#version; | ||
#isMounted = false; | ||
#buttonPosition; | ||
#position; | ||
#initialIsOpen; | ||
#errorTypes; | ||
#Component; | ||
#dispose; | ||
constructor(config) { | ||
@@ -18,42 +28,42 @@ const { | ||
} = config; | ||
this.client = createSignal(client); | ||
this.queryFlavor = queryFlavor; | ||
this.version = version; | ||
this.onlineManager = onlineManager; | ||
this.buttonPosition = createSignal(buttonPosition); | ||
this.position = createSignal(position); | ||
this.initialIsOpen = createSignal(initialIsOpen); | ||
this.errorTypes = createSignal(errorTypes); | ||
this.#client = createSignal(client); | ||
this.#queryFlavor = queryFlavor; | ||
this.#version = version; | ||
this.#onlineManager = onlineManager; | ||
this.#buttonPosition = createSignal(buttonPosition); | ||
this.#position = createSignal(position); | ||
this.#initialIsOpen = createSignal(initialIsOpen); | ||
this.#errorTypes = createSignal(errorTypes); | ||
} | ||
setButtonPosition(position) { | ||
this.buttonPosition[1](position); | ||
this.#buttonPosition[1](position); | ||
} | ||
setPosition(position) { | ||
this.position[1](position); | ||
this.#position[1](position); | ||
} | ||
setInitialIsOpen(isOpen) { | ||
this.initialIsOpen[1](isOpen); | ||
this.#initialIsOpen[1](isOpen); | ||
} | ||
setErrorTypes(errorTypes) { | ||
this.errorTypes[1](errorTypes); | ||
this.#errorTypes[1](errorTypes); | ||
} | ||
setClient(client) { | ||
this.client[1](client); | ||
this.#client[1](client); | ||
} | ||
mount(el) { | ||
if (this.isMounted) { | ||
if (this.#isMounted) { | ||
throw new Error("Devtools is already mounted"); | ||
} | ||
const dispose = render(() => { | ||
const [btnPosition] = this.buttonPosition; | ||
const [pos] = this.position; | ||
const [isOpen] = this.initialIsOpen; | ||
const [errors] = this.errorTypes; | ||
const [queryClient] = this.client; | ||
const [btnPosition] = this.#buttonPosition; | ||
const [pos] = this.#position; | ||
const [isOpen] = this.#initialIsOpen; | ||
const [errors] = this.#errorTypes; | ||
const [queryClient] = this.#client; | ||
let Devtools; | ||
if (this.Component) { | ||
Devtools = this.Component; | ||
if (this.#Component) { | ||
Devtools = this.#Component; | ||
} else { | ||
Devtools = lazy(() => import('./Devtools/YSRICXZI.js')); | ||
this.Component = Devtools; | ||
this.#Component = Devtools; | ||
} | ||
@@ -63,9 +73,9 @@ const _self$ = this; | ||
get queryFlavor() { | ||
return _self$.queryFlavor; | ||
return _self$.#queryFlavor; | ||
}, | ||
get version() { | ||
return _self$.version; | ||
return _self$.#version; | ||
}, | ||
get onlineManager() { | ||
return _self$.onlineManager; | ||
return _self$.#onlineManager; | ||
} | ||
@@ -90,11 +100,11 @@ }, { | ||
}, el); | ||
this.isMounted = true; | ||
this.dispose = dispose; | ||
this.#isMounted = true; | ||
this.#dispose = dispose; | ||
} | ||
unmount() { | ||
if (!this.isMounted) { | ||
if (!this.#isMounted) { | ||
throw new Error("Devtools is not mounted"); | ||
} | ||
this.dispose?.(); | ||
this.isMounted = false; | ||
this.#dispose?.(); | ||
this.#isMounted = false; | ||
} | ||
@@ -101,0 +111,0 @@ }; |
@@ -9,4 +9,14 @@ import { | ||
var TanstackQueryDevtools = class { | ||
#client; | ||
#onlineManager; | ||
#queryFlavor; | ||
#version; | ||
#isMounted = false; | ||
#buttonPosition; | ||
#position; | ||
#initialIsOpen; | ||
#errorTypes; | ||
#Component; | ||
#dispose; | ||
constructor(config) { | ||
this.isMounted = false; | ||
const { | ||
@@ -22,47 +32,47 @@ client, | ||
} = config; | ||
this.client = createSignal(client); | ||
this.queryFlavor = queryFlavor; | ||
this.version = version; | ||
this.onlineManager = onlineManager; | ||
this.buttonPosition = createSignal(buttonPosition); | ||
this.position = createSignal(position); | ||
this.initialIsOpen = createSignal(initialIsOpen); | ||
this.errorTypes = createSignal(errorTypes); | ||
this.#client = createSignal(client); | ||
this.#queryFlavor = queryFlavor; | ||
this.#version = version; | ||
this.#onlineManager = onlineManager; | ||
this.#buttonPosition = createSignal(buttonPosition); | ||
this.#position = createSignal(position); | ||
this.#initialIsOpen = createSignal(initialIsOpen); | ||
this.#errorTypes = createSignal(errorTypes); | ||
} | ||
setButtonPosition(position) { | ||
this.buttonPosition[1](position); | ||
this.#buttonPosition[1](position); | ||
} | ||
setPosition(position) { | ||
this.position[1](position); | ||
this.#position[1](position); | ||
} | ||
setInitialIsOpen(isOpen) { | ||
this.initialIsOpen[1](isOpen); | ||
this.#initialIsOpen[1](isOpen); | ||
} | ||
setErrorTypes(errorTypes) { | ||
this.errorTypes[1](errorTypes); | ||
this.#errorTypes[1](errorTypes); | ||
} | ||
setClient(client) { | ||
this.client[1](client); | ||
this.#client[1](client); | ||
} | ||
mount(el) { | ||
if (this.isMounted) { | ||
if (this.#isMounted) { | ||
throw new Error("Devtools is already mounted"); | ||
} | ||
const dispose = render(() => { | ||
const [btnPosition] = this.buttonPosition; | ||
const [pos] = this.position; | ||
const [isOpen] = this.initialIsOpen; | ||
const [errors] = this.errorTypes; | ||
const [queryClient] = this.client; | ||
const [btnPosition] = this.#buttonPosition; | ||
const [pos] = this.#position; | ||
const [isOpen] = this.#initialIsOpen; | ||
const [errors] = this.#errorTypes; | ||
const [queryClient] = this.#client; | ||
let Devtools; | ||
if (this.Component) { | ||
Devtools = this.Component; | ||
if (this.#Component) { | ||
Devtools = this.#Component; | ||
} else { | ||
Devtools = lazy(() => import("./Devtools/OWSLDUSP.jsx")); | ||
this.Component = Devtools; | ||
this.#Component = Devtools; | ||
} | ||
return <Devtools | ||
queryFlavor={this.queryFlavor} | ||
version={this.version} | ||
onlineManager={this.onlineManager} | ||
queryFlavor={this.#queryFlavor} | ||
version={this.#version} | ||
onlineManager={this.#onlineManager} | ||
{...{ | ||
@@ -87,11 +97,11 @@ get client() { | ||
}, el); | ||
this.isMounted = true; | ||
this.dispose = dispose; | ||
this.#isMounted = true; | ||
this.#dispose = dispose; | ||
} | ||
unmount() { | ||
if (!this.isMounted) { | ||
if (!this.#isMounted) { | ||
throw new Error("Devtools is not mounted"); | ||
} | ||
this.dispose?.(); | ||
this.isMounted = false; | ||
this.#dispose?.(); | ||
this.#isMounted = false; | ||
} | ||
@@ -98,0 +108,0 @@ }; |
import { Query, QueryClient, onlineManager } from '@tanstack/query-core'; | ||
import { Component, Signal } from 'solid-js'; | ||
@@ -29,18 +28,6 @@ type XPosition = 'left' | 'right'; | ||
declare const DevtoolsComponent: Component<QueryDevtoolsProps>; | ||
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps { | ||
} | ||
declare class TanstackQueryDevtools { | ||
client: Signal<QueryClient>; | ||
onlineManager: typeof onlineManager; | ||
queryFlavor: string; | ||
version: string; | ||
isMounted: boolean; | ||
buttonPosition: Signal<DevtoolsButtonPosition | undefined>; | ||
position: Signal<DevtoolsPosition | undefined>; | ||
initialIsOpen: Signal<boolean | undefined>; | ||
errorTypes: Signal<Array<DevToolsErrorType> | undefined>; | ||
Component: typeof DevtoolsComponent | undefined; | ||
dispose?: () => void; | ||
#private; | ||
constructor(config: TanstackQueryDevtoolsConfig); | ||
@@ -47,0 +34,0 @@ setButtonPosition(position: DevtoolsButtonPosition): void; |
@@ -5,3 +5,13 @@ import { createSignal, render, lazy, createComponent, mergeProps } from './chunk/7MNJIXJ6.js'; | ||
var TanstackQueryDevtools = class { | ||
isMounted = false; | ||
#client; | ||
#onlineManager; | ||
#queryFlavor; | ||
#version; | ||
#isMounted = false; | ||
#buttonPosition; | ||
#position; | ||
#initialIsOpen; | ||
#errorTypes; | ||
#Component; | ||
#dispose; | ||
constructor(config) { | ||
@@ -18,42 +28,42 @@ const { | ||
} = config; | ||
this.client = createSignal(client); | ||
this.queryFlavor = queryFlavor; | ||
this.version = version; | ||
this.onlineManager = onlineManager; | ||
this.buttonPosition = createSignal(buttonPosition); | ||
this.position = createSignal(position); | ||
this.initialIsOpen = createSignal(initialIsOpen); | ||
this.errorTypes = createSignal(errorTypes); | ||
this.#client = createSignal(client); | ||
this.#queryFlavor = queryFlavor; | ||
this.#version = version; | ||
this.#onlineManager = onlineManager; | ||
this.#buttonPosition = createSignal(buttonPosition); | ||
this.#position = createSignal(position); | ||
this.#initialIsOpen = createSignal(initialIsOpen); | ||
this.#errorTypes = createSignal(errorTypes); | ||
} | ||
setButtonPosition(position) { | ||
this.buttonPosition[1](position); | ||
this.#buttonPosition[1](position); | ||
} | ||
setPosition(position) { | ||
this.position[1](position); | ||
this.#position[1](position); | ||
} | ||
setInitialIsOpen(isOpen) { | ||
this.initialIsOpen[1](isOpen); | ||
this.#initialIsOpen[1](isOpen); | ||
} | ||
setErrorTypes(errorTypes) { | ||
this.errorTypes[1](errorTypes); | ||
this.#errorTypes[1](errorTypes); | ||
} | ||
setClient(client) { | ||
this.client[1](client); | ||
this.#client[1](client); | ||
} | ||
mount(el) { | ||
if (this.isMounted) { | ||
if (this.#isMounted) { | ||
throw new Error("Devtools is already mounted"); | ||
} | ||
const dispose = render(() => { | ||
const [btnPosition] = this.buttonPosition; | ||
const [pos] = this.position; | ||
const [isOpen] = this.initialIsOpen; | ||
const [errors] = this.errorTypes; | ||
const [queryClient] = this.client; | ||
const [btnPosition] = this.#buttonPosition; | ||
const [pos] = this.#position; | ||
const [isOpen] = this.#initialIsOpen; | ||
const [errors] = this.#errorTypes; | ||
const [queryClient] = this.#client; | ||
let Devtools; | ||
if (this.Component) { | ||
Devtools = this.Component; | ||
if (this.#Component) { | ||
Devtools = this.#Component; | ||
} else { | ||
Devtools = lazy(() => import('./Devtools/4TNE5QTO.js')); | ||
this.Component = Devtools; | ||
this.#Component = Devtools; | ||
} | ||
@@ -63,9 +73,9 @@ const _self$ = this; | ||
get queryFlavor() { | ||
return _self$.queryFlavor; | ||
return _self$.#queryFlavor; | ||
}, | ||
get version() { | ||
return _self$.version; | ||
return _self$.#version; | ||
}, | ||
get onlineManager() { | ||
return _self$.onlineManager; | ||
return _self$.#onlineManager; | ||
} | ||
@@ -90,11 +100,11 @@ }, { | ||
}, el); | ||
this.isMounted = true; | ||
this.dispose = dispose; | ||
this.#isMounted = true; | ||
this.#dispose = dispose; | ||
} | ||
unmount() { | ||
if (!this.isMounted) { | ||
if (!this.#isMounted) { | ||
throw new Error("Devtools is not mounted"); | ||
} | ||
this.dispose?.(); | ||
this.isMounted = false; | ||
this.#dispose?.(); | ||
this.#isMounted = false; | ||
} | ||
@@ -101,0 +111,0 @@ }; |
@@ -9,4 +9,14 @@ import { | ||
var TanstackQueryDevtools = class { | ||
#client; | ||
#onlineManager; | ||
#queryFlavor; | ||
#version; | ||
#isMounted = false; | ||
#buttonPosition; | ||
#position; | ||
#initialIsOpen; | ||
#errorTypes; | ||
#Component; | ||
#dispose; | ||
constructor(config) { | ||
this.isMounted = false; | ||
const { | ||
@@ -22,47 +32,47 @@ client, | ||
} = config; | ||
this.client = createSignal(client); | ||
this.queryFlavor = queryFlavor; | ||
this.version = version; | ||
this.onlineManager = onlineManager; | ||
this.buttonPosition = createSignal(buttonPosition); | ||
this.position = createSignal(position); | ||
this.initialIsOpen = createSignal(initialIsOpen); | ||
this.errorTypes = createSignal(errorTypes); | ||
this.#client = createSignal(client); | ||
this.#queryFlavor = queryFlavor; | ||
this.#version = version; | ||
this.#onlineManager = onlineManager; | ||
this.#buttonPosition = createSignal(buttonPosition); | ||
this.#position = createSignal(position); | ||
this.#initialIsOpen = createSignal(initialIsOpen); | ||
this.#errorTypes = createSignal(errorTypes); | ||
} | ||
setButtonPosition(position) { | ||
this.buttonPosition[1](position); | ||
this.#buttonPosition[1](position); | ||
} | ||
setPosition(position) { | ||
this.position[1](position); | ||
this.#position[1](position); | ||
} | ||
setInitialIsOpen(isOpen) { | ||
this.initialIsOpen[1](isOpen); | ||
this.#initialIsOpen[1](isOpen); | ||
} | ||
setErrorTypes(errorTypes) { | ||
this.errorTypes[1](errorTypes); | ||
this.#errorTypes[1](errorTypes); | ||
} | ||
setClient(client) { | ||
this.client[1](client); | ||
this.#client[1](client); | ||
} | ||
mount(el) { | ||
if (this.isMounted) { | ||
if (this.#isMounted) { | ||
throw new Error("Devtools is already mounted"); | ||
} | ||
const dispose = render(() => { | ||
const [btnPosition] = this.buttonPosition; | ||
const [pos] = this.position; | ||
const [isOpen] = this.initialIsOpen; | ||
const [errors] = this.errorTypes; | ||
const [queryClient] = this.client; | ||
const [btnPosition] = this.#buttonPosition; | ||
const [pos] = this.#position; | ||
const [isOpen] = this.#initialIsOpen; | ||
const [errors] = this.#errorTypes; | ||
const [queryClient] = this.#client; | ||
let Devtools; | ||
if (this.Component) { | ||
Devtools = this.Component; | ||
if (this.#Component) { | ||
Devtools = this.#Component; | ||
} else { | ||
Devtools = lazy(() => import("./Devtools/3BAJISSX.jsx")); | ||
this.Component = Devtools; | ||
this.#Component = Devtools; | ||
} | ||
return <Devtools | ||
queryFlavor={this.queryFlavor} | ||
version={this.version} | ||
onlineManager={this.onlineManager} | ||
queryFlavor={this.#queryFlavor} | ||
version={this.#version} | ||
onlineManager={this.#onlineManager} | ||
{...{ | ||
@@ -87,11 +97,11 @@ get client() { | ||
}, el); | ||
this.isMounted = true; | ||
this.dispose = dispose; | ||
this.#isMounted = true; | ||
this.#dispose = dispose; | ||
} | ||
unmount() { | ||
if (!this.isMounted) { | ||
if (!this.#isMounted) { | ||
throw new Error("Devtools is not mounted"); | ||
} | ||
this.dispose?.(); | ||
this.isMounted = false; | ||
this.#dispose?.(); | ||
this.#isMounted = false; | ||
} | ||
@@ -98,0 +108,0 @@ }; |
{ | ||
"name": "@tanstack/query-devtools", | ||
"version": "5.0.0-rc.13", | ||
"version": "5.0.0-rc.14", | ||
"description": "Developer tools to interact with and visualize the TanStack Query cache", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3636024
110668