diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx index 22ac90d79..f60c90c3b 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CreateCard.tsx @@ -4,14 +4,14 @@ import {ArrowLeft, ArrowRight} from "lucide-react"; import CardBuilder from "Components/Dashboard/components/WidgetForm/CardBuilder"; import {useHistory} from "react-router"; import {useStore} from "App/mstore"; -import {CLICKMAP} from "App/constants/card"; +import { HEATMAP } from "App/constants/card"; import {renderClickmapThumbnail} from "Components/Dashboard/components/WidgetForm/renderMap"; import WidgetPreview from "Components/Dashboard/components/WidgetPreview/WidgetPreview"; const getTitleByType = (type: string) => { switch (type) { - case CLICKMAP: - return 'Clickmap'; + case HEATMAP: + return 'Heatmap'; default: return 'Trend Single'; } @@ -48,7 +48,7 @@ function CreateCard(props: Props) { } const createCard = async () => { - const isClickMap = metric.metricType === CLICKMAP; + const isClickMap = metric.metricType === HEATMAP; if (isClickMap) { try { metric.thumbnail = await renderClickmapThumbnail(); diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx index 2d1b9bea0..733982788 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx @@ -8,7 +8,7 @@ import BySystem from './Examples/SessionsBy/BySystem'; import ByCountry from './Examples/SessionsBy/ByCountry'; import ByUrl from './Examples/SessionsBy/ByUrl'; import { - CLICKMAP, + HEATMAP, ERRORS, FUNNEL, INSIGHTS, @@ -103,8 +103,8 @@ export const CARD_LIST: CardType[] = [ }, { title: 'Heatmaps', - key: CLICKMAP, - cardType: CLICKMAP, + key: HEATMAP, + cardType: HEATMAP, metricOf: 'sessionCount', category: CARD_CATEGORIES[0].key, example: HeatmapsExample diff --git a/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx b/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx index 4071f1f55..c5a18b18d 100644 --- a/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx +++ b/frontend/app/components/Dashboard/components/MetricListItem/MetricListItem.tsx @@ -25,6 +25,7 @@ function MetricTypeIcon({ type }: any) { setCard(t); }, [type]); + console.log(type, TYPES) return ( {card.title}}>
@@ -81,6 +82,7 @@ function MetricListItem(props: Props) { toast.error('Failed to rename card'); }} + console.log(metric) return ( <> setIsEdit(false)}> diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index 4be56311e..1a156615b 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -16,7 +16,7 @@ import {FilterKey} from 'Types/filter/filterType'; import { TIMESERIES, TABLE, - CLICKMAP, + HEATMAP, FUNNEL, ERRORS, PERFORMANCE, @@ -206,7 +206,7 @@ function WidgetChart(props: Props) { ); } } - if (metricType === CLICKMAP) { + if (metricType === HEATMAP) { if (!props.isPreview) { return (
diff --git a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx index e7cfea94f..7daf637b7 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx @@ -15,7 +15,7 @@ import {eventKeys} from 'App/types/filter/newFilter'; import {renderClickmapThumbnail} from './renderMap'; import FilterItem from 'Shared/Filters/FilterItem'; import { - TIMESERIES, TABLE, CLICKMAP, FUNNEL, ERRORS, RESOURCE_MONITORING, + TIMESERIES, TABLE, HEATMAP, FUNNEL, ERRORS, RESOURCE_MONITORING, PERFORMANCE, WEB_VITALS, INSIGHTS, USER_PATH, RETENTION } from 'App/constants/card'; import {useParams} from 'react-router-dom'; @@ -159,8 +159,8 @@ const PathAnalysisFilter = observer(({metric}: any) => ( const SeriesList = observer(() => { const {metricStore, dashboardStore, aiFiltersStore} = useStore(); const metric = metricStore.instance; - const excludeFilterKeys = [CLICKMAP, USER_PATH].includes(metric.metricType) ? eventKeys : []; - const hasSeries = ![TABLE, FUNNEL, CLICKMAP, INSIGHTS, USER_PATH, RETENTION].includes(metric.metricType); + const excludeFilterKeys = [HEATMAP, USER_PATH].includes(metric.metricType) ? eventKeys : []; + const hasSeries = ![TABLE, FUNNEL, HEATMAP, INSIGHTS, USER_PATH, RETENTION].includes(metric.metricType); const canAddSeries = metric.series.length < 3; return ( @@ -171,10 +171,10 @@ const SeriesList = observer(() => {
metric.updateKey('hasChanged', true)} - hideHeader={[TABLE, CLICKMAP, INSIGHTS, USER_PATH, FUNNEL].includes(metric.metricType)} + hideHeader={[TABLE, HEATMAP, INSIGHTS, USER_PATH, FUNNEL].includes(metric.metricType)} seriesIndex={index} series={series} onRemoveSeries={() => metric.removeSeries(index)} @@ -251,7 +251,7 @@ const CardBuilder = observer((props: CardBuilderProps) => { const onSave = useCallback(async () => { const wasCreating = !metric.exists(); - if (metric.metricType === CLICKMAP) { + if (metric.metricType === HEATMAP) { try { metric.thumbnail = await renderClickmapThumbnail(); } catch (e) { diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx index 7019f0826..cf664a120 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetForm.tsx @@ -13,7 +13,7 @@ import MetricSubtypeDropdown from './components/MetricSubtypeDropdown'; import { TIMESERIES, TABLE, - CLICKMAP, + HEATMAP, FUNNEL, ERRORS, RESOURCE_MONITORING, @@ -52,7 +52,7 @@ function WidgetForm(props: Props) { const timeseriesOptions = metricOf.filter((i) => i.type === 'timeseries'); const tableOptions = metricOf.filter((i) => i.type === 'table'); const isTable = metric.metricType === TABLE; - const isClickmap = metric.metricType === CLICKMAP; + const isClickmap = metric.metricType === HEATMAP; const isFunnel = metric.metricType === FUNNEL; const isInsights = metric.metricType === INSIGHTS; const isPathAnalysis = metric.metricType === USER_PATH; diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx index 8e317f8ba..d3482069a 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx @@ -3,7 +3,7 @@ import { Card, Space, Typography, Button, Alert } from 'antd'; import { useStore } from 'App/mstore'; import { eventKeys } from 'Types/filter/newFilter'; import { - CLICKMAP, + HEATMAP, ERRORS, FUNNEL, INSIGHTS, @@ -28,7 +28,7 @@ function WidgetFormNew() { const eventsLength = metric.series[0].filter.filters.filter((i: any) => i && i.isEvent).length; const filtersLength = metric.series[0].filter.filters.filter((i: any) => i && !i.isEvent).length; - const isClickMap = metric.metricType === CLICKMAP; + const isClickMap = metric.metricType === HEATMAP; const isPathAnalysis = metric.metricType === USER_PATH; const excludeFilterKeys = isClickMap || isPathAnalysis ? eventKeys : []; const hasFilters = filtersLength > 0 || eventsLength > 0; @@ -67,7 +67,7 @@ const FilterSection = observer(({ metric, excludeFilterKeys }: any) => { // const timeseriesOptions = metricOf.filter((i) => i.type === 'timeseries'); // const tableOptions = metricOf.filter((i) => i.type === 'table'); const isTable = metric.metricType === TABLE; - const isClickMap = metric.metricType === CLICKMAP; + const isClickMap = metric.metricType === HEATMAP; const isFunnel = metric.metricType === FUNNEL; const isInsights = metric.metricType === INSIGHTS; const isPathAnalysis = metric.metricType === USER_PATH; diff --git a/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx b/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx index 2420319a4..cb548f40a 100644 --- a/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx +++ b/frontend/app/components/Dashboard/components/WidgetPreview/WidgetPreview.tsx @@ -8,7 +8,7 @@ import {observer} from 'mobx-react-lite'; // import WidgetDateRange from '../WidgetDateRange/WidgetDateRange'; import ClickMapRagePicker from "Components/Dashboard/components/ClickMapRagePicker"; // import DashboardSelectionModal from '../DashboardSelectionModal/DashboardSelectionModal'; -import {CLICKMAP, TABLE, TIMESERIES, RETENTION, USER_PATH} from 'App/constants/card'; +import {HEATMAP, TABLE, TIMESERIES, RETENTION, USER_PATH} from 'App/constants/card'; import {Space, Switch} from 'antd'; // import AddToDashboardButton from "Components/Dashboard/components/AddToDashboardButton"; @@ -115,7 +115,7 @@ function WidgetPreview(props: Props) { {/*)}*/}
- {metric.metricType === CLICKMAP ? ( + {metric.metricType === HEATMAP ? ( ) : null} diff --git a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx index 9362df9ff..4a935f2a5 100644 --- a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx +++ b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx @@ -10,7 +10,7 @@ import { debounce } from 'App/utils'; import useIsMounted from 'App/hooks/useIsMounted'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; import { numberWithCommas } from 'App/utils'; -import { CLICKMAP } from 'App/constants/card'; +import { HEATMAP } from 'App/constants/card'; import { connect } from 'react-redux'; interface Props { @@ -67,7 +67,7 @@ function WidgetSessions(props: Props) { const depsString = JSON.stringify(widget.series); const loadData = () => { - if (widget.metricType === CLICKMAP && metricStore.clickMapSearch) { + if (widget.metricType === HEATMAP && metricStore.clickMapSearch) { const clickFilter = { value: [metricStore.clickMapSearch], type: 'CLICK', @@ -128,7 +128,7 @@ function WidgetSessions(props: Props) {
{hasFilters && } - {widget.metricType !== 'table' && widget.metricType !== CLICKMAP && ( + {widget.metricType !== 'table' && widget.metricType !== HEATMAP && (
Filter by Series