@panneau/modal-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.
Files changed (2) hide show
  1. package/es/index.js +22 -43
  2. package/package.json +8 -8
package/es/index.js CHANGED
@@ -1,53 +1,34 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
- import PropTypes from 'prop-types';
3
2
  import React from 'react';
4
3
  import { FormattedMessage } from 'react-intl';
5
4
  import Form from '@panneau/form';
6
5
  import Dialog from '@panneau/modal-dialog';
7
6
 
8
7
  var _excluded = ["id", "title", "name", "fields", "action", "type", "item", "onComplete", "onClose", "submitButtonLabel", "className", "children"];
9
- var propTypes = {
10
- id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
11
- title: PropTypes.node,
12
- name: PropTypes.string,
13
- fields: PropTypes.arrayOf(PropTypes.shape({})),
14
- action: PropTypes.string,
15
- type: PropTypes.string,
16
- item: PropTypes.shape({
17
- id: PropTypes.string
18
- }),
19
- onComplete: PropTypes.func,
20
- onClose: PropTypes.func,
21
- submitButtonLabel: PropTypes.node,
22
- className: PropTypes.string,
23
- children: PropTypes.node
24
- };
25
- var defaultProps = {
26
- title: null,
27
- name: null,
28
- fields: null,
29
- action: null,
30
- type: 'normal',
31
- item: null,
32
- onComplete: null,
33
- onClose: null,
34
- submitButtonLabel: null,
35
- className: null,
36
- children: null
37
- };
38
8
  function ModalForm(_ref) {
39
9
  var id = _ref.id,
40
- title = _ref.title,
41
- name = _ref.name,
42
- fields = _ref.fields,
43
- action = _ref.action,
44
- type = _ref.type,
45
- item = _ref.item,
46
- onComplete = _ref.onComplete,
47
- onClose = _ref.onClose,
48
- submitButtonLabel = _ref.submitButtonLabel,
49
- className = _ref.className,
50
- children = _ref.children,
10
+ _ref$title = _ref.title,
11
+ title = _ref$title === void 0 ? null : _ref$title,
12
+ _ref$name = _ref.name,
13
+ name = _ref$name === void 0 ? null : _ref$name,
14
+ _ref$fields = _ref.fields,
15
+ fields = _ref$fields === void 0 ? null : _ref$fields,
16
+ _ref$action = _ref.action,
17
+ action = _ref$action === void 0 ? null : _ref$action,
18
+ _ref$type = _ref.type,
19
+ type = _ref$type === void 0 ? 'normal' : _ref$type,
20
+ _ref$item = _ref.item,
21
+ item = _ref$item === void 0 ? null : _ref$item,
22
+ _ref$onComplete = _ref.onComplete,
23
+ onComplete = _ref$onComplete === void 0 ? null : _ref$onComplete,
24
+ _ref$onClose = _ref.onClose,
25
+ onClose = _ref$onClose === void 0 ? null : _ref$onClose,
26
+ _ref$submitButtonLabe = _ref.submitButtonLabel,
27
+ submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
28
+ _ref$className = _ref.className,
29
+ className = _ref$className === void 0 ? null : _ref$className,
30
+ _ref$children = _ref.children,
31
+ children = _ref$children === void 0 ? null : _ref$children,
51
32
  props = _objectWithoutProperties(_ref, _excluded);
52
33
  return /*#__PURE__*/React.createElement(Dialog, {
53
34
  id: id,
@@ -84,7 +65,5 @@ function ModalForm(_ref) {
84
65
  submitButtonLabel: submitButtonLabel
85
66
  })));
86
67
  }
87
- ModalForm.propTypes = propTypes;
88
- ModalForm.defaultProps = defaultProps;
89
68
 
90
69
  export { ModalForm as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-form",
3
- "version": "3.0.307",
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": "^3.0.307",
53
- "@panneau/form": "^3.0.307",
54
- "@panneau/intl": "^3.0.307",
55
- "@panneau/modal-dialog": "^3.0.307",
56
- "@panneau/themes": "^3.0.307",
52
+ "@panneau/core": "^4.0.0",
53
+ "@panneau/form": "^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||^6.0.0"
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": "cbe5e8b1705d01c5653a4df617a06243344310d3"
65
+ "gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
66
66
  }