@dhis2-ui/file-input 7.1.1 → 7.2.3
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/build/cjs/file-input-field-with-list/file-list-item-with-remove.js +1 -1
- package/build/cjs/file-list/file-list-item.js +2 -2
- package/build/cjs/file-list/file-list-placeholder.js +2 -2
- package/build/cjs/file-list/file-list.js +1 -1
- package/build/es/file-input-field-with-list/file-list-item-with-remove.js +6 -6
- package/build/es/file-list/file-list-item.js +9 -9
- package/build/es/file-list/file-list-placeholder.js +3 -3
- package/build/es/file-list/file-list.js +4 -4
- package/package.json +8 -8
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.FileListItemWithRemove = void 0;
|
|
7
7
|
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -9,14 +9,14 @@ var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
|
9
9
|
|
|
10
10
|
var _loader = require("@dhis2-ui/loader");
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
|
|
13
|
-
|
|
14
12
|
var _uiConstants = require("@dhis2/ui-constants");
|
|
15
13
|
|
|
16
14
|
var _uiIcons = require("@dhis2/ui-icons");
|
|
17
15
|
|
|
18
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
17
|
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
20
|
var _react = _interopRequireDefault(require("react"));
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -7,10 +7,10 @@ exports.FileListPlaceholder = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
|
|
11
|
-
|
|
12
10
|
var _uiConstants = require("@dhis2/ui-constants");
|
|
13
11
|
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -7,7 +7,7 @@ exports.FileList = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
5
|
import { FileListItem } from '../index.js';
|
|
6
6
|
|
|
@@ -36,10 +36,10 @@ class FileListItemWithRemove extends Component {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
FileListItemWithRemove.propTypes = {
|
|
39
|
-
label:
|
|
40
|
-
removeText:
|
|
41
|
-
onRemove:
|
|
42
|
-
className:
|
|
43
|
-
file:
|
|
39
|
+
label: PropTypes.string.isRequired,
|
|
40
|
+
removeText: PropTypes.string.isRequired,
|
|
41
|
+
onRemove: PropTypes.func.isRequired,
|
|
42
|
+
className: PropTypes.string,
|
|
43
|
+
file: PropTypes.instanceOf(File)
|
|
44
44
|
};
|
|
45
45
|
export { FileListItemWithRemove };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import { CircularLoader } from '@dhis2-ui/loader';
|
|
3
|
-
import propTypes from '@dhis2/prop-types';
|
|
4
3
|
import { theme, colors, spacers } from '@dhis2/ui-constants';
|
|
5
4
|
import { IconAttachment16 } from '@dhis2/ui-icons';
|
|
6
5
|
import cx from 'classnames';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
9
|
const FileListItem = ({
|
|
@@ -45,13 +45,13 @@ FileListItem.defaultProps = {
|
|
|
45
45
|
dataTest: 'dhis2-uicore-filelistitem'
|
|
46
46
|
};
|
|
47
47
|
FileListItem.propTypes = {
|
|
48
|
-
onRemove:
|
|
49
|
-
cancelText:
|
|
50
|
-
className:
|
|
51
|
-
dataTest:
|
|
52
|
-
label:
|
|
53
|
-
loading:
|
|
54
|
-
removeText:
|
|
55
|
-
onCancel:
|
|
48
|
+
onRemove: PropTypes.func.isRequired,
|
|
49
|
+
cancelText: PropTypes.string,
|
|
50
|
+
className: PropTypes.string,
|
|
51
|
+
dataTest: PropTypes.string,
|
|
52
|
+
label: PropTypes.string,
|
|
53
|
+
loading: PropTypes.bool,
|
|
54
|
+
removeText: PropTypes.string,
|
|
55
|
+
onCancel: PropTypes.func
|
|
56
56
|
};
|
|
57
57
|
export { FileListItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import propTypes from '@dhis2/prop-types';
|
|
3
2
|
import { colors, spacers } from '@dhis2/ui-constants';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
6
|
const FileListPlaceholder = ({
|
|
@@ -18,7 +18,7 @@ FileListPlaceholder.defaultProps = {
|
|
|
18
18
|
dataTest: 'dhis2-uicore-filelistplaceholder'
|
|
19
19
|
};
|
|
20
20
|
FileListPlaceholder.propTypes = {
|
|
21
|
-
children:
|
|
22
|
-
dataTest:
|
|
21
|
+
children: PropTypes.string,
|
|
22
|
+
dataTest: PropTypes.string
|
|
23
23
|
};
|
|
24
24
|
export { FileListPlaceholder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
const FileList = ({
|
|
@@ -17,8 +17,8 @@ FileList.defaultProps = {
|
|
|
17
17
|
dataTest: 'dhis2-uicore-filelist'
|
|
18
18
|
};
|
|
19
19
|
FileList.propTypes = {
|
|
20
|
-
children:
|
|
21
|
-
className:
|
|
22
|
-
dataTest:
|
|
20
|
+
children: PropTypes.node,
|
|
21
|
+
className: PropTypes.string,
|
|
22
|
+
dataTest: PropTypes.string
|
|
23
23
|
};
|
|
24
24
|
export { FileList };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/file-input",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "UI FileInput",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"styled-jsx": "^4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dhis2-
|
|
36
|
-
"@dhis2-ui/
|
|
37
|
-
"@dhis2-ui/
|
|
38
|
-
"@dhis2-ui/
|
|
39
|
-
"@dhis2/
|
|
40
|
-
"@dhis2/ui-constants": "7.
|
|
41
|
-
"@dhis2/ui-icons": "7.
|
|
35
|
+
"@dhis2/prop-types": "^3.0.0-beta.1",
|
|
36
|
+
"@dhis2-ui/button": "7.2.3",
|
|
37
|
+
"@dhis2-ui/field": "7.2.3",
|
|
38
|
+
"@dhis2-ui/label": "7.2.3",
|
|
39
|
+
"@dhis2-ui/loader": "7.2.3",
|
|
40
|
+
"@dhis2/ui-constants": "7.2.3",
|
|
41
|
+
"@dhis2/ui-icons": "7.2.3",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"prop-types": "^15.7.2"
|
|
44
44
|
},
|