@unovis/react 1.7.0-mcp.0 → 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 -12
  12. package/components/boxplot/index.js +31 -29
  13. package/components/boxplot/index.js.map +1 -1
  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 -12
  36. package/components/heatmap/index.js +31 -29
  37. package/components/heatmap/index.js.map +1 -1
  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 -12
  51. package/components/radial-bar/index.js +31 -29
  52. package/components/radial-bar/index.js.map +1 -1
  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 -30
  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 -33
  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,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);
@@ -1,29 +1,32 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { Tooltip } from '@unovis/ts/components/tooltip';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisTooltipSelectors = Tooltip.selectors;
6
- function VisTooltipFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new Tooltip(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
- component === null || component === void 0 ? void 0 : component.setConfig(props);
22
- });
23
- useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
24
- return React.createElement("vis-tooltip", { ref: ref });
25
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { Tooltip } from "@unovis/ts/components/tooltip";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisTooltipSelectors = Tooltip.selectors;
5
+ function VisTooltipFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new Tooltip(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
+ component?.setConfig(props);
21
+ });
22
+ useImperativeHandle(fRef, () => ({ get component() {
23
+ return componentRef.current;
24
+ } }), []);
25
+ return /* @__PURE__ */ React.createElement("vis-tooltip", { ref });
26
+ }
26
27
  const VisTooltip = React.memo(React.forwardRef(VisTooltipFC), arePropsEqual);
27
-
28
- export { VisTooltip, VisTooltipSelectors };
28
+ export {
29
+ VisTooltip,
30
+ VisTooltipSelectors
31
+ };
29
32
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Tooltip } from '@unovis/ts/components/tooltip'\nimport { TooltipConfigInterface } from '@unovis/ts/components/tooltip/config'\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 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>): ReactElement {\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;;;;"}
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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Tooltip } from '@unovis/ts/components/tooltip'\nimport { TooltipConfigInterface } from '@unovis/ts/components/tooltip/config'\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 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>): ReactElement {\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":";;;AAmBO,MAAM,sBAAsB,QAAQ;AAG3C,SAAS,aAAc,OAAwB,MAAiD;AAC9F,QAAM,MAAM,OAAqC,IAAI;AACrD,QAAM,eAAe,OAA4B,MAAS;AAG1D,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,QAAQ,KAAK;AAC3B,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,iBAAY,IAAA,CAAU;AAChC;AAIO,MAAM,aAA+D,MAAM,KAAK,MAAM,WAAW,YAAY,GAAG,aAAa;"}
@@ -1,16 +1,17 @@
1
- import { Ref } from 'react';
2
- import { TopoJSONMap } from '@unovis/ts/components/topojson-map';
3
- import { TopoJSONMapConfigInterface } from '@unovis/ts/components/topojson-map/config';
4
- export declare type VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum> = {
5
- component?: TopoJSONMap<AreaDatum, PointDatum, LinkDatum>;
6
- };
7
- export declare type VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum> = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> & {
8
- data?: {
9
- areas?: AreaDatum[];
10
- points?: PointDatum[];
11
- links?: LinkDatum[];
12
- };
13
- ref?: Ref<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>;
14
- };
15
- export declare const VisTopoJSONMapSelectors: typeof import("@unovis/ts/components/topojson-map/style");
16
- export declare const VisTopoJSONMap: (<AreaDatum, PointDatum, LinkDatum>(props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { TopoJSONMap } from '@unovis/ts/components/topojson-map';
3
+ import { TopoJSONMapConfigInterface } from '@unovis/ts/components/topojson-map/config';
4
+
5
+ export type VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum> = {
6
+ component?: TopoJSONMap<AreaDatum, PointDatum, LinkDatum>;
7
+ };
8
+ export type VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum> = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum> & {
9
+ data?: {
10
+ areas?: AreaDatum[];
11
+ points?: PointDatum[];
12
+ links?: LinkDatum[];
13
+ };
14
+ ref?: Ref<VisTopoJSONMapRef<AreaDatum, PointDatum, LinkDatum>>;
15
+ };
16
+ export declare const VisTopoJSONMapSelectors: typeof import("@unovis/ts/components/topojson-map/style");
17
+ export declare const VisTopoJSONMap: (<AreaDatum, PointDatum, LinkDatum>(props: VisTopoJSONMapProps<AreaDatum, PointDatum, LinkDatum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { TopoJSONMap } from '@unovis/ts/components/topojson-map';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisTopoJSONMapSelectors = TopoJSONMap.selectors;
6
- function VisTopoJSONMapFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new TopoJSONMap(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 { TopoJSONMap } from "@unovis/ts/components/topojson-map";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisTopoJSONMapSelectors = TopoJSONMap.selectors;
5
+ function VisTopoJSONMapFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new TopoJSONMap(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 VisTopoJSONMap = React.memo(React.forwardRef(VisTopoJSONMapFC), arePropsEqual);
29
-
30
- export { VisTopoJSONMap, VisTopoJSONMapSelectors };
29
+ export {
30
+ VisTopoJSONMap,
31
+ VisTopoJSONMapSelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { TopoJSONMap } from '@unovis/ts/components/topojson-map'\nimport { TopoJSONMapConfigInterface } from '@unovis/ts/components/topojson-map/config'\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>>): ReactElement {\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":";;;;AAoBa,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;AAEnG,QAAA,MAAM,CAAC,GAAG,IAAI,WAAW,CAAmC,KAAK,CAAC,CAAA;AAClE,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,cAAc,GAA6H,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,aAAa;;;;"}
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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { TopoJSONMap } from '@unovis/ts/components/topojson-map'\nimport { TopoJSONMapConfigInterface } from '@unovis/ts/components/topojson-map/config'\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>>): ReactElement {\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":";;;AAoBO,MAAM,0BAA0B,YAAY;AAGnD,SAAS,iBAAoD,OAA8D,MAAuF;AAChN,QAAM,MAAM,OAA2E,IAAI;AAC3F,QAAM,eAAe,OAAkE,MAAS;AAGhG,YAAU,MAAM;AACd,UAAM,UAAW,IAAI;AAErB,UAAM,IAAI,IAAI,YAA8C,KAAK;AACjE,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,iBAA2I,MAAM,KAAK,MAAM,WAAW,gBAAgB,GAAG,aAAa;"}
@@ -1,12 +1,13 @@
1
- import { Ref } from 'react';
2
- import { Treemap } from '@unovis/ts/components/treemap';
3
- import { TreemapConfigInterface } from '@unovis/ts/components/treemap/config';
4
- export declare type VisTreemapRef<Datum> = {
5
- component?: Treemap<Datum>;
6
- };
7
- export declare type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {
8
- data?: Datum[];
9
- ref?: Ref<VisTreemapRef<Datum>>;
10
- };
11
- export declare const VisTreemapSelectors: typeof import("@unovis/ts/components/treemap/style");
12
- export declare const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { Treemap } from '@unovis/ts/components/treemap';
3
+ import { TreemapConfigInterface } from '@unovis/ts/components/treemap/config';
4
+
5
+ export type VisTreemapRef<Datum> = {
6
+ component?: Treemap<Datum>;
7
+ };
8
+ export type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisTreemapRef<Datum>>;
11
+ };
12
+ export declare const VisTreemapSelectors: typeof import("@unovis/ts/components/treemap/style");
13
+ export declare const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { Treemap } from '@unovis/ts/components/treemap';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisTreemapSelectors = Treemap.selectors;
6
- function VisTreemapFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new Treemap(props);
12
- componentRef.current = c;
13
- element.__component__ = c;
14
- return () => {
15
- componentRef.current = undefined;
16
- c.destroy();
17
- };
18
- }, []);
19
- useEffect(() => {
20
- const component = componentRef.current;
21
- if (props.data)
22
- component === null || component === void 0 ? void 0 : component.setData(props.data);
23
- component === null || component === void 0 ? void 0 : component.setConfig(props);
24
- });
25
- useImperativeHandle(fRef, () => ({ get component() { return componentRef.current; } }), []);
26
- return React.createElement("vis-component", { ref: ref });
27
- }
1
+ import React, { useRef, useEffect, useImperativeHandle } from "react";
2
+ import { Treemap } from "@unovis/ts/components/treemap";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisTreemapSelectors = Treemap.selectors;
5
+ function VisTreemapFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new Treemap(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 VisTreemap = React.memo(React.forwardRef(VisTreemapFC), arePropsEqual);
29
-
30
- export { VisTreemap, VisTreemapSelectors };
29
+ export {
30
+ VisTreemap,
31
+ VisTreemapSelectors
32
+ };
31
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { Treemap } from '@unovis/ts/components/treemap'\nimport { TreemapConfigInterface } from '@unovis/ts/components/treemap/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTreemapRef<Datum> = {\n component?: Treemap<Datum>;\n}\n\nexport type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisTreemapRef<Datum>>;\n}\n\nexport const VisTreemapSelectors = Treemap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTreemapFC<Datum> (props: VisTreemapProps<Datum>, fRef: ForwardedRef<VisTreemapRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<Treemap<Datum>>>(null)\n const componentRef = useRef<Treemap<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Treemap<Datum>>)\n\n const c = new Treemap<Datum>(props)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisTreemapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;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/treemap/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 { Treemap } from '@unovis/ts/components/treemap'\nimport { TreemapConfigInterface } from '@unovis/ts/components/treemap/config'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\n// Types\nimport { VisComponentElement } from 'src/types/dom'\n\nexport type VisTreemapRef<Datum> = {\n component?: Treemap<Datum>;\n}\n\nexport type VisTreemapProps<Datum> = TreemapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisTreemapRef<Datum>>;\n}\n\nexport const VisTreemapSelectors = Treemap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisTreemapFC<Datum> (props: VisTreemapProps<Datum>, fRef: ForwardedRef<VisTreemapRef<Datum>>): ReactElement {\n const ref = useRef<VisComponentElement<Treemap<Datum>>>(null)\n const componentRef = useRef<Treemap<Datum> | undefined>(undefined)\n\n // On Mount\n useEffect(() => {\n const element = (ref.current as VisComponentElement<Treemap<Datum>>)\n\n const c = new Treemap<Datum>(props)\n componentRef.current = c\n element.__component__ = c\n\n return () => {\n componentRef.current = undefined\n c.destroy()\n }\n }, [])\n\n // On Props Update\n useEffect(() => {\n const component = componentRef.current\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return componentRef.current } }), [])\n return <vis-component ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisTreemap: (<Datum>(props: VisTreemapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisTreemapFC), arePropsEqual)\n"],"names":[],"mappings":";;;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 { XYLabels } from '@unovis/ts/components/xy-labels';
3
- import { XYLabelsConfigInterface } from '@unovis/ts/components/xy-labels/config';
4
- export declare type VisXYLabelsRef<Datum> = {
5
- component?: XYLabels<Datum>;
6
- };
7
- export declare type VisXYLabelsProps<Datum> = XYLabelsConfigInterface<Datum> & {
8
- data?: Datum[];
9
- ref?: Ref<VisXYLabelsRef<Datum>>;
10
- };
11
- export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
12
- export declare const VisXYLabels: (<Datum>(props: VisXYLabelsProps<Datum>) => JSX.Element | null);
1
+ import { Ref } from 'react';
2
+ import { XYLabels } from '@unovis/ts/components/xy-labels';
3
+ import { XYLabelsConfigInterface } from '@unovis/ts/components/xy-labels/config';
4
+
5
+ export type VisXYLabelsRef<Datum> = {
6
+ component?: XYLabels<Datum>;
7
+ };
8
+ export type VisXYLabelsProps<Datum> = XYLabelsConfigInterface<Datum> & {
9
+ data?: Datum[];
10
+ ref?: Ref<VisXYLabelsRef<Datum>>;
11
+ };
12
+ export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
13
+ export declare const VisXYLabels: (<Datum>(props: VisXYLabelsProps<Datum>) => JSX.Element | null);
@@ -1,31 +1,33 @@
1
- import React, { useRef, useEffect, useImperativeHandle } from 'react';
2
- import { XYLabels } from '@unovis/ts/components/xy-labels';
3
- import { arePropsEqual } from '../../utils/react.js';
4
-
5
- const VisXYLabelsSelectors = XYLabels.selectors;
6
- function VisXYLabelsFC(props, fRef) {
7
- const ref = useRef(null);
8
- const componentRef = useRef(undefined);
9
- useEffect(() => {
10
- const element = ref.current;
11
- const c = new XYLabels(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 { XYLabels } from "@unovis/ts/components/xy-labels";
3
+ import { arePropsEqual } from "../../utils/react.js";
4
+ const VisXYLabelsSelectors = XYLabels.selectors;
5
+ function VisXYLabelsFC(props, fRef) {
6
+ const ref = useRef(null);
7
+ const componentRef = useRef(void 0);
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ const c = new XYLabels(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 VisXYLabels = React.memo(React.forwardRef(VisXYLabelsFC), arePropsEqual);
29
-
30
- export { VisXYLabels, VisXYLabelsSelectors };
29
+ export {
30
+ VisXYLabels,
31
+ VisXYLabelsSelectors
32
+ };
31
33
  //# 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, ReactElement, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { XYLabels } from '@unovis/ts/components/xy-labels'\nimport { XYLabelsConfigInterface } from '@unovis/ts/components/xy-labels/config'\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>>): ReactElement {\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":";;;;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/xy-labels/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 { XYLabels } from '@unovis/ts/components/xy-labels'\nimport { XYLabelsConfigInterface } from '@unovis/ts/components/xy-labels/config'\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>>): ReactElement {\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":";;;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;"}
package/components.d.ts CHANGED
@@ -1,30 +1,30 @@
1
- export * from './components/line';
2
- export * from './components/area';
3
- export * from './components/axis';
4
- export * from './components/boxplot';
5
- export * from './components/brush/';
6
- export * from './components/chord-diagram';
7
- export * from './components/crosshair';
8
- export * from './components/donut';
9
- export * from './components/free-brush';
10
- export * from './components/graph';
11
- export * from './components/grouped-bar/';
12
- export * from './components/heatmap';
13
- export * from './components/nested-donut';
14
- export * from './components/scatter/';
15
- export * from './components/sankey';
16
- export * from './components/stacked-bar/';
17
- export * from './components/tooltip/';
18
- export * from './components/timeline/';
19
- export * from './components/topojson-map/';
20
- export * from './components/xy-labels';
21
- export * from './components/annotations';
22
- export * from './components/plotband';
23
- export * from './components/treemap';
24
- export * from './components/plotline';
25
- export * from './components/radial-bar';
26
- export * from './html-components/bullet-legend';
27
- export * from './html-components/rolling-pin-legend';
28
- export * from './html-components/leaflet-map';
29
- export * from './html-components/leaflet-flow-map';
30
- export * from './html-components/flow-legend';
1
+ export * from './components/line';
2
+ export * from './components/area';
3
+ export * from './components/axis';
4
+ export * from './components/boxplot';
5
+ export * from './components/brush/';
6
+ export * from './components/chord-diagram';
7
+ export * from './components/crosshair';
8
+ export * from './components/donut';
9
+ export * from './components/free-brush';
10
+ export * from './components/graph';
11
+ export * from './components/grouped-bar/';
12
+ export * from './components/heatmap';
13
+ export * from './components/nested-donut';
14
+ export * from './components/scatter/';
15
+ export * from './components/sankey';
16
+ export * from './components/stacked-bar/';
17
+ export * from './components/tooltip/';
18
+ export * from './components/timeline/';
19
+ export * from './components/topojson-map/';
20
+ export * from './components/xy-labels';
21
+ export * from './components/annotations';
22
+ export * from './components/plotband';
23
+ export * from './components/treemap';
24
+ export * from './components/plotline';
25
+ export * from './components/radial-bar';
26
+ export * from './html-components/bullet-legend';
27
+ export * from './html-components/rolling-pin-legend';
28
+ export * from './html-components/leaflet-map';
29
+ export * from './html-components/leaflet-flow-map';
30
+ export * from './html-components/flow-legend';