@akemona-org/strapi-plugin-upload 3.13.2 → 3.14.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 +50 -50
- package/admin/src/components/CheckControl/Button.js +1 -1
- package/admin/src/components/EditForm/FileWrapper.js +2 -1
- package/admin/src/components/EditForm/SizeBox.js +3 -1
- package/admin/src/components/InputFileModal/Label.js +1 -4
- package/admin/src/components/InputMedia/Chevron/index.js +5 -3
- package/admin/src/components/IntlText/index.js +5 -3
- package/admin/src/components/List/ListCell.js +3 -0
- package/admin/src/components/LoadingIndicator/index.js +1 -1
- package/admin/src/components/ModalHeader/BackButton.js +2 -2
- package/admin/src/components/ModalNavWrapper/Hr.js +1 -1
- package/admin/src/components/ModalTab/Count/index.js +12 -10
- package/admin/src/components/PlayIcon/Play.js +55 -41
- package/admin/src/components/PlayIcon/Wrapper.js +1 -1
- package/admin/src/components/SelectAll/Wrapper.js +1 -1
- package/admin/src/containers/InputModalStepper/InputModalStepper.js +1 -7
- package/package.json +6 -6
|
@@ -121,59 +121,59 @@ function BrowseAssets() {
|
|
|
121
121
|
|
|
122
122
|
return (
|
|
123
123
|
<Wrapper>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/>
|
|
134
|
-
</Padded>
|
|
135
|
-
)}
|
|
136
|
-
<SortPicker onChange={handleChangeParams} value={params._sort} />
|
|
137
|
-
<Padded left size="sm" />
|
|
138
|
-
<Filters
|
|
139
|
-
filters={params.filters}
|
|
140
|
-
onChange={handleChangeParams}
|
|
141
|
-
onClick={handleDeleteFilter}
|
|
142
|
-
/>
|
|
143
|
-
</Flex>
|
|
144
|
-
)}
|
|
145
|
-
</Padded>
|
|
146
|
-
{!files || files.length === 0 ? (
|
|
147
|
-
<ListEmpty
|
|
148
|
-
canCreate={allowedActions.canCreate}
|
|
149
|
-
numberOfRows={2}
|
|
150
|
-
onClick={handleGoToUpload}
|
|
151
|
-
hasSearchApplied={areResultsEmptyWithSearchOrFilters}
|
|
152
|
-
/>
|
|
153
|
-
) : (
|
|
154
|
-
<>
|
|
155
|
-
<List
|
|
156
|
-
data={files}
|
|
157
|
-
onChange={handleCheckboxChange}
|
|
158
|
-
selectedItems={selectedFiles}
|
|
159
|
-
onCardClick={handleListCardClick}
|
|
160
|
-
allowedTypes={allowedTypes}
|
|
161
|
-
smallCards
|
|
162
|
-
renderCardControl={renderCardControl}
|
|
163
|
-
/>
|
|
164
|
-
<Padded left right>
|
|
165
|
-
<Padded left right size="xs">
|
|
166
|
-
<PageFooter
|
|
167
|
-
context={{ emitEvent: () => {} }}
|
|
168
|
-
count={count}
|
|
169
|
-
onChangeParams={handleChangeListParams}
|
|
170
|
-
params={paginationParams}
|
|
124
|
+
<Padded top>
|
|
125
|
+
{allowedActions.canRead && (
|
|
126
|
+
<Flex flexWrap="wrap">
|
|
127
|
+
{multiple && (
|
|
128
|
+
<Padded right size="sm">
|
|
129
|
+
<SelectAll
|
|
130
|
+
checked={areAllCheckboxesSelected}
|
|
131
|
+
onChange={handleAllFilesSelection}
|
|
132
|
+
someChecked={hasSomeCheckboxSelected && !areAllCheckboxesSelected}
|
|
171
133
|
/>
|
|
172
134
|
</Padded>
|
|
173
|
-
|
|
174
|
-
|
|
135
|
+
)}
|
|
136
|
+
<SortPicker onChange={handleChangeParams} value={params._sort} />
|
|
137
|
+
<Padded left size="sm" />
|
|
138
|
+
<Filters
|
|
139
|
+
filters={params.filters}
|
|
140
|
+
onChange={handleChangeParams}
|
|
141
|
+
onClick={handleDeleteFilter}
|
|
142
|
+
/>
|
|
143
|
+
</Flex>
|
|
175
144
|
)}
|
|
176
|
-
</
|
|
145
|
+
</Padded>
|
|
146
|
+
{!files || files.length === 0 ? (
|
|
147
|
+
<ListEmpty
|
|
148
|
+
canCreate={allowedActions.canCreate}
|
|
149
|
+
numberOfRows={2}
|
|
150
|
+
onClick={handleGoToUpload}
|
|
151
|
+
hasSearchApplied={areResultsEmptyWithSearchOrFilters}
|
|
152
|
+
/>
|
|
153
|
+
) : (
|
|
154
|
+
<>
|
|
155
|
+
<List
|
|
156
|
+
data={files}
|
|
157
|
+
onChange={handleCheckboxChange}
|
|
158
|
+
selectedItems={selectedFiles}
|
|
159
|
+
onCardClick={handleListCardClick}
|
|
160
|
+
allowedTypes={allowedTypes}
|
|
161
|
+
smallCards
|
|
162
|
+
renderCardControl={renderCardControl}
|
|
163
|
+
/>
|
|
164
|
+
<Padded left right>
|
|
165
|
+
<Padded left right size="xs">
|
|
166
|
+
<PageFooter
|
|
167
|
+
context={{ emitEvent: () => {} }}
|
|
168
|
+
count={count}
|
|
169
|
+
onChangeParams={handleChangeListParams}
|
|
170
|
+
params={paginationParams}
|
|
171
|
+
/>
|
|
172
|
+
</Padded>
|
|
173
|
+
</Padded>
|
|
174
|
+
</>
|
|
175
|
+
)}
|
|
176
|
+
</Wrapper>
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { Text } from '@buffetjs/core';
|
|
5
|
+
/* stylelint-enable */
|
|
4
6
|
|
|
5
7
|
const SizeBox = styled((props) => <Text {...props} fontSize="md" color="white" as="div" />)`
|
|
6
8
|
position: absolute;
|
|
7
9
|
bottom: 0;
|
|
8
10
|
right: 0;
|
|
9
|
-
background: #
|
|
11
|
+
background: #000;
|
|
10
12
|
border-radius: ${({ theme }) => theme.main.sizes.borderRadius};
|
|
11
13
|
`;
|
|
12
14
|
|
|
@@ -5,9 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Wrapper from './Wrapper';
|
|
6
6
|
|
|
7
7
|
function Chevron({ side, onClick }) {
|
|
8
|
-
return
|
|
9
|
-
<
|
|
10
|
-
|
|
8
|
+
return (
|
|
9
|
+
<Wrapper onClick={onClick}>
|
|
10
|
+
<FontAwesomeIcon color="white" icon={`chevron-${side}`} />
|
|
11
|
+
</Wrapper>
|
|
12
|
+
);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
Chevron.propTypes = {
|
|
@@ -5,9 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import { Text } from '@buffetjs/core';
|
|
6
6
|
|
|
7
7
|
function IntlText({ id, defaultMessage, values, ...textProps }) {
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return (
|
|
9
|
+
<FormattedMessage id={id} defaultMessage={defaultMessage} values={values}>
|
|
10
|
+
{(msg) => <Text {...textProps}>{msg}</Text>}
|
|
11
|
+
</FormattedMessage>
|
|
12
|
+
);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
IntlText.defaultProps = {
|
|
@@ -5,12 +5,15 @@ const ListCell = styled.div`
|
|
|
5
5
|
display: inline-block;
|
|
6
6
|
padding-left: 15px;
|
|
7
7
|
padding-right: 15px;
|
|
8
|
+
|
|
8
9
|
@media only screen and (min-width: 768px) {
|
|
9
10
|
width: 50%;
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
@media only screen and (min-width: 1024px) {
|
|
12
14
|
width: 25%;
|
|
13
15
|
}
|
|
16
|
+
|
|
14
17
|
@media only screen and (min-width: 1280px) {
|
|
15
18
|
max-width: 248px;
|
|
16
19
|
}
|
|
@@ -15,10 +15,10 @@ const BackButton = styled.button`
|
|
|
15
15
|
text-align: center;
|
|
16
16
|
color: #81848a;
|
|
17
17
|
border-right: 1px solid #f3f4f4;
|
|
18
|
-
|
|
18
|
+
&::before {
|
|
19
19
|
line-height: normal;
|
|
20
20
|
content: '\f053';
|
|
21
|
-
font-family:
|
|
21
|
+
font-family: FontAwesome;
|
|
22
22
|
font-size: ${({ theme }) => theme.main.sizes.fonts.lg};
|
|
23
23
|
font-weight: ${({ theme }) => theme.main.fontWeights.bold};
|
|
24
24
|
}
|
|
@@ -5,16 +5,18 @@ import { Text } from '@buffetjs/core';
|
|
|
5
5
|
import Wrapper from './Wrapper';
|
|
6
6
|
|
|
7
7
|
function Count({ count, isActive }) {
|
|
8
|
-
return
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
return (
|
|
9
|
+
<Wrapper isActive={isActive} justifyContent="center" alignItems="center">
|
|
10
|
+
<Text
|
|
11
|
+
lineHeight="none"
|
|
12
|
+
fontWeight="bold"
|
|
13
|
+
color={isActive ? 'mediumBlue' : 'grey'}
|
|
14
|
+
fontSize="xs"
|
|
15
|
+
>
|
|
16
|
+
{count}
|
|
17
|
+
</Text>
|
|
18
|
+
</Wrapper>
|
|
19
|
+
);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
Count.propTypes = {
|
|
@@ -2,56 +2,70 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
function Play({ fill, ...rest }) {
|
|
5
|
-
return
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
return (
|
|
6
|
+
<svg
|
|
7
|
+
width="48px"
|
|
8
|
+
height="52px"
|
|
9
|
+
viewBox="0 0 48 52"
|
|
10
|
+
{...rest}
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
>
|
|
13
|
+
<defs>
|
|
14
|
+
<filter
|
|
15
|
+
x="-1.7%"
|
|
16
|
+
y="-2.1%"
|
|
17
|
+
width="103.5%"
|
|
18
|
+
height="104.1%"
|
|
19
|
+
filterUnits="objectBoundingBox"
|
|
20
|
+
id="filter-1"
|
|
21
|
+
>
|
|
22
|
+
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1" />
|
|
23
|
+
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1" />
|
|
24
|
+
<feColorMatrix
|
|
25
|
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"
|
|
26
|
+
type="matrix"
|
|
27
|
+
in="shadowBlurOuter1"
|
|
28
|
+
result="shadowMatrixOuter1"
|
|
29
|
+
/>
|
|
30
|
+
<feMerge>
|
|
31
|
+
<feMergeNode in="shadowMatrixOuter1" />
|
|
32
|
+
<feMergeNode in="SourceGraphic" />
|
|
33
|
+
</feMerge>
|
|
34
|
+
</filter>
|
|
35
|
+
</defs>
|
|
30
36
|
<g
|
|
31
|
-
id="Media-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
id="Prototype---Media-library"
|
|
38
|
+
stroke="none"
|
|
39
|
+
strokeWidth="1"
|
|
40
|
+
fill="none"
|
|
41
|
+
fillRule="evenodd"
|
|
35
42
|
>
|
|
36
43
|
<g
|
|
37
|
-
id="
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
id="Media-Library-/-Single-view-/-Media-Video"
|
|
45
|
+
transform="translate(-545.000000, -435.000000)"
|
|
46
|
+
fill={fill}
|
|
47
|
+
fillRule="nonzero"
|
|
40
48
|
>
|
|
41
|
-
<g
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
<g
|
|
50
|
+
id="Modal---Upload-from-Unsplash"
|
|
51
|
+
filter="url(#filter-1)"
|
|
52
|
+
transform="translate(323.000000, 182.000000)"
|
|
53
|
+
>
|
|
54
|
+
<g id="Video" transform="translate(25.000000, 79.000000)">
|
|
55
|
+
<g id="Group-17" transform="translate(169.000000, 151.000000)">
|
|
56
|
+
<g id="play" transform="translate(32.000000, 25.000000)">
|
|
57
|
+
<path
|
|
58
|
+
d="M39.3461265,22.97086 L1.5920398,43.9516702 C1.15612414,44.1980573 0.781805259,44.2264866 0.469083156,44.0369581 C0.156361052,43.8474295 0,43.5062781 0,43.0135039 L0,1.16560057 C0,0.672826344 0.156361052,0.331674959 0.469083156,0.142146411 C0.781805259,-0.0473821369 1.15612414,-0.0189528548 1.5920398,0.227434257 L39.3461265,21.2082445 C39.7820422,21.4546316 40,21.7484009 40,22.0895522 C40,22.4307036 39.7820422,22.7244729 39.3461265,22.97086 Z"
|
|
59
|
+
id="Path"
|
|
60
|
+
/>
|
|
61
|
+
</g>
|
|
48
62
|
</g>
|
|
49
63
|
</g>
|
|
50
64
|
</g>
|
|
51
65
|
</g>
|
|
52
66
|
</g>
|
|
53
|
-
</
|
|
54
|
-
|
|
67
|
+
</svg>
|
|
68
|
+
);
|
|
55
69
|
}
|
|
56
70
|
|
|
57
71
|
Play.defaultProps = {
|
|
@@ -10,7 +10,7 @@ const Wrapper = styled.div`
|
|
|
10
10
|
height: ${({ small }) => (small ? '45px' : '94px')};
|
|
11
11
|
padding-left: ${({ small }) => (small ? '5px' : '9px')};
|
|
12
12
|
border-radius: 50%;
|
|
13
|
-
background-color:
|
|
13
|
+
background-color: rgb(255 255 255 / 50%);
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
16
|
Wrapper.defaultProps = {
|
|
@@ -15,13 +15,7 @@ import pluginId from '../../pluginId';
|
|
|
15
15
|
import stepper from './stepper';
|
|
16
16
|
import useModalContext from '../../hooks/useModalContext';
|
|
17
17
|
|
|
18
|
-
function InputModalStepper({
|
|
19
|
-
allowedActions,
|
|
20
|
-
isOpen,
|
|
21
|
-
onToggle,
|
|
22
|
-
noNavigation,
|
|
23
|
-
onInputMediaChange,
|
|
24
|
-
}) {
|
|
18
|
+
function InputModalStepper({ allowedActions, isOpen, onToggle, noNavigation, onInputMediaChange }) {
|
|
25
19
|
const { emitEvent, formatMessage } = useGlobalContext();
|
|
26
20
|
const [shouldDeleteFile, setShouldDeleteFile] = useState(false);
|
|
27
21
|
const [displayNextButton, setDisplayNextButton] = useState(false);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.14.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.
|
|
19
|
-
"@akemona-org/strapi-provider-upload-local": "3.
|
|
20
|
-
"@akemona-org/strapi-utils": "3.
|
|
18
|
+
"@akemona-org/strapi-helper-plugin": "3.14.1",
|
|
19
|
+
"@akemona-org/strapi-provider-upload-local": "3.14.1",
|
|
20
|
+
"@akemona-org/strapi-utils": "3.14.1",
|
|
21
21
|
"@buffetjs/core": "3.3.8",
|
|
22
22
|
"@buffetjs/custom": "3.3.8",
|
|
23
23
|
"@buffetjs/hooks": "3.3.8",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"engines": {
|
|
66
|
-
"node": ">=
|
|
66
|
+
"node": ">=18.17.0 <=20.x.x",
|
|
67
67
|
"npm": ">=6.0.0"
|
|
68
68
|
},
|
|
69
69
|
"license": "SEE LICENSE IN LICENSE",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "bbf71e936ef4e8da75771eac49c5f50b36e5166e"
|
|
71
71
|
}
|