Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vebnor committed Jan 8, 2025
1 parent a10e6aa commit dbc17b4
Show file tree
Hide file tree
Showing 182 changed files with 227 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface OwnProps {

const ReduxFormStateCleaner = ({ behandlingId, behandlingVersjon }: OwnProps) => {
const dispatch = useDispatch();
const ref = useRef<number>();
const ref = useRef<number>(undefined);

useEffect(() => {
if (ref.current && ref.current !== behandlingVersjon) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';

interface OwnProps {
headerColumnContent: React.ReactElement[];
headerColumnContent: React.ReactElement<any>[];
}

const IngenArbeidsforholdRegistrert = ({ headerColumnContent }: OwnProps) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import { getBehandlingFormName } from '@fpsak-frontend/form';
const findAllNames = children =>
children
? React.Children.map(children, child => {
let all = [];
if (child && child.props && child.props.children) {
all = findAllNames(child.props.children);
}
if (child && child.props && child.props.name) {
all.push(child.props.name);
}
return all;
})
let all = [];
if (child && child.props && child.props.children) {
all = findAllNames(child.props.children);
}
if (child && child.props && child.props.name) {
all.push(child.props.name);
}
return all;
})
: [];

interface PureOwnProps {
formName: string;
behandlingId: number;
behandlingVersjon: number;
fieldNames: string[];
children: ReactNode | ReactElement;
children: ReactNode | ReactElement<any>;
}

interface MappedOwnProps {
Expand Down
2 changes: 2 additions & 0 deletions packages/fakta-bosted-soker/src/BostedSokerFaktaIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { KodeverkMedNavn } from '@k9-sak-web/types';
import BostedSokerView from './components/BostedSokerView';
import { BostedSokerPersonopplysninger } from './types';

import type { JSX } from 'react';

interface OwnProps {
personopplysninger: BostedSokerPersonopplysninger;
sokerTypeText?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Margin, DetailView, LabelledContent, LinkButton, AssessedBy } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import Beskrivelse from '../../../../types/Beskrivelse';
import Vurderingsperiode from '../../../../types/Vurderingsperiode';
import Vurderingsresultat from '../../../../types/Vurderingsresultat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PeriodpickerListRHF, RadioGroupPanelRHF, TextAreaRHF } from '@fpsak-fro
import { Period } from '@fpsak-frontend/utils';
import { Alert } from '@navikt/ds-react';
import { Box, DetailView, Form, LabelledContent, Margin } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { FormProvider, useForm, useWatch } from 'react-hook-form';
import Beskrivelse from '../../../../types/Beskrivelse';
import Vurderingsperiode from '../../../../types/Vurderingsperiode';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
OnePersonIconGray,
OnePersonOutlineGray,
} from '@navikt/ft-plattform-komponenter';
import { useState } from 'react';
import { useState, type JSX } from 'react';
import Beskrivelse from '../../../types/Beskrivelse';
import Kilde from '../../../types/Kilde';
import { prettifyDate } from '../../../util/formats';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isDayAfter, Period } from '@fpsak-frontend/utils';
import { Table } from '@navikt/ds-react';
import dayjs from 'dayjs';
import uniq from 'lodash/uniq';
import React from 'react';
import React, { type JSX } from 'react';
import EtablertTilsynType from '../../../types/EtablertTilsynType';
import EtablertTilsynRowContent from './EtablertTilsynRowContent';
import PartIkon from './PartIkon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PeriodpickerListRHF, RadioGroupPanelRHF, TextAreaRHF } from '@fpsak-fro
import { Period } from '@fpsak-frontend/utils';
import { Alert } from '@navikt/ds-react';
import { Box, DetailView, Form, LabelledContent, Margin } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { FormProvider, useForm, useWatch } from 'react-hook-form';
import Beskrivelse from '../../../../types/Beskrivelse';
import Vurderingsperiode from '../../../../types/Vurderingsperiode';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Heading, Label } from '@navikt/ds-react';
import { Box, InteractiveList, Margin } from '@navikt/ft-plattform-komponenter';
import React, { useEffect } from 'react';
import React, { useEffect, type JSX } from 'react';
import Vurderingsperiode from '../../../types/Vurderingsperiode';
import { usePrevious } from '../../../util/hooks';
import PeriodeSomSkalVurderes from '../periode-som-skal-vurderes/PeriodeSomSkalVurderes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Period } from '@fpsak-frontend/utils';
import React from 'react';
import React, { type JSX } from 'react';
import {
ContentWithTooltip,
GreenCheckIconFilled,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import ContainerContext from '../../context/ContainerContext';

interface WriteAccessBoundContentProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/fakta-etablert-tilsyn/src/util/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef } from 'react';

export const usePrevious = value => {
const ref = useRef();
const ref = useRef(undefined);
useEffect(() => {
ref.current = value;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Period, get } from '@fpsak-frontend/utils';
import { PageContainer } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';

Check failure on line 3 in packages/fakta-inntektsmelding/src/ui/InntektsmeldingContainer.tsx

View workflow job for this annotation

GitHub Actions / test / Kjør enhetstester

packages/fakta-inntektsmelding/test/Aksjonspunkt9069.spec.tsx

TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') ❯ node_modules/node_modules/react/cjs/react-jsx-runtime.development.js:328:51 ❯ require$$1 node_modules/node_modules/react/cjs/react-jsx-runtime.development.js:1332:1 ❯ node_modules/node_modules/react/jsx-runtime.js:6:20 ❯ packages/fakta-inntektsmelding/src/ui/InntektsmeldingContainer.tsx:3:31

Check failure on line 3 in packages/fakta-inntektsmelding/src/ui/InntektsmeldingContainer.tsx

View workflow job for this annotation

GitHub Actions / test / Kjør enhetstester

packages/fakta-inntektsmelding/test/Aksjonspunkt9071.spec.tsx

TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') ❯ node_modules/node_modules/react/cjs/react-jsx-runtime.development.js:328:51 ❯ require$$1 node_modules/node_modules/react/cjs/react-jsx-runtime.development.js:1332:1 ❯ node_modules/node_modules/react/jsx-runtime.js:6:20 ❯ packages/fakta-inntektsmelding/src/ui/InntektsmeldingContainer.tsx:3:31
import ContainerContext from '../context/ContainerContext';
import ContainerContract from '../types/ContainerContract';
import { Kompletthet as KompletthetData } from '../types/KompletthetData';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import { Arbeidsgiver } from '../../../types/KompletthetData';
import ContainerContext from '../../../context/ContainerContext';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Alert, Button, Box as DSBox, Heading } from '@navikt/ds-react';
import { Form, RadioGroupPanel, TextAreaField } from '@navikt/ft-form-hooks';
import { Box, Margin } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { UseFormReturn } from 'react-hook-form';
import ContainerContext from '../../../context/ContainerContext';
import Aksjonspunkt from '../../../types/Aksjonspunkt';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import ListItem from '../list-item/ListItem';

const firstColumnRenderer = () => <b>Arbeidsgiver</b>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import { Status } from '../../../types/KompletthetData';
import InntektsmeldingMottattItem from '../inntektsmelding-mottatt-item/InntektsmeldingMottattItem';
import InntektsmeldingAdvarsel from '../inntektsmelding-mangler-item/InntektsmeldingAdvarselItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WarningIcon } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { Status } from '../../../types/KompletthetData';
import ListItem from '../list-item/ListItem';
import styles from '../inntektsmelding-mottatt-item/inntektsmeldingMottattItem.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link } from '@navikt/ds-react';
import { GreenCheckIconFilled } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import ContainerContext from '../../../context/ContainerContext';
import { DokumentOpplysninger } from '../../../types/ContainerContract';
import { Status } from '../../../types/KompletthetData';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';

import { Accordion, Alert, BodyLong, Heading } from '@navikt/ds-react';
import { Box, Margin } from '@navikt/ft-plattform-komponenter';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Period } from '@fpsak-frontend/utils';
import { Button } from '@navikt/ds-react';
import { Box, Margin } from '@navikt/ft-plattform-komponenter';
import React, { useState } from 'react';
import React, { useState, type JSX } from 'react';
import { useForm } from 'react-hook-form';
import ContainerContext from '../../../context/ContainerContext';
import AksjonspunktRequestPayload from '../../../types/AksjonspunktRequestPayload';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import styles from './listItem.module.css';

interface ListItemProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Edit } from '@navikt/ds-icons';
import { Alert, Button } from '@navikt/ds-react';
import { AssessedBy, LabelledContent } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import ContainerContext from '../../../context/ContainerContext';
import { Kode, Tilstand } from '../../../types/KompletthetData';
import styles from './periodList.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Edit } from '@navikt/ds-icons';
import { Alert, Button } from '@navikt/ds-react';
import { AssessedBy, LabelledContent } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import ContainerContext from '../../../context/ContainerContext';
import { Kode, Tilstand } from '../../../types/KompletthetData';
import styles from './periodList.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import { Period } from '@fpsak-frontend/utils';
import { CalendarIcon } from '@navikt/ft-plattform-komponenter';
import { UseFormReturn } from 'react-hook-form';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import ContainerContext from '../../../context/ContainerContext';

interface WriteAccessBoundContentProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/fakta-institusjon/src/InstitusjonForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { required } from '@fpsak-frontend/utils';
import { InstitusjonVurderingMedPerioder, Vurderingsresultat } from '@k9-sak-web/types';
import { Button } from '@navikt/ds-react';
import { Formik } from 'formik';
import React from 'react';
import React, { type JSX } from 'react';

enum fieldname {
BEGRUNNELSE = 'BEGRUNNELSE',
Expand Down
2 changes: 1 addition & 1 deletion packages/fakta-institusjon/src/PeriodeRad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
WarningIcon,
} from '@navikt/ft-plattform-komponenter';
import { Period } from '@fpsak-frontend/utils';
import React from 'react';
import React, { type JSX } from 'react';
import styles from './periodeRad.module.css';

interface OwnProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import ContainerContract from '../types/ContainerContract';
import MedisinskVilkår from './components/medisinsk-vilkår/MedisinskVilkår';
import ContainerContext from './context/ContainerContext';

import type { JSX } from 'react';

interface MainComponentProps {
data: ContainerContract;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef, Ref } from 'react';
import React, { forwardRef, Ref, type JSX } from 'react';
import { PlusIcon } from '@navikt/ft-plattform-komponenter';
import styles from './addButton.module.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import * as React from 'react';
import FagsakYtelseType from '../../../constants/FagsakYtelseType';
import ContainerContext from '../../context/ContainerContext';

import type { JSX } from 'react';

const AksjonspunktFerdigStripe = (): JSX.Element => {
const { onFinished } = React.useContext(ContainerContext);
const [isSubmitting, setIsSubmitting] = React.useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Modal } from '@navikt/ds-react';
import React from 'react';
import React, { type JSX } from 'react';
import styles from './confirmationModal.module.css';

interface ConfirmationModalProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import { Alert } from '@navikt/ds-react';

const DekketAvInnleggelsesperiodeMelding = (): JSX.Element => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from 'react';
import { BucketIcon } from '@navikt/ft-plattform-komponenter';
import styles from './deleteButton.module.css';

import type { JSX } from 'react';

interface DeleteButtonProps {
onClick: () => void;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DetailView, DetailViewProps, LinkButton } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { Period } from '@fpsak-frontend/utils';
import PeriodList from '../period-list/PeriodList';
import styles from './detailViewVurdering.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Modal } from '@navikt/ds-react';
import { Box, Margin } from '@navikt/ft-plattform-komponenter';
import React, { useEffect } from 'react';
import React, { useEffect, type JSX } from 'react';
import type { DiagnosekodeSearcherPromise } from '../../../util/diagnosekodeSearcher';
import DiagnosekodeSelector from '../../form/pure/PureDiagnosekodeSelector';
import styles from '../diagnosekodeoversikt/diagnosekodeoversikt.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import Diagnosekode from '../../../types/Diagnosekode';
import WriteAccessBoundContent from '../write-access-bound-content/WriteAccessBoundContent';
import styles from './diagnosekodeliste.module.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Box, Margin, TitleWithUnderline } from '@navikt/ft-plattform-komponente

import { Alert, Loader } from '@navikt/ds-react';
import { useMutation, useQueries, useQuery } from '@tanstack/react-query';
import React from 'react';
import React, { type JSX } from 'react';
import LinkRel from '../../../constants/LinkRel';
import Diagnosekode from '../../../types/Diagnosekode';
import { DiagnosekodeResponse } from '../../../types/DiagnosekodeResponse';
Expand Down Expand Up @@ -36,7 +36,7 @@ interface DiagnosekodeoversiktProps {
const Diagnosekodeoversikt = ({ onDiagnosekoderUpdated }: DiagnosekodeoversiktProps): JSX.Element => {
const { endpoints, httpErrorHandler } = React.useContext(ContainerContext);
const [modalIsOpen, setModalIsOpen] = React.useState(false);
const addButtonRef = React.useRef<HTMLButtonElement>();
const addButtonRef = React.useRef<HTMLButtonElement>(undefined);

const hentDiagnosekoder = () =>
httpUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { FileIcon } from '@navikt/aksel-icons';
import { Button, Link } from '@navikt/ds-react';
import * as React from 'react';

import type { JSX } from 'react';

interface DokumentKnappProps {
href: string;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { prettifyDateString } from '@fpsak-frontend/utils';
import { DocumentIcon } from '@navikt/ft-plattform-komponenter';
import { Link } from '@navikt/ds-react';
import React from 'react';
import React, { type JSX } from 'react';
import LinkRel from '../../../constants/LinkRel';
import Dokument, { dokumentLabel } from '../../../types/Dokument';
import { findLinkByRel } from '../../../util/linkUtils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import styles from './dokumentasjonFooter.module.css';

interface DokumentasjonFooterProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type JSX } from 'react';
import LinkRel from '../../../constants/LinkRel';
import Dokument, { Dokumenttype } from '../../../types/Dokument';
import { findLinkByRel } from '../../../util/linkUtils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Collapse, Expand, FilterFilled } from '@navikt/ds-icons';
import { Button, Checkbox, Label } from '@navikt/ds-react';
import classNames from 'classnames';
import React, { useState } from 'react';
import React, { useState, type JSX } from 'react';
import OutsideClickHandler from 'react-outside-click-handler';
import { Dokumenttype, dokumentLabel } from '../../../types/Dokument';
import styles from './dokumentfilter.module.css';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Accordion, BodyShort } from '@navikt/ds-react';
import { InteractiveList } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import { Dokument, Dokumenttype } from '../../../types/Dokument';
import Dokumentfilter from '../dokumentfilter/Dokumentfilter';
import StrukturertDokumentElement from '../strukturet-dokument-element/StrukturertDokumentElement';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Alert, Button } from '@navikt/ds-react';
import { Box, Margin } from '@navikt/ft-plattform-komponenter';
import React from 'react';
import React, { type JSX } from 'react';
import FagsakYtelseType from '../../../constants/FagsakYtelseType';
import Dokumentoversikt from '../../../types/Dokumentoversikt';
import ContainerContext from '../../context/ContainerContext';
Expand Down
Loading

0 comments on commit dbc17b4

Please sign in to comment.