@gemx-dev/heatmap-react 3.5.60 → 3.5.62
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/VizElement/DefaultRankBadges.d.ts +2 -2
- package/dist/esm/components/VizElement/DefaultRankBadges.d.ts.map +1 -1
- package/dist/esm/components/VizElement/ElementCalloutOverlay.d.ts.map +1 -1
- package/dist/esm/configs/index.d.ts +1 -0
- package/dist/esm/configs/index.d.ts.map +1 -1
- package/dist/esm/configs/zoom.d.ts +6 -0
- package/dist/esm/configs/zoom.d.ts.map +1 -0
- package/dist/esm/helpers/viz-area-click/area-builder.d.ts +2 -2
- package/dist/esm/helpers/viz-area-click/area-builder.d.ts.map +1 -1
- package/dist/esm/hooks/view-context/index.d.ts +1 -0
- package/dist/esm/hooks/view-context/index.d.ts.map +1 -1
- package/dist/esm/hooks/view-context/useHeatmapData.d.ts +3 -31
- package/dist/esm/hooks/view-context/useHeatmapData.d.ts.map +1 -1
- package/dist/esm/hooks/view-context/useHeatmapSetting.d.ts +38 -0
- package/dist/esm/hooks/view-context/useHeatmapSetting.d.ts.map +1 -0
- package/dist/esm/hooks/view-context/useHeatmapViz.d.ts +2 -0
- package/dist/esm/hooks/view-context/useHeatmapViz.d.ts.map +1 -1
- package/dist/esm/hooks/viz-elm/useHeatmapElementPosition.d.ts +2 -2
- package/dist/esm/hooks/viz-elm/useHeatmapElementPosition.d.ts.map +1 -1
- package/dist/esm/hooks/viz-scale/useScaleCalculation.d.ts.map +1 -1
- package/dist/esm/index.js +151 -36
- package/dist/esm/index.mjs +151 -36
- package/dist/esm/stores/data.d.ts +1 -0
- package/dist/esm/stores/data.d.ts.map +1 -1
- package/dist/esm/stores/index.d.ts +1 -0
- package/dist/esm/stores/index.d.ts.map +1 -1
- package/dist/esm/stores/setting.d.ts +22 -0
- package/dist/esm/stores/setting.d.ts.map +1 -0
- package/dist/esm/stores/viz.d.ts +2 -0
- package/dist/esm/stores/viz.d.ts.map +1 -1
- package/dist/esm/types/heatmap-info.d.ts +22 -3
- package/dist/esm/types/heatmap-info.d.ts.map +1 -1
- package/dist/esm/types/heatmap.d.ts +8 -0
- package/dist/esm/types/heatmap.d.ts.map +1 -1
- package/dist/esm/types/viz-elm.d.ts +2 -2
- package/dist/esm/types/viz-elm.d.ts.map +1 -1
- package/dist/umd/components/VizElement/DefaultRankBadges.d.ts +2 -2
- package/dist/umd/components/VizElement/DefaultRankBadges.d.ts.map +1 -1
- package/dist/umd/components/VizElement/ElementCalloutOverlay.d.ts.map +1 -1
- package/dist/umd/configs/index.d.ts +1 -0
- package/dist/umd/configs/index.d.ts.map +1 -1
- package/dist/umd/configs/zoom.d.ts +6 -0
- package/dist/umd/configs/zoom.d.ts.map +1 -0
- package/dist/umd/helpers/viz-area-click/area-builder.d.ts +2 -2
- package/dist/umd/helpers/viz-area-click/area-builder.d.ts.map +1 -1
- package/dist/umd/hooks/view-context/index.d.ts +1 -0
- package/dist/umd/hooks/view-context/index.d.ts.map +1 -1
- package/dist/umd/hooks/view-context/useHeatmapData.d.ts +3 -31
- package/dist/umd/hooks/view-context/useHeatmapData.d.ts.map +1 -1
- package/dist/umd/hooks/view-context/useHeatmapSetting.d.ts +38 -0
- package/dist/umd/hooks/view-context/useHeatmapSetting.d.ts.map +1 -0
- package/dist/umd/hooks/view-context/useHeatmapViz.d.ts +2 -0
- package/dist/umd/hooks/view-context/useHeatmapViz.d.ts.map +1 -1
- package/dist/umd/hooks/viz-elm/useHeatmapElementPosition.d.ts +2 -2
- package/dist/umd/hooks/viz-elm/useHeatmapElementPosition.d.ts.map +1 -1
- package/dist/umd/hooks/viz-scale/useScaleCalculation.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/stores/data.d.ts +1 -0
- package/dist/umd/stores/data.d.ts.map +1 -1
- package/dist/umd/stores/index.d.ts +1 -0
- package/dist/umd/stores/index.d.ts.map +1 -1
- package/dist/umd/stores/setting.d.ts +22 -0
- package/dist/umd/stores/setting.d.ts.map +1 -0
- package/dist/umd/stores/viz.d.ts +2 -0
- package/dist/umd/stores/viz.d.ts.map +1 -1
- package/dist/umd/types/heatmap-info.d.ts +22 -3
- package/dist/umd/types/heatmap-info.d.ts.map +1 -1
- package/dist/umd/types/heatmap.d.ts +8 -0
- package/dist/umd/types/heatmap.d.ts.map +1 -1
- package/dist/umd/types/viz-elm.d.ts +2 -2
- package/dist/umd/types/viz-elm.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -12,10 +12,10 @@ interface IHeatmapDataActions {
|
|
|
12
12
|
setClickAreas: (newClickAreas: IPersistedAreaData[]) => void;
|
|
13
13
|
setScrollmap: (newScrollmap: ScrollMapPoint[]) => void;
|
|
14
14
|
setDataInfo: (newDataInfo: IHeatmapInfo) => void;
|
|
15
|
+
setDataInfoByKey: <K extends keyof IHeatmapInfo>(key: K, value: IHeatmapInfo[K]) => void;
|
|
15
16
|
removeClickArea: (areaId: string) => void;
|
|
16
17
|
clearView: (viewId: string) => void;
|
|
17
18
|
}
|
|
18
|
-
export type IHeatmapDataResult = IHeatmapDataState & IHeatmapDataActions;
|
|
19
19
|
/**
|
|
20
20
|
* Hook to access heatmap data state and actions with optional selector
|
|
21
21
|
*
|
|
@@ -33,40 +33,12 @@ export type IHeatmapDataResult = IHeatmapDataState & IHeatmapDataActions;
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
export declare const useHeatmapData: {
|
|
36
|
-
<T>(selector: (state: {
|
|
37
|
-
data: import("@gemx-dev/clarity-decode/types/data").DecodedPayload[] | undefined;
|
|
38
|
-
clickmap: ClickMapPoint[] | undefined;
|
|
39
|
-
clickAreas: IPersistedAreaData[] | undefined;
|
|
40
|
-
scrollmap: ScrollMapPoint[] | undefined;
|
|
41
|
-
dataInfo: IHeatmapInfo | undefined;
|
|
42
|
-
} & {
|
|
43
|
-
setData: (newData: DecodedPayload[]) => void;
|
|
44
|
-
setClickmap: (newClickmap: ClickMapPoint[]) => void;
|
|
45
|
-
setClickAreas: (newClickAreas: IPersistedAreaData[]) => void;
|
|
46
|
-
setScrollmap: (newScrollmap: ScrollMapPoint[]) => void;
|
|
47
|
-
setDataInfo: (newDataInfo: IHeatmapInfo) => void;
|
|
48
|
-
removeClickArea: (areaId: string) => void;
|
|
49
|
-
clearView: (viewId: string) => void;
|
|
50
|
-
}) => T, props?: {
|
|
36
|
+
<T>(selector: (state: IHeatmapDataState & IHeatmapDataActions) => T, props?: {
|
|
51
37
|
viewId?: string;
|
|
52
38
|
} | undefined): T;
|
|
53
39
|
(props?: {
|
|
54
40
|
viewId?: string;
|
|
55
|
-
} | undefined):
|
|
56
|
-
data: import("@gemx-dev/clarity-decode/types/data").DecodedPayload[] | undefined;
|
|
57
|
-
clickmap: ClickMapPoint[] | undefined;
|
|
58
|
-
clickAreas: IPersistedAreaData[] | undefined;
|
|
59
|
-
scrollmap: ScrollMapPoint[] | undefined;
|
|
60
|
-
dataInfo: IHeatmapInfo | undefined;
|
|
61
|
-
} & {
|
|
62
|
-
setData: (newData: DecodedPayload[]) => void;
|
|
63
|
-
setClickmap: (newClickmap: ClickMapPoint[]) => void;
|
|
64
|
-
setClickAreas: (newClickAreas: IPersistedAreaData[]) => void;
|
|
65
|
-
setScrollmap: (newScrollmap: ScrollMapPoint[]) => void;
|
|
66
|
-
setDataInfo: (newDataInfo: IHeatmapInfo) => void;
|
|
67
|
-
removeClickArea: (areaId: string) => void;
|
|
68
|
-
clearView: (viewId: string) => void;
|
|
69
|
-
};
|
|
41
|
+
} | undefined): IHeatmapDataState & IHeatmapDataActions;
|
|
70
42
|
};
|
|
71
43
|
export {};
|
|
72
44
|
//# sourceMappingURL=useHeatmapData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHeatmapData.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/useHeatmapData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"useHeatmapData.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/useHeatmapData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMnH,UAAU,iBAAiB;IACzB,IAAI,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IACtC,UAAU,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAC7C,SAAS,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;CACpC;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IACpD,aAAa,EAAE,CAAC,aAAa,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;IAC7D,YAAY,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACvD,WAAW,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;CAqBzB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IClickType, IClickRankType, IScrollType } from '../../types';
|
|
2
|
+
interface IHeatmapSettingState {
|
|
3
|
+
rankedBy: IClickRankType | undefined;
|
|
4
|
+
clickType: IClickType | undefined;
|
|
5
|
+
scrollType: IScrollType | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface IHeatmapSettingActions {
|
|
8
|
+
setRankedBy: (rankedBy: IClickRankType) => void;
|
|
9
|
+
setClickType: (clickType: IClickType) => void;
|
|
10
|
+
setScrollType: (scrollType: IScrollType) => void;
|
|
11
|
+
clearView: (viewId: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Hook to access heatmap setting state and actions with optional selector
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // Get everything
|
|
19
|
+
* const { rankedBy, clickType, setRankedBy } = useHeatmapSetting();
|
|
20
|
+
*
|
|
21
|
+
* // Get only what you need (no unnecessary re-renders)
|
|
22
|
+
* const rankedBy = useHeatmapSetting(s => s.rankedBy);
|
|
23
|
+
* const { setRankedBy, setClickType } = useHeatmapSetting(s => ({
|
|
24
|
+
* setRankedBy: s.setRankedBy,
|
|
25
|
+
* setClickType: s.setClickType,
|
|
26
|
+
* }));
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const useHeatmapSetting: {
|
|
30
|
+
<T>(selector: (state: IHeatmapSettingState & IHeatmapSettingActions) => T, props?: {
|
|
31
|
+
viewId?: string;
|
|
32
|
+
} | undefined): T;
|
|
33
|
+
(props?: {
|
|
34
|
+
viewId?: string;
|
|
35
|
+
} | undefined): IHeatmapSettingState & IHeatmapSettingActions;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=useHeatmapSetting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeatmapSetting.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/useHeatmapSetting.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI3E,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED,UAAU,sBAAsB;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,SAAS,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAe5B,CAAC"}
|
|
@@ -2,6 +2,7 @@ interface IHeatmapVizState {
|
|
|
2
2
|
isRenderViz: boolean;
|
|
3
3
|
zoomRatio: number;
|
|
4
4
|
minZoomRatio: number;
|
|
5
|
+
maxZoomRatio: number;
|
|
5
6
|
widthScale: number;
|
|
6
7
|
isScaledToFit: boolean;
|
|
7
8
|
}
|
|
@@ -9,6 +10,7 @@ interface IHeatmapVizActions {
|
|
|
9
10
|
setIsRenderViz: (value: boolean) => void;
|
|
10
11
|
setZoomRatio: (value: number) => void;
|
|
11
12
|
setMinZoomRatio: (value: number) => void;
|
|
13
|
+
setMaxZoomRatio: (value: number) => void;
|
|
12
14
|
setScale: (value: number) => void;
|
|
13
15
|
setIsScaledToFit: (value: boolean) => void;
|
|
14
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHeatmapViz.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/useHeatmapViz.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useHeatmapViz.d.ts","sourceRoot":"","sources":["../../../src/hooks/view-context/useHeatmapViz.ts"],"names":[],"mappings":"AAUA,UAAU,gBAAgB;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,UAAU,kBAAkB;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAMtE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa;;;;;;;CAoBxB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ElementRect,
|
|
1
|
+
import type { ElementRect, IClickmapSorted, WebVisualizer } from '../../types';
|
|
2
2
|
interface Params {
|
|
3
3
|
iframeRef: React.RefObject<HTMLIFrameElement>;
|
|
4
4
|
wrapperRef: React.RefObject<HTMLElement>;
|
|
5
5
|
visualizer?: WebVisualizer;
|
|
6
6
|
}
|
|
7
7
|
export declare const useHeatmapElementPosition: ({ iframeRef, wrapperRef, visualizer }: Params) => {
|
|
8
|
-
getRect: (element?:
|
|
8
|
+
getRect: (element?: IClickmapSorted) => ElementRect | null;
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=useHeatmapElementPosition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHeatmapElementPosition.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHeatmapElementPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"useHeatmapElementPosition.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHeatmapElementPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO/E,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,yBAAyB,GAAI,uCAAuC,MAAM;wBAMxE,eAAe,KAAG,WAAW,GAAG,IAAI;CA2ClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,0BAA0B;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,0BAA0B;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,yBAAyB,KAAG,0BA2DtE,CAAC"}
|