sag_components 1.0.456 → 1.0.458
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.
|
@@ -18,7 +18,8 @@ const Popup = props => {
|
|
|
18
18
|
height,
|
|
19
19
|
accordionItemBackgroundColor,
|
|
20
20
|
onSaveClick,
|
|
21
|
-
onCancelClick
|
|
21
|
+
onCancelClick,
|
|
22
|
+
onOverlayClick
|
|
22
23
|
} = props;
|
|
23
24
|
const [IsPopupOpen, setIsPopupOpen] = (0, _react.useState)(isPopupOpen);
|
|
24
25
|
(0, _react.useEffect)(() => {
|
|
@@ -27,8 +28,9 @@ const Popup = props => {
|
|
|
27
28
|
const openPopup = () => {
|
|
28
29
|
setIsPopupOpen(true);
|
|
29
30
|
};
|
|
30
|
-
const closePopup =
|
|
31
|
+
const closePopup = e => {
|
|
31
32
|
setIsPopupOpen(false);
|
|
33
|
+
onOverlayClick(e);
|
|
32
34
|
};
|
|
33
35
|
const AccordionItem = _ref => {
|
|
34
36
|
let {
|
|
@@ -44,7 +46,7 @@ const Popup = props => {
|
|
|
44
46
|
accordionItemBackgroundColor: accordionItemBackgroundColor,
|
|
45
47
|
onClick: handleToggle,
|
|
46
48
|
style: {
|
|
47
|
-
cursor:
|
|
49
|
+
cursor: 'pointer'
|
|
48
50
|
}
|
|
49
51
|
}, /*#__PURE__*/_react.default.createElement(_Popup.AccordionItemTitle, {
|
|
50
52
|
id: "AccordionItemTitle"
|
|
@@ -71,7 +73,7 @@ const Popup = props => {
|
|
|
71
73
|
}, IsPopupOpen && /*#__PURE__*/_react.default.createElement(_Popup.ModalOverlay, {
|
|
72
74
|
id: "ModalOverlay",
|
|
73
75
|
className: "modal-overlay",
|
|
74
|
-
onClick: closePopup
|
|
76
|
+
onClick: e => closePopup(e)
|
|
75
77
|
}, /*#__PURE__*/_react.default.createElement(_Popup.ModalContent, {
|
|
76
78
|
id: "ModalContent",
|
|
77
79
|
className: "modal-content",
|
|
@@ -81,7 +83,7 @@ const Popup = props => {
|
|
|
81
83
|
}, /*#__PURE__*/_react.default.createElement(_Popup.TitleContainer, null, /*#__PURE__*/_react.default.createElement(_Popup.Title, null, title), /*#__PURE__*/_react.default.createElement(_Popup.Close, {
|
|
82
84
|
id: "Close",
|
|
83
85
|
className: "close",
|
|
84
|
-
onClick: closePopup
|
|
86
|
+
onClick: e => closePopup(e)
|
|
85
87
|
}, "\xD7")), /*#__PURE__*/_react.default.createElement(Accordion, {
|
|
86
88
|
items: accordionItemsData
|
|
87
89
|
}))));
|
|
@@ -89,8 +91,9 @@ const Popup = props => {
|
|
|
89
91
|
var _default = exports.default = Popup;
|
|
90
92
|
Popup.defaultProps = {
|
|
91
93
|
isPopupOpen: true,
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
94
|
+
width: '800px',
|
|
95
|
+
height: '600px',
|
|
94
96
|
onSaveClick: () => {},
|
|
95
|
-
onCancelClick: () => {}
|
|
97
|
+
onCancelClick: () => {},
|
|
98
|
+
onOverlayClick: () => {}
|
|
96
99
|
};
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _Table = require("./Table.style");
|
|
10
10
|
const Table = props => {
|
|
11
11
|
const {
|
|
12
|
+
tableKey,
|
|
12
13
|
data,
|
|
13
14
|
width,
|
|
14
15
|
height,
|
|
@@ -122,7 +123,9 @@ const Table = props => {
|
|
|
122
123
|
const pages = Array.from({
|
|
123
124
|
length: rangePagination
|
|
124
125
|
}, (_, index) => index + 1);
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_Table.TableWrapper,
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement(_Table.TableWrapper, {
|
|
127
|
+
key: tableKey
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_Table.TableTag, {
|
|
126
129
|
width: width,
|
|
127
130
|
height: height
|
|
128
131
|
}, /*#__PURE__*/_react.default.createElement(_Table.Thead, null, /*#__PURE__*/_react.default.createElement("tr", null, actionsColumn && /*#__PURE__*/_react.default.createElement("th", {
|
|
@@ -172,6 +175,7 @@ const Table = props => {
|
|
|
172
175
|
exports.Table = Table;
|
|
173
176
|
var _default = exports.default = Table;
|
|
174
177
|
Table.defaultProps = {
|
|
178
|
+
tableKey: '1',
|
|
175
179
|
data: [{
|
|
176
180
|
key: '',
|
|
177
181
|
name: '',
|