@akemona-org/strapi-admin 3.7.0 → 3.7.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/app.js +15 -15
- package/admin/src/components/Header/index.js +4 -4
- package/admin/src/components/LeftMenu/LeftMenuFooter/Wrapper.js +1 -1
- package/admin/src/components/LeftMenu/LeftMenuFooter/index.js +6 -1
- package/admin/src/components/LeftMenu/LeftMenuHeader/Wrapper.js +3 -3
- package/admin/src/components/LeftMenu/LeftMenuLink/A.js +7 -7
- package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuLinkContent.js +1 -1
- package/admin/src/components/LeftMenu/LeftMenuLinkHeader/Title.js +1 -1
- package/admin/src/components/LeftMenu/LeftMenuLinkHeader/index.js +2 -2
- package/admin/src/components/LeftMenu/LeftMenuLinkSection/index.js +1 -1
- package/admin/src/components/LeftMenu/LinksContainer/index.js +2 -2
- package/admin/src/components/Notifications/Notification/Li.js +15 -15
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/ClearIndicator.js +1 -1
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/index.js +7 -6
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/utils/createCollapsesObject.js +1 -1
- package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/SingleValue.js +1 -1
- package/admin/src/components/Roles/ConditionsModal/index.js +2 -2
- package/admin/src/components/Roles/ConditionsModal/utils/selectStyle.js +8 -8
- package/admin/src/components/Roles/ContentTypeCollapse/Collapse/index.js +4 -7
- package/admin/src/components/Roles/ContentTypeCollapse/Collapse/utils/generateCheckboxesActions.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/getRowLabelCheckboxeState.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +6 -10
- package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/utils/generateHeadersFromActions.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/utils/activeStyle.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapse/utils/getAvailableActions.js +1 -1
- package/admin/src/components/Roles/ContentTypeCollapses/index.js +1 -1
- package/admin/src/components/Roles/Curve/index.js +1 -1
- package/admin/src/components/Roles/GlobalActions/utils/findDisplayedActions.js +1 -1
- package/admin/src/components/Roles/GlobalActions/utils/getRowLabelCheckboxesState.js +2 -2
- package/admin/src/components/Roles/Permissions/index.js +5 -4
- package/admin/src/components/Roles/Permissions/reducer.js +4 -4
- package/admin/src/components/Roles/Permissions/utils/createDefaultCTFormFromLayout.js +1 -1
- package/admin/src/components/Roles/Permissions/utils/findMatchingPermissions.js +1 -1
- package/admin/src/components/Roles/Permissions/utils/formatContentTypesPermissionToAPI.js +2 -2
- package/admin/src/components/Roles/Permissions/utils/formatLayoutForSettingsAndPlugins.js +1 -1
- package/admin/src/components/Roles/Permissions/utils/formatPermissionsToAPI.js +1 -1
- package/admin/src/components/Roles/Permissions/utils/formatSettingsPermissionsToAPI.js +4 -4
- package/admin/src/components/Roles/Permissions/utils/updateConditionsToFalse.js +2 -2
- package/admin/src/components/Roles/PluginsAndSettings/Row/Wrapper.js +1 -1
- package/admin/src/components/Roles/PluginsAndSettings/SubCategory/index.js +4 -7
- package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/formatActions.js +2 -2
- package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/getConditionsButtonState.js +2 -2
- package/admin/src/components/Roles/PluginsAndSettings/index.js +1 -1
- package/admin/src/components/Roles/RoleForm/NameInput.js +1 -1
- package/admin/src/components/Roles/RoleList/RoleDescription.js +1 -1
- package/admin/src/components/Roles/Tabs/index.js +1 -1
- package/admin/src/components/Roles/utils/createArrayOfValues.js +2 -2
- package/admin/src/components/Roles/utils/getCheckboxState.js +3 -3
- package/admin/src/components/Roles/utils/removeConditionKeyFromData.js +1 -1
- package/admin/src/components/Users/FilterPicker/Card/Input.js +1 -1
- package/admin/src/components/Users/FilterPicker/Card/index.js +2 -2
- package/admin/src/components/Users/FilterPicker/Card/init.js +1 -1
- package/admin/src/components/Users/FilterPicker/Card/reducer.js +1 -1
- package/admin/src/components/Users/FilterPicker/index.js +1 -1
- package/admin/src/components/Users/List/index.js +5 -5
- package/admin/src/components/Users/List/init.js +1 -1
- package/admin/src/components/Users/List/reducer.js +1 -1
- package/admin/src/components/Users/List/utils/checkIfAllEntriesAreSelected.js +1 -1
- package/admin/src/components/Users/List/utils/headers.js +2 -2
- package/admin/src/components/Users/List/utils/updateRows.js +1 -1
- package/admin/src/components/Users/ModalCreateBody/index.js +3 -3
- package/admin/src/components/Users/ModalCreateBody/init.js +1 -1
- package/admin/src/components/Users/ModalCreateBody/reducer.js +1 -1
- package/admin/src/components/Users/ModalCreateBody/utils/schema.js +2 -8
- package/admin/src/components/Users/RoleSettingsModalSection/index.js +1 -1
- package/admin/src/components/Users/SelectRoles/ClearIndicator.js +1 -1
- package/admin/src/components/Users/SelectRoles/MultiValueContainer.js +1 -1
- package/admin/src/components/Users/SelectRoles/index.js +3 -3
- package/admin/src/components/Users/SelectRoles/utils/styles.js +4 -4
- package/admin/src/components/Users/SortPicker/Button.js +1 -1
- package/admin/src/components/Users/SortPicker/List.js +1 -1
- package/admin/src/components/Users/SortPicker/ListWrapper.js +1 -1
- 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 +5 -5
- package/admin/src/components/Webhooks/EventInput/utils/formatValue.js +1 -1
- package/admin/src/components/Webhooks/HeadersInput/index.js +6 -6
- package/admin/src/components/Webhooks/Inputs/index.js +2 -2
- package/admin/src/components/Webhooks/ListRow/index.js +3 -3
- package/admin/src/configureStore.js +1 -1
- package/admin/src/containers/Admin/Content.js +5 -5
- package/admin/src/containers/Admin/Logout/index.js +1 -1
- package/admin/src/containers/Admin/Wrapper.js +1 -1
- package/admin/src/containers/Admin/reducer.js +1 -1
- package/admin/src/containers/Admin/selectors.js +2 -2
- package/admin/src/containers/App/selectors.js +9 -8
- package/admin/src/containers/App/styles/website.css +5 -5
- package/admin/src/containers/ApplicationInfosPage/index.js +4 -4
- package/admin/src/containers/AuthPage/components/ForgotPassword/index.js +1 -1
- package/admin/src/containers/AuthPage/components/Login/BaseLogin.js +1 -1
- package/admin/src/containers/AuthPage/components/Login/index.js +2 -2
- package/admin/src/containers/AuthPage/components/Register/index.js +3 -3
- package/admin/src/containers/AuthPage/components/ResetPassword/index.js +1 -1
- package/admin/src/containers/AuthPage/init.js +1 -1
- package/admin/src/containers/AuthPage/reducer.js +1 -1
- package/admin/src/containers/AuthPage/utils/forms.js +2 -8
- package/admin/src/containers/HomePage/index.js +15 -16
- package/admin/src/containers/InstalledPluginsPage/Row.js +1 -1
- package/admin/src/containers/InstalledPluginsPage/index.js +1 -1
- package/admin/src/containers/InstalledPluginsPage/utils/generateRows.js +1 -1
- package/admin/src/containers/LanguageProvider/hooks/useChangeLanguage.js +1 -1
- package/admin/src/containers/LanguageProvider/index.js +1 -1
- package/admin/src/containers/LanguageProvider/selectors.js +3 -10
- package/admin/src/containers/LeftMenu/Wrapper.js +5 -5
- package/admin/src/containers/LeftMenu/reducer.js +1 -1
- package/admin/src/containers/LeftMenu/selectors.js +1 -1
- package/admin/src/containers/LeftMenu/utils/generateModelsLinks.js +2 -2
- package/admin/src/containers/LeftMenu/utils/getCtOrStLinks.js +5 -4
- package/admin/src/containers/LeftMenu/utils/getGeneralLinks.js +1 -1
- package/admin/src/containers/LeftMenu/utils/getSettingsMenuLinksPermissions.js +1 -1
- package/admin/src/containers/LeftMenu/utils/toPluginLinks.js +2 -2
- package/admin/src/containers/LocaleToggle/index.js +2 -2
- package/admin/src/containers/LocaleToggle/selectors.js +4 -7
- package/admin/src/containers/MarketplacePage/PluginCard/index.js +3 -3
- package/admin/src/containers/MarketplacePage/index.js +2 -2
- package/admin/src/containers/NewNotification/Notification/index.js +4 -12
- package/admin/src/containers/NewNotification/Notification/styledComponents.js +1 -1
- package/admin/src/containers/NewNotification/index.js +2 -2
- package/admin/src/containers/NewNotification/reducer.js +2 -2
- package/admin/src/containers/NotFoundPage/index.js +1 -1
- package/admin/src/containers/NotificationProvider/actions.js +1 -1
- package/admin/src/containers/NotificationProvider/index.js +1 -1
- package/admin/src/containers/NotificationProvider/selectors.js +3 -3
- package/admin/src/containers/Onboarding/StaticLinks/index.js +2 -2
- package/admin/src/containers/Onboarding/Video.js +1 -1
- package/admin/src/containers/Onboarding/index.js +2 -2
- package/admin/src/containers/Onboarding/init.js +1 -1
- package/admin/src/containers/Onboarding/reducer.js +6 -6
- package/admin/src/containers/Onboarding/utils/formatAndStoreVideoArray.js +2 -2
- package/admin/src/containers/PermissionsManager/index.js +1 -1
- package/admin/src/containers/PermissionsManager/reducer.js +2 -2
- package/admin/src/containers/PrivateRoute/index.js +1 -1
- package/admin/src/containers/ProfilePage/index.js +4 -4
- package/admin/src/containers/Roles/EditPage/index.js +1 -1
- package/admin/src/containers/Roles/ListPage/index.js +5 -5
- package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/Icon.js +1 -1
- package/admin/src/containers/SettingsPage/components/MenuWrapper/index.js +1 -1
- package/admin/src/containers/SettingsPage/index.js +3 -3
- package/admin/src/containers/SettingsPage/utils/createPluginsLinksRoutes.js +3 -3
- package/admin/src/containers/SettingsPage/utils/findFirstAllowedEndpoint.js +3 -3
- package/admin/src/containers/SettingsPage/utils/getSectionsToDisplay.js +2 -2
- package/admin/src/containers/SettingsPage/utils/makeUniqueRoutes.js +2 -2
- package/admin/src/containers/Users/EditPage/index.js +2 -2
- package/admin/src/containers/Users/ListPage/Header.js +2 -2
- package/admin/src/containers/Users/ListPage/index.js +4 -4
- package/admin/src/containers/Users/ListPage/init.js +1 -1
- package/admin/src/containers/Users/ListPage/reducer.js +1 -1
- package/admin/src/containers/Users/ListPage/utils/getFilters.js +1 -1
- package/admin/src/containers/Webhooks/EditView/index.js +11 -17
- package/admin/src/containers/Webhooks/EditView/reducer.js +4 -4
- package/admin/src/containers/Webhooks/EditView/utils/formatData.js +2 -2
- package/admin/src/containers/Webhooks/EditView/utils/schema.js +1 -1
- package/admin/src/containers/Webhooks/ListView/index.js +5 -5
- package/admin/src/containers/Webhooks/ListView/reducer.js +5 -5
- package/admin/src/contexts/MarketPlace/index.js +2 -10
- package/admin/src/hooks/useFetchPermissionsLayout/index.js +1 -1
- package/admin/src/hooks/useFetchPermissionsLayout/reducer.js +1 -1
- package/admin/src/hooks/useFetchPluginsFromMarketPlace/index.js +1 -1
- package/admin/src/hooks/useFetchRole/index.js +4 -4
- package/admin/src/hooks/useFetchRole/reducer.js +1 -1
- package/admin/src/hooks/useModels/index.js +1 -1
- package/admin/src/hooks/useModels/reducer.js +3 -3
- package/admin/src/hooks/useRolesList/reducer.js +1 -1
- package/admin/src/hooks/useSettingsForm/index.js +2 -2
- package/admin/src/hooks/useSettingsForm/reducer.js +1 -1
- package/admin/src/hooks/useSettingsMenu/index.js +2 -2
- package/admin/src/hooks/useSettingsMenu/reducer.js +3 -3
- package/admin/src/hooks/useSettingsMenu/utils/formatLinks.js +3 -3
- package/admin/src/plugins.js +2 -2
- package/admin/src/public-path.js +1 -3
- package/admin/src/utils/ComponentApi.js +3 -3
- package/admin/src/utils/FieldApi.js +3 -3
- package/admin/src/utils/Plugin.js +1 -1
- package/admin/src/utils/Strapi.js +2 -2
- package/admin/src/utils/checkStore.js +1 -4
- package/admin/src/utils/getAttributesToDisplay.js +1 -1
- package/admin/src/utils/getExistingActions.js +2 -2
- package/admin/src/utils/getRequestUrl.js +1 -1
- package/admin/src/utils/injectReducer.js +26 -25
- package/admin/src/utils/injectSaga.js +28 -27
- package/admin/src/utils/reducerInjectors.js +1 -5
- package/admin/src/utils/retrieveGlobalLinks.js +1 -1
- package/admin/src/utils/retrievePluginsMenu.js +1 -1
- package/admin/src/utils/sagaInjectors.js +4 -7
- package/admin/src/utils/sortLinks.js +1 -1
- package/admin/src/validations/users/profile.js +1 -5
- package/admin/src/validations/users/roles.js +1 -4
- package/config/admin-conditions.js +3 -3
- package/config/migrations/permissions-fields-to-properties.js +4 -4
- package/controllers/admin.js +1 -1
- package/controllers/formatters/format-actions-by-sections.js +1 -1
- package/doc/customize-menu.md +3 -3
- package/domain/action/index.js +3 -3
- package/domain/condition/index.js +2 -2
- package/domain/permission/index.js +3 -3
- package/domain/user.js +2 -2
- package/index.js +12 -12
- package/middlewares/auth/index.js +1 -1
- package/package.json +4 -4
- package/services/action.js +1 -1
- package/services/condition.js +1 -1
- package/services/passport/local-strategy.js +2 -2
- package/services/passport.js +2 -4
- package/services/permission/engine.js +9 -9
- package/services/permission/queries.js +11 -12
- package/services/permission/sections-builder/utils.js +5 -5
- package/services/token.js +2 -2
- package/utils/index.js +1 -1
- package/validation/common-functions/check-fields-are-correctly-nested.js +3 -2
- package/validation/common-functions/check-fields-dont-have-duplicates.js +1 -1
- package/webpack.config.js +2 -2
|
@@ -8,10 +8,10 @@ const SortPicker = ({ onChange, value }) => {
|
|
|
8
8
|
return (
|
|
9
9
|
<Picker
|
|
10
10
|
renderButtonContent={Button}
|
|
11
|
-
renderSectionContent={onToggle => (
|
|
11
|
+
renderSectionContent={(onToggle) => (
|
|
12
12
|
<List
|
|
13
13
|
selectedItem={value}
|
|
14
|
-
onClick={e => {
|
|
14
|
+
onClick={(e) => {
|
|
15
15
|
onChange(e);
|
|
16
16
|
onToggle();
|
|
17
17
|
}}
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Checkbox } from '@buffetjs/core';
|
|
4
4
|
|
|
5
5
|
const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, handleChangeAll }) => {
|
|
6
|
-
const enabledCheckboxes = events.filter(event => {
|
|
6
|
+
const enabledCheckboxes = events.filter((event) => {
|
|
7
7
|
return !disabledEvents.includes(event);
|
|
8
8
|
});
|
|
9
9
|
|
|
@@ -30,7 +30,7 @@ const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, hand
|
|
|
30
30
|
/>
|
|
31
31
|
</td>
|
|
32
32
|
|
|
33
|
-
{events.map(event => {
|
|
33
|
+
{events.map((event) => {
|
|
34
34
|
return (
|
|
35
35
|
<td key={event}>
|
|
36
36
|
<Checkbox
|
|
@@ -60,13 +60,13 @@ const EventInput = ({ onChange, name: inputName, value: inputValue, shouldShowDP
|
|
|
60
60
|
let set = new Set(inputValue);
|
|
61
61
|
|
|
62
62
|
if (value) {
|
|
63
|
-
events[name].forEach(event => {
|
|
63
|
+
events[name].forEach((event) => {
|
|
64
64
|
if (!disabledEvents.includes(event)) {
|
|
65
65
|
set.add(event);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
} else {
|
|
69
|
-
events[name].forEach(event => set.delete(event));
|
|
69
|
+
events[name].forEach((event) => set.delete(event));
|
|
70
70
|
}
|
|
71
71
|
onChange({ target: { name: inputName, value: Array.from(set) } });
|
|
72
72
|
};
|
|
@@ -77,11 +77,11 @@ const EventInput = ({ onChange, name: inputName, value: inputValue, shouldShowDP
|
|
|
77
77
|
<thead>
|
|
78
78
|
<tr>
|
|
79
79
|
<td />
|
|
80
|
-
{headersName.map(header => {
|
|
80
|
+
{headersName.map((header) => {
|
|
81
81
|
if (header === 'app.utils.publish' || header === 'app.utils.unpublish') {
|
|
82
82
|
return (
|
|
83
83
|
<FormattedMessage id="Settings.webhooks.event.publish-tooltip" key={header}>
|
|
84
|
-
{msg => (
|
|
84
|
+
{(msg) => (
|
|
85
85
|
<td title={msg}>
|
|
86
86
|
<FormattedMessage id={header} />
|
|
87
87
|
</td>
|
|
@@ -99,7 +99,7 @@ const EventInput = ({ onChange, name: inputName, value: inputValue, shouldShowDP
|
|
|
99
99
|
</tr>
|
|
100
100
|
</thead>
|
|
101
101
|
<tbody>
|
|
102
|
-
{Object.keys(events).map(event => {
|
|
102
|
+
{Object.keys(events).map((event) => {
|
|
103
103
|
return (
|
|
104
104
|
<EventRow
|
|
105
105
|
disabledEvents={disabledEvents}
|
|
@@ -14,8 +14,8 @@ import Wrapper from './Wrapper';
|
|
|
14
14
|
/* eslint-disable react/no-array-index-key */
|
|
15
15
|
|
|
16
16
|
const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
17
|
-
const formatOption = value => ({ value, label: value });
|
|
18
|
-
const options = keys.map(key => formatOption(key));
|
|
17
|
+
const formatOption = (value) => ({ value, label: value });
|
|
18
|
+
const options = keys.map((key) => formatOption(key));
|
|
19
19
|
|
|
20
20
|
const handleChangeKey = (selected, name) => {
|
|
21
21
|
if (selected === null) {
|
|
@@ -26,7 +26,7 @@ const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const customStyles = hasError => {
|
|
29
|
+
const customStyles = (hasError) => {
|
|
30
30
|
return {
|
|
31
31
|
control: (base, state) => ({
|
|
32
32
|
...base,
|
|
@@ -36,7 +36,7 @@ const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
|
36
36
|
})} !important`,
|
|
37
37
|
borderRadius: '2px !important',
|
|
38
38
|
}),
|
|
39
|
-
menu: base => {
|
|
39
|
+
menu: (base) => {
|
|
40
40
|
return {
|
|
41
41
|
...base,
|
|
42
42
|
padding: '0',
|
|
@@ -50,7 +50,7 @@ const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
|
50
50
|
marginTop: '-1px;',
|
|
51
51
|
};
|
|
52
52
|
},
|
|
53
|
-
menuList: base => ({
|
|
53
|
+
menuList: (base) => ({
|
|
54
54
|
...base,
|
|
55
55
|
maxHeight: '224px',
|
|
56
56
|
paddingTop: '0',
|
|
@@ -93,7 +93,7 @@ const HeadersInput = ({ errors, name, onClick, onChange, onRemove, value }) => {
|
|
|
93
93
|
<section>
|
|
94
94
|
<CreatableSelect
|
|
95
95
|
isClearable
|
|
96
|
-
onChange={e => handleChangeKey(e, `${name}.${index}.key`)}
|
|
96
|
+
onChange={(e) => handleChangeKey(e, `${name}.${index}.key`)}
|
|
97
97
|
name={`${name}.${index}.key`}
|
|
98
98
|
options={options}
|
|
99
99
|
styles={customStyles(get(errors, `headers.${index}.key`, null))}
|
|
@@ -49,7 +49,7 @@ function Inputs({
|
|
|
49
49
|
{({ canCheck, error, dispatch }) => {
|
|
50
50
|
const hasError = Boolean(error);
|
|
51
51
|
|
|
52
|
-
const handleChange = e => {
|
|
52
|
+
const handleChange = (e) => {
|
|
53
53
|
if (!canCheck) {
|
|
54
54
|
dispatch({
|
|
55
55
|
type: 'SET_CHECK',
|
|
@@ -68,7 +68,7 @@ function Inputs({
|
|
|
68
68
|
<EventInput
|
|
69
69
|
{...rest}
|
|
70
70
|
name={name}
|
|
71
|
-
onChange={e => {
|
|
71
|
+
onChange={(e) => {
|
|
72
72
|
handleChange(e);
|
|
73
73
|
}}
|
|
74
74
|
value={value}
|
|
@@ -33,7 +33,7 @@ function ListRow({
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
icon: canDelete ? <FontAwesomeIcon icon={faTrashAlt} /> : null,
|
|
36
|
-
onClick: e => {
|
|
36
|
+
onClick: (e) => {
|
|
37
37
|
e.stopPropagation();
|
|
38
38
|
onDeleteCLick(id);
|
|
39
39
|
},
|
|
@@ -55,7 +55,7 @@ function ListRow({
|
|
|
55
55
|
<Checkbox
|
|
56
56
|
name={name}
|
|
57
57
|
value={isChecked}
|
|
58
|
-
onClick={e => e.stopPropagation()}
|
|
58
|
+
onClick={(e) => e.stopPropagation()}
|
|
59
59
|
onChange={({ target: { value } }) => onCheckChange(value, id)}
|
|
60
60
|
/>
|
|
61
61
|
</td>
|
|
@@ -67,7 +67,7 @@ function ListRow({
|
|
|
67
67
|
<p title={url}>{url}</p>
|
|
68
68
|
</td>
|
|
69
69
|
<td className="switchWrapper">
|
|
70
|
-
<div onClick={e => e.stopPropagation()} role="button" aria-hidden="true">
|
|
70
|
+
<div onClick={(e) => e.stopPropagation()} role="button" aria-hidden="true">
|
|
71
71
|
<Switch
|
|
72
72
|
disabled={!canUpdate}
|
|
73
73
|
name={name}
|
|
@@ -16,7 +16,7 @@ export default function configureStore(initialState = {}, reducers, strapi) {
|
|
|
16
16
|
// 2. routerMiddleware: Syncs the location/URL path to the state
|
|
17
17
|
const middlewares = [sagaMiddleware];
|
|
18
18
|
|
|
19
|
-
strapi.middlewares.middlewares.forEach(middleware => {
|
|
19
|
+
strapi.middlewares.middlewares.forEach((middleware) => {
|
|
20
20
|
middlewares.push(middleware());
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -2,11 +2,11 @@ import styled from 'styled-components';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
const Content = styled.div`
|
|
5
|
-
min-height: calc(100vh - ${props => props.theme.main.sizes.header.height});
|
|
6
|
-
width: calc(100vw - ${props => props.theme.main.sizes.leftMenu.width});
|
|
7
|
-
margin-top: ${props => props.theme.main.sizes.header.height};
|
|
8
|
-
margin-left: ${props => props.theme.main.sizes.leftMenu.width};
|
|
9
|
-
background: ${props => props.theme.main.colors.content['background-alpha']};
|
|
5
|
+
min-height: calc(100vh - ${(props) => props.theme.main.sizes.header.height});
|
|
6
|
+
width: calc(100vw - ${(props) => props.theme.main.sizes.leftMenu.width});
|
|
7
|
+
margin-top: ${(props) => props.theme.main.sizes.header.height};
|
|
8
|
+
margin-left: ${(props) => props.theme.main.sizes.leftMenu.width};
|
|
9
|
+
background: ${(props) => props.theme.main.colors.content['background-alpha']};
|
|
10
10
|
`;
|
|
11
11
|
|
|
12
12
|
Content.defaultProps = {
|
|
@@ -18,7 +18,7 @@ const initialState = {
|
|
|
18
18
|
|
|
19
19
|
const reducer = (state = initialState, action) =>
|
|
20
20
|
// eslint-disable-next-line consistent-return
|
|
21
|
-
produce(state, draftState => {
|
|
21
|
+
produce(state, (draftState) => {
|
|
22
22
|
switch (action.type) {
|
|
23
23
|
case GET_STRAPI_LATEST_RELEASE_SUCCEEDED: {
|
|
24
24
|
draftState.latestStrapiReleaseTag = action.latestStrapiReleaseTag;
|
|
@@ -4,7 +4,7 @@ import { initialState } from './reducer';
|
|
|
4
4
|
/**
|
|
5
5
|
* Direct selector to the admin state domain
|
|
6
6
|
*/
|
|
7
|
-
const selectAdminDomain = () => state => {
|
|
7
|
+
const selectAdminDomain = () => (state) => {
|
|
8
8
|
return state.get('admin') || initialState;
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ const selectAdminDomain = () => state => {
|
|
|
16
16
|
* Default selector used by Admin
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
const makeSelectAdmin = () => createSelector(selectAdminDomain(), substate => substate);
|
|
19
|
+
const makeSelectAdmin = () => createSelector(selectAdminDomain(), (substate) => substate);
|
|
20
20
|
|
|
21
21
|
export default makeSelectAdmin;
|
|
22
22
|
export { selectAdminDomain };
|
|
@@ -3,28 +3,29 @@ import { createSelector } from 'reselect';
|
|
|
3
3
|
/**
|
|
4
4
|
* Direct selector to the languageToggle state domain
|
|
5
5
|
*/
|
|
6
|
-
const selectApp = () => state => state.get('app');
|
|
6
|
+
const selectApp = () => (state) => state.get('app');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Select the language locale
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
const selectPlugins = () => createSelector(selectApp(), appState => appState.get('plugins'));
|
|
12
|
+
const selectPlugins = () => createSelector(selectApp(), (appState) => appState.get('plugins'));
|
|
13
13
|
|
|
14
|
-
const makeSelectApp = () => createSelector(selectApp(), appState => appState.toJS());
|
|
14
|
+
const makeSelectApp = () => createSelector(selectApp(), (appState) => appState.toJS());
|
|
15
15
|
|
|
16
16
|
const selectHasUserPlugin = () =>
|
|
17
|
-
createSelector(selectApp(), appState => appState.get('hasUserPlugin'));
|
|
17
|
+
createSelector(selectApp(), (appState) => appState.get('hasUserPlugin'));
|
|
18
18
|
|
|
19
19
|
const makeSelectShowGlobalAppBlocker = () =>
|
|
20
|
-
createSelector(selectApp(), appState => appState.get('showGlobalAppBlocker'));
|
|
20
|
+
createSelector(selectApp(), (appState) => appState.get('showGlobalAppBlocker'));
|
|
21
21
|
|
|
22
|
-
const makeSelectBlockApp = () =>
|
|
22
|
+
const makeSelectBlockApp = () =>
|
|
23
|
+
createSelector(selectApp(), (appState) => appState.get('blockApp'));
|
|
23
24
|
|
|
24
25
|
const makeSelectOverlayBlockerProps = () =>
|
|
25
|
-
createSelector(selectApp(), appState => appState.get('overlayBlockerData'));
|
|
26
|
+
createSelector(selectApp(), (appState) => appState.get('overlayBlockerData'));
|
|
26
27
|
|
|
27
|
-
const makeSelectUuid = () => createSelector(selectApp(), appState => appState.get('uuid'));
|
|
28
|
+
const makeSelectUuid = () => createSelector(selectApp(), (appState) => appState.get('uuid'));
|
|
28
29
|
|
|
29
30
|
export default makeSelectApp;
|
|
30
31
|
export {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
li.header{
|
|
1
|
+
li.header {
|
|
2
2
|
color: #101622 !important;
|
|
3
3
|
font-weight: 600;
|
|
4
4
|
letter-spacing: 0.07rem;
|
|
5
5
|
-webkit-font-smoothing: subpixel-antialiased;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
li.chapter > a{
|
|
8
|
+
li.chapter > a {
|
|
9
9
|
transition: background-color 0.15s ease;
|
|
10
10
|
-webkit-transition: background-color 0.15s ease;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
li.chapter:hover > a{
|
|
13
|
+
li.chapter:hover > a {
|
|
14
14
|
background: #eee !important;
|
|
15
15
|
text-decoration: none !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.versions-select select{
|
|
18
|
+
.versions-select select {
|
|
19
19
|
height: 36px;
|
|
20
20
|
border: 1px solid #ccc;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.book-summary{
|
|
23
|
+
.book-summary {
|
|
24
24
|
background-color: #f7f7f7 !important;
|
|
25
25
|
}
|
|
@@ -11,9 +11,9 @@ import makeSelectApp from '../App/selectors';
|
|
|
11
11
|
import makeSelectAdmin from '../Admin/selectors';
|
|
12
12
|
import { Detail, InfoText } from './components';
|
|
13
13
|
|
|
14
|
-
const makeSelectAppInfos = () => createSelector(makeSelectApp(), appState => appState.appInfos);
|
|
14
|
+
const makeSelectAppInfos = () => createSelector(makeSelectApp(), (appState) => appState.appInfos);
|
|
15
15
|
const makeSelectLatestRelease = () =>
|
|
16
|
-
createSelector(makeSelectAdmin(), adminState => ({
|
|
16
|
+
createSelector(makeSelectAdmin(), (adminState) => ({
|
|
17
17
|
latestStrapiReleaseTag: adminState.latestStrapiReleaseTag,
|
|
18
18
|
shouldUpdateStrapi: adminState.shouldUpdateStrapi,
|
|
19
19
|
}));
|
|
@@ -22,8 +22,8 @@ const ApplicationInfosPage = () => {
|
|
|
22
22
|
const { formatMessage } = useIntl();
|
|
23
23
|
const selectAppInfos = useMemo(makeSelectAppInfos, []);
|
|
24
24
|
const selectLatestRealase = useMemo(makeSelectLatestRelease, []);
|
|
25
|
-
const appInfos = useSelector(state => selectAppInfos(state));
|
|
26
|
-
const { shouldUpdateStrapi, latestStrapiReleaseTag } = useSelector(state =>
|
|
25
|
+
const appInfos = useSelector((state) => selectAppInfos(state));
|
|
26
|
+
const { shouldUpdateStrapi, latestStrapiReleaseTag } = useSelector((state) =>
|
|
27
27
|
selectLatestRealase(state)
|
|
28
28
|
);
|
|
29
29
|
|
|
@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
|
|
4
4
|
import BaseLogin from './BaseLogin';
|
|
5
5
|
|
|
6
|
-
const Login = loginProps => {
|
|
6
|
+
const Login = (loginProps) => {
|
|
7
7
|
return <BaseLogin {...loginProps} />;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
Login.defaultProps = {
|
|
11
|
-
onSubmit: e => e.preventDefault(),
|
|
11
|
+
onSubmit: (e) => e.preventDefault(),
|
|
12
12
|
requestError: null,
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -37,12 +37,12 @@ const Register = ({
|
|
|
37
37
|
|
|
38
38
|
const terms = (
|
|
39
39
|
<FormattedMessage id="Auth.privacy-policy-agreement.terms" key="1">
|
|
40
|
-
{content => <Span onClick={e => handleClick(e, 'terms')}>{content}</Span>}
|
|
40
|
+
{(content) => <Span onClick={(e) => handleClick(e, 'terms')}>{content}</Span>}
|
|
41
41
|
</FormattedMessage>
|
|
42
42
|
);
|
|
43
43
|
const policy = (
|
|
44
44
|
<FormattedMessage id="Auth.privacy-policy-agreement.policy" key="2">
|
|
45
|
-
{content => <Span onClick={e => handleClick(e, 'privacy')}>{content}</Span>}
|
|
45
|
+
{(content) => <Span onClick={(e) => handleClick(e, 'privacy')}>{content}</Span>}
|
|
46
46
|
</FormattedMessage>
|
|
47
47
|
);
|
|
48
48
|
|
|
@@ -155,7 +155,7 @@ Register.defaultProps = {
|
|
|
155
155
|
fieldsToDisable: [],
|
|
156
156
|
inputsPrefix: '',
|
|
157
157
|
noSignin: false,
|
|
158
|
-
onSubmit: e => e.preventDefault(),
|
|
158
|
+
onSubmit: (e) => e.preventDefault(),
|
|
159
159
|
requestError: null,
|
|
160
160
|
};
|
|
161
161
|
|
|
@@ -14,10 +14,7 @@ const forms = {
|
|
|
14
14
|
fieldsToDisable: [],
|
|
15
15
|
fieldsToOmit: [],
|
|
16
16
|
schema: yup.object().shape({
|
|
17
|
-
email: yup
|
|
18
|
-
.string()
|
|
19
|
-
.email(translatedErrors.email)
|
|
20
|
-
.required(translatedErrors.required),
|
|
17
|
+
email: yup.string().email(translatedErrors.email).required(translatedErrors.required),
|
|
21
18
|
}),
|
|
22
19
|
inputsPrefix: '',
|
|
23
20
|
},
|
|
@@ -35,10 +32,7 @@ const forms = {
|
|
|
35
32
|
fieldsToDisable: [],
|
|
36
33
|
fieldsToOmit: ['rememberMe'],
|
|
37
34
|
schema: yup.object().shape({
|
|
38
|
-
email: yup
|
|
39
|
-
.string()
|
|
40
|
-
.email(translatedErrors.email)
|
|
41
|
-
.required(translatedErrors.required),
|
|
35
|
+
email: yup.string().email(translatedErrors.email).required(translatedErrors.required),
|
|
42
36
|
password: yup.string().required(translatedErrors.required),
|
|
43
37
|
rememberMe: yup.bool().nullable(),
|
|
44
38
|
}),
|
|
@@ -18,8 +18,7 @@ import SocialLink from './SocialLink';
|
|
|
18
18
|
|
|
19
19
|
const FIRST_BLOCK_LINKS = [
|
|
20
20
|
{
|
|
21
|
-
link:
|
|
22
|
-
'https://strapi.akemona.com/documentation/developer-docs/latest/getting-started/quick-start.html#_4-create-a-category-content-type',
|
|
21
|
+
link: 'https://strapi.akemona.com/documentation/developer-docs/latest/getting-started/quick-start.html#_4-create-a-category-content-type',
|
|
23
22
|
contentId: 'app.components.BlockLink.documentation.content',
|
|
24
23
|
titleId: 'app.components.BlockLink.documentation',
|
|
25
24
|
},
|
|
@@ -66,7 +65,7 @@ const HomePage = ({ history: { push } }) => {
|
|
|
66
65
|
// Temporary until we develop the menu API
|
|
67
66
|
const { collectionTypes, singleTypes, isLoading: isLoadingForModels } = useModels();
|
|
68
67
|
|
|
69
|
-
const handleClick = e => {
|
|
68
|
+
const handleClick = (e) => {
|
|
70
69
|
e.preventDefault();
|
|
71
70
|
|
|
72
71
|
push(
|
|
@@ -75,7 +74,7 @@ const HomePage = ({ history: { push } }) => {
|
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
const hasAlreadyCreatedContentTypes = useMemo(() => {
|
|
78
|
-
const filterContentTypes = contentTypes => contentTypes.filter(c => c.isDisplayed);
|
|
77
|
+
const filterContentTypes = (contentTypes) => contentTypes.filter((c) => c.isDisplayed);
|
|
79
78
|
|
|
80
79
|
return (
|
|
81
80
|
filterContentTypes(collectionTypes).length > 1 || filterContentTypes(singleTypes).length > 0
|
|
@@ -108,7 +107,7 @@ const HomePage = ({ history: { push } }) => {
|
|
|
108
107
|
return (
|
|
109
108
|
<>
|
|
110
109
|
<FormattedMessage id="HomePage.helmet.title">
|
|
111
|
-
{title => <PageTitle title={title} />}
|
|
110
|
+
{(title) => <PageTitle title={title} />}
|
|
112
111
|
</FormattedMessage>
|
|
113
112
|
<Container className="container-fluid">
|
|
114
113
|
<div className="row">
|
|
@@ -121,21 +120,21 @@ const HomePage = ({ history: { push } }) => {
|
|
|
121
120
|
name: upperFirst(username),
|
|
122
121
|
}}
|
|
123
122
|
>
|
|
124
|
-
{msg => <h2 id="mainHeader">{msg}</h2>}
|
|
123
|
+
{(msg) => <h2 id="mainHeader">{msg}</h2>}
|
|
125
124
|
</FormattedMessage>
|
|
126
125
|
{hasAlreadyCreatedContentTypes ? (
|
|
127
126
|
<FormattedMessage id="app.components.HomePage.welcomeBlock.content.again">
|
|
128
|
-
{msg => <P>{msg}</P>}
|
|
127
|
+
{(msg) => <P>{msg}</P>}
|
|
129
128
|
</FormattedMessage>
|
|
130
129
|
) : (
|
|
131
130
|
<FormattedMessage id="HomePage.welcome.congrats">
|
|
132
|
-
{congrats => {
|
|
131
|
+
{(congrats) => {
|
|
133
132
|
return (
|
|
134
133
|
<FormattedMessage id="HomePage.welcome.congrats.content">
|
|
135
|
-
{content => {
|
|
134
|
+
{(content) => {
|
|
136
135
|
return (
|
|
137
136
|
<FormattedMessage id="HomePage.welcome.congrats.content.bold">
|
|
138
|
-
{boldContent => {
|
|
137
|
+
{(boldContent) => {
|
|
139
138
|
return (
|
|
140
139
|
<P>
|
|
141
140
|
<b>{congrats}</b>
|
|
@@ -166,7 +165,7 @@ const HomePage = ({ history: { push } }) => {
|
|
|
166
165
|
</div>
|
|
167
166
|
)}
|
|
168
167
|
<FormattedMessage id={linkProps.id}>
|
|
169
|
-
{msg => (
|
|
168
|
+
{(msg) => (
|
|
170
169
|
<ALink
|
|
171
170
|
rel="noopener noreferrer"
|
|
172
171
|
{...linkProps}
|
|
@@ -184,10 +183,10 @@ const HomePage = ({ history: { push } }) => {
|
|
|
184
183
|
return (
|
|
185
184
|
<LinkWrapper href={data.link} target="_blank" key={data.link} type={type}>
|
|
186
185
|
<FormattedMessage id={data.titleId}>
|
|
187
|
-
{title => <p className="bold">{title}</p>}
|
|
186
|
+
{(title) => <p className="bold">{title}</p>}
|
|
188
187
|
</FormattedMessage>
|
|
189
188
|
<FormattedMessage id={data.contentId}>
|
|
190
|
-
{content => <p>{content}</p>}
|
|
189
|
+
{(content) => <p>{content}</p>}
|
|
191
190
|
</FormattedMessage>
|
|
192
191
|
</LinkWrapper>
|
|
193
192
|
);
|
|
@@ -198,12 +197,12 @@ const HomePage = ({ history: { push } }) => {
|
|
|
198
197
|
|
|
199
198
|
<div className="col-md-12 col-lg-4">
|
|
200
199
|
<Block style={{ paddingRight: 30, paddingBottom: 0 }}>
|
|
201
|
-
<FormattedMessage id="HomePage.community">{msg => <h2>{msg}</h2>}</FormattedMessage>
|
|
200
|
+
<FormattedMessage id="HomePage.community">{(msg) => <h2>{msg}</h2>}</FormattedMessage>
|
|
202
201
|
<FormattedMessage id="app.components.HomePage.community.content">
|
|
203
|
-
{content => <P style={{ marginTop: 7, marginBottom: 0 }}>{content}</P>}
|
|
202
|
+
{(content) => <P style={{ marginTop: 7, marginBottom: 0 }}>{content}</P>}
|
|
204
203
|
</FormattedMessage>
|
|
205
204
|
<FormattedMessage id="HomePage.roadmap">
|
|
206
|
-
{msg => (
|
|
205
|
+
{(msg) => (
|
|
207
206
|
<ALink
|
|
208
207
|
rel="noopener noreferrer"
|
|
209
208
|
href="https://portal.productboard.com/strapi/1-public-roadmap/tabs/2-under-consideration"
|
|
@@ -9,7 +9,7 @@ import generateRows from './utils/generateRows';
|
|
|
9
9
|
|
|
10
10
|
const InstalledPluginsPage = () => {
|
|
11
11
|
const { formatMessage, plugins } = useGlobalContext();
|
|
12
|
-
const onConfirm = async id => {
|
|
12
|
+
const onConfirm = async (id) => {
|
|
13
13
|
try {
|
|
14
14
|
const requestUrl = `/admin/plugins/uninstall/${id}`;
|
|
15
15
|
// Force the Overlayblocker to be displayed
|
|
@@ -38,7 +38,7 @@ LanguageProvider.propTypes = {
|
|
|
38
38
|
messages: PropTypes.object.isRequired,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const mapStateToProps = createSelector(selectLocale(), locale => ({ locale }));
|
|
41
|
+
const mapStateToProps = createSelector(selectLocale(), (locale) => ({ locale }));
|
|
42
42
|
|
|
43
43
|
function mapDispatchToProps(dispatch) {
|
|
44
44
|
return {
|
|
@@ -3,23 +3,16 @@ import { createSelector } from 'reselect';
|
|
|
3
3
|
/**
|
|
4
4
|
* Direct selector to the languageToggle state domain
|
|
5
5
|
*/
|
|
6
|
-
const selectLanguage = () => state => state.get('language');
|
|
6
|
+
const selectLanguage = () => (state) => state.get('language');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Select the language locale
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const selectLocale = () =>
|
|
13
|
-
createSelector(
|
|
14
|
-
selectLanguage(),
|
|
15
|
-
languageState => languageState.get('locale'),
|
|
16
|
-
);
|
|
13
|
+
createSelector(selectLanguage(), (languageState) => languageState.get('locale'));
|
|
17
14
|
|
|
18
|
-
const makeSelectLocale = () =>
|
|
19
|
-
createSelector(
|
|
20
|
-
selectLocale(),
|
|
21
|
-
locale => ({ locale }),
|
|
22
|
-
);
|
|
15
|
+
const makeSelectLocale = () => createSelector(selectLocale(), (locale) => ({ locale }));
|
|
23
16
|
|
|
24
17
|
export default makeSelectLocale;
|
|
25
18
|
export { selectLanguage, selectLocale };
|