@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.
Files changed (129) hide show
  1. package/admin/src/components/FormBloc/index.js +3 -3
  2. package/admin/src/components/HeaderSearch/index.js +2 -2
  3. package/admin/src/components/IntlInput/index.js +2 -2
  4. package/admin/src/components/LeftMenu/LeftMenuFooter/Wrapper.js +3 -1
  5. package/admin/src/components/LeftMenu/LeftMenuHeader/index.js +3 -3
  6. package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuIcon.js +3 -1
  7. package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuLinkContent.js +3 -3
  8. package/admin/src/components/LeftMenu/LeftMenuLink/NotificationCount.js +3 -3
  9. package/admin/src/components/LeftMenu/LeftMenuLink/index.js +2 -2
  10. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/index.js +2 -2
  11. package/admin/src/components/LeftMenu/LeftMenuLinkSection/index.js +3 -3
  12. package/admin/src/components/PageTitle/index.js +3 -3
  13. package/admin/src/components/Roles/ButtonWithNumber/index.js +2 -2
  14. package/admin/src/components/Roles/ConditionsButton/index.js +2 -2
  15. package/admin/src/components/Roles/ConditionsModal/ActionRow/index.js +3 -3
  16. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/ClearIndicator.js +2 -2
  17. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/CustomDropdownIndicator.js +2 -2
  18. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/IndicatorSeparator.js +3 -1
  19. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/SubUl.js +2 -2
  20. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/index.js +2 -2
  21. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/SingleValue.js +2 -2
  22. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/index.js +3 -3
  23. package/admin/src/components/Roles/ConditionsModal/index.js +3 -3
  24. package/admin/src/components/Roles/ContentTypeCollapse/Collapse/index.js +3 -3
  25. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +3 -3
  26. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +2 -2
  27. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +3 -3
  28. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/index.js +3 -3
  29. package/admin/src/components/Roles/ContentTypeCollapse/index.js +3 -3
  30. package/admin/src/components/Roles/ContentTypeCollapses/index.js +2 -2
  31. package/admin/src/components/Roles/ContentTypes/index.js +2 -2
  32. package/admin/src/components/Roles/Curve/index.js +3 -3
  33. package/admin/src/components/Roles/EmptyRole/index.js +2 -2
  34. package/admin/src/components/Roles/GlobalActions/index.js +2 -2
  35. package/admin/src/components/Roles/PermissionsDataManagerProvider/index.js +2 -2
  36. package/admin/src/components/Roles/PluginsAndSettings/Row/index.js +3 -3
  37. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/index.js +2 -2
  38. package/admin/src/components/Roles/PluginsAndSettings/index.js +2 -2
  39. package/admin/src/components/Roles/RequiredSign/index.js +3 -1
  40. package/admin/src/components/Roles/RoleForm/NameInput.js +3 -1
  41. package/admin/src/components/Roles/RoleForm/RoleForm.js +2 -2
  42. package/admin/src/components/Roles/RoleList/RoleRow.js +2 -2
  43. package/admin/src/components/Roles/RowLabelWithCheckbox/index.js +3 -3
  44. package/admin/src/components/Roles/Tabs/index.js +2 -2
  45. package/admin/src/components/Settings/Header/index.js +3 -3
  46. package/admin/src/components/SettingsPageTitle/index.js +2 -2
  47. package/admin/src/components/SizedInput/index.js +2 -2
  48. package/admin/src/components/UpgradePlanModal/components/Option/index.js +2 -2
  49. package/admin/src/components/UpgradePlanModal/index.js +2 -2
  50. package/admin/src/components/Users/Filter/index.js +2 -2
  51. package/admin/src/components/Users/FilterPicker/Button.js +2 -2
  52. package/admin/src/components/Users/FilterPicker/Card/index.js +2 -2
  53. package/admin/src/components/Users/FilterPicker/index.js +2 -2
  54. package/admin/src/components/Users/Footer/index.js +2 -2
  55. package/admin/src/components/Users/LinkNotification/Envelope.js +3 -3
  56. package/admin/src/components/Users/LinkNotification/index.js +2 -2
  57. package/admin/src/components/Users/MagicLink/index.js +2 -2
  58. package/admin/src/components/Users/RoleSettingsModalSection/RolesSelectComponent.js +2 -2
  59. package/admin/src/components/Users/RoleSettingsModalSection/index.js +2 -2
  60. package/admin/src/components/Users/SelectRoles/ClearIndicator.js +2 -2
  61. package/admin/src/components/Users/SelectRoles/DropdownIndicator.js +2 -2
  62. package/admin/src/components/Users/SelectRoles/IndicatorSeparator.js +3 -1
  63. package/admin/src/components/Users/SelectRoles/MultiValueContainer.js +2 -2
  64. package/admin/src/components/Users/SelectRoles/index.js +2 -2
  65. package/admin/src/components/Users/SortPicker/Button.js +2 -2
  66. package/admin/src/components/Users/SortPicker/List.js +2 -2
  67. package/admin/src/components/Users/SortPicker/ListItem.js +2 -2
  68. package/admin/src/components/Users/SortPicker/index.js +2 -2
  69. package/admin/src/components/Webhooks/EventInput/EventRow.js +2 -2
  70. package/admin/src/components/Webhooks/EventInput/index.js +2 -2
  71. package/admin/src/components/Webhooks/HeadersInput/index.js +2 -2
  72. package/admin/src/components/Webhooks/TriggerContainer/index.js +2 -2
  73. package/admin/src/containers/ApplicationInfosPage/components/Detail/index.js +2 -2
  74. package/admin/src/containers/ApplicationInfosPage/components/InfoText/index.js +2 -2
  75. package/admin/src/containers/ApplicationInfosPage/components/Link/index.js +2 -2
  76. package/admin/src/containers/ApplicationInfosPage/index.js +2 -2
  77. package/admin/src/containers/AuthPage/components/AuthLink/index.js +2 -2
  78. package/admin/src/containers/AuthPage/components/Box/index.js +3 -3
  79. package/admin/src/containers/AuthPage/components/ForgotPassword/index.js +2 -2
  80. package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/Envelope.js +3 -3
  81. package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/index.js +2 -2
  82. package/admin/src/containers/AuthPage/components/Input/index.js +2 -2
  83. package/admin/src/containers/AuthPage/components/Login/BaseLogin.js +2 -2
  84. package/admin/src/containers/AuthPage/components/Login/index.js +2 -2
  85. package/admin/src/containers/AuthPage/components/Logo/index.js +3 -1
  86. package/admin/src/containers/AuthPage/components/Oops/index.js +2 -2
  87. package/admin/src/containers/AuthPage/components/Register/CustomLabel.js +2 -2
  88. package/admin/src/containers/AuthPage/components/Register/index.js +3 -3
  89. package/admin/src/containers/AuthPage/components/ResetPassword/index.js +2 -2
  90. package/admin/src/containers/AuthPage/index.js +2 -2
  91. package/admin/src/containers/HomePage/BlogPost.js +2 -2
  92. package/admin/src/containers/HomePage/SocialLink.js +2 -2
  93. package/admin/src/containers/InstalledPluginsPage/Row.js +2 -2
  94. package/admin/src/containers/InstalledPluginsPage/index.js +2 -2
  95. package/admin/src/containers/LeftMenu/Loader.js +2 -2
  96. package/admin/src/containers/LeftMenu/index.js +2 -2
  97. package/admin/src/containers/LeftMenu/useMenuSections.js +2 -3
  98. package/admin/src/containers/MarketplacePage/MarketplaceBanner/index.js +2 -2
  99. package/admin/src/containers/MarketplacePage/index.js +2 -2
  100. package/admin/src/containers/NewNotification/Notification/index.js +2 -2
  101. package/admin/src/containers/NewNotification/index.js +2 -2
  102. package/admin/src/containers/NotFoundPage/index.js +3 -1
  103. package/admin/src/containers/Onboarding/index.js +2 -2
  104. package/admin/src/containers/PermissionsManager/index.js +2 -2
  105. package/admin/src/containers/PrivateRoute/index.js +3 -3
  106. package/admin/src/containers/ProfilePage/index.js +2 -2
  107. package/admin/src/containers/Roles/CreatePage/index.js +2 -2
  108. package/admin/src/containers/Roles/EditPage/index.js +2 -2
  109. package/admin/src/containers/Roles/ListPage/index.js +2 -2
  110. package/admin/src/containers/Roles/ProtectedEditPage/index.js +2 -2
  111. package/admin/src/containers/Roles/ProtectedListPage/index.js +3 -3
  112. package/admin/src/containers/SettingsHeaderSearchContextProvider/index.js +2 -2
  113. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/index.js +2 -2
  114. package/admin/src/containers/SettingsPage/components/SettingDispatcher/index.js +2 -2
  115. package/admin/src/containers/Theme/index.js +2 -2
  116. package/admin/src/containers/Users/EditPage/index.js +2 -2
  117. package/admin/src/containers/Users/ListPage/Header.js +3 -3
  118. package/admin/src/containers/Users/ListPage/ModalForm.js +2 -2
  119. package/admin/src/containers/Users/ListPage/index.js +2 -2
  120. package/admin/src/containers/Users/ProtectedEditPage/index.js +2 -2
  121. package/admin/src/containers/Users/ProtectedListPage/index.js +3 -3
  122. package/admin/src/containers/Webhooks/ProtectedCreateView/index.js +3 -3
  123. package/admin/src/containers/Webhooks/ProtectedEditView/index.js +3 -3
  124. package/admin/src/containers/Webhooks/ProtectedListView/index.js +3 -3
  125. package/admin/src/contexts/MarketPlace/index.js +2 -2
  126. package/admin/src/utils/MiddlewareApi.js +1 -0
  127. package/controllers/authentication.js +2 -3
  128. package/middlewares/auth/index.js +2 -3
  129. package/package.json +4 -4
@@ -9,7 +9,7 @@ import CheckboxWithCondition from '../CheckboxWithCondition';
9
9
  import { findDisplayedActions, getCheckboxesState } from './utils';
10
10
  import Wrapper from './Wrapper';
11
11
 
12
- const GlobalActions = ({ actions, isFormDisabled, kind }) => {
12
+ function GlobalActions({ actions, isFormDisabled, kind }) {
13
13
  const { formatMessage } = useIntl();
14
14
  const { modifiedData, onChangeCollectionTypeGlobalActionCheckbox } = usePermissionsDataManager();
15
15
 
@@ -45,7 +45,7 @@ const GlobalActions = ({ actions, isFormDisabled, kind }) => {
45
45
  </Flex>
46
46
  </Wrapper>
47
47
  );
48
- };
48
+ }
49
49
 
50
50
  GlobalActions.defaultProps = {
51
51
  actions: [],
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { PermissionsDataManagerContext } from '../../../contexts';
4
4
 
5
- const PermissionsDataManagerProvider = ({ children, value }) => {
5
+ function PermissionsDataManagerProvider({ children, value }) {
6
6
  return (
7
7
  <PermissionsDataManagerContext.Provider value={value}>
8
8
  {children}
9
9
  </PermissionsDataManagerContext.Provider>
10
10
  );
11
- };
11
+ }
12
12
 
13
13
  PermissionsDataManagerProvider.propTypes = {
14
14
  children: PropTypes.node.isRequired,
@@ -7,7 +7,7 @@ import { useIntl } from 'react-intl';
7
7
  import SubCategory from '../SubCategory';
8
8
  import RowStyle from './Wrapper';
9
9
 
10
- const PermissionRow = ({
10
+ function PermissionRow({
11
11
  childrenForm,
12
12
  kind,
13
13
  name,
@@ -16,7 +16,7 @@ const PermissionRow = ({
16
16
  isWhite,
17
17
  onOpenCategory,
18
18
  pathToData,
19
- }) => {
19
+ }) {
20
20
  const { formatMessage } = useIntl();
21
21
 
22
22
  const handleClick = () => {
@@ -64,7 +64,7 @@ const PermissionRow = ({
64
64
  )}
65
65
  </RowContainer>
66
66
  );
67
- };
67
+ }
68
68
 
69
69
  PermissionRow.defaultProps = {};
70
70
 
@@ -22,7 +22,7 @@ const Border = styled.div`
22
22
  padding: 0px 10px;
23
23
  `;
24
24
 
25
- const SubCategory = ({ categoryName, isFormDisabled, subCategoryName, actions, pathToData }) => {
25
+ function SubCategory({ categoryName, isFormDisabled, subCategoryName, actions, pathToData }) {
26
26
  const [modalState, setModalState] = useState({ isOpen: false, isMounted: false });
27
27
  const { modifiedData, onChangeParentCheckbox, onChangeSimpleCheckbox } =
28
28
  usePermissionsDataManager();
@@ -120,7 +120,7 @@ const SubCategory = ({ categoryName, isFormDisabled, subCategoryName, actions, p
120
120
  )}
121
121
  </>
122
122
  );
123
- };
123
+ }
124
124
 
125
125
  SubCategory.propTypes = {
126
126
  actions: PropTypes.array.isRequired,
@@ -4,7 +4,7 @@ import { Padded } from '@buffetjs/core';
4
4
  import ListWrapper from './ListWrapper';
5
5
  import PermissionRow from './Row';
6
6
 
7
- const PluginsAndSettingsPermissions = ({ isFormDisabled, kind, layout }) => {
7
+ function PluginsAndSettingsPermissions({ isFormDisabled, kind, layout }) {
8
8
  const [openedCategory, setOpenedCategory] = useState(null);
9
9
 
10
10
  const handleOpenCategory = (categoryName) => {
@@ -32,7 +32,7 @@ const PluginsAndSettingsPermissions = ({ isFormDisabled, kind, layout }) => {
32
32
  </Padded>
33
33
  </ListWrapper>
34
34
  );
35
- };
35
+ }
36
36
 
37
37
  PluginsAndSettingsPermissions.propTypes = {
38
38
  isFormDisabled: PropTypes.bool.isRequired,
@@ -6,6 +6,8 @@ const Required = styled.span`
6
6
  padding-left: 2px;
7
7
  `;
8
8
 
9
- const RequiredSign = () => <Required>*</Required>;
9
+ function RequiredSign() {
10
+ return <Required>*</Required>
11
+ }
10
12
 
11
13
  export default RequiredSign;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import SizedInput from '../../SizedInput';
3
3
 
4
- const NameInput = (inputProps) => <SizedInput name="name" type="text" {...inputProps} />;
4
+ function NameInput(inputProps) {
5
+ return <SizedInput name="name" type="text" {...inputProps} />
6
+ }
5
7
 
6
8
  export default NameInput;
@@ -8,7 +8,7 @@ import FormCard from '../../FormBloc';
8
8
  import SizedInput from '../../SizedInput';
9
9
  import ButtonWithNumber from '../ButtonWithNumber';
10
10
 
11
- const RoleForm = ({ disabled, role, values, errors, onChange, onBlur, isLoading }) => {
11
+ function RoleForm({ disabled, role, values, errors, onChange, onBlur, isLoading }) {
12
12
  const { formatMessage } = useIntl();
13
13
 
14
14
  const actions = [
@@ -73,7 +73,7 @@ const RoleForm = ({ disabled, role, values, errors, onChange, onBlur, isLoading
73
73
  />
74
74
  </FormCard>
75
75
  );
76
- };
76
+ }
77
77
 
78
78
  RoleForm.defaultProps = {
79
79
  disabled: false,
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl';
6
6
 
7
7
  import RoleDescription from './RoleDescription';
8
8
 
9
- const RoleRow = ({ role, onClick, links, prefix }) => {
9
+ function RoleRow({ role, onClick, links, prefix }) {
10
10
  const { formatMessage } = useIntl();
11
11
  const number = role.usersCount;
12
12
  const text = formatMessage(
@@ -31,7 +31,7 @@ const RoleRow = ({ role, onClick, links, prefix }) => {
31
31
  </td>
32
32
  </CustomRow>
33
33
  );
34
- };
34
+ }
35
35
 
36
36
  RoleRow.defaultProps = {
37
37
  onClick: null,
@@ -4,7 +4,7 @@ import { Checkbox, Text } from '@buffetjs/core';
4
4
  import CollapseLabel from '../CollapseLabel';
5
5
  import Wrapper from './Wrapper';
6
6
 
7
- const RowLabelWithCheckbox = ({
7
+ function RowLabelWithCheckbox({
8
8
  children,
9
9
  isCollapsable,
10
10
  isFormDisabled,
@@ -16,7 +16,7 @@ const RowLabelWithCheckbox = ({
16
16
  textColor,
17
17
  value,
18
18
  width,
19
- }) => {
19
+ }) {
20
20
  return (
21
21
  <Wrapper width={width} disabled={isFormDisabled}>
22
22
  <Checkbox
@@ -46,7 +46,7 @@ const RowLabelWithCheckbox = ({
46
46
  </CollapseLabel>
47
47
  </Wrapper>
48
48
  );
49
- };
49
+ }
50
50
 
51
51
  RowLabelWithCheckbox.defaultProps = {
52
52
  children: null,
@@ -7,7 +7,7 @@ import { useIntl } from 'react-intl';
7
7
  import TabsWrapper from './TabsWrapper';
8
8
  import Tab from './Tab';
9
9
 
10
- const Tabs = ({ children, isLoading, tabsLabel }) => {
10
+ function Tabs({ children, isLoading, tabsLabel }) {
11
11
  const { formatMessage } = useIntl();
12
12
  const [selectedTabIndex, setSelectedTabIndex] = useState(0);
13
13
  const selectedChild = React.Children.toArray(children)[selectedTabIndex];
@@ -44,7 +44,7 @@ const Tabs = ({ children, isLoading, tabsLabel }) => {
44
44
  )}
45
45
  </TabsWrapper>
46
46
  );
47
- };
47
+ }
48
48
 
49
49
  Tabs.defaultProps = {
50
50
  isLoading: false,
@@ -4,7 +4,7 @@ import { isEqual } from 'lodash';
4
4
  import { useIntl } from 'react-intl';
5
5
  import PropTypes from 'prop-types';
6
6
 
7
- const Header = ({
7
+ function Header({
8
8
  content,
9
9
  initialData,
10
10
  isLoading,
@@ -12,7 +12,7 @@ const Header = ({
12
12
  modifiedData,
13
13
  onCancel,
14
14
  showHeaderButtonLoader,
15
- }) => {
15
+ }) {
16
16
  const { formatMessage } = useIntl();
17
17
  const areButtonsDisabled = useMemo(() => {
18
18
  return isEqual(modifiedData, initialData);
@@ -52,7 +52,7 @@ const Header = ({
52
52
  /* eslint-enable indent */
53
53
 
54
54
  return <PluginHeader {...headerProps} isLoading={isLoading} />;
55
- };
55
+ }
56
56
 
57
57
  Header.defaultProps = {
58
58
  content: null,
@@ -3,12 +3,12 @@ import { useIntl } from 'react-intl';
3
3
  import PropTypes from 'prop-types';
4
4
  import PageTitle from '../PageTitle';
5
5
 
6
- const SettingsPageTitle = ({ name }) => {
6
+ function SettingsPageTitle({ name }) {
7
7
  const { formatMessage } = useIntl();
8
8
  const text = formatMessage({ id: 'Settings.PageTitle' }, { name });
9
9
 
10
10
  return <PageTitle title={text} />;
11
- };
11
+ }
12
12
 
13
13
  SettingsPageTitle.propTypes = {
14
14
  name: PropTypes.string.isRequired,
@@ -4,13 +4,13 @@ import PropTypes from 'prop-types';
4
4
  import IntlInput from '../IntlInput';
5
5
 
6
6
  // TODO: remove this component
7
- const SizedInput = ({ size, ...rest }) => {
7
+ function SizedInput({ size, ...rest }) {
8
8
  return (
9
9
  <Col {...size}>
10
10
  <IntlInput {...rest} />
11
11
  </Col>
12
12
  );
13
- };
13
+ }
14
14
 
15
15
  SizedInput.defaultProps = {
16
16
  size: {
@@ -3,7 +3,7 @@ import { Text } from '@buffetjs/core';
3
3
  import { useIntl } from 'react-intl';
4
4
  import Wrapper from './Wrapper';
5
5
 
6
- const Option = () => {
6
+ function Option() {
7
7
  const { formatMessage } = useIntl();
8
8
 
9
9
  return (
@@ -13,6 +13,6 @@ const Option = () => {
13
13
  </Text>
14
14
  </Wrapper>
15
15
  );
16
- };
16
+ }
17
17
 
18
18
  export default Option;
@@ -7,7 +7,7 @@ import { Modal } from '@akemona-org/strapi-helper-plugin';
7
7
  import { useIntl } from 'react-intl';
8
8
  import { Arrow, Download, Option, Wrapper } from './components';
9
9
 
10
- const UpgradePlanModal = ({ isOpen, onToggle }) => {
10
+ function UpgradePlanModal({ isOpen, onToggle }) {
11
11
  const ref = useRef();
12
12
  const { formatMessage } = useIntl();
13
13
 
@@ -61,7 +61,7 @@ const UpgradePlanModal = ({ isOpen, onToggle }) => {
61
61
  />
62
62
  </Modal>
63
63
  );
64
- };
64
+ }
65
65
 
66
66
  UpgradePlanModal.defaultProps = {
67
67
  isOpen: false,
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { useIntl } from 'react-intl';
4
4
  import { Option, Text } from '@buffetjs/core';
5
5
 
6
- const Filter = ({ displayName, filter, name, onClick, value }) => {
6
+ function Filter({ displayName, filter, name, onClick, value }) {
7
7
  const { formatMessage } = useIntl();
8
8
  const label = (
9
9
  <>
@@ -24,7 +24,7 @@ const Filter = ({ displayName, filter, name, onClick, value }) => {
24
24
  };
25
25
 
26
26
  return <Option label={label} margin="0 10px 6px 0" onClick={handleClick} />;
27
- };
27
+ }
28
28
 
29
29
  Filter.defaultProps = {
30
30
  onClick: () => {},
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
3
  import { FilterIcon } from '@akemona-org/strapi-helper-plugin';
4
4
 
5
- const Button = () => {
5
+ function Button() {
6
6
  return (
7
7
  <>
8
8
  <FilterIcon />
9
9
  <FormattedMessage id="app.utils.filters" />
10
10
  </>
11
11
  );
12
- };
12
+ }
13
13
 
14
14
  export default Button;
@@ -9,7 +9,7 @@ import init from './init';
9
9
  import Input from './Input';
10
10
  import Wrapper from './Wrapper';
11
11
 
12
- const Card = ({ onChange }) => {
12
+ function Card({ onChange }) {
13
13
  const [
14
14
  {
15
15
  modifiedData: { name, filter, value },
@@ -78,7 +78,7 @@ const Card = ({ onChange }) => {
78
78
  </Button>
79
79
  </Wrapper>
80
80
  );
81
- };
81
+ }
82
82
 
83
83
  Card.defaultProps = {
84
84
  onChange: () => {},
@@ -5,7 +5,7 @@ import { Picker } from '@buffetjs/core';
5
5
  import Button from './Button';
6
6
  import Card from './Card';
7
7
 
8
- const FilterPicker = ({ onChange }) => {
8
+ function FilterPicker({ onChange }) {
9
9
  return (
10
10
  <Picker
11
11
  renderButtonContent={Button}
@@ -22,7 +22,7 @@ const FilterPicker = ({ onChange }) => {
22
22
  )}
23
23
  />
24
24
  );
25
- };
25
+ }
26
26
 
27
27
  FilterPicker.defaultProps = {
28
28
  onChange: () => {},
@@ -4,7 +4,7 @@ import { PageFooter } from '@akemona-org/strapi-helper-plugin';
4
4
  import { Padded } from '@buffetjs/core';
5
5
  import Wrapper from './Wrapper';
6
6
 
7
- const Footer = ({ count, onChange, params }) => {
7
+ function Footer({ count, onChange, params }) {
8
8
  return (
9
9
  <Wrapper>
10
10
  <Padded left right size="xs">
@@ -17,7 +17,7 @@ const Footer = ({ count, onChange, params }) => {
17
17
  </Padded>
18
18
  </Wrapper>
19
19
  );
20
- };
20
+ }
21
21
 
22
22
  Footer.defaultProps = {
23
23
  count: 0,
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable jsx-a11y/accessible-emoji */
2
2
  import React from 'react';
3
3
 
4
- const Envelope = () => (
5
- <svg width="24" height="17" xmlns="http://www.w3.org/2000/svg">
4
+ function Envelope() {
5
+ return <svg width="24" height="17" xmlns="http://www.w3.org/2000/svg">
6
6
  <text
7
7
  transform="translate(-23 -9)"
8
8
  fill="#4B515A"
@@ -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 IconWrapper from './IconWrapper';
9
9
  import Envelope from './Envelope';
10
10
  import Wrapper from './Wrapper';
11
11
 
12
- const LinkNotification = ({ target, children }) => {
12
+ function LinkNotification({ target, children }) {
13
13
  const handleCopy = () => {
14
14
  strapi.notification.toggle({ type: 'info', message: { id: 'notification.link-copied' } });
15
15
  };
@@ -32,7 +32,7 @@ const LinkNotification = ({ target, children }) => {
32
32
  </Flex>
33
33
  </Wrapper>
34
34
  );
35
- };
35
+ }
36
36
 
37
37
  LinkNotification.defaultProps = {
38
38
  target: '',
@@ -4,7 +4,7 @@ import { useIntl } from 'react-intl';
4
4
  import LinkNotification from '../LinkNotification';
5
5
  import basename from '../../../utils/basename';
6
6
 
7
- const MagicLink = ({ registrationToken }) => {
7
+ function MagicLink({ registrationToken }) {
8
8
  const { formatMessage } = useIntl();
9
9
 
10
10
  const link = `${window.location.origin}${basename}auth/register?registrationToken=${registrationToken}`;
@@ -14,7 +14,7 @@ const MagicLink = ({ registrationToken }) => {
14
14
  {formatMessage({ id: 'app.components.Users.MagicLink.connect' })}
15
15
  </LinkNotification>
16
16
  );
17
- };
17
+ }
18
18
 
19
19
  MagicLink.defaultProps = {
20
20
  registrationToken: '',
@@ -13,7 +13,7 @@ const Description = styled(BaseDescription)`
13
13
  line-height: normal;
14
14
  `;
15
15
 
16
- const RolesSelectComponent = ({ isDisabled, value, error, onChange }) => {
16
+ function RolesSelectComponent({ isDisabled, value, error, onChange }) {
17
17
  const { formatMessage } = useIntl();
18
18
 
19
19
  return (
@@ -37,7 +37,7 @@ const RolesSelectComponent = ({ isDisabled, value, error, onChange }) => {
37
37
  </Description>
38
38
  </Col>
39
39
  );
40
- };
40
+ }
41
41
 
42
42
  RolesSelectComponent.defaultProps = {
43
43
  value: null,
@@ -9,7 +9,7 @@ import roleSettingsForm from 'ee_else_ce/components/Users/ModalCreateBody/utils/
9
9
  import Input from '../../SizedInput';
10
10
  import Wrapper from '../ModalCreateBody/Wrapper';
11
11
 
12
- const RoleSettingsModalSection = ({ isDisabled, modifiedData, onChange, formErrors }) => {
12
+ function RoleSettingsModalSection({ isDisabled, modifiedData, onChange, formErrors }) {
13
13
  const { formatMessage } = useIntl();
14
14
 
15
15
  return (
@@ -53,7 +53,7 @@ const RoleSettingsModalSection = ({ isDisabled, modifiedData, onChange, formErro
53
53
  </Wrapper>
54
54
  </ModalSection>
55
55
  );
56
- };
56
+ }
57
57
 
58
58
  RoleSettingsModalSection.defaultProps = {
59
59
  isDisabled: false,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Remove } from '@buffetjs/icons';
3
3
  import { components } from 'react-select';
4
4
 
5
- const ClearIndicator = (props) => {
5
+ function ClearIndicator(props) {
6
6
  const Component = components.ClearIndicator;
7
7
 
8
8
  return (
@@ -10,6 +10,6 @@ const ClearIndicator = (props) => {
10
10
  <Remove width="11px" height="11px" fill="#9EA7B8" />
11
11
  </Component>
12
12
  );
13
- };
13
+ }
14
14
 
15
15
  export default ClearIndicator;
@@ -15,7 +15,7 @@ const Wrapper = styled(Flex)`
15
15
  }
16
16
  `;
17
17
 
18
- const DropdownIndicator = ({ selectProps: { menuIsOpen } }) => {
18
+ function DropdownIndicator({ selectProps: { menuIsOpen } }) {
19
19
  const icon = menuIsOpen ? 'caret-up' : 'caret-down';
20
20
 
21
21
  return (
@@ -23,7 +23,7 @@ const DropdownIndicator = ({ selectProps: { menuIsOpen } }) => {
23
23
  <FontAwesomeIcon icon={icon} />
24
24
  </Wrapper>
25
25
  );
26
- };
26
+ }
27
27
 
28
28
  DropdownIndicator.propTypes = {
29
29
  selectProps: PropTypes.shape({
@@ -1,3 +1,5 @@
1
- const IndicatorSeparator = () => null;
1
+ function IndicatorSeparator() {
2
+ return null
3
+ }
2
4
 
3
5
  export default IndicatorSeparator;
@@ -3,7 +3,7 @@ import { components } from 'react-select';
3
3
  import PropTypes from 'prop-types';
4
4
  import StyledOption from './StyledOption';
5
5
 
6
- const MultiValueContainer = ({ data, selectProps }) => {
6
+ function MultiValueContainer({ data, selectProps }) {
7
7
  const Component = components.MultiValueContainer;
8
8
 
9
9
  const handleClick = () => {
@@ -23,7 +23,7 @@ const MultiValueContainer = ({ data, selectProps }) => {
23
23
  />
24
24
  </Component>
25
25
  );
26
- };
26
+ }
27
27
 
28
28
  MultiValueContainer.defaultProps = {
29
29
  data: {},
@@ -11,7 +11,7 @@ import ErrorMessage from './ErrorMessage';
11
11
  import IndicatorSeparator from './IndicatorSeparator';
12
12
  import MultiValueContainer from './MultiValueContainer';
13
13
 
14
- const SelectRoles = ({ error, isDisabled, name, onChange, value }) => {
14
+ function SelectRoles({ error, isDisabled, name, onChange, value }) {
15
15
  const { formatMessage } = useGlobalContext();
16
16
  const translatedError = error && error.id ? formatMessage(error) : null;
17
17
  const { roles: data, isLoading } = useRolesList();
@@ -47,7 +47,7 @@ const SelectRoles = ({ error, isDisabled, name, onChange, value }) => {
47
47
  )}
48
48
  </>
49
49
  );
50
- };
50
+ }
51
51
 
52
52
  SelectRoles.defaultProps = {
53
53
  error: null,
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
3
  import { Carret } from '@akemona-org/strapi-helper-plugin';
4
4
 
5
- const Button = (isOpen) => {
5
+ function Button(isOpen) {
6
6
  return (
7
7
  <>
8
8
  <FormattedMessage id="app.components.Users.SortPicker.button-label" />
9
9
  <Carret isUp={isOpen} fill={isOpen ? '#007eff' : '#292b2c'} />
10
10
  </>
11
11
  );
12
- };
12
+ }
13
13
 
14
14
  export default Button;
@@ -15,7 +15,7 @@ const sortOptions = {
15
15
  username_desc: 'username:DESC',
16
16
  };
17
17
 
18
- const SortList = ({ onClick, selectedItem }) => {
18
+ function SortList({ onClick, selectedItem }) {
19
19
  return (
20
20
  <ListWrapper>
21
21
  {Object.keys(sortOptions).map((item) => {
@@ -31,7 +31,7 @@ const SortList = ({ onClick, selectedItem }) => {
31
31
  })}
32
32
  </ListWrapper>
33
33
  );
34
- };
34
+ }
35
35
 
36
36
  SortList.defaultProps = {
37
37
  onClick: () => {},
@@ -4,7 +4,7 @@ import { Text } from '@buffetjs/core';
4
4
  import { useIntl } from 'react-intl';
5
5
  import StyledListItem from './StyledListItem';
6
6
 
7
- const ListItem = ({ onClick, selectedItem, label, value }) => {
7
+ function ListItem({ onClick, selectedItem, label, value }) {
8
8
  const { formatMessage } = useIntl();
9
9
 
10
10
  const handleClick = () => {
@@ -18,7 +18,7 @@ const ListItem = ({ onClick, selectedItem, label, value }) => {
18
18
  </Text>
19
19
  </StyledListItem>
20
20
  );
21
- };
21
+ }
22
22
 
23
23
  ListItem.defaultProps = {
24
24
  selectedItem: null,
@@ -4,7 +4,7 @@ import { Picker } from '@buffetjs/core';
4
4
  import Button from './Button';
5
5
  import List from './List';
6
6
 
7
- const SortPicker = ({ onChange, value }) => {
7
+ function SortPicker({ onChange, value }) {
8
8
  return (
9
9
  <Picker
10
10
  renderButtonContent={Button}
@@ -19,7 +19,7 @@ const SortPicker = ({ onChange, value }) => {
19
19
  )}
20
20
  />
21
21
  );
22
- };
22
+ }
23
23
 
24
24
  SortPicker.defaultProps = {
25
25
  onChange: () => {},
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Checkbox } from '@buffetjs/core';
4
4
 
5
- const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, handleChangeAll }) => {
5
+ function EventRow({ disabledEvents, name, events, inputValue, handleChange, handleChangeAll }) {
6
6
  const enabledCheckboxes = events.filter((event) => {
7
7
  return !disabledEvents.includes(event);
8
8
  });
@@ -44,7 +44,7 @@ const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, hand
44
44
  })}
45
45
  </tr>
46
46
  );
47
- };
47
+ }
48
48
 
49
49
  EventRow.defaultProps = {
50
50
  disabledEvents: [],