@panneau/modal-resource-items 3.0.307 → 4.0.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/es/index.js +20 -44
- package/package.json +8 -8
package/es/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import isObject from 'lodash-es/isObject';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import React, { useMemo } from 'react';
|
|
6
5
|
import { FormattedMessage } from 'react-intl';
|
|
7
6
|
import { usePanneauResource } from '@panneau/core/contexts';
|
|
@@ -11,47 +10,26 @@ import ResourceItemsList from '@panneau/list-resource-items';
|
|
|
11
10
|
import Dialog from '@panneau/modal-dialog';
|
|
12
11
|
|
|
13
12
|
var _excluded = ["id", "resource", "title", "query", "paginated", "size", "onClose", "listProps", "className", "children"];
|
|
14
|
-
|
|
15
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
16
|
-
resource: PropTypes.string,
|
|
17
|
-
title: PropTypes.string,
|
|
18
|
-
query: PropTypes.shape(),
|
|
19
|
-
paginated: PropTypes.bool,
|
|
20
|
-
size: PropTypes.string,
|
|
21
|
-
onQueryChange: PropTypes.func,
|
|
22
|
-
onQueryReset: PropTypes.func,
|
|
23
|
-
onPageChange: PropTypes.func,
|
|
24
|
-
onClose: PropTypes.func,
|
|
25
|
-
// eslint-disable-next-line react/forbid-prop-types
|
|
26
|
-
listProps: PropTypes.object,
|
|
27
|
-
className: PropTypes.string,
|
|
28
|
-
children: PropTypes.node
|
|
29
|
-
};
|
|
30
|
-
var defaultProps = {
|
|
31
|
-
resource: null,
|
|
32
|
-
title: null,
|
|
33
|
-
query: null,
|
|
34
|
-
paginated: true,
|
|
35
|
-
size: 'xl',
|
|
36
|
-
onQueryChange: PropTypes.func,
|
|
37
|
-
onQueryReset: PropTypes.func,
|
|
38
|
-
onPageChange: PropTypes.func,
|
|
39
|
-
onClose: null,
|
|
40
|
-
listProps: null,
|
|
41
|
-
className: null,
|
|
42
|
-
children: null
|
|
43
|
-
};
|
|
44
|
-
var ModalResourceItems = function ModalResourceItems(_ref) {
|
|
13
|
+
function ModalResourceItems(_ref) {
|
|
45
14
|
var id = _ref.id,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
15
|
+
_ref$resource = _ref.resource,
|
|
16
|
+
providedResource = _ref$resource === void 0 ? null : _ref$resource,
|
|
17
|
+
_ref$title = _ref.title,
|
|
18
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
19
|
+
_ref$query = _ref.query,
|
|
20
|
+
initialQuery = _ref$query === void 0 ? null : _ref$query,
|
|
21
|
+
_ref$paginated = _ref.paginated,
|
|
22
|
+
paginated = _ref$paginated === void 0 ? true : _ref$paginated,
|
|
23
|
+
_ref$size = _ref.size,
|
|
24
|
+
size = _ref$size === void 0 ? 'xl' : _ref$size,
|
|
25
|
+
_ref$onClose = _ref.onClose,
|
|
26
|
+
onClose = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
27
|
+
_ref$listProps = _ref.listProps,
|
|
28
|
+
listProps = _ref$listProps === void 0 ? null : _ref$listProps,
|
|
29
|
+
_ref$className = _ref.className,
|
|
30
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
31
|
+
_ref$children = _ref.children,
|
|
32
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
55
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
34
|
var panneauResource = usePanneauResource(providedResource);
|
|
57
35
|
var resource = isObject(providedResource) ? providedResource : panneauResource;
|
|
@@ -91,8 +69,6 @@ var ModalResourceItems = function ModalResourceItems(_ref) {
|
|
|
91
69
|
onQueryReset: onQueryReset,
|
|
92
70
|
listProps: listProps
|
|
93
71
|
}, props)), children);
|
|
94
|
-
}
|
|
95
|
-
ModalResourceItems.propTypes = propTypes;
|
|
96
|
-
ModalResourceItems.defaultProps = defaultProps;
|
|
72
|
+
}
|
|
97
73
|
|
|
98
74
|
export { ModalResourceItems as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-resource-items",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Resource items modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^
|
|
53
|
-
"@panneau/intl": "^
|
|
54
|
-
"@panneau/list-resource-items": "^
|
|
55
|
-
"@panneau/modal-dialog": "^
|
|
56
|
-
"@panneau/themes": "^
|
|
52
|
+
"@panneau/core": "^4.0.0",
|
|
53
|
+
"@panneau/intl": "^4.0.0",
|
|
54
|
+
"@panneau/list-resource-items": "^4.0.0",
|
|
55
|
+
"@panneau/modal-dialog": "^4.0.0",
|
|
56
|
+
"@panneau/themes": "^4.0.0",
|
|
57
57
|
"classnames": "^2.5.1",
|
|
58
58
|
"lodash-es": "^4.17.21",
|
|
59
59
|
"prop-types": "^15.7.2",
|
|
60
|
-
"react-intl": "^5.15.8
|
|
60
|
+
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
|
|
66
66
|
}
|