@panneau/modal-resource-form 3.0.162 → 3.0.164

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
@@ -6,6 +6,7 @@ import { useResourceValues } from '@panneau/intl';
6
6
  import Dialog from '@panneau/modal-dialog';
7
7
 
8
8
  var propTypes = {
9
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
9
10
  resource: PropTypes.string,
10
11
  type: PropTypes.string,
11
12
  item: PropTypes.shape({
@@ -26,7 +27,8 @@ var defaultProps = {
26
27
  className: null
27
28
  };
28
29
  var ModalResourceForm = function ModalResourceForm(_ref) {
29
- var resource = _ref.resource,
30
+ var id = _ref.id,
31
+ resource = _ref.resource,
30
32
  type = _ref.type,
31
33
  item = _ref.item,
32
34
  isCreate = _ref.isCreate,
@@ -35,6 +37,7 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
35
37
  className = _ref.className;
36
38
  var resourceValues = useResourceValues(resource);
37
39
  return /*#__PURE__*/React.createElement(Dialog, {
40
+ id: id,
38
41
  title: !isCreate !== null ? /*#__PURE__*/React.createElement(FormattedMessage, {
39
42
  values: resourceValues,
40
43
  id: "mCfzkJ",
package/lib/index.js CHANGED
@@ -10,6 +10,7 @@ var intl = require('@panneau/intl');
10
10
  var Dialog = require('@panneau/modal-dialog');
11
11
 
12
12
  var propTypes = {
13
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
13
14
  resource: PropTypes.string,
14
15
  type: PropTypes.string,
15
16
  item: PropTypes.shape({
@@ -30,7 +31,8 @@ var defaultProps = {
30
31
  className: null
31
32
  };
32
33
  var ModalResourceForm = function ModalResourceForm(_ref) {
33
- var resource = _ref.resource,
34
+ var id = _ref.id,
35
+ resource = _ref.resource,
34
36
  type = _ref.type,
35
37
  item = _ref.item,
36
38
  isCreate = _ref.isCreate,
@@ -39,6 +41,7 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
39
41
  className = _ref.className;
40
42
  var resourceValues = intl.useResourceValues(resource);
41
43
  return /*#__PURE__*/React.createElement(Dialog, {
44
+ id: id,
42
45
  title: !isCreate !== null ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
43
46
  values: resourceValues,
44
47
  id: "mCfzkJ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-resource-form",
3
- "version": "3.0.162",
3
+ "version": "3.0.164",
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.162",
50
- "@panneau/form-resource": "^3.0.162",
51
- "@panneau/intl": "^3.0.162",
52
- "@panneau/modal-dialog": "^3.0.162",
53
- "@panneau/themes": "^3.0.162",
49
+ "@panneau/core": "^3.0.164",
50
+ "@panneau/form-resource": "^3.0.164",
51
+ "@panneau/intl": "^3.0.164",
52
+ "@panneau/modal-dialog": "^3.0.164",
53
+ "@panneau/themes": "^3.0.164",
54
54
  "classnames": "^2.5.1",
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": "82936217c80643ad52d9b425a7a8c374d6264d8e"
62
+ "gitHead": "7a1511eb7b08a09cfcf708d1ca314a12155e9bd8"
63
63
  }