@gemx-dev/heatmap-react 3.5.81 → 3.5.82
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/esm/components/VizDom/VizLoadingCanvas.d.ts.map +1 -1
- package/dist/esm/hooks/viz-elm/useHoveredElement.d.ts.map +1 -1
- package/dist/esm/index.js +18 -4
- package/dist/esm/index.mjs +18 -4
- package/dist/umd/components/VizDom/VizLoadingCanvas.d.ts.map +1 -1
- package/dist/umd/hooks/viz-elm/useHoveredElement.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VizLoadingCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/VizDom/VizLoadingCanvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VizLoadingCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/VizDom/VizLoadingCanvas.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAsCpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;uEAiDpD,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;;0BA4B/B,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,MAAM;CA6B3D,CAAC;AAiBF,eAAO,MAAM,6BAA6B,GACxC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,YAAY,OAAO,EACnB,OAAO,MAAM,KACZ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAUxB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -4798,6 +4798,7 @@ function getBoundingBox(element) {
|
|
|
4798
4798
|
// }
|
|
4799
4799
|
|
|
4800
4800
|
const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
4801
|
+
const isLoadingCanvas = useHeatmapSettingContext((s) => s.isLoadingCanvas);
|
|
4801
4802
|
const setHoveredElement = useHeatmapHoverContext((s) => s.setHoveredElement);
|
|
4802
4803
|
const isHoveredElement = useHeatmapHoverContext((s) => s.isHoveredElement);
|
|
4803
4804
|
const setSelectedElement = useHeatmapClickContext((s) => s.setSelectedElement);
|
|
@@ -4834,6 +4835,8 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4834
4835
|
return;
|
|
4835
4836
|
}, [dataInfo, iframeRef, widthScale, reset]);
|
|
4836
4837
|
const onHandleMouseMove = useCallback((event) => {
|
|
4838
|
+
if (isLoadingCanvas)
|
|
4839
|
+
return;
|
|
4837
4840
|
const hash = getHashFromEvent(event);
|
|
4838
4841
|
if (!dataInfo || !hash) {
|
|
4839
4842
|
reset();
|
|
@@ -4850,9 +4853,11 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4850
4853
|
}
|
|
4851
4854
|
const mousePosition = getElementMousePosition(event, widthScale);
|
|
4852
4855
|
setHoveredElement({ ...elementInfo, mousePosition });
|
|
4853
|
-
}, [dataInfo,
|
|
4856
|
+
}, [isLoadingCanvas, getHashFromEvent, dataInfo, isHoveredElement, getRect, widthScale, setHoveredElement, reset]);
|
|
4854
4857
|
const handleMouseMove = useMemo(() => throttleRAF(onHandleMouseMove), [onHandleMouseMove]);
|
|
4855
4858
|
const handleClick = useCallback((event, hash) => {
|
|
4859
|
+
if (isLoadingCanvas)
|
|
4860
|
+
return;
|
|
4856
4861
|
if (!hash)
|
|
4857
4862
|
return;
|
|
4858
4863
|
if (!event) {
|
|
@@ -4864,7 +4869,7 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4864
4869
|
hash,
|
|
4865
4870
|
mousePosition,
|
|
4866
4871
|
});
|
|
4867
|
-
}, [setSelectedElement, widthScale]);
|
|
4872
|
+
}, [isLoadingCanvas, setSelectedElement, widthScale]);
|
|
4868
4873
|
// Cleanup throttled function on unmount
|
|
4869
4874
|
useEffect(() => {
|
|
4870
4875
|
return () => {
|
|
@@ -8877,12 +8882,21 @@ const VizLoadingCanvas = () => {
|
|
|
8877
8882
|
const isLoadingCanvas = useHeatmapSettingContext((state) => state.isLoadingCanvas);
|
|
8878
8883
|
const CompLoading = useHeatmapControlStore((s) => s.controls.VizLoading);
|
|
8879
8884
|
const wrapperHeight = useHeatmapVizRectContext((s) => s.wrapperHeight);
|
|
8885
|
+
const iframeHeight = useHeatmapVizRectContext((s) => s.iframeHeight);
|
|
8886
|
+
const widthScale = useHeatmapVizContext((s) => s.widthScale);
|
|
8880
8887
|
if (!isLoadingCanvas)
|
|
8881
8888
|
return null;
|
|
8882
8889
|
return (jsx("div", { className: "gx-hm-loading-canvas", style: {
|
|
8883
8890
|
background: '#000000B2',
|
|
8884
|
-
|
|
8891
|
+
width: '100%',
|
|
8892
|
+
position: 'absolute',
|
|
8893
|
+
height: iframeHeight,
|
|
8894
|
+
borderRadius: `${HEATMAP_CONFIG.borderRadius}px`,
|
|
8895
|
+
top: 0,
|
|
8896
|
+
left: 0,
|
|
8897
|
+
}, children: jsx(BoxStack, { position: "absolute", height: wrapperHeight / widthScale, flexDirection: "row", justifyContent: "center", alignItems: "center", style: {
|
|
8885
8898
|
width: '100%',
|
|
8899
|
+
maxHeight: iframeHeight,
|
|
8886
8900
|
top: 0,
|
|
8887
8901
|
left: 0,
|
|
8888
8902
|
}, children: jsx("div", { style: { height: 'fit-content' }, children: CompLoading && jsx(CompLoading, { type: "transparent" }) }) }) }));
|
|
@@ -8901,6 +8915,7 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
|
|
|
8901
8915
|
flex: 1,
|
|
8902
8916
|
// paddingBottom: HEATMAP_STYLE['viz']['paddingBottom'],
|
|
8903
8917
|
background: HEATMAP_STYLE['viz']['background'],
|
|
8918
|
+
...(isLoadingCanvas ? { maxHeight: '100%', overflowY: 'hidden' } : {}),
|
|
8904
8919
|
}, children: jsx("div", { className: "gx-hm-visual-unscaled", style: {
|
|
8905
8920
|
width: '100%',
|
|
8906
8921
|
display: 'flex',
|
|
@@ -8917,7 +8932,6 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
|
|
|
8917
8932
|
transform: `scale(${widthScale})`,
|
|
8918
8933
|
transformOrigin: 'top center',
|
|
8919
8934
|
paddingBlockEnd: '0',
|
|
8920
|
-
...(isLoadingCanvas ? { maxHeight: '100%', overflow: 'hidden' } : {}),
|
|
8921
8935
|
}, children: children }) }) }));
|
|
8922
8936
|
function calcContentHeight() {
|
|
8923
8937
|
return scaledHeight > 0
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4798,6 +4798,7 @@ function getBoundingBox(element) {
|
|
|
4798
4798
|
// }
|
|
4799
4799
|
|
|
4800
4800
|
const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
4801
|
+
const isLoadingCanvas = useHeatmapSettingContext((s) => s.isLoadingCanvas);
|
|
4801
4802
|
const setHoveredElement = useHeatmapHoverContext((s) => s.setHoveredElement);
|
|
4802
4803
|
const isHoveredElement = useHeatmapHoverContext((s) => s.isHoveredElement);
|
|
4803
4804
|
const setSelectedElement = useHeatmapClickContext((s) => s.setSelectedElement);
|
|
@@ -4834,6 +4835,8 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4834
4835
|
return;
|
|
4835
4836
|
}, [dataInfo, iframeRef, widthScale, reset]);
|
|
4836
4837
|
const onHandleMouseMove = useCallback((event) => {
|
|
4838
|
+
if (isLoadingCanvas)
|
|
4839
|
+
return;
|
|
4837
4840
|
const hash = getHashFromEvent(event);
|
|
4838
4841
|
if (!dataInfo || !hash) {
|
|
4839
4842
|
reset();
|
|
@@ -4850,9 +4853,11 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4850
4853
|
}
|
|
4851
4854
|
const mousePosition = getElementMousePosition(event, widthScale);
|
|
4852
4855
|
setHoveredElement({ ...elementInfo, mousePosition });
|
|
4853
|
-
}, [dataInfo,
|
|
4856
|
+
}, [isLoadingCanvas, getHashFromEvent, dataInfo, isHoveredElement, getRect, widthScale, setHoveredElement, reset]);
|
|
4854
4857
|
const handleMouseMove = useMemo(() => throttleRAF(onHandleMouseMove), [onHandleMouseMove]);
|
|
4855
4858
|
const handleClick = useCallback((event, hash) => {
|
|
4859
|
+
if (isLoadingCanvas)
|
|
4860
|
+
return;
|
|
4856
4861
|
if (!hash)
|
|
4857
4862
|
return;
|
|
4858
4863
|
if (!event) {
|
|
@@ -4864,7 +4869,7 @@ const useHoveredElement = ({ iframeRef, getRect }) => {
|
|
|
4864
4869
|
hash,
|
|
4865
4870
|
mousePosition,
|
|
4866
4871
|
});
|
|
4867
|
-
}, [setSelectedElement, widthScale]);
|
|
4872
|
+
}, [isLoadingCanvas, setSelectedElement, widthScale]);
|
|
4868
4873
|
// Cleanup throttled function on unmount
|
|
4869
4874
|
useEffect(() => {
|
|
4870
4875
|
return () => {
|
|
@@ -8877,12 +8882,21 @@ const VizLoadingCanvas = () => {
|
|
|
8877
8882
|
const isLoadingCanvas = useHeatmapSettingContext((state) => state.isLoadingCanvas);
|
|
8878
8883
|
const CompLoading = useHeatmapControlStore((s) => s.controls.VizLoading);
|
|
8879
8884
|
const wrapperHeight = useHeatmapVizRectContext((s) => s.wrapperHeight);
|
|
8885
|
+
const iframeHeight = useHeatmapVizRectContext((s) => s.iframeHeight);
|
|
8886
|
+
const widthScale = useHeatmapVizContext((s) => s.widthScale);
|
|
8880
8887
|
if (!isLoadingCanvas)
|
|
8881
8888
|
return null;
|
|
8882
8889
|
return (jsx("div", { className: "gx-hm-loading-canvas", style: {
|
|
8883
8890
|
background: '#000000B2',
|
|
8884
|
-
|
|
8891
|
+
width: '100%',
|
|
8892
|
+
position: 'absolute',
|
|
8893
|
+
height: iframeHeight,
|
|
8894
|
+
borderRadius: `${HEATMAP_CONFIG.borderRadius}px`,
|
|
8895
|
+
top: 0,
|
|
8896
|
+
left: 0,
|
|
8897
|
+
}, children: jsx(BoxStack, { position: "absolute", height: wrapperHeight / widthScale, flexDirection: "row", justifyContent: "center", alignItems: "center", style: {
|
|
8885
8898
|
width: '100%',
|
|
8899
|
+
maxHeight: iframeHeight,
|
|
8886
8900
|
top: 0,
|
|
8887
8901
|
left: 0,
|
|
8888
8902
|
}, children: jsx("div", { style: { height: 'fit-content' }, children: CompLoading && jsx(CompLoading, { type: "transparent" }) }) }) }));
|
|
@@ -8901,6 +8915,7 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
|
|
|
8901
8915
|
flex: 1,
|
|
8902
8916
|
// paddingBottom: HEATMAP_STYLE['viz']['paddingBottom'],
|
|
8903
8917
|
background: HEATMAP_STYLE['viz']['background'],
|
|
8918
|
+
...(isLoadingCanvas ? { maxHeight: '100%', overflowY: 'hidden' } : {}),
|
|
8904
8919
|
}, children: jsx("div", { className: "gx-hm-visual-unscaled", style: {
|
|
8905
8920
|
width: '100%',
|
|
8906
8921
|
display: 'flex',
|
|
@@ -8917,7 +8932,6 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
|
|
|
8917
8932
|
transform: `scale(${widthScale})`,
|
|
8918
8933
|
transformOrigin: 'top center',
|
|
8919
8934
|
paddingBlockEnd: '0',
|
|
8920
|
-
...(isLoadingCanvas ? { maxHeight: '100%', overflow: 'hidden' } : {}),
|
|
8921
8935
|
}, children: children }) }) }));
|
|
8922
8936
|
function calcContentHeight() {
|
|
8923
8937
|
return scaledHeight > 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VizLoadingCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/VizDom/VizLoadingCanvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VizLoadingCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/VizDom/VizLoadingCanvas.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAsCpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;uEAiDpD,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;;0BA4B/B,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,MAAM;CA6B3D,CAAC;AAiBF,eAAO,MAAM,6BAA6B,GACxC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,YAAY,OAAO,EACnB,OAAO,MAAM,KACZ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAUxB,CAAC"}
|