Move stuff belonging to the component to shlink-web-component

This commit is contained in:
Alejandro Celaya
2023-07-16 08:47:10 +02:00
parent cbbb679dfc
commit d82c0dc75e
204 changed files with 568 additions and 563 deletions

View File

@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import type { ReactNode } from 'react';
import { ChartCard } from '../../../src/visits/charts/ChartCard';
import { ChartCard } from '../../../src/shlink-web-component/visits/charts/ChartCard';
describe('<ChartCard />', () => {
const setUp = (title: Function | string = '', footer?: ReactNode) => render(

View File

@@ -1,5 +1,5 @@
import { screen } from '@testing-library/react';
import { DoughnutChart } from '../../../src/visits/charts/DoughnutChart';
import { DoughnutChart } from '../../../src/shlink-web-component/visits/charts/DoughnutChart';
import { setUpCanvas } from '../../__helpers__/setUpTest';
describe('<DoughnutChart />', () => {

View File

@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import type { Chart, ChartDataset } from 'chart.js';
import { DoughnutChartLegend } from '../../../src/visits/charts/DoughnutChartLegend';
import { DoughnutChartLegend } from '../../../src/shlink-web-component/visits/charts/DoughnutChartLegend';
describe('<DoughnutChartLegend />', () => {
const labels = ['foo', 'bar', 'baz', 'foo2', 'bar2'];

View File

@@ -1,5 +1,5 @@
import type { HorizontalBarChartProps } from '../../../src/visits/charts/HorizontalBarChart';
import { HorizontalBarChart } from '../../../src/visits/charts/HorizontalBarChart';
import type { HorizontalBarChartProps } from '../../../src/shlink-web-component/visits/charts/HorizontalBarChart';
import { HorizontalBarChart } from '../../../src/shlink-web-component/visits/charts/HorizontalBarChart';
import { setUpCanvas } from '../../__helpers__/setUpTest';
describe('<HorizontalBarChart />', () => {

View File

@@ -2,8 +2,8 @@ import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { fromPartial } from '@total-typescript/shoehorn';
import { formatISO, subDays, subMonths, subYears } from 'date-fns';
import { LineChartCard } from '../../../src/visits/charts/LineChartCard';
import type { NormalizedVisit } from '../../../src/visits/types';
import { LineChartCard } from '../../../src/shlink-web-component/visits/charts/LineChartCard';
import type { NormalizedVisit } from '../../../src/shlink-web-component/visits/types';
import { setUpCanvas } from '../../__helpers__/setUpTest';
describe('<LineChartCard />', () => {

View File

@@ -1,9 +1,9 @@
import { screen } from '@testing-library/react';
import { range } from 'ramda';
import type { ReactNode } from 'react';
import { SortableBarChartCard } from '../../../src/shlink-web-component/visits/charts/SortableBarChartCard';
import type { Stats } from '../../../src/shlink-web-component/visits/types';
import { rangeOf } from '../../../src/utils/utils';
import { SortableBarChartCard } from '../../../src/visits/charts/SortableBarChartCard';
import type { Stats } from '../../../src/visits/types';
import { renderWithEvents } from '../../__helpers__/setUpTest';
describe('<SortableBarChartCard />', () => {