@akemona-org/strapi-plugin-content-manager 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 (86) hide show
  1. package/admin/src/InjectedComponents/ContentTypeBuilder/ConfigureViewButton/index.js +2 -2
  2. package/admin/src/components/Block/index.js +3 -3
  3. package/admin/src/components/ComponentInitializer/index.js +2 -2
  4. package/admin/src/components/CustomTable/Headers/Header.js +2 -2
  5. package/admin/src/components/CustomTable/Row/Cell.js +2 -2
  6. package/admin/src/components/CustomTable/index.js +3 -3
  7. package/admin/src/components/DragLayer/index.js +2 -2
  8. package/admin/src/components/DraggedFieldWithPreview/DynamicComponent.js +2 -2
  9. package/admin/src/components/DynamicComponentCard/index.js +2 -2
  10. package/admin/src/components/DynamicZone/Component/index.js +3 -3
  11. package/admin/src/components/DynamicZone/Picker/Category/Banner/index.js +2 -2
  12. package/admin/src/components/DynamicZone/Picker/Category/index.js +2 -2
  13. package/admin/src/components/DynamicZone/Picker/index.js +2 -2
  14. package/admin/src/components/DynamicZone/index.js +3 -3
  15. package/admin/src/components/FieldComponent/index.js +3 -3
  16. package/admin/src/components/FieldsReorder/Item.js +3 -3
  17. package/admin/src/components/FieldsReorder/index.js +2 -2
  18. package/admin/src/components/FilterPickerOption/Option.js +2 -2
  19. package/admin/src/components/FormTitle/index.js +3 -3
  20. package/admin/src/components/InputUID/Options/index.js +3 -3
  21. package/admin/src/components/InputUID/RightLabel.js +2 -2
  22. package/admin/src/components/InputUID/index.js +3 -3
  23. package/admin/src/components/NonRepeatableComponent/index.js +2 -2
  24. package/admin/src/components/PopupForm/index.js +3 -3
  25. package/admin/src/components/PreviewCarret/index.js +3 -3
  26. package/admin/src/components/PreviewWysiwyg/index.js +2 -2
  27. package/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js +3 -3
  28. package/admin/src/components/RelationPreviewList/index.js +3 -3
  29. package/admin/src/components/RepeatableComponent/CarretTop.js +2 -2
  30. package/admin/src/components/RepeatableComponent/DraggedItem/index.js +3 -3
  31. package/admin/src/components/RepeatableComponent/index.js +3 -3
  32. package/admin/src/components/SectionTitle/index.js +2 -2
  33. package/admin/src/components/SelectMany/Relation.js +3 -3
  34. package/admin/src/components/SelectOne/SingleValue.js +2 -2
  35. package/admin/src/components/SelectWrapper/ClearIndicator.js +2 -2
  36. package/admin/src/components/SelectWrapper/IndicatorSeparator.js +3 -1
  37. package/admin/src/components/SelectWrapper/Option.js +2 -2
  38. package/admin/src/components/SettingsViewWrapper/index.js +3 -3
  39. package/admin/src/components/SortableList/Item.js +2 -2
  40. package/admin/src/components/SortableList/index.js +2 -2
  41. package/admin/src/components/State/index.js +2 -2
  42. package/admin/src/components/Wysiwyg/MediaLib.js +2 -2
  43. package/admin/src/components/Wysiwyg/customSelect.js +2 -2
  44. package/admin/src/components/Wysiwyg/previewControl.js +3 -3
  45. package/admin/src/components/Wysiwyg/toggleMode.js +2 -2
  46. package/admin/src/components/WysiwygBottomControls/index.js +2 -2
  47. package/admin/src/components/WysiwygDropUpload/index.js +2 -2
  48. package/admin/src/components/WysiwygInlineControls/Button.js +3 -3
  49. package/admin/src/components/WysiwygInlineControls/StyledButton.js +3 -1
  50. package/admin/src/components/WysiwygInlineControls/index.js +3 -3
  51. package/admin/src/containers/CollectionTypeFormWrapper/index.js +2 -2
  52. package/admin/src/containers/CollectionTypeRecursivePath/index.js +3 -3
  53. package/admin/src/containers/ComponentSetttingsView/index.js +2 -2
  54. package/admin/src/containers/EditSettingsView/index.js +2 -2
  55. package/admin/src/containers/EditView/DeleteLink/index.js +2 -2
  56. package/admin/src/containers/EditView/Header/index.js +3 -3
  57. package/admin/src/containers/EditView/InformationCard.js +2 -2
  58. package/admin/src/containers/EditView/index.js +3 -3
  59. package/admin/src/containers/EditViewDataManagerProvider/index.js +3 -3
  60. package/admin/src/containers/EditViewLayoutManager/Permissions.js +2 -2
  61. package/admin/src/containers/EditViewLayoutManager/index.js +2 -2
  62. package/admin/src/containers/ListSettingsView/Label.js +2 -2
  63. package/admin/src/containers/ListSettingsView/index.js +2 -2
  64. package/admin/src/containers/ListView/FieldPicker/ConfigureLink/index.js +2 -2
  65. package/admin/src/containers/ListView/FieldPicker/Field/index.js +2 -2
  66. package/admin/src/containers/ListView/FieldPicker/Fields/index.js +2 -2
  67. package/admin/src/containers/ListView/FieldPicker/Header/index.js +2 -2
  68. package/admin/src/containers/ListView/FieldPicker/index.js +2 -2
  69. package/admin/src/containers/ListView/index.js +1 -3
  70. package/admin/src/containers/ListViewLayoutManager/Permissions.js +2 -2
  71. package/admin/src/containers/ListViewLayoutManager/index.js +2 -2
  72. package/admin/src/containers/SingleTypeFormWrapper/index.js +2 -2
  73. package/admin/src/containers/SingleTypeRecursivePath/index.js +3 -3
  74. package/admin/src/icons/Bold/index.js +2 -2
  75. package/admin/src/icons/Code/index.js +2 -2
  76. package/admin/src/icons/Cross/index.js +2 -2
  77. package/admin/src/icons/Italic/index.js +2 -2
  78. package/admin/src/icons/Link/index.js +2 -2
  79. package/admin/src/icons/Media/index.js +2 -2
  80. package/admin/src/icons/Na/index.js +2 -2
  81. package/admin/src/icons/Ol/index.js +2 -2
  82. package/admin/src/icons/Quote/index.js +2 -2
  83. package/admin/src/icons/Striked/index.js +2 -2
  84. package/admin/src/icons/Ul/index.js +2 -2
  85. package/admin/src/icons/Underline/index.js +2 -2
  86. package/package.json +4 -4
@@ -13,7 +13,7 @@ const StyledButton = styled(Base)`
13
13
  padding-right: 15px;
14
14
  `;
15
15
 
16
- const Button = ({ isTemporary, isInContentTypeView, contentTypeKind, targetUid }) => {
16
+ function Button({ isTemporary, isInContentTypeView, contentTypeKind, targetUid }) {
17
17
  const { formatMessage } = useIntl();
18
18
  const { push } = useHistory();
19
19
  const { collectionTypesConfigurations, componentsConfigurations, singleTypesConfigurations } =
@@ -56,7 +56,7 @@ const Button = ({ isTemporary, isInContentTypeView, contentTypeKind, targetUid }
56
56
  />
57
57
  </CheckPermissions>
58
58
  );
59
- };
59
+ }
60
60
 
61
61
  Button.defaultProps = {
62
62
  contentTypeKind: 'collectionType',
@@ -10,8 +10,8 @@ import { Wrapper, Sub } from './components';
10
10
 
11
11
  const renderMsg = (msg) => <p>{msg}</p>;
12
12
 
13
- const Block = ({ children, description, style, title }) => (
14
- <div className="col-md-12">
13
+ function Block({ children, description, style, title }) {
14
+ return <div className="col-md-12">
15
15
  <Wrapper style={style}>
16
16
  <Sub>
17
17
  {!!title && (
@@ -24,7 +24,7 @@ const Block = ({ children, description, style, title }) => (
24
24
  {children}
25
25
  </Wrapper>
26
26
  </div>
27
- );
27
+ }
28
28
 
29
29
  Block.defaultProps = {
30
30
  children: null,
@@ -8,7 +8,7 @@ import NonRepeatableWrapper from '../NonRepeatableWrapper';
8
8
  import PlusButton from '../PlusButton';
9
9
  import P from './P';
10
10
 
11
- const ComponentInitializer = ({ componentUid, isReadOnly, name }) => {
11
+ function ComponentInitializer({ componentUid, isReadOnly, name }) {
12
12
  const { addNonRepeatableComponentToField } = useContentManagerEditViewDataManager();
13
13
 
14
14
  return (
@@ -27,7 +27,7 @@ const ComponentInitializer = ({ componentUid, isReadOnly, name }) => {
27
27
  </FormattedMessage>
28
28
  </NonRepeatableWrapper>
29
29
  );
30
- };
30
+ }
31
31
 
32
32
  ComponentInitializer.defaultProps = {
33
33
  isReadOnly: false,
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { Carret, useGlobalContext } from '@akemona-org/strapi-helper-plugin';
4
4
  import { useListView } from '../../../hooks';
5
5
 
6
- const Header = ({ fieldSchema: { type }, metadatas: { label, sortable, mainField }, name }) => {
6
+ function Header({ fieldSchema: { type }, metadatas: { label, sortable, mainField }, name }) {
7
7
  const { _sort, firstSortableHeader, setQuery } = useListView();
8
8
  const { emitEvent } = useGlobalContext();
9
9
  const [sortBy, sortOrder] = _sort.split(':');
@@ -42,7 +42,7 @@ const Header = ({ fieldSchema: { type }, metadatas: { label, sortable, mainField
42
42
  </span>
43
43
  </th>
44
44
  );
45
- };
45
+ }
46
46
 
47
47
  Header.propTypes = {
48
48
  fieldSchema: PropTypes.shape({
@@ -6,7 +6,7 @@ import RelationPreviewList from '../../RelationPreviewList';
6
6
  import Truncate from '../../Truncate';
7
7
  import Truncated from '../../Truncated';
8
8
 
9
- const Cell = ({ options }) => {
9
+ function Cell({ options }) {
10
10
  const [tooltipIsDisplayed, setDisplayTooltip] = useState(false);
11
11
 
12
12
  const handleTooltipToggle = () => {
@@ -33,7 +33,7 @@ const Cell = ({ options }) => {
33
33
  {tooltipIsDisplayed && <Tooltip id={cellId} />}
34
34
  </Truncate>
35
35
  );
36
- };
36
+ }
37
37
 
38
38
  Cell.propTypes = {
39
39
  options: PropTypes.shape({
@@ -13,7 +13,7 @@ import ActionCollapse from './ActionCollapse';
13
13
  import Headers from './Headers';
14
14
  import Row from './Row';
15
15
 
16
- const CustomTable = ({
16
+ function CustomTable({
17
17
  canCreate,
18
18
  canUpdate,
19
19
  canDelete,
@@ -22,7 +22,7 @@ const CustomTable = ({
22
22
  hasDraftAndPublish,
23
23
  isBulkable,
24
24
  showLoader,
25
- }) => {
25
+ }) {
26
26
  const { formatMessage } = useIntl();
27
27
  const { entriesToDelete, label, filters, _q } = useListView();
28
28
  const { emitEvent } = useGlobalContext();
@@ -146,7 +146,7 @@ const CustomTable = ({
146
146
  </tbody>
147
147
  </Table>
148
148
  );
149
- };
149
+ }
150
150
 
151
151
  CustomTable.propTypes = {
152
152
  canCreate: PropTypes.bool.isRequired,
@@ -34,7 +34,7 @@ function getItemStyles(initialOffset, currentOffset, mouseOffset) {
34
34
  };
35
35
  }
36
36
 
37
- const CustomDragLayer = () => {
37
+ function CustomDragLayer() {
38
38
  const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(
39
39
  (monitor) => ({
40
40
  item: monitor.getItem(),
@@ -97,6 +97,6 @@ const CustomDragLayer = () => {
97
97
  </div>
98
98
  </LayoutDndProvider>
99
99
  );
100
- };
100
+ }
101
101
 
102
102
  export default CustomDragLayer;
@@ -7,7 +7,7 @@ import pluginPermissions from '../../permissions';
7
7
  import DynamicComponentCard from '../DynamicComponentCard';
8
8
  import Tooltip from './Tooltip';
9
9
 
10
- const DynamicComponent = ({ componentUid, friendlyName, icon, setIsOverDynamicZone }) => {
10
+ function DynamicComponent({ componentUid, friendlyName, icon, setIsOverDynamicZone }) {
11
11
  const [isOver, setIsOver] = useState(false);
12
12
  const [{ isLoading, canAccess }, setState] = useState({ isLoading: true, canAccess: false });
13
13
  const { push } = useHistory();
@@ -53,7 +53,7 @@ const DynamicComponent = ({ componentUid, friendlyName, icon, setIsOverDynamicZo
53
53
  <Tooltip isOver={isOver}>{componentUid}</Tooltip>
54
54
  </DynamicComponentCard>
55
55
  );
56
- };
56
+ }
57
57
 
58
58
  DynamicComponent.defaultProps = {
59
59
  friendlyName: '',
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
4
  import Wrapper from './Wrapper';
5
5
 
6
- const DynamicComponentCard = ({ children, componentUid, friendlyName, icon, onClick }) => {
6
+ function DynamicComponentCard({ children, componentUid, friendlyName, icon, onClick }) {
7
7
  return (
8
8
  <Wrapper
9
9
  onClick={(e) => {
@@ -23,7 +23,7 @@ const DynamicComponentCard = ({ children, componentUid, friendlyName, icon, onCl
23
23
  {children}
24
24
  </Wrapper>
25
25
  );
26
- };
26
+ }
27
27
 
28
28
  DynamicComponentCard.defaultProps = {
29
29
  children: null,
@@ -7,7 +7,7 @@ import { useContentTypeLayout } from '../../../hooks';
7
7
  import FieldComponent from '../../FieldComponent';
8
8
  import RoundCTA from './RoundCTA';
9
9
 
10
- const Component = ({
10
+ function Component({
11
11
  componentUid,
12
12
  index,
13
13
  isFieldAllowed,
@@ -17,7 +17,7 @@ const Component = ({
17
17
  removeComponentFromDynamicZone,
18
18
  showDownIcon,
19
19
  showUpIcon,
20
- }) => {
20
+ }) {
21
21
  const { getComponentLayout } = useContentTypeLayout();
22
22
  const { icon, friendlyName } = useMemo(() => {
23
23
  const {
@@ -62,7 +62,7 @@ const Component = ({
62
62
  />
63
63
  </div>
64
64
  );
65
- };
65
+ }
66
66
 
67
67
  Component.propTypes = {
68
68
  componentUid: PropTypes.string.isRequired,
@@ -6,7 +6,7 @@ import Wrapper from './Wrapper';
6
6
 
7
7
  /* eslint-disable jsx-a11y/no-static-element-interactions */
8
8
 
9
- const Banner = ({ category, isOpen, onToggle, isFirst }) => {
9
+ function Banner({ category, isOpen, onToggle, isFirst }) {
10
10
  const handleClick = () => {
11
11
  onToggle(category);
12
12
  };
@@ -19,7 +19,7 @@ const Banner = ({ category, isOpen, onToggle, isFirst }) => {
19
19
  <div className="label">{category}</div>
20
20
  </Wrapper>
21
21
  );
22
- };
22
+ }
23
23
 
24
24
  Banner.propTypes = {
25
25
  category: PropTypes.string.isRequired,
@@ -4,7 +4,7 @@ import { Collapse } from 'reactstrap';
4
4
  import DynamicComponentCard from '../../../DynamicComponentCard';
5
5
  import Banner from './Banner';
6
6
 
7
- const Category = ({ category, components, isFirst, isOpen, onAddComponent, onToggle }) => {
7
+ function Category({ category, components, isFirst, isOpen, onAddComponent, onToggle }) {
8
8
  const [showComponents, setShowComponents] = useState(false);
9
9
 
10
10
  useEffect(() => {
@@ -39,7 +39,7 @@ const Category = ({ category, components, isFirst, isOpen, onAddComponent, onTog
39
39
  </Collapse>
40
40
  </>
41
41
  );
42
- };
42
+ }
43
43
 
44
44
  Category.propTypes = {
45
45
  category: PropTypes.string.isRequired,
@@ -8,7 +8,7 @@ import { useContentTypeLayout } from '../../../hooks';
8
8
  import Category from './Category';
9
9
  import Wrapper from './Wrapper';
10
10
 
11
- const Picker = ({ components, isOpen, onClickAddComponent }) => {
11
+ function Picker({ components, isOpen, onClickAddComponent }) {
12
12
  const { getComponentLayout } = useContentTypeLayout();
13
13
  const [categoryToOpen, setCategoryToOpen] = useState('');
14
14
 
@@ -77,7 +77,7 @@ const Picker = ({ components, isOpen, onClickAddComponent }) => {
77
77
  </Wrapper>
78
78
  </Collapse>
79
79
  );
80
- };
80
+ }
81
81
 
82
82
  Picker.propTypes = {
83
83
  components: PropTypes.array.isRequired,
@@ -19,7 +19,7 @@ import Picker from './Picker';
19
19
 
20
20
  /* eslint-disable react/no-array-index-key */
21
21
 
22
- const DynamicZone = ({
22
+ function DynamicZone({
23
23
  name,
24
24
  // Passed with the select function
25
25
  addComponentToDynamicZone,
@@ -34,7 +34,7 @@ const DynamicZone = ({
34
34
  dynamicDisplayedComponents,
35
35
  fieldSchema,
36
36
  metadatas,
37
- }) => {
37
+ }) {
38
38
  const [isOpen, setIsOpen] = useState(false);
39
39
  const { formatMessage } = useIntl();
40
40
  // We cannot use the default props here
@@ -191,7 +191,7 @@ const DynamicZone = ({
191
191
  )}
192
192
  </DynamicZoneWrapper>
193
193
  );
194
- };
194
+ }
195
195
 
196
196
  DynamicZone.defaultProps = {
197
197
  dynamicDisplayedComponents: [],
@@ -17,7 +17,7 @@ import Label from './Label';
17
17
  import Reset from './ResetComponent';
18
18
  import Wrapper from './Wrapper';
19
19
 
20
- const FieldComponent = ({
20
+ function FieldComponent({
21
21
  componentFriendlyName,
22
22
  componentUid,
23
23
  icon,
@@ -36,7 +36,7 @@ const FieldComponent = ({
36
36
  isReadOnly,
37
37
  componentValue,
38
38
  removeComponentFromField,
39
- }) => {
39
+ }) {
40
40
  const { formatMessage } = useIntl();
41
41
  const componentValueLength = size(componentValue);
42
42
  const isInitialized = componentValue !== null || isFromDynamicZone;
@@ -123,7 +123,7 @@ const FieldComponent = ({
123
123
  )}
124
124
  </Wrapper>
125
125
  );
126
- };
126
+ }
127
127
 
128
128
  FieldComponent.defaultProps = {
129
129
  componentValue: null,
@@ -9,7 +9,7 @@ import DraggedFieldWithPreview from '../DraggedFieldWithPreview';
9
9
 
10
10
  import ItemTypes from '../../utils/ItemTypes';
11
11
 
12
- const Item = ({
12
+ function Item({
13
13
  componentUid,
14
14
  dynamicZoneComponents,
15
15
  itemIndex,
@@ -20,7 +20,7 @@ const Item = ({
20
20
  rowIndex,
21
21
  size,
22
22
  type,
23
- }) => {
23
+ }) {
24
24
  const {
25
25
  goTo,
26
26
  componentLayouts,
@@ -222,7 +222,7 @@ const Item = ({
222
222
  ref={refs}
223
223
  />
224
224
  );
225
- };
225
+ }
226
226
 
227
227
  Item.defaultProps = {
228
228
  componentUid: '',
@@ -9,7 +9,7 @@ import SortWrapper from '../SortWrapper';
9
9
  import Wrapper from './components';
10
10
  import Item from './Item';
11
11
 
12
- const FieldsReorder = ({ className }) => {
12
+ function FieldsReorder({ className }) {
13
13
  const { attributes, buttonData, layout, moveItem, moveRow, onAddData, removeField } =
14
14
  useLayoutDnd();
15
15
 
@@ -78,7 +78,7 @@ const FieldsReorder = ({ className }) => {
78
78
  </SortWrapper>
79
79
  </div>
80
80
  );
81
- };
81
+ }
82
82
 
83
83
  FieldsReorder.defaultProps = {
84
84
  className: 'col-8',
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
- const Option = ({ id, value }) => {
5
+ function Option({ id, value }) {
6
6
  return (
7
7
  <FormattedMessage id={id}>{(msg) => <option value={value}>{msg}</option>}</FormattedMessage>
8
8
  );
9
- };
9
+ }
10
10
 
11
11
  Option.propTypes = {
12
12
  id: PropTypes.string.isRequired,
@@ -2,12 +2,12 @@ import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { FormattedMessage } from 'react-intl';
4
4
 
5
- const FormTitle = ({ description, title }) => (
6
- <>
5
+ function FormTitle({ description, title }) {
6
+ return <>
7
7
  {!!title && <FormattedMessage id={title} />}
8
8
  {!!description && <FormattedMessage id={description}>{(msg) => <p>{msg}</p>}</FormattedMessage>}
9
9
  </>
10
- );
10
+ }
11
11
 
12
12
  FormTitle.propTypes = {
13
13
  description: PropTypes.string,
@@ -8,8 +8,8 @@ import Option from './Option';
8
8
  import OptionsTitle from './OptionsTitle';
9
9
  import RightOptionLabel from './RightOptionLabel';
10
10
 
11
- const Options = ({ options, title }) => (
12
- <OptionsWrapper>
11
+ function Options({ options, title }) {
12
+ return <OptionsWrapper>
13
13
  {title && <OptionsTitle>{title}</OptionsTitle>}
14
14
  {options.map((option) => (
15
15
  <Option key={option.id} onClick={option.onClick}>
@@ -20,7 +20,7 @@ const Options = ({ options, title }) => (
20
20
  </Option>
21
21
  ))}
22
22
  </OptionsWrapper>
23
- );
23
+ }
24
24
 
25
25
  Options.propTypes = {
26
26
  options: PropTypes.array.isRequired,
@@ -7,7 +7,7 @@ import pluginId from '../../pluginId';
7
7
  import getTrad from '../../utils/getTrad';
8
8
  import RightContentLabel from './RightContentLabel';
9
9
 
10
- const RightLabel = ({ isAvailable }) => {
10
+ function RightLabel({ isAvailable }) {
11
11
  const { formatMessage } = useGlobalContext();
12
12
 
13
13
  return isAvailable ? (
@@ -29,7 +29,7 @@ const RightLabel = ({ isAvailable }) => {
29
29
  </RightContentLabel>
30
30
  </>
31
31
  );
32
- };
32
+ }
33
33
 
34
34
  RightLabel.propTypes = {
35
35
  isAvailable: PropTypes.bool,
@@ -41,7 +41,7 @@ const Name = styled(Label)`
41
41
  // TODO : Make this component generic -> InputDropdown.
42
42
  // TODO : Use the Compounds components pattern
43
43
  // https://blog.bitsrc.io/understanding-compound-components-in-react-23c4b84535b5
44
- const InputUID = ({
44
+ function InputUID({
45
45
  attribute,
46
46
  contentTypeUID,
47
47
  description,
@@ -54,7 +54,7 @@ const InputUID = ({
54
54
  value,
55
55
  editable,
56
56
  ...inputProps
57
- }) => {
57
+ }) {
58
58
  const { modifiedData, initialData, layout } = useContentManagerEditViewDataManager();
59
59
  const [isLoading, setIsLoading] = useState(false);
60
60
  const [availability, setAvailability] = useState(null);
@@ -294,7 +294,7 @@ const InputUID = ({
294
294
  }}
295
295
  </Error>
296
296
  );
297
- };
297
+ }
298
298
 
299
299
  InputUID.propTypes = {
300
300
  attribute: PropTypes.object.isRequired,
@@ -8,7 +8,7 @@ import NonRepeatableWrapper from '../NonRepeatableWrapper';
8
8
  import Inputs from '../Inputs';
9
9
  import FieldComponent from '../FieldComponent';
10
10
 
11
- const NonRepeatableComponent = ({ componentUid, isFromDynamicZone, name }) => {
11
+ function NonRepeatableComponent({ componentUid, isFromDynamicZone, name }) {
12
12
  const { getComponentLayout } = useContentTypeLayout();
13
13
  const componentLayoutData = useMemo(
14
14
  () => getComponentLayout(componentUid),
@@ -58,7 +58,7 @@ const NonRepeatableComponent = ({ componentUid, isFromDynamicZone, name }) => {
58
58
  })}
59
59
  </NonRepeatableWrapper>
60
60
  );
61
- };
61
+ }
62
62
 
63
63
  NonRepeatableComponent.defaultProps = {
64
64
  isFromDynamicZone: false,
@@ -12,7 +12,7 @@ import { FormattedMessage } from 'react-intl';
12
12
  import { upperFirst } from 'lodash';
13
13
  import { AttributeIcon, Button } from '@buffetjs/core';
14
14
 
15
- const PopupForm = ({
15
+ function PopupForm({
16
16
  headerId,
17
17
  isOpen,
18
18
  onClosed,
@@ -21,7 +21,7 @@ const PopupForm = ({
21
21
  renderForm,
22
22
  subHeaderContent,
23
23
  type,
24
- }) => {
24
+ }) {
25
25
  const getAttrType = () => {
26
26
  if (type === 'timestamp') {
27
27
  return 'date';
@@ -67,7 +67,7 @@ const PopupForm = ({
67
67
  </form>
68
68
  </Modal>
69
69
  );
70
- };
70
+ }
71
71
 
72
72
  PopupForm.defaultProps = {
73
73
  isOpen: false,
@@ -3,11 +3,11 @@ import PropTypes from 'prop-types';
3
3
 
4
4
  import Wrapper from './components';
5
5
 
6
- const PreviewCarret = ({ isComponent, style }) => (
7
- <Wrapper isComponent={isComponent} style={style}>
6
+ function PreviewCarret({ isComponent, style }) {
7
+ return <Wrapper isComponent={isComponent} style={style}>
8
8
  <div />
9
9
  </Wrapper>
10
- );
10
+ }
11
11
 
12
12
  PreviewCarret.defaultProps = {
13
13
  isComponent: false,
@@ -12,7 +12,7 @@ import md from './utils/mdRenderer';
12
12
  import sanitizeHtml from './utils/satinizeHtml';
13
13
  import Wrapper from './Wrapper';
14
14
 
15
- const PreviewWysiwyg = ({ data }) => {
15
+ function PreviewWysiwyg({ data }) {
16
16
  const { isFullscreen } = useWysiwyg();
17
17
  const html = useMemo(() => sanitizeHtml(md.render(data || '')), [data]);
18
18
 
@@ -21,7 +21,7 @@ const PreviewWysiwyg = ({ data }) => {
21
21
  <div dangerouslySetInnerHTML={{ __html: html }} />
22
22
  </Wrapper>
23
23
  );
24
- };
24
+ }
25
25
 
26
26
  PreviewWysiwyg.defaultProps = {
27
27
  data: '',
@@ -5,14 +5,14 @@ import { LoadingIndicator, Tooltip } from '@buffetjs/styles';
5
5
  import PropTypes from 'prop-types';
6
6
  import { getDisplayedValue, getRequestUrl } from '../../utils';
7
7
 
8
- const RelationPreviewTooltip = ({
8
+ function RelationPreviewTooltip({
9
9
  tooltipId,
10
10
  rowId,
11
11
  mainField,
12
12
  name,
13
13
  queryInfos: { endPoint },
14
14
  size,
15
- }) => {
15
+ }) {
16
16
  const [isLoading, setIsLoading] = useState(true);
17
17
  const [relationData, setRelationData] = useState([]);
18
18
  const tooltipRef = useRef();
@@ -96,7 +96,7 @@ const RelationPreviewTooltip = ({
96
96
  </div>
97
97
  </Tooltip>
98
98
  );
99
- };
99
+ }
100
100
 
101
101
  RelationPreviewTooltip.propTypes = {
102
102
  tooltipId: PropTypes.string.isRequired,
@@ -10,7 +10,7 @@ import Truncated from '../Truncated';
10
10
  import CountWrapper from './CountWrapper';
11
11
  import RelationPreviewTooltip from './RelationPreviewTooltip';
12
12
 
13
- const RelationPreviewList = ({
13
+ function RelationPreviewList({
14
14
  options: {
15
15
  metadatas: { mainField },
16
16
  relationType,
@@ -20,7 +20,7 @@ const RelationPreviewList = ({
20
20
  name,
21
21
  queryInfos,
22
22
  },
23
- }) => {
23
+ }) {
24
24
  const { formatMessage } = useIntl();
25
25
  const [tooltipIsDisplayed, setDisplayTooltip] = useState(false);
26
26
  const isSingle = ['oneWay', 'oneToOne', 'manyToOne'].includes(relationType);
@@ -89,7 +89,7 @@ const RelationPreviewList = ({
89
89
  )}
90
90
  </Truncate>
91
91
  );
92
- };
92
+ }
93
93
 
94
94
  RelationPreviewList.propTypes = {
95
95
  options: PropTypes.shape({
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const CarretTop = () => {
3
+ function CarretTop() {
4
4
  return (
5
5
  <svg width="7" height="5" xmlns="http://www.w3.org/2000/svg">
6
6
  <path
@@ -9,6 +9,6 @@ const CarretTop = () => {
9
9
  />
10
10
  </svg>
11
11
  );
12
- };
12
+ }
13
13
 
14
14
  export default CarretTop;
@@ -17,7 +17,7 @@ import { connect, select } from './utils';
17
17
  // https://github.com/react-dnd/react-dnd/issues/1368
18
18
  // https://github.com/frontend-collective/react-sortable-tree/issues/490
19
19
 
20
- const DraggedItem = ({
20
+ function DraggedItem({
21
21
  componentFieldName,
22
22
  doesPreviousFieldContainErrorsAndIsOpen,
23
23
  hasErrors,
@@ -34,7 +34,7 @@ const DraggedItem = ({
34
34
  triggerFormValidation,
35
35
  checkFormErrors,
36
36
  displayedValue,
37
- }) => {
37
+ }) {
38
38
  const dragRef = useRef(null);
39
39
  const dropRef = useRef(null);
40
40
  const [showForm, setShowForm] = useState(false);
@@ -203,7 +203,7 @@ const DraggedItem = ({
203
203
  </Collapse>
204
204
  </>
205
205
  );
206
- };
206
+ }
207
207
 
208
208
  DraggedItem.defaultProps = {
209
209
  doesPreviousFieldContainErrorsAndIsOpen: false,
@@ -15,7 +15,7 @@ import Button from './AddFieldButton';
15
15
  import DraggedItem from './DraggedItem';
16
16
  import EmptyComponent from './EmptyComponent';
17
17
 
18
- const RepeatableComponent = ({
18
+ function RepeatableComponent({
19
19
  addRepeatableComponentToField,
20
20
  formErrors,
21
21
  componentUid,
@@ -26,7 +26,7 @@ const RepeatableComponent = ({
26
26
  max,
27
27
  min,
28
28
  name,
29
- }) => {
29
+ }) {
30
30
  const [collapseToOpen, setCollapseToOpen] = useState('');
31
31
  const [, drop] = useDrop({ accept: ItemTypes.COMPONENT });
32
32
  const { getComponentLayout } = useContentTypeLayout();
@@ -156,7 +156,7 @@ const RepeatableComponent = ({
156
156
  )}
157
157
  </div>
158
158
  );
159
- };
159
+ }
160
160
 
161
161
  RepeatableComponent.defaultProps = {
162
162
  componentValue: null,