sag_components 2.0.0-beta28 → 2.0.0-beta29
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/dist/index.esm.js +4100 -4100
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +163 -163
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var React
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var recharts = require('recharts');
|
|
7
7
|
var Skeleton = require('react-loading-skeleton');
|
|
8
8
|
var framerMotion = require('framer-motion');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
|
|
14
14
|
|
|
15
15
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -2157,7 +2157,7 @@ var f = "undefined" != typeof process && void 0 !== process.env && (process.env.
|
|
|
2157
2157
|
console.error = function (t) {
|
|
2158
2158
|
for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r];
|
|
2159
2159
|
E.test(t) ? (a = !1, N.delete(s)) : i.apply(void 0, __spreadArray([t], n, !1));
|
|
2160
|
-
}, React
|
|
2160
|
+
}, React.useRef(), a && !N.has(s) && (console.warn(s), N.add(s));
|
|
2161
2161
|
} catch (e) {
|
|
2162
2162
|
E.test(e.message) && N.delete(s);
|
|
2163
2163
|
} finally {
|
|
@@ -2577,7 +2577,7 @@ var Me = new ke(),
|
|
|
2577
2577
|
});
|
|
2578
2578
|
$e.Consumer;
|
|
2579
2579
|
function Ge() {
|
|
2580
|
-
return React
|
|
2580
|
+
return React.useContext($e);
|
|
2581
2581
|
}
|
|
2582
2582
|
var qe = function () {
|
|
2583
2583
|
function e(e, t) {
|
|
@@ -2716,7 +2716,7 @@ function it(e, o, s) {
|
|
|
2716
2716
|
f = React__default["default"].useContext(et),
|
|
2717
2717
|
m = Ge(),
|
|
2718
2718
|
y = e.shouldForwardProp || m.shouldForwardProp;
|
|
2719
|
-
"production" !== process.env.NODE_ENV && React
|
|
2719
|
+
"production" !== process.env.NODE_ENV && React.useDebugValue(d);
|
|
2720
2720
|
var v = I(o, f, c) || C,
|
|
2721
2721
|
g = function (e, n, r) {
|
|
2722
2722
|
for (var o, s = __assign(__assign({}, n), {
|
|
@@ -2734,11 +2734,11 @@ function it(e, o, s) {
|
|
|
2734
2734
|
var E = function (e, t) {
|
|
2735
2735
|
var n = Ge(),
|
|
2736
2736
|
r = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
2737
|
-
return "production" !== process.env.NODE_ENV && React
|
|
2737
|
+
return "production" !== process.env.NODE_ENV && React.useDebugValue(r), r;
|
|
2738
2738
|
}(a, g);
|
|
2739
2739
|
"production" !== process.env.NODE_ENV && e.warnTooManyClasses && e.warnTooManyClasses(E);
|
|
2740
2740
|
var N = ie(p, d);
|
|
2741
|
-
return E && (N += " " + E), g.className && (N += " " + g.className), w[L(S) && !A.has(S) ? "class" : "className"] = N, s && (w.ref = s), /*#__PURE__*/React
|
|
2741
|
+
return E && (N += " " + E), g.className && (N += " " + g.className), w[L(S) && !A.has(S) ? "class" : "className"] = N, s && (w.ref = s), /*#__PURE__*/React.createElement(S, w);
|
|
2742
2742
|
}(D, e, o);
|
|
2743
2743
|
}
|
|
2744
2744
|
O.displayName = y;
|
|
@@ -3159,8 +3159,8 @@ const Button = _ref => {
|
|
|
3159
3159
|
rightIcon = 'none',
|
|
3160
3160
|
isSubmitButton = false
|
|
3161
3161
|
} = _ref;
|
|
3162
|
-
const [clicked, setClicked] = React
|
|
3163
|
-
const [hover, setHover] = React
|
|
3162
|
+
const [clicked, setClicked] = React.useState(false);
|
|
3163
|
+
const [hover, setHover] = React.useState(false);
|
|
3164
3164
|
const handleSubmitButtonOnClick = () => {
|
|
3165
3165
|
setClicked(true);
|
|
3166
3166
|
onClick(`SubmitButtonOnClick: ${text}`);
|
|
@@ -3887,7 +3887,7 @@ const Tooltip$1 = props => {
|
|
|
3887
3887
|
topFactor
|
|
3888
3888
|
} = props;
|
|
3889
3889
|
let timeout;
|
|
3890
|
-
const [active, setActive] = React
|
|
3890
|
+
const [active, setActive] = React.useState(false);
|
|
3891
3891
|
const showTip = () => {
|
|
3892
3892
|
timeout = setTimeout(() => {
|
|
3893
3893
|
setActive(true);
|
|
@@ -4071,7 +4071,7 @@ const PieChart = props => {
|
|
|
4071
4071
|
textAfterValue,
|
|
4072
4072
|
noDataText
|
|
4073
4073
|
} = props;
|
|
4074
|
-
const DoughnutChartContainerRef = React
|
|
4074
|
+
const DoughnutChartContainerRef = React.useRef();
|
|
4075
4075
|
const dotCutTrenty = row => {
|
|
4076
4076
|
if (!row || !row.value) return null;
|
|
4077
4077
|
let valueNew = 0;
|
|
@@ -4527,8 +4527,8 @@ const BannersDropdown = props => {
|
|
|
4527
4527
|
banners,
|
|
4528
4528
|
onClick
|
|
4529
4529
|
} = props;
|
|
4530
|
-
const [processedBanners, setProcessedBanners] = React
|
|
4531
|
-
React
|
|
4530
|
+
const [processedBanners, setProcessedBanners] = React.useState([]);
|
|
4531
|
+
React.useEffect(() => {
|
|
4532
4532
|
const formatedBanners = banners?.map(banner => {
|
|
4533
4533
|
if (banner.name === 'StopAndShop') {
|
|
4534
4534
|
return {
|
|
@@ -4569,16 +4569,16 @@ const BannersDropdown = props => {
|
|
|
4569
4569
|
});
|
|
4570
4570
|
setProcessedBanners(formatedBanners);
|
|
4571
4571
|
}, []);
|
|
4572
|
-
const [toggled, setToggled] = React
|
|
4573
|
-
const [bannerButtonText, setBannerButtonText] = React
|
|
4574
|
-
const [bannerButtonArrow, setBannerButtonArrow] = React
|
|
4572
|
+
const [toggled, setToggled] = React.useState(false);
|
|
4573
|
+
const [bannerButtonText, setBannerButtonText] = React.useState('All Banners');
|
|
4574
|
+
const [bannerButtonArrow, setBannerButtonArrow] = React.useState('#2D8DE7');
|
|
4575
4575
|
const choosenBanners = index => {
|
|
4576
4576
|
const updatedBanners = [...processedBanners];
|
|
4577
4577
|
updatedBanners[index].checked = !updatedBanners[index].checked;
|
|
4578
4578
|
setProcessedBanners(updatedBanners);
|
|
4579
4579
|
onClick(updatedBanners);
|
|
4580
4580
|
};
|
|
4581
|
-
React
|
|
4581
|
+
React.useEffect(() => {
|
|
4582
4582
|
const selectedBanners = processedBanners.filter(banner => !banner.checked);
|
|
4583
4583
|
if (selectedBanners.length < 1) {
|
|
4584
4584
|
setBannerButtonText('All Banners');
|
|
@@ -4769,7 +4769,7 @@ const LinkButton = _ref => {
|
|
|
4769
4769
|
// className,
|
|
4770
4770
|
// } = props;
|
|
4771
4771
|
|
|
4772
|
-
const [clicked, setClicked] = React
|
|
4772
|
+
const [clicked, setClicked] = React.useState(false);
|
|
4773
4773
|
const handleLinkButtonClick = () => {
|
|
4774
4774
|
setClicked(true);
|
|
4775
4775
|
onClick(text);
|
|
@@ -4961,8 +4961,8 @@ const EventDetailsCard = props => {
|
|
|
4961
4961
|
onBannersDropdownClick,
|
|
4962
4962
|
disableViewDetailsButton
|
|
4963
4963
|
} = props;
|
|
4964
|
-
const [processedBanners, setProcessedBanners] = React
|
|
4965
|
-
React
|
|
4964
|
+
const [processedBanners, setProcessedBanners] = React.useState([]);
|
|
4965
|
+
React.useEffect(() => {
|
|
4966
4966
|
const formatedBanners = banners.map(banner => {
|
|
4967
4967
|
if (banner === 'StopAndShop') {
|
|
4968
4968
|
return {
|
|
@@ -5155,20 +5155,20 @@ const LinnerDataBox = props => {
|
|
|
5155
5155
|
className,
|
|
5156
5156
|
customDataFormat
|
|
5157
5157
|
} = props;
|
|
5158
|
-
return /*#__PURE__*/
|
|
5158
|
+
return /*#__PURE__*/React__default["default"].createElement(LinnerContainer$1, {
|
|
5159
5159
|
className: className,
|
|
5160
5160
|
backgroundColor: backgroundColor,
|
|
5161
5161
|
width: width || "100%",
|
|
5162
5162
|
height: height || "200px",
|
|
5163
5163
|
customDataFormat: customDataFormat
|
|
5164
|
-
}, data.map((item, index) => /*#__PURE__*/
|
|
5164
|
+
}, data.map((item, index) => /*#__PURE__*/React__default["default"].createElement(DataBoxWrap, {
|
|
5165
5165
|
key: `${item.title}`,
|
|
5166
5166
|
width: `${100 / data.length}%`
|
|
5167
|
-
}, /*#__PURE__*/
|
|
5167
|
+
}, /*#__PURE__*/React__default["default"].createElement(DataBox$1, null, item.title && /*#__PURE__*/React__default["default"].createElement(DataBoxTitle$1, {
|
|
5168
5168
|
className: "DataBoxTitle"
|
|
5169
|
-
}, item.title), /*#__PURE__*/
|
|
5169
|
+
}, item.title), /*#__PURE__*/React__default["default"].createElement(DataBoxContent, null, item.value !== null && item.value !== undefined && !isNaN(item.value) && item.value !== "null" && item.value !== "undefined" ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, item.sign && /*#__PURE__*/React__default["default"].createElement(DataBoxContentSign, null, item.sign), customDataFormat ? /*#__PURE__*/React__default["default"].createElement(DataBoxContentValue, {
|
|
5170
5170
|
className: "DataBoxValue"
|
|
5171
|
-
}, "".concat(formattedValue(item.value), getFormattedUnits(item.value))) : /*#__PURE__*/
|
|
5171
|
+
}, "".concat(formattedValue(item.value), getFormattedUnits(item.value))) : /*#__PURE__*/React__default["default"].createElement(DataBoxContentValue, null, "".concat(getFormattedValue(item.value), getFormattedUnits(item.value)))) : /*#__PURE__*/React__default["default"].createElement(DataBoxContentNoValue, null, "No Data")), item.extraInfo.map(extraInfoItem => /*#__PURE__*/React__default["default"].createElement(DataBoxExtraInfoCell, null, extraInfoItem.value !== null && extraInfoItem.value !== undefined && /*#__PURE__*/React__default["default"].createElement(DataBoxExtraInfoCellValue, null, "".concat("$", getFormattedValue(extraInfoItem.value), getFormattedUnits(extraInfoItem.value))), extraInfoItem.value !== null && extraInfoItem.value !== undefined && /*#__PURE__*/React__default["default"].createElement(DataBoxExtraInfoCellTitle, null, extraInfoItem.title)))), index < data.length - 1 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5172
5172
|
className: "vertival-line",
|
|
5173
5173
|
style: {
|
|
5174
5174
|
width: "1px",
|
|
@@ -5593,7 +5593,7 @@ const SagIconButton = props => {
|
|
|
5593
5593
|
onButtonClick,
|
|
5594
5594
|
className
|
|
5595
5595
|
} = props;
|
|
5596
|
-
const [activeState, setActiveState] = React
|
|
5596
|
+
const [activeState, setActiveState] = React.useState(openState);
|
|
5597
5597
|
const onClickHandler = event => {
|
|
5598
5598
|
onButtonClick(event);
|
|
5599
5599
|
setActiveState(prevState => !prevState);
|
|
@@ -5923,12 +5923,12 @@ const TabMenu = props => {
|
|
|
5923
5923
|
onTopButtonClick,
|
|
5924
5924
|
tabs
|
|
5925
5925
|
} = props;
|
|
5926
|
-
const [activeTab, setActiveTab] = React
|
|
5926
|
+
const [activeTab, setActiveTab] = React.useState(currentTab);
|
|
5927
5927
|
const handleTabChange = index => {
|
|
5928
5928
|
onTabChange(index);
|
|
5929
5929
|
setActiveTab(index);
|
|
5930
5930
|
};
|
|
5931
|
-
React
|
|
5931
|
+
React.useEffect(() => {
|
|
5932
5932
|
setActiveTab(currentTab);
|
|
5933
5933
|
}, [currentTab]);
|
|
5934
5934
|
return /*#__PURE__*/React__default["default"].createElement(TabMenuContainer, {
|
|
@@ -10915,14 +10915,14 @@ const DropdownSingleNew = ({
|
|
|
10915
10915
|
orderBy,
|
|
10916
10916
|
elementType
|
|
10917
10917
|
}) => {
|
|
10918
|
-
const [isFocused, setIsFocused] = React
|
|
10919
|
-
const [showOptions, setShowOptions] = React
|
|
10920
|
-
const [inputValue, setInputValue] = React
|
|
10921
|
-
const [selectedOptions, setSelectedOptions] = React
|
|
10922
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
10923
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
10924
|
-
const inputRef = React
|
|
10925
|
-
const containerRef = React
|
|
10918
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
10919
|
+
const [showOptions, setShowOptions] = React.useState(false);
|
|
10920
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
10921
|
+
const [selectedOptions, setSelectedOptions] = React.useState([]);
|
|
10922
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
10923
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
10924
|
+
const inputRef = React.useRef(null);
|
|
10925
|
+
const containerRef = React.useRef(null);
|
|
10926
10926
|
let filteredOptions = options?.filter(option => option.label.toLowerCase().includes(inputValue.toLowerCase()));
|
|
10927
10927
|
switch (orderBy) {
|
|
10928
10928
|
case "asc":
|
|
@@ -10940,17 +10940,17 @@ const DropdownSingleNew = ({
|
|
|
10940
10940
|
}
|
|
10941
10941
|
break;
|
|
10942
10942
|
}
|
|
10943
|
-
React
|
|
10943
|
+
React.useEffect(() => {
|
|
10944
10944
|
if (selectedValue) {
|
|
10945
10945
|
setSelectedOptions(selectedValue);
|
|
10946
10946
|
}
|
|
10947
10947
|
}, [selectedValue]);
|
|
10948
|
-
React
|
|
10948
|
+
React.useEffect(() => {
|
|
10949
10949
|
if (isFocused && inputRef?.current) {
|
|
10950
10950
|
inputRef?.current?.focus();
|
|
10951
10951
|
}
|
|
10952
10952
|
}, [isFocused]);
|
|
10953
|
-
React
|
|
10953
|
+
React.useEffect(() => {
|
|
10954
10954
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
10955
10955
|
setIsFocused(false);
|
|
10956
10956
|
setShowOptions(false);
|
|
@@ -11413,14 +11413,14 @@ const DropdownMultiNew = ({
|
|
|
11413
11413
|
orderBy,
|
|
11414
11414
|
elementType
|
|
11415
11415
|
}) => {
|
|
11416
|
-
const [isFocused, setIsFocused] = React
|
|
11417
|
-
const [showOptions, setShowOptions] = React
|
|
11418
|
-
const [inputValue, setInputValue] = React
|
|
11419
|
-
const [selectedOptions, setSelectedOptions] = React
|
|
11420
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
11421
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
11422
|
-
const inputRef = React
|
|
11423
|
-
const containerRef = React
|
|
11416
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
11417
|
+
const [showOptions, setShowOptions] = React.useState(false);
|
|
11418
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
11419
|
+
const [selectedOptions, setSelectedOptions] = React.useState([]);
|
|
11420
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
11421
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
11422
|
+
const inputRef = React.useRef(null);
|
|
11423
|
+
const containerRef = React.useRef(null);
|
|
11424
11424
|
let filteredOptions = options?.filter(option => option.label.toLowerCase().includes(inputValue.toLowerCase()));
|
|
11425
11425
|
switch (orderBy) {
|
|
11426
11426
|
case "asc":
|
|
@@ -11438,17 +11438,17 @@ const DropdownMultiNew = ({
|
|
|
11438
11438
|
}
|
|
11439
11439
|
break;
|
|
11440
11440
|
}
|
|
11441
|
-
React
|
|
11441
|
+
React.useEffect(() => {
|
|
11442
11442
|
if (selectedValue) {
|
|
11443
11443
|
setSelectedOptions(selectedValue);
|
|
11444
11444
|
}
|
|
11445
11445
|
}, [selectedValue]);
|
|
11446
|
-
React
|
|
11446
|
+
React.useEffect(() => {
|
|
11447
11447
|
if (isFocused && inputRef?.current) {
|
|
11448
11448
|
inputRef?.current?.focus();
|
|
11449
11449
|
}
|
|
11450
11450
|
}, [isFocused]);
|
|
11451
|
-
React
|
|
11451
|
+
React.useEffect(() => {
|
|
11452
11452
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
11453
11453
|
setIsFocused(false);
|
|
11454
11454
|
setShowOptions(false);
|
|
@@ -12066,10 +12066,10 @@ const DatePicker = ({
|
|
|
12066
12066
|
startDateValue,
|
|
12067
12067
|
endDateValue
|
|
12068
12068
|
}) => {
|
|
12069
|
-
const [startDate, setStartDate] = React
|
|
12070
|
-
const [endDate, setEndDate] = React
|
|
12071
|
-
const [currentStartDate, setCurrentStartDate] = React
|
|
12072
|
-
const [currentEndDate, setCurrentEndDate] = React
|
|
12069
|
+
const [startDate, setStartDate] = React.useState(null);
|
|
12070
|
+
const [endDate, setEndDate] = React.useState(null);
|
|
12071
|
+
const [currentStartDate, setCurrentStartDate] = React.useState(new Date());
|
|
12072
|
+
const [currentEndDate, setCurrentEndDate] = React.useState(null);
|
|
12073
12073
|
const handleDateSelect = date => {
|
|
12074
12074
|
if (!startDate) {
|
|
12075
12075
|
setStartDate(date);
|
|
@@ -12094,7 +12094,7 @@ const DatePicker = ({
|
|
|
12094
12094
|
setCurrentStartDate(nextDate);
|
|
12095
12095
|
setCurrentEndDate(null);
|
|
12096
12096
|
};
|
|
12097
|
-
React
|
|
12097
|
+
React.useEffect(() => {
|
|
12098
12098
|
if (value === '' || value === undefined) {
|
|
12099
12099
|
setStartDate(null);
|
|
12100
12100
|
setEndDate(null);
|
|
@@ -12193,16 +12193,16 @@ const RangePicker = _ref => {
|
|
|
12193
12193
|
textColor,
|
|
12194
12194
|
selectedValue
|
|
12195
12195
|
} = _ref;
|
|
12196
|
-
const [isFocused, setIsFocused] = React
|
|
12197
|
-
const [isOpen, setIsOpen] = React
|
|
12198
|
-
const [value, setValue] = React
|
|
12199
|
-
const [startDateValue, setStartDateValue] = React
|
|
12200
|
-
const [endDateValue, setEndDateValue] = React
|
|
12201
|
-
|
|
12202
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
12203
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
12204
|
-
const inputRef = React
|
|
12205
|
-
React
|
|
12196
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
12197
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
12198
|
+
const [value, setValue] = React.useState(''); // Added value state
|
|
12199
|
+
const [startDateValue, setStartDateValue] = React.useState(null); // Added value state
|
|
12200
|
+
const [endDateValue, setEndDateValue] = React.useState(null); // Added value state
|
|
12201
|
+
|
|
12202
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
12203
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
12204
|
+
const inputRef = React.useRef(null);
|
|
12205
|
+
React.useEffect(() => {
|
|
12206
12206
|
const handleClickOutside = event => {
|
|
12207
12207
|
if (inputRef.current && !inputRef.current.contains(event.target)) {
|
|
12208
12208
|
setIsFocused(false);
|
|
@@ -12217,7 +12217,7 @@ const RangePicker = _ref => {
|
|
|
12217
12217
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
12218
12218
|
};
|
|
12219
12219
|
}, []);
|
|
12220
|
-
React
|
|
12220
|
+
React.useEffect(() => {
|
|
12221
12221
|
if (selectedValue && selectedValue.includes('-')) {
|
|
12222
12222
|
const dateArray = selectedValue.split('-');
|
|
12223
12223
|
const startDate = new Date(dateArray[0]);
|
|
@@ -12227,7 +12227,7 @@ const RangePicker = _ref => {
|
|
|
12227
12227
|
setValue(selectedValue);
|
|
12228
12228
|
}
|
|
12229
12229
|
}, [selectedValue]);
|
|
12230
|
-
React
|
|
12230
|
+
React.useEffect(() => {
|
|
12231
12231
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
12232
12232
|
setIsFocused(false);
|
|
12233
12233
|
setIsOpen(false);
|
|
@@ -12555,8 +12555,8 @@ const QuarterPopupPicker = ({
|
|
|
12555
12555
|
startDateValue,
|
|
12556
12556
|
availableQuarters
|
|
12557
12557
|
}) => {
|
|
12558
|
-
const [selectedQuarter, setSelectedQuarter] = React
|
|
12559
|
-
const [currentStartDate, setCurrentStartDate] = React
|
|
12558
|
+
const [selectedQuarter, setSelectedQuarter] = React.useState(null);
|
|
12559
|
+
const [currentStartDate, setCurrentStartDate] = React.useState(new Date(new Date().getFullYear(), 0, 1));
|
|
12560
12560
|
const handleDateSelect = date => {
|
|
12561
12561
|
setSelectedQuarter(date);
|
|
12562
12562
|
onChangeDate(`${date}-${currentStartDate.getFullYear()}`);
|
|
@@ -12574,7 +12574,7 @@ const QuarterPopupPicker = ({
|
|
|
12574
12574
|
// setCurrentStartDate(nextDate);
|
|
12575
12575
|
// };
|
|
12576
12576
|
|
|
12577
|
-
React
|
|
12577
|
+
React.useEffect(() => {
|
|
12578
12578
|
if (value === '' || value === undefined) {
|
|
12579
12579
|
setSelectedQuarter(null);
|
|
12580
12580
|
} else {
|
|
@@ -12641,14 +12641,14 @@ const QuarterPicker = _ref => {
|
|
|
12641
12641
|
textColor,
|
|
12642
12642
|
selectedValue
|
|
12643
12643
|
} = _ref;
|
|
12644
|
-
const [isFocused, setIsFocused] = React
|
|
12645
|
-
const [isOpen, setIsOpen] = React
|
|
12646
|
-
const [value, setValue] = React
|
|
12647
|
-
const [startDateValue, setStartDateValue] = React
|
|
12648
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
12649
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
12650
|
-
const inputRef = React
|
|
12651
|
-
React
|
|
12644
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
12645
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
12646
|
+
const [value, setValue] = React.useState('');
|
|
12647
|
+
const [startDateValue, setStartDateValue] = React.useState(null);
|
|
12648
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
12649
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
12650
|
+
const inputRef = React.useRef(null);
|
|
12651
|
+
React.useEffect(() => {
|
|
12652
12652
|
const handleClickOutside = event => {
|
|
12653
12653
|
if (inputRef.current && !inputRef.current.contains(event.target)) {
|
|
12654
12654
|
setIsFocused(false);
|
|
@@ -12663,7 +12663,7 @@ const QuarterPicker = _ref => {
|
|
|
12663
12663
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
12664
12664
|
};
|
|
12665
12665
|
}, []);
|
|
12666
|
-
React
|
|
12666
|
+
React.useEffect(() => {
|
|
12667
12667
|
if (selectedValue && selectedValue.includes('-')) {
|
|
12668
12668
|
const dateArray = selectedValue.split('-');
|
|
12669
12669
|
const startDate = new Date(dateArray[0]);
|
|
@@ -12671,7 +12671,7 @@ const QuarterPicker = _ref => {
|
|
|
12671
12671
|
setValue(selectedValue);
|
|
12672
12672
|
}
|
|
12673
12673
|
}, [selectedValue]);
|
|
12674
|
-
React
|
|
12674
|
+
React.useEffect(() => {
|
|
12675
12675
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
12676
12676
|
setIsFocused(false);
|
|
12677
12677
|
setIsOpen(false);
|
|
@@ -12984,13 +12984,13 @@ const MonthPopupPicker = ({
|
|
|
12984
12984
|
startDateValue,
|
|
12985
12985
|
availableMonths
|
|
12986
12986
|
}) => {
|
|
12987
|
-
const [selectedMonth, setSelectedMonth] = React
|
|
12988
|
-
const [currentStartDate, setCurrentStartDate] = React
|
|
12987
|
+
const [selectedMonth, setSelectedMonth] = React.useState(null);
|
|
12988
|
+
const [currentStartDate, setCurrentStartDate] = React.useState(new Date(new Date().getFullYear(), 0, 1));
|
|
12989
12989
|
const handleDateSelect = date => {
|
|
12990
12990
|
setSelectedMonth(date);
|
|
12991
12991
|
onChangeDate(date);
|
|
12992
12992
|
};
|
|
12993
|
-
React
|
|
12993
|
+
React.useEffect(() => {
|
|
12994
12994
|
if (value === '' || value === undefined) {
|
|
12995
12995
|
setSelectedMonth(null);
|
|
12996
12996
|
} else {
|
|
@@ -13095,14 +13095,14 @@ const MonthPicker = _ref => {
|
|
|
13095
13095
|
textColor,
|
|
13096
13096
|
selectedValue
|
|
13097
13097
|
} = _ref;
|
|
13098
|
-
const [isFocused, setIsFocused] = React
|
|
13099
|
-
const [isOpen, setIsOpen] = React
|
|
13100
|
-
const [value, setValue] = React
|
|
13101
|
-
const [startDateValue, setStartDateValue] = React
|
|
13102
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
13103
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
13104
|
-
const inputRef = React
|
|
13105
|
-
React
|
|
13098
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
13099
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
13100
|
+
const [value, setValue] = React.useState('');
|
|
13101
|
+
const [startDateValue, setStartDateValue] = React.useState(null);
|
|
13102
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
13103
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
13104
|
+
const inputRef = React.useRef(null);
|
|
13105
|
+
React.useEffect(() => {
|
|
13106
13106
|
const handleClickOutside = event => {
|
|
13107
13107
|
if (inputRef.current && !inputRef.current.contains(event.target)) {
|
|
13108
13108
|
setIsFocused(false);
|
|
@@ -13117,14 +13117,14 @@ const MonthPicker = _ref => {
|
|
|
13117
13117
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
13118
13118
|
};
|
|
13119
13119
|
}, []);
|
|
13120
|
-
React
|
|
13120
|
+
React.useEffect(() => {
|
|
13121
13121
|
if (selectedValue && selectedValue.includes(' | ')) {
|
|
13122
13122
|
setStartDateValue(selectedValue);
|
|
13123
13123
|
// setValue(`${moment(selectedValue).format('MMMM | YYYY')}`);
|
|
13124
13124
|
setValue(selectedValue);
|
|
13125
13125
|
}
|
|
13126
13126
|
}, [selectedValue]);
|
|
13127
|
-
React
|
|
13127
|
+
React.useEffect(() => {
|
|
13128
13128
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
13129
13129
|
setIsFocused(false);
|
|
13130
13130
|
setIsOpen(false);
|
|
@@ -13350,17 +13350,17 @@ const FilterPanel = props => {
|
|
|
13350
13350
|
showShadow,
|
|
13351
13351
|
tooltipTextGoButton
|
|
13352
13352
|
} = props;
|
|
13353
|
-
const [FieldsDataState, setFieldsDataState] = React
|
|
13354
|
-
const [Reset, setReset] = React
|
|
13355
|
-
const [FieldsContainerWidth, setFieldsContainerWidth] = React
|
|
13356
|
-
const AllFieldsContainerRef = React
|
|
13357
|
-
React
|
|
13353
|
+
const [FieldsDataState, setFieldsDataState] = React.useState(fieldsData);
|
|
13354
|
+
const [Reset, setReset] = React.useState(false);
|
|
13355
|
+
const [FieldsContainerWidth, setFieldsContainerWidth] = React.useState(0);
|
|
13356
|
+
const AllFieldsContainerRef = React.useRef();
|
|
13357
|
+
React.useEffect(() => {
|
|
13358
13358
|
const {
|
|
13359
13359
|
offsetWidth
|
|
13360
13360
|
} = AllFieldsContainerRef.current;
|
|
13361
13361
|
setFieldsContainerWidth(offsetWidth - 2);
|
|
13362
13362
|
}, [width]);
|
|
13363
|
-
React
|
|
13363
|
+
React.useEffect(() => {
|
|
13364
13364
|
if (useExternalFilterState) {
|
|
13365
13365
|
setFieldsDataState(fieldsData);
|
|
13366
13366
|
} else {
|
|
@@ -14357,8 +14357,8 @@ const ReportTable = props => {
|
|
|
14357
14357
|
onSortChangeCallback,
|
|
14358
14358
|
onSortReset
|
|
14359
14359
|
} = props;
|
|
14360
|
-
const [FormattedTableData, setFormattedTableData] = React
|
|
14361
|
-
React
|
|
14360
|
+
const [FormattedTableData, setFormattedTableData] = React.useState(tableData);
|
|
14361
|
+
React.useState(false);
|
|
14362
14362
|
const getPaginatedRows = () => {
|
|
14363
14363
|
return FormattedTableData.rowsValues;
|
|
14364
14364
|
};
|
|
@@ -14371,7 +14371,7 @@ const ReportTable = props => {
|
|
|
14371
14371
|
const totalRecords = totalTableResults;
|
|
14372
14372
|
return `Showing ${startRecord}-${endRecord} of ${totalRecords}`;
|
|
14373
14373
|
};
|
|
14374
|
-
React
|
|
14374
|
+
React.useEffect(() => {
|
|
14375
14375
|
if (!tableData || !tableData.columnsHeadings || !tableData.rowsValues) {
|
|
14376
14376
|
return;
|
|
14377
14377
|
}
|
|
@@ -14507,8 +14507,8 @@ const ReportTable = props => {
|
|
|
14507
14507
|
}
|
|
14508
14508
|
return topFactor;
|
|
14509
14509
|
};
|
|
14510
|
-
const [activeSortState, setActiveSortState] = React
|
|
14511
|
-
React
|
|
14510
|
+
const [activeSortState, setActiveSortState] = React.useState({});
|
|
14511
|
+
React.useEffect(() => {
|
|
14512
14512
|
if (activeSortState) {
|
|
14513
14513
|
Object.entries(activeSortState).forEach(_ref => {
|
|
14514
14514
|
let [key, value] = _ref;
|
|
@@ -15272,7 +15272,7 @@ const BannerEventBoxList = props => {
|
|
|
15272
15272
|
bannerWidth,
|
|
15273
15273
|
showDraft
|
|
15274
15274
|
} = props;
|
|
15275
|
-
const [IsItemOpen, setIsItemOpen] = React
|
|
15275
|
+
const [IsItemOpen, setIsItemOpen] = React.useState(false);
|
|
15276
15276
|
const handleToggle = () => {
|
|
15277
15277
|
if (disableToggle) return;
|
|
15278
15278
|
setIsItemOpen(!IsItemOpen);
|
|
@@ -15473,7 +15473,7 @@ const DialogOverlay = props => {
|
|
|
15473
15473
|
onDialogClose,
|
|
15474
15474
|
className
|
|
15475
15475
|
} = props;
|
|
15476
|
-
React
|
|
15476
|
+
React.useEffect(() => {
|
|
15477
15477
|
const modal = document.querySelector('dialog');
|
|
15478
15478
|
modal.showModal();
|
|
15479
15479
|
}, []);
|
|
@@ -25915,10 +25915,10 @@ const CollapseHeader = props => {
|
|
|
25915
25915
|
buttonText,
|
|
25916
25916
|
disabled
|
|
25917
25917
|
} = props;
|
|
25918
|
-
const [retailersDataState, setRetailersDataState] = React
|
|
25919
|
-
const [viewCreativeListBoxOpenedState, setViewCreativeListBoxOpenedState] = React
|
|
25920
|
-
const viewCreativeContainerRef = React
|
|
25921
|
-
React
|
|
25918
|
+
const [retailersDataState, setRetailersDataState] = React.useState(null);
|
|
25919
|
+
const [viewCreativeListBoxOpenedState, setViewCreativeListBoxOpenedState] = React.useState(false);
|
|
25920
|
+
const viewCreativeContainerRef = React.useRef(null);
|
|
25921
|
+
React.useEffect(() => {
|
|
25922
25922
|
let newData = [];
|
|
25923
25923
|
if (viewCreativeRetailersData && viewCreativeRetailersData.length > 0) {
|
|
25924
25924
|
newData = viewCreativeRetailersData?.map(item => ({
|
|
@@ -26296,14 +26296,14 @@ const QuickFilterDropdownSingle = _ref => {
|
|
|
26296
26296
|
labelColor,
|
|
26297
26297
|
showLabelOnTop
|
|
26298
26298
|
} = _ref;
|
|
26299
|
-
const [isFocused, setIsFocused] = React
|
|
26300
|
-
const [showOptions, setShowOptions] = React
|
|
26301
|
-
const [inputValue, setInputValue] = React
|
|
26302
|
-
const [selectedOptions, setSelectedOptions] = React
|
|
26303
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
26304
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
26305
|
-
const inputRef = React
|
|
26306
|
-
const containerRef = React
|
|
26299
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
26300
|
+
const [showOptions, setShowOptions] = React.useState(false);
|
|
26301
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
26302
|
+
const [selectedOptions, setSelectedOptions] = React.useState([]);
|
|
26303
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
26304
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
26305
|
+
const inputRef = React.useRef(null);
|
|
26306
|
+
const containerRef = React.useRef(null);
|
|
26307
26307
|
const highlightText = (text, highlight) => {
|
|
26308
26308
|
if (!highlight) return text;
|
|
26309
26309
|
const lowerText = text.toLowerCase();
|
|
@@ -26328,17 +26328,17 @@ const QuickFilterDropdownSingle = _ref => {
|
|
|
26328
26328
|
return parts;
|
|
26329
26329
|
};
|
|
26330
26330
|
const filteredoptions = options?.filter(option => option.label.toLowerCase().includes(inputValue.toLowerCase()));
|
|
26331
|
-
React
|
|
26331
|
+
React.useEffect(() => {
|
|
26332
26332
|
if (selectedValue) {
|
|
26333
26333
|
setSelectedOptions(selectedValue);
|
|
26334
26334
|
}
|
|
26335
26335
|
}, [selectedValue]);
|
|
26336
|
-
React
|
|
26336
|
+
React.useEffect(() => {
|
|
26337
26337
|
if (isFocused && inputRef?.current) {
|
|
26338
26338
|
inputRef?.current?.focus();
|
|
26339
26339
|
}
|
|
26340
26340
|
}, [isFocused]);
|
|
26341
|
-
React
|
|
26341
|
+
React.useEffect(() => {
|
|
26342
26342
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
26343
26343
|
setIsFocused(false);
|
|
26344
26344
|
setShowOptions(false);
|
|
@@ -26711,26 +26711,26 @@ const QuickFilterDropdownMultiSelection = _ref => {
|
|
|
26711
26711
|
checkBoxColor,
|
|
26712
26712
|
showLabelOnTop
|
|
26713
26713
|
} = _ref;
|
|
26714
|
-
const [isFocused, setIsFocused] = React
|
|
26715
|
-
const [showOptions, setShowOptions] = React
|
|
26716
|
-
const [inputValue, setInputValue] = React
|
|
26717
|
-
const [selectedOptions, setSelectedOptions] = React
|
|
26718
|
-
const [hoverInputContainer, setHoverInputContainer] = React
|
|
26719
|
-
const [hoverOptionsContainer, setHoverOptionsContainer] = React
|
|
26720
|
-
const inputRef = React
|
|
26721
|
-
const containerRef = React
|
|
26714
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
26715
|
+
const [showOptions, setShowOptions] = React.useState(false);
|
|
26716
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
26717
|
+
const [selectedOptions, setSelectedOptions] = React.useState([]);
|
|
26718
|
+
const [hoverInputContainer, setHoverInputContainer] = React.useState(false);
|
|
26719
|
+
const [hoverOptionsContainer, setHoverOptionsContainer] = React.useState(false);
|
|
26720
|
+
const inputRef = React.useRef(null);
|
|
26721
|
+
const containerRef = React.useRef(null);
|
|
26722
26722
|
const filteredoptions = options?.filter(option => option.label.toLowerCase().includes(inputValue.toLowerCase()));
|
|
26723
|
-
React
|
|
26723
|
+
React.useEffect(() => {
|
|
26724
26724
|
if (selectedValue) {
|
|
26725
26725
|
setSelectedOptions(selectedValue);
|
|
26726
26726
|
}
|
|
26727
26727
|
}, [selectedValue]);
|
|
26728
|
-
React
|
|
26728
|
+
React.useEffect(() => {
|
|
26729
26729
|
if (isFocused && inputRef?.current) {
|
|
26730
26730
|
inputRef?.current?.focus();
|
|
26731
26731
|
}
|
|
26732
26732
|
}, [isFocused]);
|
|
26733
|
-
React
|
|
26733
|
+
React.useEffect(() => {
|
|
26734
26734
|
if (!hoverInputContainer && !hoverOptionsContainer) {
|
|
26735
26735
|
setIsFocused(false);
|
|
26736
26736
|
setShowOptions(false);
|
|
@@ -27315,11 +27315,11 @@ const OneColumnContainer = props => {
|
|
|
27315
27315
|
onBannerClick,
|
|
27316
27316
|
columnTitle
|
|
27317
27317
|
} = props;
|
|
27318
|
-
const [hover, setHover] = React
|
|
27319
|
-
const [offsetWidth, setOffsetWidth] = React
|
|
27320
|
-
const nodeRef = React
|
|
27321
|
-
const anotherRef = React
|
|
27322
|
-
React
|
|
27318
|
+
const [hover, setHover] = React.useState(false);
|
|
27319
|
+
const [offsetWidth, setOffsetWidth] = React.useState(200);
|
|
27320
|
+
const nodeRef = React.useRef(null);
|
|
27321
|
+
const anotherRef = React.useRef(null);
|
|
27322
|
+
React.useEffect(() => {
|
|
27323
27323
|
setOffsetWidth(anotherRef?.current?.offsetWidth);
|
|
27324
27324
|
}, [anotherRef]);
|
|
27325
27325
|
return /*#__PURE__*/React__default["default"].createElement(StyledContainer, {
|
|
@@ -27848,7 +27848,7 @@ const BarChartsByWeeks = props => {
|
|
|
27848
27848
|
// const [BarChartContainerWidth, setBarChartContainerWidth] = useState(0);
|
|
27849
27849
|
// const [BarChartContainerHeight, setBarChartContainerHeight] = useState(0);
|
|
27850
27850
|
|
|
27851
|
-
const controlsContainerRef = React
|
|
27851
|
+
const controlsContainerRef = React.useRef();
|
|
27852
27852
|
|
|
27853
27853
|
// useEffect(() => {
|
|
27854
27854
|
// const { offsetWidth } = controlsContainerRef.current;
|
|
@@ -28321,9 +28321,9 @@ const TotalDoughnutChart = props => {
|
|
|
28321
28321
|
noDataText,
|
|
28322
28322
|
textAfterValue
|
|
28323
28323
|
} = props;
|
|
28324
|
-
const [DoughnutChartRadius, setDoughnutChartRadius] = React
|
|
28325
|
-
const [zoomResolution, setZoomResolution] = React
|
|
28326
|
-
const DoughnutChartContainerRef = React
|
|
28324
|
+
const [DoughnutChartRadius, setDoughnutChartRadius] = React.useState(0);
|
|
28325
|
+
const [zoomResolution, setZoomResolution] = React.useState(1);
|
|
28326
|
+
const DoughnutChartContainerRef = React.useRef();
|
|
28327
28327
|
const dotCutTrenty = row => {
|
|
28328
28328
|
if (!row || !row.value) return null;
|
|
28329
28329
|
let valueNew = 0;
|
|
@@ -28334,7 +28334,7 @@ const TotalDoughnutChart = props => {
|
|
|
28334
28334
|
}
|
|
28335
28335
|
return dotCut ? getFormattedValue(valueNew) : getNumberWithCommas(valueNew);
|
|
28336
28336
|
};
|
|
28337
|
-
React
|
|
28337
|
+
React.useEffect(() => {
|
|
28338
28338
|
const handleResize = () => {
|
|
28339
28339
|
setZoomResolution(window.devicePixelRatio);
|
|
28340
28340
|
};
|
|
@@ -28350,7 +28350,7 @@ const TotalDoughnutChart = props => {
|
|
|
28350
28350
|
window.removeEventListener('resize', handleResize);
|
|
28351
28351
|
};
|
|
28352
28352
|
}, []);
|
|
28353
|
-
React
|
|
28353
|
+
React.useEffect(() => {
|
|
28354
28354
|
const MIN_RADIUS = 45;
|
|
28355
28355
|
if (!DoughnutChartContainerRef) return;
|
|
28356
28356
|
const {
|
|
@@ -28745,8 +28745,8 @@ const TotalHorizontalCharts = props => {
|
|
|
28745
28745
|
hideTitle
|
|
28746
28746
|
} = props;
|
|
28747
28747
|
const barBackgrounds = chartsData.map(bg => bg.color);
|
|
28748
|
-
const topHeader = React
|
|
28749
|
-
const wrapper = React
|
|
28748
|
+
const topHeader = React.useRef();
|
|
28749
|
+
const wrapper = React.useRef();
|
|
28750
28750
|
const BAR_HEIGHT = 40; // Height of each bar including padding
|
|
28751
28751
|
const CHART_PADDING = 40; // Total padding for chart (top + bottom)
|
|
28752
28752
|
|
|
@@ -28765,8 +28765,8 @@ const TotalHorizontalCharts = props => {
|
|
|
28765
28765
|
// 2. Height needed for specified number of bars
|
|
28766
28766
|
return Math.min(chartsData.length * BAR_HEIGHT + CHART_PADDING, visibleBarsHeight + CHART_PADDING);
|
|
28767
28767
|
};
|
|
28768
|
-
const [showLegendTooltip, setShowLegendTooltip] = React
|
|
28769
|
-
const [tooltipText, setTooltipText] = React
|
|
28768
|
+
const [showLegendTooltip, setShowLegendTooltip] = React.useState(false);
|
|
28769
|
+
const [tooltipText, setTooltipText] = React.useState({
|
|
28770
28770
|
content: '',
|
|
28771
28771
|
clientX: 0,
|
|
28772
28772
|
clientY: 0
|
|
@@ -29270,10 +29270,10 @@ const PopupCharts = props => {
|
|
|
29270
29270
|
subtitleTextColor,
|
|
29271
29271
|
onCloseClick
|
|
29272
29272
|
} = props;
|
|
29273
|
-
const [IsPopupChartsOpen, setIsPopupChartsOpen] = React
|
|
29274
|
-
const divRef = React
|
|
29275
|
-
const [divHeight, setDivHeight] = React
|
|
29276
|
-
React
|
|
29273
|
+
const [IsPopupChartsOpen, setIsPopupChartsOpen] = React.useState(isPopupChartsOpen);
|
|
29274
|
+
const divRef = React.useRef(null);
|
|
29275
|
+
const [divHeight, setDivHeight] = React.useState(0);
|
|
29276
|
+
React.useEffect(() => {
|
|
29277
29277
|
if (divRef.current) {
|
|
29278
29278
|
const {
|
|
29279
29279
|
top,
|
|
@@ -29283,7 +29283,7 @@ const PopupCharts = props => {
|
|
|
29283
29283
|
setDivHeight(newHeight);
|
|
29284
29284
|
}
|
|
29285
29285
|
}, [height]);
|
|
29286
|
-
React
|
|
29286
|
+
React.useEffect(() => {
|
|
29287
29287
|
setIsPopupChartsOpen(isPopupChartsOpen);
|
|
29288
29288
|
}, [isPopupChartsOpen]);
|
|
29289
29289
|
const closePopupCharts = e => {
|
|
@@ -29743,12 +29743,12 @@ const Heatmap = props => {
|
|
|
29743
29743
|
lowLimit,
|
|
29744
29744
|
barHeight
|
|
29745
29745
|
} = props;
|
|
29746
|
-
const [refreshRequired, setRefreshRequired] = React
|
|
29747
|
-
const [tooltip, setTooltip] = React
|
|
29748
|
-
const [barHeightState, setBarHeightState] = React
|
|
29749
|
-
const barRefs = React
|
|
29750
|
-
const barsContainerRef = React
|
|
29751
|
-
const [tooltipPosition, setTooltipPosition] = React
|
|
29746
|
+
const [refreshRequired, setRefreshRequired] = React.useState(false);
|
|
29747
|
+
const [tooltip, setTooltip] = React.useState(null);
|
|
29748
|
+
const [barHeightState, setBarHeightState] = React.useState(barHeight);
|
|
29749
|
+
const barRefs = React.useRef([]); // Array to store refs for each bar
|
|
29750
|
+
const barsContainerRef = React.useRef(null);
|
|
29751
|
+
const [tooltipPosition, setTooltipPosition] = React.useState({
|
|
29752
29752
|
x: 0,
|
|
29753
29753
|
y: 0
|
|
29754
29754
|
});
|
|
@@ -29758,12 +29758,12 @@ const Heatmap = props => {
|
|
|
29758
29758
|
|
|
29759
29759
|
// Calculate the total value of all bars
|
|
29760
29760
|
const totalValue = filteredData.reduce((sum, item) => sum + item.value, 0);
|
|
29761
|
-
React
|
|
29761
|
+
React.useEffect(() => {
|
|
29762
29762
|
setRefreshRequired(!refreshRequired);
|
|
29763
29763
|
}, [data]);
|
|
29764
29764
|
|
|
29765
29765
|
// Reset tooltip when height changes
|
|
29766
|
-
React
|
|
29766
|
+
React.useEffect(() => {
|
|
29767
29767
|
setBarHeightState(barHeight);
|
|
29768
29768
|
setTooltip(null);
|
|
29769
29769
|
}, [barHeight]);
|
|
@@ -29984,7 +29984,7 @@ const IconButton = props => {
|
|
|
29984
29984
|
onClick,
|
|
29985
29985
|
onCancelClick
|
|
29986
29986
|
} = props;
|
|
29987
|
-
const [progress, setProgress] = React
|
|
29987
|
+
const [progress, setProgress] = React.useState(0);
|
|
29988
29988
|
let interval;
|
|
29989
29989
|
const incrementProgress = () => {
|
|
29990
29990
|
if (showProcess && progress <= 90) {
|
|
@@ -30002,7 +30002,7 @@ const IconButton = props => {
|
|
|
30002
30002
|
clearInterval(interval);
|
|
30003
30003
|
}
|
|
30004
30004
|
};
|
|
30005
|
-
React
|
|
30005
|
+
React.useEffect(() => {
|
|
30006
30006
|
incrementProgress();
|
|
30007
30007
|
}, [showProcess]);
|
|
30008
30008
|
const getIcon = icon => {
|
|
@@ -30360,7 +30360,7 @@ const BarChart = props => {
|
|
|
30360
30360
|
showCurrentCampaignStyle,
|
|
30361
30361
|
isPercent
|
|
30362
30362
|
} = props;
|
|
30363
|
-
const controlsContainerRef = React
|
|
30363
|
+
const controlsContainerRef = React.useRef();
|
|
30364
30364
|
const areAllDatesEmpty = () => {
|
|
30365
30365
|
if (!barChartData || barChartData?.length === 0) return true;
|
|
30366
30366
|
return barChartData?.every(item => !item.date);
|