@akemona-org/strapi-plugin-upload 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 (64) hide show
  1. package/admin/src/components/BrowseAssets/index.js +3 -5
  2. package/admin/src/components/Card/index.js +3 -3
  3. package/admin/src/components/CardControl/index.js +2 -2
  4. package/admin/src/components/CardEmpty/index.js +2 -2
  5. package/admin/src/components/CardPreview/index.js +2 -2
  6. package/admin/src/components/CheckControl/index.js +2 -2
  7. package/admin/src/components/DragLayer/index.js +2 -2
  8. package/admin/src/components/EditForm/FileDetailsBox.js +2 -2
  9. package/admin/src/components/FileIcon/index.js +2 -2
  10. package/admin/src/components/FileInfos/index.js +2 -2
  11. package/admin/src/components/Filters/index.js +2 -2
  12. package/admin/src/components/FiltersList/index.js +2 -2
  13. package/admin/src/components/FiltersPicker/FiltersCard/index.js +2 -2
  14. package/admin/src/components/FiltersPicker/index.js +2 -2
  15. package/admin/src/components/InfiniteLoadingIndicator/index.js +2 -2
  16. package/admin/src/components/InputFileModal/index.js +2 -2
  17. package/admin/src/components/InputMedia/Chevron/index.js +3 -3
  18. package/admin/src/components/InputMedia/EmptyInputMedia.js +2 -2
  19. package/admin/src/components/InputMedia/IconUpload.js +2 -2
  20. package/admin/src/components/InputMedia/InputFilePreview.js +2 -2
  21. package/admin/src/components/InputMedia/index.js +3 -3
  22. package/admin/src/components/InputUploadURL/index.js +2 -2
  23. package/admin/src/components/IntlText/index.js +3 -3
  24. package/admin/src/components/List/index.js +3 -3
  25. package/admin/src/components/ListEmpty/index.js +2 -2
  26. package/admin/src/components/ListModal/index.js +2 -2
  27. package/admin/src/components/ModalHeader/index.js +2 -2
  28. package/admin/src/components/ModalNavWrapper/index.js +2 -2
  29. package/admin/src/components/ModalTab/Count/index.js +3 -3
  30. package/admin/src/components/ModalTab/index.js +2 -2
  31. package/admin/src/components/PlayIcon/Play.js +3 -3
  32. package/admin/src/components/PlayIcon/index.js +2 -2
  33. package/admin/src/components/SelectAll/index.js +2 -2
  34. package/admin/src/components/SelectedAssets/DraggableCard.js +3 -3
  35. package/admin/src/components/SelectedAssets/SortableList.js +3 -3
  36. package/admin/src/components/SelectedAssets/index.js +2 -2
  37. package/admin/src/components/SortList/index.js +2 -2
  38. package/admin/src/components/SortListItem/index.js +2 -2
  39. package/admin/src/components/SortPicker/index.js +2 -2
  40. package/admin/src/components/Tag/index.js +2 -2
  41. package/admin/src/components/UploadForm/index.js +3 -3
  42. package/admin/src/components/UploadList/RowItem.js +3 -3
  43. package/admin/src/components/UploadList/index.js +3 -3
  44. package/admin/src/components/VideoPlayer/index.js +2 -2
  45. package/admin/src/components/VideoPreview/index.js +2 -2
  46. package/admin/src/containers/App/index.js +2 -2
  47. package/admin/src/containers/HomePage/HomePageContent/HomePageList.js +3 -3
  48. package/admin/src/containers/HomePage/HomePageContent/HomePageSettings.js +3 -3
  49. package/admin/src/containers/HomePage/HomePageContent/index.js +3 -3
  50. package/admin/src/containers/HomePage/index.js +2 -2
  51. package/admin/src/containers/Initializer/index.js +2 -2
  52. package/admin/src/containers/InputModalStepper/InputModalStepper.js +3 -3
  53. package/admin/src/containers/InputModalStepper/Search.js +2 -2
  54. package/admin/src/containers/InputModalStepper/index.js +3 -3
  55. package/admin/src/containers/InputModalStepperProvider/index.js +3 -3
  56. package/admin/src/containers/ModalStepper/index.js +3 -3
  57. package/admin/src/containers/SettingsPage/index.js +2 -2
  58. package/admin/src/icons/BrokenFile/index.js +2 -2
  59. package/admin/src/icons/Cloud/index.js +2 -2
  60. package/admin/src/icons/DoubleFile/index.js +2 -2
  61. package/admin/src/icons/Download/index.js +2 -2
  62. package/admin/src/icons/File/index.js +2 -2
  63. package/config/schema.graphql.js +2 -3
  64. package/package.json +5 -5
@@ -15,7 +15,7 @@ import Title from '../CardTitle';
15
15
  import Tag from '../Tag';
16
16
  import Wrapper from '../CardWrapper';
17
17
 
18
- const DraggableCard = ({
18
+ function DraggableCard({
19
19
  id,
20
20
  checked,
21
21
  children,
@@ -32,7 +32,7 @@ const DraggableCard = ({
32
32
  type,
33
33
  url,
34
34
  withFileCaching,
35
- }) => {
35
+ }) {
36
36
  const ref = useRef(null);
37
37
  // Adapted from https://react-dnd.github.io/react-dnd/examples/sortable/simple
38
38
  const [, drop] = useDrop({
@@ -106,7 +106,7 @@ const DraggableCard = ({
106
106
  {hasError && <ErrorMessage>{errorMessage}</ErrorMessage>}
107
107
  </Wrapper>
108
108
  );
109
- };
109
+ }
110
110
 
111
111
  DraggableCard.defaultProps = {
112
112
  checked: false,
@@ -8,7 +8,7 @@ import CardControlsWrapper from '../CardControlsWrapper';
8
8
  import ListWrapper from '../ListWrapper';
9
9
  import CardControl from '../CardControl';
10
10
 
11
- const SortableList = ({
11
+ function SortableList({
12
12
  allowedActions,
13
13
  canSelect,
14
14
  data,
@@ -17,7 +17,7 @@ const SortableList = ({
17
17
  onChange,
18
18
  onClickEditFile,
19
19
  selectedItems,
20
- }) => {
20
+ }) {
21
21
  const handleClick = (e) => {
22
22
  e.stopPropagation();
23
23
  };
@@ -73,7 +73,7 @@ const SortableList = ({
73
73
  </div>
74
74
  </ListWrapper>
75
75
  );
76
- };
76
+ }
77
77
 
78
78
  SortableList.defaultProps = {
79
79
  allowedActions: {
@@ -11,7 +11,7 @@ import Wrapper from './Wrapper';
11
11
  import ListTitleWrapper from './ListTitleWrapper';
12
12
  import ListWrapper from './ListWrapper';
13
13
 
14
- const SelectedAssets = () => {
14
+ function SelectedAssets() {
15
15
  const {
16
16
  allowedActions,
17
17
  selectedFiles,
@@ -51,6 +51,6 @@ const SelectedAssets = () => {
51
51
  </ListWrapper>
52
52
  </Wrapper>
53
53
  );
54
- };
54
+ }
55
55
 
56
56
  export default SelectedAssets;
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import Wrapper from './Wrapper';
5
5
  import SortListItem from '../SortListItem';
6
6
 
7
- const SortList = ({ list, onClick, selectedItem }) => {
7
+ function SortList({ list, onClick, selectedItem }) {
8
8
  return (
9
9
  <Wrapper>
10
10
  {Object.keys(list).map((item) => {
@@ -20,7 +20,7 @@ const SortList = ({ list, onClick, selectedItem }) => {
20
20
  })}
21
21
  </Wrapper>
22
22
  );
23
- };
23
+ }
24
24
 
25
25
  SortList.defaultProps = {
26
26
  list: {},
@@ -6,7 +6,7 @@ import { getTrad } from '../../utils';
6
6
  import Wrapper from './Wrapper';
7
7
  import IntlText from '../IntlText';
8
8
 
9
- const SortListItem = ({ onClick, selectedItem, label, value }) => {
9
+ function SortListItem({ onClick, selectedItem, label, value }) {
10
10
  const handleClick = () => {
11
11
  onClick({ target: { name: '_sort', value } });
12
12
  };
@@ -16,7 +16,7 @@ const SortListItem = ({ onClick, selectedItem, label, value }) => {
16
16
  <IntlText id={getTrad(`sort.${label}`)} lineHeight="27px" />
17
17
  </Wrapper>
18
18
  );
19
- };
19
+ }
20
20
 
21
21
  SortListItem.defaultProps = {
22
22
  selectedItem: null,
@@ -7,7 +7,7 @@ import { getTrad, getFileModelTimestamps } from '../../utils';
7
7
 
8
8
  import SortList from '../SortList';
9
9
 
10
- const SortPicker = ({ onChange, value }) => {
10
+ function SortPicker({ onChange, value }) {
11
11
  const { plugins } = useGlobalContext();
12
12
  const [created_at, updated_at] = getFileModelTimestamps(plugins);
13
13
  const orders = {
@@ -39,7 +39,7 @@ const SortPicker = ({ onChange, value }) => {
39
39
  )}
40
40
  />
41
41
  );
42
- };
42
+ }
43
43
 
44
44
  SortPicker.defaultProps = {
45
45
  onChange: () => {},
@@ -4,7 +4,7 @@ import { Text } from '@buffetjs/core';
4
4
 
5
5
  import Wrapper from './Wrapper';
6
6
 
7
- const Tag = ({ label }) => {
7
+ function Tag({ label }) {
8
8
  return (
9
9
  <Wrapper>
10
10
  <Text color="grey" fontWeight="bold" fontSize="xs" textTransform="uppercase">
@@ -12,7 +12,7 @@ const Tag = ({ label }) => {
12
12
  </Text>
13
13
  </Wrapper>
14
14
  );
15
- };
15
+ }
16
16
 
17
17
  Tag.defaultProps = {
18
18
  label: null,
@@ -5,13 +5,13 @@ import InputUploadURL from '../InputUploadURL';
5
5
  import ModalNavWrapper from '../ModalNavWrapper';
6
6
  import ModalSection from '../ModalSection';
7
7
 
8
- const UploadForm = ({
8
+ function UploadForm({
9
9
  addFilesToUpload,
10
10
  filesToDownload,
11
11
  formErrors,
12
12
  onChange,
13
13
  setShouldDisplayNextButton,
14
- }) => {
14
+ }) {
15
15
  useEffect(() => {
16
16
  return () => {
17
17
  setShouldDisplayNextButton(false);
@@ -40,7 +40,7 @@ const UploadForm = ({
40
40
  )}
41
41
  </ModalNavWrapper>
42
42
  );
43
- };
43
+ }
44
44
 
45
45
  UploadForm.defaultProps = {
46
46
  addFilesToUpload: () => {},
@@ -7,7 +7,7 @@ import CardControl from '../CardControl';
7
7
  import CardControlsWrapper from '../CardControlsWrapper';
8
8
  import InfiniteLoadingIndicator from '../InfiniteLoadingIndicator';
9
9
 
10
- const RowItem = ({
10
+ function RowItem({
11
11
  file,
12
12
  fileInfo,
13
13
  hasError,
@@ -18,7 +18,7 @@ const RowItem = ({
18
18
  onClickDeleteFileToUpload,
19
19
  onClickEdit,
20
20
  originalIndex,
21
- }) => {
21
+ }) {
22
22
  const url = file ? URL.createObjectURL(file) : null;
23
23
 
24
24
  const handleClick = () => {
@@ -72,7 +72,7 @@ const RowItem = ({
72
72
  </Card>
73
73
  </div>
74
74
  );
75
- };
75
+ }
76
76
 
77
77
  RowItem.defaultProps = {
78
78
  file: null,
@@ -11,13 +11,13 @@ import ListTitle from './ListTitle';
11
11
  import ListTitleWrapper from './ListTitleWrapper';
12
12
  import CustomModalSection from './CustomModalSection';
13
13
 
14
- const UploadList = ({
14
+ function UploadList({
15
15
  filesToUpload,
16
16
  onClickCancelUpload,
17
17
  onClickDeleteFileToUpload,
18
18
  onClickEditNewFile,
19
19
  onGoToAddBrowseFiles,
20
- }) => {
20
+ }) {
21
21
  const matrix = createMatrix(filesToUpload);
22
22
  const filesToUploadLength = filesToUpload.length;
23
23
  const titleId = `modal.upload-list.sub-header-title.${
@@ -69,7 +69,7 @@ const UploadList = ({
69
69
  </CustomModalSection>
70
70
  </>
71
71
  );
72
- };
72
+ }
73
73
 
74
74
  UploadList.defaultProps = {
75
75
  filesToUpload: [],
@@ -5,7 +5,7 @@ import PlayIcon from '../PlayIcon';
5
5
  import Duration from '../Duration';
6
6
  import Wrapper from './Wrapper';
7
7
 
8
- const VideoPlayer = ({ src }) => {
8
+ function VideoPlayer({ src }) {
9
9
  const [duration, setDuration] = useState(0);
10
10
  const [isPlaying, setIsPlaying] = useState(false);
11
11
 
@@ -44,7 +44,7 @@ const VideoPlayer = ({ src }) => {
44
44
  <Duration duration={duration} />
45
45
  </Wrapper>
46
46
  );
47
- };
47
+ }
48
48
 
49
49
  VideoPlayer.defaultProps = {
50
50
  src: null,
@@ -19,7 +19,7 @@ const EmptyPreview = styled.div`
19
19
  color: ${({ theme }) => theme.main.colors.grey};
20
20
  `;
21
21
 
22
- const VideoPreview = ({ hasIcon, previewUrl, src }) => {
22
+ function VideoPreview({ hasIcon, previewUrl, src }) {
23
23
  const { formatMessage } = useIntl();
24
24
  const [reducerState, dispatch] = useReducer(reducer, initialState);
25
25
  const { duration, dataLoaded, isHover, metadataLoaded, snapshot, seeked, isError } =
@@ -141,7 +141,7 @@ const VideoPreview = ({ hasIcon, previewUrl, src }) => {
141
141
  </CanvasWrapper>
142
142
  </Wrapper>
143
143
  );
144
- };
144
+ }
145
145
 
146
146
  VideoPreview.defaultProps = {
147
147
  hasIcon: false,
@@ -7,7 +7,7 @@ import { AppContext } from '../../contexts';
7
7
 
8
8
  import HomePage from '../HomePage';
9
9
 
10
- const App = () => {
10
+ function App() {
11
11
  const state = useUserPermissions(pluginPermissions);
12
12
 
13
13
  // Show a loader while all permissions are being checked
@@ -26,6 +26,6 @@ const App = () => {
26
26
  }
27
27
 
28
28
  return <Redirect to="/" />;
29
- };
29
+ }
30
30
 
31
31
  export default App;
@@ -7,7 +7,7 @@ import { useAppContext } from '../../../hooks';
7
7
  import List from '../../../components/List';
8
8
  import ListEmpty from '../../../components/ListEmpty';
9
9
 
10
- const HomePageList = ({
10
+ function HomePageList({
11
11
  areResultsEmptyWithSettings,
12
12
  data,
13
13
  dataCount,
@@ -16,7 +16,7 @@ const HomePageList = ({
16
16
  onCardClick,
17
17
  onChange,
18
18
  onClick,
19
- }) => {
19
+ }) {
20
20
  const query = useQuery();
21
21
  const {
22
22
  allowedActions: { canCreate, canUpdate },
@@ -71,7 +71,7 @@ const HomePageList = ({
71
71
  hasSearchApplied={areResultsEmptyWithSettings}
72
72
  />
73
73
  );
74
- };
74
+ }
75
75
 
76
76
  HomePageList.defaultProps = {
77
77
  areResultsEmptyWithSettings: false,
@@ -16,7 +16,7 @@ import Filters from '../../../components/Filters';
16
16
  import SelectAll from '../../../components/SelectAll';
17
17
  import SortPicker from '../../../components/SortPicker';
18
18
 
19
- const HomePageSettings = ({
19
+ function HomePageSettings({
20
20
  areAllCheckboxesSelected,
21
21
  filters,
22
22
  hasSomeCheckboxSelected,
@@ -24,7 +24,7 @@ const HomePageSettings = ({
24
24
  onChange,
25
25
  onFilterDelete,
26
26
  onSelectAll,
27
- }) => {
27
+ }) {
28
28
  const {
29
29
  allowedActions: { canUpdate },
30
30
  } = useAppContext();
@@ -84,7 +84,7 @@ const HomePageSettings = ({
84
84
  )}
85
85
  </>
86
86
  );
87
- };
87
+ }
88
88
 
89
89
  HomePageSettings.defaultProps = {
90
90
  areAllCheckboxesSelected: false,
@@ -7,7 +7,7 @@ import { generateFiltersFromSearch, useQuery } from '@akemona-org/strapi-helper-
7
7
  import HomePageSettings from './HomePageSettings';
8
8
  import HomePageList from './HomePageList';
9
9
 
10
- const HomePageContent = ({
10
+ function HomePageContent({
11
11
  data,
12
12
  dataCount,
13
13
  dataToDelete,
@@ -18,7 +18,7 @@ const HomePageContent = ({
18
18
  onFilterDelete,
19
19
  onParamsChange,
20
20
  onSelectAll,
21
- }) => {
21
+ }) {
22
22
  const query = useQuery();
23
23
  const { search } = useLocation();
24
24
  const filters = generateFiltersFromSearch(search);
@@ -59,7 +59,7 @@ const HomePageContent = ({
59
59
  />
60
60
  </>
61
61
  );
62
- };
62
+ }
63
63
 
64
64
  HomePageContent.defaultProps = {
65
65
  data: [],
@@ -20,7 +20,7 @@ import { generateStringFromParams, getHeaderLabel } from './utils';
20
20
  import init from './init';
21
21
  import reducer, { initialState } from './reducer';
22
22
 
23
- const HomePage = () => {
23
+ function HomePage() {
24
24
  const { allowedActions } = useAppContext();
25
25
  const { canRead } = allowedActions;
26
26
  const { formatMessage, plugins } = useGlobalContext();
@@ -368,6 +368,6 @@ const HomePage = () => {
368
368
  <Padded bottom size="md" />
369
369
  </Container>
370
370
  );
371
- };
371
+ }
372
372
 
373
373
  export default HomePage;
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
9
9
  import { request } from '@akemona-org/strapi-helper-plugin';
10
10
  import pluginId from '../../pluginId';
11
11
 
12
- const Initializer = ({ updatePlugin }) => {
12
+ function Initializer({ updatePlugin }) {
13
13
  const ref = useRef();
14
14
  ref.current = updatePlugin;
15
15
 
@@ -35,7 +35,7 @@ const Initializer = ({ updatePlugin }) => {
35
35
  }, []);
36
36
 
37
37
  return null;
38
- };
38
+ }
39
39
 
40
40
  Initializer.propTypes = {
41
41
  updatePlugin: PropTypes.func.isRequired,
@@ -15,13 +15,13 @@ import pluginId from '../../pluginId';
15
15
  import stepper from './stepper';
16
16
  import useModalContext from '../../hooks/useModalContext';
17
17
 
18
- const InputModalStepper = ({
18
+ function InputModalStepper({
19
19
  allowedActions,
20
20
  isOpen,
21
21
  onToggle,
22
22
  noNavigation,
23
23
  onInputMediaChange,
24
- }) => {
24
+ }) {
25
25
  const { emitEvent, formatMessage } = useGlobalContext();
26
26
  const [shouldDeleteFile, setShouldDeleteFile] = useState(false);
27
27
  const [displayNextButton, setDisplayNextButton] = useState(false);
@@ -453,7 +453,7 @@ const InputModalStepper = ({
453
453
  />
454
454
  </>
455
455
  );
456
- };
456
+ }
457
457
 
458
458
  InputModalStepper.defaultProps = {
459
459
  allowedActions: {
@@ -6,7 +6,7 @@ import getTrad from '../../utils/getTrad';
6
6
  import useModalContext from '../../hooks/useModalContext';
7
7
  import HeaderSearch from './HeaderSearch';
8
8
 
9
- const Search = () => {
9
+ function Search() {
10
10
  const [value, setValue] = useState('');
11
11
  const {
12
12
  allowedActions: { canRead },
@@ -43,6 +43,6 @@ const Search = () => {
43
43
  value={value}
44
44
  />
45
45
  );
46
- };
46
+ }
47
47
 
48
48
  export default memo(Search);
@@ -10,7 +10,7 @@ import pluginPermissions from '../../permissions';
10
10
  import InputModalStepper from './InputModalStepper';
11
11
  import InputModalStepperProvider from '../InputModalStepperProvider';
12
12
 
13
- const InputModal = ({
13
+ function InputModal({
14
14
  allowedTypes,
15
15
  filesToUpload,
16
16
  fileToEdit,
@@ -22,7 +22,7 @@ const InputModal = ({
22
22
  onToggle,
23
23
  selectedFiles,
24
24
  step,
25
- }) => {
25
+ }) {
26
26
  const singularTypes = allowedTypes.map((type) => type.substring(0, type.length - 1));
27
27
  const permissions = React.useMemo(() => omit(pluginPermissions, 'main'), []);
28
28
  const { allowedActions, isLoading } = useUserPermissions(permissions);
@@ -56,7 +56,7 @@ const InputModal = ({
56
56
  </InputModalStepperProvider>
57
57
  </DndProvider>
58
58
  );
59
- };
59
+ }
60
60
 
61
61
  InputModal.defaultProps = {
62
62
  allowedTypes: [],
@@ -26,7 +26,7 @@ import reducer, { initialState } from './reducer';
26
26
 
27
27
  /* eslint-disable indent */
28
28
 
29
- const InputModalStepperProvider = ({
29
+ function InputModalStepperProvider({
30
30
  allowedActions,
31
31
  allowedTypes,
32
32
  children,
@@ -39,7 +39,7 @@ const InputModalStepperProvider = ({
39
39
  onInputMediaChange,
40
40
  selectedFiles,
41
41
  step,
42
- }) => {
42
+ }) {
43
43
  const [formErrors, setFormErrors] = useState(null);
44
44
 
45
45
  const { formatMessage } = useIntl();
@@ -521,7 +521,7 @@ const InputModalStepperProvider = ({
521
521
  {children}
522
522
  </InputModalStepperContext.Provider>
523
523
  );
524
- };
524
+ }
525
525
 
526
526
  InputModalStepperProvider.propTypes = {
527
527
  allowedActions: PropTypes.shape({
@@ -18,14 +18,14 @@ import stepper from './stepper';
18
18
  import init from './init';
19
19
  import reducer, { initialState } from './reducer';
20
20
 
21
- const ModalStepper = ({
21
+ function ModalStepper({
22
22
  initialFileToEdit,
23
23
  initialStep,
24
24
  isOpen,
25
25
  onClosed,
26
26
  onRemoveFileFromDataToDelete,
27
27
  onToggle,
28
- }) => {
28
+ }) {
29
29
  const { allowedActions } = useAppContext();
30
30
  const { emitEvent, formatMessage } = useGlobalContext();
31
31
  const [isWarningDeleteOpen, setIsWarningDeleteOpen] = useState(false);
@@ -614,7 +614,7 @@ const ModalStepper = ({
614
614
  />
615
615
  </>
616
616
  );
617
- };
617
+ }
618
618
 
619
619
  ModalStepper.defaultProps = {
620
620
  initialFileToEdit: null,
@@ -11,7 +11,7 @@ import Wrapper from './Wrapper';
11
11
  import init from './init';
12
12
  import reducer, { initialState } from './reducer';
13
13
 
14
- const SettingsPage = () => {
14
+ function SettingsPage() {
15
15
  const { formatMessage } = useGlobalContext();
16
16
  const [reducerState, dispatch] = useReducer(reducer, initialState, init);
17
17
  const { initialData, isLoading, modifiedData } = reducerState.toJS();
@@ -193,6 +193,6 @@ const SettingsPage = () => {
193
193
  </Wrapper>
194
194
  </>
195
195
  );
196
- };
196
+ }
197
197
 
198
198
  export default SettingsPage;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const BrokenFile = (props) => {
3
+ function BrokenFile(props) {
4
4
  return (
5
5
  <svg
6
6
  width="48px"
@@ -86,6 +86,6 @@ const BrokenFile = (props) => {
86
86
  </g>
87
87
  </svg>
88
88
  );
89
- };
89
+ }
90
90
 
91
91
  export default BrokenFile;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const Cloud = (props) => {
3
+ function Cloud(props) {
4
4
  return (
5
5
  <svg width="53" height="42" xmlns="http://www.w3.org/2000/svg" {...props}>
6
6
  <defs>
@@ -30,6 +30,6 @@ const Cloud = (props) => {
30
30
  </g>
31
31
  </svg>
32
32
  );
33
- };
33
+ }
34
34
 
35
35
  export default Cloud;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const DoubleFile = (props) => {
3
+ function DoubleFile(props) {
4
4
  return (
5
5
  <svg width="21" height="21" xmlns="http://www.w3.org/2000/svg" {...props}>
6
6
  <defs>
@@ -30,6 +30,6 @@ const DoubleFile = (props) => {
30
30
  </g>
31
31
  </svg>
32
32
  );
33
- };
33
+ }
34
34
 
35
35
  export default DoubleFile;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const Download = (props) => {
3
+ function Download(props) {
4
4
  return (
5
5
  <svg width="16" height="17" xmlns="http://www.w3.org/2000/svg" {...props}>
6
6
  <defs>
@@ -31,6 +31,6 @@ const Download = (props) => {
31
31
  </g>
32
32
  </svg>
33
33
  );
34
- };
34
+ }
35
35
 
36
36
  export default Download;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const File = (props) => {
3
+ function File(props) {
4
4
  return (
5
5
  <svg width="21" height="25" xmlns="http://www.w3.org/2000/svg" {...props}>
6
6
  <defs>
@@ -30,6 +30,6 @@ const File = (props) => {
30
30
  </g>
31
31
  </svg>
32
32
  );
33
- };
33
+ }
34
34
 
35
35
  export default File;
@@ -32,9 +32,8 @@ module.exports = {
32
32
  resolver: async (obj, { file: upload, info, ...fields }) => {
33
33
  const file = await formatFile(upload, info, fields);
34
34
 
35
- const uploadedFiles = await strapi.plugins.upload.services.upload.uploadFileAndPersist(
36
- file
37
- );
35
+ const uploadedFiles =
36
+ await strapi.plugins.upload.services.upload.uploadFileAndPersist(file);
38
37
 
39
38
  // Return response.
40
39
  return uploadedFiles.length === 1 ? uploadedFiles[0] : uploadedFiles;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.12.4",
6
+ "version": "3.13.1",
7
7
  "description": "Makes it easy to upload images and files to your Strapi Application.",
8
8
  "strapi": {
9
9
  "name": "Media Library",
@@ -15,9 +15,9 @@
15
15
  "test": "echo \"no tests yet\""
16
16
  },
17
17
  "dependencies": {
18
- "@akemona-org/strapi-helper-plugin": "3.12.4",
19
- "@akemona-org/strapi-provider-upload-local": "3.12.4",
20
- "@akemona-org/strapi-utils": "3.12.4",
18
+ "@akemona-org/strapi-helper-plugin": "3.13.1",
19
+ "@akemona-org/strapi-provider-upload-local": "3.13.1",
20
+ "@akemona-org/strapi-utils": "3.13.1",
21
21
  "@buffetjs/core": "3.3.8",
22
22
  "@buffetjs/custom": "3.3.8",
23
23
  "@buffetjs/hooks": "3.3.8",
@@ -67,5 +67,5 @@
67
67
  "npm": ">=6.0.0"
68
68
  },
69
69
  "license": "SEE LICENSE IN LICENSE",
70
- "gitHead": "edf7db826c8babebcfa519e136874ba729667f8b"
70
+ "gitHead": "8343ec802662d12cb09de4196583f1862d808de5"
71
71
  }