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

@@ -9,7 +9,7 @@ import {
useEventQueryNamesFilter,
} from '@/hooks/use-event-query-filters';
import type { IChartEvent } from '@openpanel/validation';
import type { IChartEventItem } from '@openpanel/validation';
import { createFileRoute } from '@tanstack/react-router';
@@ -23,13 +23,14 @@ function Component() {
const { projectId } = Route.useParams();
const [filters] = useEventQueryFilters();
const [events] = useEventQueryNamesFilter();
const fallback: IChartEvent[] = [
const fallback: IChartEventItem[] = [
{
id: 'A',
name: '*',
displayName: 'All events',
segment: 'event',
filters: filters ?? [],
type: 'event',
},
];
@@ -49,7 +50,7 @@ function Component() {
projectId={projectId}
range="30d"
chartType="histogram"
events={
series={
events && events.length > 0
? events.map((name) => ({
id: name,
@@ -57,6 +58,7 @@ function Component() {
displayName: name,
segment: 'event',
filters: filters ?? [],
type: 'event',
}))
: fallback
}
@@ -69,6 +71,11 @@ function Component() {
</WidgetHead>
<WidgetBody>
<ReportChartShortcut
options={{
renderSerieName(names) {
return names[1];
},
}}
projectId={projectId}
range="30d"
chartType="pie"
@@ -78,7 +85,7 @@ function Component() {
name: 'name',
},
]}
events={
series={
events && events.length > 0
? events.map((name) => ({
id: name,
@@ -86,6 +93,7 @@ function Component() {
displayName: name,
segment: 'event',
filters: filters ?? [],
type: 'event',
}))
: [
{
@@ -94,6 +102,7 @@ function Component() {
displayName: 'All events',
segment: 'event',
filters: filters ?? [],
type: 'event',
},
]
}
@@ -106,6 +115,11 @@ function Component() {
</WidgetHead>
<WidgetBody>
<ReportChartShortcut
options={{
renderSerieName(names) {
return names[1];
},
}}
projectId={projectId}
range="30d"
chartType="bar"
@@ -115,7 +129,7 @@ function Component() {
name: 'name',
},
]}
events={
series={
events && events.length > 0
? events.map((name) => ({
id: name,
@@ -123,6 +137,7 @@ function Component() {
displayName: name,
segment: 'event',
filters: filters ?? [],
type: 'event',
}))
: [
{
@@ -131,6 +146,7 @@ function Component() {
displayName: 'All events',
segment: 'event',
filters: filters ?? [],
type: 'event',
},
]
}
@@ -143,6 +159,11 @@ function Component() {
</WidgetHead>
<WidgetBody>
<ReportChartShortcut
options={{
renderSerieName(names) {
return names[1];
},
}}
projectId={projectId}
range="30d"
chartType="linear"
@@ -152,7 +173,7 @@ function Component() {
name: 'name',
},
]}
events={
series={
events && events.length > 0
? events.map((name) => ({
id: name,
@@ -160,6 +181,7 @@ function Component() {
displayName: name,
segment: 'event',
filters: filters ?? [],
type: 'event',
}))
: [
{
@@ -168,6 +190,7 @@ function Component() {
displayName: 'All events',
segment: 'event',
filters: filters ?? [],
type: 'event',
},
]
}

View File

@@ -24,20 +24,18 @@ import { createFileRoute } from '@tanstack/react-router';
import { parseAsInteger, useQueryState } from 'nuqs';
import { memo } from 'react';
export const Route = createFileRoute('/_app/$organizationId/$projectId/pages')(
{
component: Component,
head: () => {
return {
meta: [
{
title: createProjectTitle(PAGE_TITLES.PAGES),
},
],
};
},
export const Route = createFileRoute('/_app/$organizationId/$projectId/pages')({
component: Component,
head: () => {
return {
meta: [
{
title: createProjectTitle(PAGE_TITLES.PAGES),
},
],
};
},
);
});
function Component() {
const { projectId } = Route.useParams();
@@ -220,8 +218,9 @@ const PageCard = memo(
chartType: 'linear',
projectId,
events: [
series: [
{
type: 'event',
id: 'A',
name: 'screen_view',
segment: 'event',