@panneau/modal-confirm 3.0.307 → 4.0.0
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 +14 -33
- package/package.json +7 -7
package/es/index.js
CHANGED
|
@@ -1,41 +1,24 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { FormattedMessage } from 'react-intl';
|
|
5
4
|
import Dialog from '@panneau/modal-dialog';
|
|
6
5
|
|
|
7
|
-
var propTypes = {
|
|
8
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
9
|
-
title: PropTypes.node,
|
|
10
|
-
onConfirm: PropTypes.func,
|
|
11
|
-
onClose: PropTypes.func,
|
|
12
|
-
confirmButton: PropTypes.shape({
|
|
13
|
-
label: PropTypes.string
|
|
14
|
-
}),
|
|
15
|
-
cancelButton: PropTypes.shape({
|
|
16
|
-
label: PropTypes.string
|
|
17
|
-
}),
|
|
18
|
-
className: PropTypes.string,
|
|
19
|
-
children: PropTypes.node
|
|
20
|
-
};
|
|
21
|
-
var defaultProps = {
|
|
22
|
-
title: null,
|
|
23
|
-
onConfirm: null,
|
|
24
|
-
onClose: null,
|
|
25
|
-
confirmButton: null,
|
|
26
|
-
cancelButton: null,
|
|
27
|
-
className: null,
|
|
28
|
-
children: null
|
|
29
|
-
};
|
|
30
6
|
function ConfirmModal(_ref) {
|
|
31
7
|
var id = _ref.id,
|
|
32
|
-
title = _ref.title,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
8
|
+
_ref$title = _ref.title,
|
|
9
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
10
|
+
_ref$onConfirm = _ref.onConfirm,
|
|
11
|
+
onConfirm = _ref$onConfirm === void 0 ? null : _ref$onConfirm,
|
|
12
|
+
_ref$onClose = _ref.onClose,
|
|
13
|
+
onClose = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
14
|
+
_ref$confirmButton = _ref.confirmButton,
|
|
15
|
+
confirmButton = _ref$confirmButton === void 0 ? null : _ref$confirmButton,
|
|
16
|
+
_ref$cancelButton = _ref.cancelButton,
|
|
17
|
+
cancelButton = _ref$cancelButton === void 0 ? null : _ref$cancelButton,
|
|
18
|
+
_ref$className = _ref.className,
|
|
19
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
20
|
+
_ref$children = _ref.children,
|
|
21
|
+
children = _ref$children === void 0 ? null : _ref$children;
|
|
39
22
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
40
23
|
id: id,
|
|
41
24
|
title: title,
|
|
@@ -69,7 +52,5 @@ function ConfirmModal(_ref) {
|
|
|
69
52
|
}, confirmButton)]
|
|
70
53
|
}, children);
|
|
71
54
|
}
|
|
72
|
-
ConfirmModal.propTypes = propTypes;
|
|
73
|
-
ConfirmModal.defaultProps = defaultProps;
|
|
74
55
|
|
|
75
56
|
export { ConfirmModal as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-confirm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Confirm modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^
|
|
53
|
-
"@panneau/intl": "^
|
|
54
|
-
"@panneau/modal-dialog": "^
|
|
55
|
-
"@panneau/themes": "^
|
|
52
|
+
"@panneau/core": "^4.0.0",
|
|
53
|
+
"@panneau/intl": "^4.0.0",
|
|
54
|
+
"@panneau/modal-dialog": "^4.0.0",
|
|
55
|
+
"@panneau/themes": "^4.0.0",
|
|
56
56
|
"classnames": "^2.5.1",
|
|
57
57
|
"lodash-es": "^4.17.21",
|
|
58
58
|
"prop-types": "^15.7.2",
|
|
59
|
-
"react-intl": "^5.15.8
|
|
59
|
+
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
|
|
65
65
|
}
|