mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Merge branch 'dev' into 3802-team-to-user-switch
This commit is contained in:
commit
3071ee8b88
577 changed files with 2413 additions and 3644 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Select, ListItem } from '@umami/react-zen';
|
||||
import { ListItem, Select } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export interface ActionSelectProps {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { CURRENCIES } from '@/lib/constants';
|
||||
import { ListItem, Select } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { CURRENCIES } from '@/lib/constants';
|
||||
|
||||
export function CurrencySelect({ value, onChange }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { useState, Key, Fragment } from 'react';
|
||||
import { Modal, Select, ListItem, ListSeparator, Dialog, SelectProps } from '@umami/react-zen';
|
||||
import { Dialog, ListItem, ListSeparator, Modal, Select, type SelectProps } from '@umami/react-zen';
|
||||
import { endOfYear } from 'date-fns';
|
||||
import { DatePickerForm } from '@/components/metrics/DatePickerForm';
|
||||
import { useMessages, useMobile } from '@/components/hooks';
|
||||
import { Fragment, type Key, useState } from 'react';
|
||||
import { DateDisplay } from '@/components/common/DateDisplay';
|
||||
import { useMessages, useMobile } from '@/components/hooks';
|
||||
import { DatePickerForm } from '@/components/metrics/DatePickerForm';
|
||||
import { parseDateRange } from '@/lib/date';
|
||||
|
||||
export interface DateFilterProps extends SelectProps {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { CSSProperties, ReactNode } from 'react';
|
||||
import {
|
||||
Button,
|
||||
ButtonProps,
|
||||
Modal,
|
||||
type ButtonProps,
|
||||
Dialog,
|
||||
type DialogProps,
|
||||
DialogTrigger,
|
||||
DialogProps,
|
||||
IconLabel,
|
||||
Modal,
|
||||
} from '@umami/react-zen';
|
||||
import type { CSSProperties, ReactNode } from 'react';
|
||||
import { useMobile } from '@/components/hooks';
|
||||
|
||||
export interface DialogButtonProps extends Omit<ButtonProps, 'children'> {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Button, Icon, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import Papa from 'papaparse';
|
||||
import { Button, Icon, TooltipTrigger, Tooltip } from '@umami/react-zen';
|
||||
import { Download } from '@/components/icons';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Download } from '@/components/icons';
|
||||
|
||||
export function DownloadButton({
|
||||
filename = 'data',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { useState } from 'react';
|
||||
import { Icon, Tooltip, TooltipTrigger, LoadingButton } from '@umami/react-zen';
|
||||
import { Download } from '@/components/icons';
|
||||
import { useMessages, useApi } from '@/components/hooks';
|
||||
import { Icon, LoadingButton, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import { useDateParameters } from '@/components/hooks/useDateParameters';
|
||||
import { useFilterParameters } from '@/components/hooks/useFilterParameters';
|
||||
import { Download } from '@/components/icons';
|
||||
|
||||
export function ExportButton({ websiteId }: { websiteId: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
import { Key } from 'react';
|
||||
import { subMonths, endOfDay } from 'date-fns';
|
||||
import {
|
||||
Grid,
|
||||
Button,
|
||||
Column,
|
||||
Grid,
|
||||
Icon,
|
||||
List,
|
||||
ListItem,
|
||||
Row,
|
||||
Button,
|
||||
Popover,
|
||||
MenuTrigger,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Icon,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
Row,
|
||||
} from '@umami/react-zen';
|
||||
import { endOfDay, subMonths } from 'date-fns';
|
||||
import type { Key } from 'react';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { FilterRecord } from '@/components/common/FilterRecord';
|
||||
import { useFields, useMessages, useMobile } from '@/components/hooks';
|
||||
import { Plus } from '@/components/icons';
|
||||
import { FilterRecord } from '@/components/common/FilterRecord';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
|
||||
export interface FieldFiltersProps {
|
||||
websiteId: string;
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
import {
|
||||
Button,
|
||||
Icon,
|
||||
Text,
|
||||
Row,
|
||||
TooltipTrigger,
|
||||
Tooltip,
|
||||
Modal,
|
||||
Dialog,
|
||||
DialogTrigger,
|
||||
Icon,
|
||||
Modal,
|
||||
Row,
|
||||
Text,
|
||||
Tooltip,
|
||||
TooltipTrigger,
|
||||
} from '@umami/react-zen';
|
||||
import { SegmentEditForm } from '@/app/(main)/websites/[websiteId]/segments/SegmentEditForm';
|
||||
import {
|
||||
useNavigation,
|
||||
useMessages,
|
||||
useFormat,
|
||||
useFilters,
|
||||
useFormat,
|
||||
useMessages,
|
||||
useNavigation,
|
||||
useWebsiteSegmentQuery,
|
||||
} from '@/components/hooks';
|
||||
import { X, Bookmark } from '@/components/icons';
|
||||
import { Bookmark, X } from '@/components/icons';
|
||||
import { isSearchOperator } from '@/lib/params';
|
||||
import { SegmentEditForm } from '@/app/(main)/websites/[websiteId]/segments/SegmentEditForm';
|
||||
|
||||
export function FilterBar({ websiteId }: { websiteId: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Box, ToggleGroup, ToggleGroupItem } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
import { ToggleGroup, ToggleGroupItem, Box } from '@umami/react-zen';
|
||||
|
||||
export interface FilterButtonsProps {
|
||||
items: { id: string; label: string }[];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Button, Column, Row, Tab, TabList, TabPanel, Tabs } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
import { useFilters, useMessages, useMobile, useNavigation } from '@/components/hooks';
|
||||
import { FieldFilters } from '@/components/input/FieldFilters';
|
||||
import { SegmentFilters } from '@/components/input/SegmentFilters';
|
||||
import { Button, Column, Row, Tab, TabList, TabPanel, Tabs } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
|
||||
export interface FilterEditFormProps {
|
||||
websiteId?: string;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Icon, Button, MenuTrigger, Popover, Grid, Text, Dialog } from '@umami/react-zen';
|
||||
import { languages } from '@/lib/lang';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import { Button, Dialog, Grid, Icon, MenuTrigger, Popover, Text } from '@umami/react-zen';
|
||||
import { Globe } from 'lucide-react';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import { languages } from '@/lib/lang';
|
||||
|
||||
export function LanguageButton() {
|
||||
const { locale, saveLocale } = useLocale();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { SetStateAction, useMemo, useState } from 'react';
|
||||
import { ComboBox, type ComboBoxProps, ListItem, Loading, useDebounce } from '@umami/react-zen';
|
||||
import { endOfDay, subMonths } from 'date-fns';
|
||||
import { ComboBox, ListItem, Loading, useDebounce, ComboBoxProps } from '@umami/react-zen';
|
||||
import { type SetStateAction, useMemo, useState } from 'react';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { useMessages, useWebsiteValuesQuery } from '@/components/hooks';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactNode, Key } from 'react';
|
||||
import { DialogTrigger, Button, Menu, Popover, Icon } from '@umami/react-zen';
|
||||
import { Button, DialogTrigger, Icon, Menu, Popover } from '@umami/react-zen';
|
||||
import type { Key, ReactNode } from 'react';
|
||||
import { Ellipsis } from '@/components/icons';
|
||||
|
||||
export function MenuButton({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Dialog, DialogTrigger, Button, Icon, Modal, DialogProps } from '@umami/react-zen';
|
||||
import { Button, Dialog, type DialogProps, DialogTrigger, Icon, Modal } from '@umami/react-zen';
|
||||
import { Menu } from '@/components/icons';
|
||||
|
||||
export function MobileMenuButton(props: DialogProps) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Row, Select, ListItem } from '@umami/react-zen';
|
||||
import { ListItem, Row, Select } from '@umami/react-zen';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import { formatDate } from '@/lib/date';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
import {
|
||||
Text,
|
||||
Column,
|
||||
Icon,
|
||||
IconLabel,
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuTrigger,
|
||||
MenuSection,
|
||||
MenuSeparator,
|
||||
SubmenuTrigger,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
Row,
|
||||
Column,
|
||||
Pressable,
|
||||
IconLabel,
|
||||
Row,
|
||||
SubmenuTrigger,
|
||||
Text,
|
||||
} from '@umami/react-zen';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
import {
|
||||
useConfig,
|
||||
useLoginQuery,
|
||||
|
|
@ -33,7 +34,6 @@ import {
|
|||
} from '@/components/icons';
|
||||
import { Switch } from '@/components/svg';
|
||||
import { DOCS_URL } from '@/lib/constants';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
|
||||
export interface TeamsButtonProps {
|
||||
showText?: boolean;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Button, Icon, ButtonProps } from '@umami/react-zen';
|
||||
import { PanelLeft } from '@/components/icons';
|
||||
import { Button, type ButtonProps, Icon } from '@umami/react-zen';
|
||||
import { useGlobalState } from '@/components/hooks';
|
||||
import { PanelLeft } from '@/components/icons';
|
||||
|
||||
export function PanelButton(props: ButtonProps) {
|
||||
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed');
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Icon, DialogTrigger, Popover, Column, Label } from '@umami/react-zen';
|
||||
import { TimezoneSetting } from '@/app/(main)/settings/preferences/TimezoneSetting';
|
||||
import { Button, Column, DialogTrigger, Icon, Label, Popover } from '@umami/react-zen';
|
||||
import { DateRangeSetting } from '@/app/(main)/settings/preferences/DateRangeSetting';
|
||||
import { Settings } from '@/components/icons';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { TimezoneSetting } from '@/app/(main)/settings/preferences/TimezoneSetting';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Settings } from '@/components/icons';
|
||||
|
||||
export function PreferencesButton() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import { Fragment } from 'react';
|
||||
import {
|
||||
Icon,
|
||||
Button,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
Icon,
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuSeparator,
|
||||
MenuSection,
|
||||
Text,
|
||||
MenuSeparator,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
Row,
|
||||
Text,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages, useLoginQuery, useNavigation } from '@/components/hooks';
|
||||
import { LogOut, UserCircle, LockKeyhole } from '@/components/icons';
|
||||
import { Fragment } from 'react';
|
||||
import { useLoginQuery, useMessages, useNavigation } from '@/components/hooks';
|
||||
import { LockKeyhole, LogOut, UserCircle } from '@/components/icons';
|
||||
|
||||
export function ProfileButton() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { LoadingButton, Icon, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import { setWebsiteDateRange } from '@/store/websites';
|
||||
import { useDateRange } from '@/components/hooks';
|
||||
import { Icon, LoadingButton, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import { useDateRange, useMessages } from '@/components/hooks';
|
||||
import { RefreshCw } from '@/components/icons';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { setWebsiteDateRange } from '@/store/websites';
|
||||
|
||||
export function RefreshButton({
|
||||
websiteId,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
import { ReactNode, useState } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useDeleteQuery } from '@/components/hooks/queries/useDeleteQuery';
|
||||
import {
|
||||
AlertDialog,
|
||||
Button,
|
||||
|
|
@ -10,9 +7,12 @@ import {
|
|||
MenuTrigger,
|
||||
Modal,
|
||||
Popover,
|
||||
Text,
|
||||
Row,
|
||||
Text,
|
||||
} from '@umami/react-zen';
|
||||
import { type ReactNode, useState } from 'react';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useDeleteQuery } from '@/components/hooks/queries/useDeleteQuery';
|
||||
import { Edit, MoreHorizontal, Trash } from '@/components/icons';
|
||||
|
||||
export function ReportEditButton({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { IconLabel, List, ListItem } from '@umami/react-zen';
|
||||
import { useWebsiteSegmentsQuery } from '@/components/hooks';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { useWebsiteSegmentsQuery } from '@/components/hooks';
|
||||
import { ChartPie, UserPlus } from '@/components/icons';
|
||||
|
||||
export interface SegmentFiltersProps {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Button, DialogTrigger, Modal, Text, Icon, Dialog } from '@umami/react-zen';
|
||||
import { Button, Dialog, DialogTrigger, Icon, Modal, Text } from '@umami/react-zen';
|
||||
import { SegmentEditForm } from '@/app/(main)/websites/[websiteId]/segments/SegmentEditForm';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Plus } from '@/components/icons';
|
||||
import { SegmentEditForm } from '@/app/(main)/websites/[websiteId]/segments/SegmentEditForm';
|
||||
|
||||
export function SegmentSaveButton({ websiteId }: { websiteId: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
import { Key } from 'react';
|
||||
import {
|
||||
Icon,
|
||||
Button,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
Icon,
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuSeparator,
|
||||
MenuSection,
|
||||
MenuSeparator,
|
||||
MenuTrigger,
|
||||
Popover,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages, useLoginQuery, useNavigation, useConfig } from '@/components/hooks';
|
||||
import type { Key } from 'react';
|
||||
import { useConfig, useLoginQuery, useMessages, useNavigation } from '@/components/hooks';
|
||||
import {
|
||||
LogOut,
|
||||
LockKeyhole,
|
||||
Settings,
|
||||
UserCircle,
|
||||
LifeBuoy,
|
||||
BookText,
|
||||
ExternalLink,
|
||||
LifeBuoy,
|
||||
LockKeyhole,
|
||||
LogOut,
|
||||
Settings,
|
||||
UserCircle,
|
||||
} from '@/components/icons';
|
||||
import { DOCS_URL } from '@/lib/constants';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { useCallback, useMemo } from 'react';
|
||||
import { Button, Icon, Row, Text, Select, ListItem } from '@umami/react-zen';
|
||||
import { Button, Icon, ListItem, Row, Select, Text } from '@umami/react-zen';
|
||||
import { isAfter } from 'date-fns';
|
||||
import { ChevronRight } from '@/components/icons';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { useDateRange, useDateRangeQuery, useMessages, useNavigation } from '@/components/hooks';
|
||||
import { ChevronRight } from '@/components/icons';
|
||||
import { getDateRangeValue } from '@/lib/date';
|
||||
import { DateFilter } from './DateFilter';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { ListFilter } from '@/components/icons';
|
||||
import { FilterEditForm } from '@/components/input/FilterEditForm';
|
||||
import { DialogButton } from '@/components/input/DialogButton';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { ListFilter } from '@/components/icons';
|
||||
import { DialogButton } from '@/components/input/DialogButton';
|
||||
import { FilterEditForm } from '@/components/input/FilterEditForm';
|
||||
import { filtersArrayToObject } from '@/lib/params';
|
||||
|
||||
export function WebsiteFilterButton({
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { ListItem, Row, Select, type SelectProps, Text } from '@umami/react-zen';
|
||||
import { useState } from 'react';
|
||||
import { Select, SelectProps, ListItem, Text, Row } from '@umami/react-zen';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
import {
|
||||
useUserWebsitesQuery,
|
||||
useMessages,
|
||||
useLoginQuery,
|
||||
useMessages,
|
||||
useUserWebsitesQuery,
|
||||
useWebsiteQuery,
|
||||
} from '@/components/hooks';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
|
||||
export function WebsiteSelect({
|
||||
websiteId,
|
||||
|
|
@ -28,7 +28,7 @@ export function WebsiteSelect({
|
|||
{ userId: user?.id, teamId },
|
||||
{ search, pageSize: 10, includeTeams },
|
||||
);
|
||||
const listItems: { id: string; name: string }[] = data?.['data'] || [];
|
||||
const listItems: { id: string; name: string }[] = data?.data || [];
|
||||
|
||||
const handleSearch = (value: string) => {
|
||||
setSearch(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue