@tanstack/react-query-devtools 4.13.5 → 4.13.7
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/lib/devtools.esm.js +4 -5
- package/build/lib/devtools.esm.js.map +1 -1
- package/build/lib/devtools.js +3 -4
- package/build/lib/devtools.js.map +1 -1
- package/build/lib/devtools.mjs +4 -5
- package/build/lib/devtools.mjs.map +1 -1
- package/build/lib/index.prod.esm.js +6 -6
- package/build/lib/index.prod.esm.js.map +1 -1
- package/build/lib/index.prod.js +6 -6
- package/build/lib/index.prod.js.map +1 -1
- package/build/lib/index.prod.mjs +6 -6
- package/build/lib/index.prod.mjs.map +1 -1
- package/build/lib/utils.d.ts +2 -1
- package/build/lib/utils.esm.js +3 -2
- package/build/lib/utils.esm.js.map +1 -1
- package/build/lib/utils.js +3 -2
- package/build/lib/utils.js.map +1 -1
- package/build/lib/utils.mjs +3 -2
- package/build/lib/utils.mjs.map +1 -1
- package/build/umd/index.development.js +6 -6
- package/build/umd/index.development.js.map +1 -1
- package/package.json +1 -1
- package/src/devtools.tsx +84 -81
- package/src/utils.ts +3 -2
package/build/lib/index.prod.mjs
CHANGED
|
@@ -165,13 +165,14 @@ function useIsMounted() {
|
|
|
165
165
|
/**
|
|
166
166
|
* Displays a string regardless the type of the data
|
|
167
167
|
* @param {unknown} value Value to be stringified
|
|
168
|
+
* @param {boolean} beautify Formats json to multiline
|
|
168
169
|
*/
|
|
169
170
|
|
|
170
|
-
const displayValue = value => {
|
|
171
|
+
const displayValue = (value, beautify = false) => {
|
|
171
172
|
const {
|
|
172
173
|
json
|
|
173
174
|
} = SuperJSON.serialize(value);
|
|
174
|
-
return JSON.stringify(json);
|
|
175
|
+
return JSON.stringify(json, null, beautify ? 2 : undefined);
|
|
175
176
|
}; // Sorting functions
|
|
176
177
|
|
|
177
178
|
const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
|
|
@@ -1134,7 +1135,7 @@ const ActiveQuery = ({
|
|
|
1134
1135
|
padding: 0,
|
|
1135
1136
|
overflow: 'auto'
|
|
1136
1137
|
}
|
|
1137
|
-
},
|
|
1138
|
+
}, displayValue(activeQuery.queryKey, true))), /*#__PURE__*/React.createElement("span", {
|
|
1138
1139
|
style: {
|
|
1139
1140
|
padding: '0.3em .6em',
|
|
1140
1141
|
borderRadius: '0.4em',
|
|
@@ -1274,7 +1275,7 @@ const QueryStatusCount = ({
|
|
|
1274
1275
|
}, "inactive ", /*#__PURE__*/React.createElement(Code, null, "(", hasInactive, ")")));
|
|
1275
1276
|
};
|
|
1276
1277
|
|
|
1277
|
-
const QueryRow = ({
|
|
1278
|
+
const QueryRow = /*#__PURE__*/React.memo(({
|
|
1278
1279
|
queryKey,
|
|
1279
1280
|
setActiveQueryHash,
|
|
1280
1281
|
activeQueryHash,
|
|
@@ -1355,8 +1356,7 @@ const QueryRow = ({
|
|
|
1355
1356
|
padding: '.5em'
|
|
1356
1357
|
}
|
|
1357
1358
|
}, "" + queryHash));
|
|
1358
|
-
}; // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1359
|
-
|
|
1359
|
+
}); // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1360
1360
|
|
|
1361
1361
|
function noop() {}
|
|
1362
1362
|
|