intelicoreact 1.0.27 → 1.0.28
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.
|
@@ -45,9 +45,10 @@ var AccordionTable = function AccordionTable(_ref) {
|
|
|
45
45
|
accordions = _useState2[0],
|
|
46
46
|
setAccordions = _useState2[1];
|
|
47
47
|
|
|
48
|
-
console.log();
|
|
49
48
|
var handle = {
|
|
50
49
|
accordionChange: function accordionChange(key, e) {
|
|
50
|
+
var _e$target, _e$target$className, _e$target$className$i;
|
|
51
|
+
|
|
51
52
|
var newArr = accordions === null || accordions === void 0 ? void 0 : accordions.map(function (item) {
|
|
52
53
|
if (item.key === key) {
|
|
53
54
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -57,9 +58,10 @@ var AccordionTable = function AccordionTable(_ref) {
|
|
|
57
58
|
|
|
58
59
|
return item;
|
|
59
60
|
});
|
|
60
|
-
var
|
|
61
|
+
var isArrowSvg = (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName) === 'svg';
|
|
62
|
+
var isAccordionElement = (_e$target$className = e.target.className) === null || _e$target$className === void 0 ? void 0 : (_e$target$className$i = _e$target$className.includes) === null || _e$target$className$i === void 0 ? void 0 : _e$target$className$i.call(_e$target$className, 'accordion-table');
|
|
61
63
|
|
|
62
|
-
if (isAccordionElement) {
|
|
64
|
+
if (isAccordionElement || isArrowSvg) {
|
|
63
65
|
onChange(newArr);
|
|
64
66
|
setAccordions(newArr);
|
|
65
67
|
}
|
|
@@ -82,7 +84,6 @@ var AccordionTable = function AccordionTable(_ref) {
|
|
|
82
84
|
key = _ref3[0],
|
|
83
85
|
value = _ref3[1];
|
|
84
86
|
|
|
85
|
-
var currentValue = (0, _typeof2.default)(value) !== 'object' ? value : value.value;
|
|
86
87
|
return key !== 'promoDetails' && /*#__PURE__*/_react.default.createElement("div", {
|
|
87
88
|
key: key,
|
|
88
89
|
style: {
|
|
@@ -91,8 +92,8 @@ var AccordionTable = function AccordionTable(_ref) {
|
|
|
91
92
|
className: (0, _classnames.default)('accordion-table__td', "accordion-table__td--".concat(key), (_getHeaderItem2 = getHeaderItem(key)) === null || _getHeaderItem2 === void 0 ? void 0 : _getHeaderItem2.className)
|
|
92
93
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
93
94
|
className: "accordion-table__statistics-td-value",
|
|
94
|
-
title:
|
|
95
|
-
},
|
|
95
|
+
title: (0, _typeof2.default)(value) !== 'object' ? value : value.value
|
|
96
|
+
}, (0, _typeof2.default)(value) !== 'object' ? value : value.value));
|
|
96
97
|
});
|
|
97
98
|
};
|
|
98
99
|
|