u
This commit is contained in:
@@ -60,6 +60,10 @@ class AppDialog extends Component {
|
|||||||
transitionDuration: _transitionDuration,
|
transitionDuration: _transitionDuration,
|
||||||
TransitionProps: _transitionProps,
|
TransitionProps: _transitionProps,
|
||||||
TransitionComponent: _transitionComponent,
|
TransitionComponent: _transitionComponent,
|
||||||
|
// Legacy MUI prop (removed in v9) — merge into slotProps.paper instead
|
||||||
|
// of spreading onto Dialog/DOM where it triggers
|
||||||
|
// "React does not recognize the `PaperProps` prop" warnings.
|
||||||
|
PaperProps: legacyPaperProps,
|
||||||
disableScrollLock = true,
|
disableScrollLock = true,
|
||||||
slotProps: userSlotProps,
|
slotProps: userSlotProps,
|
||||||
slots: userSlots,
|
slots: userSlots,
|
||||||
@@ -69,6 +73,18 @@ class AppDialog extends Component {
|
|||||||
void _transitionProps;
|
void _transitionProps;
|
||||||
void _transitionComponent;
|
void _transitionComponent;
|
||||||
|
|
||||||
|
const userPaper = userSlotProps?.paper ?? {};
|
||||||
|
const { sx: userPaperSx, ...restPaper } = userPaper;
|
||||||
|
const { sx: legacyPaperSx, ...restLegacyPaper } = legacyPaperProps ?? {};
|
||||||
|
const toSxArray = (sx) =>
|
||||||
|
// eslint-disable-next-line no-nested-ternary
|
||||||
|
Array.isArray(sx) ? sx : sx ? [sx] : [];
|
||||||
|
const mergedPaperSx = [...toSxArray(legacyPaperSx), ...toSxArray(userPaperSx)];
|
||||||
|
const mergedPaper =
|
||||||
|
mergedPaperSx.length > 0
|
||||||
|
? { ...restLegacyPaper, ...restPaper, sx: mergedPaperSx }
|
||||||
|
: { ...restLegacyPaper, ...restPaper };
|
||||||
|
|
||||||
const userBackdrop = userSlotProps?.backdrop ?? {};
|
const userBackdrop = userSlotProps?.backdrop ?? {};
|
||||||
const { sx: userBackdropSx, ...restBackdrop } = userBackdrop;
|
const { sx: userBackdropSx, ...restBackdrop } = userBackdrop;
|
||||||
const userTransition = userSlotProps?.transition ?? {};
|
const userTransition = userSlotProps?.transition ?? {};
|
||||||
@@ -77,6 +93,7 @@ class AppDialog extends Component {
|
|||||||
|
|
||||||
const slotProps = {
|
const slotProps = {
|
||||||
...userSlotProps,
|
...userSlotProps,
|
||||||
|
paper: mergedPaper,
|
||||||
backdrop: {
|
backdrop: {
|
||||||
...restBackdrop,
|
...restBackdrop,
|
||||||
sx: [
|
sx: [
|
||||||
|
|||||||
@@ -649,16 +649,6 @@ export default class ArticleSearch extends PureComponent {
|
|||||||
onClose={this.handleCloseDialog}
|
onClose={this.handleCloseDialog}
|
||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
fullWidth
|
fullWidth
|
||||||
PaperProps={{
|
|
||||||
sx: {
|
|
||||||
height: '80vh',
|
|
||||||
minHeight: '80vh',
|
|
||||||
maxHeight: '80vh',
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
overflow: 'hidden',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
slotProps={{
|
slotProps={{
|
||||||
paper: {
|
paper: {
|
||||||
sx: {
|
sx: {
|
||||||
|
|||||||
@@ -163,17 +163,6 @@ export default class CategoryPickerDialog extends PureComponent {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
PaperProps={{
|
|
||||||
sx: {
|
|
||||||
height: '75vh',
|
|
||||||
minHeight: '75vh',
|
|
||||||
maxHeight: 700,
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
borderRadius: 2.5,
|
|
||||||
overflow: 'hidden',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
|
|||||||
@@ -245,13 +245,6 @@ export default class BrandImageSearchDialog extends PureComponent {
|
|||||||
fullWidth
|
fullWidth
|
||||||
scroll="paper"
|
scroll="paper"
|
||||||
aria-labelledby="brand-image-search-dialog-title"
|
aria-labelledby="brand-image-search-dialog-title"
|
||||||
PaperProps={{
|
|
||||||
sx: {
|
|
||||||
height: '80vh',
|
|
||||||
minHeight: '80vh',
|
|
||||||
maxHeight: '80vh',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
slotProps={{
|
slotProps={{
|
||||||
paper: {
|
paper: {
|
||||||
sx: {
|
sx: {
|
||||||
|
|||||||
@@ -72,11 +72,13 @@ export default class NewConversationDialog extends PureComponent {
|
|||||||
onClose={loading ? undefined : onClose}
|
onClose={loading ? undefined : onClose}
|
||||||
maxWidth="xs"
|
maxWidth="xs"
|
||||||
fullWidth
|
fullWidth
|
||||||
PaperProps={{
|
slotProps={{
|
||||||
sx: {
|
paper: {
|
||||||
borderRadius: 3,
|
sx: {
|
||||||
p: 1,
|
borderRadius: 3,
|
||||||
boxShadow: SHADOW_DIALOG,
|
p: 1,
|
||||||
|
boxShadow: SHADOW_DIALOG,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -64,16 +64,6 @@ export default class ArticleSearchDialog extends PureComponent {
|
|||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
fullWidth
|
fullWidth
|
||||||
aria-labelledby="article-search-dialog-title"
|
aria-labelledby="article-search-dialog-title"
|
||||||
PaperProps={{
|
|
||||||
sx: {
|
|
||||||
height: '80vh',
|
|
||||||
minHeight: '80vh',
|
|
||||||
maxHeight: '80vh',
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
overflow: 'hidden',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
slotProps={{
|
slotProps={{
|
||||||
paper: {
|
paper: {
|
||||||
sx: {
|
sx: {
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ export default class SettingsDialog extends Component {
|
|||||||
maxWidth="lg"
|
maxWidth="lg"
|
||||||
fullWidth
|
fullWidth
|
||||||
slotProps={{ paper: { sx: paperSx } }}
|
slotProps={{ paper: { sx: paperSx } }}
|
||||||
PaperProps={{ sx: paperSx }}
|
|
||||||
>
|
>
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ export default class VfsFileExplorer extends PureComponent {
|
|||||||
open={Boolean(menuAnchor)}
|
open={Boolean(menuAnchor)}
|
||||||
onClose={this.handleCloseMenu}
|
onClose={this.handleCloseMenu}
|
||||||
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
||||||
PaperProps={{ sx: { borderRadius: 2, minWidth: 180 } }}
|
slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 180 } } }}
|
||||||
>
|
>
|
||||||
{isText && (
|
{isText && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
@@ -818,7 +818,7 @@ export default class VfsFileExplorer extends PureComponent {
|
|||||||
open={Boolean(folderMenuAnchor)}
|
open={Boolean(folderMenuAnchor)}
|
||||||
onClose={this.handleCloseFolderMenu}
|
onClose={this.handleCloseFolderMenu}
|
||||||
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
||||||
PaperProps={{ sx: { borderRadius: 2, minWidth: 190 } }}
|
slotProps={{ paper: { sx: { borderRadius: 2, minWidth: 190 } } }}
|
||||||
>
|
>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ export default class VfsNewFileDialog extends PureComponent {
|
|||||||
maxWidth="xs"
|
maxWidth="xs"
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
||||||
PaperProps={{
|
slotProps={{
|
||||||
sx: { borderRadius: 3, p: 1 },
|
paper: { sx: { borderRadius: 3, p: 1 } },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ export default class VfsNewFolderDialog extends PureComponent {
|
|||||||
maxWidth="xs"
|
maxWidth="xs"
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
||||||
PaperProps={{
|
slotProps={{
|
||||||
sx: { borderRadius: 3, p: 1 },
|
paper: { sx: { borderRadius: 3, p: 1 } },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ export default class VfsRenameDialog extends PureComponent {
|
|||||||
maxWidth="xs"
|
maxWidth="xs"
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
sx={{ zIndex: (theme) => theme.zIndex.modal + 20 }}
|
||||||
PaperProps={{
|
slotProps={{
|
||||||
sx: { borderRadius: 3, p: 1 },
|
paper: { sx: { borderRadius: 3, p: 1 } },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
<DialogTitle sx={{ display: 'flex', alignItems: 'center', gap: 1.2, pb: 1 }}>
|
||||||
|
|||||||
@@ -330,11 +330,13 @@ class ArtikelVorlagenPage extends PureComponent {
|
|||||||
open={editorOpen}
|
open={editorOpen}
|
||||||
onClose={this.handleEditorClose}
|
onClose={this.handleEditorClose}
|
||||||
maxWidth={false}
|
maxWidth={false}
|
||||||
PaperProps={{
|
slotProps={{
|
||||||
sx: {
|
paper: {
|
||||||
width: '90vw',
|
sx: {
|
||||||
maxWidth: 1000,
|
width: '90vw',
|
||||||
bgcolor: 'background.paper',
|
maxWidth: 1000,
|
||||||
|
bgcolor: 'background.paper',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user