@panneau/modal-confirm 3.0.222 → 3.0.224
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 +10 -7
- package/lib/index.js +0 -79
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-confirm",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.224",
|
|
4
4
|
"description": "Confirm 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,10 +49,10 @@
|
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
51
|
"@babel/runtime": "^7.12.5",
|
|
49
|
-
"@panneau/core": "^3.0.
|
|
50
|
-
"@panneau/intl": "^3.0.
|
|
51
|
-
"@panneau/modal-dialog": "^3.0.
|
|
52
|
-
"@panneau/themes": "^3.0.
|
|
52
|
+
"@panneau/core": "^3.0.224",
|
|
53
|
+
"@panneau/intl": "^3.0.224",
|
|
54
|
+
"@panneau/modal-dialog": "^3.0.224",
|
|
55
|
+
"@panneau/themes": "^3.0.224",
|
|
53
56
|
"classnames": "^2.5.1",
|
|
54
57
|
"lodash": "^4.17.21",
|
|
55
58
|
"prop-types": "^15.7.2",
|
|
@@ -58,5 +61,5 @@
|
|
|
58
61
|
"publishConfig": {
|
|
59
62
|
"access": "public"
|
|
60
63
|
},
|
|
61
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "c95bd465867c4c7d112bf0ed66036574cc05c627"
|
|
62
65
|
}
|
package/lib/index.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
6
|
-
var PropTypes = require('prop-types');
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var reactIntl = require('react-intl');
|
|
9
|
-
var Dialog = require('@panneau/modal-dialog');
|
|
10
|
-
|
|
11
|
-
var propTypes = {
|
|
12
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
13
|
-
title: PropTypes.node,
|
|
14
|
-
onConfirm: PropTypes.func,
|
|
15
|
-
onClose: PropTypes.func,
|
|
16
|
-
confirmButton: PropTypes.shape({
|
|
17
|
-
label: PropTypes.string
|
|
18
|
-
}),
|
|
19
|
-
cancelButton: PropTypes.shape({
|
|
20
|
-
label: PropTypes.string
|
|
21
|
-
}),
|
|
22
|
-
className: PropTypes.string,
|
|
23
|
-
children: PropTypes.node
|
|
24
|
-
};
|
|
25
|
-
var defaultProps = {
|
|
26
|
-
title: null,
|
|
27
|
-
onConfirm: null,
|
|
28
|
-
onClose: null,
|
|
29
|
-
confirmButton: null,
|
|
30
|
-
cancelButton: null,
|
|
31
|
-
className: null,
|
|
32
|
-
children: null
|
|
33
|
-
};
|
|
34
|
-
function ConfirmModal(_ref) {
|
|
35
|
-
var id = _ref.id,
|
|
36
|
-
title = _ref.title,
|
|
37
|
-
onConfirm = _ref.onConfirm,
|
|
38
|
-
onClose = _ref.onClose,
|
|
39
|
-
confirmButton = _ref.confirmButton,
|
|
40
|
-
cancelButton = _ref.cancelButton,
|
|
41
|
-
className = _ref.className,
|
|
42
|
-
children = _ref.children;
|
|
43
|
-
return /*#__PURE__*/React.createElement(Dialog, {
|
|
44
|
-
id: id,
|
|
45
|
-
title: title,
|
|
46
|
-
size: "lg",
|
|
47
|
-
onClose: onClose,
|
|
48
|
-
className: className,
|
|
49
|
-
buttons: [_objectSpread({
|
|
50
|
-
id: 'no',
|
|
51
|
-
name: 'no',
|
|
52
|
-
label: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
53
|
-
id: "yhU8J6",
|
|
54
|
-
defaultMessage: [{
|
|
55
|
-
"type": 0,
|
|
56
|
-
"value": "No"
|
|
57
|
-
}]
|
|
58
|
-
}),
|
|
59
|
-
theme: 'secondary',
|
|
60
|
-
onClick: onClose
|
|
61
|
-
}, cancelButton), _objectSpread({
|
|
62
|
-
id: 'yes',
|
|
63
|
-
name: 'yes',
|
|
64
|
-
label: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
65
|
-
id: "3ebjtX",
|
|
66
|
-
defaultMessage: [{
|
|
67
|
-
"type": 0,
|
|
68
|
-
"value": "Yes"
|
|
69
|
-
}]
|
|
70
|
-
}),
|
|
71
|
-
theme: 'primary',
|
|
72
|
-
onClick: onConfirm
|
|
73
|
-
}, confirmButton)]
|
|
74
|
-
}, children);
|
|
75
|
-
}
|
|
76
|
-
ConfirmModal.propTypes = propTypes;
|
|
77
|
-
ConfirmModal.defaultProps = defaultProps;
|
|
78
|
-
|
|
79
|
-
exports.default = ConfirmModal;
|