diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 254028531..a6f241fb2 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -10,7 +10,6 @@ "@fortawesome/free-regular-svg-icons": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", - "@microlink/react-json-view": "^1.22.2", "@navikt/aksel-icons": "^5.6.0", "@navikt/ds-css": "^5.6.0", "@navikt/ds-react": "^5.6.0", @@ -26,6 +25,7 @@ "formik": "^2.4.5", "graphql": "^16.8.1", "history": "5.3.0", + "json-diff-kit": "^1.0.18", "lodash": "^4.17.21", "markdown-draft-js": "^2.4.0", "moment": "^2.29.4", @@ -34,9 +34,9 @@ "react": "^18.2.0", "react-app-polyfill": "^3.0.0", "react-beautiful-dnd": "^13.1.1", - "react-diff-viewer-continued": "^3.2.6", "react-dom": "^18.2.0", "react-draft-wysiwyg": "^1.15.0", + "react-json-view-lite": "^1.1.0", "react-markdown": "^9.0.0", "react-markdown-editor-lite": "^1.3.4", "react-player": "^2.13.0", diff --git a/apps/frontend/src/components/admin/audit/AuditRecentTable.tsx b/apps/frontend/src/components/admin/audit/AuditRecentTable.tsx index 46dac1d75..13ed63313 100644 --- a/apps/frontend/src/components/admin/audit/AuditRecentTable.tsx +++ b/apps/frontend/src/components/admin/audit/AuditRecentTable.tsx @@ -19,7 +19,7 @@ import {getAudits} from '../../../api/AuditApi' import {Cell, Row, Table} from '../../common/Table' import * as _ from 'lodash' import {theme} from '../../../util' -import ReactJson from '@microlink/react-json-view' +import { JsonView} from 'react-json-view-lite' import {ObjectLink} from '../../common/RouteLink' import {CustomizedStatefulSelect} from '../../common/CustomizedSelect' import {buttonContentStyle} from '../../common/Button' @@ -137,7 +137,7 @@ export const AuditRecentTable = (props: { show: boolean; tableType?: ObjectType accessibilityType="tooltip" overrides={{ Body: { style: { width: '80%' } } }} placement={PLACEMENT.leftBottom} - content={} + content={} > {newestAudit?.action !== AuditAction.DELETE && ( intl.view} placement={PLACEMENT.top}> @@ -104,13 +99,11 @@ export const AuditView = (props: AuditViewProps) => { placement={PLACEMENT.left} content={() => ( - )} @@ -132,12 +125,14 @@ export const AuditView = (props: AuditViewProps) => { - p.name === null && !open[index]} - onSelect={(sel) => { - ; (sel.name === 'id' || sel.name?.endsWith('Id')) && viewId(sel.value as string) + { + if(openAll) { + return true + } else { + return index === 0 ? true : false + } }} /> @@ -147,4 +142,4 @@ export const AuditView = (props: AuditViewProps) => { )} ) -} \ No newline at end of file +} diff --git a/apps/frontend/src/main.css b/apps/frontend/src/main.css index 687f87ad0..bc33b7be2 100644 --- a/apps/frontend/src/main.css +++ b/apps/frontend/src/main.css @@ -1,4 +1,6 @@ @import "tailwindcss/base"; @import "@navikt/ds-css"; @import "tailwindcss/components"; -@import "tailwindcss/utilities"; \ No newline at end of file +@import "tailwindcss/utilities"; +@import "react-json-view-lite/dist/index.css"; +@import "json-diff-kit/dist/viewer.css";