@panneau/modal-resource-form 3.0.119 → 3.0.126
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/lib/index.js +13 -20
- package/package.json +9 -8
package/lib/index.js
CHANGED
|
@@ -9,23 +9,16 @@ var ResourceForm$1 = require('@panneau/form-resource');
|
|
|
9
9
|
var intl = require('@panneau/intl');
|
|
10
10
|
var Dialog = require('@panneau/modal-dialog');
|
|
11
11
|
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
var ResourceForm__default = /*#__PURE__*/_interopDefaultLegacy(ResourceForm$1);
|
|
17
|
-
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
|
18
|
-
|
|
19
12
|
var propTypes = {
|
|
20
|
-
resource:
|
|
21
|
-
type:
|
|
22
|
-
item:
|
|
23
|
-
id:
|
|
13
|
+
resource: PropTypes.string,
|
|
14
|
+
type: PropTypes.string,
|
|
15
|
+
item: PropTypes.shape({
|
|
16
|
+
id: PropTypes.string
|
|
24
17
|
}),
|
|
25
|
-
isCreate:
|
|
26
|
-
onSuccess:
|
|
27
|
-
onClose:
|
|
28
|
-
className:
|
|
18
|
+
isCreate: PropTypes.bool,
|
|
19
|
+
onSuccess: PropTypes.func,
|
|
20
|
+
onClose: PropTypes.func,
|
|
21
|
+
className: PropTypes.string
|
|
29
22
|
};
|
|
30
23
|
var defaultProps = {
|
|
31
24
|
resource: null,
|
|
@@ -45,8 +38,8 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
|
45
38
|
onClose = _ref.onClose,
|
|
46
39
|
className = _ref.className;
|
|
47
40
|
var resourceValues = intl.useResourceValues(resource);
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
title: !isCreate !== null ? /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
42
|
+
title: !isCreate !== null ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
50
43
|
values: resourceValues,
|
|
51
44
|
id: "mCfzkJ",
|
|
52
45
|
defaultMessage: [{
|
|
@@ -56,7 +49,7 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
|
56
49
|
"type": 1,
|
|
57
50
|
"value": "a_singular"
|
|
58
51
|
}]
|
|
59
|
-
}) : /*#__PURE__*/
|
|
52
|
+
}) : /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
60
53
|
values: resourceValues,
|
|
61
54
|
id: "6viUpq",
|
|
62
55
|
defaultMessage: [{
|
|
@@ -70,7 +63,7 @@ var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
|
70
63
|
size: "lg",
|
|
71
64
|
onClose: onClose,
|
|
72
65
|
className: className
|
|
73
|
-
}, /*#__PURE__*/
|
|
66
|
+
}, /*#__PURE__*/React.createElement(ResourceForm$1, {
|
|
74
67
|
resource: resource,
|
|
75
68
|
type: type,
|
|
76
69
|
item: item,
|
|
@@ -81,4 +74,4 @@ ModalResourceForm.propTypes = propTypes;
|
|
|
81
74
|
ModalResourceForm.defaultProps = defaultProps;
|
|
82
75
|
var ResourceForm = ModalResourceForm;
|
|
83
76
|
|
|
84
|
-
exports
|
|
77
|
+
exports.default = ResourceForm;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-resource-form",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.126",
|
|
4
4
|
"description": "Resource form modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"assets"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
|
-
"
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"build": "../../scripts/prepare-package.sh"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -45,11 +46,11 @@
|
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"@babel/runtime": "^7.12.5",
|
|
48
|
-
"@panneau/core": "^3.0.
|
|
49
|
-
"@panneau/form-resource": "^3.0.
|
|
50
|
-
"@panneau/intl": "^3.0.
|
|
51
|
-
"@panneau/modal-dialog": "^3.0.
|
|
52
|
-
"@panneau/themes": "^3.0.
|
|
49
|
+
"@panneau/core": "^3.0.126",
|
|
50
|
+
"@panneau/form-resource": "^3.0.126",
|
|
51
|
+
"@panneau/intl": "^3.0.126",
|
|
52
|
+
"@panneau/modal-dialog": "^3.0.126",
|
|
53
|
+
"@panneau/themes": "^3.0.126",
|
|
53
54
|
"classnames": "^2.2.6",
|
|
54
55
|
"lodash": "^4.17.21",
|
|
55
56
|
"prop-types": "^15.7.2",
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"publishConfig": {
|
|
59
60
|
"access": "public"
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "fa69ddff3f8cf22b00504093087608d5701e6f6a"
|
|
62
63
|
}
|