@akemona-org/strapi-admin 3.12.4 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/components/FormBloc/index.js +3 -3
- package/admin/src/components/HeaderSearch/index.js +2 -2
- package/admin/src/components/IntlInput/index.js +2 -2
- package/admin/src/components/LeftMenu/LeftMenuFooter/Wrapper.js +3 -1
- package/admin/src/components/LeftMenu/LeftMenuHeader/index.js +3 -3
- package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuIcon.js +3 -1
- package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuLinkContent.js +3 -3
- package/admin/src/components/LeftMenu/LeftMenuLink/NotificationCount.js +3 -3
- package/admin/src/components/LeftMenu/LeftMenuLink/index.js +2 -2
- package/admin/src/components/LeftMenu/LeftMenuLinkHeader/index.js +2 -2
- package/admin/src/components/LeftMenu/LeftMenuLinkSection/index.js +3 -3
- package/admin/src/components/PageTitle/index.js +3 -3
- package/admin/src/components/Roles/ButtonWithNumber/index.js +2 -2
- package/admin/src/components/Roles/ConditionsButton/index.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ActionRow/index.js +3 -3
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/ClearIndicator.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/CustomDropdownIndicator.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/IndicatorSeparator.js +3 -1
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/SubUl.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/index.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/SingleValue.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/index.js +3 -3
- package/admin/src/components/Roles/ConditionsModal/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapse/Collapse/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +2 -2
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapse/index.js +3 -3
- package/admin/src/components/Roles/ContentTypeCollapses/index.js +2 -2
- package/admin/src/components/Roles/ContentTypes/index.js +2 -2
- package/admin/src/components/Roles/Curve/index.js +3 -3
- package/admin/src/components/Roles/EmptyRole/index.js +2 -2
- package/admin/src/components/Roles/GlobalActions/index.js +2 -2
- package/admin/src/components/Roles/PermissionsDataManagerProvider/index.js +2 -2
- package/admin/src/components/Roles/PluginsAndSettings/Row/index.js +3 -3
- package/admin/src/components/Roles/PluginsAndSettings/SubCategory/index.js +2 -2
- package/admin/src/components/Roles/PluginsAndSettings/index.js +2 -2
- package/admin/src/components/Roles/RequiredSign/index.js +3 -1
- package/admin/src/components/Roles/RoleForm/NameInput.js +3 -1
- package/admin/src/components/Roles/RoleForm/RoleForm.js +2 -2
- package/admin/src/components/Roles/RoleList/RoleRow.js +2 -2
- package/admin/src/components/Roles/RowLabelWithCheckbox/index.js +3 -3
- package/admin/src/components/Roles/Tabs/index.js +2 -2
- package/admin/src/components/Settings/Header/index.js +3 -3
- package/admin/src/components/SettingsPageTitle/index.js +2 -2
- package/admin/src/components/SizedInput/index.js +2 -2
- package/admin/src/components/UpgradePlanModal/components/Option/index.js +2 -2
- package/admin/src/components/UpgradePlanModal/index.js +2 -2
- package/admin/src/components/Users/Filter/index.js +2 -2
- package/admin/src/components/Users/FilterPicker/Button.js +2 -2
- package/admin/src/components/Users/FilterPicker/Card/index.js +2 -2
- package/admin/src/components/Users/FilterPicker/index.js +2 -2
- package/admin/src/components/Users/Footer/index.js +2 -2
- package/admin/src/components/Users/LinkNotification/Envelope.js +3 -3
- package/admin/src/components/Users/LinkNotification/index.js +2 -2
- package/admin/src/components/Users/MagicLink/index.js +2 -2
- package/admin/src/components/Users/RoleSettingsModalSection/RolesSelectComponent.js +2 -2
- package/admin/src/components/Users/RoleSettingsModalSection/index.js +2 -2
- package/admin/src/components/Users/SelectRoles/ClearIndicator.js +2 -2
- package/admin/src/components/Users/SelectRoles/DropdownIndicator.js +2 -2
- package/admin/src/components/Users/SelectRoles/IndicatorSeparator.js +3 -1
- package/admin/src/components/Users/SelectRoles/MultiValueContainer.js +2 -2
- package/admin/src/components/Users/SelectRoles/index.js +2 -2
- package/admin/src/components/Users/SortPicker/Button.js +2 -2
- package/admin/src/components/Users/SortPicker/List.js +2 -2
- package/admin/src/components/Users/SortPicker/ListItem.js +2 -2
- package/admin/src/components/Users/SortPicker/index.js +2 -2
- package/admin/src/components/Webhooks/EventInput/EventRow.js +2 -2
- package/admin/src/components/Webhooks/EventInput/index.js +2 -2
- package/admin/src/components/Webhooks/HeadersInput/index.js +2 -2
- package/admin/src/components/Webhooks/TriggerContainer/index.js +2 -2
- package/admin/src/containers/ApplicationInfosPage/components/Detail/index.js +2 -2
- package/admin/src/containers/ApplicationInfosPage/components/InfoText/index.js +2 -2
- package/admin/src/containers/ApplicationInfosPage/components/Link/index.js +2 -2
- package/admin/src/containers/ApplicationInfosPage/index.js +2 -2
- package/admin/src/containers/AuthPage/components/AuthLink/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Box/index.js +3 -3
- package/admin/src/containers/AuthPage/components/ForgotPassword/index.js +2 -2
- package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/Envelope.js +3 -3
- package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Input/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Login/BaseLogin.js +2 -2
- package/admin/src/containers/AuthPage/components/Login/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Logo/index.js +3 -1
- package/admin/src/containers/AuthPage/components/Oops/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Register/CustomLabel.js +2 -2
- package/admin/src/containers/AuthPage/components/Register/index.js +3 -3
- package/admin/src/containers/AuthPage/components/ResetPassword/index.js +2 -2
- package/admin/src/containers/AuthPage/index.js +2 -2
- package/admin/src/containers/HomePage/BlogPost.js +2 -2
- package/admin/src/containers/HomePage/SocialLink.js +2 -2
- package/admin/src/containers/InstalledPluginsPage/Row.js +2 -2
- package/admin/src/containers/InstalledPluginsPage/index.js +2 -2
- package/admin/src/containers/LeftMenu/Loader.js +2 -2
- package/admin/src/containers/LeftMenu/index.js +2 -2
- package/admin/src/containers/LeftMenu/useMenuSections.js +2 -3
- package/admin/src/containers/MarketplacePage/MarketplaceBanner/index.js +2 -2
- package/admin/src/containers/MarketplacePage/index.js +2 -2
- package/admin/src/containers/NewNotification/Notification/index.js +2 -2
- package/admin/src/containers/NewNotification/index.js +2 -2
- package/admin/src/containers/NotFoundPage/index.js +3 -1
- package/admin/src/containers/Onboarding/index.js +2 -2
- package/admin/src/containers/PermissionsManager/index.js +2 -2
- package/admin/src/containers/PrivateRoute/index.js +3 -3
- package/admin/src/containers/ProfilePage/index.js +2 -2
- package/admin/src/containers/Roles/CreatePage/index.js +2 -2
- package/admin/src/containers/Roles/EditPage/index.js +2 -2
- package/admin/src/containers/Roles/ListPage/index.js +2 -2
- package/admin/src/containers/Roles/ProtectedEditPage/index.js +2 -2
- package/admin/src/containers/Roles/ProtectedListPage/index.js +3 -3
- package/admin/src/containers/SettingsHeaderSearchContextProvider/index.js +2 -2
- package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/index.js +2 -2
- package/admin/src/containers/SettingsPage/components/SettingDispatcher/index.js +2 -2
- package/admin/src/containers/Theme/index.js +2 -2
- package/admin/src/containers/Users/EditPage/index.js +2 -2
- package/admin/src/containers/Users/ListPage/Header.js +3 -3
- package/admin/src/containers/Users/ListPage/ModalForm.js +2 -2
- package/admin/src/containers/Users/ListPage/index.js +2 -2
- package/admin/src/containers/Users/ProtectedEditPage/index.js +2 -2
- package/admin/src/containers/Users/ProtectedListPage/index.js +3 -3
- package/admin/src/containers/Webhooks/ProtectedCreateView/index.js +3 -3
- package/admin/src/containers/Webhooks/ProtectedEditView/index.js +3 -3
- package/admin/src/containers/Webhooks/ProtectedListView/index.js +3 -3
- package/admin/src/contexts/MarketPlace/index.js +2 -2
- package/admin/src/utils/MiddlewareApi.js +1 -0
- package/controllers/authentication.js +2 -3
- package/middlewares/auth/index.js +2 -3
- package/package.json +4 -4
|
@@ -33,7 +33,7 @@ const displayedData = {
|
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
function EventInput({ onChange, name: inputName, value: inputValue, shouldShowDPEvents }) {
|
|
37
37
|
const headersName = shouldShowDPEvents
|
|
38
38
|
? displayedData.headers.draftAndPublish
|
|
39
39
|
: displayedData.headers.default;
|
|
@@ -116,7 +116,7 @@ const EventInput = ({ onChange, name: inputName, value: inputValue, shouldShowDP
|
|
|
116
116
|
</table>
|
|
117
117
|
</Wrapper>
|
|
118
118
|
);
|
|
119
|
-
}
|
|
119
|
+
}
|
|
120
120
|
|
|
121
121
|
EventInput.propTypes = {
|
|
122
122
|
name: PropTypes.string.isRequired,
|
|
@@ -13,7 +13,7 @@ import Wrapper from './Wrapper';
|
|
|
13
13
|
|
|
14
14
|
/* eslint-disable react/no-array-index-key */
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function HeadersInput({ errors, name, onClick, onChange, onRemove, value }) {
|
|
17
17
|
const formatOption = (value) => ({ value, label: value });
|
|
18
18
|
const options = keys.map((key) => formatOption(key));
|
|
19
19
|
|
|
@@ -124,7 +124,7 @@ const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
|
124
124
|
</button>
|
|
125
125
|
</Wrapper>
|
|
126
126
|
);
|
|
127
|
-
}
|
|
127
|
+
}
|
|
128
128
|
|
|
129
129
|
HeadersInput.defaultProps = {
|
|
130
130
|
errors: {},
|
|
@@ -5,7 +5,7 @@ import { Fail, Success, Pending, Remove } from '@buffetjs/icons';
|
|
|
5
5
|
|
|
6
6
|
import Wrapper from './Wrapper';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function TriggerContainer({ isPending, onCancel, response }) {
|
|
9
9
|
const { statusCode, message } = response;
|
|
10
10
|
|
|
11
11
|
return (
|
|
@@ -86,7 +86,7 @@ const TriggerContainer = ({ isPending, onCancel, response }) => {
|
|
|
86
86
|
</table>
|
|
87
87
|
</Wrapper>
|
|
88
88
|
);
|
|
89
|
-
}
|
|
89
|
+
}
|
|
90
90
|
|
|
91
91
|
TriggerContainer.defaultProps = {
|
|
92
92
|
isPending: false,
|
|
@@ -5,7 +5,7 @@ import InfoText from '../InfoText';
|
|
|
5
5
|
import Link from '../Link';
|
|
6
6
|
import Wrapper from '../Wrapper';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function Detail({ content, link, title }) {
|
|
9
9
|
return (
|
|
10
10
|
<Wrapper>
|
|
11
11
|
<Text fontSize="xs" color="grey" fontWeight="bold">
|
|
@@ -15,7 +15,7 @@ const Detail = ({ content, link, title }) => {
|
|
|
15
15
|
{link && <Link {...link} />}
|
|
16
16
|
</Wrapper>
|
|
17
17
|
);
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
|
|
20
20
|
Detail.defaultProps = {
|
|
21
21
|
link: null,
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Padded, Text } from '@buffetjs/core';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function InfoText({ content }) {
|
|
6
6
|
return (
|
|
7
7
|
<Padded top size="xs">
|
|
8
8
|
<Text fontWeight="semiBold" lineHeight="13px">
|
|
@@ -10,7 +10,7 @@ const InfoText = ({ content }) => {
|
|
|
10
10
|
</Text>
|
|
11
11
|
</Padded>
|
|
12
12
|
);
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
|
|
15
15
|
InfoText.propTypes = {
|
|
16
16
|
content: PropTypes.string.isRequired,
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { BaselineAlignment } from '@akemona-org/strapi-helper-plugin';
|
|
5
5
|
import LinkText, { LinkArrow } from './components';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function Link({ href, label }) {
|
|
8
8
|
return (
|
|
9
9
|
<Padded top size="smd">
|
|
10
10
|
<BaselineAlignment top size="1px" />
|
|
@@ -16,7 +16,7 @@ const Link = ({ href, label }) => {
|
|
|
16
16
|
</LinkText>
|
|
17
17
|
</Padded>
|
|
18
18
|
);
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
|
|
21
21
|
Link.propTypes = {
|
|
22
22
|
href: PropTypes.string.isRequired,
|
|
@@ -18,7 +18,7 @@ const makeSelectLatestRelease = () =>
|
|
|
18
18
|
shouldUpdateStrapi: adminState.shouldUpdateStrapi,
|
|
19
19
|
}));
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
function ApplicationInfosPage() {
|
|
22
22
|
const { formatMessage } = useIntl();
|
|
23
23
|
const selectAppInfos = useMemo(makeSelectAppInfos, []);
|
|
24
24
|
const selectLatestRealase = useMemo(makeSelectLatestRelease, []);
|
|
@@ -84,6 +84,6 @@ const ApplicationInfosPage = () => {
|
|
|
84
84
|
</Bloc>
|
|
85
85
|
</div>
|
|
86
86
|
);
|
|
87
|
-
}
|
|
87
|
+
}
|
|
88
88
|
|
|
89
89
|
export default memo(ApplicationInfosPage);
|
|
@@ -7,7 +7,7 @@ import Section from '../Section';
|
|
|
7
7
|
import Link from './Link';
|
|
8
8
|
import Wrapper from './Wrapper';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function AuthLink({ children, label, to }) {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
const message = formatMessage({ id: label });
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ const AuthLink = ({ children, label, to }) => {
|
|
|
20
20
|
</Wrapper>
|
|
21
21
|
</Section>
|
|
22
22
|
);
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
AuthLink.defaultProps = {
|
|
26
26
|
children: null,
|
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Text } from '@buffetjs/core';
|
|
4
4
|
import Wrapper from './Wrapper';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
<Wrapper>
|
|
6
|
+
function Box({ children, errorMessage, withoutError }) {
|
|
7
|
+
return <Wrapper>
|
|
8
8
|
{!withoutError && (
|
|
9
9
|
<Text fontSize="md" color="lightOrange" style={{ textAlign: 'center' }} lineHeight="18px">
|
|
10
10
|
{errorMessage}
|
|
@@ -12,7 +12,7 @@ const Box = ({ children, errorMessage, withoutError }) => (
|
|
|
12
12
|
)}
|
|
13
13
|
{children}
|
|
14
14
|
</Wrapper>
|
|
15
|
-
|
|
15
|
+
}
|
|
16
16
|
|
|
17
17
|
Box.defaultProps = {
|
|
18
18
|
errorMessage: null,
|
|
@@ -10,7 +10,7 @@ import Logo from '../Logo';
|
|
|
10
10
|
import Section from '../Section';
|
|
11
11
|
import Box from '../Box';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function ForgotPassword({ formErrors, modifiedData, onChange, onSubmit }) {
|
|
14
14
|
const { formatMessage } = useIntl();
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -49,7 +49,7 @@ const ForgotPassword = ({ formErrors, modifiedData, onChange, onSubmit }) => {
|
|
|
49
49
|
</Section>
|
|
50
50
|
</>
|
|
51
51
|
);
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
53
|
|
|
54
54
|
ForgotPassword.defaultProps = {
|
|
55
55
|
onSubmit: (e) => e.preventDefault(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable jsx-a11y/accessible-emoji */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
<svg width="71" height="78" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
function Envelope() {
|
|
5
|
+
return <svg width="71" height="78" xmlns="http://www.w3.org/2000/svg">
|
|
6
6
|
<text
|
|
7
7
|
transform="rotate(-20 34.095 544.73)"
|
|
8
8
|
fill="#9EA7B8"
|
|
@@ -15,6 +15,6 @@ const Envelope = () => (
|
|
|
15
15
|
</tspan>
|
|
16
16
|
</text>
|
|
17
17
|
</svg>
|
|
18
|
-
|
|
18
|
+
}
|
|
19
19
|
|
|
20
20
|
export default Envelope;
|
|
@@ -9,7 +9,7 @@ import Logo from '../Logo';
|
|
|
9
9
|
import Section from '../Section';
|
|
10
10
|
import Envelope from './Envelope';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function ForgotPasswordSuccess() {
|
|
13
13
|
const { formatMessage } = useIntl();
|
|
14
14
|
const { push } = useHistory();
|
|
15
15
|
|
|
@@ -72,6 +72,6 @@ const ForgotPasswordSuccess = () => {
|
|
|
72
72
|
</Section>
|
|
73
73
|
</>
|
|
74
74
|
);
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
|
|
77
77
|
export default ForgotPasswordSuccess;
|
|
@@ -3,7 +3,7 @@ import { Inputs } from '@buffetjs/custom';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function Input({ error, label, placeholder, ...rest }) {
|
|
7
7
|
const { formatMessage } = useIntl();
|
|
8
8
|
const labelMessage = formatMessage({ id: label });
|
|
9
9
|
const placeholderMessage = placeholder ? formatMessage({ id: placeholder }) : '';
|
|
@@ -16,7 +16,7 @@ const Input = ({ error, label, placeholder, ...rest }) => {
|
|
|
16
16
|
return (
|
|
17
17
|
<Inputs {...rest} error={errorMessage} label={labelMessage} placeholder={placeholderMessage} />
|
|
18
18
|
);
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
|
|
21
21
|
Input.defaultProps = {
|
|
22
22
|
error: null,
|
|
@@ -12,7 +12,7 @@ import Input from '../Input';
|
|
|
12
12
|
import Logo from '../Logo';
|
|
13
13
|
import Section from '../Section';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function Login({ children, formErrors, modifiedData, onChange, onSubmit, requestError }) {
|
|
16
16
|
const { formatMessage } = useIntl();
|
|
17
17
|
|
|
18
18
|
return (
|
|
@@ -64,7 +64,7 @@ const Login = ({ children, formErrors, modifiedData, onChange, onSubmit, request
|
|
|
64
64
|
<AuthLink label="Auth.link.forgot-password" to="/auth/forgot-password" />
|
|
65
65
|
</>
|
|
66
66
|
);
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
|
|
69
69
|
Login.defaultProps = {
|
|
70
70
|
children: null,
|
|
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
|
|
4
4
|
import BaseLogin from './BaseLogin';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function Login(loginProps) {
|
|
7
7
|
return <BaseLogin {...loginProps} />;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
|
|
10
10
|
Login.defaultProps = {
|
|
11
11
|
onSubmit: (e) => e.preventDefault(),
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import LogoStrapi from '../../../../assets/images/logo_strapi.png';
|
|
3
3
|
import Img from './Img';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function Logo() {
|
|
6
|
+
return <Img src={LogoStrapi} alt="strapi-logo" />
|
|
7
|
+
}
|
|
6
8
|
|
|
7
9
|
export default Logo;
|
|
@@ -10,7 +10,7 @@ import Logo from '../Logo';
|
|
|
10
10
|
import Section from '../Section';
|
|
11
11
|
import Img from './Img';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function Oops() {
|
|
14
14
|
const { push } = useHistory();
|
|
15
15
|
const { formatMessage } = useIntl();
|
|
16
16
|
const query = useQuery();
|
|
@@ -58,6 +58,6 @@ const Oops = () => {
|
|
|
58
58
|
</Section>
|
|
59
59
|
</>
|
|
60
60
|
);
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
|
|
63
63
|
export default Oops;
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Text } from '@buffetjs/core';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function CustomLabel({ id, onClick, values }) {
|
|
7
7
|
const { formatMessage } = useIntl();
|
|
8
8
|
|
|
9
9
|
return (
|
|
@@ -17,7 +17,7 @@ const CustomLabel = ({ id, onClick, values }) => {
|
|
|
17
17
|
{formatMessage({ id }, values)}
|
|
18
18
|
</Text>
|
|
19
19
|
);
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
|
|
22
22
|
CustomLabel.propTypes = {
|
|
23
23
|
id: PropTypes.string.isRequired,
|
|
@@ -15,7 +15,7 @@ import Box from '../Box';
|
|
|
15
15
|
import InputWrapper from './InputWrapper';
|
|
16
16
|
import Span from './Span';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
function Register({
|
|
19
19
|
fieldsToDisable,
|
|
20
20
|
formErrors,
|
|
21
21
|
inputsPrefix,
|
|
@@ -24,7 +24,7 @@ const Register = ({
|
|
|
24
24
|
onChange,
|
|
25
25
|
onSubmit,
|
|
26
26
|
requestError,
|
|
27
|
-
})
|
|
27
|
+
}) {
|
|
28
28
|
const { formatMessage } = useIntl();
|
|
29
29
|
|
|
30
30
|
const handleClick = (e, to) => {
|
|
@@ -149,7 +149,7 @@ const Register = ({
|
|
|
149
149
|
)}
|
|
150
150
|
</>
|
|
151
151
|
);
|
|
152
|
-
}
|
|
152
|
+
}
|
|
153
153
|
|
|
154
154
|
Register.defaultProps = {
|
|
155
155
|
fieldsToDisable: [],
|
|
@@ -11,7 +11,7 @@ import Logo from '../Logo';
|
|
|
11
11
|
import Section from '../Section';
|
|
12
12
|
import Box from '../Box';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function ResetPassword({ formErrors, modifiedData, onChange, onSubmit, requestError }) {
|
|
15
15
|
const { formatMessage } = useIntl();
|
|
16
16
|
|
|
17
17
|
return (
|
|
@@ -55,7 +55,7 @@ const ResetPassword = ({ formErrors, modifiedData, onChange, onSubmit, requestEr
|
|
|
55
55
|
<AuthLink label="Auth.link.ready" to="/auth/login" />
|
|
56
56
|
</>
|
|
57
57
|
);
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
|
|
60
60
|
ResetPassword.defaultProps = {
|
|
61
61
|
onSubmit: (e) => e.preventDefault(),
|
|
@@ -16,7 +16,7 @@ import init from './init';
|
|
|
16
16
|
import { initialState, reducer } from './reducer';
|
|
17
17
|
import useChangeLanguage from '../LanguageProvider/hooks/useChangeLanguage';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
function AuthPage({ hasAdmin, setHasAdmin }) {
|
|
20
20
|
const { push } = useHistory();
|
|
21
21
|
const changeLocale = useChangeLanguage();
|
|
22
22
|
const {
|
|
@@ -307,7 +307,7 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
307
307
|
</BaselineAlignment>
|
|
308
308
|
</Padded>
|
|
309
309
|
);
|
|
310
|
-
}
|
|
310
|
+
}
|
|
311
311
|
|
|
312
312
|
AuthPage.defaultProps = {
|
|
313
313
|
hasAdmin: false,
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { LoadingBar } from '@akemona-org/strapi-helper-plugin';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function BlogPost({ error, isFirst, isLoading, title, content, link }) {
|
|
6
6
|
if (isLoading) {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
@@ -27,7 +27,7 @@ const BlogPost = ({ error, isFirst, isLoading, title, content, link }) => {
|
|
|
27
27
|
<p style={{ marginTop: 17, marginBottom: isFirst ? 32 : 10 }}>{content}</p>
|
|
28
28
|
</a>
|
|
29
29
|
);
|
|
30
|
-
}
|
|
30
|
+
}
|
|
31
31
|
|
|
32
32
|
BlogPost.defaultProps = {
|
|
33
33
|
content: null,
|
|
@@ -33,7 +33,7 @@ function getSrc(name) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
function SocialLink({ link, name }) {
|
|
37
37
|
return (
|
|
38
38
|
<SocialLinkWrapper className="col-6">
|
|
39
39
|
<a href={link} target="_blank" rel="noopener noreferrer">
|
|
@@ -42,7 +42,7 @@ const SocialLink = ({ link, name }) => {
|
|
|
42
42
|
</a>
|
|
43
43
|
</SocialLinkWrapper>
|
|
44
44
|
);
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
|
|
47
47
|
SocialLink.propTypes = {
|
|
48
48
|
link: PropTypes.string.isRequired,
|
|
@@ -12,7 +12,7 @@ import { faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
|
12
12
|
import adminPermissions from '../../permissions';
|
|
13
13
|
import LogoContainer from './Logo';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function Row({ logo, name, description, isRequired, id, icon, onConfirm }) {
|
|
16
16
|
const { formatMessage } = useGlobalContext();
|
|
17
17
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
18
|
const links = [];
|
|
@@ -80,7 +80,7 @@ const Row = ({ logo, name, description, isRequired, id, icon, onConfirm }) => {
|
|
|
80
80
|
</td>
|
|
81
81
|
</CustomRow>
|
|
82
82
|
);
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
84
|
|
|
85
85
|
Row.defaultProps = {
|
|
86
86
|
icon: 'plug',
|
|
@@ -7,7 +7,7 @@ import ListWrapper from './ListWrapper';
|
|
|
7
7
|
import Row from './Row';
|
|
8
8
|
import generateRows from './utils/generateRows';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function InstalledPluginsPage() {
|
|
11
11
|
const { formatMessage, plugins } = useGlobalContext();
|
|
12
12
|
const onConfirm = async (id) => {
|
|
13
13
|
try {
|
|
@@ -68,6 +68,6 @@ const InstalledPluginsPage = () => {
|
|
|
68
68
|
</ContainerFluid>
|
|
69
69
|
</div>
|
|
70
70
|
);
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
72
|
|
|
73
73
|
export default InstalledPluginsPage;
|
|
@@ -14,7 +14,7 @@ import LoaderWrapper from './LoaderWrapper';
|
|
|
14
14
|
|
|
15
15
|
const MOUNT_NODE = document.getElementById('app') || document.createElement('div');
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
function Loader({ show }) {
|
|
18
18
|
if (show) {
|
|
19
19
|
return createPortal(
|
|
20
20
|
<LoaderWrapper>
|
|
@@ -25,7 +25,7 @@ const Loader = ({ show }) => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return null;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
|
|
30
30
|
Loader.propTypes = {
|
|
31
31
|
show: PropTypes.bool.isRequired,
|
|
@@ -11,7 +11,7 @@ import Loader from './Loader';
|
|
|
11
11
|
import Wrapper from './Wrapper';
|
|
12
12
|
import useMenuSections from './useMenuSections';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function LeftMenu({ shouldUpdateStrapi, version, plugins, setUpdateMenu }) {
|
|
15
15
|
const location = useLocation();
|
|
16
16
|
|
|
17
17
|
const {
|
|
@@ -89,7 +89,7 @@ const LeftMenu = ({ shouldUpdateStrapi, version, plugins, setUpdateMenu }) => {
|
|
|
89
89
|
<LeftMenuFooter key="footer" version={version} />
|
|
90
90
|
</Wrapper>
|
|
91
91
|
);
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
|
|
94
94
|
LeftMenu.propTypes = {
|
|
95
95
|
shouldUpdateStrapi: PropTypes.bool.isRequired,
|
|
@@ -29,9 +29,8 @@ const useMenuSections = (plugins, shouldUpdateStrapi) => {
|
|
|
29
29
|
|
|
30
30
|
const resolvePermissions = async (permissions = userPermissions) => {
|
|
31
31
|
const pluginsSectionLinks = toPluginLinks(pluginsRef.current);
|
|
32
|
-
const { authorizedCtLinks, authorizedStLinks, contentTypes } =
|
|
33
|
-
permissions
|
|
34
|
-
);
|
|
32
|
+
const { authorizedCtLinks, authorizedStLinks, contentTypes } =
|
|
33
|
+
await getCtOrStLinks(permissions);
|
|
35
34
|
|
|
36
35
|
const authorizedPluginSectionLinks = await getPluginSectionLinks(
|
|
37
36
|
permissions,
|
|
@@ -4,7 +4,7 @@ import { useGlobalContext } from '@akemona-org/strapi-helper-plugin';
|
|
|
4
4
|
import Wrapper from './Wrapper';
|
|
5
5
|
import LogoStrapi from '../../../assets/images/banner_strapi-rocket.png';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function MarketplaceBanner() {
|
|
8
8
|
const { formatMessage } = useIntl();
|
|
9
9
|
const { emitEvent } = useGlobalContext();
|
|
10
10
|
|
|
@@ -32,6 +32,6 @@ const MarketplaceBanner = () => {
|
|
|
32
32
|
</div>
|
|
33
33
|
</Wrapper>
|
|
34
34
|
);
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
|
|
37
37
|
export default MarketplaceBanner;
|
|
@@ -9,7 +9,7 @@ import PluginCard from './PluginCard';
|
|
|
9
9
|
import Wrapper from './Wrapper';
|
|
10
10
|
import MarketplaceBanner from './MarketplaceBanner';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function MarketPlacePage() {
|
|
13
13
|
const history = useHistory();
|
|
14
14
|
const { autoReload, emitEvent, currentEnvironment, formatMessage, plugins } = useGlobalContext();
|
|
15
15
|
const { error, isLoading, data } = useFetchPluginsFromMarketPlace();
|
|
@@ -98,6 +98,6 @@ const MarketPlacePage = () => {
|
|
|
98
98
|
</Wrapper>
|
|
99
99
|
</div>
|
|
100
100
|
);
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
102
|
|
|
103
103
|
export default MarketPlacePage;
|
|
@@ -24,7 +24,7 @@ const types = {
|
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
function Notification({ notification }) {
|
|
28
28
|
const { formatMessage } = useIntl();
|
|
29
29
|
const dispatch = useDispatch();
|
|
30
30
|
const { title, message, link, type, id, onClose, timeout, blockTransition, centered } =
|
|
@@ -114,7 +114,7 @@ const Notification = ({ notification }) => {
|
|
|
114
114
|
</Padded>
|
|
115
115
|
</NotificationWrapper>
|
|
116
116
|
);
|
|
117
|
-
}
|
|
117
|
+
}
|
|
118
118
|
|
|
119
119
|
Notification.defaultProps = {
|
|
120
120
|
notification: {
|
|
@@ -11,7 +11,7 @@ import { CSSTransition } from 'react-transition-group';
|
|
|
11
11
|
import Notification from './Notification';
|
|
12
12
|
import NotificationsWrapper from './Wrapper';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function NotificationsContainer() {
|
|
15
15
|
const notifications = useSelector((state) => state.get('newNotification').notifications);
|
|
16
16
|
|
|
17
17
|
return (
|
|
@@ -30,6 +30,6 @@ const NotificationsContainer = () => {
|
|
|
30
30
|
))}
|
|
31
31
|
</NotificationsWrapper>
|
|
32
32
|
);
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
export default memo(NotificationsContainer);
|
|
@@ -13,7 +13,9 @@ import React from 'react';
|
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import { NotFound } from '@akemona-org/strapi-helper-plugin';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function NotFoundPage(props) {
|
|
17
|
+
return <NotFound {...props} />
|
|
18
|
+
}
|
|
17
19
|
|
|
18
20
|
NotFoundPage.propTypes = {
|
|
19
21
|
history: PropTypes.shape({
|
|
@@ -14,7 +14,7 @@ import Wrapper from './Wrapper';
|
|
|
14
14
|
import init from './init';
|
|
15
15
|
import reducer, { initialState } from './reducer';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
function OnboardingVideos() {
|
|
18
18
|
const { emitEvent } = useGlobalContext();
|
|
19
19
|
const [reducerState, dispatch] = useReducer(reducer, initialState, init);
|
|
20
20
|
const { isLoading, isOpen, videos } = reducerState.toJS();
|
|
@@ -129,6 +129,6 @@ const OnboardingVideos = () => {
|
|
|
129
129
|
</div>
|
|
130
130
|
</Wrapper>
|
|
131
131
|
);
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
|
|
134
134
|
export default memo(OnboardingVideos);
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getUserPermissionsSucceeded,
|
|
9
9
|
} from './actions';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function PermissionsManager({ children }) {
|
|
12
12
|
const { isLoading, userPermissions } = useSelector((state) => state.get('permissionsManager'));
|
|
13
13
|
|
|
14
14
|
const dispatch = useDispatch();
|
|
@@ -38,7 +38,7 @@ const PermissionsManager = ({ children }) => {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
return <UserProvider value={{ userPermissions, fetchUserPermissions }}>{children}</UserProvider>;
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
42
|
|
|
43
43
|
PermissionsManager.defaultProps = {};
|
|
44
44
|
|
|
@@ -14,8 +14,8 @@ import { auth } from '@akemona-org/strapi-helper-plugin';
|
|
|
14
14
|
|
|
15
15
|
/* eslint-disable react/jsx-curly-newline */
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
<Route
|
|
17
|
+
function PrivateRoute({ component: Component, path, ...rest }) {
|
|
18
|
+
return <Route
|
|
19
19
|
path={path}
|
|
20
20
|
render={(props) =>
|
|
21
21
|
auth.getToken() !== null ? (
|
|
@@ -29,7 +29,7 @@ const PrivateRoute = ({ component: Component, path, ...rest }) => (
|
|
|
29
29
|
)
|
|
30
30
|
}
|
|
31
31
|
/>
|
|
32
|
-
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
PrivateRoute.propTypes = {
|
|
35
35
|
component: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|