@panneau/modal-form 3.0.130 → 3.0.132

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 CHANGED
@@ -1,9 +1,11 @@
1
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
1
2
  import PropTypes from 'prop-types';
2
3
  import React from 'react';
3
4
  import { FormattedMessage } from 'react-intl';
4
5
  import Form from '@panneau/form';
5
6
  import Dialog from '@panneau/modal-dialog';
6
7
 
8
+ var _excluded = ["title", "name", "fields", "action", "type", "item", "onComplete", "onClose", "submitButtonLabel", "className", "children"];
7
9
  var propTypes = {
8
10
  title: PropTypes.node,
9
11
  name: PropTypes.string,
@@ -43,7 +45,8 @@ function ModalForm(_ref) {
43
45
  onClose = _ref.onClose,
44
46
  submitButtonLabel = _ref.submitButtonLabel,
45
47
  className = _ref.className,
46
- children = _ref.children;
48
+ children = _ref.children,
49
+ props = _objectWithoutProperties(_ref, _excluded);
47
50
  return /*#__PURE__*/React.createElement(Dialog, {
48
51
  title: title || (name !== null ? /*#__PURE__*/React.createElement(FormattedMessage, {
49
52
  id: "smqUAV",
@@ -67,14 +70,14 @@ function ModalForm(_ref) {
67
70
  size: "lg",
68
71
  onClose: onClose,
69
72
  className: className
70
- }, children, /*#__PURE__*/React.createElement(Form, {
73
+ }, children, /*#__PURE__*/React.createElement(Form, Object.assign({}, props, {
71
74
  fields: fields,
72
75
  action: action,
73
76
  type: type,
74
77
  item: item,
75
78
  onComplete: onComplete,
76
79
  submitButtonLabel: submitButtonLabel
77
- }));
80
+ })));
78
81
  }
79
82
  ModalForm.propTypes = propTypes;
80
83
  ModalForm.defaultProps = defaultProps;
package/lib/index.js CHANGED
@@ -2,12 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
6
  var PropTypes = require('prop-types');
6
7
  var React = require('react');
7
8
  var reactIntl = require('react-intl');
8
9
  var Form = require('@panneau/form');
9
10
  var Dialog = require('@panneau/modal-dialog');
10
11
 
12
+ var _excluded = ["title", "name", "fields", "action", "type", "item", "onComplete", "onClose", "submitButtonLabel", "className", "children"];
11
13
  var propTypes = {
12
14
  title: PropTypes.node,
13
15
  name: PropTypes.string,
@@ -47,7 +49,8 @@ function ModalForm(_ref) {
47
49
  onClose = _ref.onClose,
48
50
  submitButtonLabel = _ref.submitButtonLabel,
49
51
  className = _ref.className,
50
- children = _ref.children;
52
+ children = _ref.children,
53
+ props = _objectWithoutProperties(_ref, _excluded);
51
54
  return /*#__PURE__*/React.createElement(Dialog, {
52
55
  title: title || (name !== null ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
53
56
  id: "smqUAV",
@@ -71,14 +74,14 @@ function ModalForm(_ref) {
71
74
  size: "lg",
72
75
  onClose: onClose,
73
76
  className: className
74
- }, children, /*#__PURE__*/React.createElement(Form, {
77
+ }, children, /*#__PURE__*/React.createElement(Form, Object.assign({}, props, {
75
78
  fields: fields,
76
79
  action: action,
77
80
  type: type,
78
81
  item: item,
79
82
  onComplete: onComplete,
80
83
  submitButtonLabel: submitButtonLabel
81
- }));
84
+ })));
82
85
  }
83
86
  ModalForm.propTypes = propTypes;
84
87
  ModalForm.defaultProps = defaultProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-form",
3
- "version": "3.0.130",
3
+ "version": "3.0.132",
4
4
  "description": "Resource form modal",
5
5
  "keywords": [
6
6
  "javascript"
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.12.5",
49
- "@panneau/core": "^3.0.130",
50
- "@panneau/form": "^3.0.130",
51
- "@panneau/intl": "^3.0.130",
52
- "@panneau/modal-dialog": "^3.0.130",
53
- "@panneau/themes": "^3.0.130",
49
+ "@panneau/core": "^3.0.131",
50
+ "@panneau/form": "^3.0.131",
51
+ "@panneau/intl": "^3.0.132",
52
+ "@panneau/modal-dialog": "^3.0.131",
53
+ "@panneau/themes": "^3.0.131",
54
54
  "classnames": "^2.2.6",
55
55
  "lodash": "^4.17.21",
56
56
  "prop-types": "^15.7.2",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "e6070daacb45351ccbef67ae8006f1a293ca8e2b"
62
+ "gitHead": "a8830af9e0e49bd9581002f715de26c2bc152e7b"
63
63
  }