@tanstack/react-query-devtools 4.0.5 → 4.0.6

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.
@@ -943,6 +943,18 @@
943
943
  return JSON.stringify(newValue, name);
944
944
  };
945
945
 
946
+ const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
947
+
948
+ const sortFns = {
949
+ 'Status > Last Updated': (a, b) => {
950
+ var _sortFns$LastUpdated;
951
+
952
+ return getStatusRank(a) === getStatusRank(b) ? (_sortFns$LastUpdated = sortFns['Last Updated']) == null ? void 0 : _sortFns$LastUpdated.call(sortFns, a, b) : getStatusRank(a) > getStatusRank(b) ? 1 : -1;
953
+ },
954
+ 'Query Hash': (a, b) => a.queryHash > b.queryHash ? 1 : -1,
955
+ 'Last Updated': (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1
956
+ };
957
+
946
958
  const Panel = styled('div', (_props, theme) => ({
947
959
  fontSize: 'clamp(12px, 1.5vw, 14px)',
948
960
  fontFamily: "sans-serif",
@@ -1224,7 +1236,7 @@
1224
1236
  }
1225
1237
 
1226
1238
  const isServer = typeof window === 'undefined';
1227
- function ReactQueryDevtools({
1239
+ function ReactQueryDevtools$1({
1228
1240
  initialIsOpen,
1229
1241
  panelProps = {},
1230
1242
  closeButtonProps = {},
@@ -1358,7 +1370,7 @@
1358
1370
  "aria-label": "React Query Devtools"
1359
1371
  }, /*#__PURE__*/React__namespace.createElement(ThemeProvider, {
1360
1372
  theme: defaultTheme
1361
- }, /*#__PURE__*/React__namespace.createElement(ReactQueryDevtoolsPanel, _extends({
1373
+ }, /*#__PURE__*/React__namespace.createElement(ReactQueryDevtoolsPanel$1, _extends({
1362
1374
  ref: panelRef,
1363
1375
  context: context,
1364
1376
  styleNonce: styleNonce
@@ -1463,23 +1475,11 @@
1463
1475
  })) : null);
1464
1476
  }
1465
1477
 
1466
- const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
1467
-
1468
- const sortFns = {
1469
- 'Status > Last Updated': (a, b) => {
1470
- var _sortFns$LastUpdated;
1471
-
1472
- return getStatusRank(a) === getStatusRank(b) ? (_sortFns$LastUpdated = sortFns['Last Updated']) == null ? void 0 : _sortFns$LastUpdated.call(sortFns, a, b) : getStatusRank(a) > getStatusRank(b) ? 1 : -1;
1473
- },
1474
- 'Query Hash': (a, b) => a.queryHash > b.queryHash ? 1 : -1,
1475
- 'Last Updated': (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1
1476
- };
1477
-
1478
1478
  const useSubscribeToQueryCache = (queryCache, getSnapshot) => {
1479
1479
  return shim.useSyncExternalStore(React__namespace.useCallback(onStoreChange => queryCache.subscribe(reactQuery.notifyManager.batchCalls(onStoreChange)), [queryCache]), getSnapshot, getSnapshot);
1480
1480
  };
1481
1481
 
1482
- const ReactQueryDevtoolsPanel = /*#__PURE__*/React__namespace.forwardRef(function ReactQueryDevtoolsPanel(props, ref) {
1482
+ const ReactQueryDevtoolsPanel$1 = /*#__PURE__*/React__namespace.forwardRef(function ReactQueryDevtoolsPanel(props, ref) {
1483
1483
  const {
1484
1484
  isOpen = true,
1485
1485
  styleNonce,
@@ -1991,9 +1991,11 @@
1991
1991
 
1992
1992
  function noop() {}
1993
1993
 
1994
+ const ReactQueryDevtools = ReactQueryDevtools$1;
1995
+ const ReactQueryDevtoolsPanel = ReactQueryDevtoolsPanel$1;
1996
+
1994
1997
  exports.ReactQueryDevtools = ReactQueryDevtools;
1995
1998
  exports.ReactQueryDevtoolsPanel = ReactQueryDevtoolsPanel;
1996
- exports.sortFns = sortFns;
1997
1999
 
1998
2000
  Object.defineProperty(exports, '__esModule', { value: true });
1999
2001