format:fix

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-13 08:55:24 +01:00
parent 558318c312
commit 48aecc4b37
117 changed files with 4455 additions and 667 deletions

View File

@@ -1,7 +1,8 @@
import { useDispatch, useSelector } from '@/redux';
import { LineChartIcon } from 'lucide-react';
import { chartTypes } from '@openpanel/constants';
import { objectToZodEnums } from '@openpanel/validation';
import { LineChartIcon } from 'lucide-react';
import { Combobox } from '../ui/combobox';
import { changeChartType } from './reportSlice';

View File

@@ -1,10 +1,11 @@
import { useDispatch, useSelector } from '@/redux';
import { ClockIcon } from 'lucide-react';
import {
isHourIntervalEnabledByRange,
isMinuteIntervalEnabledByRange,
} from '@openpanel/constants';
import type { IInterval } from '@openpanel/validation';
import { ClockIcon } from 'lucide-react';
import { Combobox } from '../ui/combobox';
import { changeInterval } from './reportSlice';

View File

@@ -1,7 +1,8 @@
import { useDispatch, useSelector } from '@/redux';
import { Tv2Icon } from 'lucide-react';
import { lineTypes } from '@openpanel/constants';
import { objectToZodEnums } from '@openpanel/validation';
import { Tv2Icon } from 'lucide-react';
import { Combobox } from '../ui/combobox';
import { changeLineType } from './reportSlice';

View File

@@ -9,12 +9,13 @@ import {
import { useBreakpoint } from '@/hooks/useBreakpoint';
import { useDispatch, useSelector } from '@/redux';
import { cn } from '@/utils/cn';
import { timeRanges } from '@openpanel/constants';
import type { IChartRange } from '@openpanel/validation';
import { endOfDay, format, startOfDay } from 'date-fns';
import { CalendarIcon, ChevronsUpDownIcon } from 'lucide-react';
import type { SelectRangeEventHandler } from 'react-day-picker';
import { timeRanges } from '@openpanel/constants';
import type { IChartRange } from '@openpanel/validation';
import type { ExtendedComboboxProps } from '../ui/combobox';
import { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group';
import { changeDates, changeEndDate, changeStartDate } from './reportSlice';

View File

@@ -1,6 +1,7 @@
'use client';
import { api } from '@/app/_trpc/client';
import type { IChartInput } from '@openpanel/validation';
import { ChartEmpty } from './ChartEmpty';

View File

@@ -10,6 +10,7 @@ import {
useState,
} from 'react';
import type { IChartSerie } from '@/server/api/routers/chart';
import type { IChartInput } from '@openpanel/validation';
import { ChartLoading } from './ChartLoading';

View File

@@ -4,10 +4,11 @@ import type { IChartData } from '@/app/_trpc/client';
import { ColorSquare } from '@/components/ColorSquare';
import { fancyMinutes, useNumber } from '@/hooks/useNumerFormatter';
import { theme } from '@/utils/theme';
import type { IChartMetric } from '@openpanel/validation';
import AutoSizer from 'react-virtualized-auto-sizer';
import { Area, AreaChart } from 'recharts';
import type { IChartMetric } from '@openpanel/validation';
import {
getDiffIndicator,
PreviousDiffIndicatorText,

View File

@@ -5,7 +5,6 @@ import { useNumber } from '@/hooks/useNumerFormatter';
import { useRechartDataModel } from '@/hooks/useRechartDataModel';
import { useVisibleSeries } from '@/hooks/useVisibleSeries';
import { getChartColor } from '@/utils/theme';
import type { IChartLineType, IInterval } from '@openpanel/validation';
import {
Area,
AreaChart,
@@ -15,6 +14,8 @@ import {
YAxis,
} from 'recharts';
import type { IChartLineType, IInterval } from '@openpanel/validation';
import { getYAxisWidth } from './chart-utils';
import { useChartContext } from './ChartProvider';
import { ReportChartTooltip } from './ReportChartTooltip';

View File

@@ -6,6 +6,7 @@ import { Progress } from '@/components/ui/progress';
import { useNumber } from '@/hooks/useNumerFormatter';
import { cn } from '@/utils/cn';
import { getChartColor } from '@/utils/theme';
import { NOT_SET_VALUE } from '@openpanel/constants';
import { PreviousDiffIndicatorText } from '../PreviousDiffIndicator';

View File

@@ -5,9 +5,10 @@ import { useNumber } from '@/hooks/useNumerFormatter';
import { useRechartDataModel } from '@/hooks/useRechartDataModel';
import { useVisibleSeries } from '@/hooks/useVisibleSeries';
import { getChartColor, theme } from '@/utils/theme';
import type { IInterval } from '@openpanel/validation';
import { Bar, BarChart, CartesianGrid, Tooltip, XAxis, YAxis } from 'recharts';
import type { IInterval } from '@openpanel/validation';
import { getYAxisWidth } from './chart-utils';
import { useChartContext } from './ChartProvider';
import { ReportChartTooltip } from './ReportChartTooltip';

View File

@@ -7,8 +7,6 @@ import { useNumber } from '@/hooks/useNumerFormatter';
import { useRechartDataModel } from '@/hooks/useRechartDataModel';
import { useVisibleSeries } from '@/hooks/useVisibleSeries';
import { getChartColor } from '@/utils/theme';
import type { IServiceReference } from '@openpanel/db';
import type { IChartLineType, IInterval } from '@openpanel/validation';
import {
CartesianGrid,
Line,
@@ -19,6 +17,9 @@ import {
YAxis,
} from 'recharts';
import type { IServiceReference } from '@openpanel/db';
import type { IChartLineType, IInterval } from '@openpanel/validation';
import { getYAxisWidth } from './chart-utils';
import { useChartContext } from './ChartProvider';
import { ReportChartTooltip } from './ReportChartTooltip';

View File

@@ -1,5 +1,4 @@
import { useMemo } from 'react';
import { NOT_SET_VALUE } from '@openpanel/constants';
import type { LucideIcon, LucideProps } from 'lucide-react';
import {
ActivityIcon,
@@ -15,6 +14,8 @@ import {
TabletIcon,
} from 'lucide-react';
import { NOT_SET_VALUE } from '@openpanel/constants';
interface SerieIconProps extends LucideProps {
name: string;
}

View File

@@ -2,6 +2,7 @@
import type { RouterOutputs } from '@/app/_trpc/client';
import { api } from '@/app/_trpc/client';
import type { IChartInput } from '@openpanel/validation';
import { ChartEmpty } from '../chart/ChartEmpty';

View File

@@ -1,4 +1,8 @@
import { start } from 'repl';
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { isSameDay, isSameMonth } from 'date-fns';
import {
alphabetIds,
getDefaultIntervalByDates,
@@ -15,9 +19,6 @@ import type {
IChartType,
IInterval,
} from '@openpanel/validation';
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { isSameDay, isSameMonth } from 'date-fns';
type InitialState = IChartInput & {
dirty: boolean;

View File

@@ -3,9 +3,10 @@ import { Combobox } from '@/components/ui/combobox';
import { useAppParams } from '@/hooks/useAppParams';
import { useDispatch } from '@/redux';
import { cn } from '@/utils/cn';
import type { IChartEvent } from '@openpanel/validation';
import { DatabaseIcon } from 'lucide-react';
import type { IChartEvent } from '@openpanel/validation';
import { changeEvent } from '../reportSlice';
interface EventPropertiesComboboxProps {

View File

@@ -5,9 +5,10 @@ import { ColorSquare } from '@/components/ColorSquare';
import { Combobox } from '@/components/ui/combobox';
import { useAppParams } from '@/hooks/useAppParams';
import { useDispatch, useSelector } from '@/redux';
import type { IChartBreakdown } from '@openpanel/validation';
import { SplitIcon } from 'lucide-react';
import type { IChartBreakdown } from '@openpanel/validation';
import { addBreakdown, changeBreakdown, removeBreakdown } from '../reportSlice';
import { ReportBreakdownMore } from './ReportBreakdownMore';
import type { ReportEventMoreProps } from './ReportEventMore';

View File

@@ -9,9 +9,10 @@ import { useAppParams } from '@/hooks/useAppParams';
import { useDebounceFn } from '@/hooks/useDebounceFn';
import { useEventNames } from '@/hooks/useEventNames';
import { useDispatch, useSelector } from '@/redux';
import type { IChartEvent } from '@openpanel/validation';
import { GanttChart, GanttChartIcon, Users } from 'lucide-react';
import type { IChartEvent } from '@openpanel/validation';
import {
addEvent,
changeEvent,

View File

@@ -7,6 +7,8 @@ import { RenderDots } from '@/components/ui/RenderDots';
import { useAppParams } from '@/hooks/useAppParams';
import { useMappings } from '@/hooks/useMappings';
import { useDispatch } from '@/redux';
import { SlidersHorizontal, Trash } from 'lucide-react';
import { operators } from '@openpanel/constants';
import type {
IChartEvent,
@@ -14,7 +16,6 @@ import type {
IChartEventFilterValue,
} from '@openpanel/validation';
import { mapKeys } from '@openpanel/validation';
import { SlidersHorizontal, Trash } from 'lucide-react';
import { changeEvent } from '../../reportSlice';

View File

@@ -2,9 +2,10 @@ import { api } from '@/app/_trpc/client';
import { Combobox } from '@/components/ui/combobox';
import { useAppParams } from '@/hooks/useAppParams';
import { useDispatch } from '@/redux';
import type { IChartEvent } from '@openpanel/validation';
import { FilterIcon } from 'lucide-react';
import type { IChartEvent } from '@openpanel/validation';
import { changeEvent } from '../../reportSlice';
interface FiltersComboboxProps {