@unovis/react 1.5.1-xplg.2 → 1.5.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/README.md +1 -1
- package/components/annotations/index.d.ts +1 -1
- package/components/area/index.d.ts +1 -1
- package/components/axis/index.d.ts +1 -1
- package/components/brush/index.d.ts +1 -1
- package/components/chord-diagram/index.d.ts +1 -1
- package/components/crosshair/index.d.ts +1 -1
- package/components/donut/index.d.ts +1 -1
- package/components/free-brush/index.d.ts +1 -1
- package/components/grouped-bar/index.d.ts +1 -1
- package/components/line/index.d.ts +1 -1
- package/components/nested-donut/index.d.ts +1 -1
- package/components/sankey/index.d.ts +1 -1
- package/components/scatter/index.d.ts +1 -1
- package/components/stacked-bar/index.d.ts +1 -1
- package/components/timeline/index.d.ts +1 -1
- package/components/tooltip/index.d.ts +1 -1
- package/components/topojson-map/index.d.ts +1 -1
- package/components/xy-labels/index.d.ts +1 -1
- package/components.d.ts +0 -2
- package/html-components/bullet-legend/index.d.ts +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +1 -1
- package/html-components/leaflet-map/index.d.ts +1 -1
- package/index.js +0 -2
- package/index.js.map +1 -1
- package/package.json +7 -5
- package/components/treemap/index.d.ts +0 -11
- package/components/treemap/index.js +0 -31
- package/components/treemap/index.js.map +0 -1
- package/html-components/rolling-pin-legend/index.d.ts +0 -11
- package/html-components/rolling-pin-legend/index.js +0 -23
- package/html-components/rolling-pin-legend/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,5 +6,5 @@ export declare type VisAnnotationsRef = {
|
|
|
6
6
|
export declare type VisAnnotationsProps = AnnotationsConfigInterface & {
|
|
7
7
|
ref?: Ref<VisAnnotationsRef>;
|
|
8
8
|
};
|
|
9
|
-
export declare const VisAnnotationsSelectors: typeof import("@unovis/ts/
|
|
9
|
+
export declare const VisAnnotationsSelectors: typeof import("@unovis/ts/dist/components/annotations/style");
|
|
10
10
|
export declare const VisAnnotations: ((props: VisAnnotationsProps) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisAreaProps<Datum> = AreaConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisAreaRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisAreaSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisAreaSelectors: typeof import("@unovis/ts/dist/components/area/style");
|
|
11
11
|
export declare const VisArea: (<Datum>(props: VisAreaProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisAxisProps<Datum> = AxisConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisAxisRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisAxisSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisAxisSelectors: typeof import("@unovis/ts/dist/components/axis/style");
|
|
11
11
|
export declare const VisAxis: (<Datum>(props: VisAxisProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisBrushProps<Datum> = BrushConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisBrushRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisBrushSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisBrushSelectors: typeof import("@unovis/ts/dist/components/brush/style");
|
|
11
11
|
export declare const VisBrush: (<Datum>(props: VisBrushProps<Datum>) => JSX.Element | null);
|
|
@@ -10,5 +10,5 @@ export declare type VisChordDiagramProps<N extends ChordInputNode, L extends Cho
|
|
|
10
10
|
};
|
|
11
11
|
ref?: Ref<VisChordDiagramRef<N, L>>;
|
|
12
12
|
};
|
|
13
|
-
export declare const VisChordDiagramSelectors: typeof import("@unovis/ts/
|
|
13
|
+
export declare const VisChordDiagramSelectors: typeof import("@unovis/ts/dist/components/chord-diagram/style");
|
|
14
14
|
export declare const VisChordDiagram: (<N extends ChordInputNode, L extends ChordInputLink>(props: VisChordDiagramProps<N, L>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisCrosshairProps<Datum> = CrosshairConfigInterface<Datum> &
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisCrosshairRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisCrosshairSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisCrosshairSelectors: typeof import("@unovis/ts/dist/components/crosshair/style");
|
|
11
11
|
export declare const VisCrosshair: (<Datum>(props: VisCrosshairProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisDonutProps<Datum> = DonutConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisDonutRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisDonutSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisDonutSelectors: typeof import("@unovis/ts/dist/components/donut/style");
|
|
11
11
|
export declare const VisDonut: (<Datum>(props: VisDonutProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisFreeBrushProps<Datum> = FreeBrushConfigInterface<Datum> &
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisFreeBrushRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisFreeBrushSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisFreeBrushSelectors: typeof import("@unovis/ts/dist/components/free-brush/style");
|
|
11
11
|
export declare const VisFreeBrush: (<Datum>(props: VisFreeBrushProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisGroupedBarProps<Datum> = GroupedBarConfigInterface<Datum>
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisGroupedBarRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisGroupedBarSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisGroupedBarSelectors: typeof import("@unovis/ts/dist/components/grouped-bar/style");
|
|
11
11
|
export declare const VisGroupedBar: (<Datum>(props: VisGroupedBarProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisLineProps<Datum> = LineConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisLineRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisLineSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisLineSelectors: typeof import("@unovis/ts/dist/components/line/style");
|
|
11
11
|
export declare const VisLine: (<Datum>(props: VisLineProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisNestedDonutProps<Datum> = NestedDonutConfigInterface<Datu
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisNestedDonutRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisNestedDonutSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisNestedDonutSelectors: typeof import("@unovis/ts/dist/components/nested-donut/style");
|
|
11
11
|
export declare const VisNestedDonut: (<Datum>(props: VisNestedDonutProps<Datum>) => JSX.Element | null);
|
|
@@ -10,5 +10,5 @@ export declare type VisSankeyProps<N extends SankeyInputNode, L extends SankeyIn
|
|
|
10
10
|
};
|
|
11
11
|
ref?: Ref<VisSankeyRef<N, L>>;
|
|
12
12
|
};
|
|
13
|
-
export declare const VisSankeySelectors: typeof import("@unovis/ts/
|
|
13
|
+
export declare const VisSankeySelectors: typeof import("@unovis/ts/dist/components/sankey/style");
|
|
14
14
|
export declare const VisSankey: (<N extends SankeyInputNode, L extends SankeyInputLink>(props: VisSankeyProps<N, L>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisScatterProps<Datum> = ScatterConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisScatterRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisScatterSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisScatterSelectors: typeof import("@unovis/ts/dist/components/scatter/style");
|
|
11
11
|
export declare const VisScatter: (<Datum>(props: VisScatterProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisStackedBarProps<Datum> = StackedBarConfigInterface<Datum>
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisStackedBarRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisStackedBarSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisStackedBarSelectors: typeof import("@unovis/ts/dist/components/stacked-bar/style");
|
|
11
11
|
export declare const VisStackedBar: (<Datum>(props: VisStackedBarProps<Datum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisTimelineProps<Datum> = TimelineConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisTimelineRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisTimelineSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisTimelineSelectors: typeof import("@unovis/ts/dist/components/timeline/style");
|
|
11
11
|
export declare const VisTimeline: (<Datum>(props: VisTimelineProps<Datum>) => JSX.Element | null);
|
|
@@ -6,5 +6,5 @@ export declare type VisTooltipRef = {
|
|
|
6
6
|
export declare type VisTooltipProps = TooltipConfigInterface & {
|
|
7
7
|
ref?: Ref<VisTooltipRef>;
|
|
8
8
|
};
|
|
9
|
-
export declare const VisTooltipSelectors: typeof import("@unovis/ts/
|
|
9
|
+
export declare const VisTooltipSelectors: typeof import("@unovis/ts/dist/components/tooltip/style");
|
|
10
10
|
export declare const VisTooltip: ((props: VisTooltipProps) => JSX.Element | null);
|
|
@@ -11,5 +11,5 @@ export declare type VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum> = Topo
|
|
|
11
11
|
};
|
|
12
12
|
ref?: Ref<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>;
|
|
13
13
|
};
|
|
14
|
-
export declare const VisTopoJSONMapSelectors: typeof import("@unovis/ts/
|
|
14
|
+
export declare const VisTopoJSONMapSelectors: typeof import("@unovis/ts/dist/components/topojson-map/style");
|
|
15
15
|
export declare const VisTopoJSONMap: (<AreaDatum, PointDatum, LinkDatum>(props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>) => JSX.Element | null);
|
|
@@ -7,5 +7,5 @@ export declare type VisXYLabelsProps<Datum> = XYLabelsConfigInterface<Datum> & {
|
|
|
7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisXYLabelsRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/dist/components/xy-labels/style");
|
|
11
11
|
export declare const VisXYLabels: (<Datum>(props: VisXYLabelsProps<Datum>) => JSX.Element | null);
|
package/components.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ export * from './components/timeline/';
|
|
|
17
17
|
export * from './components/topojson-map/';
|
|
18
18
|
export * from './components/xy-labels';
|
|
19
19
|
export * from './components/annotations';
|
|
20
|
-
export * from './components/treemap';
|
|
21
20
|
export * from './html-components/bullet-legend';
|
|
22
|
-
export * from './html-components/rolling-pin-legend';
|
|
23
21
|
export * from './html-components/leaflet-map';
|
|
24
22
|
export * from './html-components/leaflet-flow-map';
|
|
@@ -7,5 +7,5 @@ export declare type VisBulletLegendProps = BulletLegendConfigInterface & {
|
|
|
7
7
|
ref?: Ref<VisBulletLegendRef>;
|
|
8
8
|
className?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/
|
|
10
|
+
export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/dist/components/bullet-legend/style");
|
|
11
11
|
export declare const VisBulletLegend: ((props: VisBulletLegendProps) => JSX.Element | null);
|
|
@@ -11,5 +11,5 @@ export declare type VisLeafletFlowMapProps<PointDatum extends GenericDataRecord,
|
|
|
11
11
|
ref?: Ref<VisLeafletFlowMapRef<PointDatum, FlowDatum>>;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/
|
|
14
|
+
export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/dist/components/leaflet-map/style");
|
|
15
15
|
export declare const VisLeafletFlowMap: (<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord>(props: VisLeafletFlowMapProps<PointDatum, FlowDatum>) => JSX.Element | null);
|
|
@@ -8,5 +8,5 @@ export declare type VisLeafletMapProps<Datum extends GenericDataRecord> = Leafle
|
|
|
8
8
|
ref?: Ref<VisLeafletMapRef<Datum>>;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const VisLeafletMapSelectors: typeof import("@unovis/ts/
|
|
11
|
+
export declare const VisLeafletMapSelectors: typeof import("@unovis/ts/dist/components/leaflet-map/style");
|
|
12
12
|
export declare const VisLeafletMap: (<Datum extends GenericDataRecord>(props: VisLeafletMapProps<Datum>) => JSX.Element | null);
|
package/index.js
CHANGED
|
@@ -19,9 +19,7 @@ export { VisTimeline, VisTimelineSelectors } from './components/timeline/index.j
|
|
|
19
19
|
export { VisTopoJSONMap, VisTopoJSONMapSelectors } from './components/topojson-map/index.js';
|
|
20
20
|
export { VisXYLabels, VisXYLabelsSelectors } from './components/xy-labels/index.js';
|
|
21
21
|
export { VisAnnotations, VisAnnotationsSelectors } from './components/annotations/index.js';
|
|
22
|
-
export { VisTreemap, VisTreemapSelectors } from './components/treemap/index.js';
|
|
23
22
|
export { VisBulletLegend, VisBulletLegendSelectors } from './html-components/bullet-legend/index.js';
|
|
24
|
-
export { VisRollingPinLegend, VisRollingPinLegendSelectors } from './html-components/rolling-pin-legend/index.js';
|
|
25
23
|
export { VisLeafletMap, VisLeafletMapSelectors } from './html-components/leaflet-map/index.js';
|
|
26
24
|
export { VisLeafletFlowMap, VisLeafletFlowMapSelectors } from './html-components/leaflet-flow-map/index.js';
|
|
27
25
|
export { VisTimeSeries } from './composites/time-series/index.js';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/react",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, Solid, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
|
+
"packageManager": "npm@10.9.1",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
"author": "Nikita Rokotyan, F5 Inc. <nikita@f5.com> (https://rokotyan.com)",
|
|
22
23
|
"maintainers": [
|
|
23
24
|
"Nikita Rokotyan <nikita@f5.com> (https://rokotyan.com)",
|
|
24
|
-
"
|
|
25
|
+
"Qian Liu <qi.liu@f5.com>",
|
|
26
|
+
"Surya Hanumandla <s.hanumandla@f5.com>"
|
|
25
27
|
],
|
|
26
28
|
"license": "Apache-2.0",
|
|
27
29
|
"main": "./index.js",
|
|
@@ -29,13 +31,13 @@
|
|
|
29
31
|
"type": "module",
|
|
30
32
|
"sideEffects": false,
|
|
31
33
|
"scripts": {
|
|
32
|
-
"build": "rimraf dist && tsc --project tsconfig.lib.json --emitDeclarationOnly && rollup --config",
|
|
34
|
+
"build": "rimraf dist && tsc --project tsconfig.lib.json --emitDeclarationOnly && rollup --config; rm -rf dist/.cache; cp LICENSE README.md package.json ./dist",
|
|
33
35
|
"tsc": "tsc",
|
|
34
36
|
"generate": "rollup -c ./autogen/rollup.config.js; node .autogen.cjs; rm .autogen.cjs",
|
|
35
|
-
"publish:dist": "
|
|
37
|
+
"publish:dist": "cd ./dist; npm publish"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
|
-
"@unovis/ts": "1.5.
|
|
40
|
+
"@unovis/ts": "1.5.2",
|
|
39
41
|
"react": ">=16.8.0 || ^17 || ^18 || ^19",
|
|
40
42
|
"react-dom": ">=16.8.0 || ^17 || ^18 || ^19"
|
|
41
43
|
},
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'react';
|
|
2
|
-
import { Treemap, TreemapConfigInterface } from '@unovis/ts';
|
|
3
|
-
export declare type VisTreemapRef<Datum> = {
|
|
4
|
-
component?: Treemap<Datum>;
|
|
5
|
-
};
|
|
6
|
-
export declare type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {
|
|
7
|
-
data?: Datum[];
|
|
8
|
-
ref?: Ref<VisTreemapRef<Datum>>;
|
|
9
|
-
};
|
|
10
|
-
export declare const VisTreemapSelectors: typeof import("@unovis/ts/lib/components/treemap/style");
|
|
11
|
-
export declare const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
2
|
-
import { Treemap } from '@unovis/ts';
|
|
3
|
-
import { arePropsEqual } from '../../utils/react.js';
|
|
4
|
-
|
|
5
|
-
const VisTreemapSelectors = Treemap.selectors;
|
|
6
|
-
function VisTreemapFC(props, fRef) {
|
|
7
|
-
const ref = useRef(null);
|
|
8
|
-
const componentRef = useRef(undefined);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const element = ref.current;
|
|
11
|
-
const c = new Treemap(props);
|
|
12
|
-
componentRef.current = c;
|
|
13
|
-
element.__component__ = c;
|
|
14
|
-
return () => {
|
|
15
|
-
componentRef.current = undefined;
|
|
16
|
-
c.destroy();
|
|
17
|
-
};
|
|
18
|
-
}, []);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
const component = componentRef.current;
|
|
21
|
-
if (props.data)
|
|
22
|
-
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
23
|
-
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
24
|
-
});
|
|
25
|
-
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
26
|
-
return React.createElement("vis-component", { ref: ref });
|
|
27
|
-
}
|
|
28
|
-
const VisTreemap = React.memo(React.forwardRef(VisTreemapFC), arePropsEqual);
|
|
29
|
-
|
|
30
|
-
export { VisTreemap, VisTreemapSelectors };
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Treemap, TreemapConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTreemapRef<Datum> = {\n component?: Treemap<Datum>;\n}\n\nexport type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisTreemapRef<Datum>>;\n}\n\nexport const VisTreemapSelectors = Treemap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTreemapFC<Datum> (props: VisTreemapProps<Datum>, fRef: ForwardedRef<VisTreemapRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Treemap<Datum>>>(null)\n const componentRef = useRef<Treemap<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Treemap<Datum>>)\n\n const c = new Treemap<Datum>(props)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisTreemapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,mBAAmB,GAAG,OAAO,CAAC,UAAS;AAGpD,SAAS,YAAY,CAAS,KAA6B,EAAE,IAAwC,EAAA;AACnG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAsC,IAAI,CAAC,CAAA;AAC7D,IAAA,MAAM,YAAY,GAAG,MAAM,CAA6B,SAAS,CAAC,CAAA;IAGlE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAA+C,CAAA;AAEpE,QAAA,MAAM,CAAC,GAAG,IAAI,OAAO,CAAQ,KAAK,CAAC,CAAA;AACnC,QAAA,YAAY,CAAC,OAAO,GAAG,CAAC,CAAA;AACxB,QAAA,OAAO,CAAC,aAAa,GAAG,CAAC,CAAA;AAEzB,QAAA,OAAO,MAAK;AACV,YAAA,YAAY,CAAC,OAAO,GAAG,SAAS,CAAA;YAChC,CAAC,CAAC,OAAO,EAAE,CAAA;AACb,SAAC,CAAA;KACF,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAA;QACtC,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,YAAY,CAAC,OAAO,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AAC3F,IAAA,OAAO,KAAe,CAAA,aAAA,CAAA,eAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AACpC,CAAC;AAIY,MAAA,UAAU,GAAmE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'react';
|
|
2
|
-
import { RollingPinLegend, RollingPinLegendConfigInterface } from '@unovis/ts';
|
|
3
|
-
export declare type VisRollingPinLegendRef = {
|
|
4
|
-
component?: RollingPinLegend;
|
|
5
|
-
};
|
|
6
|
-
export declare type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {
|
|
7
|
-
ref?: Ref<VisRollingPinLegendRef>;
|
|
8
|
-
className?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/lib/components/rolling-pin-legend/style");
|
|
11
|
-
export declare const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
2
|
-
import { RollingPinLegend } from '@unovis/ts';
|
|
3
|
-
import { arePropsEqual } from '../../utils/react.js';
|
|
4
|
-
|
|
5
|
-
const VisRollingPinLegendSelectors = RollingPinLegend.selectors;
|
|
6
|
-
function VisRollingPinLegendFC(props, fRef) {
|
|
7
|
-
const ref = useRef(null);
|
|
8
|
-
const [component, setComponent] = useState();
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const c = new RollingPinLegend(ref.current, props);
|
|
11
|
-
setComponent(c);
|
|
12
|
-
return () => c === null || c === void 0 ? void 0 : c.destroy();
|
|
13
|
-
}, []);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
16
|
-
});
|
|
17
|
-
useImperativeHandle(fRef, () => ({ get component() { return component; } }), []);
|
|
18
|
-
return React.createElement("div", { className: props.className, ref: ref });
|
|
19
|
-
}
|
|
20
|
-
const VisRollingPinLegend = React.memo(React.forwardRef(VisRollingPinLegendFC), arePropsEqual);
|
|
21
|
-
|
|
22
|
-
export { VisRollingPinLegend, VisRollingPinLegendSelectors };
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { RollingPinLegend, RollingPinLegendConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisRollingPinLegendRef = {\n component?: RollingPinLegend;\n}\n\nexport type VisRollingPinLegendProps = RollingPinLegendConfigInterface & {\n ref?: Ref<VisRollingPinLegendRef>;\n className?: string;\n}\n\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisRollingPinLegendFC (props: VisRollingPinLegendProps, fRef: ForwardedRef<VisRollingPinLegendRef>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<RollingPinLegend>()\n\n // On Mount\n useEffect(() => {\n const c = new RollingPinLegend(ref.current as HTMLDivElement, props)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisRollingPinLegend: ((props: VisRollingPinLegendProps) => JSX.Element | null) = React.memo(React.forwardRef(VisRollingPinLegendFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAgBa,MAAA,4BAA4B,GAAG,gBAAgB,CAAC,UAAS;AAGtE,SAAS,qBAAqB,CAAE,KAA+B,EAAE,IAA0C,EAAA;AACzG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAoB,CAAA;IAG9D,SAAS,CAAC,MAAK;QACb,MAAM,CAAC,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,OAAyB,EAAE,KAAK,CAAC,CAAA;QACpE,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,KAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAChF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,mBAAmB,GAA8D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,aAAa;;;;"}
|