@panneau/modal-resource-form 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 +16 -33
- package/package.json +8 -8
package/es/index.js
CHANGED
|
@@ -1,40 +1,25 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { FormattedMessage } from 'react-intl';
|
|
4
3
|
import ResourceForm from '@panneau/form-resource';
|
|
5
4
|
import { useResourceValues } from '@panneau/intl';
|
|
6
5
|
import Dialog from '@panneau/modal-dialog';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
10
|
-
resource: PropTypes.string,
|
|
11
|
-
type: PropTypes.string,
|
|
12
|
-
item: PropTypes.shape({
|
|
13
|
-
id: PropTypes.string
|
|
14
|
-
}),
|
|
15
|
-
isCreate: PropTypes.bool,
|
|
16
|
-
onSuccess: PropTypes.func,
|
|
17
|
-
onClose: PropTypes.func,
|
|
18
|
-
className: PropTypes.string
|
|
19
|
-
};
|
|
20
|
-
var defaultProps = {
|
|
21
|
-
resource: null,
|
|
22
|
-
type: null,
|
|
23
|
-
item: null,
|
|
24
|
-
isCreate: null,
|
|
25
|
-
onSuccess: null,
|
|
26
|
-
onClose: null,
|
|
27
|
-
className: null
|
|
28
|
-
};
|
|
29
|
-
var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
7
|
+
function ModalResourceForm(_ref) {
|
|
30
8
|
var id = _ref.id,
|
|
31
|
-
resource = _ref.resource,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
9
|
+
_ref$resource = _ref.resource,
|
|
10
|
+
resource = _ref$resource === void 0 ? null : _ref$resource,
|
|
11
|
+
_ref$type = _ref.type,
|
|
12
|
+
type = _ref$type === void 0 ? null : _ref$type,
|
|
13
|
+
_ref$item = _ref.item,
|
|
14
|
+
item = _ref$item === void 0 ? null : _ref$item,
|
|
15
|
+
_ref$isCreate = _ref.isCreate,
|
|
16
|
+
isCreate = _ref$isCreate === void 0 ? null : _ref$isCreate,
|
|
17
|
+
_ref$onSuccess = _ref.onSuccess,
|
|
18
|
+
onSuccess = _ref$onSuccess === void 0 ? null : _ref$onSuccess,
|
|
19
|
+
_ref$onClose = _ref.onClose,
|
|
20
|
+
onClose = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
21
|
+
_ref$className = _ref.className,
|
|
22
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
38
23
|
var resourceValues = useResourceValues(resource);
|
|
39
24
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
40
25
|
id: id,
|
|
@@ -69,8 +54,6 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
|
69
54
|
onSuccess: onSuccess,
|
|
70
55
|
isModal: true
|
|
71
56
|
}));
|
|
72
|
-
}
|
|
73
|
-
ModalResourceForm.propTypes = propTypes;
|
|
74
|
-
ModalResourceForm.defaultProps = defaultProps;
|
|
57
|
+
}
|
|
75
58
|
|
|
76
59
|
export { ModalResourceForm as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-resource-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Resource form 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/form-resource": "^
|
|
54
|
-
"@panneau/intl": "^
|
|
55
|
-
"@panneau/modal-dialog": "^
|
|
56
|
-
"@panneau/themes": "^
|
|
52
|
+
"@panneau/core": "^4.0.0",
|
|
53
|
+
"@panneau/form-resource": "^4.0.0",
|
|
54
|
+
"@panneau/intl": "^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
|
}
|