@unovis/react 1.6.7 → 1.7.0-mcp.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.
Files changed (115) hide show
  1. package/README.md +4 -0
  2. package/components/annotations/index.d.ts +12 -11
  3. package/components/annotations/index.js +30 -27
  4. package/components/annotations/index.js.map +1 -1
  5. package/components/area/index.d.ts +13 -12
  6. package/components/area/index.js +31 -29
  7. package/components/area/index.js.map +1 -1
  8. package/components/axis/index.d.ts +13 -12
  9. package/components/axis/index.js +31 -29
  10. package/components/axis/index.js.map +1 -1
  11. package/components/boxplot/index.d.ts +13 -0
  12. package/components/boxplot/index.js +33 -0
  13. package/components/boxplot/index.js.map +1 -0
  14. package/components/brush/index.d.ts +13 -12
  15. package/components/brush/index.js +31 -29
  16. package/components/brush/index.js.map +1 -1
  17. package/components/chord-diagram/index.d.ts +17 -16
  18. package/components/chord-diagram/index.js +31 -29
  19. package/components/chord-diagram/index.js.map +1 -1
  20. package/components/crosshair/index.d.ts +13 -12
  21. package/components/crosshair/index.js +31 -29
  22. package/components/crosshair/index.js.map +1 -1
  23. package/components/donut/index.d.ts +13 -12
  24. package/components/donut/index.js +31 -29
  25. package/components/donut/index.js.map +1 -1
  26. package/components/free-brush/index.d.ts +13 -12
  27. package/components/free-brush/index.js +31 -29
  28. package/components/free-brush/index.js.map +1 -1
  29. package/components/graph/index.d.ts +39 -38
  30. package/components/graph/index.js +31 -29
  31. package/components/graph/index.js.map +1 -1
  32. package/components/grouped-bar/index.d.ts +13 -12
  33. package/components/grouped-bar/index.js +31 -29
  34. package/components/grouped-bar/index.js.map +1 -1
  35. package/components/heatmap/index.d.ts +13 -0
  36. package/components/heatmap/index.js +33 -0
  37. package/components/heatmap/index.js.map +1 -0
  38. package/components/line/index.d.ts +13 -12
  39. package/components/line/index.js +31 -29
  40. package/components/line/index.js.map +1 -1
  41. package/components/nested-donut/index.d.ts +13 -12
  42. package/components/nested-donut/index.js +31 -29
  43. package/components/nested-donut/index.js.map +1 -1
  44. package/components/plotband/index.d.ts +12 -11
  45. package/components/plotband/index.js +30 -27
  46. package/components/plotband/index.js.map +1 -1
  47. package/components/plotline/index.d.ts +12 -11
  48. package/components/plotline/index.js +30 -27
  49. package/components/plotline/index.js.map +1 -1
  50. package/components/radial-bar/index.d.ts +13 -0
  51. package/components/radial-bar/index.js +33 -0
  52. package/components/radial-bar/index.js.map +1 -0
  53. package/components/sankey/index.d.ts +17 -16
  54. package/components/sankey/index.js +31 -29
  55. package/components/sankey/index.js.map +1 -1
  56. package/components/scatter/index.d.ts +13 -12
  57. package/components/scatter/index.js +31 -29
  58. package/components/scatter/index.js.map +1 -1
  59. package/components/stacked-bar/index.d.ts +13 -12
  60. package/components/stacked-bar/index.js +31 -29
  61. package/components/stacked-bar/index.js.map +1 -1
  62. package/components/timeline/index.d.ts +13 -12
  63. package/components/timeline/index.js +31 -29
  64. package/components/timeline/index.js.map +1 -1
  65. package/components/tooltip/index.d.ts +12 -11
  66. package/components/tooltip/index.js +30 -27
  67. package/components/tooltip/index.js.map +1 -1
  68. package/components/topojson-map/index.d.ts +17 -16
  69. package/components/topojson-map/index.js +31 -29
  70. package/components/topojson-map/index.js.map +1 -1
  71. package/components/treemap/index.d.ts +13 -12
  72. package/components/treemap/index.js +31 -29
  73. package/components/treemap/index.js.map +1 -1
  74. package/components/xy-labels/index.d.ts +13 -12
  75. package/components/xy-labels/index.js +31 -29
  76. package/components/xy-labels/index.js.map +1 -1
  77. package/components.d.ts +30 -27
  78. package/composites/time-series/index.d.ts +55 -54
  79. package/composites/time-series/index.js +65 -61
  80. package/composites/time-series/index.js.map +1 -1
  81. package/composites/time-series/style.module.css.js +14 -7
  82. package/composites/time-series/style.module.css.js.map +1 -1
  83. package/composites.d.ts +1 -1
  84. package/containers/single-container/index.d.ts +9 -8
  85. package/containers/single-container/index.js +50 -49
  86. package/containers/single-container/index.js.map +1 -1
  87. package/containers/xy-container/index.d.ts +10 -9
  88. package/containers/xy-container/index.js +54 -59
  89. package/containers/xy-container/index.js.map +1 -1
  90. package/containers.d.ts +2 -2
  91. package/html-components/bullet-legend/index.d.ts +13 -12
  92. package/html-components/bullet-legend/index.js +30 -27
  93. package/html-components/bullet-legend/index.js.map +1 -1
  94. package/html-components/flow-legend/index.d.ts +13 -12
  95. package/html-components/flow-legend/index.js +30 -27
  96. package/html-components/flow-legend/index.js.map +1 -1
  97. package/html-components/leaflet-flow-map/index.d.ts +18 -17
  98. package/html-components/leaflet-flow-map/index.js +31 -29
  99. package/html-components/leaflet-flow-map/index.js.map +1 -1
  100. package/html-components/leaflet-map/index.d.ts +15 -14
  101. package/html-components/leaflet-map/index.js +31 -29
  102. package/html-components/leaflet-map/index.js.map +1 -1
  103. package/html-components/rolling-pin-legend/index.d.ts +13 -12
  104. package/html-components/rolling-pin-legend/index.js +30 -27
  105. package/html-components/rolling-pin-legend/index.js.map +1 -1
  106. package/index.d.ts +3 -3
  107. package/index.js +111 -30
  108. package/index.js.map +1 -1
  109. package/package.json +15 -16
  110. package/types/dom.d.ts +3 -3
  111. package/utils/react.d.ts +5 -4
  112. package/utils/react.js +22 -29
  113. package/utils/react.js.map +1 -1
  114. package/external/.pnpm/style-inject@0.3.0/external/style-inject/dist/style-inject.es.js +0 -29
  115. package/external/.pnpm/style-inject@0.3.0/external/style-inject/dist/style-inject.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/plotline/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Plotline } from '@unovis/ts/components/plotline'\nimport { PlotlineConfigInterface } from '@unovis/ts/components/plotline/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisPlotlineRef<Datum> = {\n component?: Plotline<Datum>;\n}\n\nexport type VisPlotlineProps<Datum> = PlotlineConfigInterface<Datum> & {\n ref?: Ref<VisPlotlineRef<Datum>>;\n}\n\nexport const VisPlotlineSelectors = Plotline.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisPlotlineFC<Datum> (props: VisPlotlineProps<Datum>, fRef: ForwardedRef<VisPlotlineRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<Plotline<Datum>>>(null)\n const componentRef = useRef<Plotline<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Plotline<Datum>>)\n\n const c = new Plotline<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\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 VisPlotline: (<Datum>(props: VisPlotlineProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisPlotlineFC), 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;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,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
+ {"version":3,"file":"index.js","sources":["../../../src/components/plotline/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Plotline } from '@unovis/ts/components/plotline'\nimport { PlotlineConfigInterface } from '@unovis/ts/components/plotline/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisPlotlineRef<Datum> = {\n component?: Plotline<Datum>;\n}\n\nexport type VisPlotlineProps<Datum> = PlotlineConfigInterface<Datum> & {\n ref?: Ref<VisPlotlineRef<Datum>>;\n}\n\nexport const VisPlotlineSelectors = Plotline.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisPlotlineFC<Datum> (props: VisPlotlineProps<Datum>, fRef: ForwardedRef<VisPlotlineRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<Plotline<Datum>>>(null)\n const componentRef = useRef<Plotline<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Plotline<Datum>>)\n\n const c = new Plotline<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\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 VisPlotline: (<Datum>(props: VisPlotlineProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisPlotlineFC), arePropsEqual)\n"],"names":[],"mappings":";;;AAmBO,MAAM,uBAAuB,SAAS;AAG7C,SAAS,cAAsB,OAAgC,MAAyD;AACtH,QAAM,MAAM,OAA6C,IAAI;AAC7D,QAAM,eAAe,OAAoC,MAAS;AAGlE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,SAAgB,KAAK;AACnC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAE/B,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,cAA+E,MAAM,KAAK,MAAM,WAAW,aAAa,GAAG,aAAa;"}
@@ -0,0 +1,13 @@
1
+ import { Ref } from 'react';
2
+ import { RadialBar } from '@unovis/ts/components/radial-bar';
3
+ import { RadialBarConfigInterface } from '@unovis/ts/components/radial-bar/config';
4
+
5
+ export type VisRadialBarRef<Datum> = {
6
+ component?: RadialBar<Datum>;
7
+ };
8
+ export type VisRadialBarProps<Datum> = RadialBarConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisRadialBarRef<Datum>>;
11
+ };
12
+ export declare const VisRadialBarSelectors: typeof import("@unovis/ts/components/radial-bar/style");
13
+ export declare const VisRadialBar: (<Datum>(props: VisRadialBarProps<Datum>) => JSX.Element | null);
@@ -0,0 +1,33 @@
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { RadialBar } from "@unovis/ts/components/radial-bar";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisRadialBarSelectors = RadialBar.selectors;
5
+ function VisRadialBarFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new RadialBar(props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("vis-component", { ref });
27
+ }
28
+ const VisRadialBar = React.memo(React.forwardRef(VisRadialBarFC), arePropsEqual);
29
+ export {
30
+ VisRadialBar,
31
+ VisRadialBarSelectors
32
+ };
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/radial-bar/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { RadialBar } from '@unovis/ts/components/radial-bar'\nimport { RadialBarConfigInterface } from '@unovis/ts/components/radial-bar/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisRadialBarRef<Datum> = {\n component?: RadialBar<Datum>;\n}\n\nexport type VisRadialBarProps<Datum> = RadialBarConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisRadialBarRef<Datum>>;\n}\n\nexport const VisRadialBarSelectors = RadialBar.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisRadialBarFC<Datum> (props: VisRadialBarProps<Datum>, fRef: ForwardedRef<VisRadialBarRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<RadialBar<Datum>>>(null)\n const componentRef = useRef<RadialBar<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<RadialBar<Datum>>)\n\n const c = new RadialBar<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 VisRadialBar: (<Datum>(props: VisRadialBarProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisRadialBarFC), arePropsEqual)\n"],"names":[],"mappings":";;;AAoBO,MAAM,wBAAwB,UAAU;AAG/C,SAAS,eAAuB,OAAiC,MAA0D;AACzH,QAAM,MAAM,OAA8C,IAAI;AAC9D,QAAM,eAAe,OAAqC,MAAS;AAGnE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,UAAiB,KAAK;AACpC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,eAAiF,MAAM,KAAK,MAAM,WAAW,cAAc,GAAG,aAAa;"}
@@ -1,16 +1,17 @@
1
- import { Ref } from 'react';
2
- import { Sankey } from '@unovis/ts/components/sankey';
3
- import { SankeyConfigInterface } from '@unovis/ts/components/sankey/config';
4
- import { SankeyInputNode, SankeyInputLink } from '@unovis/ts/components/sankey/types';
5
- export declare type VisSankeyRef<N extends SankeyInputNode, L extends SankeyInputLink> = {
6
- component?: Sankey<N, L>;
7
- };
8
- export declare type VisSankeyProps<N extends SankeyInputNode, L extends SankeyInputLink> = SankeyConfigInterface<N, L> & {
9
- data?: {
10
- nodes: N[];
11
- links?: L[];
12
- };
13
- ref?: Ref<VisSankeyRef<N, L>>;
14
- };
15
- export declare const VisSankeySelectors: typeof import("@unovis/ts/components/sankey/style");
16
- export declare const VisSankey: (<N extends SankeyInputNode, L extends SankeyInputLink>(props: VisSankeyProps<N, L>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { Sankey } from '@unovis/ts/components/sankey';
3
+ import { SankeyConfigInterface } from '@unovis/ts/components/sankey/config';
4
+ import { SankeyInputNode, SankeyInputLink } from '@unovis/ts/components/sankey/types';
5
+
6
+ export type VisSankeyRef<N extends SankeyInputNode, L extends SankeyInputLink> = {
7
+ component?: Sankey<N, L>;
8
+ };
9
+ export type VisSankeyProps<N extends SankeyInputNode, L extends SankeyInputLink> = SankeyConfigInterface<N, L> & {
10
+ data?: {
11
+ nodes: N[];
12
+ links?: L[];
13
+ };
14
+ ref?: Ref<VisSankeyRef<N, L>>;
15
+ };
16
+ export declare const VisSankeySelectors: typeof import("@unovis/ts/components/sankey/style");
17
+ export declare const VisSankey: (<N extends SankeyInputNode, L extends SankeyInputLink>(props: VisSankeyProps<N, L>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { Sankey } from '@unovis/ts/components/sankey';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisSankeySelectors = Sankey.selectors;
6
- function VisSankeyFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new Sankey(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
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { Sankey } from "@unovis/ts/components/sankey";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisSankeySelectors = Sankey.selectors;
5
+ function VisSankeyFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new Sankey(props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("vis-component", { ref });
27
+ }
28
28
  const VisSankey = React.memo(React.forwardRef(VisSankeyFC), arePropsEqual);
29
-
30
- export { VisSankey, VisSankeySelectors };
29
+ export {
30
+ VisSankey,
31
+ VisSankeySelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Sankey } from '@unovis/ts/components/sankey'\nimport { SankeyConfigInterface } from '@unovis/ts/components/sankey/config'\nimport { SankeyInputNode, SankeyInputLink } from '@unovis/ts/components/sankey/types'\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>>): ReactElement {\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":";;;;AAqBa,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;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAA6C,CAAA;AAElE,QAAA,MAAM,CAAC,GAAG,IAAI,MAAM,CAAO,KAAK,CAAC,CAAA;AACjC,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,SAAS,GAAgH,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,aAAa;;;;"}
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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Sankey } from '@unovis/ts/components/sankey'\nimport { SankeyConfigInterface } from '@unovis/ts/components/sankey/config'\nimport { SankeyInputNode, SankeyInputLink } from '@unovis/ts/components/sankey/types'\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>>): ReactElement {\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":";;;AAqBO,MAAM,qBAAqB,OAAO;AAGzC,SAAS,YAAmE,OAA6B,MAAsD;AAC7J,QAAM,MAAM,OAA0C,IAAI;AAC1D,QAAM,eAAe,OAAiC,MAAS;AAG/D,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,OAAa,KAAK;AAChC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,YAAyH,MAAM,KAAK,MAAM,WAAW,WAAW,GAAG,aAAa;"}
@@ -1,12 +1,13 @@
1
- import { Ref } from 'react';
2
- import { Scatter } from '@unovis/ts/components/scatter';
3
- import { ScatterConfigInterface } from '@unovis/ts/components/scatter/config';
4
- export declare type VisScatterRef<Datum> = {
5
- component?: Scatter<Datum>;
6
- };
7
- export declare type VisScatterProps<Datum> = ScatterConfigInterface<Datum> & {
8
- data?: Datum[];
9
- ref?: Ref<VisScatterRef<Datum>>;
10
- };
11
- export declare const VisScatterSelectors: typeof import("@unovis/ts/components/scatter/style");
12
- export declare const VisScatter: (<Datum>(props: VisScatterProps<Datum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { Scatter } from '@unovis/ts/components/scatter';
3
+ import { ScatterConfigInterface } from '@unovis/ts/components/scatter/config';
4
+
5
+ export type VisScatterRef<Datum> = {
6
+ component?: Scatter<Datum>;
7
+ };
8
+ export type VisScatterProps<Datum> = ScatterConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisScatterRef<Datum>>;
11
+ };
12
+ export declare const VisScatterSelectors: typeof import("@unovis/ts/components/scatter/style");
13
+ export declare const VisScatter: (<Datum>(props: VisScatterProps<Datum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { Scatter } from '@unovis/ts/components/scatter';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisScatterSelectors = Scatter.selectors;
6
- function VisScatterFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new Scatter(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
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { Scatter } from "@unovis/ts/components/scatter";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisScatterSelectors = Scatter.selectors;
5
+ function VisScatterFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new Scatter(props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("vis-component", { ref });
27
+ }
28
28
  const VisScatter = React.memo(React.forwardRef(VisScatterFC), arePropsEqual);
29
-
30
- export { VisScatter, VisScatterSelectors };
29
+ export {
30
+ VisScatter,
31
+ VisScatterSelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Scatter } from '@unovis/ts/components/scatter'\nimport { ScatterConfigInterface } from '@unovis/ts/components/scatter/config'\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>>): ReactElement {\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":";;;;AAoBa,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
+ {"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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Scatter } from '@unovis/ts/components/scatter'\nimport { ScatterConfigInterface } from '@unovis/ts/components/scatter/config'\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>>): ReactElement {\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":";;;AAoBO,MAAM,sBAAsB,QAAQ;AAG3C,SAAS,aAAqB,OAA+B,MAAwD;AACnH,QAAM,MAAM,OAA4C,IAAI;AAC5D,QAAM,eAAe,OAAmC,MAAS;AAGjE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,QAAe,KAAK;AAClC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,aAA6E,MAAM,KAAK,MAAM,WAAW,YAAY,GAAG,aAAa;"}
@@ -1,12 +1,13 @@
1
- import { Ref } from 'react';
2
- import { StackedBar } from '@unovis/ts/components/stacked-bar';
3
- import { StackedBarConfigInterface } from '@unovis/ts/components/stacked-bar/config';
4
- export declare type VisStackedBarRef<Datum> = {
5
- component?: StackedBar<Datum>;
6
- };
7
- export declare type VisStackedBarProps<Datum> = StackedBarConfigInterface<Datum> & {
8
- data?: Datum[];
9
- ref?: Ref<VisStackedBarRef<Datum>>;
10
- };
11
- export declare const VisStackedBarSelectors: typeof import("@unovis/ts/components/stacked-bar/style");
12
- export declare const VisStackedBar: (<Datum>(props: VisStackedBarProps<Datum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { StackedBar } from '@unovis/ts/components/stacked-bar';
3
+ import { StackedBarConfigInterface } from '@unovis/ts/components/stacked-bar/config';
4
+
5
+ export type VisStackedBarRef<Datum> = {
6
+ component?: StackedBar<Datum>;
7
+ };
8
+ export type VisStackedBarProps<Datum> = StackedBarConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisStackedBarRef<Datum>>;
11
+ };
12
+ export declare const VisStackedBarSelectors: typeof import("@unovis/ts/components/stacked-bar/style");
13
+ export declare const VisStackedBar: (<Datum>(props: VisStackedBarProps<Datum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { StackedBar } from '@unovis/ts/components/stacked-bar';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisStackedBarSelectors = StackedBar.selectors;
6
- function VisStackedBarFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new StackedBar(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
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { StackedBar } from "@unovis/ts/components/stacked-bar";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisStackedBarSelectors = StackedBar.selectors;
5
+ function VisStackedBarFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new StackedBar(props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("vis-component", { ref });
27
+ }
28
28
  const VisStackedBar = React.memo(React.forwardRef(VisStackedBarFC), arePropsEqual);
29
-
30
- export { VisStackedBar, VisStackedBarSelectors };
29
+ export {
30
+ VisStackedBar,
31
+ VisStackedBarSelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { StackedBar } from '@unovis/ts/components/stacked-bar'\nimport { StackedBarConfigInterface } from '@unovis/ts/components/stacked-bar/config'\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>>): ReactElement {\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":";;;;AAoBa,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,CAAgC,SAAS,CAAC,CAAA;IAGrE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,OAAO,GAAI,GAAG,CAAC,OAAkD,CAAA;AAEvE,QAAA,MAAM,CAAC,GAAG,IAAI,UAAU,CAAQ,KAAK,CAAC,CAAA;AACtC,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,aAAa,GAAsE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { StackedBar } from '@unovis/ts/components/stacked-bar'\nimport { StackedBarConfigInterface } from '@unovis/ts/components/stacked-bar/config'\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>>): ReactElement {\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":";;;AAoBO,MAAM,yBAAyB,WAAW;AAGjD,SAAS,gBAAwB,OAAkC,MAA2D;AAC5H,QAAM,MAAM,OAA+C,IAAI;AAC/D,QAAM,eAAe,OAAsC,MAAS;AAGpE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,WAAkB,KAAK;AACrC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,gBAAmF,MAAM,KAAK,MAAM,WAAW,eAAe,GAAG,aAAa;"}
@@ -1,12 +1,13 @@
1
- import { Ref } from 'react';
2
- import { Timeline } from '@unovis/ts/components/timeline';
3
- import { TimelineConfigInterface } from '@unovis/ts/components/timeline/config';
4
- export declare type VisTimelineRef<Datum> = {
5
- component?: Timeline<Datum>;
6
- };
7
- export declare type VisTimelineProps<Datum> = TimelineConfigInterface<Datum> & {
8
- data?: Datum[];
9
- ref?: Ref<VisTimelineRef<Datum>>;
10
- };
11
- export declare const VisTimelineSelectors: typeof import("@unovis/ts/components/timeline/style");
12
- export declare const VisTimeline: (<Datum>(props: VisTimelineProps<Datum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { Timeline } from '@unovis/ts/components/timeline';
3
+ import { TimelineConfigInterface } from '@unovis/ts/components/timeline/config';
4
+
5
+ export type VisTimelineRef<Datum> = {
6
+ component?: Timeline<Datum>;
7
+ };
8
+ export type VisTimelineProps<Datum> = TimelineConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisTimelineRef<Datum>>;
11
+ };
12
+ export declare const VisTimelineSelectors: typeof import("@unovis/ts/components/timeline/style");
13
+ export declare const VisTimeline: (<Datum>(props: VisTimelineProps<Datum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { Timeline } from '@unovis/ts/components/timeline';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisTimelineSelectors = Timeline.selectors;
6
- function VisTimelineFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new Timeline(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
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { Timeline } from "@unovis/ts/components/timeline";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisTimelineSelectors = Timeline.selectors;
5
+ function VisTimelineFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new Timeline(props);
11
+ componentRef.current = c;
12
+ element.__component__ = c;
13
+ return () => {
14
+ componentRef.current = void 0;
15
+ c.destroy();
16
+ };
17
+ }, []);
18
+ useEffect(() => {
19
+ const component = componentRef.current;
20
+ if (props.data) component?.setData(props.data);
21
+ component?.setConfig(props);
22
+ });
23
+ useImperativeHandle(fRef, () => ({ get component() {
24
+ return componentRef.current;
25
+ } }), []);
26
+ return /* @__PURE__ */ React.createElement("vis-component", { ref });
27
+ }
28
28
  const VisTimeline = React.memo(React.forwardRef(VisTimelineFC), arePropsEqual);
29
-
30
- export { VisTimeline, VisTimelineSelectors };
29
+ export {
30
+ VisTimeline,
31
+ VisTimelineSelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Timeline } from '@unovis/ts/components/timeline'\nimport { TimelineConfigInterface } from '@unovis/ts/components/timeline/config'\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>>): ReactElement {\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":";;;;AAoBa,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
+ {"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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Timeline } from '@unovis/ts/components/timeline'\nimport { TimelineConfigInterface } from '@unovis/ts/components/timeline/config'\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>>): ReactElement {\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":";;;AAoBO,MAAM,uBAAuB,SAAS;AAG7C,SAAS,cAAsB,OAAgC,MAAyD;AACtH,QAAM,MAAM,OAA6C,IAAI;AAC7D,QAAM,eAAe,OAAoC,MAAS;AAGlE,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,SAAgB,KAAK;AACnC,iBAAa,UAAU;AACvB,YAAQ,gBAAgB;AAExB,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,QAAE,QAAA;AAAA,IACJ;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,YAAU,MAAM;AACd,UAAM,YAAY,aAAa;AAC/B,QAAI,MAAM,KAAM,YAAW,QAAQ,MAAM,IAAI;AAC7C,eAAW,UAAU,KAAK;AAAA,EAC5B,CAAC;AAED,sBAAoB,MAAM,OAAO,EAAE,IAAI,YAAa;AAAE,WAAO,aAAa;AAAA,EAAQ,EAAA,IAAM,EAAE;AAC1F,SAAO,sBAAA,cAAC,mBAAc,IAAA,CAAU;AAClC;AAIO,MAAM,cAA+E,MAAM,KAAK,MAAM,WAAW,aAAa,GAAG,aAAa;"}
@@ -1,11 +1,12 @@
1
- import { Ref } from 'react';
2
- import { Tooltip } from '@unovis/ts/components/tooltip';
3
- import { TooltipConfigInterface } from '@unovis/ts/components/tooltip/config';
4
- export declare type VisTooltipRef = {
5
- component?: Tooltip;
6
- };
7
- export declare type VisTooltipProps = TooltipConfigInterface & {
8
- ref?: Ref<VisTooltipRef>;
9
- };
10
- export declare const VisTooltipSelectors: typeof import("@unovis/ts/components/tooltip/style");
11
- export declare const VisTooltip: ((props: VisTooltipProps) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { Tooltip } from '@unovis/ts/components/tooltip';
3
+ import { TooltipConfigInterface } from '@unovis/ts/components/tooltip/config';
4
+
5
+ export type VisTooltipRef = {
6
+ component?: Tooltip;
7
+ };
8
+ export type VisTooltipProps = TooltipConfigInterface & {
9
+ ref?: Ref<VisTooltipRef>;
10
+ };
11
+ export declare const VisTooltipSelectors: typeof import("@unovis/ts/components/tooltip/style");
12
+ export declare const VisTooltip: ((props: VisTooltipProps) => JSX.Element | null);