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

Update material-ui monorepo (major) #8083

Open
wants to merge 5 commits into
base: release/6.6.0
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions opencti-platform/opencti-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"@fontsource/ibm-plex-sans": "5.1.0",
"@graphiql/toolkit": "0.11.1",
"@hello-pangea/dnd": "16.6.0",
"@mui/icons-material": "5.16.13",
"@mui/icons-material": "6.4.3",
"@mui/lab": "5.0.0-alpha.175",
"@mui/material": "5.16.13",
"@mui/styles": "5.16.13",
"@mui/utils": "5.16.13",
"@mui/x-date-pickers": "6.20.2",
"@mui/material": "6.4.3",
"@mui/styles": "6.4.3",
"@mui/utils": "6.4.3",
"@mui/x-date-pickers": "7.26.0",
"@rjsf/core": "5.24.1",
"@rjsf/mui": "5.24.1",
"@rjsf/utils": "5.24.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ const AutocompleteField = (props) => {
<TextField
{...{ ...params, inputProps }}
{...textfieldprops}
InputProps={{
...InputProps,
endAdornment: endAdornment ?? InputProps.endAdornment,
slotProps={{
textField: {
InputProps: {
...InputProps,
endAdornment: endAdornment ?? InputProps.endAdornment,
},
},
}}
value={value}
name={name}
Expand Down
20 changes: 12 additions & 8 deletions opencti-platform/opencti-front/src/components/ColorPickerField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,18 @@ const ColorPickerField = (props) => {
onChange={internalOnChange}
onFocus={internalOnFocus}
onBlur={internalOnBlur}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton aria-label="open" onClick={handleClick} size="large">
<ColorLens />
</IconButton>
</InputAdornment>
),
slotProps={{
textField: {
InputProps: {
endAdornment: (
<InputAdornment position="end">
<IconButton aria-label="open" onClick={handleClick} size="large">
<ColorLens/>
</IconButton>
</InputAdornment>
),
},
},
}}
/>
<Popover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const DeleteDialog: React.FC<DeleteDialogProps> = ({
return (
<Dialog
open={deletion.displayDelete}
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
keepMounted={true}
TransitionComponent={Transition}
slots={{ desktopTransition: Transition }}
onClose={onClose ?? deletion.handleCloseDelete}
>
<DialogContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class ExportButtons extends Component {
</MenuItem>
</Menu>
<Dialog
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
open={exporting}
keepMounted={true}
fullScreen={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ const ExternalLinkPopover: FunctionComponent<ExternalLinkPopoverProps> = ({
};
return (
<Dialog
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
open={displayExternalLink}
keepMounted={true}
TransitionComponent={Transition}
slots={{ desktopTransition: Transition }}
onClose={handleCloseExternalLink}
>
<DialogContent>
Expand Down
88 changes: 46 additions & 42 deletions opencti-platform/opencti-front/src/components/SearchInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,48 +112,52 @@ const SearchInput = (props) => {
onSubmit(value);
}
}}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Search fontSize="small" />
</InputAdornment>
),
endAdornment: variant === 'topBar' && (
<InputAdornment position="end">
<Tooltip title={t_i18n('Advanced search')}>
<IconButton
component={Link}
to="/dashboard/search"
size="medium"
color={
location.pathname.includes('/dashboard/search')
&& !location.pathname.includes('/dashboard/search_bulk')
? 'primary'
: 'inherit'
}
>
<BiotechOutlined fontSize='medium'/>
</IconButton>
</Tooltip>
<Tooltip title={t_i18n('Bulk search')}>
<IconButton
component={Link}
to="/dashboard/search_bulk"
size="medium"
color={
location.pathname.includes('/dashboard/search_bulk')
? 'primary'
: 'inherit'
}
>
<ContentPasteSearchOutlined fontSize="medium"/>
</IconButton>
</Tooltip>
</InputAdornment>
),
classes: {
root: classRoot,
input: classInput,
slotProps={{
textField: {
InputProps: {
startAdornment: (
<InputAdornment position="start">
<Search fontSize="small"/>
</InputAdornment>
),
endAdornment: variant === 'topBar' && (
<InputAdornment position="end">
<Tooltip title={t_i18n('Advanced search')}>
<IconButton
component={Link}
to="/dashboard/search"
size="medium"
color={
location.pathname.includes('/dashboard/search')
&& !location.pathname.includes('/dashboard/search_bulk')
? 'primary'
: 'inherit'
}
>
<BiotechOutlined fontSize='medium'/>
</IconButton>
</Tooltip>
<Tooltip title={t_i18n('Bulk search')}>
<IconButton
component={Link}
to="/dashboard/search_bulk"
size="medium"
color={
location.pathname.includes('/dashboard/search_bulk')
? 'primary'
: 'inherit'
}
>
<ContentPasteSearchOutlined fontSize="medium"/>
</IconButton>
</Tooltip>
</InputAdornment>
),
classes: {
root: classRoot,
input: classInput,
},
},
},
}}
{...otherProps}
Expand Down
34 changes: 19 additions & 15 deletions opencti-platform/opencti-front/src/components/TextField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,25 @@ const TextField = (props) => {
onFocus={internalOnFocus}
onBlur={internalOnBlur}
onPaste={internalOnPaste}
InputProps={{
startAdornment,
endAdornment: askAi && (
<TextFieldAskAI
currentValue={value}
setFieldValue={(val) => {
setFieldValue(name, val);
if (typeof onSubmit === 'function') {
onSubmit(name, val || '');
}
}}
format="text"
disabled={props.disabled}
/>
),
slotProps={{
textField: {
InputProps: {
startAdornment,
endAdornment: askAi && (
<TextFieldAskAI
currentValue={value}
setFieldValue={(val) => {
setFieldValue(name, val);
if (typeof onSubmit === 'function') {
onSubmit(name, val || '');
}
}}
format="text"
disabled={props.disabled}
/>
),
},
},
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const TimePickerField = (props) => {
onAccept={internalOnAccept}
onChange={internalOnChange}
views={views}
inputFormat={inputFormat}
format={inputFormat}
slotProps={{
textField: {
...textFieldProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ const DataTableFilters = ({
{redirectionModeEnabled && (
<Dialog
open={openSettings}
PaperProps={{ elevation: 1 }}
TransitionComponent={Transition}
slotProps={{ desktopPaper: { elevation: 1 } }}
slots={{ desktopTransition: Transition }}
onClose={() => setOpenSettings(false)}
maxWidth="xs"
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const BulkTextModal = ({
open={open}
onClose={onClose}
fullWidth={true}
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
>
<DialogTitle>{title || t_i18n('Create multiple entities')}</DialogTitle>
<DialogContent style={{ display: 'flex', flexDirection: 'column', gap: '24px' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,25 @@ const EntitySelectWithTypes: FunctionComponent<EntitySelectWithTypesProps> = ({
renderInput={(paramsInput) => (
<TextField
{...paramsInput}
InputProps={{
...paramsInput.InputProps,
sx: { gap: 1 },
startAdornment: value
? <ItemIcon type={value.type} color={value.color} />
: null,
endAdornment: (
<SearchScopeElement
name={'id'}
disabled={disabled}
searchScope={searchScope}
setSearchScope={setSearchScope}
availableRelationFilterTypes={undefined}
/>
),
slotProps={{
textField: {
InputProps: {
...paramsInput.InputProps,
sx: { gap: 1 },
startAdornment: value
? <ItemIcon type={value.type} color={value.color}/>
: null,
endAdornment: (
<SearchScopeElement
name={'id'}
disabled={disabled}
searchScope={searchScope}
setSearchScope={setSearchScope}
availableRelationFilterTypes={undefined}
/>
),
},
},
}}
label={label}
size="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const RichTextField = ({

{fullScreen ? (
<Dialog
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
open={fullScreen}
onClose={() => setFullScreen(false)}
fullScreen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,15 @@ export const FilterChipPopover: FunctionComponent<FilterChipMenuProps> = ({
renderInput={(paramsInput) => (
<TextField
{...paramsInput}
InputProps={{
...paramsInput.InputProps,
endAdornment: isStixObjectTypes.includes(fKey)
? renderSearchScopeSelection(fKey)
: paramsInput.InputProps.endAdornment,
slotProps={{
textField: {
InputProps: {
...paramsInput.InputProps,
endAdornment: isStixObjectTypes.includes(fKey)
? renderSearchScopeSelection(fKey)
: paramsInput.InputProps.endAdornment,
},
},
}}
label={t_i18n(fLabel)}
variant="outlined"
Expand Down Expand Up @@ -455,7 +459,7 @@ export const FilterChipPopover: FunctionComponent<FilterChipMenuProps> = ({
vertical: 'bottom',
horizontal: 'left',
}}
PaperProps={{ elevation: 1, style: { marginTop: 10 } }}
slotProps={{ desktopPaper: { elevation: 1, style: { marginTop: 10 } } }}
>
{filterDefinition?.subFilters && filterDefinition.subFilters.length > 1
? <div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ class ListLines extends Component {
{handleSwitchRedirectionMode && (
<Dialog
open={this.state.openSettings}
PaperProps={{ elevation: 1 }}
TransitionComponent={Transition}
slotProps={{ desktopPaper: { elevation: 1 } }}
slots={{ desktopTransition: Transition }}
onClose={this.handleCloseSettings.bind(this)}
maxWidth="xs"
fullWidth={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ const DashboardSettings = () => {
</Fab>
<Dialog
open={open}
PaperProps={{ elevation: 1 }}
TransitionComponent={Transition}
slotProps={{ desktopPaper: { elevation: 1 } }}
slots={{ desktopTransition: Transition }}
onClose={handleClose}
maxWidth="xs"
fullWidth={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const TimeoutLock: React.FunctionComponent = () => {
}}
disableEscapeKeyDown={true}
maxWidth="sm"
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
sx={{
backdropFilter: 'blur(15px)',
marginTop: `${bannerHeightNumber}px`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const ExternalReferenceCreation: FunctionComponent<ExternalReferenceCreationProp
</Fab>
)}
<Dialog
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
open={isFABReplaced || handleCloseContextual ? openContextual : open}
onClose={isFABReplaced || handleCloseContextual ? handleCloseContextual : handleClose}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ ExternalReferenceDeletionProps
</Button>
</Security>
<Dialog
PaperProps={{ elevation: 1 }}
slotProps={{ desktopPaper: { elevation: 1 } }}
open={displayDelete}
keepMounted={true}
TransitionComponent={Transition}
slots={{ desktopTransition: Transition }}
onClose={handleCloseDelete}
>
<DialogContent>
Expand Down
Loading