@panneau/modal-resource-form 3.0.223 → 3.0.225
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/package.json +11 -8
- package/lib/index.js +0 -80
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.225",
|
|
4
4
|
"description": "Resource form modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
}
|
|
26
26
|
],
|
|
27
27
|
"license": "ISC",
|
|
28
|
-
"
|
|
28
|
+
"type": "module",
|
|
29
29
|
"module": "es/index.js",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": "./es/index.js"
|
|
32
|
+
},
|
|
30
33
|
"files": [
|
|
31
34
|
"lib",
|
|
32
35
|
"es",
|
|
@@ -46,11 +49,11 @@
|
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
51
|
"@babel/runtime": "^7.12.5",
|
|
49
|
-
"@panneau/core": "^3.0.
|
|
50
|
-
"@panneau/form-resource": "^3.0.
|
|
51
|
-
"@panneau/intl": "^3.0.
|
|
52
|
-
"@panneau/modal-dialog": "^3.0.
|
|
53
|
-
"@panneau/themes": "^3.0.
|
|
52
|
+
"@panneau/core": "^3.0.224",
|
|
53
|
+
"@panneau/form-resource": "^3.0.225",
|
|
54
|
+
"@panneau/intl": "^3.0.225",
|
|
55
|
+
"@panneau/modal-dialog": "^3.0.224",
|
|
56
|
+
"@panneau/themes": "^3.0.224",
|
|
54
57
|
"classnames": "^2.5.1",
|
|
55
58
|
"lodash": "^4.17.21",
|
|
56
59
|
"prop-types": "^15.7.2",
|
|
@@ -59,5 +62,5 @@
|
|
|
59
62
|
"publishConfig": {
|
|
60
63
|
"access": "public"
|
|
61
64
|
},
|
|
62
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "5603d68b2a7c406ea856abccc332318814d53fc3"
|
|
63
66
|
}
|
package/lib/index.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var PropTypes = require('prop-types');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var reactIntl = require('react-intl');
|
|
8
|
-
var ResourceForm$1 = require('@panneau/form-resource');
|
|
9
|
-
var intl = require('@panneau/intl');
|
|
10
|
-
var Dialog = require('@panneau/modal-dialog');
|
|
11
|
-
|
|
12
|
-
var propTypes = {
|
|
13
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
14
|
-
resource: PropTypes.string,
|
|
15
|
-
type: PropTypes.string,
|
|
16
|
-
item: PropTypes.shape({
|
|
17
|
-
id: PropTypes.string
|
|
18
|
-
}),
|
|
19
|
-
isCreate: PropTypes.bool,
|
|
20
|
-
onSuccess: PropTypes.func,
|
|
21
|
-
onClose: PropTypes.func,
|
|
22
|
-
className: PropTypes.string
|
|
23
|
-
};
|
|
24
|
-
var defaultProps = {
|
|
25
|
-
resource: null,
|
|
26
|
-
type: null,
|
|
27
|
-
item: null,
|
|
28
|
-
isCreate: null,
|
|
29
|
-
onSuccess: null,
|
|
30
|
-
onClose: null,
|
|
31
|
-
className: null
|
|
32
|
-
};
|
|
33
|
-
var ModalResourceForm = function ModalResourceForm(_ref) {
|
|
34
|
-
var id = _ref.id,
|
|
35
|
-
resource = _ref.resource,
|
|
36
|
-
type = _ref.type,
|
|
37
|
-
item = _ref.item,
|
|
38
|
-
isCreate = _ref.isCreate,
|
|
39
|
-
onSuccess = _ref.onSuccess,
|
|
40
|
-
onClose = _ref.onClose,
|
|
41
|
-
className = _ref.className;
|
|
42
|
-
var resourceValues = intl.useResourceValues(resource);
|
|
43
|
-
return /*#__PURE__*/React.createElement(Dialog, {
|
|
44
|
-
id: id,
|
|
45
|
-
title: !isCreate !== null ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
46
|
-
values: resourceValues,
|
|
47
|
-
id: "mCfzkJ",
|
|
48
|
-
defaultMessage: [{
|
|
49
|
-
"type": 0,
|
|
50
|
-
"value": "Edit "
|
|
51
|
-
}, {
|
|
52
|
-
"type": 1,
|
|
53
|
-
"value": "a_singular"
|
|
54
|
-
}]
|
|
55
|
-
}) : /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
56
|
-
values: resourceValues,
|
|
57
|
-
id: "6viUpq",
|
|
58
|
-
defaultMessage: [{
|
|
59
|
-
"type": 0,
|
|
60
|
-
"value": "Create "
|
|
61
|
-
}, {
|
|
62
|
-
"type": 1,
|
|
63
|
-
"value": "a_singular"
|
|
64
|
-
}]
|
|
65
|
-
}),
|
|
66
|
-
size: "lg",
|
|
67
|
-
onClose: onClose,
|
|
68
|
-
className: className
|
|
69
|
-
}, /*#__PURE__*/React.createElement(ResourceForm$1, {
|
|
70
|
-
resource: resource,
|
|
71
|
-
type: type,
|
|
72
|
-
item: item,
|
|
73
|
-
onSuccess: onSuccess
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
76
|
-
ModalResourceForm.propTypes = propTypes;
|
|
77
|
-
ModalResourceForm.defaultProps = defaultProps;
|
|
78
|
-
var ResourceForm = ModalResourceForm;
|
|
79
|
-
|
|
80
|
-
exports.default = ResourceForm;
|