feat: report editor

commit bfcf271a64c33a60f61f511cec2198d9c8a9c51a
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Wed Nov 26 12:32:40 2025 +0100

    wip

commit 8cd3b89fa3
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Tue Nov 25 22:33:58 2025 +0100

    funnel

commit 95af86dc44
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Tue Nov 25 22:23:25 2025 +0100

    wip

commit 727a218e6b
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Tue Nov 25 10:18:26 2025 +0100

    conversion wip

commit 958ba535d6
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Tue Nov 25 10:18:20 2025 +0100

    wip

commit 3bbeb927cc
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Tue Nov 25 09:18:48 2025 +0100

    wip

commit d99335e2f4
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Mon Nov 24 18:08:10 2025 +0100

    wip

commit 1fa61b1ae9
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Mon Nov 24 15:50:28 2025 +0100

    ts

commit 548747d826
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Mon Nov 24 13:17:01 2025 +0100

    fix typecheck events -> series

commit 7b18544085
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Mon Nov 24 13:06:46 2025 +0100

    fix report table

commit 57697a5a39
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Sat Nov 22 00:05:13 2025 +0100

    wip

commit 06fb6c4f3c
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Fri Nov 21 11:21:17 2025 +0100

    wip

commit dd71fd4e11
Author: Carl-Gerhard Lindesvärd <lindesvard@gmail.com>
Date:   Thu Nov 20 13:56:58 2025 +0100

    formulas
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-26 12:33:41 +01:00
parent 828c8c4f91
commit b421474616
70 changed files with 6867 additions and 1918 deletions

View File

@@ -153,7 +153,7 @@ export function OverviewMetricCard({
width={width}
height={height / 4}
data={data}
style={{ marginTop: (height / 4) * 3 }}
style={{ marginTop: (height / 4) * 3, background: 'transparent' }}
onMouseMove={(event) => {
setCurrentIndex(event.activeTooltipIndex ?? null);
}}

View File

@@ -45,8 +45,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -81,8 +82,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -120,8 +122,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -160,8 +163,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -199,8 +203,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -239,8 +244,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',
@@ -278,8 +284,9 @@ export default function OverviewTopDevices({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'user',
filters,
id: 'A',

View File

@@ -7,6 +7,7 @@ import type { IChartType } from '@openpanel/validation';
import { useTRPC } from '@/integrations/trpc/react';
import { useQuery } from '@tanstack/react-query';
import { SerieIcon } from '../report-chart/common/serie-icon';
import { Widget, WidgetBody } from '../widget';
import { OverviewChartToggle } from './overview-chart-toggle';
import { WidgetButtons, WidgetFooter, WidgetHead } from './overview-widget';
@@ -37,8 +38,9 @@ export default function OverviewTopEvents({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'event',
filters: [
...filters,
@@ -78,8 +80,9 @@ export default function OverviewTopEvents({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'event',
filters: [...filters],
id: 'A',
@@ -112,8 +115,9 @@ export default function OverviewTopEvents({
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'event',
filters: [
...filters,
@@ -168,7 +172,13 @@ export default function OverviewTopEvents({
</WidgetHead>
<WidgetBody className="p-3">
<ReportChart
options={{ hideID: true, columns: ['Event', 'Count'] }}
options={{
hideID: true,
columns: ['Event'],
renderSerieName(names) {
return names[1];
},
}}
report={{
...widget.chart.report,
previous: false,

View File

@@ -7,6 +7,7 @@ import type { IChartType } from '@openpanel/validation';
import { useNumber } from '@/hooks/use-numer-formatter';
import { useTRPC } from '@/integrations/trpc/react';
import { pushModal } from '@/modals';
import { countries } from '@/translations/countries';
import { NOT_SET_VALUE } from '@openpanel/constants';
import { useQuery } from '@tanstack/react-query';
import { ChevronRightIcon } from 'lucide-react';
@@ -108,13 +109,19 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
>
{item.prefix && (
<span className="mr-1 row inline-flex items-center gap-1">
<span>{item.prefix}</span>
<span>
{countries[
item.prefix as keyof typeof countries
] ?? item.prefix}
</span>
<span>
<ChevronRightIcon className="size-3" />
</span>
</span>
)}
{item.name || 'Not set'}
{(countries[item.name as keyof typeof countries] ??
item.name) ||
'Not set'}
</button>
</div>
);
@@ -146,8 +153,9 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
projectId,
startDate,
endDate,
events: [
series: [
{
type: 'event',
segment: 'event',
filters,
id: 'A',