@vitessce/tooltip 3.9.0 → 3.9.2
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/dist/index.js +28 -32
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9177,21 +9177,20 @@ Popper$1.Utils = (typeof window !== "undefined" ? window : global).PopperUtils;
|
|
|
9177
9177
|
Popper$1.placements = placements;
|
|
9178
9178
|
Popper$1.Defaults = Defaults;
|
|
9179
9179
|
function createChainedFunction(...funcs) {
|
|
9180
|
-
return funcs.reduce(
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9180
|
+
return funcs.reduce(
|
|
9181
|
+
(acc, func) => {
|
|
9182
|
+
if (func == null) {
|
|
9183
|
+
return acc;
|
|
9184
|
+
}
|
|
9185
|
+
return function chainedFunction(...args) {
|
|
9186
|
+
acc.apply(this, args);
|
|
9187
|
+
func.apply(this, args);
|
|
9188
|
+
};
|
|
9189
|
+
},
|
|
9190
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9191
|
+
() => {
|
|
9188
9192
|
}
|
|
9189
|
-
|
|
9190
|
-
acc.apply(this, args);
|
|
9191
|
-
func.apply(this, args);
|
|
9192
|
-
};
|
|
9193
|
-
}, () => {
|
|
9194
|
-
});
|
|
9193
|
+
);
|
|
9195
9194
|
}
|
|
9196
9195
|
function setRef(ref, value) {
|
|
9197
9196
|
if (typeof ref === "function") {
|
|
@@ -9230,7 +9229,7 @@ function flipPlacement(placement, theme) {
|
|
|
9230
9229
|
}
|
|
9231
9230
|
}
|
|
9232
9231
|
function getAnchorEl(anchorEl) {
|
|
9233
|
-
return typeof anchorEl === "function" ? anchorEl() : anchorEl;
|
|
9232
|
+
return typeof anchorEl === "function" ? anchorEl(document.body) : anchorEl;
|
|
9234
9233
|
}
|
|
9235
9234
|
const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
9236
9235
|
const defaultPopperOptions = {};
|
|
@@ -9260,25 +9259,18 @@ const Popper = React.forwardRef((props, ref) => {
|
|
|
9260
9259
|
}
|
|
9261
9260
|
if (popperRef.current) {
|
|
9262
9261
|
popperRef.current.destroy();
|
|
9263
|
-
handlePopperRefRef.current
|
|
9262
|
+
if (handlePopperRefRef.current) {
|
|
9263
|
+
setRef(handlePopperRefRef.current, null);
|
|
9264
|
+
}
|
|
9264
9265
|
}
|
|
9265
9266
|
const handlePopperUpdate = (data) => {
|
|
9266
9267
|
setPlacement(data.placement);
|
|
9267
9268
|
};
|
|
9268
|
-
const
|
|
9269
|
-
{
|
|
9270
|
-
|
|
9271
|
-
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
9272
|
-
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
9273
|
-
console.warn([
|
|
9274
|
-
"Material-UI: The `anchorEl` prop provided to the component is invalid.",
|
|
9275
|
-
"The anchor element should be part of the document layout.",
|
|
9276
|
-
"Make sure the element is present in the document or that it's not display none."
|
|
9277
|
-
].join("\n"));
|
|
9278
|
-
}
|
|
9279
|
-
}
|
|
9269
|
+
const anchorElement = getAnchorEl(anchorEl);
|
|
9270
|
+
if (!anchorElement) {
|
|
9271
|
+
return;
|
|
9280
9272
|
}
|
|
9281
|
-
const popper = new Popper$1(
|
|
9273
|
+
const popper = new Popper$1(anchorElement, tooltipRef.current, {
|
|
9282
9274
|
placement: rtlPlacement,
|
|
9283
9275
|
...popperOptions,
|
|
9284
9276
|
modifiers: {
|
|
@@ -9296,7 +9288,9 @@ const Popper = React.forwardRef((props, ref) => {
|
|
|
9296
9288
|
onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),
|
|
9297
9289
|
onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)
|
|
9298
9290
|
});
|
|
9299
|
-
handlePopperRefRef.current
|
|
9291
|
+
if (handlePopperRefRef.current) {
|
|
9292
|
+
setRef(handlePopperRefRef.current, popper);
|
|
9293
|
+
}
|
|
9300
9294
|
}, [anchorEl, disablePortal, modifiers2, open, rtlPlacement, popperOptions]);
|
|
9301
9295
|
const handleRef = React.useCallback((node2) => {
|
|
9302
9296
|
setRef(ownRef, node2);
|
|
@@ -9310,7 +9304,9 @@ const Popper = React.forwardRef((props, ref) => {
|
|
|
9310
9304
|
return;
|
|
9311
9305
|
}
|
|
9312
9306
|
popperRef.current.destroy();
|
|
9313
|
-
handlePopperRefRef.current
|
|
9307
|
+
if (handlePopperRefRef.current) {
|
|
9308
|
+
setRef(handlePopperRefRef.current, null);
|
|
9309
|
+
}
|
|
9314
9310
|
};
|
|
9315
9311
|
const handleExited = () => {
|
|
9316
9312
|
setExited(true);
|
|
@@ -9341,7 +9337,7 @@ const Popper = React.forwardRef((props, ref) => {
|
|
|
9341
9337
|
// Fix Popper.js display issue
|
|
9342
9338
|
top: 0,
|
|
9343
9339
|
left: 0,
|
|
9344
|
-
display: !open && keepMounted && !transition ? "none" :
|
|
9340
|
+
display: !open && keepMounted && !transition ? "none" : void 0,
|
|
9345
9341
|
...style2
|
|
9346
9342
|
}, children: typeof children === "function" ? children(childProps) : children }) });
|
|
9347
9343
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/tooltip",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dist-tsc"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@vitessce/
|
|
20
|
-
"@vitessce/
|
|
21
|
-
"@vitessce/utils": "3.9.
|
|
19
|
+
"@vitessce/vit-s": "3.9.2",
|
|
20
|
+
"@vitessce/styles": "3.9.2",
|
|
21
|
+
"@vitessce/utils": "3.9.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"react": "18.3.1",
|