@tanstack/react-query-devtools 4.14.5 → 4.14.8
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/__tests__/utils.d.ts +2 -2
- package/build/lib/devtools.esm.js +30 -18
- package/build/lib/devtools.esm.js.map +1 -1
- package/build/lib/devtools.js +30 -18
- package/build/lib/devtools.js.map +1 -1
- package/build/lib/devtools.mjs +30 -18
- package/build/lib/devtools.mjs.map +1 -1
- package/build/lib/index.prod.esm.js +30 -18
- package/build/lib/index.prod.esm.js.map +1 -1
- package/build/lib/index.prod.js +30 -18
- package/build/lib/index.prod.js.map +1 -1
- package/build/lib/index.prod.mjs +30 -18
- package/build/lib/index.prod.mjs.map +1 -1
- package/build/umd/index.development.js +30 -18
- package/build/umd/index.development.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/devtools.test.tsx +53 -1
- package/src/__tests__/utils.tsx +3 -1
- package/src/devtools.tsx +33 -19
package/build/lib/index.prod.js
CHANGED
|
@@ -709,25 +709,38 @@ function ReactQueryDevtools$1({
|
|
|
709
709
|
}
|
|
710
710
|
}, [isResolvedOpen]);
|
|
711
711
|
React__namespace.useEffect(() => {
|
|
712
|
-
|
|
713
|
-
var _root$parentElement;
|
|
712
|
+
var _rootRef$current;
|
|
714
713
|
|
|
715
|
-
|
|
714
|
+
if (isResolvedOpen && (_rootRef$current = rootRef.current) != null && _rootRef$current.parentElement) {
|
|
715
|
+
const {
|
|
716
|
+
parentElement
|
|
717
|
+
} = rootRef.current;
|
|
716
718
|
const styleProp = getSidedProp('padding', panelPosition);
|
|
717
719
|
const isVertical = isVerticalSide(panelPosition);
|
|
718
|
-
|
|
720
|
+
|
|
721
|
+
const previousPaddings = (({
|
|
722
|
+
padding,
|
|
723
|
+
paddingTop,
|
|
724
|
+
paddingBottom,
|
|
725
|
+
paddingLeft,
|
|
726
|
+
paddingRight
|
|
727
|
+
}) => ({
|
|
728
|
+
padding,
|
|
729
|
+
paddingTop,
|
|
730
|
+
paddingBottom,
|
|
731
|
+
paddingLeft,
|
|
732
|
+
paddingRight
|
|
733
|
+
}))(parentElement.style);
|
|
719
734
|
|
|
720
735
|
const run = () => {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
root.parentElement.style[styleProp] = (isVertical ? devtoolsWidth : devtoolsHeight) + "px";
|
|
730
|
-
}
|
|
736
|
+
// reset the padding
|
|
737
|
+
parentElement.style.padding = '0px';
|
|
738
|
+
parentElement.style.paddingTop = '0px';
|
|
739
|
+
parentElement.style.paddingBottom = '0px';
|
|
740
|
+
parentElement.style.paddingLeft = '0px';
|
|
741
|
+
parentElement.style.paddingRight = '0px'; // set the new padding based on the new panel position
|
|
742
|
+
|
|
743
|
+
parentElement.style[styleProp] = (isVertical ? devtoolsWidth : devtoolsHeight) + "px";
|
|
731
744
|
};
|
|
732
745
|
|
|
733
746
|
run();
|
|
@@ -736,10 +749,9 @@ function ReactQueryDevtools$1({
|
|
|
736
749
|
window.addEventListener('resize', run);
|
|
737
750
|
return () => {
|
|
738
751
|
window.removeEventListener('resize', run);
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
752
|
+
Object.entries(previousPaddings).forEach(([property, previousValue]) => {
|
|
753
|
+
parentElement.style[property] = previousValue;
|
|
754
|
+
});
|
|
743
755
|
};
|
|
744
756
|
}
|
|
745
757
|
}
|