Skip to content
Snippets Groups Projects
Commit aabd95c6 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Upgrade to newest version of all packages and followup maintenance.

Now requires NodeJS 22.13.0 or higher
parent 9c1e4165
Branches
Tags
No related merge requests found
Showing
with 4937 additions and 8851 deletions
......@@ -11,6 +11,6 @@
"regenerator": true
}
],
"@babel/plugin-proposal-class-properties"
"@babel/plugin-transform-class-properties"
]
}
......@@ -2,6 +2,8 @@
## development environment
# Requires Node.js v22.13.0 LTS or later
From this folder, run:
```bash
......
This diff is collapsed.
......@@ -2,36 +2,36 @@
"name": "compendium-v2",
"version": "1.0.0",
"devDependencies": {
"@babel/core": "~7.24",
"@babel/plugin-proposal-class-properties": "~7.18",
"@babel/plugin-transform-runtime": "~7.24",
"@babel/preset-env": "~7.24.7",
"@babel/preset-react": "~7.24",
"@babel/preset-typescript": "~7.24",
"@babel/runtime": "~7.24",
"@types/react": "~18.3",
"@types/react-dom": "~18.3",
"@babel/core": "~7.26.0",
"@babel/plugin-transform-class-properties": "~7.25.9",
"@babel/plugin-transform-runtime": "~7.25.9",
"@babel/preset-env": "~7.26.0",
"@babel/preset-react": "~7.26.3",
"@babel/preset-typescript": "~7.26.0",
"@babel/runtime": "~7.26.0",
"@types/react": "~19.0.7",
"@types/react-dom": "~19.0.3",
"@types/react-router-dom": "~5.3.3",
"@types/webpack": "~5.28",
"@typescript-eslint/eslint-plugin": "~6.21",
"@typescript-eslint/parser": "~6.21",
"babel-loader": "~9.1.3",
"css-loader": "~6.11.0",
"date-fns": "~3.6.0",
"eslint": "^8.57.0",
"eslint-plugin-react": "~7.34.3",
"eslint-plugin-react-hooks": "~4.6.2",
"@types/webpack": "~5.28.5",
"@typescript-eslint/eslint-plugin": "~8.21.0",
"@typescript-eslint/parser": "~8.21.0",
"babel-loader": "~9.2.1",
"css-loader": "~7.1.2",
"date-fns": "~4.1.0",
"eslint": "~9.18.0",
"eslint-plugin-react": "~7.37.4",
"eslint-plugin-react-hooks": "~5.1.0",
"fork-ts-checker-webpack-plugin": "~9.0.2",
"mini-css-extract-plugin": "~2.9.0",
"sass": "~1.77.6",
"sass-loader": "~13.3.3",
"style-loader": "~3.3.4",
"mini-css-extract-plugin": "~2.9.2",
"sass": "~1.83.4",
"sass-loader": "~16.0.4",
"style-loader": "~4.0.0",
"ts-node": "~10.9.2",
"typescript": "~5.5.3",
"typescript": "~5.7.3",
"url-loader": "~4.1.1",
"webpack": "~5.92.1",
"webpack-cli": "~5.1.4",
"webpack-dev-server": "~4.15.2"
"webpack": "~5.97.1",
"webpack-cli": "~6.0.1",
"webpack-dev-server": "~5.2.0"
},
"scripts": {
"start": "webpack serve --mode development --open --port 4000",
......@@ -40,17 +40,17 @@
"dependencies": {
"bootstrap": "~5.3.3",
"cartesian-product-multiple-arrays": "~1.0.9",
"chart.js": "~4.4.3",
"chart.js": "~4.4.7",
"chartjs-plugin-datalabels": "~2.2.0",
"html-to-image": "~1.11.11",
"react": "~18.3.1",
"react-bootstrap": "~2.10.4",
"react-chartjs-2": "~5.2.0",
"react-dom": "~18.3.1",
"react-hot-toast": "~2.4.1",
"react-icons": "~5.2.1",
"react-router-dom": "~6.24.1",
"survey-react-ui": "~1.11.5",
"react": "~19.0.0",
"react-bootstrap": "~2.10.8",
"react-chartjs-2": "~5.3.0",
"react-dom": "~19.0.0",
"react-hot-toast": "~2.5.1",
"react-icons": "~5.4.0",
"react-router-dom": "~7.1.3",
"survey-react-ui": "~1.12.19",
"xlsx": "~0.18.5",
"lodash": "~4.17.21"
},
......@@ -60,6 +60,6 @@
"license": "ISC",
"repository": {
"type": "git",
"url": "https://gitlab.geant.org/geant-swd/compendium-v2.git"
"url": "https://gitlab.software.geant.org/geant-swd/compendium-v2.git"
}
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ interface inputProps {
function LinkWithHighlight({ to, children }: inputProps): ReactElement {
const currentPageIsTo = window.location.pathname === to;
const ref = useRef() as React.MutableRefObject<HTMLAnchorElement>;
const ref = useRef<HTMLAnchorElement>(null);
if (currentPageIsTo && ref.current) {
// scroll the link into view in the sidebar
......
@import 'scss/fonts';
@import 'scss/base/text';
@import 'scss/layout/components';
@use 'scss/fonts';
@use 'scss/base/text';
@use 'scss/layout/components';
@use "scss/abstracts/variables";
.nav-link-entry {
border-radius: 2px;
......@@ -140,7 +141,7 @@
.imageoption {
padding: 0.5rem;
cursor: pointer;
color: $dark-teal;
color: variables.$dark-teal;
font-weight: bold;
}
......
import React, { createContext, useRef, ReactNode, RefObject } from 'react';
const ChartContainerContext = createContext<RefObject<HTMLDivElement> | null>(null);
const ChartContainerContext = createContext<RefObject<HTMLDivElement | null> | null>(null);
interface ChartContainerProviderProps {
children: ReactNode;
......
@import '../abstracts/variables';
@use '../abstracts/variables';
.regular-17pt {
font-family: "Open Sans", sans-serif;
......@@ -41,12 +41,12 @@
}
.dark-teal {
color: $dark-teal
color: variables.$dark-teal
}
.geant-header {
@extend .bold-caps-20pt;
color: $dark-teal;
color: variables.$dark-teal;
}
.bold-grey-12pt {
......
@use "../abstracts/variables";
.btn-login {
--bs-btn-color: #fff;
--bs-btn-border-color: #6c757d;
......@@ -6,13 +8,13 @@
// active
--bs-btn-active-color: #fff;
// see https://stackoverflow.com/a/76213205 for why this syntax is necessary
--bs-btn-active-bg: #{$yellow-orange};
--bs-btn-active-border-color: #{$yellow-orange};
--bs-btn-active-bg: #{variables.$yellow-orange};
--bs-btn-active-border-color: #{variables.$yellow-orange};
// hover
--bs-btn-hover-color: rgb(0, 63, 95);
--bs-btn-hover-bg: #{$yellow-orange};
--bs-btn-hover-border-color: #{$yellow-orange};
--bs-btn-hover-bg: #{variables.$yellow-orange};
--bs-btn-hover-border-color: #{variables.$yellow-orange};
// disabled
......@@ -20,5 +22,5 @@
--bs-btn-disabled-bg: transparent;
// --bs-btn-disabled-border-color: #6c757d;
border: 2px solid $yellow-orange;
border: 2px solid variables.$yellow-orange;
}
\ No newline at end of file
@import '../abstracts/variables';
@use '../abstracts/variables';
.btn-nav-box {
--bs-btn-color: rgb(0, 63, 95);
......@@ -8,13 +8,13 @@
// active
--bs-btn-active-color: #fff;
// see https://stackoverflow.com/a/76213205 for why this syntax is necessary
--bs-btn-active-bg: #{$yellow-orange};
--bs-btn-active-border-color: #{$yellow-orange};
--bs-btn-active-bg: #{variables.$yellow-orange};
--bs-btn-active-border-color: #{variables.$yellow-orange};
// hover
--bs-btn-hover-color: rgb(0, 63, 95);
--bs-btn-hover-bg: #{$yellow-orange};
--bs-btn-hover-border-color: #{$yellow-orange};
--bs-btn-hover-bg: #{variables.$yellow-orange};
--bs-btn-hover-border-color: #{variables.$yellow-orange};
// disabled
......@@ -22,5 +22,5 @@
--bs-btn-disabled-bg: transparent;
// --bs-btn-disabled-border-color: #6c757d;
border: 2px solid $yellow-orange;
border: 2px solid variables.$yellow-orange;
}
\ No newline at end of file
@use "../abstracts/variables";
@use "../base/text";
#sidebar {
overflow-y: scroll;
overflow-x:hidden;
......@@ -26,7 +29,7 @@
margin-left: 0;
background-color: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
border: $yellow-orange 2px solid;
border: variables.$yellow-orange 2px solid;
pointer-events: auto;
width: 28rem;
......@@ -37,16 +40,16 @@
}
a:hover {
color: $yellow-orange;
color: variables.$yellow-orange;
text-decoration: none;
}
}
.sidebar-wrapper>nav.survey {
border: $dark-teal 2px solid;
border: variables.$dark-teal 2px solid;
a:hover {
color: $teal-blue;
color: variables.$teal-blue;
}
}
......@@ -58,7 +61,7 @@ nav.no-sidebar {
.toggle-btn {
@extend .bold-caps-16pt;
background-color: $yellow-orange;
background-color: variables.$yellow-orange;
color: white;
height: 3.5rem;
cursor: pointer;
......@@ -73,7 +76,7 @@ nav.no-sidebar {
.toggle-btn-survey {
@extend .toggle-btn;
background-color: $dark-teal;
background-color: variables.$dark-teal;
}
.toggle-btn-wrapper {
......
@use "sass:list";
@import '../abstracts/variables';
@import '../layout/Sidebar';
@import '../layout/SectionNavigation';
@import '../layout/Login';
@use '../abstracts/variables';
@use '../layout/Sidebar';
@use '../layout/SectionNavigation';
@use '../layout/Login';
$year-colors-muted: (
rgba(206, 61, 91, var(--muted-alpha)),
......@@ -41,7 +41,7 @@ $year-colors: (
.rounded-border {
border-radius: 25px;
border: 1px solid $light-ash-grey
border: 1px solid variables.$light-ash-grey
}
.card {
......@@ -57,7 +57,7 @@ $year-colors: (
.grey-container {
@extend .grow;
max-width: 100vw;
background-color: $light-off-white;
background-color: variables.$light-off-white;
}
.wordwrap {
......@@ -81,21 +81,21 @@ $year-colors: (
}
.compendium-data-header {
background-color: $yellow;
background-color: variables.$yellow;
color: white;
padding: 10px;
}
.compendium-data-banner {
background-color: $light-beige;
color: $dark-teal;
background-color: variables.$light-beige;
color: variables.$dark-teal;
padding: 5px;
padding-top: 25px;
}
.collapsible-box {
margin: 1rem;
border: 2px solid $yellow-orange;
border: 2px solid variables.$yellow-orange;
padding: 10px;
width: 80rem;
max-width: 97%;
......@@ -368,7 +368,7 @@ $service-check-colors: (
}
thead th {
color: $dark-teal;
color: variables.$dark-teal;
background-color: white;
padding: 12px;
font-weight: bold;
......
@import '../main.scss';
@use '../main.scss';
.sv-multipletext__cell {
padding: .5rem;
......
......@@ -66,12 +66,24 @@ const config: Configuration = {
port: 4000,
// Allow SPA urls to work with dev-server
historyApiFallback: true,
proxy: {
"/api": "http://127.0.0.1:5000",
"/login": "http://127.0.0.1:5000",
"/logout": "http://127.0.0.1:5000",
"/authorize": "http://127.0.0.1:5000",
},
proxy: [
{
path: "/api",
target: "http://127.0.0.1:5000"
},
{
path: "/login",
target: "http://127.0.0.1:5000"
},
{
path: "/logout",
target: "http://127.0.0.1:5000"
},
{
path: "/authorize",
target: "http://127.0.0.1:5000"
},
]
},
devtool: isProduction ? undefined : "inline-source-map",
plugins: [
......
......@@ -8,8 +8,6 @@ Create Date: 2024-12-17 16:44:51.834601
"""
from alembic import op
import sqlalchemy as sa
from collections import defaultdict
from compendium_v2.publishers.helpers import merge_string
# revision identifiers, used by Alembic.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment