@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.
- package/admin/src/components/BrowseAssets/index.js +3 -5
- package/admin/src/components/Card/index.js +3 -3
- package/admin/src/components/CardControl/index.js +2 -2
- package/admin/src/components/CardEmpty/index.js +2 -2
- package/admin/src/components/CardPreview/index.js +2 -2
- package/admin/src/components/CheckControl/index.js +2 -2
- package/admin/src/components/DragLayer/index.js +2 -2
- package/admin/src/components/EditForm/FileDetailsBox.js +2 -2
- package/admin/src/components/FileIcon/index.js +2 -2
- package/admin/src/components/FileInfos/index.js +2 -2
- package/admin/src/components/Filters/index.js +2 -2
- package/admin/src/components/FiltersList/index.js +2 -2
- package/admin/src/components/FiltersPicker/FiltersCard/index.js +2 -2
- package/admin/src/components/FiltersPicker/index.js +2 -2
- package/admin/src/components/InfiniteLoadingIndicator/index.js +2 -2
- package/admin/src/components/InputFileModal/index.js +2 -2
- package/admin/src/components/InputMedia/Chevron/index.js +3 -3
- package/admin/src/components/InputMedia/EmptyInputMedia.js +2 -2
- package/admin/src/components/InputMedia/IconUpload.js +2 -2
- package/admin/src/components/InputMedia/InputFilePreview.js +2 -2
- package/admin/src/components/InputMedia/index.js +3 -3
- package/admin/src/components/InputUploadURL/index.js +2 -2
- package/admin/src/components/IntlText/index.js +3 -3
- package/admin/src/components/List/index.js +3 -3
- package/admin/src/components/ListEmpty/index.js +2 -2
- package/admin/src/components/ListModal/index.js +2 -2
- package/admin/src/components/ModalHeader/index.js +2 -2
- package/admin/src/components/ModalNavWrapper/index.js +2 -2
- package/admin/src/components/ModalTab/Count/index.js +3 -3
- package/admin/src/components/ModalTab/index.js +2 -2
- package/admin/src/components/PlayIcon/Play.js +3 -3
- package/admin/src/components/PlayIcon/index.js +2 -2
- package/admin/src/components/SelectAll/index.js +2 -2
- package/admin/src/components/SelectedAssets/DraggableCard.js +3 -3
- package/admin/src/components/SelectedAssets/SortableList.js +3 -3
- package/admin/src/components/SelectedAssets/index.js +2 -2
- package/admin/src/components/SortList/index.js +2 -2
- package/admin/src/components/SortListItem/index.js +2 -2
- package/admin/src/components/SortPicker/index.js +2 -2
- package/admin/src/components/Tag/index.js +2 -2
- package/admin/src/components/UploadForm/index.js +3 -3
- package/admin/src/components/UploadList/RowItem.js +3 -3
- package/admin/src/components/UploadList/index.js +3 -3
- package/admin/src/components/VideoPlayer/index.js +2 -2
- package/admin/src/components/VideoPreview/index.js +2 -2
- package/admin/src/containers/App/index.js +2 -2
- package/admin/src/containers/HomePage/HomePageContent/HomePageList.js +3 -3
- package/admin/src/containers/HomePage/HomePageContent/HomePageSettings.js +3 -3
- package/admin/src/containers/HomePage/HomePageContent/index.js +3 -3
- package/admin/src/containers/HomePage/index.js +2 -2
- package/admin/src/containers/Initializer/index.js +2 -2
- package/admin/src/containers/InputModalStepper/InputModalStepper.js +3 -3
- package/admin/src/containers/InputModalStepper/Search.js +2 -2
- package/admin/src/containers/InputModalStepper/index.js +3 -3
- package/admin/src/containers/InputModalStepperProvider/index.js +3 -3
- package/admin/src/containers/ModalStepper/index.js +3 -3
- package/admin/src/containers/SettingsPage/index.js +2 -2
- package/admin/src/icons/BrokenFile/index.js +2 -2
- package/admin/src/icons/Cloud/index.js +2 -2
- package/admin/src/icons/DoubleFile/index.js +2 -2
- package/admin/src/icons/Download/index.js +2 -2
- package/admin/src/icons/File/index.js +2 -2
- package/config/schema.graphql.js +2 -3
- package/package.json +5 -5
|
@@ -13,7 +13,7 @@ import useModalContext from '../../hooks/useModalContext';
|
|
|
13
13
|
import Wrapper from './Wrapper';
|
|
14
14
|
import CardControl from '../CardControl';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function BrowseAssets() {
|
|
17
17
|
const {
|
|
18
18
|
allowedActions,
|
|
19
19
|
allowedTypes,
|
|
@@ -120,8 +120,7 @@ const BrowseAssets = () => {
|
|
|
120
120
|
const areResultsEmptyWithSearchOrFilters = isEmpty(files) && (hasSearch || hasFilters);
|
|
121
121
|
|
|
122
122
|
return (
|
|
123
|
-
|
|
124
|
-
<Wrapper>
|
|
123
|
+
<Wrapper>
|
|
125
124
|
<Padded top>
|
|
126
125
|
{allowedActions.canRead && (
|
|
127
126
|
<Flex flexWrap="wrap">
|
|
@@ -175,8 +174,7 @@ const BrowseAssets = () => {
|
|
|
175
174
|
</>
|
|
176
175
|
)}
|
|
177
176
|
</Wrapper>
|
|
178
|
-
</>
|
|
179
177
|
);
|
|
180
|
-
}
|
|
178
|
+
}
|
|
181
179
|
|
|
182
180
|
export default BrowseAssets;
|
|
@@ -14,7 +14,7 @@ import Title from '../CardTitle';
|
|
|
14
14
|
import Tag from '../Tag';
|
|
15
15
|
import Wrapper from '../CardWrapper';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
function Card({
|
|
18
18
|
children,
|
|
19
19
|
options: {
|
|
20
20
|
checked,
|
|
@@ -36,7 +36,7 @@ const Card = ({
|
|
|
36
36
|
withFileCaching = true,
|
|
37
37
|
withoutFileInfo,
|
|
38
38
|
},
|
|
39
|
-
})
|
|
39
|
+
}) {
|
|
40
40
|
const { formatMessage } = useGlobalContext();
|
|
41
41
|
const [tooltipIsDisplayed, setDisplayTooltip] = useState(false);
|
|
42
42
|
const fileSize = formatBytes(size, 0);
|
|
@@ -93,7 +93,7 @@ const Card = ({
|
|
|
93
93
|
{hasError && <ErrorMessage title={errorMessage}>{errorMessage}</ErrorMessage>}
|
|
94
94
|
</Wrapper>
|
|
95
95
|
);
|
|
96
|
-
}
|
|
96
|
+
}
|
|
97
97
|
|
|
98
98
|
Card.defaultProps = {
|
|
99
99
|
children: null,
|
|
@@ -9,7 +9,7 @@ import { getTrad } from '../../utils';
|
|
|
9
9
|
import DownloadIcon from '../../icons/Download';
|
|
10
10
|
import Wrapper from './Wrapper';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function CardControl({ title, color, onClick, small, type, iconStyle }) {
|
|
13
13
|
const { formatMessage } = useGlobalContext();
|
|
14
14
|
const [tooltipIsDisplayed, setTooltipIsDisplayed] = useState(false);
|
|
15
15
|
|
|
@@ -39,7 +39,7 @@ const CardControl = ({ title, color, onClick, small, type, iconStyle }) => {
|
|
|
39
39
|
{tooltipIsDisplayed && <Tooltip id={type} />}
|
|
40
40
|
</>
|
|
41
41
|
);
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
CardControl.defaultProps = {
|
|
45
45
|
color: '#b3b5b9',
|
|
@@ -3,7 +3,7 @@ import CardImgWrapper from '../CardImgWrapper';
|
|
|
3
3
|
import Bar from './Bar';
|
|
4
4
|
import Wrapper from './Wrapper';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function CardEmpty() {
|
|
7
7
|
return (
|
|
8
8
|
<Wrapper>
|
|
9
9
|
<CardImgWrapper />
|
|
@@ -11,6 +11,6 @@ const CardEmpty = () => {
|
|
|
11
11
|
<Bar />
|
|
12
12
|
</Wrapper>
|
|
13
13
|
);
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
|
|
16
16
|
export default CardEmpty;
|
|
@@ -9,7 +9,7 @@ import VideoPreview from '../VideoPreview';
|
|
|
9
9
|
import Wrapper from './Wrapper';
|
|
10
10
|
import Image from './Image';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function CardPreview({ extension, hasError, hasIcon, url, previewUrl, type, withFileCaching }) {
|
|
13
13
|
const isFile = getType(type) === 'file';
|
|
14
14
|
const isVideo = getType(type) === 'video';
|
|
15
15
|
const cacheRef = useRef(performance.now());
|
|
@@ -41,7 +41,7 @@ const CardPreview = ({ extension, hasError, hasIcon, url, previewUrl, type, with
|
|
|
41
41
|
)}
|
|
42
42
|
</Wrapper>
|
|
43
43
|
);
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
|
|
46
46
|
CardPreview.defaultProps = {
|
|
47
47
|
extension: null,
|
|
@@ -12,7 +12,7 @@ import CardControl from '../CardControl';
|
|
|
12
12
|
import CustomDropdownSection from './CustomDropdownSection';
|
|
13
13
|
import { getTrad } from '../../utils';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function CheckControl({ title, onSubmitEdit }) {
|
|
16
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
17
17
|
const { formatMessage } = useGlobalContext();
|
|
18
18
|
const dropdownRef = useRef();
|
|
@@ -59,7 +59,7 @@ const CheckControl = ({ title, onSubmitEdit }) => {
|
|
|
59
59
|
</CustomDropdownSection>
|
|
60
60
|
</div>
|
|
61
61
|
);
|
|
62
|
-
}
|
|
62
|
+
}
|
|
63
63
|
|
|
64
64
|
CheckControl.defaultProps = {
|
|
65
65
|
onSubmitEdit: () => {},
|
|
@@ -22,7 +22,7 @@ function getItemStyles(initialOffset, currentOffset, mouseOffset) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
function DragLayer() {
|
|
26
26
|
const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(
|
|
27
27
|
(monitor) => ({
|
|
28
28
|
item: monitor.getItem(),
|
|
@@ -63,6 +63,6 @@ const DragLayer = () => {
|
|
|
63
63
|
</div>
|
|
64
64
|
</Wrapper>
|
|
65
65
|
);
|
|
66
|
-
}
|
|
66
|
+
}
|
|
67
67
|
|
|
68
68
|
export default DragLayer;
|
|
@@ -9,7 +9,7 @@ import { formatBytes, getTrad } from '../../utils';
|
|
|
9
9
|
|
|
10
10
|
import FileDetailsBoxWrapper from './FileDetailsBoxWrapper';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function FileDetailsBox({ file }) {
|
|
13
13
|
const { formatMessage } = useIntl();
|
|
14
14
|
const fileSize = file.mime ? get(file, 'size', 0) : get(file, 'size', 0) / 1000;
|
|
15
15
|
const sections = [
|
|
@@ -73,7 +73,7 @@ const FileDetailsBox = ({ file }) => {
|
|
|
73
73
|
})}
|
|
74
74
|
</FileDetailsBoxWrapper>
|
|
75
75
|
);
|
|
76
|
-
}
|
|
76
|
+
}
|
|
77
77
|
|
|
78
78
|
FileDetailsBox.defaultProps = {
|
|
79
79
|
file: {
|
|
@@ -12,7 +12,7 @@ import extensions from './utils/extensions.json';
|
|
|
12
12
|
|
|
13
13
|
import Wrapper from './Wrapper';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function FileIcon({ ext }) {
|
|
16
16
|
const iconName = Object.keys(extensions).find((key) => extensions[key].includes(ext)) || 'alt';
|
|
17
17
|
|
|
18
18
|
return (
|
|
@@ -20,7 +20,7 @@ const FileIcon = ({ ext }) => {
|
|
|
20
20
|
<FontAwesomeIcon icon={['far', `file-${iconName}`]} />
|
|
21
21
|
</Wrapper>
|
|
22
22
|
);
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
FileIcon.defaultProps = {
|
|
26
26
|
ext: 'alt',
|
|
@@ -4,7 +4,7 @@ import { upperCase } from 'lodash';
|
|
|
4
4
|
|
|
5
5
|
import { Text } from '@buffetjs/core';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function FileInfos({ extension, height, size, width }) {
|
|
8
8
|
return (
|
|
9
9
|
<Text color="grey" fontSize="xs" ellipsis>
|
|
10
10
|
{upperCase(extension)}
|
|
@@ -13,7 +13,7 @@ const FileInfos = ({ extension, height, size, width }) => {
|
|
|
13
13
|
{size}
|
|
14
14
|
</Text>
|
|
15
15
|
);
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
FileInfos.defaultProps = {
|
|
19
19
|
height: null,
|
|
@@ -5,7 +5,7 @@ import { Padded } from '@buffetjs/core';
|
|
|
5
5
|
import FiltersList from '../FiltersList';
|
|
6
6
|
import FiltersPicker from '../FiltersPicker';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function Filters({ onChange, onClick, filters }) {
|
|
9
9
|
return (
|
|
10
10
|
<>
|
|
11
11
|
<FiltersPicker onChange={onChange} />
|
|
@@ -13,7 +13,7 @@ const Filters = ({ onChange, onClick, filters }) => {
|
|
|
13
13
|
<FiltersList filters={filters} onClick={onClick} />
|
|
14
14
|
</>
|
|
15
15
|
);
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
Filters.defaultProps = {
|
|
19
19
|
filters: [],
|
|
@@ -4,7 +4,7 @@ import { FilterButton } from '@akemona-org/strapi-helper-plugin';
|
|
|
4
4
|
|
|
5
5
|
import formatFilter from './utils/formatFilter';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function FiltersList({ filters, onClick }) {
|
|
8
8
|
return filters.map((item, index) => {
|
|
9
9
|
const formattedValue = formatFilter(item);
|
|
10
10
|
const { name, filter, value, isDisabled } = formattedValue;
|
|
@@ -19,7 +19,7 @@ const FiltersList = ({ filters, onClick }) => {
|
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
21
|
});
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
|
|
24
24
|
FiltersList.defaultProps = {
|
|
25
25
|
filters: [],
|
|
@@ -12,7 +12,7 @@ import InputWrapper from './InputWrapper';
|
|
|
12
12
|
import FilterButton from './FilterButton';
|
|
13
13
|
import FilterInput from './FilterInput';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function FiltersCard({ onChange }) {
|
|
16
16
|
const { plugins } = useGlobalContext();
|
|
17
17
|
const timestamps = getFileModelTimestamps(plugins);
|
|
18
18
|
const [state, dispatch] = useReducer(reducer, initialState, () => init(initialState, timestamps));
|
|
@@ -84,7 +84,7 @@ const FiltersCard = ({ onChange }) => {
|
|
|
84
84
|
</FilterButton>
|
|
85
85
|
</Wrapper>
|
|
86
86
|
);
|
|
87
|
-
}
|
|
87
|
+
}
|
|
88
88
|
|
|
89
89
|
FiltersCard.defaultProps = {
|
|
90
90
|
onChange: () => {},
|
|
@@ -7,7 +7,7 @@ import FiltersCard from './FiltersCard';
|
|
|
7
7
|
|
|
8
8
|
import formatFilter from './utils/formatFilter';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function FiltersPicker({ onChange }) {
|
|
11
11
|
const handleChange = ({ target: { value } }) => {
|
|
12
12
|
onChange({ target: { name: 'filters', value: formatFilter(value) } });
|
|
13
13
|
};
|
|
@@ -30,7 +30,7 @@ const FiltersPicker = ({ onChange }) => {
|
|
|
30
30
|
)}
|
|
31
31
|
/>
|
|
32
32
|
);
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
FiltersPicker.defaultProps = {
|
|
36
36
|
onChange: () => {},
|
|
@@ -8,7 +8,7 @@ import Button from './Button';
|
|
|
8
8
|
import Container from './Container';
|
|
9
9
|
import Wrapper from './Wrapper';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function InfiniteLoadingIndicator({ onClick }) {
|
|
12
12
|
return (
|
|
13
13
|
<Wrapper>
|
|
14
14
|
<Container>
|
|
@@ -26,7 +26,7 @@ const InfiniteLoadingIndicator = ({ onClick }) => {
|
|
|
26
26
|
</Container>
|
|
27
27
|
</Wrapper>
|
|
28
28
|
);
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
InfiniteLoadingIndicator.defaultProps = {
|
|
32
32
|
onClick: () => {},
|
|
@@ -8,7 +8,7 @@ import Label from './Label';
|
|
|
8
8
|
import Input from '../Input';
|
|
9
9
|
import P from './P';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function InputFileModal({ name, onChange }) {
|
|
12
12
|
const [isDragging, setIsDragging] = useState(false);
|
|
13
13
|
const { formatMessage } = useGlobalContext();
|
|
14
14
|
const ref = createRef();
|
|
@@ -58,7 +58,7 @@ const InputFileModal = ({ name, onChange }) => {
|
|
|
58
58
|
{isDragging && <div className="dragzone" onDragLeave={handleDragLeave} />}
|
|
59
59
|
</Label>
|
|
60
60
|
);
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
|
|
63
63
|
InputFileModal.defaultProps = {
|
|
64
64
|
name: 'files',
|
|
@@ -4,11 +4,11 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
import Wrapper from './Wrapper';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
<Wrapper onClick={onClick}>
|
|
7
|
+
function Chevron({ side, onClick }) {
|
|
8
|
+
return <Wrapper onClick={onClick}>
|
|
9
9
|
<FontAwesomeIcon color="white" icon={`chevron-${side}`} />
|
|
10
10
|
</Wrapper>
|
|
11
|
-
|
|
11
|
+
}
|
|
12
12
|
|
|
13
13
|
Chevron.propTypes = {
|
|
14
14
|
onClick: PropTypes.func.isRequired,
|
|
@@ -24,7 +24,7 @@ const EmptyInputMediaWrapper = styled.div`
|
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
function EmptyInputMedia({ children, ...props }) {
|
|
28
28
|
const { formatMessage } = useIntl();
|
|
29
29
|
|
|
30
30
|
const [isInDropZone, setIsInDropZone] = useState(false);
|
|
@@ -46,7 +46,7 @@ const EmptyInputMedia = ({ children, ...props }) => {
|
|
|
46
46
|
{isInDropZone ? null : children}
|
|
47
47
|
</EmptyInputMediaWrapper>
|
|
48
48
|
);
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
EmptyInputMedia.propTypes = {
|
|
52
52
|
disabled: PropTypes.bool,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function IconUpload({ title, ...props }) {
|
|
5
5
|
return (
|
|
6
6
|
<svg
|
|
7
7
|
width="105"
|
|
@@ -39,7 +39,7 @@ const IconUpload = ({ title, ...props }) => {
|
|
|
39
39
|
</g>
|
|
40
40
|
</svg>
|
|
41
41
|
);
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
IconUpload.propTypes = {
|
|
45
45
|
title: PropTypes.string.isRequired,
|
|
@@ -7,7 +7,7 @@ import { Flex } from '@buffetjs/core';
|
|
|
7
7
|
import CardPreview from '../CardPreview';
|
|
8
8
|
import Chevron from './Chevron';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function InputFilePreview({ file, onClick, isSlider }) {
|
|
11
11
|
const fileUrl = prefixFileUrlWithBackendUrl(get(file, ['formats', 'small', 'url'], file.url));
|
|
12
12
|
|
|
13
13
|
return (
|
|
@@ -22,7 +22,7 @@ const InputFilePreview = ({ file, onClick, isSlider }) => {
|
|
|
22
22
|
{isSlider && <Chevron side="right" onClick={() => onClick(true)} />}
|
|
23
23
|
</Flex>
|
|
24
24
|
);
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
|
|
27
27
|
InputFilePreview.propTypes = {
|
|
28
28
|
file: PropTypes.object,
|
|
@@ -21,7 +21,7 @@ import Wrapper from './Wrapper';
|
|
|
21
21
|
import Input from '../Input';
|
|
22
22
|
import ErrorMessage from './ErrorMessage';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
function InputMedia({
|
|
25
25
|
disabled,
|
|
26
26
|
label,
|
|
27
27
|
onChange,
|
|
@@ -32,7 +32,7 @@ const InputMedia = ({
|
|
|
32
32
|
id,
|
|
33
33
|
error,
|
|
34
34
|
labelIcon,
|
|
35
|
-
})
|
|
35
|
+
}) {
|
|
36
36
|
const [modal, setModal] = useState({
|
|
37
37
|
isOpen: false,
|
|
38
38
|
step: 'list',
|
|
@@ -204,7 +204,7 @@ const InputMedia = ({
|
|
|
204
204
|
{error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}
|
|
205
205
|
</Wrapper>
|
|
206
206
|
);
|
|
207
|
-
}
|
|
207
|
+
}
|
|
208
208
|
|
|
209
209
|
InputMedia.propTypes = {
|
|
210
210
|
attribute: PropTypes.shape({
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Wrapper from './Wrapper';
|
|
6
6
|
import { getTrad } from '../../utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function InputUploadURL({ errors, onChange, value }) {
|
|
9
9
|
const { formatMessage } = useGlobalContext();
|
|
10
10
|
const label = formatMessage({ id: getTrad('input.url.label') });
|
|
11
11
|
const description = formatMessage({ id: getTrad('input.url.description') });
|
|
@@ -29,7 +29,7 @@ const InputUploadURL = ({ errors, onChange, value }) => {
|
|
|
29
29
|
</div>
|
|
30
30
|
</Wrapper>
|
|
31
31
|
);
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
InputUploadURL.defaultProps = {
|
|
35
35
|
errors: null,
|
|
@@ -4,11 +4,11 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
import { Text } from '@buffetjs/core';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
<FormattedMessage id={id} defaultMessage={defaultMessage} values={values}>
|
|
7
|
+
function IntlText({ id, defaultMessage, values, ...textProps }) {
|
|
8
|
+
return <FormattedMessage id={id} defaultMessage={defaultMessage} values={values}>
|
|
9
9
|
{(msg) => <Text {...textProps}>{msg}</Text>}
|
|
10
10
|
</FormattedMessage>
|
|
11
|
-
|
|
11
|
+
}
|
|
12
12
|
|
|
13
13
|
IntlText.defaultProps = {
|
|
14
14
|
id: 'app.utils.defaultMessage',
|
|
@@ -11,7 +11,7 @@ import IntlText from '../IntlText';
|
|
|
11
11
|
import ListCell from './ListCell';
|
|
12
12
|
import ListRow from './ListRow';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function List({
|
|
15
15
|
allowedTypes,
|
|
16
16
|
data,
|
|
17
17
|
onChange,
|
|
@@ -21,7 +21,7 @@ const List = ({
|
|
|
21
21
|
canSelect,
|
|
22
22
|
renderCardControl,
|
|
23
23
|
showCheckbox,
|
|
24
|
-
})
|
|
24
|
+
}) {
|
|
25
25
|
const selectedAssets = selectedItems.length;
|
|
26
26
|
|
|
27
27
|
const handleCheckboxClick = (e) => {
|
|
@@ -85,7 +85,7 @@ const List = ({
|
|
|
85
85
|
</ListRow>
|
|
86
86
|
</ListWrapper>
|
|
87
87
|
);
|
|
88
|
-
}
|
|
88
|
+
}
|
|
89
89
|
|
|
90
90
|
List.defaultProps = {
|
|
91
91
|
allowedTypes: [],
|
|
@@ -10,7 +10,7 @@ import CardEmpty from '../CardEmpty';
|
|
|
10
10
|
import Wrapper from './Wrapper';
|
|
11
11
|
import IntlText from '../IntlText';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function ListEmpty({ canCreate, hasSearchApplied, onClick, numberOfRows }) {
|
|
14
14
|
const rows = generateRows(numberOfRows);
|
|
15
15
|
const titleId = hasSearchApplied
|
|
16
16
|
? 'list.assets-empty.title-withSearch'
|
|
@@ -51,7 +51,7 @@ const ListEmpty = ({ canCreate, hasSearchApplied, onClick, numberOfRows }) => {
|
|
|
51
51
|
)}
|
|
52
52
|
</Wrapper>
|
|
53
53
|
);
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
55
|
|
|
56
56
|
ListEmpty.defaultProps = {
|
|
57
57
|
canCreate: true,
|
|
@@ -11,7 +11,7 @@ import SelectedAssets from '../SelectedAssets';
|
|
|
11
11
|
import IntlText from '../IntlText';
|
|
12
12
|
import BaselineAlignmentWrapper from './BaselineAlignmentWrapper';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
function ListModal() {
|
|
15
15
|
const { currentTab, goTo, handleModalTabChange, selectedFiles } = useModalContext();
|
|
16
16
|
|
|
17
17
|
const handleClick = (to) => {
|
|
@@ -61,6 +61,6 @@ const ListModal = () => {
|
|
|
61
61
|
)}
|
|
62
62
|
</ModalNavWrapper>
|
|
63
63
|
);
|
|
64
|
-
}
|
|
64
|
+
}
|
|
65
65
|
|
|
66
66
|
export default ListModal;
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import { ModalHeader as HeaderModal, useGlobalContext } from '@akemona-org/strapi-helper-plugin';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function ModalHeader({ goBack, headerBreadcrumbs, withBackButton, HeaderComponent }) {
|
|
14
14
|
const { emitEvent } = useGlobalContext();
|
|
15
15
|
|
|
16
16
|
const handleClick = () => {
|
|
@@ -28,7 +28,7 @@ const ModalHeader = ({ goBack, headerBreadcrumbs, withBackButton, HeaderComponen
|
|
|
28
28
|
HeaderComponent={HeaderComponent}
|
|
29
29
|
/>
|
|
30
30
|
);
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
|
|
33
33
|
ModalHeader.defaultProps = {
|
|
34
34
|
goBack: () => {},
|
|
@@ -8,7 +8,7 @@ import Hr from './Hr';
|
|
|
8
8
|
import BaselineAlignment from './BaselineAlignment';
|
|
9
9
|
import Wrapper from './Wrapper';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function ModalNavWrapper({ children, links, renderRightContent, initialTab }) {
|
|
12
12
|
const [to, setTo] = useState(initialTab || links[0].to);
|
|
13
13
|
|
|
14
14
|
const handleGoTo = (link) => {
|
|
@@ -50,7 +50,7 @@ const ModalNavWrapper = ({ children, links, renderRightContent, initialTab }) =>
|
|
|
50
50
|
{children(to)}
|
|
51
51
|
</Wrapper>
|
|
52
52
|
);
|
|
53
|
-
}
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
ModalNavWrapper.defaultProps = {
|
|
56
56
|
initialTab: null,
|
|
@@ -4,8 +4,8 @@ import { Text } from '@buffetjs/core';
|
|
|
4
4
|
|
|
5
5
|
import Wrapper from './Wrapper';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
<Wrapper isActive={isActive} justifyContent="center" alignItems="center">
|
|
7
|
+
function Count({ count, isActive }) {
|
|
8
|
+
return <Wrapper isActive={isActive} justifyContent="center" alignItems="center">
|
|
9
9
|
<Text
|
|
10
10
|
lineHeight="none"
|
|
11
11
|
fontWeight="bold"
|
|
@@ -15,7 +15,7 @@ const Count = ({ count, isActive }) => (
|
|
|
15
15
|
{count}
|
|
16
16
|
</Text>
|
|
17
17
|
</Wrapper>
|
|
18
|
-
|
|
18
|
+
}
|
|
19
19
|
|
|
20
20
|
Count.propTypes = {
|
|
21
21
|
count: PropTypes.number,
|
|
@@ -13,7 +13,7 @@ import Wrapper from './Wrapper';
|
|
|
13
13
|
import IntlText from '../IntlText';
|
|
14
14
|
import Count from './Count';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function ModalTab({ isDisabled, label, to, isActive, onClick, count }) {
|
|
17
17
|
const handleClick = (e) => {
|
|
18
18
|
if (isDisabled) {
|
|
19
19
|
e.preventDefault();
|
|
@@ -39,7 +39,7 @@ const ModalTab = ({ isDisabled, label, to, isActive, onClick, count }) => {
|
|
|
39
39
|
</Wrapper>
|
|
40
40
|
</Padded>
|
|
41
41
|
);
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
ModalTab.defaultProps = {
|
|
45
45
|
count: null,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
<svg width="48px" height="52px" viewBox="0 0 48 52" {...rest} xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
function Play({ fill, ...rest }) {
|
|
5
|
+
return <svg width="48px" height="52px" viewBox="0 0 48 52" {...rest} xmlns="http://www.w3.org/2000/svg">
|
|
6
6
|
<defs>
|
|
7
7
|
<filter
|
|
8
8
|
x="-1.7%"
|
|
@@ -52,7 +52,7 @@ const Play = ({ fill, ...rest }) => (
|
|
|
52
52
|
</g>
|
|
53
53
|
</g>
|
|
54
54
|
</svg>
|
|
55
|
-
|
|
55
|
+
}
|
|
56
56
|
|
|
57
57
|
Play.defaultProps = {
|
|
58
58
|
fill: '#fff',
|
|
@@ -4,13 +4,13 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import Wrapper from './Wrapper';
|
|
5
5
|
import Play from './Play';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function PlayIcon({ small }) {
|
|
8
8
|
return (
|
|
9
9
|
<Wrapper small={small}>
|
|
10
10
|
<Play fill="#000000" width={small ? '23px' : '49px'} height={small ? '25px' : '52px'} />
|
|
11
11
|
</Wrapper>
|
|
12
12
|
);
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
|
|
15
15
|
PlayIcon.defaultProps = {
|
|
16
16
|
small: false,
|
|
@@ -3,13 +3,13 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Checkbox } from '@buffetjs/core';
|
|
4
4
|
import Wrapper from './Wrapper';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function SelectAll({ checked, onChange, someChecked }) {
|
|
7
7
|
return (
|
|
8
8
|
<Wrapper>
|
|
9
9
|
<Checkbox name="selectAll" onChange={onChange} value={checked} someChecked={someChecked} />
|
|
10
10
|
</Wrapper>
|
|
11
11
|
);
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
|
|
14
14
|
SelectAll.defaultProps = {
|
|
15
15
|
checked: false,
|