@unovis/react 1.1.0-beta.2 → 1.1.0-beta.5
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/area/index.js +9 -5
- package/components/area/index.js.map +1 -1
- package/components/axis/index.js +9 -5
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.js +9 -5
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.js +30 -0
- package/components/chord-diagram/index.js.map +1 -0
- package/components/crosshair/index.js +9 -5
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.js +9 -5
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.js +9 -5
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.js +9 -5
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.js +9 -5
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.js +9 -5
- package/components/line/index.js.map +1 -1
- package/components/sankey/index.js +9 -5
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.js +9 -5
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.js +9 -5
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.js +9 -5
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.js +9 -5
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.js +9 -5
- package/components/topojson-map/index.js.map +1 -1
- package/components/xy-labels/index.js +9 -5
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +3 -2
- package/composites/time-series/index.js +4 -5
- package/composites/time-series/index.js.map +1 -1
- package/composites/time-series/style.module.css.js +8 -0
- package/composites/time-series/style.module.css.js.map +1 -0
- package/containers/single-container/index.d.ts +3 -1
- package/containers/single-container/index.js +2 -1
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.d.ts +2 -1
- package/containers/xy-container/index.js +2 -1
- package/containers/xy-container/index.js.map +1 -1
- package/external/style-inject/dist/style-inject.es.js +29 -0
- package/external/style-inject/dist/style-inject.es.js.map +1 -0
- package/html-components/leaflet-flow-map/index.d.ts +2 -1
- package/html-components/leaflet-flow-map/index.js +1 -1
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.d.ts +2 -1
- package/html-components/leaflet-map/index.js +1 -1
- package/html-components/leaflet-map/index.js.map +1 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/package.json +4 -4
- package/composites/time-series/style.d.ts +0 -3
- package/composites/time-series/style.js +0 -21
- package/composites/time-series/style.js.map +0 -1
|
@@ -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 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 style?: React.CSSProperties;\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} style={props.style}/>\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":";;;;AAsBgB,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;AAEF,IAAA,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAC/C,IAAA,OAAO,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,CAAA;AAC/E,CAAC;AAIY,MAAA,iBAAiB,GAI5B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ForwardedRef, Ref } from 'react';
|
|
1
|
+
import React, { ForwardedRef, Ref } from 'react';
|
|
2
2
|
import { LeafletMap, LeafletMapConfigInterface } from '@unovis/ts';
|
|
3
3
|
export declare type VisLeafletMapProps<Datum extends Record<string, unknown>> = LeafletMapConfigInterface<Datum> & {
|
|
4
4
|
data?: Datum[];
|
|
5
5
|
ref?: Ref<VisLeafletMapRef<Datum>>;
|
|
6
6
|
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
7
8
|
};
|
|
8
9
|
export declare type VisLeafletMapRef<Datum extends Record<string, unknown>> = {
|
|
9
10
|
component: LeafletMap<Datum> | undefined;
|
|
@@ -16,7 +16,7 @@ function VisLeafletMapFC(props, ref) {
|
|
|
16
16
|
component === null || component === void 0 ? void 0 : component.setConfig(props);
|
|
17
17
|
});
|
|
18
18
|
useImperativeHandle(ref, () => ({ component }));
|
|
19
|
-
return React.createElement("div", { ref: container, className: props.className });
|
|
19
|
+
return React.createElement("div", { ref: container, className: props.className, style: props.style });
|
|
20
20
|
}
|
|
21
21
|
const VisLeafletMap = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual);
|
|
22
22
|
|
|
@@ -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 type VisLeafletMapProps<Datum extends Record<string, unknown>> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n style?: React.CSSProperties;\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} style={props.style}/>\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":";;;;AAegB,SAAA,eAAe,CAAyC,KAAgC,EAAE,GAA0C,EAAA;AAClJ,IAAA,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAqB,CAAA;IAG/D,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QAChF,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;AAEF,IAAA,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAC/C,IAAA,OAAO,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,CAAA;AAC/E,CAAC;AAIY,MAAA,aAAa,GACxB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
|
package/index.js
CHANGED
|
@@ -4,9 +4,10 @@ export { VisLine } from './components/line/index.js';
|
|
|
4
4
|
export { VisArea } from './components/area/index.js';
|
|
5
5
|
export { VisAxis } from './components/axis/index.js';
|
|
6
6
|
export { VisBrush } from './components/brush/index.js';
|
|
7
|
-
export {
|
|
7
|
+
export { VisChordDiagram } from './components/chord-diagram/index.js';
|
|
8
8
|
export { VisCrosshair } from './components/crosshair/index.js';
|
|
9
9
|
export { VisDonut } from './components/donut/index.js';
|
|
10
|
+
export { VisFreeBrush } from './components/free-brush/index.js';
|
|
10
11
|
export { VisGraph } from './components/graph/index.js';
|
|
11
12
|
export { VisGroupedBar } from './components/grouped-bar/index.js';
|
|
12
13
|
export { VisScatter } from './components/scatter/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,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.1.0-beta.
|
|
4
|
+
"version": "1.1.0-beta.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -35,13 +35,11 @@
|
|
|
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
|
-
"@
|
|
39
|
-
"@unovis/ts": "1.1.0-beta.2",
|
|
38
|
+
"@unovis/ts": "1.1.0-beta.5",
|
|
40
39
|
"react": ">=16.8.0 || ^17 || ^18",
|
|
41
40
|
"react-dom": ">=16.8.0 || ^17 || ^18"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@emotion/css": "^11.7.1",
|
|
45
43
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
46
44
|
"@types/react": ">=16.8.0",
|
|
47
45
|
"@types/node": "^16.11.17",
|
|
@@ -51,6 +49,8 @@
|
|
|
51
49
|
"rimraf": "^3.0.2",
|
|
52
50
|
"rollup": "^2.61.1",
|
|
53
51
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
+
"rollup-plugin-rename-node-modules": "^1.3.1",
|
|
54
54
|
"rollup-plugin-typescript2": "^0.31.1",
|
|
55
55
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
56
56
|
"tslib": "^2.3.1",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/css';
|
|
2
|
-
|
|
3
|
-
const timeSeriesContainer = css `
|
|
4
|
-
position: relative;
|
|
5
|
-
height: 400px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
font-family: sans-serif;
|
|
8
|
-
`;
|
|
9
|
-
const timeSeriesModule = css `
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 70%;
|
|
12
|
-
position: relative;
|
|
13
|
-
`;
|
|
14
|
-
const navigationModule = css `
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 30%;
|
|
17
|
-
position: relative;
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
export { navigationModule, timeSeriesContainer, timeSeriesModule };
|
|
21
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../src/composites/time-series/style.ts"],"sourcesContent":["import { css } from '@emotion/css'\n\nexport const timeSeriesContainer = css`\n position: relative;\n height: 400px;\n width: 100%;\n font-family: sans-serif;\n`\n\nexport const timeSeriesModule = css`\n width: 100%;\n height: 70%;\n position: relative;\n`\n\nexport const navigationModule = css`\n width: 100%;\n height: 30%;\n position: relative;\n`\n"],"names":[],"mappings":";;AAEO,MAAM,mBAAmB,GAAG,GAAG,CAAA,CAAA;;;;;EAKrC;AAEM,MAAM,gBAAgB,GAAG,GAAG,CAAA,CAAA;;;;EAIlC;AAEM,MAAM,gBAAgB,GAAG,GAAG,CAAA,CAAA;;;;;;;;"}
|