Skip to content

Commit

Permalink
Packages 912 (#420)
Browse files Browse the repository at this point in the history
* Update packages

* Update packages
  • Loading branch information
GermanBluefox authored Sep 12, 2024
1 parent a47c842 commit 533f696
Show file tree
Hide file tree
Showing 8 changed files with 675 additions and 640 deletions.
12 changes: 5 additions & 7 deletions MIGRATION_4_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,17 @@ If you still have questions, try to find an answer [here](https://mui.com/guides
- Look for calls of custom like

```jsx
this.props.socket._socket.emit('getObjectView', 'system', 'custom', {startKey: '', endKey:'\u9999'}, (err, objs) => {
(objs?.rows || [])
.forEach(item => console.log(item.id, item.value));
this.props.socket._socket.emit('getObjectView', 'system', 'custom', { startKey: '', endKey: '\u9999' }, (err, objs) => {
(objs?.rows || []).forEach(item => console.log(item.id, item.value));
});
```
to
```jsx
socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
.then(objects => {
Object.keys(objects).forEach(obj => console.log(obj._id));
});
socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey').then(objects => {
Object.keys(objects).forEach(obj => console.log(obj._id));
});
```
- Replace all `socket.log.error('text')` to `socket.log('text', 'error')`
Expand Down
18 changes: 9 additions & 9 deletions MIGRATION_5_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ After:

```typescript jsx
const styles: Record<string, any> = {
dialog: (theme: IobTheme) => ({
height: `calc(100% - ${theme => theme.mixins.toolbar.minHeight}px)`,
p: 1, // or 8px, padding is OK too
m: '16px', // or 2, margin is OK too
gap: '5px',
borderRadius: '5px',
ml: '10px', // mt, mr, mb, but marginLeft, marginRight, marginBottom is OK too
pl: '10px', // pt, pr, pb, but paddingTop, paddingRight, paddingBottom is OK too
}),
dialog: (theme: IobTheme) => ({
height: `calc(100% - ${theme => theme.mixins.toolbar.minHeight}px)`,
p: 1, // or 8px, padding is OK too
m: '16px', // or 2, margin is OK too
gap: '5px',
borderRadius: '5px',
ml: '10px', // mt, mr, mb, but marginLeft, marginRight, marginBottom is OK too
pl: '10px', // pt, pr, pb, but paddingTop, paddingRight, paddingBottom is OK too
}),
};
```

Expand Down
16 changes: 13 additions & 3 deletions MIGRATION_6_7.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Migration from adapter-react-v5@6.x to adapter-react-v5@7.x

Only MUI library was updated from v5 to v6.

## No `withStyles` at all

`withStyles` was removed completely. So you have to replace all `withStyles` with `sx` or `style` properties.

## slotProps

`inputProps` and `InputProps` are now in `slotProps`

Examples:
Before:

```jsx
<TextField inputProps={{ readOnly: true }} InputProps={{ endAdornment: <IconButton />}}/>
```
<TextField
inputProps={{ readOnly: true }}
InputProps={{ endAdornment: <IconButton /> }}
/>
```

```jsx
<TextField
Expand All @@ -23,6 +31,8 @@ Before:
},
}}
/>
```
```

## SelectID dialog

`SelectID` dialog now requires `theme` property. Without this property, the dialog will crash.
Loading

0 comments on commit 533f696

Please # to comment.