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

build(deps): bump @mui/x-data-grid from 6.19.8 to 7.1.1 #1587

Closed
Closed
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
51 changes: 29 additions & 22 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@minoru/react-dnd-treeview": "^3.4.4",
"@mui/icons-material": "^5.15.19",
"@mui/lab": "^5.0.0-alpha.170",
"@mui/x-data-grid": "^7.1.1",
"@mui/material": "^5.15.20",
"@mui/x-data-grid": "^6.19.8",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^14.5.2",
Expand Down
6 changes: 4 additions & 2 deletions src/ThreeEditor/Simulation/Physics/Beam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Line2 } from 'three/examples/jsm/lines/Line2.js';
import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry.js';
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js';

import { Particle, PARTICLE_TYPES, FLUKA_PARTICLE_TYPES } from '../../../types/Particle';
import { FLUKA_PARTICLE_TYPES,Particle, PARTICLE_TYPES } from '../../../types/Particle';
// Import of 'lines' from examples subfolder follows the official guidelines of threejs.editor (see https://threejs.org/docs/#manual/en/introduction/Installation)
import { ConfigSourceFile } from '../../../types/SimulationTypes/ConfigTypes';
import { YaptideEditor } from '../../js/YaptideEditor';
Expand Down Expand Up @@ -167,7 +167,9 @@ export class Beam extends SimulationElement {
sourceFile: ConfigSourceFile;

get particle(): Particle {
return [...PARTICLE_TYPES, ...FLUKA_PARTICLE_TYPES].find(p => p.id === this.particleData.id) as Particle;
return [...PARTICLE_TYPES, ...FLUKA_PARTICLE_TYPES].find(
p => p.id === this.particleData.id
) as Particle;
}

constructor(editor: YaptideEditor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Divider, ToggleButton, ToggleButtonGroup } from '@mui/material';
import { useEffect } from 'react';
import { Object3D } from 'three';

import { PARTICLE_TYPES, FLUKA_PARTICLE_TYPES } from '../../../../../types/Particle';
import { FLUKA_PARTICLE_TYPES,PARTICLE_TYPES } from '../../../../../types/Particle';
import { SimulatorType } from '../../../../../types/RequestTypes';
import { useSmartWatchEditorState } from '../../../../../util/hooks/signals';
import { SetValueCommand } from '../../../../js/commands/SetValueCommand';
Expand Down Expand Up @@ -150,11 +150,11 @@ function BeamConfigurationFields(props: { editor: YaptideEditor; object: Beam })
const { object, editor } = props;

let supportedParticles: ParticleType[] = [...PARTICLE_TYPES];

if (editor.contextManager.currentSimulator === SimulatorType.FLUKA) {
supportedParticles.push(...FLUKA_PARTICLE_TYPES);
}


const { state: watchedObject } = useSmartWatchEditorState(editor, object, true);

const setValueCommand = (value: any, key: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
canChangePrimaryMultiplier,
DETECTOR_KEYWORD_OPTIONS,
FLUKA_DETECTOR_KEYWORD_OPTIONS,
MEDIUM_KEYWORD_OPTIONS} from '../../../../Simulation/Scoring/ScoringOutputTypes';
MEDIUM_KEYWORD_OPTIONS
} from '../../../../Simulation/Scoring/ScoringOutputTypes';
import { isScoringQuantity, ScoringQuantity } from '../../../../Simulation/Scoring/ScoringQuantity';
import { ObjectSelectPropertyField } from '../fields/ObjectSelectPropertyField';
import {
Expand Down
4 changes: 2 additions & 2 deletions src/WrapperApp/WrapperApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { useStore } from '../services/StoreService';
import SceneEditor from '../ThreeEditor/components/Editor/SceneEditor';
import { SimulatorType } from '../types/RequestTypes';
import { SimulationInputFiles } from '../types/ResponseTypes';
import { camelCaseToNormalText } from '../util/camelCaseToSentenceCase';
import InputEditorPanel from './components/InputEditor/InputEditorPanel';
import NavDrawer from './components/NavDrawer/NavDrawer';
import { AboutPanel } from './components/Panels/AboutPanel';
import LoginPanel from './components/Panels/LoginPanel';
import { TabPanel } from './components/Panels/TabPanel';
import ResultsPanel from './components/Results/ResultsPanel';
import SimulationPanel from './components/Simulation/SimulationPanel';
import {camelCaseToNormalText} from '../util/camelCaseToSentenceCase'

function WrapperApp() {
const { demoMode } = useConfig();
Expand Down Expand Up @@ -50,7 +50,7 @@ function WrapperApp() {
}, [isAuthorized, tabsValue]);

useEffect(() => {
//The document.title is used by web browser to display a name on the browser tab.
//The document.title is used by web browser to display a name on the browser tab.
//There we would like to see the name extracted from a tabsValue, which can sugest user in which tab of our application is at the moment.
//We want to make the text which be a title as a normal text, not cammel case text, to make it similar to values of tabs user can see on navbar.
document.title = camelCaseToNormalText(tabsValue); //e.g. we've got 'inputFiles' as a value of tabsValue and this function converts this value to 'Input Files'
Expand Down
4 changes: 2 additions & 2 deletions src/WrapperApp/components/Results/ResultsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Stack, Switch, Typography } from '@mui/material';
import Box from '@mui/material/Box';
import { DataGrid, GridColDef, GridValueGetterParams } from '@mui/x-data-grid';
import { DataGrid, GridColDef } from '@mui/x-data-grid';
import { ChangeEvent, useState } from 'react';

import { isCustomFilterJSON } from '../../../ThreeEditor/Simulation/Scoring/CustomFilter';
Expand Down Expand Up @@ -28,7 +28,7 @@ const columns: GridColDef[] = [
headerName: 'Value',
type: 'number',
flex: 1,
valueGetter: (params: GridValueGetterParams) => formatValue(params.row.value)
valueGetter: (_value, row) => formatValue(row.value)
},
{ field: 'unit', headerName: 'Unit', width: 100 },
{ field: 'filterName', headerName: 'Filter name', flex: 1 },
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/FlukaConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Fluka Converter', () => {

// select SHIELDHIT subsection
examplesPanel.findElement(By.xpath("//button[contains(text(),'shieldhit')]")).click();

//find the list of examples
const examplesList = await examplesPanel.findElement(By.id('Examples list'));

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/TopasConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('TopasConverter', () => {
5_000
)
).toBeTruthy();

//find the "Editor" button on the left menu and assure it is already selected
const editorButton = await driver.findElement(By.xpath("//div[@aria-label = 'Editor']"));

Expand Down
3 changes: 1 addition & 2 deletions src/types/Particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ export const PARTICLE_TYPES = [
}
] as const satisfies readonly ParticleType[];


export const FLUKA_PARTICLE_TYPES = [
{
id: 26,
name: 'Electron'
}
] as const satisfies readonly ParticleType[];
] as const satisfies readonly ParticleType[];
14 changes: 7 additions & 7 deletions src/util/camelCaseToSentenceCase.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CapitalizeString } from "./Capitalize";
import { CapitalizeString } from './Capitalize';

export function camelCaseToNormalText(input: string) {
// Insert a space before all caps and trim any leading space
let result = input.replace(/([A-Z])/g, ' $1').trim();
// Convert the first character to uppercase and the rest to lowercase
return CapitalizeString(result);
}
// Insert a space before all caps and trim any leading space
let result = input.replace(/([A-Z])/g, ' $1').trim();

// Convert the first character to uppercase and the rest to lowercase
return CapitalizeString(result);
}
Loading