solid-recharts 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/package.json +6 -5
- package/src/component/Customized.tsx +1 -1
- package/src/state/RechartsReduxContext.tsx +1 -1
- package/src/state/selectors/arrayEqualityCheck.ts +1 -1
- package/src/state/selectors/numberDomainEqualityCheck.ts +1 -1
- package/src/state/store.ts +0 -1
- package/src/util/resolveDefaultProps.tsx +1 -1
- package/src/util/typedDataKey.ts +1 -1
- package/src/util/types.ts +1 -1
- package/test/animation/CSSTransitionAnimate.timing.spec.tsx +1 -1
- package/test/animation/JavascriptAnimate.spec.tsx +1 -1
- package/test/animation/legacyAnimationLengthChange.spec.tsx +1 -1
- package/test/cartesian/Area.animation.spec.tsx +1 -1
- package/test/cartesian/Area.range.spec.tsx +1 -1
- package/test/cartesian/Area.spec.tsx +1 -1
- package/test/cartesian/Area.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Area.typed.spec.tsx +1 -1
- package/test/cartesian/Axis.integration.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.csstransition.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.typed.spec.tsx +1 -1
- package/test/cartesian/Bar.animation.spec.tsx +1 -1
- package/test/cartesian/Bar.stackDomain.spec.tsx +1 -1
- package/test/cartesian/Bar.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Bar.zeroDimensionFiltering.spec.tsx +1 -1
- package/test/cartesian/Brush.keyboard.spec.tsx +1 -1
- package/test/cartesian/Brush.panorama.spec.tsx +1 -1
- package/test/cartesian/Brush.props.spec.tsx +1 -1
- package/test/cartesian/Brush.render.spec.tsx +1 -1
- package/test/cartesian/Brush.spec.tsx +1 -1
- package/test/cartesian/Brush.stacked.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.render.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.render.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.render.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.spec.tsx +1 -1
- package/test/cartesian/Funnel.animation.spec.tsx +1 -1
- package/test/cartesian/Funnel.spec.tsx +1 -1
- package/test/cartesian/Funnel.typed.spec.tsx +1 -1
- package/test/cartesian/GraphicalItemClipPath.scale-behavior.spec.tsx +1 -1
- package/test/cartesian/Line.animation.spec.tsx +1 -1
- package/test/cartesian/Line.sparseAnimationPath.spec.tsx +1 -1
- package/test/cartesian/Line.spec.tsx +1 -1
- package/test/cartesian/Line.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.panorama.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.animation.spec.tsx +1 -1
- package/test/cartesian/Scatter.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.spec.tsx +1 -1
- package/test/cartesian/Scatter.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.barSize.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.brush.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.categorydomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.datatypes.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.hide.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.multiaxis.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.numberdomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding_clip.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.state.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.tick.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.timescale.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.vertical.spec.tsx +1 -1
- package/test/cartesian/XAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.7362.derivedDomain.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.interval-zero.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.label.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tick.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.typed.spec.tsx +1 -1
- package/test/cartesian/ZAxis.spec.tsx +1 -1
- package/test/cartesian/ZAxis.typed.spec.tsx +1 -1
- package/test/cartesian/axisLineAndStroke.spec.tsx +1 -1
- package/test/cartesian/miscFeatureGaps.spec.tsx +1 -1
- package/test/chart/AccessibilityLayer.spec.tsx +1 -1
- package/test/chart/AccessibilityScans.spec.tsx +2 -2
- package/test/chart/AreaChart.spec.tsx +1 -1
- package/test/chart/AreaChart.typed.spec.tsx +1 -1
- package/test/chart/BarChart.spec.tsx +1 -1
- package/test/chart/BarChart.typed.spec.tsx +1 -1
- package/test/chart/CategoricalChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.typed.spec.tsx +1 -1
- package/test/chart/FunnelChart.spec.tsx +1 -1
- package/test/chart/FunnelChart.typed.spec.tsx +1 -1
- package/test/chart/LineChart.smoke.spec.tsx +1 -1
- package/test/chart/LineChart.spec.tsx +1 -1
- package/test/chart/LineChart.typed.spec.tsx +1 -1
- package/test/chart/NicheChartTooltip.spec.tsx +1 -1
- package/test/chart/PieChart.spec.tsx +1 -1
- package/test/chart/PieChart.typed.spec.tsx +1 -1
- package/test/chart/RadarChart.spec.tsx +1 -1
- package/test/chart/RadarChart.typed.spec.tsx +1 -1
- package/test/chart/RadialBarChart.spec.tsx +1 -1
- package/test/chart/RadialBarChart.typed.spec.tsx +1 -1
- package/test/chart/RechartsWrapper.spec.tsx +1 -1
- package/test/chart/Sankey.content.spec.tsx +1 -1
- package/test/chart/Sankey.spec.tsx +1 -1
- package/test/chart/ScatterChart.spec.tsx +1 -1
- package/test/chart/ScatterChart.typed.spec.tsx +1 -1
- package/test/chart/SunburstChart.spec.tsx +1 -1
- package/test/chart/Treemap.animation.spec.tsx +1 -1
- package/test/chart/Treemap.spec.tsx +1 -1
- package/test/chart/chartEvents.spec.tsx +1 -1
- package/test/chart/responsive.spec.tsx +1 -1
- package/test/component/Cell.render.spec.tsx +1 -1
- package/test/component/Cell.spec.tsx +1 -1
- package/test/component/Cursor.spec.tsx +1 -1
- package/test/component/DefaultTooltipContent.spec.tsx +1 -1
- package/test/component/Label.render.spec.tsx +1 -1
- package/test/component/Label.spec.tsx +1 -1
- package/test/component/LabelList.spec.tsx +1 -1
- package/test/component/Legend.itemSorter.spec.tsx +1 -1
- package/test/component/Legend.render.spec.tsx +1 -1
- package/test/component/Legend.spec.tsx +1 -1
- package/test/component/ResponsiveContainer.spec.tsx +1 -1
- package/test/component/ResponsiveContainerDataTest.spec.tsx +1 -1
- package/test/component/Text.spec.tsx +1 -1
- package/test/component/Tooltip/ActiveDot.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipEventType.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipTestHelpers.tsx +1 -1
- package/test/component/Tooltip.defaultIndex.spec.tsx +1 -1
- package/test/component/Tooltip.hover.spec.tsx +1 -1
- package/test/component/Tooltip.item.spec.tsx +1 -1
- package/test/component/Tooltip.keyboard.spec.tsx +1 -1
- package/test/component/Tooltip.payload.spec.tsx +1 -1
- package/test/component/Tooltip.touch.spec.tsx +1 -1
- package/test/component/Tooltip.visibility.spec.tsx +1 -1
- package/test/component/TooltipBoundingBox.spec.tsx +2 -2
- package/test/container/ClipPath.spec.tsx +1 -1
- package/test/context/chartLayoutContext.spec.tsx +1 -1
- package/test/helper/createSelectorTestCase.tsx +1 -1
- package/test/helper/selectorTestHelpers.tsx +1 -1
- package/test/hooks/useActiveTooltipDataPoints.spec.tsx +1 -1
- package/test/hooks/useOffset.spec.tsx +1 -1
- package/test/hooks/useTooltipStateHooks.spec.tsx +1 -1
- package/test/polar/Pie/Pie-TwoLevelPieChart.spec.tsx +1 -1
- package/test/polar/Pie/Pie.spec.tsx +1 -1
- package/test/polar/Pie/Pie.typed.spec.tsx +1 -1
- package/test/polar/Pie.animation.spec.tsx +1 -1
- package/test/polar/PieWithLegend.animation.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.events.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.spec.tsx +1 -1
- package/test/polar/PolarLegendPerRow.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.events.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarTooltipLegend.render.spec.tsx +1 -1
- package/test/polar/Radar.animation.spec.tsx +1 -1
- package/test/polar/Radar.render.spec.tsx +1 -1
- package/test/polar/Radar.spec.tsx +1 -1
- package/test/polar/Radar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar.animation.spec.tsx +1 -1
- package/test/polar/RadialBar.render.spec.tsx +1 -1
- package/test/polar/RadialBar.stacked.spec.tsx +1 -1
- package/test/setup.ts +1 -1
- package/test/shape/ActiveShape.spec.tsx +1 -1
- package/test/shape/Cross.spec.tsx +1 -1
- package/test/shape/Curve.spec.tsx +1 -1
- package/test/shape/Curve.typed.spec.tsx +1 -1
- package/test/shape/Dot.spec.tsx +1 -1
- package/test/shape/Polygon.spec.tsx +1 -1
- package/test/shape/Rectangle.animation.spec.tsx +1 -1
- package/test/shape/Rectangle.spec.tsx +1 -1
- package/test/shape/Sector.spec.tsx +1 -1
- package/test/shape/Symbols.spec.tsx +1 -1
- package/test/shape/Trapezoid.spec.tsx +1 -1
- package/test/state/hooks.spec.tsx +1 -1
- package/test/state/selectors/axisSelectors.spec.tsx +1 -1
- package/test/state/selectors/dataSelectors.spec.tsx +1 -1
- package/test/state/selectors/legendSelectors.spec.tsx +1 -1
- package/test/state/selectors/radarSelectors.spec.tsx +1 -1
- package/test/state/selectors/selectActiveTooltipIndex.spec.tsx +1 -1
- package/test/state/selectors/selectDisplayedData.spec.tsx +1 -1
- package/test/state/selectors/selectStackGroups.spec.tsx +1 -1
- package/test/state/selectors/selectors.spec.tsx +1 -1
- package/test/util/DomUtils.spec.tsx +1 -1
- package/test/util/FunnelUtils.spec.tsx +1 -1
- package/test/util/useElementOffset.spec.tsx +1 -1
- package/test/util/usePrefersReducedMotion.spec.ts +1 -1
- package/test/util/useUniqueId.spec.ts +1 -1
- package/test/zIndex/AllZIndexPortals.spec.tsx +1 -1
- package/test/zIndex/DynamicZIndex.spec.tsx +1 -1
- package/test/zIndex/ZIndexLayer.portalOwner.spec.tsx +1 -1
- package/test/zIndex/componentZIndex.spec.tsx +1 -1
- package/test/zIndex/multiChartZIndexIsolation.spec.tsx +1 -1
- package/NEXT_SESSION_PROMPT.md +0 -114
- package/test/helper/render.ts +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
5
5
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
6
6
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and `flush()` because the items register via effects and compute from the store.
|
|
7
7
|
import { describe, expect, it } from "vitest";
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
import {
|
|
11
11
|
BarChart,
|
|
12
12
|
Bar,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/Cell.spec.tsx.
|
|
2
2
|
// Harness changes only: render from the local Solid shim, no React import,
|
|
3
3
|
// render takes a thunk. The assertion is byte-identical to recharts.
|
|
4
|
-
import { render } from "
|
|
4
|
+
import { render } from "@solidjs/testing-library";
|
|
5
5
|
import { Cell } from "../../src";
|
|
6
6
|
|
|
7
7
|
describe("<Cell />", () => {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Solid port is `boolean | Record<string, unknown>`, with no element form.
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
import { flush } from "solid-js";
|
|
12
|
-
import { render } from "
|
|
12
|
+
import { render } from "@solidjs/testing-library";
|
|
13
13
|
import {
|
|
14
14
|
Cursor,
|
|
15
15
|
CursorInternal,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// per-data-point labels for graphical items (via LabelList + its context).
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { BarChart, Bar, LineChart, Line, XAxis, YAxis, ReferenceLine } from "../../src";
|
|
8
8
|
|
|
9
9
|
const data = [
|
|
@@ -7,7 +7,7 @@ import { Label, Line, LineChart, PieChart, ReferenceLine, Surface } from "../../
|
|
|
7
7
|
import type { Props as LabelProps } from "../../src/component/Label";
|
|
8
8
|
import { DefaultZIndexes } from "../../src/zIndex/DefaultZIndexes";
|
|
9
9
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
10
|
-
import { render, screen } from "
|
|
10
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
11
11
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
12
12
|
import { MockControllerAnimationManager as MockProgressAnimationManager } from "../animation/mockControllerAnimationManager";
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/LabelList.spec.tsx (commit 7a23854).
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import { Bar, BarChart, LabelList, Scatter, ScatterChart, XAxis, YAxis, ZAxis } from "../../src";
|
|
4
|
-
import { render } from "
|
|
4
|
+
import { render } from "@solidjs/testing-library";
|
|
5
5
|
import { expectLabels } from "../helper/expectLabel";
|
|
6
6
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
13
13
|
import { createSignal, flush, For } from "solid-js";
|
|
14
14
|
import type { JSX } from "@solidjs/web";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import {
|
|
17
17
|
Area,
|
|
18
18
|
AreaChart,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// the portal. itemSorter defaults to "value" → alphabetical by label.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { Area, AreaChart, Bar, BarChart, Legend, Line, LineChart } from "../../src";
|
|
8
8
|
import { numericalData, PageData } from "../_data";
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// supported by the port (see reclassifiedBlocked) and are omitted.
|
|
11
11
|
import { createEffect, createSignal, flush, Show } from "solid-js";
|
|
12
12
|
import { describe, expect, it, test, vi } from "vitest";
|
|
13
|
-
import { fireEvent, render, screen } from "
|
|
13
|
+
import { fireEvent, render, screen } from "@solidjs/testing-library";
|
|
14
14
|
import {
|
|
15
15
|
Area,
|
|
16
16
|
AreaChart,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
import { render, screen } from "
|
|
3
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
4
4
|
import { ResponsiveContainer, useResponsiveContainerContext } from "../../src";
|
|
5
5
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
6
6
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
|
2
|
-
import { render } from "
|
|
2
|
+
import { render } from "@solidjs/testing-library";
|
|
3
3
|
import { ResponsiveContainer, BarChart, Bar } from "../../src";
|
|
4
4
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { vi } from "vitest";
|
|
2
|
-
import { render, screen } from "
|
|
2
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
3
3
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
4
4
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
5
5
|
import { Surface, Text } from "../../src";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
|
-
import { fireEvent, render } from "
|
|
4
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
5
5
|
import { PageData } from "../../_data";
|
|
6
6
|
import { getTooltip, hideTooltip, showTooltip } from "./tooltipTestHelpers";
|
|
7
7
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect, vi } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
|
-
import { fireEvent } from "
|
|
3
|
+
import { fireEvent } from "@solidjs/testing-library";
|
|
4
4
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
5
5
|
import type { Coordinate } from "../../../src/util/types";
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// through microtask-batched effects, and the portal target attaches via a ref.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
13
13
|
import { PageData } from "../_data";
|
|
14
14
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// places index 2 ("Page C") at x = 164; a mousemove there selects it.
|
|
10
10
|
import { describe, expect, it, vi } from "vitest";
|
|
11
11
|
import { flush } from "solid-js";
|
|
12
|
-
import { render, fireEvent } from "
|
|
12
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
13
13
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
14
14
|
import { PageData } from "../_data";
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (filter by graphicalItemId) + the index-based payload searcher.
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { flush } from "solid-js";
|
|
8
|
-
import { render, fireEvent } from "
|
|
8
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
9
9
|
import { BarChart, Bar, Tooltip } from "../../src";
|
|
10
10
|
import { PageData } from "../_data";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// interaction → the same payload pipeline).
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { flush } from "solid-js";
|
|
8
|
-
import { render, fireEvent } from "
|
|
8
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
9
9
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
10
10
|
import { PageData } from "../_data";
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
9
|
import type { JSX } from "@solidjs/web";
|
|
10
|
-
import { render, fireEvent } from "
|
|
10
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
11
11
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
12
12
|
import {
|
|
13
13
|
Area,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// selectActivePropsFromChartPointer → setMouseOverAxisIndex.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
8
8
|
import { PageData } from "../_data";
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { createSignal, flush, Show } from "solid-js";
|
|
7
7
|
import type { JSX } from "@solidjs/web";
|
|
8
8
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
9
|
-
import { fireEvent, getByText, render } from "
|
|
9
|
+
import { fireEvent, getByText, render } from "@solidjs/testing-library";
|
|
10
10
|
import {
|
|
11
11
|
Area,
|
|
12
12
|
AreaChart,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/TooltipBoundingBox.spec.tsx.
|
|
2
2
|
// Harness adaptations: React render -> Solid render(() => <…/>) + flush();
|
|
3
|
-
// @testing-library/react ->
|
|
3
|
+
// @testing-library/react -> @solidjs/testing-library;
|
|
4
4
|
// userEvent.keyboard('{Escape}') -> fireEvent.keyDown(document, { key: 'Escape' }).
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
6
|
import { describe, it, expect } from "vitest";
|
|
7
|
-
import { render, screen, fireEvent } from "
|
|
7
|
+
import { render, screen, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { TooltipBoundingBox } from "../../src/component/TooltipBoundingBox";
|
|
9
9
|
import type { TooltipBoundingBoxProps } from "../../src/component/TooltipBoundingBox";
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../../src";
|
|
18
18
|
import { PageData } from "../_data";
|
|
19
19
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
20
|
-
import { render } from "
|
|
20
|
+
import { render } from "@solidjs/testing-library";
|
|
21
21
|
|
|
22
22
|
function selectAllClipPaths(container: Element | null): NodeListOf<SVGRectElement> {
|
|
23
23
|
assertNotNull(container);
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { Brush, ComposedChart, Legend, PieChart, XAxis, YAxis } from "../../src";
|
|
23
23
|
import { useClipPathId } from "../../src/container/ClipPathProvider";
|
|
24
24
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
25
|
-
import { render } from "
|
|
25
|
+
import { render } from "@solidjs/testing-library";
|
|
26
26
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
27
27
|
import { emptyOffset } from "../helper/offsetHelpers";
|
|
28
28
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
10
10
|
import type { JSX } from "@solidjs/web";
|
|
11
11
|
import { vi, type Mock } from "vitest";
|
|
12
|
-
import { render } from "
|
|
12
|
+
import { render } from "@solidjs/testing-library";
|
|
13
13
|
import { useAppSelector, useAppStore } from "../../src/state/hooks";
|
|
14
14
|
import type { RechartsRootState } from "../../src/state/store";
|
|
15
15
|
|
|
@@ -12,7 +12,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
12
12
|
import { createRechartsStore } from "../../src/state/store";
|
|
13
13
|
import type { RechartsRootState } from "../../src/state/store";
|
|
14
14
|
import { useAppSelector } from "../../src/state/hooks";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import { flush, type Accessor } from "solid-js";
|
|
17
17
|
|
|
18
18
|
type Selector<T> = (state: RechartsRootState) => T;
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
29
29
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
30
30
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
31
|
-
import { render } from "
|
|
31
|
+
import { render } from "@solidjs/testing-library";
|
|
32
32
|
|
|
33
33
|
describe("useActiveTooltipDataPoints", () => {
|
|
34
34
|
beforeEach(() => {
|
|
@@ -7,7 +7,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
7
7
|
import { Brush, ComposedChart, Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "../../src";
|
|
8
8
|
import { useActiveTooltipDataPoints, useOffset, usePlotArea } from "../../src/hooks";
|
|
9
9
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
10
|
-
import { render } from "
|
|
10
|
+
import { render } from "@solidjs/testing-library";
|
|
11
11
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
12
12
|
import { pageData } from "../_data";
|
|
13
13
|
import { showTooltip } from "../component/Tooltip/tooltipTestHelpers";
|
|
@@ -18,7 +18,7 @@ import { hideTooltip, showTooltip } from "../component/Tooltip/tooltipTestHelper
|
|
|
18
18
|
import { areaChartMouseHoverTooltipSelector } from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
19
19
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
20
20
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
|
|
23
23
|
describe("public tooltip-state hooks", () => {
|
|
24
24
|
beforeEach(() => {
|
|
@@ -8,7 +8,7 @@ import { describe, expect, it } from "vitest";
|
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
9
|
import { Pie, PieChart, Sector } from "../../../src";
|
|
10
10
|
import type { PieSectorShapeProps } from "../../../src/polar/Pie";
|
|
11
|
-
import { render, fireEvent } from "
|
|
11
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
12
12
|
|
|
13
13
|
const data1 = [
|
|
14
14
|
{ name: "Group A", value: 400 },
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
PieSectorShapeProps,
|
|
8
8
|
} from "../../../src/polar/Pie";
|
|
9
9
|
import { PageData } from "../../_data";
|
|
10
|
-
import { render, fireEvent } from "
|
|
10
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
11
11
|
import { expectPieSectors } from "../../helper/expectPieSectors";
|
|
12
12
|
import { expectTooltipPayload } from "../../component/Tooltip/tooltipTestHelpers";
|
|
13
13
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// (matching recharts 3.9 Pie.animation.spec).
|
|
12
12
|
import { describe, expect, it, vi } from "vitest";
|
|
13
13
|
import { createSignal, flush, Show } from "solid-js";
|
|
14
|
-
import { render, fireEvent } from "
|
|
14
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
15
15
|
import { PieChart, Pie } from "../../src";
|
|
16
16
|
import { expectPieSectors } from "../helper/expectPieSectors";
|
|
17
17
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// SYNCHRONOUSLY in its constructor (on first render), not lazily on the first tick.
|
|
13
13
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
14
14
|
import { flush } from "solid-js";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import { PieChart, Pie, Legend } from "../../src";
|
|
17
17
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
18
18
|
import { MockControllerAnimationManager as MockProgressAnimationManager } from "../animation/mockControllerAnimationManager";
|
|
@@ -6,7 +6,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
7
|
import { PolarAngleAxis, PolarRadiusAxis, RadarChart } from "../../../src";
|
|
8
8
|
import type { TickItem } from "../../../src/util/types";
|
|
9
|
-
import { fireEvent, render } from "
|
|
9
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
10
10
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
11
11
|
|
|
12
12
|
describe("PolarAngleAxis events", () => {
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import { expectLastCalledWithScale } from "../../helper/expectScale";
|
|
33
33
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
34
34
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
35
|
-
import { render } from "
|
|
35
|
+
import { render } from "@solidjs/testing-library";
|
|
36
36
|
import type { PolarAngleTickContentProps } from "../../../src/polar/PolarAngleAxis";
|
|
37
37
|
|
|
38
38
|
/*
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getRelativeCoordinate,
|
|
7
7
|
type TickItem,
|
|
8
8
|
} from "../../../src";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
|
|
11
11
|
// Ported from recharts 3.8.1 test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx.
|
|
12
12
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// come online with Radar (which provides the item domain).
|
|
11
11
|
import { describe, expect, it } from "vitest";
|
|
12
12
|
import { flush } from "solid-js";
|
|
13
|
-
import { render } from "
|
|
13
|
+
import { render } from "@solidjs/testing-library";
|
|
14
14
|
import { RadarChart, PolarAngleAxis } from "../../src";
|
|
15
15
|
|
|
16
16
|
const data = [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// geometry comes online with the full spec.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { RadarChart, Radar, PolarGrid } from "../../src";
|
|
13
13
|
|
|
14
14
|
const exampleRadarData = [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// - `flush()` drains Solid's microtask-batched store writes before DOM assertions.
|
|
14
14
|
import { describe, expect, it, test } from "vitest";
|
|
15
15
|
import { flush } from "solid-js";
|
|
16
|
-
import { render } from "
|
|
16
|
+
import { render } from "@solidjs/testing-library";
|
|
17
17
|
import { exampleRadarData, pageData } from "../_data";
|
|
18
18
|
import {
|
|
19
19
|
PolarAngleAxis,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// `flush()` because legend payload registers via effects/selectors.
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
import { PieChart, Pie, RadialBarChart, RadialBar, Legend, Cell } from "../../src";
|
|
9
9
|
|
|
10
10
|
const pieData = [
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
6
|
import { PolarAngleAxis, PolarRadiusAxis, RadarChart } from "../../src";
|
|
7
|
-
import { fireEvent, render } from "
|
|
7
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
8
8
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
9
9
|
|
|
10
10
|
describe("PolarRadiusAxis events", () => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// axis line). Exact nice-tick geometry comes online with Radar + the full spec.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { RadarChart, PolarRadiusAxis } from "../../src";
|
|
13
13
|
|
|
14
14
|
const data = [
|
|
@@ -4,7 +4,7 @@ import { PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart } from ".
|
|
|
4
4
|
import type { PolarRadiusTickContentProps } from "../../src/polar/PolarRadiusAxis";
|
|
5
5
|
import type { LabelContentType } from "../../src/component/Label";
|
|
6
6
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
import {
|
|
9
9
|
implicitRadiusAxis,
|
|
10
10
|
selectRadiusAxis,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { PolarRadiusAxis, RadialBar, RadialBarChart, getRelativeCoordinate } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/polar/PolarRadiusAxis.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// `flush()` because registration + sectors compute via effects/selectors.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import {
|
|
8
8
|
PieChart,
|
|
9
9
|
Pie,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// tween state resets and the entrance animation re-runs from the center.
|
|
27
27
|
import { describe, expect, it, vi } from "vitest";
|
|
28
28
|
import { createSignal, flush } from "solid-js";
|
|
29
|
-
import { render, fireEvent } from "
|
|
29
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
30
30
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
31
31
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
32
32
|
import type { AnimationController } from "../../src";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// tooltip/legend deferred.
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
import { flush } from "solid-js";
|
|
12
|
-
import { render } from "
|
|
12
|
+
import { render } from "@solidjs/testing-library";
|
|
13
13
|
import { RadarChart, Radar, PolarAngleAxis } from "../../src";
|
|
14
14
|
|
|
15
15
|
const exampleRadarData = [
|
|
@@ -11,7 +11,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
11
11
|
import { Radar, RadarChart } from "../../src";
|
|
12
12
|
import type { RadarProps } from "../../src";
|
|
13
13
|
import type { RadarShapeProps } from "../../src/polar/Radar";
|
|
14
|
-
import { fireEvent, render, screen } from "
|
|
14
|
+
import { fireEvent, render, screen } from "@solidjs/testing-library";
|
|
15
15
|
import { useAppSelector } from "../../src/state/hooks";
|
|
16
16
|
import { selectPolarItemsSettings } from "../../src/state/selectors/polarSelectors";
|
|
17
17
|
import { exampleRadarData } from "../_data";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
Tooltip,
|
|
29
29
|
} from "../../../src";
|
|
30
30
|
import { assertZIndexLayerOrder } from "../../helper/assertZIndexLayerOrder";
|
|
31
|
-
import { fireEvent, render } from "
|
|
31
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
32
32
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
33
33
|
import { selectPolarItemsSettings } from "../../../src/state/selectors/polarSelectors";
|
|
34
34
|
import { PageData } from "../../_data";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import type { RadialBarDataItem } from "../../../src";
|
|
3
3
|
import { getRelativeCoordinate, RadialBar, RadialBarChart } from "../../../src";
|
|
4
|
-
import { render } from "
|
|
4
|
+
import { render } from "@solidjs/testing-library";
|
|
5
5
|
|
|
6
6
|
type ExampleDataPoint = {
|
|
7
7
|
value: number;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { describe, expect, it, vi } from "vitest";
|
|
24
24
|
import type { JSX } from "@solidjs/web";
|
|
25
25
|
import { createSignal, flush } from "solid-js";
|
|
26
|
-
import { render, fireEvent } from "
|
|
26
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
27
27
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
28
28
|
import { trim } from "../helper/trim";
|
|
29
29
|
import { RadialBarChart, RadialBar } from "../../src";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// animation/label/exact geometry deferred.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { RadialBarChart, RadialBar } from "../../src";
|
|
13
13
|
import { PageData } from "../_data";
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// [570,1830]→[56°,180°] with endAngle=180 and total=1830).
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
import { RadialBarChart, RadialBar } from "../../src";
|
|
9
9
|
|
|
10
10
|
const data = [{ month: "january", desktop: 1260, mobile: 570 }];
|
package/test/setup.ts
CHANGED
|
@@ -30,7 +30,7 @@ import "@testing-library/jest-dom/vitest";
|
|
|
30
30
|
import "./helper/expectFunctionReturning";
|
|
31
31
|
import { afterEach, beforeEach, vi } from "vitest";
|
|
32
32
|
import { DEV } from "solid-js";
|
|
33
|
-
import { cleanup } from "
|
|
33
|
+
import { cleanup } from "@solidjs/testing-library";
|
|
34
34
|
import {
|
|
35
35
|
type DiagnosticEvent,
|
|
36
36
|
describeDiagnosticEvents,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// upstream cases are omitted. The function, object, and boolean forms are ported
|
|
19
19
|
// verbatim (modulo className->class).
|
|
20
20
|
import { describe, expect, test } from "vitest";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
import { Funnel, FunnelChart, Trapezoid, Tooltip } from "../../src";
|
|
23
23
|
import { showTooltip } from "../component/Tooltip/tooltipTestHelpers";
|
|
24
24
|
import { funnelChartMouseHoverTooltipSelector } from "../component/Tooltip/tooltipMouseHoverSelectors";
|