Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forberedelser til Umami #2151

Merged
merged 3 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 51 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@navikt/ds-css": "7.3.1",
"@navikt/ds-react": "7.3.1",
"@navikt/ds-tokens": "7.3.1",
"@navikt/nav-dekoratoren-moduler": "3.1.3",
"@navikt/nav-dekoratoren-moduler": "3.2.1",
"@navikt/nav-office-reception-info": "1.1.2",
"@reduxjs/toolkit": "2.3.0",
"csp-header": "5.2.1",
Expand All @@ -53,7 +53,7 @@
"jsep": "1.3.9",
"lodash.debounce": "4.0.8",
"lru-cache": "11.0.1",
"next": "14.2.15",
"next": "14.2.22",
"node-cache": "5.1.2",
"p-limit": "6.1.0",
"pino": "9.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import { Accordion as DSAccordion } from '@navikt/ds-react';
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { Shortcuts, useShortcuts } from 'utils/useShortcuts';
import { usePageContentProps } from 'store/pageContext';
import { getDecoratorParams } from 'utils/decorator-utils';
Expand Down Expand Up @@ -38,7 +38,7 @@ export const Accordion = ({ accordion }: AccordionProps) => {
} else {
setOpenAccordions(openAccordions.filter((i) => i !== index));
}
logAmplitudeEvent(isOpening ? AnalyticsEvents.ACC_EXPAND : AnalyticsEvents.ACC_COLLAPSE, {
logAnalyticsEvent(isOpening ? AnalyticsEvents.ACC_EXPAND : AnalyticsEvents.ACC_COLLAPSE, {
tittel,
opprinnelse: 'trekkspill',
komponent: 'Accordion',
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/card/useCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useLayoutConfig } from 'components/layouts/useLayoutConfig';
import { CardSize, CardType } from 'types/card';
import { Interaction } from 'types/interaction';
import { LinkProps } from 'types/link-props';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { usePublicUrl } from 'utils/usePublicUrl';
import { usePageContentProps } from 'store/pageContext';
import { getDecoratorParams } from 'utils/decorator-utils';
Expand Down Expand Up @@ -84,7 +84,7 @@ export const useCard = ({ link, size, type }: UseCardSettings): UseCardState =>
return;
}

logAmplitudeEvent(AnalyticsEvents.NAVIGATION, analyticsPayload);
logAnalyticsEvent(AnalyticsEvents.NAVIGATION, analyticsPayload);

const isOpeningInNewWindow = e.ctrlKey || e.metaKey;
if (isOpeningInNewWindow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Alert, BodyLong, BodyShort, Heading } from '@navikt/ds-react';
import { translator } from 'translations';
import { LenkeBase } from 'components/_common/lenke/lenkeBase/LenkeBase';
import { AnalyticsEvents } from 'utils/amplitude';
import { AnalyticsEvents } from 'utils/analytics';
import { useLayoutConfig } from 'components/layouts/useLayoutConfig';
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml';
import { OpeningInfo } from 'components/_common/contact-option/openingInfo/OpeningInfo';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { openChatbot } from '@navikt/nav-dekoratoren-moduler';
import { translator } from 'translations';
import { usePageContentProps } from 'store/pageContext';
import { LenkeBase } from 'components/_common/lenke/lenkeBase/LenkeBase';
import { AnalyticsEvents } from 'utils/amplitude';
import { AnalyticsEvents } from 'utils/analytics';
import { useLayoutConfig } from 'components/layouts/useLayoutConfig';
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml';
import TextWithIndicator from 'components/_common/textWithIndicator/TextWithIndicator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/_common/contact-option/DefaultOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { openChatbot } from '@navikt/nav-dekoratoren-moduler';
import { translator } from 'translations';
import { usePageContentProps } from 'store/pageContext';
import { LenkeBase } from 'components/_common/lenke/lenkeBase/LenkeBase';
import { AnalyticsEvents } from 'utils/amplitude';
import { AnalyticsEvents } from 'utils/analytics';
import { useLayoutConfig } from 'components/layouts/useLayoutConfig';
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml';
import Config from 'config';
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/copyLink/copyLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { LinkIcon } from '@navikt/aksel-icons';
import { translator } from 'translations';
import { classNames } from 'utils/classnames';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { usePageContentProps } from 'store/pageContext';
import { getDecoratorParams } from 'utils/decorator-utils';
import { innholdsTypeMap } from 'types/content-props/_content-common';
Expand Down Expand Up @@ -41,7 +41,7 @@ export const CopyLink = ({ anchor, heading, className, showLabel = true }: CopyL
setShowCopyTooltip(true);
setTimeout(() => setShowCopyTooltip(false), linkCopiedDisplayTimeMs);
}
logAmplitudeEvent(AnalyticsEvents.COPY_LINK, {
logAnalyticsEvent(AnalyticsEvents.COPY_LINK, {
målgruppe: context,
seksjon: layoutConfig.title,
innholdstype: innholdsTypeMap[type],
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/expandable/Expandable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import { ExpansionCard } from '@navikt/ds-react';
import { BarChartIcon, BriefcaseClockIcon, CalendarIcon, TasklistIcon } from '@navikt/aksel-icons';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { usePageContentProps } from 'store/pageContext';
import { getDecoratorParams } from 'utils/decorator-utils';
import { innholdsTypeMap } from 'types/content-props/_content-common';
Expand Down Expand Up @@ -49,7 +49,7 @@ export const Expandable = ({
setIsOpen(isOpening);
handleStickyScrollOffset(isOpening, accordionRef.current);

logAmplitudeEvent(isOpening ? AnalyticsEvents.ACC_EXPAND : AnalyticsEvents.ACC_COLLAPSE, {
logAnalyticsEvent(isOpening ? AnalyticsEvents.ACC_EXPAND : AnalyticsEvents.ACC_COLLAPSE, {
tittel,
opprinnelse: analyticsOriginTag || 'utvidbar tekst',
komponent: 'Expandable',
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/filter-bar/FilterBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from 'react';
import { Heading } from '@navikt/ds-react';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { translator } from 'translations';
import { useFilterState } from 'store/hooks/useFilteredContent';
import { usePageContentProps } from 'store/pageContext';
Expand Down Expand Up @@ -85,7 +85,7 @@ export const FilterBar = ({ layoutProps }: Props) => {
key={filter.id}
isSelected={isSelected}
onToggleFilterHandler={() => {
logAmplitudeEvent(AnalyticsEvents.FILTER, {
logAnalyticsEvent(AnalyticsEvents.FILTER, {
kategori: filter.categoryName,
filternavn: filter.filterName,
opprinnelse: 'innholdtekst',
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/lenke/lenkeBase/LenkeBase.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Fragment } from 'react';
import Link from 'next/link';
import { adminOrigin, isNofollowUrl, xpDraftPathPrefix } from 'utils/urls';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { onlyText } from 'utils/react-children';
import { useLayoutConfig } from 'components/layouts/useLayoutConfig';
import { usePublicUrl } from 'utils/usePublicUrl';
Expand Down Expand Up @@ -80,7 +80,7 @@ export const LenkeBase = ({
{...rest}
href={url}
onClick={(e) => {
logAmplitudeEvent(analyticsEvent || AnalyticsEvents.NAVIGATION, analyticsData);
logAnalyticsEvent(analyticsEvent || AnalyticsEvents.NAVIGATION, analyticsData);
onClick?.(e);
}}
shallow={shallow}
Expand Down
4 changes: 2 additions & 2 deletions src/components/_common/overview-filters/OverviewFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { OverviewTextFilter } from 'components/_common/overview-filters/text-fil
import { OverviewFilterableItem, useOverviewFilters } from 'store/hooks/useOverviewFilters';
import { classNames } from 'utils/classnames';
import { translator } from 'translations';
import { AnalyticsEvents, logAmplitudeEvent } from 'utils/amplitude';
import { AnalyticsEvents, logAnalyticsEvent } from 'utils/analytics';
import { usePageContentProps } from 'store/pageContext';
import { getDecoratorParams } from 'utils/decorator-utils';
import { innholdsTypeMap } from 'types/content-props/_content-common';
Expand Down Expand Up @@ -49,7 +49,7 @@ const MobileView = ({
onClick={(e) => {
e.preventDefault();
setIsOpen(!isOpen);
logAmplitudeEvent(AnalyticsEvents.FILTER, {
logAnalyticsEvent(AnalyticsEvents.FILTER, {
kategori: 'mobile-toggle',
opprinnelse: 'oversiktsside filter mobil',
komponent: 'MobileView',
Expand Down
Loading
Loading