decap-cms-widget-file 3.1.4-beta.0 → 3.2.0
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/CHANGELOG.md +1 -1
- package/dist/decap-cms-widget-file.js +2 -2
- package/dist/decap-cms-widget-file.js.LICENSE.txt +2 -28
- package/dist/decap-cms-widget-file.js.map +1 -1
- package/dist/esm/FilePreview.js +17 -25
- package/dist/esm/index.js +13 -24
- package/dist/esm/schema.js +1 -7
- package/dist/esm/withFileControl.js +243 -253
- package/package.json +3 -3
- package/src/withFileControl.js +6 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decap-cms-widget-file",
|
|
3
3
|
"description": "Widget for uploading files in Decap CMS.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"homepage": "https://www.decapcms.org/docs/widgets/#file",
|
|
6
6
|
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-widget-file",
|
|
7
7
|
"bugs": "https://github.com/decaporg/decap-cms/issues",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"decap-cms-ui-default": "^3.0.0",
|
|
35
35
|
"immutable": "^3.7.6",
|
|
36
36
|
"prop-types": "^15.7.2",
|
|
37
|
-
"react": "
|
|
37
|
+
"react": "^19.1.0",
|
|
38
38
|
"react-immutable-proptypes": "^2.1.0",
|
|
39
39
|
"uuid": "^8.3.2"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ed7e99318007b83f4c57f3237bf92b931676820a"
|
|
42
42
|
}
|
package/src/withFileControl.js
CHANGED
|
@@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { Map, List } from 'immutable';
|
|
7
|
-
import
|
|
7
|
+
import once from 'lodash/once';
|
|
8
8
|
import { v4 as uuid } from 'uuid';
|
|
9
9
|
import { oneLine } from 'common-tags';
|
|
10
10
|
import {
|
|
@@ -257,6 +257,11 @@ export default function withFileControl({ forImage } = {}) {
|
|
|
257
257
|
this.controlID = uuid();
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
componentDidMount() {
|
|
261
|
+
// Manually validate PropTypes - React 19 breaking change
|
|
262
|
+
PropTypes.checkPropTypes(FileControl.propTypes, this.props, 'prop', 'FileControl');
|
|
263
|
+
}
|
|
264
|
+
|
|
260
265
|
shouldComponentUpdate(nextProps) {
|
|
261
266
|
/**
|
|
262
267
|
* Always update if the value or getAsset changes.
|