mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Refactor: removed default exports.
This commit is contained in:
parent
cd944e14ce
commit
f83a12d6cd
343 changed files with 555 additions and 1046 deletions
|
|
@ -40,5 +40,3 @@ export function ActiveUsers({
|
|||
</StatusLight>
|
||||
);
|
||||
}
|
||||
|
||||
export default ActiveUsers;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import FilterLink from '@/components/common/FilterLink';
|
||||
import MetricsTable, { MetricsTableProps } from '@/components/metrics/MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { MetricsTable, MetricsTableProps } from '@/components/metrics/MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useFormat } from '@/components/hooks';
|
||||
import TypeIcon from '@/components/common/TypeIcon';
|
||||
import { TypeIcon } from '@/components/common/TypeIcon';
|
||||
|
||||
export function BrowsersTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -26,5 +26,3 @@ export function BrowsersTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default BrowsersTable;
|
||||
|
|
|
|||
|
|
@ -42,5 +42,3 @@ export function ChangeLabel({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangeLabel;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import MetricsTable, { MetricsTableProps } from '@/components/metrics/MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from '@/components/metrics/MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function ChannelsTable(props: MetricsTableProps) {
|
||||
|
|
@ -18,5 +18,3 @@ export function ChannelsTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default ChannelsTable;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { emptyFilter } from '@/lib/filters';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useFormat } from '@/components/hooks';
|
||||
|
||||
|
|
@ -35,5 +35,3 @@ export function CitiesTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default CitiesTable;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useCountryNames } from '@/components/hooks';
|
||||
import { useLocale, useMessages, useFormat } from '@/components/hooks';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import TypeIcon from '@/components/common/TypeIcon';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { TypeIcon } from '@/components/common/TypeIcon';
|
||||
|
||||
export function CountriesTable({ ...props }: MetricsTableProps) {
|
||||
const { locale } = useLocale();
|
||||
|
|
@ -33,5 +33,3 @@ export function CountriesTable({ ...props }: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default CountriesTable;
|
||||
|
|
|
|||
|
|
@ -82,5 +82,3 @@ export function DatePickerForm({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default DatePickerForm;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useFormat } from '@/components/hooks';
|
||||
import TypeIcon from '@/components/common/TypeIcon';
|
||||
import { TypeIcon } from '@/components/common/TypeIcon';
|
||||
|
||||
export function DevicesTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -27,5 +27,3 @@ export function DevicesTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default DevicesTable;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { colord } from 'colord';
|
||||
import BarChart from '@/components/charts/BarChart';
|
||||
import { BarChart } from '@/components/charts/BarChart';
|
||||
import { useDateRange, useLocale, useWebsiteEventsSeries } from '@/components/hooks';
|
||||
import { renderDateLabels } from '@/lib/charts';
|
||||
import { CHART_COLORS } from '@/lib/constants';
|
||||
|
|
@ -59,5 +59,3 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default EventsChart;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function EventsTable(props: MetricsTableProps) {
|
||||
|
|
@ -18,5 +18,3 @@ export function EventsTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default EventsTable;
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import {
|
|||
useFormat,
|
||||
useFilters,
|
||||
} from '@/components/hooks';
|
||||
import PopupForm from '@/app/(main)/reports/[reportId]/PopupForm';
|
||||
import FieldFilterEditForm from '@/app/(main)/reports/[reportId]/FieldFilterEditForm';
|
||||
import { PopupForm } from '@/app/(main)/reports/[reportId]/PopupForm';
|
||||
import { FieldFilterEditForm } from '@/app/(main)/reports/[reportId]/FieldFilterEditForm';
|
||||
import { OPERATOR_PREFIXES } from '@/lib/constants';
|
||||
import { isSearchOperator, parseParameterValue } from '@/lib/params';
|
||||
import styles from './FilterTags.module.css';
|
||||
import WebsiteFilterButton from '@/app/(main)/websites/[websiteId]/WebsiteFilterButton';
|
||||
import { WebsiteFilterButton } from '@/app/(main)/websites/[websiteId]/WebsiteFilterButton';
|
||||
|
||||
export function FilterTags({
|
||||
websiteId,
|
||||
|
|
@ -111,5 +111,3 @@ export function FilterTags({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default FilterTags;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Flexbox } from 'react-basics';
|
||||
|
||||
|
|
@ -31,5 +31,3 @@ export function HostsTable(props: MetricsTableProps) {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default HostsTable;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { percentFilter } from '@/lib/filters';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
|
@ -28,5 +28,3 @@ export function LanguagesTable({
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default LanguagesTable;
|
||||
|
|
|
|||
|
|
@ -34,5 +34,3 @@ export function Legend({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Legend;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FixedSizeList } from 'react-window';
|
||||
import { useSpring, animated, config } from '@react-spring/web';
|
||||
import classNames from 'classnames';
|
||||
import Empty from '@/components/common/Empty';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { formatLongNumber } from '@/lib/format';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import styles from './ListTable.module.css';
|
||||
|
|
@ -107,5 +107,3 @@ const AnimatedRow = ({ label, value = 0, percent, change, animate, showPercentag
|
|||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ListTable;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import classNames from 'classnames';
|
||||
import { useSpring, animated } from '@react-spring/web';
|
||||
import { formatNumber } from '@/lib/format';
|
||||
import ChangeLabel from '@/components/metrics/ChangeLabel';
|
||||
import { ChangeLabel } from '@/components/metrics/ChangeLabel';
|
||||
import styles from './MetricCard.module.css';
|
||||
|
||||
export interface MetricCardProps {
|
||||
|
|
@ -58,5 +58,3 @@ export const MetricCard = ({
|
|||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MetricCard;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Loading, cloneChildren } from 'react-basics';
|
||||
import ErrorMessage from '@/components/common/ErrorMessage';
|
||||
import { ErrorMessage } from '@/components/common/ErrorMessage';
|
||||
import { formatLongNumber } from '@/lib/format';
|
||||
import styles from './MetricsBar.module.css';
|
||||
|
||||
|
|
@ -27,5 +27,3 @@ export function MetricsBar({ children, isLoading, isFetched, error }: MetricsBar
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default MetricsBar;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { ReactNode, useMemo, useState } from 'react';
|
||||
import { Loading, Icon, Text, SearchField } from 'react-basics';
|
||||
import classNames from 'classnames';
|
||||
import ErrorMessage from '@/components/common/ErrorMessage';
|
||||
import LinkButton from '@/components/common/LinkButton';
|
||||
import { ErrorMessage } from '@/components/common/ErrorMessage';
|
||||
import { LinkButton } from '@/components/common/LinkButton';
|
||||
import { DEFAULT_ANIMATION_DURATION } from '@/lib/constants';
|
||||
import { percentFilter } from '@/lib/filters';
|
||||
import {
|
||||
|
|
@ -12,8 +12,8 @@ import {
|
|||
useLocale,
|
||||
useFormat,
|
||||
} from '@/components/hooks';
|
||||
import Icons from '@/components/icons';
|
||||
import ListTable, { ListTableProps } from './ListTable';
|
||||
import { Icons } from '@/components/icons';
|
||||
import { ListTable, ListTableProps } from './ListTable';
|
||||
import styles from './MetricsTable.module.css';
|
||||
|
||||
export interface MetricsTableProps extends ListTableProps {
|
||||
|
|
@ -123,5 +123,3 @@ export function MetricsTable({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default MetricsTable;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages, useFormat } from '@/components/hooks';
|
||||
import TypeIcon from '@/components/common/TypeIcon';
|
||||
import { TypeIcon } from '@/components/common/TypeIcon';
|
||||
|
||||
export function OSTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -25,5 +25,3 @@ export function OSTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default OSTable;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { WebsiteContext } from '@/app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import FilterButtons from '@/components/common/FilterButtons';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { FilterButtons } from '@/components/common/FilterButtons';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { emptyFilter } from '@/lib/filters';
|
||||
import { useContext } from 'react';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
|
||||
export interface PagesTableProps extends MetricsTableProps {
|
||||
allowFilter?: boolean;
|
||||
|
|
@ -70,5 +70,3 @@ export function PagesTable({ allowFilter, ...props }: PagesTableProps) {
|
|||
</MetricsTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default PagesTable;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { useMemo } from 'react';
|
||||
import BarChart, { BarChartProps } from '@/components/charts/BarChart';
|
||||
import { BarChart, BarChartProps } from '@/components/charts/BarChart';
|
||||
import { useLocale, useTheme, useMessages } from '@/components/hooks';
|
||||
import { renderDateLabels } from '@/lib/charts';
|
||||
|
||||
export interface PagepageviewsChartProps extends BarChartProps {
|
||||
export interface PageviewsChartProps extends BarChartProps {
|
||||
data: {
|
||||
pageviews: any[];
|
||||
sessions: any[];
|
||||
|
|
@ -17,13 +17,13 @@ export interface PagepageviewsChartProps extends BarChartProps {
|
|||
isAllTime?: boolean;
|
||||
}
|
||||
|
||||
export function PagepageviewsChart({
|
||||
export function PageviewsChart({
|
||||
data,
|
||||
unit,
|
||||
isLoading,
|
||||
isAllTime,
|
||||
...props
|
||||
}: PagepageviewsChartProps) {
|
||||
}: PageviewsChartProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { colors } = useTheme();
|
||||
const { locale } = useLocale();
|
||||
|
|
@ -86,5 +86,3 @@ export function PagepageviewsChart({
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default PagepageviewsChart;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { useState } from 'react';
|
||||
import FilterButtons from '@/components/common/FilterButtons';
|
||||
import { FilterButtons } from '@/components/common/FilterButtons';
|
||||
import { emptyFilter, paramFilter } from '@/lib/filters';
|
||||
import { FILTER_RAW, FILTER_COMBINED } from '@/lib/constants';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import styles from './QueryParametersTable.module.css';
|
||||
|
||||
|
|
@ -49,5 +49,3 @@ export function QueryParametersTable({
|
|||
</MetricsTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default QueryParametersTable;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useMemo, useRef } from 'react';
|
||||
import { startOfMinute, subMinutes, isBefore } from 'date-fns';
|
||||
import PageviewsChart from './PageviewsChart';
|
||||
import { PageviewsChart } from './PageviewsChart';
|
||||
import { DEFAULT_ANIMATION_DURATION, REALTIME_RANGE } from '@/lib/constants';
|
||||
import { RealtimeData } from '@/lib/types';
|
||||
|
||||
|
|
@ -46,5 +46,3 @@ export function RealtimeChart({ data, unit, ...props }: RealtimeChartProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default RealtimeChart;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import FilterLink from '@/components/common/FilterLink';
|
||||
import Favicon from '@/components/common/Favicon';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { Favicon } from '@/components/common/Favicon';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterButtons from '@/components/common/FilterButtons';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterButtons } from '@/components/common/FilterButtons';
|
||||
import thenby from 'thenby';
|
||||
import { GROUPED_DOMAINS } from '@/lib/constants';
|
||||
import { Flexbox } from 'react-basics';
|
||||
|
|
@ -98,5 +98,3 @@ export function ReferrersTable({ allowFilter, ...props }: ReferrersTableProps) {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ReferrersTable;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { emptyFilter } from '@/lib/filters';
|
||||
import { useMessages, useLocale, useRegionNames } from '@/components/hooks';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import TypeIcon from '@/components/common/TypeIcon';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { TypeIcon } from '@/components/common/TypeIcon';
|
||||
|
||||
export function RegionsTable(props: MetricsTableProps) {
|
||||
const { locale } = useLocale();
|
||||
|
|
@ -29,5 +29,3 @@ export function RegionsTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default RegionsTable;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function ScreenTable(props: MetricsTableProps) {
|
||||
|
|
@ -13,5 +13,3 @@ export function ScreenTable(props: MetricsTableProps) {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default ScreenTable;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import FilterLink from '@/components/common/FilterLink';
|
||||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Flexbox } from 'react-basics';
|
||||
|
||||
|
|
@ -26,5 +26,3 @@ export function TagsTable(props: MetricsTableProps) {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default TagsTable;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useState, useMemo, HTMLAttributes } from 'react';
|
|||
import { ComposableMap, Geographies, Geography, ZoomableGroup } from 'react-simple-maps';
|
||||
import classNames from 'classnames';
|
||||
import { colord } from 'colord';
|
||||
import HoverTooltip from '@/components/common/HoverTooltip';
|
||||
import { HoverTooltip } from '@/components/common/HoverTooltip';
|
||||
import { ISO_COUNTRIES, MAP_FILE } from '@/lib/constants';
|
||||
import { useDateRange, useTheme, useWebsiteMetrics } from '@/components/hooks';
|
||||
import { useCountryNames } from '@/components/hooks';
|
||||
|
|
@ -108,5 +108,3 @@ export function WorldMap({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default WorldMap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue