Skip to content

Commit dc3ab4b

Browse files
authored
Merge pull request #130 from pluginpal/feature/update-to-rc
Update strapi to 5.0.0-rc.2
2 parents b229934 + e8db8c6 commit dc3ab4b

File tree

8 files changed

+1002
-593
lines changed

8 files changed

+1002
-593
lines changed

admin/src/components/ConfigDiff/index.jsx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued';
33
import { useIntl } from 'react-intl';
44

55
import {
6-
ModalLayout,
7-
ModalBody,
8-
ModalHeader,
6+
Modal,
97
Grid,
10-
GridItem,
118
Typography,
129
} from '@strapi/design-system';
1310

@@ -16,32 +13,32 @@ const ConfigDiff = ({ isOpen, onClose, oldValue, newValue, configName }) => {
1613
if (!isOpen) return null;
1714

1815
return (
19-
<ModalLayout
16+
<Modal.Root
2017
onClose={onClose}
2118
labelledBy="title"
2219
>
23-
<ModalHeader>
20+
<Modal.Header>
2421
<Typography variant="omega" fontWeight="bold" textColor="neutral800">
2522
{formatMessage({ id: 'config-sync.ConfigDiff.Title' })} {configName}
2623
</Typography>
27-
</ModalHeader>
28-
<ModalBody>
29-
<Grid paddingBottom={4} style={{ textAlign: 'center' }}>
30-
<GridItem col={6}>
24+
</Modal.Header>
25+
<Modal.Body>
26+
<Grid.Root paddingBottom={4} style={{ textAlign: 'center' }}>
27+
<Grid.Item col={6}>
3128
<Typography variant="delta">{formatMessage({ id: 'config-sync.ConfigDiff.SyncDirectory' })}</Typography>
32-
</GridItem>
33-
<GridItem col={6}>
29+
</Grid.Item>
30+
<Grid.Item col={6}>
3431
<Typography variant="delta">{formatMessage({ id: 'config-sync.ConfigDiff.Database' })}</Typography>
35-
</GridItem>
36-
</Grid>
32+
</Grid.Item>
33+
</Grid.Root>
3734
<ReactDiffViewer
3835
oldValue={JSON.stringify(oldValue, null, 2)}
3936
newValue={JSON.stringify(newValue, null, 2)}
4037
splitView
4138
compareMethod={DiffMethod.WORDS}
4239
/>
43-
</ModalBody>
44-
</ModalLayout>
40+
</Modal.Body>
41+
</Modal.Root>
4542
);
4643
};
4744

admin/src/components/ConfigList/ConfigListRow/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Tr, Td, BaseCheckbox } from '@strapi/design-system';
2+
import { Tr, Td, Checkbox } from '@strapi/design-system';
33

44
const CustomRow = ({ row, checked, updateValue }) => {
55
const { configName, configType, state, onClick } = row;
@@ -42,7 +42,7 @@ const CustomRow = ({ row, checked, updateValue }) => {
4242
style={{ cursor: 'pointer' }}
4343
>
4444
<Td>
45-
<BaseCheckbox
45+
<Checkbox
4646
aria-label={`Select ${configName}`}
4747
value={checked}
4848
onValueChange={updateValue}

admin/src/components/ConfigList/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
Tr,
1111
Th,
1212
Typography,
13-
BaseCheckbox,
13+
Checkbox,
1414
Loader,
1515
} from '@strapi/design-system';
1616

@@ -128,7 +128,7 @@ const ConfigList = ({ diff, isLoading }) => {
128128
<Thead>
129129
<Tr>
130130
<Th>
131-
<BaseCheckbox
131+
<Checkbox
132132
aria-label={formatMessage({ id: 'config-sync.ConfigList.SelectAll' })}
133133
indeterminate={isIndeterminate}
134134
onValueChange={(value) => setCheckedItems(checkedItems.map(() => value))}

admin/src/components/ConfirmModal/index.jsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { useSelector } from 'react-redux';
44

55
import {
66
Dialog,
7-
DialogBody,
8-
DialogFooter,
97
Flex,
108
Typography,
119
Button,
@@ -23,12 +21,12 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => {
2321
if (!isOpen) return null;
2422

2523
return (
26-
<Dialog
24+
<Dialog.Root
2725
onClose={onClose}
2826
title={formatMessage({ id: "config-sync.popUpWarning.Confirmation" })}
2927
isOpen={isOpen}
3028
>
31-
<DialogBody icon={<WarningCircle />}>
29+
<Dialog.Body icon={<WarningCircle />}>
3230
<Flex size={2}>
3331
<Flex justifyContent="center">
3432
<Typography variant="omega" id="confirm-description" style={{ textAlign: 'center' }}>
@@ -37,7 +35,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => {
3735
</Typography>
3836
</Flex>
3937
</Flex>
40-
</DialogBody>
38+
</Dialog.Body>
4139
{(soft && type === 'import') && (
4240
<React.Fragment>
4341
<Divider />
@@ -53,7 +51,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => {
5351
</Box>
5452
</React.Fragment>
5553
)}
56-
<DialogFooter
54+
<Dialog.Footer
5755
startAction={(
5856
<Button
5957
onClick={() => {
@@ -75,7 +73,7 @@ const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => {
7573
{formatMessage({ id: `config-sync.popUpWarning.button.${type}` })}
7674
</Button>
7775
)} />
78-
</Dialog>
76+
</Dialog.Root>
7977
);
8078
};
8179

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
"strapi-server.js"
5656
],
5757
"peerDependencies": {
58-
"@strapi/strapi": "^5.0.0-beta.8"
58+
"@strapi/strapi": "^5.0.0-rc.2"
5959
},
6060
"devDependencies": {
61-
"@strapi/design-system": "2.0.0-beta.4",
62-
"@strapi/icons": "2.0.0-beta.4",
63-
"@strapi/strapi": "5.0.0-beta.8",
64-
"@strapi/utils": "5.0.0-beta.8",
61+
"@strapi/design-system": "2.0.0-rc.7",
62+
"@strapi/icons": "2.0.0-rc.7",
63+
"@strapi/strapi": "5.0.0-rc.2",
64+
"@strapi/utils": "5.0.0-rc.2",
6565
"babel-eslint": "9.0.0",
6666
"eslint": "^7.32.0",
6767
"eslint-config-airbnb": "^18.2.1",

playground/.strapi/client/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
*/
55
import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin";
66
import strapiCloud from "@strapi/plugin-cloud/strapi-admin";
7+
import configSync from "strapi-plugin-config-sync/strapi-admin";
78
import { renderAdmin } from "@strapi/strapi/admin";
89

910
renderAdmin(document.getElementById("strapi"), {
1011
plugins: {
1112
"users-permissions": usersPermissions,
1213
"strapi-cloud": strapiCloud,
14+
"config-sync": configSync,
1315
},
1416
});

playground/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"supertest": "^6.3.3"
1717
},
1818
"dependencies": {
19-
"@strapi/strapi": "5.0.0-beta.8",
20-
"@strapi/plugin-users-permissions": "5.0.0-beta.8",
21-
"@strapi/plugin-cloud": "5.0.0-beta.8",
19+
"@strapi/strapi": "5.0.0-rc.2",
20+
"@strapi/plugin-users-permissions": "5.0.0-rc.2",
21+
"@strapi/plugin-cloud": "5.0.0-rc.2",
2222
"better-sqlite3": "9.4.3",
2323
"react": "^18.0.0",
2424
"react-dom": "^18.0.0",

0 commit comments

Comments
 (0)