mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Updated filter params logic. Added inline compare dates.
This commit is contained in:
parent
bfdd3f9525
commit
e79f4717e7
17 changed files with 1128 additions and 1057 deletions
|
|
@ -78,7 +78,7 @@
|
||||||
"@react-spring/web": "^9.7.5",
|
"@react-spring/web": "^9.7.5",
|
||||||
"@tanstack/react-query": "^5.71.10",
|
"@tanstack/react-query": "^5.71.10",
|
||||||
"@umami/prisma-client": "^0.16.0",
|
"@umami/prisma-client": "^0.16.0",
|
||||||
"@umami/react-zen": "^0.81.0",
|
"@umami/react-zen": "^0.83.0",
|
||||||
"@umami/redis-client": "^0.27.0",
|
"@umami/redis-client": "^0.27.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
|
|
|
||||||
2020
pnpm-lock.yaml
generated
2020
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +0,0 @@
|
||||||
import { Row } from '@umami/react-zen';
|
|
||||||
|
|
||||||
export function WebsiteCompareBar({ websiteId }: { websiteId: string }) {
|
|
||||||
return <Row>compare {websiteId}</Row>;
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { WebsiteTableView } from './WebsiteTableView';
|
||||||
|
|
||||||
export function WebsiteDetailsPage({ websiteId }: { websiteId: string }) {
|
export function WebsiteDetailsPage({ websiteId }: { websiteId: string }) {
|
||||||
const {
|
const {
|
||||||
query: { view },
|
query: { view, compare },
|
||||||
} = useNavigation();
|
} = useNavigation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -20,7 +20,7 @@ export function WebsiteDetailsPage({ websiteId }: { websiteId: string }) {
|
||||||
<WebsiteMetricsBar websiteId={websiteId} showFilter={true} showChange={true} />
|
<WebsiteMetricsBar websiteId={websiteId} showFilter={true} showChange={true} />
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel>
|
<Panel>
|
||||||
<WebsiteChart websiteId={websiteId} />
|
<WebsiteChart websiteId={websiteId} compareMode={compare} />
|
||||||
</Panel>
|
</Panel>
|
||||||
{!view && <WebsiteTableView websiteId={websiteId} />}
|
{!view && <WebsiteTableView websiteId={websiteId} />}
|
||||||
{view && <WebsiteExpandedView websiteId={websiteId} />}
|
{view && <WebsiteExpandedView websiteId={websiteId} />}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { Button, Icon, Icons, DialogTrigger, Dialog, Modal, Text } from '@umami/react-zen';
|
import { Button, Icon, Icons, DialogTrigger, Dialog, Modal, Text } from '@umami/react-zen';
|
||||||
import { FilterEditForm } from '@/components/common/FilterEditForm';
|
import { FilterEditForm } from '@/components/common/FilterEditForm';
|
||||||
import { useMessages, useNavigation, useFilters } from '@/components/hooks';
|
import { useMessages, useNavigation, useFilters } from '@/components/hooks';
|
||||||
import { OPERATORS } from '@/lib/constants';
|
|
||||||
|
|
||||||
export function WebsiteFilterButton({
|
export function WebsiteFilterButton({
|
||||||
websiteId,
|
websiteId,
|
||||||
|
|
@ -20,7 +19,7 @@ export function WebsiteFilterButton({
|
||||||
const params = filters.reduce((obj, filter) => {
|
const params = filters.reduce((obj, filter) => {
|
||||||
const { name, operator, value } = filter;
|
const { name, operator, value } = filter;
|
||||||
|
|
||||||
obj[name] = operator === OPERATORS.equals ? value : `${operator}~${value}`;
|
obj[name] = `${operator}.${value}`;
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import { WebsiteFilterButton } from '@/app/(main)/websites/[websiteId]/WebsiteFi
|
||||||
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
||||||
import { FilterBar } from '@/components/metrics/FilterBar';
|
import { FilterBar } from '@/components/metrics/FilterBar';
|
||||||
import { WebsiteMenu } from '@/app/(main)/websites/[websiteId]/WebsiteMenu';
|
import { WebsiteMenu } from '@/app/(main)/websites/[websiteId]/WebsiteMenu';
|
||||||
import { WebsiteCompareBar } from '@/app/(main)/websites/[websiteId]/WebsiteCompareBar';
|
|
||||||
|
|
||||||
export function WebsiteHeader({
|
export function WebsiteHeader({
|
||||||
websiteId,
|
websiteId,
|
||||||
|
|
@ -17,7 +16,6 @@ export function WebsiteHeader({
|
||||||
websiteId: string;
|
websiteId: string;
|
||||||
showFilter?: boolean;
|
showFilter?: boolean;
|
||||||
allowEdit?: boolean;
|
allowEdit?: boolean;
|
||||||
compareMode?: boolean;
|
|
||||||
}) {
|
}) {
|
||||||
const website = useWebsite();
|
const website = useWebsite();
|
||||||
const { name, domain } = website || {};
|
const { name, domain } = website || {};
|
||||||
|
|
@ -36,7 +34,6 @@ export function WebsiteHeader({
|
||||||
{allowEdit && <WebsiteMenu websiteId={websiteId} />}
|
{allowEdit && <WebsiteMenu websiteId={websiteId} />}
|
||||||
</Row>
|
</Row>
|
||||||
</Row>
|
</Row>
|
||||||
<WebsiteCompareBar websiteId={websiteId} />
|
|
||||||
<FilterBar websiteId={websiteId} />
|
<FilterBar websiteId={websiteId} />
|
||||||
<WebsiteTabs websiteId={websiteId} />
|
<WebsiteTabs websiteId={websiteId} />
|
||||||
</Column>
|
</Column>
|
||||||
|
|
|
||||||
|
|
@ -11,17 +11,26 @@ import {
|
||||||
} from '@umami/react-zen';
|
} from '@umami/react-zen';
|
||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import { Lucide } from '@/components/icons';
|
import { Lucide } from '@/components/icons';
|
||||||
import { useMessages } from '@/components/hooks';
|
import { useMessages, useNavigation } from '@/components/hooks';
|
||||||
|
import { InputItem } from '@/lib/types';
|
||||||
|
|
||||||
export function WebsiteMenu({ websiteId }: { websiteId: string }) {
|
export function WebsiteMenu({ websiteId }: { websiteId: string }) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
const { router, renderUrl, renderTeamUrl } = useNavigation();
|
||||||
|
|
||||||
const menuItems = [
|
const menuItems: InputItem[] = [
|
||||||
{ label: formatMessage(labels.compare), icon: <Lucide.GitCompare /> },
|
{ id: 'share', label: formatMessage(labels.share), icon: <Lucide.Share /> },
|
||||||
{ label: formatMessage(labels.share), icon: <Lucide.Share /> },
|
{ id: 'edit', label: formatMessage(labels.edit), icon: <Lucide.Edit />, seperator: true },
|
||||||
{ label: formatMessage(labels.edit), icon: <Lucide.Edit />, seperator: true },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const handleAction = (id: any) => {
|
||||||
|
if (id === 'compare') {
|
||||||
|
router.push(renderUrl({ compare: 'prev' }));
|
||||||
|
} else if (id === 'edit') {
|
||||||
|
router.push(renderTeamUrl(`/settings/websites/${websiteId}`));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuTrigger>
|
<MenuTrigger>
|
||||||
<Button variant="quiet">
|
<Button variant="quiet">
|
||||||
|
|
@ -29,13 +38,13 @@ export function WebsiteMenu({ websiteId }: { websiteId: string }) {
|
||||||
<Icons.More />
|
<Icons.More />
|
||||||
</Icon>
|
</Icon>
|
||||||
</Button>
|
</Button>
|
||||||
<Popover placement="bottom end">
|
<Popover placement="bottom">
|
||||||
<Menu>
|
<Menu onAction={handleAction}>
|
||||||
{menuItems.map(({ label, icon, seperator }, index) => {
|
{menuItems.map(({ id, label, icon, seperator }, index) => {
|
||||||
return (
|
return (
|
||||||
<Fragment key={index}>
|
<Fragment key={index}>
|
||||||
{seperator && <MenuSeparator />}
|
{seperator && <MenuSeparator />}
|
||||||
<MenuItem>
|
<MenuItem id={id}>
|
||||||
<Icon>{icon}</Icon>
|
<Icon>{icon}</Icon>
|
||||||
<Text>{label}</Text>
|
<Text>{label}</Text>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export function FilterLink({
|
||||||
{children}
|
{children}
|
||||||
{!value && `(${label || formatMessage(labels.unknown)})`}
|
{!value && `(${label || formatMessage(labels.unknown)})`}
|
||||||
{value && (
|
{value && (
|
||||||
<Link href={renderUrl({ [id]: value })} className={styles.label} replace>
|
<Link href={renderUrl({ [id]: `eq.${value}` })} className={styles.label} replace>
|
||||||
{label || value}
|
{label || value}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export function useWebsiteMetricsQuery(
|
||||||
options?: Omit<UseQueryOptions & { onDataLoad?: (data: any) => void }, 'queryKey' | 'queryFn'>,
|
options?: Omit<UseQueryOptions & { onDataLoad?: (data: any) => void }, 'queryKey' | 'queryFn'>,
|
||||||
) {
|
) {
|
||||||
const { get, useQuery } = useApi();
|
const { get, useQuery } = useApi();
|
||||||
const params = useFilterParams(websiteId);
|
const filterParams = useFilterParams(websiteId);
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
|
|
||||||
return useQuery({
|
return useQuery({
|
||||||
|
|
@ -17,13 +17,13 @@ export function useWebsiteMetricsQuery(
|
||||||
'websites:metrics',
|
'websites:metrics',
|
||||||
{
|
{
|
||||||
websiteId,
|
websiteId,
|
||||||
...params,
|
...filterParams,
|
||||||
...queryParams,
|
...queryParams,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const data = await get(`/websites/${websiteId}/metrics`, {
|
const data = await get(`/websites/${websiteId}/metrics`, {
|
||||||
...params,
|
...filterParams,
|
||||||
[searchParams.get('view')]: undefined,
|
[searchParams.get('view')]: undefined,
|
||||||
...queryParams,
|
...queryParams,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export function useFilters() {
|
||||||
let value = safeDecodeURIComponent(query[key]);
|
let value = safeDecodeURIComponent(query[key]);
|
||||||
const label = fields.find(({ name }) => name === key)?.label;
|
const label = fields.find(({ name }) => name === key)?.label;
|
||||||
|
|
||||||
const match = value.match(/^([a-z]+)~(.*)/);
|
const match = value.match(/^([a-z]+)\.(.*)/);
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
operator = match[1];
|
operator = match[1];
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ export function DateFilter({
|
||||||
selectedKey={value}
|
selectedKey={value}
|
||||||
placeholder={formatMessage(labels.selectDate)}
|
placeholder={formatMessage(labels.selectDate)}
|
||||||
onSelectionChange={handleChange}
|
onSelectionChange={handleChange}
|
||||||
|
style={{ width: '200px' }}
|
||||||
>
|
>
|
||||||
{options.map(({ label, value, divider }: any) => {
|
{options.map(({ label, value, divider }: any) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,43 @@
|
||||||
import { useDateRange } from '@/components/hooks';
|
import {
|
||||||
|
Button,
|
||||||
|
Icon,
|
||||||
|
Row,
|
||||||
|
Text,
|
||||||
|
Select,
|
||||||
|
ListItem,
|
||||||
|
TooltipTrigger,
|
||||||
|
Tooltip,
|
||||||
|
} from '@umami/react-zen';
|
||||||
import { isAfter } from 'date-fns';
|
import { isAfter } from 'date-fns';
|
||||||
|
import { Icons } from '@/components/icons';
|
||||||
|
import { useDateRange, useMessages, useNavigation } from '@/components/hooks';
|
||||||
import { getOffsetDateRange } from '@/lib/date';
|
import { getOffsetDateRange } from '@/lib/date';
|
||||||
import { Button, Icon, Icons, Row } from '@umami/react-zen';
|
|
||||||
import { DateFilter } from './DateFilter';
|
|
||||||
import { DateRange } from '@/lib/types';
|
import { DateRange } from '@/lib/types';
|
||||||
|
import { DateFilter } from './DateFilter';
|
||||||
|
|
||||||
export function WebsiteDateFilter({
|
export function WebsiteDateFilter({
|
||||||
websiteId,
|
websiteId,
|
||||||
showAllTime = true,
|
showAllTime = true,
|
||||||
|
showButtons = true,
|
||||||
|
showCompare = true,
|
||||||
}: {
|
}: {
|
||||||
websiteId: string;
|
websiteId: string;
|
||||||
|
compare?: string;
|
||||||
showAllTime?: boolean;
|
showAllTime?: boolean;
|
||||||
|
showButtons?: boolean;
|
||||||
|
showCompare?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { dateRange, saveDateRange } = useDateRange(websiteId);
|
const { dateRange, saveDateRange } = useDateRange(websiteId);
|
||||||
const { value, startDate, endDate, offset } = dateRange;
|
const { value, startDate, endDate, offset } = dateRange;
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
const {
|
||||||
|
router,
|
||||||
|
renderUrl,
|
||||||
|
query: { compare },
|
||||||
|
} = useNavigation();
|
||||||
|
const isAllTime = value === 'all';
|
||||||
|
const isCustomRange = value.startsWith('range');
|
||||||
|
|
||||||
const disableForward =
|
const disableForward =
|
||||||
value === 'all' || isAfter(getOffsetDateRange(dateRange, 1).startDate, new Date());
|
value === 'all' || isAfter(getOffsetDateRange(dateRange, 1).startDate, new Date());
|
||||||
|
|
||||||
|
|
@ -25,9 +49,17 @@ export function WebsiteDateFilter({
|
||||||
saveDateRange(getOffsetDateRange(dateRange, increment));
|
saveDateRange(getOffsetDateRange(dateRange, increment));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSelect = (compare: any) => {
|
||||||
|
router.push(renderUrl({ compare }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCompare = () => {
|
||||||
|
router.push(renderUrl({ compare: compare ? undefined : 'prev' }));
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gap="3">
|
<Row gap="3">
|
||||||
{value !== 'all' && !value.startsWith('range') && (
|
{showButtons && !isAllTime && !isCustomRange && (
|
||||||
<Row gap="1">
|
<Row gap="1">
|
||||||
<Button onPress={() => handleIncrement(-1)} variant="quiet">
|
<Button onPress={() => handleIncrement(-1)} variant="quiet">
|
||||||
<Icon size="xs" rotate={180}>
|
<Icon size="xs" rotate={180}>
|
||||||
|
|
@ -49,6 +81,23 @@ export function WebsiteDateFilter({
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
showAllTime={showAllTime}
|
showAllTime={showAllTime}
|
||||||
/>
|
/>
|
||||||
|
{!isAllTime && compare && (
|
||||||
|
<Row alignItems="center" gap>
|
||||||
|
<Text>VS</Text>
|
||||||
|
<Select selectedKey={compare} onSelectionChange={handleSelect} style={{ width: '200px' }}>
|
||||||
|
<ListItem id="prev">{formatMessage(labels.previousPeriod)}</ListItem>
|
||||||
|
<ListItem id="yoy">{formatMessage(labels.previousYear)}</ListItem>
|
||||||
|
</Select>
|
||||||
|
</Row>
|
||||||
|
)}
|
||||||
|
{!isAllTime && showCompare && (
|
||||||
|
<TooltipTrigger delay={0}>
|
||||||
|
<Button variant="quiet" onPress={handleCompare}>
|
||||||
|
<Icon fillColor="currentColor">{compare ? <Icons.Close /> : <Icons.Compare />}</Icon>
|
||||||
|
</Button>
|
||||||
|
<Tooltip>{formatMessage(compare ? labels.cancel : labels.compareDates)}</Tooltip>
|
||||||
|
</TooltipTrigger>
|
||||||
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -273,6 +273,7 @@ export const labels = defineMessages({
|
||||||
id: 'label.journey-description',
|
id: 'label.journey-description',
|
||||||
defaultMessage: 'Understand how users navigate through your website.',
|
defaultMessage: 'Understand how users navigate through your website.',
|
||||||
},
|
},
|
||||||
|
compareDates: { id: 'label.compare-dates', defaultMessage: 'Compare dates' },
|
||||||
compare: { id: 'label.compare', defaultMessage: 'Compare' },
|
compare: { id: 'label.compare', defaultMessage: 'Compare' },
|
||||||
current: { id: 'label.current', defaultMessage: 'Current' },
|
current: { id: 'label.current', defaultMessage: 'Current' },
|
||||||
previous: { id: 'label.previous', defaultMessage: 'Previous' },
|
previous: { id: 'label.previous', defaultMessage: 'Previous' },
|
||||||
|
|
|
||||||
|
|
@ -45,20 +45,29 @@ export function FilterBar({ websiteId }: { websiteId: string }) {
|
||||||
const paramValue = isSearchOperator(operator) ? value : formatValue(value, key);
|
const paramValue = isSearchOperator(operator) ? value : formatValue(value, key);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button key={name} variant="outline">
|
<Row
|
||||||
<Row alignItems="center" gap="6">
|
key={name}
|
||||||
|
border
|
||||||
|
padding
|
||||||
|
backgroundColor
|
||||||
|
borderRadius
|
||||||
|
shadow="1"
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="space-between"
|
||||||
|
>
|
||||||
|
<Row alignItems="center" gap="4">
|
||||||
<Row alignItems="center" gap="2">
|
<Row alignItems="center" gap="2">
|
||||||
<Text weight="bold">{label}</Text>
|
<Text weight="bold">{label}</Text>
|
||||||
<Text transform="uppercase" color="11" size="1">
|
<Text color="11">{operatorLabels[operator]}</Text>
|
||||||
{operatorLabels[operator]}
|
|
||||||
</Text>
|
|
||||||
<Text weight="bold">{paramValue}</Text>
|
<Text weight="bold">{paramValue}</Text>
|
||||||
</Row>
|
</Row>
|
||||||
<Icon onClick={e => handleCloseFilter(name, e)}>
|
<Button variant="quiet" size="xs" style={{ left: '5px' }}>
|
||||||
<Icons.Close />
|
<Icon onClick={e => handleCloseFilter(name, e)} size="xs">
|
||||||
</Icon>
|
<Icons.Close />
|
||||||
|
</Icon>
|
||||||
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</Button>
|
</Row>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<WebsiteFilterButton websiteId={websiteId} alignment="center" showText={false} />
|
<WebsiteFilterButton websiteId={websiteId} alignment="center" showText={false} />
|
||||||
|
|
|
||||||
|
|
@ -101,13 +101,6 @@ export const OPERATORS = {
|
||||||
after: 'af',
|
after: 'af',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const OPERATOR_PREFIXES = {
|
|
||||||
[OPERATORS.equals]: '',
|
|
||||||
[OPERATORS.notEquals]: '!',
|
|
||||||
[OPERATORS.contains]: '~',
|
|
||||||
[OPERATORS.doesNotContain]: '!~',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const DATA_TYPES = {
|
export const DATA_TYPES = {
|
||||||
[DATA_TYPE.string]: 'string',
|
[DATA_TYPE.string]: 'string',
|
||||||
[DATA_TYPE.number]: 'number',
|
[DATA_TYPE.number]: 'number',
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import { FILTER_COLUMNS, OPERATOR_PREFIXES, OPERATORS } from '@/lib/constants';
|
import { FILTER_COLUMNS, OPERATORS } from '@/lib/constants';
|
||||||
import { QueryFilters, QueryOptions } from '@/lib/types';
|
import { QueryFilters, QueryOptions } from '@/lib/types';
|
||||||
|
|
||||||
export function parseParameterValue(param: any) {
|
export function parseParameterValue(param: any) {
|
||||||
if (typeof param === 'string') {
|
if (typeof param === 'string') {
|
||||||
const [, prefix, value] = param.match(/^(!~|!|~)?(.*)$/);
|
const [, operator, value] = param.match(/^([a-z]+)\.(.*)/) || [];
|
||||||
|
|
||||||
const operator =
|
|
||||||
Object.keys(OPERATOR_PREFIXES).find(key => OPERATOR_PREFIXES[key] === prefix) ||
|
|
||||||
OPERATORS.equals;
|
|
||||||
|
|
||||||
return { operator, value };
|
return { operator, value };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Dispatch, SetStateAction } from 'react';
|
||||||
import {
|
import {
|
||||||
COLLECTION_TYPE,
|
COLLECTION_TYPE,
|
||||||
DATA_TYPE,
|
DATA_TYPE,
|
||||||
|
|
@ -8,13 +9,11 @@ import {
|
||||||
ROLES,
|
ROLES,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { TIME_UNIT } from './date';
|
import { TIME_UNIT } from './date';
|
||||||
import { Dispatch, SetStateAction } from 'react';
|
|
||||||
|
|
||||||
type ObjectValues<T> = T[keyof T];
|
type ObjectValues<T> = T[keyof T];
|
||||||
|
|
||||||
export type TimeUnit = ObjectValues<typeof TIME_UNIT>;
|
export type TimeUnit = ObjectValues<typeof TIME_UNIT>;
|
||||||
export type Permission = ObjectValues<typeof PERMISSIONS>;
|
export type Permission = ObjectValues<typeof PERMISSIONS>;
|
||||||
|
|
||||||
export type CollectionType = ObjectValues<typeof COLLECTION_TYPE>;
|
export type CollectionType = ObjectValues<typeof COLLECTION_TYPE>;
|
||||||
export type Role = ObjectValues<typeof ROLES>;
|
export type Role = ObjectValues<typeof ROLES>;
|
||||||
export type EventType = ObjectValues<typeof EVENT_TYPE>;
|
export type EventType = ObjectValues<typeof EVENT_TYPE>;
|
||||||
|
|
@ -203,3 +202,10 @@ export interface SessionData {
|
||||||
ip?: string;
|
ip?: string;
|
||||||
userAgent?: string;
|
userAgent?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface InputItem {
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
icon: any;
|
||||||
|
seperator?: boolean;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue