@@ -107,32 +105,28 @@ export function GoalsParameters() {
{formatMessage(labels.goal)}: {formatNumber(goal.goal)}
-
+
-
- {(close: () => void) => (
-
-
-
- )}
-
-
+
+ {}, index)}
+ />
+
+
);
},
)}
-
+
-
+
{formatMessage(labels.runQuery)}
-
+
);
diff --git a/src/app/(main)/reports/goals/GoalsReportPage.tsx b/src/app/(main)/reports/goals/GoalsReportPage.tsx
index d8b4a6b6..7cd57679 100644
--- a/src/app/(main)/reports/goals/GoalsReportPage.tsx
+++ b/src/app/(main)/reports/goals/GoalsReportPage.tsx
@@ -1,6 +1,6 @@
'use client';
-import { GoalReport } from './GoalsReport';
+import { GoalsReport } from './GoalsReport';
-export function GoalReportPage() {
- return
;
+export function GoalsReportPage() {
+ return
;
}
diff --git a/src/app/(main)/reports/insights/InsightsParameters.tsx b/src/app/(main)/reports/insights/InsightsParameters.tsx
index 8aa6ac57..fbaa9e34 100644
--- a/src/app/(main)/reports/insights/InsightsParameters.tsx
+++ b/src/app/(main)/reports/insights/InsightsParameters.tsx
@@ -1,6 +1,6 @@
import { useMessages } from '@/components/hooks';
import { useContext } from 'react';
-import { Form, FormButtons, SubmitButton } from 'react-basics';
+import { Form, FormButtons, FormSubmitButton } from '@umami/react-zen';
import { BaseParameters } from '../[reportId]/BaseParameters';
import { ReportContext } from '../[reportId]/Report';
import { FieldParameters } from '../[reportId]/FieldParameters';
@@ -25,9 +25,9 @@ export function InsightsParameters() {
{parametersSelected &&
}
{parametersSelected &&
}
-
+
{formatMessage(labels.runQuery)}
-
+
);
diff --git a/src/app/(main)/reports/insights/InsightsTable.tsx b/src/app/(main)/reports/insights/InsightsTable.tsx
index 848135d0..9095ff9f 100644
--- a/src/app/(main)/reports/insights/InsightsTable.tsx
+++ b/src/app/(main)/reports/insights/InsightsTable.tsx
@@ -1,5 +1,5 @@
import { useContext, useEffect, useState } from 'react';
-import { GridTable, GridColumn } from 'react-basics';
+import { DataTable, DataColumn } from '@umami/react-zen';
import { useFormat, useMessages } from '@/components/hooks';
import { ReportContext } from '../[reportId]/Report';
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
@@ -24,50 +24,35 @@ export function InsightsTable() {
}
return (
-
+
{fields.map(({ name, label }) => {
return (
-
+
{row => formatValue(row[name], name)}
-
+
);
})}
-
- {row => row?.views?.toLocaleString()}
-
-
- {row => row?.visits?.toLocaleString()}
-
-
- {row => row?.visitors?.toLocaleString()}
-
-
- {row => {
+
+ {(row: any) => row?.views?.toLocaleString()}
+
+
+ {(row: any) => row?.visits?.toLocaleString()}
+
+
+ {(row: any) => row?.visitors?.toLocaleString()}
+
+
+ {(row: any) => {
const n = (Math.min(row?.visits, row?.bounces) / row?.visits) * 100;
return Math.round(+n) + '%';
}}
-
-
- {row => {
+
+
+ {(row: any) => {
const n = row?.totaltime / row?.visits;
return `${+n < 0 ? '-' : ''}${formatShortTime(Math.abs(~~n), ['m', 's'], ' ')}`;
}}
-
-
+
+
);
}
diff --git a/src/app/(main)/reports/journey/JourneyParameters.tsx b/src/app/(main)/reports/journey/JourneyParameters.tsx
index 3118265c..0ee197e9 100644
--- a/src/app/(main)/reports/journey/JourneyParameters.tsx
+++ b/src/app/(main)/reports/journey/JourneyParameters.tsx
@@ -1,15 +1,14 @@
import { useContext } from 'react';
import { useMessages } from '@/components/hooks';
import {
- Dropdown,
+ Select,
Form,
FormButtons,
- FormInput,
- FormRow,
- Item,
- SubmitButton,
+ FormField,
+ ListItem,
+ FormSubmitButton,
TextField,
-} from 'react-basics';
+} from '@umami/react-zen';
import { ReportContext } from '../[reportId]/Report';
import { BaseParameters } from '../[reportId]/BaseParameters';
@@ -33,28 +32,29 @@ export function JourneyParameters() {
return (
);
diff --git a/src/app/(main)/reports/journey/JourneyView.tsx b/src/app/(main)/reports/journey/JourneyView.tsx
index 3df54d18..f4d2c329 100644
--- a/src/app/(main)/reports/journey/JourneyView.tsx
+++ b/src/app/(main)/reports/journey/JourneyView.tsx
@@ -1,5 +1,5 @@
import { useContext, useMemo, useState } from 'react';
-import { TextOverflow, TooltipPopup } from 'react-basics';
+import { TextOverflow, TooltipPopup } from '@umami/react-zen';
import { firstBy } from 'thenby';
import classNames from 'classnames';
import { useEscapeKey, useMessages } from '@/components/hooks';
diff --git a/src/app/(main)/reports/retention/RetentionParameters.tsx b/src/app/(main)/reports/retention/RetentionParameters.tsx
index 42ae179b..0a534741 100644
--- a/src/app/(main)/reports/retention/RetentionParameters.tsx
+++ b/src/app/(main)/reports/retention/RetentionParameters.tsx
@@ -1,8 +1,7 @@
import { useContext } from 'react';
import { useMessages } from '@/components/hooks';
-import { Form, FormButtons, FormRow, SubmitButton } from 'react-basics';
+import { Form, FormButtons, FormSubmitButton } from '@umami/react-zen';
import { ReportContext } from '../[reportId]/Report';
-import { MonthSelect } from '@/components/input/MonthSelect';
import { BaseParameters } from '../[reportId]/BaseParameters';
import { parseDateRange } from '@/lib/date';
@@ -12,7 +11,6 @@ export function RetentionParameters() {
const { id, parameters } = report || {};
const { websiteId, dateRange } = parameters || {};
- const { startDate } = dateRange || {};
const queryDisabled = !websiteId || !dateRange;
const handleSubmit = (data: any, e: any) => {
@@ -31,13 +29,11 @@ export function RetentionParameters() {
return (
);
diff --git a/src/app/(main)/reports/revenue/RevenueParameters.tsx b/src/app/(main)/reports/revenue/RevenueParameters.tsx
index 8451644e..cf23b00e 100644
--- a/src/app/(main)/reports/revenue/RevenueParameters.tsx
+++ b/src/app/(main)/reports/revenue/RevenueParameters.tsx
@@ -1,7 +1,7 @@
import { useMessages } from '@/components/hooks';
import { useRevenueValues } from '@/components/hooks/queries/useRevenueValues';
import { useContext } from 'react';
-import { Dropdown, Form, FormButtons, FormInput, FormRow, Item, SubmitButton } from 'react-basics';
+import { Select, Form, FormButtons, FormField, ListItem, FormSubmitButton } from '@umami/react-zen';
import { BaseParameters } from '../[reportId]/BaseParameters';
import { ReportContext } from '../[reportId]/Report';
@@ -27,17 +27,20 @@ export function RevenueParameters() {
return (
);
diff --git a/src/app/(main)/reports/revenue/RevenueTable.tsx b/src/app/(main)/reports/revenue/RevenueTable.tsx
index 9e5ab216..52f2c4d0 100644
--- a/src/app/(main)/reports/revenue/RevenueTable.tsx
+++ b/src/app/(main)/reports/revenue/RevenueTable.tsx
@@ -1,7 +1,7 @@
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
import { useMessages } from '@/components/hooks';
import { useContext } from 'react';
-import { GridColumn, GridTable } from 'react-basics';
+import { GridColumn, GridTable } from '@umami/react-zen';
import { ReportContext } from '../[reportId]/Report';
import { formatLongCurrency } from '@/lib/format';
diff --git a/src/app/(main)/reports/utm/UTMParameters.tsx b/src/app/(main)/reports/utm/UTMParameters.tsx
index 2a43fc40..c666d636 100644
--- a/src/app/(main)/reports/utm/UTMParameters.tsx
+++ b/src/app/(main)/reports/utm/UTMParameters.tsx
@@ -1,6 +1,6 @@
import { useContext } from 'react';
import { useMessages } from '@/components/hooks';
-import { Form, FormButtons, SubmitButton } from 'react-basics';
+import { Form, FormButtons, SubmitButton } from '@umami/react-zen';
import { ReportContext } from '../[reportId]/Report';
import { BaseParameters } from '../[reportId]/BaseParameters';
diff --git a/src/app/(main)/settings/teams/TeamAddForm.tsx b/src/app/(main)/settings/teams/TeamAddForm.tsx
index c53db62a..e015fb58 100644
--- a/src/app/(main)/settings/teams/TeamAddForm.tsx
+++ b/src/app/(main)/settings/teams/TeamAddForm.tsx
@@ -3,11 +3,10 @@ import {
Button,
Form,
FormButtons,
- FormInput,
- FormRow,
- SubmitButton,
+ FormField,
+ FormSubmitButton,
TextField,
-} from 'react-basics';
+} from '@umami/react-zen';
export function TeamAddForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) {
const { formatMessage, labels } = useMessages();
@@ -27,16 +26,14 @@ export function TeamAddForm({ onSave, onClose }: { onSave: () => void; onClose:
return (