@panneau/modal-form 4.0.2 → 4.0.4

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 +17 -14
  2. package/package.json +7 -7
package/es/index.js CHANGED
@@ -1,7 +1,9 @@
1
+ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
1
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
3
  import { FormattedMessage } from 'react-intl';
3
4
  import Form from '@panneau/form';
4
5
  import Dialog from '@panneau/modal-dialog';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
7
 
6
8
  var _excluded = ["id", "title", "name", "fields", "action", "type", "item", "onComplete", "onClose", "submitButtonLabel", "className", "children"];
7
9
  function ModalForm(_ref) {
@@ -29,9 +31,9 @@ function ModalForm(_ref) {
29
31
  _ref$children = _ref.children,
30
32
  children = _ref$children === void 0 ? null : _ref$children,
31
33
  props = _objectWithoutProperties(_ref, _excluded);
32
- return /*#__PURE__*/React.createElement(Dialog, {
34
+ return /*#__PURE__*/jsxs(Dialog, {
33
35
  id: id,
34
- title: title || (name !== null ? /*#__PURE__*/React.createElement(FormattedMessage, {
36
+ title: title || (name !== null ? /*#__PURE__*/jsx(FormattedMessage, {
35
37
  id: "smqUAV",
36
38
  defaultMessage: [{
37
39
  "type": 0,
@@ -43,7 +45,7 @@ function ModalForm(_ref) {
43
45
  values: {
44
46
  name: name
45
47
  }
46
- }) : /*#__PURE__*/React.createElement(FormattedMessage, {
48
+ }) : /*#__PURE__*/jsx(FormattedMessage, {
47
49
  id: "T/NPHK",
48
50
  defaultMessage: [{
49
51
  "type": 0,
@@ -52,17 +54,18 @@ function ModalForm(_ref) {
52
54
  })),
53
55
  size: "lg",
54
56
  onClose: onClose,
55
- className: className
56
- }, children, /*#__PURE__*/React.createElement(Form, Object.assign({}, props, {
57
- fields: fields,
58
- action: action,
59
- type: type,
60
- item: item,
61
- buttonSize: "md",
62
- onComplete: onComplete,
63
- onCancel: onClose,
64
- submitButtonLabel: submitButtonLabel
65
- })));
57
+ className: className,
58
+ children: [children, /*#__PURE__*/jsx(Form, _objectSpread(_objectSpread({}, props), {}, {
59
+ fields: fields,
60
+ action: action,
61
+ type: type,
62
+ item: item,
63
+ buttonSize: "md",
64
+ onComplete: onComplete,
65
+ onCancel: onClose,
66
+ submitButtonLabel: submitButtonLabel
67
+ }))]
68
+ });
66
69
  }
67
70
 
68
71
  export { ModalForm as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-form",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "Resource form modal",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,11 +49,11 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.12.5",
52
- "@panneau/core": "^4.0.2",
53
- "@panneau/form": "^4.0.2",
54
- "@panneau/intl": "^4.0.2",
55
- "@panneau/modal-dialog": "^4.0.2",
56
- "@panneau/themes": "^4.0.2",
52
+ "@panneau/core": "^4.0.4",
53
+ "@panneau/form": "^4.0.4",
54
+ "@panneau/intl": "^4.0.4",
55
+ "@panneau/modal-dialog": "^4.0.4",
56
+ "@panneau/themes": "^4.0.4",
57
57
  "classnames": "^2.5.1",
58
58
  "lodash-es": "^4.17.21",
59
59
  "prop-types": "^15.7.2",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "53ad0f27e467992c23158732e0f7d39d8615780b"
65
+ "gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
66
66
  }