Skip to content

Commit

Permalink
build(ui): fix issue with build result not working
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Sep 30, 2024
1 parent 426a97a commit bcfda8b
Show file tree
Hide file tree
Showing 13 changed files with 3,072 additions and 3,663 deletions.
6,491 changes: 2,978 additions & 3,513 deletions webapp/package-lock.json

Large diffs are not rendered by default.

144 changes: 70 additions & 74 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,125 +14,121 @@
"test:ui": "vitest --ui"
},
"dependencies": {
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@glideapps/glide-data-grid": "6.0.3",
"@handsontable/react": "14.1.0",
"@mui/icons-material": "5.16.1",
"@mui/lab": "5.0.0-alpha.172",
"@mui/material": "5.16.1",
"@mui/x-tree-view": "7.10.0",
"@handsontable/react": "14.5.0",
"@mui/icons-material": "6.1.1",
"@mui/lab": "6.0.0-beta.10",
"@mui/material": "6.1.1",
"@mui/x-tree-view": "7.18.0",
"@reduxjs/toolkit": "1.9.6",
"axios": "1.5.1",
"clsx": "2.0.0",
"axios": "1.7.7",
"clsx": "2.1.1",
"d3": "5.16.0",
"debug": "4.3.4",
"debug": "4.3.7",
"draft-convert": "2.1.13",
"draft-js": "0.11.7",
"draftjs-to-html": "0.9.1",
"handsontable": "14.1.0",
"handsontable": "14.5.0",
"hoist-non-react-statics": "3.3.2",
"i18next": "23.5.1",
"i18next-browser-languagedetector": "7.1.0",
"i18next-http-backend": "2.4.2",
"immer": "10.0.3",
"i18next": "23.15.1",
"i18next-browser-languagedetector": "8.0.0",
"i18next-http-backend": "2.6.1",
"immer": "10.1.1",
"js-cookie": "3.0.5",
"jsoneditor": "9.10.4",
"jwt-decode": "3.1.2",
"jsoneditor": "10.1.0",
"jwt-decode": "4.0.0",
"lodash": "4.17.21",
"material-react-table": "2.0.5",
"moment": "2.29.4",
"material-react-table": "3.0.1",
"moment": "2.30.1",
"notistack": "3.0.1",
"plotly.js": "2.26.1",
"ramda": "0.29.0",
"ramda-adjunct": "4.1.1",
"react": "18.2.0",
"plotly.js": "2.35.2",
"ramda": "0.30.1",
"ramda-adjunct": "5.1.0",
"react": "18.3.1",
"react-beautiful-dnd": "13.1.1",
"react-color": "2.19.3",
"react-d3-graph": "2.6.0",
"react-dom": "18.2.0",
"react-dom": "18.3.1",
"react-dropzone": "14.2.3",
"react-hook-form": "7.47.0",
"react-i18next": "13.2.2",
"react-hook-form": "7.53.0",
"react-i18next": "15.0.2",
"react-json-view": "1.21.3",
"react-plotly.js": "2.6.0",
"react-redux": "8.1.3",
"react-router": "6.3.0",
"react-router-dom": "6.3.0",
"react-split": "2.0.14",
"react-syntax-highlighter": "15.5.0",
"react-use": "17.4.0",
"react-virtualized-auto-sizer": "1.0.20",
"react-window": "1.8.9",
"react-use": "17.5.1",
"react-virtualized-auto-sizer": "1.0.24",
"react-window": "1.8.10",
"redux": "4.2.1",
"redux-thunk": "2.4.2",
"swagger-ui-react": "5.9.0",
"swagger-ui-react": "5.17.14",
"ts-toolbelt": "9.6.0",
"use-undo": "1.1.1",
"uuid": "9.0.1",
"uuid": "10.0.0",
"xml-js": "1.6.11"
},
"devDependencies": {
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@testing-library/jest-dom": "6.5.0",
"@testing-library/react": "16.0.1",
"@testing-library/user-event": "14.5.2",
"@total-typescript/ts-reset": "0.5.1",
"@total-typescript/ts-reset": "0.6.1",
"@types/d3": "5.16.0",
"@types/debug": "4.1.9",
"@types/draft-convert": "2.1.5",
"@types/draft-js": "0.11.13",
"@types/draftjs-to-html": "0.8.2",
"@types/js-cookie": "3.0.4",
"@types/debug": "4.1.12",
"@types/draft-convert": "2.1.8",
"@types/draft-js": "0.11.18",
"@types/draftjs-to-html": "0.8.4",
"@types/js-cookie": "3.0.6",
"@types/jsoneditor": "9.9.5",
"@types/lodash": "4.14.199",
"@types/node": "18.16.1",
"@types/ramda": "0.29.5",
"@types/react": "18.2.24",
"@types/react-beautiful-dnd": "13.1.5",
"@types/react-color": "3.0.7",
"@types/lodash": "4.17.9",
"@types/node": "22.7.3",
"@types/ramda": "0.30.2",
"@types/react": "18.3.9",
"@types/react-beautiful-dnd": "13.1.8",
"@types/react-color": "3.0.12",
"@types/react-d3-graph": "2.6.5",
"@types/react-dom": "18.2.8",
"@types/react-plotly.js": "2.6.1",
"@types/react-dom": "18.3.0",
"@types/react-plotly.js": "2.6.3",
"@types/react-syntax-highlighter": "15.5.13",
"@types/react-virtualized-auto-sizer": "1.0.1",
"@types/react-window": "1.8.6",
"@types/redux-logger": "3.0.10",
"@types/swagger-ui-react": "4.18.1",
"@types/react-virtualized-auto-sizer": "1.0.4",
"@types/react-window": "1.8.8",
"@types/swagger-ui-react": "4.18.3",
"@types/testing-library__jest-dom": "6.0.0",
"@types/uuid": "9.0.4",
"@typescript-eslint/eslint-plugin": "6.14.0",
"@typescript-eslint/parser": "6.14.0",
"@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@vitejs/plugin-react-swc": "3.7.0",
"@vitest/coverage-v8": "1.6.0",
"@vitest/ui": "1.6.0",
"eslint": "8.55.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-jsdoc": "48.2.0",
"@vitest/coverage-v8": "2.1.1",
"@vitest/ui": "2.1.1",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jsdoc": "48.10.0",
"eslint-plugin-license-header": "0.6.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.5",
"husky": "8.0.3",
"jsdom": "24.1.0",
"prettier": "3.0.3",
"typescript": "5.2.2",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.37.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.12",
"husky": "9.1.6",
"jsdom": "25.0.1",
"prettier": "3.3.3",
"typescript": "5.4.5",
"vite": "5.4.8",
"vitest": "1.6.0"
"vitest": "2.1.1"
},
"engines": {
"node": "18.16.1"
},
"overrides": {
"react-d3-graph": {
"react": "18.2.0"
"react": "18.3.1"
},
"react-json-view": {
"react": "18.2.0",
"react-dom": "18.2.0"
},
"[email protected]": {
"rollup": "4.22.0"
"react": "18.3.1",
"react-dom": "18.3.1"
}
}
}
13 changes: 7 additions & 6 deletions webapp/src/components/App/Data/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ function Data() {
lineHeight: 1.334,
}}
>
{`Matrices - ${dataList.find(
(item) => item.id === selectedItem,
)?.name}`}
{`Matrices - ${
dataList.find((item) => item.id === selectedItem)
?.name
}`}
</Typography>
<Box>
<IconButton>
Expand Down Expand Up @@ -237,9 +238,9 @@ function Data() {
alignItems: "center",
}}
>
{`Matrices - ${dataList.find(
(item) => item.id === selectedItem,
)?.name}`}
{`Matrices - ${
dataList.find((item) => item.id === selectedItem)?.name
}`}
</Typography>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
AccordionSummary,
Button,
Divider,
Unstable_Grid2 as Grid,
Grid2 as Grid,
} from "@mui/material";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import * as R from "ramda";
Expand Down Expand Up @@ -166,7 +166,7 @@ function ThematicTrimmingDialog(props: Props) {
const fields = getFieldLabelsForGroup(api.getValues(), group)
.filter(([, label]) => isSearchMatching(search, label))
.map(([name, label]) => (
<Grid key={name} xs={4}>
<Grid key={name} size={{ xs: 4 }}>
<SwitchFE name={name} label={label} control={api.control} />
</Grid>
));
Expand All @@ -186,12 +186,7 @@ function ThematicTrimmingDialog(props: Props) {
)}
</AccordionSummary>
<AccordionDetails>
<Grid
container
disableEqualOverflow
spacing={1}
sx={{ overflow: "auto", p: 1 }}
>
<Grid container spacing={1} sx={{ overflow: "auto", p: 1 }}>
{fields}
</Grid>
</AccordionDetails>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
*/

import { Typography, Grid } from "@mui/material";
import { t } from "i18next";
import { FieldArrayWithId } from "react-hook-form";
import NumberFE from "../../../../../../../common/fieldEditors/NumberFE";
import { useFormContextPlus } from "../../../../../../../common/Form";
import { AllocationFormFields } from "./utils";
import { validateNumber } from "../../../../../../../../utils/validationUtils";

interface Props {
field: FieldArrayWithId<AllocationFormFields, "allocation">;
Expand Down Expand Up @@ -48,15 +48,10 @@ function AllocationField({ field, index, label }: Props) {
<Grid item xs={4} md={2}>
<NumberFE
key={field.id}
name={`allocation.${index}.coefficient`}
name={`allocation.${index}.coefficient` as const}
control={control}
size="small"
rules={{
min: {
value: 0,
message: t("form.field.minValue", { 0: 0 }),
},
}}
rules={{ validate: validateNumber({ min: 0 }) }}
/>
</Grid>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { CorrelationFormFields } from "./utils";
import { useFormContextPlus } from "../../../../../../../common/Form";
import useAppSelector from "../../../../../../../../redux/hooks/useAppSelector";
import { getCurrentArea } from "../../../../../../../../redux/selectors";
import { validateNumber } from "../../../../../../../../utils/validationUtils";

interface Props {
field: FieldArrayWithId<CorrelationFormFields, "correlation">;
Expand Down Expand Up @@ -54,19 +55,10 @@ function CorrelationField({ field, index, label }: Props) {
<NumberFE
key={field.id}
label={t("study.modelization.hydro.correlation.coefficient")}
name={`correlation.${index}.coefficient`}
name={`correlation.${index}.coefficient` as const}
size="small"
control={control}
rules={{
min: {
value: -100,
message: t("form.field.minValue", { 0: -100 }),
},
max: {
value: 100,
message: t("form.field.maxValue", { 0: 100 }),
},
}}
rules={{ validate: validateNumber({ min: -100, max: 100 }) }}
disabled={field.areaId === currentArea?.id}
/>
</Grid>
Expand Down
7 changes: 3 additions & 4 deletions webapp/src/components/common/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
* This file is part of the Antares project.
*/

import { Box, BoxProps, Divider } from "@mui/material";
import { Box, BoxProps, Divider, SxProps, Theme } from "@mui/material";
import * as RA from "ramda-adjunct";
import { mergeSxProp } from "../../utils/muiUtils";

interface FieldsetProps extends Omit<BoxProps, "component"> {
interface FieldsetProps {
legend?: string | React.ReactNode;
children: React.ReactNode;
contentProps?: BoxProps;
fullFieldWidth?: boolean;
fieldWidth?: number;
sx?: SxProps<Theme>;
}

function Fieldset(props: FieldsetProps) {
Expand All @@ -32,12 +33,10 @@ function Fieldset(props: FieldsetProps) {
contentProps,
fullFieldWidth = false,
fieldWidth = 220,
...rest
} = props;

return (
<Box
{...rest}
component="fieldset"
sx={mergeSxProp(
{
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/common/GroupedDataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ function GroupedDataTable<
>
{RA.isFunction(deleteConfirmationMessage)
? deleteConfirmationMessage(selectedRows.length)
: deleteConfirmationMessage ?? t("dialog.message.confirmDelete")}
: (deleteConfirmationMessage ?? t("dialog.message.confirmDelete"))}
</ConfirmationDialog>
)}
</>
Expand Down
3 changes: 1 addition & 2 deletions webapp/src/components/common/MatrixGrid/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
* This file is part of the Antares project.
*/

import styled from "@emotion/styled";
import { Box, Typography } from "@mui/material";
import { Box, styled, Typography } from "@mui/material";

export const MatrixContainer = styled(Box)(() => ({
width: "100%",
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/common/TreeItemEnhanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

import { TreeItem, type TreeItemProps } from "@mui/x-tree-view/TreeItem";
import { mergeSxProp } from "../../utils/muiUtils";
import * as RA from "ramda-adjunct";
import * as R from "ramda";

export type TreeItemEnhancedProps = TreeItemProps;

function TreeItemEnhanced({ onClick, sx, ...rest }: TreeItemEnhancedProps) {
const canExpand = rest.children && RA.isNotEmpty(rest.children);
const canExpand = rest.children && R.isNotEmpty(rest.children);

////////////////////////////////////////////////////////////////
// Event Handlers
Expand Down
Loading

0 comments on commit bcfda8b

Please sign in to comment.