@unovis/react 1.4.0-beta.6 → 1.4.0
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/components/annotations/index.js.map +1 -1
- package/components/area/index.d.ts +1 -0
- package/components/area/index.js +3 -2
- package/components/area/index.js.map +1 -1
- package/components/axis/index.d.ts +1 -0
- package/components/axis/index.js +3 -2
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.d.ts +1 -0
- package/components/brush/index.js +3 -2
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.d.ts +1 -0
- package/components/chord-diagram/index.js +3 -2
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.d.ts +1 -0
- package/components/crosshair/index.js +3 -2
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.d.ts +1 -0
- package/components/donut/index.js +3 -2
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.d.ts +1 -0
- package/components/free-brush/index.js +3 -2
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.d.ts +21 -0
- package/components/graph/index.js +3 -2
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.d.ts +1 -0
- package/components/grouped-bar/index.js +3 -2
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.d.ts +1 -0
- package/components/line/index.js +3 -2
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.d.ts +1 -0
- package/components/nested-donut/index.js +3 -2
- package/components/nested-donut/index.js.map +1 -1
- package/components/sankey/index.d.ts +1 -0
- package/components/sankey/index.js +3 -2
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.d.ts +1 -0
- package/components/scatter/index.js +3 -2
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.d.ts +1 -0
- package/components/stacked-bar/index.js +3 -2
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.d.ts +1 -0
- package/components/timeline/index.js +3 -2
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.d.ts +1 -0
- package/components/tooltip/index.js +3 -2
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.d.ts +1 -0
- package/components/topojson-map/index.js +3 -2
- package/components/topojson-map/index.js.map +1 -1
- package/components/xy-labels/index.d.ts +1 -0
- package/components/xy-labels/index.js +3 -2
- package/components/xy-labels/index.js.map +1 -1
- package/html-components/bullet-legend/index.d.ts +1 -0
- package/html-components/bullet-legend/index.js +2 -1
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +1 -0
- package/html-components/leaflet-flow-map/index.js +3 -2
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.d.ts +1 -0
- package/html-components/leaflet-map/index.js +3 -2
- package/html-components/leaflet-map/index.js.map +1 -1
- package/index.js +21 -21
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { Sankey } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisSankeySelectors = Sankey.selectors;
|
|
5
6
|
function VisSankeyFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisSankeyFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisSankey = React.memo(React.forwardRef(VisSankeyFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisSankey };
|
|
30
|
+
export { VisSankey, VisSankeySelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisSankeyRef<N extends SankeyInputNode, L extends SankeyInputLink> = {\n component?: Sankey<N, L>;\n}\n\nexport type VisSankeyProps<N extends SankeyInputNode, L extends SankeyInputLink> = SankeyConfigInterface<N, L> & {\n data?: { nodes: N[]; links?: L[] };\n ref?: Ref<VisSankeyRef<N, L>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisSankeyFC<N extends SankeyInputNode, L extends SankeyInputLink> (props: VisSankeyProps<N, L>, fRef: ForwardedRef<VisSankeyRef<N, L>>): JSX.Element {\n const ref = useRef<VisComponentElement<Sankey<N, L>>>(null)\n const componentRef = useRef<Sankey<N, L> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Sankey<N, L>>)\n\n const c = new Sankey<N, L>(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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisSankeyRef<N extends SankeyInputNode, L extends SankeyInputLink> = {\n component?: Sankey<N, L>;\n}\n\nexport type VisSankeyProps<N extends SankeyInputNode, L extends SankeyInputLink> = SankeyConfigInterface<N, L> & {\n data?: { nodes: N[]; links?: L[] };\n ref?: Ref<VisSankeyRef<N, L>>;\n}\n\nexport const VisSankeySelectors = Sankey.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisSankeyFC<N extends SankeyInputNode, L extends SankeyInputLink> (props: VisSankeyProps<N, L>, fRef: ForwardedRef<VisSankeyRef<N, L>>): JSX.Element {\n const ref = useRef<VisComponentElement<Sankey<N, L>>>(null)\n const componentRef = useRef<Sankey<N, L> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Sankey<N, L>>)\n\n const c = new Sankey<N, L>(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 VisSankey: (<N extends SankeyInputNode, L extends SankeyInputLink>(props: VisSankeyProps<N, L>) => JSX.Element | null) = React.memo(React.forwardRef(VisSankeyFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,kBAAkB,GAAG,MAAM,CAAC,UAAS;AAGlD,SAAS,WAAW,CAAwD,KAA2B,EAAE,IAAsC,EAAA;AAC7I,IAAA,MAAM,GAAG,GAAG,MAAM,CAAoC,IAAI,CAAC,CAAA;AAC3D,IAAA,MAAM,YAAY,GAAG,MAAM,CAA2B,SAAS,CAAC,CAAA;IAGhE,SAAS,CAAC,MAAK;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>>;
|
|
9
9
|
};
|
|
10
|
+
export declare const VisScatterSelectors: typeof import("@unovis/ts/lib/components/scatter/style");
|
|
10
11
|
export declare const VisScatter: (<Datum>(props: VisScatterProps<Datum>) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { Scatter } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisScatterSelectors = Scatter.selectors;
|
|
5
6
|
function VisScatterFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisScatterFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisScatter = React.memo(React.forwardRef(VisScatterFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisScatter };
|
|
30
|
+
export { VisScatter, VisScatterSelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Scatter, ScatterConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisScatterRef<Datum> = {\n component?: Scatter<Datum>;\n}\n\nexport type VisScatterProps<Datum> = ScatterConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisScatterRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisScatterFC<Datum> (props: VisScatterProps<Datum>, fRef: ForwardedRef<VisScatterRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Scatter<Datum>>>(null)\n const componentRef = useRef<Scatter<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Scatter<Datum>>)\n\n const c = new Scatter<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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Scatter, ScatterConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisScatterRef<Datum> = {\n component?: Scatter<Datum>;\n}\n\nexport type VisScatterProps<Datum> = ScatterConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisScatterRef<Datum>>;\n}\n\nexport const VisScatterSelectors = Scatter.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisScatterFC<Datum> (props: VisScatterProps<Datum>, fRef: ForwardedRef<VisScatterRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Scatter<Datum>>>(null)\n const componentRef = useRef<Scatter<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Scatter<Datum>>)\n\n const c = new Scatter<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 VisScatter: (<Datum>(props: VisScatterProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisScatterFC), 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;;;;"}
|
|
@@ -7,4 +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/lib/components/stacked-bar/style");
|
|
10
11
|
export declare const VisStackedBar: (<Datum>(props: VisStackedBarProps<Datum>) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { StackedBar } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisStackedBarSelectors = StackedBar.selectors;
|
|
5
6
|
function VisStackedBarFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisStackedBarFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisStackedBar = React.memo(React.forwardRef(VisStackedBarFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisStackedBar };
|
|
30
|
+
export { VisStackedBar, VisStackedBarSelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { StackedBar, StackedBarConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisStackedBarRef<Datum> = {\n component?: StackedBar<Datum>;\n}\n\nexport type VisStackedBarProps<Datum> = StackedBarConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisStackedBarRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisStackedBarFC<Datum> (props: VisStackedBarProps<Datum>, fRef: ForwardedRef<VisStackedBarRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<StackedBar<Datum>>>(null)\n const componentRef = useRef<StackedBar<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<StackedBar<Datum>>)\n\n const c = new StackedBar<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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { StackedBar, StackedBarConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisStackedBarRef<Datum> = {\n component?: StackedBar<Datum>;\n}\n\nexport type VisStackedBarProps<Datum> = StackedBarConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisStackedBarRef<Datum>>;\n}\n\nexport const VisStackedBarSelectors = StackedBar.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisStackedBarFC<Datum> (props: VisStackedBarProps<Datum>, fRef: ForwardedRef<VisStackedBarRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<StackedBar<Datum>>>(null)\n const componentRef = useRef<StackedBar<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<StackedBar<Datum>>)\n\n const c = new StackedBar<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 VisStackedBar: (<Datum>(props: VisStackedBarProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisStackedBarFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,sBAAsB,GAAG,UAAU,CAAC,UAAS;AAG1D,SAAS,eAAe,CAAS,KAAgC,EAAE,IAA2C,EAAA;AAC5G,IAAA,MAAM,GAAG,GAAG,MAAM,CAAyC,IAAI,CAAC,CAAA;AAChE,IAAA,MAAM,YAAY,GAAG,MAAM,C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7
7
|
data?: Datum[];
|
|
8
8
|
ref?: Ref<VisTimelineRef<Datum>>;
|
|
9
9
|
};
|
|
10
|
+
export declare const VisTimelineSelectors: typeof import("@unovis/ts/lib/components/timeline/style");
|
|
10
11
|
export declare const VisTimeline: (<Datum>(props: VisTimelineProps<Datum>) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { Timeline } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisTimelineSelectors = Timeline.selectors;
|
|
5
6
|
function VisTimelineFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisTimelineFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisTimeline = React.memo(React.forwardRef(VisTimelineFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisTimeline };
|
|
30
|
+
export { VisTimeline, VisTimelineSelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Timeline, TimelineConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTimelineRef<Datum> = {\n component?: Timeline<Datum>;\n}\n\nexport type VisTimelineProps<Datum> = TimelineConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisTimelineRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTimelineFC<Datum> (props: VisTimelineProps<Datum>, fRef: ForwardedRef<VisTimelineRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Timeline<Datum>>>(null)\n const componentRef = useRef<Timeline<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Timeline<Datum>>)\n\n const c = new Timeline<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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Timeline, TimelineConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTimelineRef<Datum> = {\n component?: Timeline<Datum>;\n}\n\nexport type VisTimelineProps<Datum> = TimelineConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisTimelineRef<Datum>>;\n}\n\nexport const VisTimelineSelectors = Timeline.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTimelineFC<Datum> (props: VisTimelineProps<Datum>, fRef: ForwardedRef<VisTimelineRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<Timeline<Datum>>>(null)\n const componentRef = useRef<Timeline<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Timeline<Datum>>)\n\n const c = new Timeline<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 VisTimeline: (<Datum>(props: VisTimelineProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisTimelineFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,oBAAoB,GAAG,QAAQ,CAAC,UAAS;AAGtD,SAAS,aAAa,CAAS,KAA8B,EAAE,IAAyC,EAAA;AACtG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAA;AAC9D,IAAA,MAAM,YAAY,GAAG,MAAM,CAA8B,SAAS,CAAC,CAAA;IAGnE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAgD,CAAA;AAErE,QAAA,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAQ,KAAK,CAAC,CAAA;AACpC,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,WAAW,GAAoE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -7,4 +7,5 @@ export declare type VisTooltipProps = TooltipConfigInterface & {
|
|
|
7
7
|
data?: null;
|
|
8
8
|
ref?: Ref<VisTooltipRef>;
|
|
9
9
|
};
|
|
10
|
+
export declare const VisTooltipSelectors: typeof import("@unovis/ts/lib/components/tooltip/style");
|
|
10
11
|
export declare const VisTooltip: ((props: VisTooltipProps) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { Tooltip } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisTooltipSelectors = Tooltip.selectors;
|
|
5
6
|
function VisTooltipFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -19,10 +20,10 @@ function VisTooltipFC(props, fRef) {
|
|
|
19
20
|
const component = componentRef.current;
|
|
20
21
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
21
22
|
});
|
|
22
|
-
useImperativeHandle(fRef, () => ({ component
|
|
23
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
23
24
|
return React.createElement("vis-tooltip", { ref: ref });
|
|
24
25
|
}
|
|
25
26
|
const VisTooltip = React.memo(React.forwardRef(VisTooltipFC), arePropsEqual);
|
|
26
27
|
|
|
27
|
-
export { VisTooltip };
|
|
28
|
+
export { VisTooltip, VisTooltipSelectors };
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTooltipRef = {\n component?: Tooltip;\n}\n\nexport type VisTooltipProps = TooltipConfigInterface & {\n data?: null;\n ref?: Ref<VisTooltipRef>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTooltipFC (props: VisTooltipProps, fRef: ForwardedRef<VisTooltipRef>): JSX.Element {\n const ref = useRef<VisComponentElement<Tooltip>>(null)\n const componentRef = useRef<Tooltip | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Tooltip>)\n\n const c = new Tooltip(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\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTooltipRef = {\n component?: Tooltip;\n}\n\nexport type VisTooltipProps = TooltipConfigInterface & {\n data?: null;\n ref?: Ref<VisTooltipRef>;\n}\n\nexport const VisTooltipSelectors = Tooltip.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTooltipFC (props: VisTooltipProps, fRef: ForwardedRef<VisTooltipRef>): JSX.Element {\n const ref = useRef<VisComponentElement<Tooltip>>(null)\n const componentRef = useRef<Tooltip | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Tooltip>)\n\n const c = new Tooltip(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\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <vis-tooltip 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 VisTooltip: ((props: VisTooltipProps) => JSX.Element | null) = React.memo(React.forwardRef(VisTooltipFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,mBAAmB,GAAG,OAAO,CAAC,UAAS;AAGpD,SAAS,YAAY,CAAE,KAAsB,EAAE,IAAiC,EAAA;AAC9E,IAAA,MAAM,GAAG,GAAG,MAAM,CAA+B,IAAI,CAAC,CAAA;AACtD,IAAA,MAAM,YAAY,GAAG,MAAM,CAAsB,SAAS,CAAC,CAAA;IAG3D,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAwC,CAAA;AAE7D,QAAA,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAA;AAC5B,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;QAEtC,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,KAAa,CAAA,aAAA,CAAA,aAAA,EAAA,EAAA,GAAG,EAAE,GAAG,GAAI,CAAA;AAClC,CAAC;AAIY,MAAA,UAAU,GAAqD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -11,4 +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/lib/components/topojson-map/style");
|
|
14
15
|
export declare const VisTopoJSONMap: (<AreaDatum, PointDatum, LinkDatum>(props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { TopoJSONMap } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisTopoJSONMapSelectors = TopoJSONMap.selectors;
|
|
5
6
|
function VisTopoJSONMapFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisTopoJSONMapFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisTopoJSONMap = React.memo(React.forwardRef(VisTopoJSONMapFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisTopoJSONMap };
|
|
30
|
+
export { VisTopoJSONMap, VisTopoJSONMapSelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { TopoJSONMap, TopoJSONMapConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum> = {\n component?: TopoJSONMap<AreaDatum, PointDatum, LinkDatum>;\n}\n\nexport type VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum> = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> & {\n data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]};\n ref?: Ref<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTopoJSONMapFC<AreaDatum, PointDatum, LinkDatum> (props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>, fRef: ForwardedRef<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>): JSX.Element {\n const ref = useRef<VisComponentElement<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>>(null)\n const componentRef = useRef<TopoJSONMap<AreaDatum, PointDatum, LinkDatum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>)\n\n const c = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { TopoJSONMap, TopoJSONMapConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum> = {\n component?: TopoJSONMap<AreaDatum, PointDatum, LinkDatum>;\n}\n\nexport type VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum> = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> & {\n data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]};\n ref?: Ref<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>;\n}\n\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTopoJSONMapFC<AreaDatum, PointDatum, LinkDatum> (props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>, fRef: ForwardedRef<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>): JSX.Element {\n const ref = useRef<VisComponentElement<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>>(null)\n const componentRef = useRef<TopoJSONMap<AreaDatum, PointDatum, LinkDatum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>)\n\n const c = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(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 VisTopoJSONMap: (<AreaDatum, PointDatum, LinkDatum>(props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>) => JSX.Element | null) = React.memo(React.forwardRef(VisTopoJSONMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,uBAAuB,GAAG,WAAW,CAAC,UAAS;AAG5D,SAAS,gBAAgB,CAAoC,KAA4D,EAAE,IAAuE,EAAA;AAChM,IAAA,MAAM,GAAG,GAAG,MAAM,CAAqE,IAAI,CAAC,CAAA;AAC5F,IAAA,MAAM,YAAY,GAAG,MAAM,CAA4D,SAAS,CAAC,CAAA;IAGjG,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAA8E,CAAA;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YLabelsSelectors: typeof import("@unovis/ts/lib/components/xy-labels/style");
|
|
10
11
|
export declare const VisXYLabels: (<Datum>(props: VisXYLabelsProps<Datum>) => JSX.Element | null);
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { XYLabels } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisXYLabelsSelectors = XYLabels.selectors;
|
|
5
6
|
function VisXYLabelsFC(props, fRef) {
|
|
6
7
|
const ref = useRef(null);
|
|
7
8
|
const componentRef = useRef(undefined);
|
|
@@ -21,10 +22,10 @@ function VisXYLabelsFC(props, fRef) {
|
|
|
21
22
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
22
23
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
23
24
|
});
|
|
24
|
-
useImperativeHandle(fRef, () => ({ component
|
|
25
|
+
useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
|
|
25
26
|
return React.createElement("vis-component", { ref: ref });
|
|
26
27
|
}
|
|
27
28
|
const VisXYLabels = React.memo(React.forwardRef(VisXYLabelsFC), arePropsEqual);
|
|
28
29
|
|
|
29
|
-
export { VisXYLabels };
|
|
30
|
+
export { VisXYLabels, VisXYLabelsSelectors };
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { XYLabels, XYLabelsConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisXYLabelsRef<Datum> = {\n component?: XYLabels<Datum>;\n}\n\nexport type VisXYLabelsProps<Datum> = XYLabelsConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisXYLabelsRef<Datum>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisXYLabelsFC<Datum> (props: VisXYLabelsProps<Datum>, fRef: ForwardedRef<VisXYLabelsRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<XYLabels<Datum>>>(null)\n const componentRef = useRef<XYLabels<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<XYLabels<Datum>>)\n\n const c = new XYLabels<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, () => ({ component
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { XYLabels, XYLabelsConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisXYLabelsRef<Datum> = {\n component?: XYLabels<Datum>;\n}\n\nexport type VisXYLabelsProps<Datum> = XYLabelsConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisXYLabelsRef<Datum>>;\n}\n\nexport const VisXYLabelsSelectors = XYLabels.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisXYLabelsFC<Datum> (props: VisXYLabelsProps<Datum>, fRef: ForwardedRef<VisXYLabelsRef<Datum>>): JSX.Element {\n const ref = useRef<VisComponentElement<XYLabels<Datum>>>(null)\n const componentRef = useRef<XYLabels<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<XYLabels<Datum>>)\n\n const c = new XYLabels<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 VisXYLabels: (<Datum>(props: VisXYLabelsProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisXYLabelsFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAmBa,MAAA,oBAAoB,GAAG,QAAQ,CAAC,UAAS;AAGtD,SAAS,aAAa,CAAS,KAA8B,EAAE,IAAyC,EAAA;AACtG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAA;AAC9D,IAAA,MAAM,YAAY,GAAG,MAAM,CAA8B,SAAS,CAAC,CAAA;IAGnE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAgD,CAAA;AAErE,QAAA,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAQ,KAAK,CAAC,CAAA;AACpC,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,WAAW,GAAoE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { BulletLegendConfigInterface } from '@unovis/ts';
|
|
2
2
|
export declare type VisBulletLegendProps = BulletLegendConfigInterface;
|
|
3
|
+
export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/lib/components/bullet-legend/style");
|
|
3
4
|
export declare function VisBulletLegend(props: VisBulletLegendProps): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { BulletLegend } from '@unovis/ts';
|
|
3
3
|
|
|
4
|
+
const VisBulletLegendSelectors = BulletLegend.selectors;
|
|
4
5
|
function VisBulletLegend(props) {
|
|
5
6
|
const container = useRef(null);
|
|
6
7
|
const [component, setComponent] = useState();
|
|
@@ -15,5 +16,5 @@ function VisBulletLegend(props) {
|
|
|
15
16
|
return React.createElement("div", { ref: container });
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
export { VisBulletLegend };
|
|
19
|
+
export { VisBulletLegend, VisBulletLegendSelectors };
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\nimport { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts'\n\nexport type VisBulletLegendProps = BulletLegendConfigInterface\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function VisBulletLegend (props: VisBulletLegendProps): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<BulletLegend>()\n\n // On Mount\n useEffect(() => {\n const c = new BulletLegend(container.current as HTMLDivElement, props)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n component?.update(props)\n })\n\n return <div ref={container} />\n}\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\nimport { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts'\n\nexport type VisBulletLegendProps = BulletLegendConfigInterface\n\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function VisBulletLegend (props: VisBulletLegendProps): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<BulletLegend>()\n\n // On Mount\n useEffect(() => {\n const c = new BulletLegend(container.current as HTMLDivElement, props)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n component?.update(props)\n })\n\n return <div ref={container} />\n}\n"],"names":[],"mappings":";;;AAKa,MAAA,wBAAwB,GAAG,YAAY,CAAC,UAAS;AAGxD,SAAU,eAAe,CAAE,KAA2B,EAAA;AAC1D,IAAA,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAgB,CAAA;IAG1D,SAAS,CAAC,MAAK;QACb,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,SAAS,CAAC,OAAyB,EAAE,KAAK,CAAC,CAAA;QACtE,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,MAAM,CAAC,KAAK,CAAC,CAAA;AAC1B,KAAC,CAAC,CAAA;AAEF,IAAA,OAAO,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,GAAI,CAAA;AAChC;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, Ref } from 'react';
|
|
2
2
|
import { LeafletFlowMap, LeafletFlowMapConfigInterface } from '@unovis/ts';
|
|
3
|
+
export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/lib/components/leaflet-map/style");
|
|
3
4
|
export declare type VisLeafletFlowMapProps<PointDatum extends Record<string, unknown>, FlowDatum extends Record<string, unknown>> = LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {
|
|
4
5
|
data?: {
|
|
5
6
|
points: PointDatum[];
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { LeafletFlowMap } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisLeafletFlowMapSelectors = LeafletFlowMap.selectors;
|
|
5
6
|
function VisLeafletFlowMapFC(props, ref) {
|
|
6
7
|
const container = useRef(null);
|
|
7
8
|
const [component, setComponent] = useState();
|
|
@@ -15,10 +16,10 @@ function VisLeafletFlowMapFC(props, ref) {
|
|
|
15
16
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
16
17
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
17
18
|
});
|
|
18
|
-
useImperativeHandle(ref, () => ({ component }));
|
|
19
|
+
useImperativeHandle(ref, () => ({ get component() { return component; } }), [component]);
|
|
19
20
|
return React.createElement("div", { ref: container, className: props.className });
|
|
20
21
|
}
|
|
21
22
|
const VisLeafletFlowMap = React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual);
|
|
22
23
|
|
|
23
|
-
export { VisLeafletFlowMap, VisLeafletFlowMapFC };
|
|
24
|
+
export { VisLeafletFlowMap, VisLeafletFlowMapFC, VisLeafletFlowMapSelectors };
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-flow-map/index.tsx"],"sourcesContent":["import React, { ForwardedRef, Ref, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface } from '@unovis/ts'\nimport { arePropsEqual } from '../../utils/react'\n\nexport type VisLeafletFlowMapProps<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> = LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {\n data?: { points: PointDatum[]; flows: FlowDatum[] };\n ref?: Ref<VisLeafletFlowMapRef<PointDatum, FlowDatum>>;\n className?: string;\n}\n\nexport type VisLeafletFlowMapRef<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> = {\n component: LeafletFlowMap<PointDatum, FlowDatum> | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function VisLeafletFlowMapFC<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> (\n props: VisLeafletFlowMapProps<PointDatum, FlowDatum>,\n ref: ForwardedRef<VisLeafletFlowMapRef<PointDatum, FlowDatum>>\n): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletFlowMap<PointDatum, FlowDatum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletFlowMap(container.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(ref, () => ({ component }))\n return <div ref={container} className={props.className} />\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 VisLeafletFlowMap: (<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n>(props: VisLeafletFlowMapProps<PointDatum, FlowDatum>) => JSX.Element | null) =\n React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-flow-map/index.tsx"],"sourcesContent":["import React, { ForwardedRef, Ref, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface } from '@unovis/ts'\nimport { arePropsEqual } from '../../utils/react'\n\nexport const VisLeafletFlowMapSelectors = LeafletFlowMap.selectors\n\nexport type VisLeafletFlowMapProps<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> = LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {\n data?: { points: PointDatum[]; flows: FlowDatum[] };\n ref?: Ref<VisLeafletFlowMapRef<PointDatum, FlowDatum>>;\n className?: string;\n}\n\nexport type VisLeafletFlowMapRef<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> = {\n component: LeafletFlowMap<PointDatum, FlowDatum> | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function VisLeafletFlowMapFC<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n> (\n props: VisLeafletFlowMapProps<PointDatum, FlowDatum>,\n ref: ForwardedRef<VisLeafletFlowMapRef<PointDatum, FlowDatum>>\n): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletFlowMap<PointDatum, FlowDatum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletFlowMap(container.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(ref, () => ({ get component () { return component } }), [component])\n return <div ref={container} className={props.className} />\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 VisLeafletFlowMap: (<\n PointDatum extends Record<string, unknown>,\n FlowDatum extends Record<string, unknown>,\n>(props: VisLeafletFlowMapProps<PointDatum, FlowDatum>) => JSX.Element | null) =\n React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAIa,MAAA,0BAA0B,GAAG,cAAc,CAAC,UAAS;AAmBlD,SAAA,mBAAmB,CAIjC,KAAoD,EACpD,GAA8D,EAAA;AAE9D,IAAA,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAyC,CAAA;IAGnF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,cAAc,CAAC,SAAS,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACpF,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,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;QAE9C,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,GAAG,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACxF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAA,CAAI,CAAA;AAC5D,CAAC;AAIY,MAAA,iBAAiB,GAI5B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, Ref } from 'react';
|
|
2
2
|
import { LeafletMap, LeafletMapConfigInterface } from '@unovis/ts';
|
|
3
|
+
export declare const VisLeafletMapSelectors: typeof import("@unovis/ts/lib/components/leaflet-map/style");
|
|
3
4
|
export declare type VisLeafletMapProps<Datum extends Record<string, unknown>> = LeafletMapConfigInterface<Datum> & {
|
|
4
5
|
data?: Datum[];
|
|
5
6
|
ref?: Ref<VisLeafletMapRef<Datum>>;
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
|
2
2
|
import { LeafletMap } from '@unovis/ts';
|
|
3
3
|
import { arePropsEqual } from '../../utils/react.js';
|
|
4
4
|
|
|
5
|
+
const VisLeafletMapSelectors = LeafletMap.selectors;
|
|
5
6
|
function VisLeafletMapFC(props, ref) {
|
|
6
7
|
const container = useRef(null);
|
|
7
8
|
const [component, setComponent] = useState();
|
|
@@ -15,10 +16,10 @@ function VisLeafletMapFC(props, ref) {
|
|
|
15
16
|
component === null || component === void 0 ? void 0 : component.setData(props.data);
|
|
16
17
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
17
18
|
});
|
|
18
|
-
useImperativeHandle(ref, () => ({ component }));
|
|
19
|
+
useImperativeHandle(ref, () => ({ get component() { return component; } }), [component]);
|
|
19
20
|
return React.createElement("div", { ref: container, className: props.className });
|
|
20
21
|
}
|
|
21
22
|
const VisLeafletMap = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual);
|
|
22
23
|
|
|
23
|
-
export { VisLeafletMap, VisLeafletMapFC };
|
|
24
|
+
export { VisLeafletMap, VisLeafletMapFC, VisLeafletMapSelectors };
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["import React, { ForwardedRef, Ref, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { LeafletMap, LeafletMapConfigInterface } from '@unovis/ts'\nimport { arePropsEqual } from '../../utils/react'\n\nexport type VisLeafletMapProps<Datum extends Record<string, unknown>> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport type VisLeafletMapRef<Datum extends Record<string, unknown>> = {\n component: LeafletMap<Datum> | undefined;\n}\n\nexport function VisLeafletMapFC<Datum extends Record<string, unknown>> (props: VisLeafletMapProps<Datum>, ref: ForwardedRef<VisLeafletMapRef<Datum>>): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletMap<Datum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletMap(container.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(ref, () => ({ component }))\n return <div ref={container} className={props.className} />\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 VisLeafletMap: (<Datum extends Record<string, unknown>>(props: VisLeafletMapProps<Datum>) => JSX.Element | null) =\n React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["import React, { ForwardedRef, Ref, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { LeafletMap, LeafletMapConfigInterface } from '@unovis/ts'\nimport { arePropsEqual } from '../../utils/react'\n\nexport const VisLeafletMapSelectors = LeafletMap.selectors\n\nexport type VisLeafletMapProps<Datum extends Record<string, unknown>> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport type VisLeafletMapRef<Datum extends Record<string, unknown>> = {\n component: LeafletMap<Datum> | undefined;\n}\n\nexport function VisLeafletMapFC<Datum extends Record<string, unknown>> (props: VisLeafletMapProps<Datum>, ref: ForwardedRef<VisLeafletMapRef<Datum>>): JSX.Element {\n const container = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletMap<Datum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletMap(container.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n\n component?.setConfig(props)\n })\n\n useImperativeHandle(ref, () => ({ get component () { return component } }), [component])\n return <div ref={container} className={props.className} />\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 VisLeafletMap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S,EAAE,KAAK,CAAC,SAAS,EAAA,CAAI,CAAA;AAC5D,CAAC;AAIY,MAAA,aAAa,GACxB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
|
package/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export { VisXYContainer, VisXYContainerFC } from './containers/xy-container/index.js';
|
|
2
2
|
export { VisSingleContainer } from './containers/single-container/index.js';
|
|
3
|
-
export { VisLine } from './components/line/index.js';
|
|
4
|
-
export { VisArea } from './components/area/index.js';
|
|
5
|
-
export { VisAxis } from './components/axis/index.js';
|
|
6
|
-
export { VisBrush } from './components/brush/index.js';
|
|
7
|
-
export { VisChordDiagram } from './components/chord-diagram/index.js';
|
|
8
|
-
export { VisCrosshair } from './components/crosshair/index.js';
|
|
9
|
-
export { VisDonut } from './components/donut/index.js';
|
|
10
|
-
export { VisFreeBrush } from './components/free-brush/index.js';
|
|
11
|
-
export { VisGraph } from './components/graph/index.js';
|
|
12
|
-
export { VisGroupedBar } from './components/grouped-bar/index.js';
|
|
13
|
-
export { VisNestedDonut } from './components/nested-donut/index.js';
|
|
14
|
-
export { VisScatter } from './components/scatter/index.js';
|
|
15
|
-
export { VisSankey } from './components/sankey/index.js';
|
|
16
|
-
export { VisStackedBar } from './components/stacked-bar/index.js';
|
|
17
|
-
export { VisTooltip } from './components/tooltip/index.js';
|
|
18
|
-
export { VisTimeline } from './components/timeline/index.js';
|
|
19
|
-
export { VisTopoJSONMap } from './components/topojson-map/index.js';
|
|
20
|
-
export { VisXYLabels } from './components/xy-labels/index.js';
|
|
3
|
+
export { VisLine, VisLineSelectors } from './components/line/index.js';
|
|
4
|
+
export { VisArea, VisAreaSelectors } from './components/area/index.js';
|
|
5
|
+
export { VisAxis, VisAxisSelectors } from './components/axis/index.js';
|
|
6
|
+
export { VisBrush, VisBrushSelectors } from './components/brush/index.js';
|
|
7
|
+
export { VisChordDiagram, VisChordDiagramSelectors } from './components/chord-diagram/index.js';
|
|
8
|
+
export { VisCrosshair, VisCrosshairSelectors } from './components/crosshair/index.js';
|
|
9
|
+
export { VisDonut, VisDonutSelectors } from './components/donut/index.js';
|
|
10
|
+
export { VisFreeBrush, VisFreeBrushSelectors } from './components/free-brush/index.js';
|
|
11
|
+
export { VisGraph, VisGraphSelectors } from './components/graph/index.js';
|
|
12
|
+
export { VisGroupedBar, VisGroupedBarSelectors } from './components/grouped-bar/index.js';
|
|
13
|
+
export { VisNestedDonut, VisNestedDonutSelectors } from './components/nested-donut/index.js';
|
|
14
|
+
export { VisScatter, VisScatterSelectors } from './components/scatter/index.js';
|
|
15
|
+
export { VisSankey, VisSankeySelectors } from './components/sankey/index.js';
|
|
16
|
+
export { VisStackedBar, VisStackedBarSelectors } from './components/stacked-bar/index.js';
|
|
17
|
+
export { VisTooltip, VisTooltipSelectors } from './components/tooltip/index.js';
|
|
18
|
+
export { VisTimeline, VisTimelineSelectors } from './components/timeline/index.js';
|
|
19
|
+
export { VisTopoJSONMap, VisTopoJSONMapSelectors } from './components/topojson-map/index.js';
|
|
20
|
+
export { VisXYLabels, VisXYLabelsSelectors } from './components/xy-labels/index.js';
|
|
21
21
|
export { VisAnnotations } from './components/annotations/index.js';
|
|
22
|
-
export { VisBulletLegend } from './html-components/bullet-legend/index.js';
|
|
23
|
-
export { VisLeafletMap, VisLeafletMapFC } from './html-components/leaflet-map/index.js';
|
|
24
|
-
export { VisLeafletFlowMap, VisLeafletFlowMapFC } from './html-components/leaflet-flow-map/index.js';
|
|
22
|
+
export { VisBulletLegend, VisBulletLegendSelectors } from './html-components/bullet-legend/index.js';
|
|
23
|
+
export { VisLeafletMap, VisLeafletMapFC, VisLeafletMapSelectors } from './html-components/leaflet-map/index.js';
|
|
24
|
+
export { VisLeafletFlowMap, VisLeafletFlowMapFC, VisLeafletFlowMapSelectors } from './html-components/leaflet-flow-map/index.js';
|
|
25
25
|
export { VisTimeSeries } from './composites/time-series/index.js';
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/react",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.4.0
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"publish:dist": "rm -rf dist/.cache; cp ./{LICENSE,README.md,package.json} ./dist; cd ./dist; npm publish"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@unovis/ts": "1.4.0
|
|
38
|
+
"@unovis/ts": "1.4.0",
|
|
39
39
|
"react": ">=16.8.0 || ^17 || ^18",
|
|
40
40
|
"react-dom": ">=16.8.0 || ^17 || ^18"
|
|
41
41
|
},
|