mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Reformatted files with biome.
This commit is contained in:
parent
d51f0641a6
commit
fa8d8055df
558 changed files with 2108 additions and 2379 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Row, Column, Text } from '@umami/react-zen';
|
||||
import { Column, Row, Text } from '@umami/react-zen';
|
||||
|
||||
export function ActionForm({ label, description, children }) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import { animated, AnimatedComponent } from '@react-spring/web';
|
||||
import { type AnimatedComponent, animated } from '@react-spring/web';
|
||||
|
||||
export const AnimatedDiv: AnimatedComponent<any> = animated.div;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useMemo } from 'react';
|
||||
import { createAvatar } from '@dicebear/core';
|
||||
import { lorelei } from '@dicebear/collection';
|
||||
import { createAvatar } from '@dicebear/core';
|
||||
import { useMemo } from 'react';
|
||||
import { getColor, getPastel } from '@/lib/colors';
|
||||
|
||||
const lib = lorelei;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Box, Button, FormSubmitButton, Form, FormButtons } from '@umami/react-zen';
|
||||
import { Box, Button, Form, FormButtons, FormSubmitButton } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export interface ConfirmationFormProps {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import type { UseQueryResult } from '@tanstack/react-query';
|
||||
import { Column, Row, SearchField } from '@umami/react-zen';
|
||||
import {
|
||||
ReactNode,
|
||||
useState,
|
||||
useCallback,
|
||||
ReactElement,
|
||||
cloneElement,
|
||||
isValidElement,
|
||||
type ReactElement,
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { SearchField, Row, Column } from '@umami/react-zen';
|
||||
import { UseQueryResult } from '@tanstack/react-query';
|
||||
import { useMessages, useMobile, useNavigation } from '@/components/hooks';
|
||||
import { Pager } from '@/components/common/Pager';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { PageResult } from '@/lib/types';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { Pager } from '@/components/common/Pager';
|
||||
import { useMessages, useMobile, useNavigation } from '@/components/hooks';
|
||||
import type { PageResult } from '@/lib/types';
|
||||
|
||||
const DEFAULT_SEARCH_DELAY = 600;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export function DateDisplay({ startDate, endDate }) {
|
|||
</Icon>
|
||||
<Text wrap="nowrap">
|
||||
{isSingleDate ? (
|
||||
<>{formatDate(startDate, 'PP', locale)}</>
|
||||
formatDate(startDate, 'PP', locale)
|
||||
) : (
|
||||
<>
|
||||
{formatDate(startDate, 'PP', locale)}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Icon, Text, Column } from '@umami/react-zen';
|
||||
import { Column, Icon, Text } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export interface EmptyPlaceholderProps {
|
||||
title?: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ErrorInfo, ReactNode } from 'react';
|
||||
import { ErrorBoundary as Boundary } from 'react-error-boundary';
|
||||
import { Button, Column } from '@umami/react-zen';
|
||||
import type { ErrorInfo, ReactNode } from 'react';
|
||||
import { ErrorBoundary as Boundary } from 'react-error-boundary';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
const logError = (error: Error, info: ErrorInfo) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Icon, Text, Row } from '@umami/react-zen';
|
||||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { AlertTriangle } from '@/components/icons';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Link from 'next/link';
|
||||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { ExternalLink as LinkIcon } from '@/components/icons';
|
||||
|
||||
export function ExternalLink({ href, children, ...props }) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { HTMLAttributes, ReactNode, useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { type HTMLAttributes, type ReactNode, useState } from 'react';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { ExternalLink } from '@/components/icons';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Column, Grid, Icon, Label, ListItem, Select, TextField } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
import { Grid, Column, TextField, Label, Select, Icon, Button, ListItem } from '@umami/react-zen';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { useFilters, useFormat, useWebsiteValuesQuery } from '@/components/hooks';
|
||||
import { X } from '@/components/icons';
|
||||
import { isSearchOperator } from '@/lib/params';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
|
||||
export interface FilterRecordProps {
|
||||
websiteId: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Button, type ButtonProps } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { Button, ButtonProps } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
|
||||
export interface LinkButtonProps extends ButtonProps {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Loading, Column, type ColumnProps } from '@umami/react-zen';
|
||||
import { ErrorMessage } from '@/components/common/ErrorMessage';
|
||||
import { Column, type ColumnProps, Loading } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { ErrorMessage } from '@/components/common/ErrorMessage';
|
||||
|
||||
export interface LoadingPanelProps extends ColumnProps {
|
||||
data?: any;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import { AlertBanner, Loading, Column, ColumnProps } from '@umami/react-zen';
|
||||
import { AlertBanner, Column, type ColumnProps, Loading } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
const DEFAULT_WIDTH = '1320px';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Heading, Icon, Row, Text, Column, Grid } from '@umami/react-zen';
|
||||
import { Column, Grid, Heading, Icon, Row, Text } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export function PageHeader({
|
||||
title,
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import { useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Column,
|
||||
type ColumnProps,
|
||||
Row,
|
||||
Icon,
|
||||
Button,
|
||||
TooltipTrigger,
|
||||
Tooltip,
|
||||
Heading,
|
||||
Icon,
|
||||
Row,
|
||||
Tooltip,
|
||||
TooltipTrigger,
|
||||
} from '@umami/react-zen';
|
||||
import { Maximize, X } from '@/components/icons';
|
||||
import { useState } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Maximize, X } from '@/components/icons';
|
||||
|
||||
export interface PanelProps extends ColumnProps {
|
||||
title?: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Heading, Icon, Row, Text, RowProps } from '@umami/react-zen';
|
||||
import { Heading, Icon, Row, type RowProps, Text } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export function SectionHeader({
|
||||
title,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
Heading,
|
||||
NavMenu,
|
||||
NavMenuItem,
|
||||
Row,
|
||||
Column,
|
||||
NavMenuGroup,
|
||||
NavMenuProps,
|
||||
Heading,
|
||||
IconLabel,
|
||||
NavMenu,
|
||||
NavMenuGroup,
|
||||
NavMenuItem,
|
||||
type NavMenuProps,
|
||||
Row,
|
||||
} from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
|
||||
|
|
@ -72,6 +72,7 @@ export function SideMenu({
|
|||
</NavMenuGroup>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
})}
|
||||
</NavMenu>
|
||||
</Column>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import {
|
|||
Form,
|
||||
FormButtons,
|
||||
FormField,
|
||||
TextField,
|
||||
FormSubmitButton,
|
||||
TextField,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Row } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export function TypeIcon({
|
||||
type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue