impact-ui 4.0.1-alpha.1 → 4.0.1-alpha.2
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/_virtual/FilterAltOffOutlined.js +4 -0
- package/dist/_virtual/MoreHorizOutlined.js +4 -0
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +2 -2
- package/dist/_virtual/index3.js +4 -2
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +2 -4
- package/dist/_virtual/index6.js +2 -4
- package/dist/_virtual/lodash.js +4 -0
- package/dist/components/Chart/index.d.ts +64 -9
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Chart/index.js +196 -229
- package/dist/components/CommentsPanel/CommentsContext.d.ts +9 -0
- package/dist/components/CommentsPanel/CommentsContext.d.ts.map +1 -0
- package/dist/components/CommentsPanel/CommentsContext.js +557 -0
- package/dist/components/CommentsPanel/CommentsPanel.impl.d.ts +8 -0
- package/dist/components/CommentsPanel/CommentsPanel.impl.d.ts.map +1 -0
- package/dist/components/CommentsPanel/CommentsPanel.impl.js +420 -0
- package/dist/components/CommentsPanel/CommentsPanel.types.d.ts +42 -0
- package/dist/components/CommentsPanel/CommentsPanel.types.d.ts.map +1 -0
- package/dist/components/CommentsPanel/index.d.ts +7 -0
- package/dist/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/components/CommentsPanel/index.js +5 -0
- package/dist/components/DatePicker/datePickerDropdown.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerDropdown.js +29 -45
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -2
- package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DatePicker/showMonthYearSelect.js +9 -6
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +62 -60
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/Header/Header.types.d.ts +2 -2
- package/dist/components/Header/Header.types.d.ts.map +1 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +12 -2
- package/dist/components/KeyboardShortCuts/ShortcutLandingPage.js +1 -1
- package/dist/components/KeyboardShortCuts/ShortcutModal.js +1 -1
- package/dist/components/KeyboardShortCuts/allSetBox.js +1 -1
- package/dist/components/KeyboardShortCuts/index.js +1 -1
- package/dist/components/KeyboardShortCuts/tutorial.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/tutorial.js +87 -16
- package/dist/components/Notification/Notification.types.d.ts +1 -0
- package/dist/components/Notification/Notification.types.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.js +31 -2
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.js +1 -0
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/Select/Select.types.d.ts +0 -1
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +9 -2
- package/dist/components/Sidebar/ChildMenu.d.ts +1 -1
- package/dist/components/Sidebar/ChildMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/ChildMenu.js +38 -51
- package/dist/components/Sidebar/ParentMenu.d.ts +2 -2
- package/dist/components/Sidebar/ParentMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/ParentMenu.js +119 -137
- package/dist/components/Sidebar/SidebarMenus.d.ts +2 -2
- package/dist/components/Sidebar/SidebarMenus.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +0 -23
- package/dist/components/Sidebar/utils.d.ts +4 -0
- package/dist/components/Sidebar/utils.d.ts.map +1 -0
- package/dist/components/Sidebar/utils.js +8 -0
- package/dist/components/Table/AdvanceSearchModalItem.js +311 -0
- package/dist/components/Table/AdvanceSortModal.d.ts.map +1 -1
- package/dist/components/Table/AdvanceSortModal.js +25 -13
- package/dist/components/Table/AgGridHeader.d.ts.map +1 -1
- package/dist/components/Table/AgGridHeader.js +1 -1
- package/dist/components/Table/CommentsPortal.d.ts +3 -1
- package/dist/components/Table/CommentsPortal.d.ts.map +1 -1
- package/dist/components/Table/CommentsPortal.js +27 -89
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts +11 -14
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +6 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts +10 -11
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +12 -8
- package/dist/components/Table/NoComments.d.ts.map +1 -1
- package/dist/components/Table/NoComments.js +7 -10
- package/dist/components/Table/Table.types.d.ts +2 -0
- package/dist/components/Table/Table.types.d.ts.map +1 -1
- package/dist/components/Table/actionBar.d.ts +6 -11
- package/dist/components/Table/actionBar.d.ts.map +1 -1
- package/dist/components/Table/actionBar.js +3 -16
- package/dist/components/Table/advanceSearchModal.d.ts.map +1 -1
- package/dist/components/Table/advanceSearchModal.js +599 -0
- package/dist/components/Table/filterUtils.d.ts +0 -2
- package/dist/components/Table/filterUtils.d.ts.map +1 -1
- package/dist/components/Table/filterUtils.js +1 -23
- package/dist/components/Table/index.d.ts +2 -3
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +1361 -5
- package/dist/components/Table/mockData.d.ts.map +1 -1
- package/dist/components/Table/tableFunctions.d.ts +3 -1
- package/dist/components/Table/tableFunctions.d.ts.map +1 -1
- package/dist/components/Table/tableFunctions.js +128 -88
- package/dist/components/Table/tableHeader.d.ts.map +1 -1
- package/dist/components/Table/tableHeader.js +16 -15
- package/dist/components/Table/tableMoreOptions.d.ts.map +1 -1
- package/dist/components/Table/tableMoreOptions.js +5 -8
- package/dist/components/Table/tableSettings.d.ts.map +1 -1
- package/dist/components/Table/tableSettings.js +1 -1
- package/dist/components/Table/withCommentIcon.d.ts.map +1 -1
- package/dist/components/Table/withCommentIcon.js +4 -4
- package/dist/components/TableOld/AgGridHeader.d.ts.map +1 -1
- package/dist/components/TableOld/AgGridHeader.js +484 -0
- package/dist/components/TableOld/actionBar.js +31 -0
- package/dist/components/TableOld/index.d.ts +2 -1
- package/dist/components/TableOld/index.d.ts.map +1 -1
- package/dist/components/{Table/TableImpl.js → TableOld/index.js} +211 -1480
- package/dist/components/TableOld/mockData.d.ts.map +1 -1
- package/dist/components/TableOld/tableFunctions.d.ts +3 -1
- package/dist/components/TableOld/tableFunctions.d.ts.map +1 -1
- package/dist/components/TableOld/tableFunctions.js +1300 -0
- package/dist/components/TableOld/tableHeader.d.ts +5 -2
- package/dist/components/TableOld/tableHeader.d.ts.map +1 -1
- package/dist/components/TableOld/tableHeader.js +223 -0
- package/dist/components/TableOld/tablePagination.js +68 -0
- package/dist/components/common/MentionEditor/MentionList/index.d.ts +4 -0
- package/dist/components/common/MentionEditor/MentionList/index.d.ts.map +1 -0
- package/dist/components/common/MentionEditor/MentionList/index.js +99 -0
- package/dist/components/common/MentionEditor/index.d.ts +4 -0
- package/dist/components/common/MentionEditor/index.d.ts.map +1 -0
- package/dist/components/common/MentionEditor/index.js +168 -0
- package/dist/components/common/MentionEditor/suggestion.d.ts +19 -0
- package/dist/components/common/MentionEditor/suggestion.d.ts.map +1 -0
- package/dist/components/common/MentionEditor/suggestion.js +89 -0
- package/dist/components/index.d.ts +3 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -3
- package/dist/mcp-component-registry.json +1 -1
- package/dist/node_modules/@mui/icons-material/FilterAltOffOutlined.js +17 -0
- package/dist/node_modules/@mui/icons-material/MoreHorizOutlined.js +17 -0
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/call-bind/index.js +1 -1
- package/dist/node_modules/is-symbol/index.js +1 -1
- package/dist/node_modules/lodash/lodash.js +5506 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/utils/helper.js +33 -0
- package/package.json +3 -4
- package/dist/_virtual/North.js +0 -4
- package/dist/components/Chart/Chart.types.d.ts +0 -177
- package/dist/components/Chart/Chart.types.d.ts.map +0 -1
- package/dist/components/Table/TableImpl.d.ts +0 -3
- package/dist/components/Table/TableImpl.d.ts.map +0 -1
- package/dist/components/Table/commentPanel.d.ts +0 -15
- package/dist/components/Table/commentPanel.d.ts.map +0 -1
- package/dist/components/Table/commentPanel.js +0 -432
- package/dist/node_modules/@mui/icons-material/North.js +0 -17
- package/dist/utils/formatCommentTimestamp.js +0 -18
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".chart-container{background:#fff;border-radius:8px;display:flex;flex-direction:column;gap:40px;height:100%;padding:12px 12px 0;position:relative;transform-origin:center center;transition:all .25s ease}.chart-container.above-chart-component{gap:16px}.chart-container.card-container{box-shadow:0 0 4px #0000001f}.chart-container.fullscreen-animating{animation:
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(':root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.chart-container{background:#fff;border-radius:8px;display:flex;flex-direction:column;gap:40px;height:100%;padding:12px 12px 0;position:relative;transform-origin:center center;transition:all .25s ease}.chart-container.above-chart-component{gap:16px}.chart-container.card-container{box-shadow:0 0 4px #0000001f}.chart-container.fullscreen-animating{animation:expandAnim .2s ease forwards}.chart-container.fullscreen-animating-out{animation:collapseAnim .2s ease forwards}.chart-container.expanded{padding:24px}.chart-container .chart-container-header{align-items:center;display:flex;justify-content:space-between}.chart-container .chart-container-header .chart-container-header-title{align-items:center;display:flex;gap:6px}.chart-container .chart-container-header .chart-container-header-title .chart-container-header-title-text{color:#0d152c;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.chart-container .chart-container-header .chart-container-header-actions{align-items:center;display:flex;flex-wrap:wrap;gap:12px}.chart-container .divider-line{background:#d9dde7;height:16px;width:1px}.chart-custom-actions{align-items:center;display:flex;gap:12px}.highcharts-xaxis-labels text,.highcharts-yaxis-labels text{color:#60697d!important;font-family:Manrope,sans-serif;font-size:12px!important;font-weight:500}.highcharts-xaxis .highcharts-axis-title,.highcharts-yaxis .highcharts-axis-title{color:#60697d!important;font-family:Manrope,sans-serif;font-size:14px!important;font-style:normal;font-weight:500;line-height:20px}.tooltip-key{font-size:12px;font-weight:500;line-height:16px}.tooltip-value{font-size:14px;font-weight:600;line-height:24px}.highcharts-text-outline{stroke-width:0px}.chart-empty-state{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center}.chart-empty-state span{color:#7a8294;font-size:16px;font-weight:600;line-height:24px;text-align:center}@keyframes expandAnim{0%{opacity:.6;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@keyframes collapseAnim{0%{opacity:1;transform:scale(1)}to{opacity:.6;transform:scale(.98)}}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React__default, { useState, useRef, useEffect, useMemo } from "react";
|
|
4
|
-
import default_1$1 from "../../node_modules/@mui/icons-material/FileDownloadOutlined.js";
|
|
5
|
-
import default_1 from "../../node_modules/@mui/icons-material/TableChartOutlined.js";
|
|
6
4
|
import Highcharts from "highcharts";
|
|
7
5
|
import Highcharts3D from "highcharts/highcharts-3d";
|
|
8
6
|
import HighchartsMore from "highcharts/highcharts-more";
|
|
@@ -13,21 +11,21 @@ import HighchartsOfflineExporting from "highcharts/modules/offline-exporting";
|
|
|
13
11
|
import HighchartsStock from "highcharts/modules/stock";
|
|
14
12
|
import HighchartsTreemap from "highcharts/modules/treemap";
|
|
15
13
|
import HighchartsVenn from "highcharts/modules/venn";
|
|
16
|
-
import
|
|
14
|
+
import borderRadius from "highcharts-border-radius";
|
|
17
15
|
import HighchartsReact from "highcharts-react-official";
|
|
18
16
|
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
17
|
+
|
|
19
18
|
import { Button } from "../Button/index.js";
|
|
20
19
|
import { Menu } from "../Menu/index.js";
|
|
21
20
|
import { Tooltip } from "../Tooltip/index.js";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const modules = [
|
|
21
|
+
import default_1 from "../../node_modules/@mui/icons-material/TableChartOutlined.js";
|
|
22
|
+
import default_1$1 from "../../node_modules/@mui/icons-material/FileDownloadOutlined.js";
|
|
23
|
+
const ExpandIcon = (props) => /* @__PURE__ */ jsx("img", { alt: "", src: getAssetUrl("icons/expand-icon.svg"), ...props });
|
|
24
|
+
const Collapse = (props) => /* @__PURE__ */ jsx("img", { alt: "", src: getAssetUrl("icons/collapse-new.svg"), ...props });
|
|
25
|
+
const ChartDropdown = (props) => /* @__PURE__ */ jsx("img", { alt: "", src: getAssetUrl("icons/Chart-dropdown.svg"), ...props });
|
|
26
|
+
const EmptyStateImage = (props) => /* @__PURE__ */ jsx("img", { alt: "", src: getAssetUrl("icons/emptyStateImage.svg"), ...props });
|
|
27
|
+
if (typeof Highcharts === "object") {
|
|
28
|
+
[
|
|
31
29
|
HighchartsMore,
|
|
32
30
|
Highcharts3D,
|
|
33
31
|
HighchartsHeatmap,
|
|
@@ -38,44 +36,11 @@ if (typeof Highcharts === "object" && "seriesTypes" in Highcharts && borderRadiu
|
|
|
38
36
|
HighchartsExporting,
|
|
39
37
|
HighchartsExportData,
|
|
40
38
|
HighchartsOfflineExporting
|
|
41
|
-
]
|
|
42
|
-
modules.forEach((mod) => {
|
|
39
|
+
].forEach((mod) => {
|
|
43
40
|
if (typeof mod === "function") mod(Highcharts);
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
if (value == null) return fallback;
|
|
49
|
-
return JSON.stringify(value);
|
|
50
|
-
} catch {
|
|
51
|
-
return fallback;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function isPromiseLike(value) {
|
|
55
|
-
return typeof value === "object" && value !== null && "then" in value && typeof value.then === "function";
|
|
56
|
-
}
|
|
57
|
-
function tryFullscreen(call) {
|
|
58
|
-
try {
|
|
59
|
-
const result = call();
|
|
60
|
-
if (isPromiseLike(result)) {
|
|
61
|
-
void Promise.resolve(result).catch(() => {
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
} catch {
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function chartTypesToMenuOptions(chartTypesOptions) {
|
|
68
|
-
if (!(chartTypesOptions == null ? void 0 : chartTypesOptions.length)) return [];
|
|
69
|
-
return chartTypesOptions.map((opt) => ({
|
|
70
|
-
label: opt.label,
|
|
71
|
-
value: opt.value,
|
|
72
|
-
onClick: opt.onClick ? (_opt, event) => {
|
|
73
|
-
var _a;
|
|
74
|
-
if (event) (_a = opt.onClick) == null ? void 0 : _a.call(opt, event);
|
|
75
|
-
} : void 0
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
function Chart({
|
|
43
|
+
const Chart = ({
|
|
79
44
|
graphType = "column",
|
|
80
45
|
xAxisCategories,
|
|
81
46
|
xAxisTitle = "X Axis",
|
|
@@ -119,10 +84,6 @@ function Chart({
|
|
|
119
84
|
showDownloadMenu = true,
|
|
120
85
|
showBuiltInDownloadOptions = true,
|
|
121
86
|
downloadMenuOptions = [],
|
|
122
|
-
hoveredXAxisIndex = null,
|
|
123
|
-
exportingOptions = {},
|
|
124
|
-
aboveChartComponent = null,
|
|
125
|
-
isEmpty = false,
|
|
126
87
|
customLegend = null,
|
|
127
88
|
customLegendStyle = null,
|
|
128
89
|
yAxisTitleRight,
|
|
@@ -141,12 +102,11 @@ function Chart({
|
|
|
141
102
|
colorAxisOptions = {},
|
|
142
103
|
seriesOptions = null,
|
|
143
104
|
additionalOptions = {},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}) {
|
|
105
|
+
hoveredXAxisIndex = null,
|
|
106
|
+
exportingOptions = {},
|
|
107
|
+
aboveChartComponent = null,
|
|
108
|
+
isEmpty = false
|
|
109
|
+
}) => {
|
|
150
110
|
var _a;
|
|
151
111
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
152
112
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
@@ -156,26 +116,45 @@ function Chart({
|
|
|
156
116
|
const [downloadMenuAnchor, setDownloadMenuAnchor] = useState(null);
|
|
157
117
|
const chartComponentRef = useRef(null);
|
|
158
118
|
const containerRef = useRef(null);
|
|
119
|
+
const getBuiltInDownloadOptions = () => {
|
|
120
|
+
var _a2, _b;
|
|
121
|
+
const chart = (_a2 = chartComponentRef.current) == null ? void 0 : _a2.chart;
|
|
122
|
+
if (!chart) return [];
|
|
123
|
+
const globalExporting = Highcharts.getOptions().exporting || {};
|
|
124
|
+
const instanceExporting = ((_b = chart.options) == null ? void 0 : _b.exporting) || {};
|
|
125
|
+
const menuItemDefs = {
|
|
126
|
+
...globalExporting.menuItemDefinitions || {},
|
|
127
|
+
...instanceExporting.menuItemDefinitions || {}
|
|
128
|
+
};
|
|
129
|
+
const formatKey = (str) => {
|
|
130
|
+
const withSpaces = str.replace(/([a-z])([A-Z])/g, "$1 $2");
|
|
131
|
+
return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1);
|
|
132
|
+
};
|
|
133
|
+
return Object.keys(menuItemDefs).filter(
|
|
134
|
+
(item) => typeof item === "string" && item !== "separator" && item !== "viewFullscreen" && (item.startsWith("download") || item === "printChart")
|
|
135
|
+
).map((item) => {
|
|
136
|
+
var _a3;
|
|
137
|
+
return {
|
|
138
|
+
label: ((_a3 = menuItemDefs[item]) == null ? void 0 : _a3.text) || formatKey(item),
|
|
139
|
+
value: item,
|
|
140
|
+
onClick: () => {
|
|
141
|
+
if (typeof menuItemDefs[item].onclick === "function") {
|
|
142
|
+
menuItemDefs[item].onclick.call(chart);
|
|
143
|
+
}
|
|
144
|
+
setShowDownloadList(false);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
};
|
|
159
149
|
const enterFullscreen = () => {
|
|
160
150
|
const elem = containerRef.current;
|
|
161
151
|
if (!elem) return;
|
|
162
152
|
setIsAnimating(true);
|
|
163
153
|
elem.classList.add("fullscreen-animating");
|
|
164
154
|
setTimeout(() => {
|
|
165
|
-
if (
|
|
166
|
-
if (elem.
|
|
167
|
-
|
|
168
|
-
return elem.requestFullscreen();
|
|
169
|
-
});
|
|
170
|
-
} else if (elem.webkitRequestFullscreen) {
|
|
171
|
-
tryFullscreen(() => {
|
|
172
|
-
return elem.webkitRequestFullscreen();
|
|
173
|
-
});
|
|
174
|
-
} else if (elem.msRequestFullscreen) {
|
|
175
|
-
tryFullscreen(() => {
|
|
176
|
-
return elem.msRequestFullscreen();
|
|
177
|
-
});
|
|
178
|
-
}
|
|
155
|
+
if (elem.requestFullscreen) elem.requestFullscreen();
|
|
156
|
+
else if (elem.webkitRequestFullscreen) elem.webkitRequestFullscreen();
|
|
157
|
+
else if (elem.msRequestFullscreen) elem.msRequestFullscreen();
|
|
179
158
|
setIsExpanded(true);
|
|
180
159
|
handleChartExpand(true);
|
|
181
160
|
elem.classList.remove("fullscreen-animating");
|
|
@@ -187,20 +166,9 @@ function Chart({
|
|
|
187
166
|
setIsAnimating(true);
|
|
188
167
|
elem.classList.add("fullscreen-animating-out");
|
|
189
168
|
setTimeout(() => {
|
|
190
|
-
if (
|
|
191
|
-
if (document.
|
|
192
|
-
|
|
193
|
-
return document.exitFullscreen();
|
|
194
|
-
});
|
|
195
|
-
} else if (document.webkitExitFullscreen) {
|
|
196
|
-
tryFullscreen(() => {
|
|
197
|
-
return document.webkitExitFullscreen();
|
|
198
|
-
});
|
|
199
|
-
} else if (document.msExitFullscreen) {
|
|
200
|
-
tryFullscreen(() => {
|
|
201
|
-
return document.msExitFullscreen();
|
|
202
|
-
});
|
|
203
|
-
}
|
|
169
|
+
if (document.exitFullscreen) document.exitFullscreen();
|
|
170
|
+
else if (document.webkitExitFullscreen) document.webkitExitFullscreen();
|
|
171
|
+
else if (document.msExitFullscreen) document.msExitFullscreen();
|
|
204
172
|
setIsExpanded(false);
|
|
205
173
|
handleChartExpand(false);
|
|
206
174
|
elem.classList.remove("fullscreen-animating-out");
|
|
@@ -208,7 +176,7 @@ function Chart({
|
|
|
208
176
|
};
|
|
209
177
|
useEffect(() => {
|
|
210
178
|
const handleFullscreenChange = () => {
|
|
211
|
-
const fs = document.fullscreenElement
|
|
179
|
+
const fs = document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement;
|
|
212
180
|
if (!fs) {
|
|
213
181
|
setIsExpanded(false);
|
|
214
182
|
handleChartExpand(false);
|
|
@@ -220,14 +188,13 @@ function Chart({
|
|
|
220
188
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
221
189
|
document.removeEventListener("webkitfullscreenchange", handleFullscreenChange);
|
|
222
190
|
};
|
|
223
|
-
}, [
|
|
191
|
+
}, []);
|
|
224
192
|
useEffect(() => {
|
|
225
|
-
|
|
226
|
-
const chart =
|
|
227
|
-
if (!chart) return;
|
|
193
|
+
if (!chartComponentRef.current) return;
|
|
194
|
+
const chart = chartComponentRef.current.chart;
|
|
228
195
|
const updateSize = () => {
|
|
229
|
-
const windowWidth = window.innerWidth;
|
|
230
196
|
const windowHeight = window.innerHeight;
|
|
197
|
+
const windowWidth = window.innerWidth;
|
|
231
198
|
chart.setSize(
|
|
232
199
|
windowWidth < 768 ? windowWidth - 40 : null,
|
|
233
200
|
isExpanded ? windowHeight - 98 : "auto",
|
|
@@ -241,74 +208,60 @@ function Chart({
|
|
|
241
208
|
};
|
|
242
209
|
}, [isExpanded]);
|
|
243
210
|
useEffect(() => {
|
|
244
|
-
|
|
245
|
-
const chart =
|
|
211
|
+
if (!chartComponentRef.current) return;
|
|
212
|
+
const chart = chartComponentRef.current.chart;
|
|
246
213
|
if (!chart) return;
|
|
247
214
|
if (hoveredXAxisIndex !== null && hoveredXAxisIndex !== void 0) {
|
|
248
215
|
const points = chart.series.reduce((acc, series) => {
|
|
249
|
-
var
|
|
250
|
-
const point = (
|
|
216
|
+
var _a2;
|
|
217
|
+
const point = (_a2 = series.points) == null ? void 0 : _a2[hoveredXAxisIndex];
|
|
251
218
|
if (point) acc.push(point);
|
|
252
219
|
return acc;
|
|
253
220
|
}, []);
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
chart.
|
|
257
|
-
(_b = chart.xAxis[0]) == null ? void 0 : _b.drawCrosshair(void 0, firstPoint);
|
|
221
|
+
if (points.length > 0) {
|
|
222
|
+
chart.tooltip.refresh(sharedTooltip ? points : points[0]);
|
|
223
|
+
chart.xAxis[0].drawCrosshair(null, points[0]);
|
|
258
224
|
}
|
|
259
225
|
} else {
|
|
260
226
|
chart.tooltip.hide();
|
|
261
|
-
|
|
227
|
+
chart.xAxis[0].hideCrosshair();
|
|
262
228
|
}
|
|
263
229
|
}, [hoveredXAxisIndex, sharedTooltip]);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
...(instanceExporting == null ? void 0 : instanceExporting.menuItemDefinitions) || {}
|
|
273
|
-
};
|
|
274
|
-
const formatKey = (str) => {
|
|
275
|
-
const withSpaces = str.replace(/([a-z])([A-Z])/g, "$1 $2");
|
|
276
|
-
return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1);
|
|
277
|
-
};
|
|
278
|
-
return Object.keys(menuItemDefs).filter(
|
|
279
|
-
(item) => typeof item === "string" && item !== "separator" && item !== "viewFullscreen" && (item.startsWith("download") || item === "printChart")
|
|
280
|
-
).map((item) => {
|
|
281
|
-
var _a3;
|
|
282
|
-
return {
|
|
283
|
-
label: ((_a3 = menuItemDefs[item]) == null ? void 0 : _a3.text) || formatKey(item),
|
|
284
|
-
value: item,
|
|
285
|
-
onClick: () => {
|
|
286
|
-
var _a4;
|
|
287
|
-
if (typeof ((_a4 = menuItemDefs[item]) == null ? void 0 : _a4.onclick) === "function") {
|
|
288
|
-
menuItemDefs[item].onclick.call(chart);
|
|
289
|
-
}
|
|
290
|
-
setShowDownloadList(false);
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
});
|
|
294
|
-
};
|
|
230
|
+
function safeStringify(value, fallback) {
|
|
231
|
+
try {
|
|
232
|
+
if (!value) return fallback;
|
|
233
|
+
return JSON.stringify(value);
|
|
234
|
+
} catch {
|
|
235
|
+
return fallback;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
295
238
|
const graphData = useMemo(
|
|
296
239
|
() => ({
|
|
297
240
|
chart: {
|
|
298
241
|
type: graphType,
|
|
299
242
|
scrollablePlotArea: {
|
|
300
|
-
minWidth: showScrollX
|
|
243
|
+
minWidth: showScrollX ? (xAxisCategories == null ? void 0 : xAxisCategories.length) * 80 : void 0,
|
|
301
244
|
opacity: 1,
|
|
302
245
|
scrollPositionX: 0
|
|
303
246
|
},
|
|
304
247
|
marginBottom: chartMarginBottom,
|
|
305
|
-
width
|
|
248
|
+
width,
|
|
306
249
|
style: { fontFamily: "Manrope, sans-serif" },
|
|
307
|
-
height: isExpanded ? window.innerHeight - 108 : height
|
|
308
|
-
options3d: is3D ? {
|
|
250
|
+
height: isExpanded ? window.innerHeight - 108 : height || "auto",
|
|
251
|
+
options3d: is3D ? {
|
|
252
|
+
enabled: true,
|
|
253
|
+
alpha: 10,
|
|
254
|
+
beta: 30,
|
|
255
|
+
depth: 550,
|
|
256
|
+
viewDistance: 10
|
|
257
|
+
} : void 0,
|
|
309
258
|
...chartOptions || {}
|
|
310
259
|
},
|
|
311
|
-
title: {
|
|
260
|
+
title: {
|
|
261
|
+
text: null,
|
|
262
|
+
// remove title
|
|
263
|
+
...titleOptions || {}
|
|
264
|
+
},
|
|
312
265
|
exporting: {
|
|
313
266
|
buttons: {
|
|
314
267
|
contextButton: {
|
|
@@ -325,18 +278,27 @@ function Chart({
|
|
|
325
278
|
text: xAxisTitle,
|
|
326
279
|
align: "middle",
|
|
327
280
|
reserveSpace: true,
|
|
328
|
-
y: xAxisTitlePositionY
|
|
281
|
+
y: xAxisTitlePositionY ? xAxisTitlePositionY : showScrollX ? graphType === "scatter3d" ? 130 : 40 : 3
|
|
329
282
|
},
|
|
330
283
|
labels: {
|
|
331
284
|
autoRotation: [-45, -60],
|
|
285
|
+
// Highcharts will choose best rotation automatically
|
|
332
286
|
rotation: void 0,
|
|
333
|
-
style: {
|
|
287
|
+
style: {
|
|
288
|
+
whiteSpace: "nowrap"
|
|
289
|
+
}
|
|
334
290
|
},
|
|
335
291
|
...xAxisOptions || {}
|
|
336
292
|
},
|
|
337
293
|
yAxis: [
|
|
338
294
|
{
|
|
339
|
-
|
|
295
|
+
// Left axis
|
|
296
|
+
title: {
|
|
297
|
+
text: yAxisTitle,
|
|
298
|
+
x: -12,
|
|
299
|
+
align: "middle",
|
|
300
|
+
margin: 16
|
|
301
|
+
},
|
|
340
302
|
lineWidth: 1,
|
|
341
303
|
lineColor: "#D9DDE7",
|
|
342
304
|
gridLineDashStyle: "Dash",
|
|
@@ -349,7 +311,12 @@ function Chart({
|
|
|
349
311
|
},
|
|
350
312
|
...yAxisTitleRight ? [
|
|
351
313
|
{
|
|
352
|
-
title: {
|
|
314
|
+
title: {
|
|
315
|
+
text: yAxisTitleRight,
|
|
316
|
+
x: 12,
|
|
317
|
+
align: "middle",
|
|
318
|
+
margin: 16
|
|
319
|
+
},
|
|
353
320
|
lineWidth: 1,
|
|
354
321
|
lineColor: "#D9DDE7",
|
|
355
322
|
gridLineDashStyle: "Dash",
|
|
@@ -362,7 +329,11 @@ function Chart({
|
|
|
362
329
|
}
|
|
363
330
|
] : []
|
|
364
331
|
],
|
|
365
|
-
zAxis: is3D ? {
|
|
332
|
+
zAxis: is3D ? {
|
|
333
|
+
min: 0,
|
|
334
|
+
max: 10,
|
|
335
|
+
...zAxisOptions || {}
|
|
336
|
+
} : zAxisOptions && Object.keys(zAxisOptions).length ? zAxisOptions : void 0,
|
|
366
337
|
tooltip: {
|
|
367
338
|
useHTML: true,
|
|
368
339
|
className: "custom-tooltip",
|
|
@@ -372,37 +343,52 @@ function Chart({
|
|
|
372
343
|
borderColor: "transparent",
|
|
373
344
|
outside: false,
|
|
374
345
|
shared: sharedTooltip,
|
|
375
|
-
shadow: {
|
|
376
|
-
|
|
346
|
+
shadow: {
|
|
347
|
+
color: "rgba(0, 0, 0, 0.2)",
|
|
348
|
+
offsetX: 2,
|
|
349
|
+
offsetY: 2,
|
|
350
|
+
opacity: 0.3
|
|
351
|
+
},
|
|
352
|
+
style: {
|
|
353
|
+
fontFamily: "'Manrope', sans-serif",
|
|
354
|
+
color: "#1F2B4D"
|
|
355
|
+
},
|
|
377
356
|
positioner(labelWidth, labelHeight, point) {
|
|
378
357
|
const chart = this.chart;
|
|
379
358
|
const left = chart.plotLeft;
|
|
380
359
|
const right = chart.plotLeft + chart.plotWidth;
|
|
381
360
|
const top = chart.plotTop;
|
|
382
361
|
const bottom = chart.plotTop + chart.plotHeight;
|
|
383
|
-
let x =
|
|
384
|
-
let y =
|
|
385
|
-
if (x < left)
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
if (y
|
|
362
|
+
let x = point.plotX + left - labelWidth / 2;
|
|
363
|
+
let y = point.plotY + top - labelHeight - 10;
|
|
364
|
+
if (x < left) {
|
|
365
|
+
x = left + 5;
|
|
366
|
+
}
|
|
367
|
+
if (y < top) {
|
|
368
|
+
y = top + 5;
|
|
369
|
+
}
|
|
370
|
+
if (x + labelWidth > right) {
|
|
371
|
+
x = right - labelWidth - 5;
|
|
372
|
+
}
|
|
373
|
+
if (y + labelHeight > bottom) {
|
|
374
|
+
y = bottom - labelHeight - 5;
|
|
375
|
+
}
|
|
389
376
|
return { x, y };
|
|
390
377
|
},
|
|
391
|
-
formatter() {
|
|
378
|
+
formatter: function() {
|
|
392
379
|
if (customTooltipFormatter) {
|
|
393
|
-
return customTooltipFormatter(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
380
|
+
return customTooltipFormatter(this);
|
|
381
|
+
} else if (this.point.value !== void 0) {
|
|
382
|
+
return `
|
|
383
|
+
<span class="tooltip-key">X: ${this.point.x} Y: ${this.point.y}</span><br/>
|
|
384
|
+
<b class="tooltip-value">Value: ${this.point.value}</b>`;
|
|
385
|
+
} else {
|
|
386
|
+
return `
|
|
387
|
+
<span style="color:${this.color};"">●</span>
|
|
388
|
+
<span class="tooltip-key">${this.key}: </span>
|
|
389
|
+
<b class="tooltip-value">${this.y.toLocaleString()}</b>
|
|
390
|
+
`;
|
|
401
391
|
}
|
|
402
|
-
const key = this.key ?? "";
|
|
403
|
-
const y = this.y;
|
|
404
|
-
const color = this.color ?? "";
|
|
405
|
-
return `<span style="color:${color}">●</span><span class="tooltip-key">${key}: </span><b class="tooltip-value">${typeof y === "number" ? y.toLocaleString() : y}</b>`;
|
|
406
392
|
},
|
|
407
393
|
...tooltipOptions || {}
|
|
408
394
|
},
|
|
@@ -424,9 +410,10 @@ function Chart({
|
|
|
424
410
|
heatmap: { borderWidth: 1, borderColor: "#ffffff" },
|
|
425
411
|
series: {
|
|
426
412
|
states: { hover: { backgroundColor: null } },
|
|
427
|
-
...plotOptionsEvents
|
|
413
|
+
...plotOptionsEvents
|
|
428
414
|
},
|
|
429
415
|
pie: {
|
|
416
|
+
// Semi-donut chart customization
|
|
430
417
|
startAngle: graphType === "semidonut" ? -90 : 0,
|
|
431
418
|
endAngle: graphType === "semidonut" ? 90 : 360,
|
|
432
419
|
center: ["50%", graphType === "semidonut" ? "75%" : "50%"],
|
|
@@ -460,8 +447,8 @@ function Chart({
|
|
|
460
447
|
itemDistance: 24,
|
|
461
448
|
symbolPadding: 6,
|
|
462
449
|
margin: 40,
|
|
463
|
-
x: legendXPosition
|
|
464
|
-
y: legendYPosition
|
|
450
|
+
x: legendXPosition,
|
|
451
|
+
y: legendYPosition,
|
|
465
452
|
itemStyle: {
|
|
466
453
|
color: "#60697D",
|
|
467
454
|
fontFamily: "Manrope, sans-serif",
|
|
@@ -470,12 +457,22 @@ function Chart({
|
|
|
470
457
|
lineHeight: "16px",
|
|
471
458
|
padding: "20px"
|
|
472
459
|
},
|
|
473
|
-
itemHoverStyle: {
|
|
474
|
-
|
|
460
|
+
itemHoverStyle: {
|
|
461
|
+
color: "#0d152c"
|
|
462
|
+
},
|
|
463
|
+
navigation: {
|
|
464
|
+
activeColor: "#3E576F",
|
|
465
|
+
animation: true,
|
|
466
|
+
arrowSize: 12
|
|
467
|
+
},
|
|
475
468
|
...legendOptions || {}
|
|
476
469
|
},
|
|
477
|
-
series: seriesOptions ?? seriesData
|
|
478
|
-
colorAxis: graphType === "heatmap" || graphType === "bubble" || graphType === "packedbubble" || graphType === "treemap" ? {
|
|
470
|
+
series: seriesOptions ?? seriesData,
|
|
471
|
+
colorAxis: graphType === "heatmap" || graphType === "bubble" || graphType === "packedbubble" || graphType === "treemap" ? {
|
|
472
|
+
minColor: "#ffffff",
|
|
473
|
+
maxColor: "#658EC4",
|
|
474
|
+
...colorAxisOptions || {}
|
|
475
|
+
} : colorAxisOptions && Object.keys(colorAxisOptions).length ? colorAxisOptions : void 0,
|
|
479
476
|
...additionalOptions || {}
|
|
480
477
|
}),
|
|
481
478
|
[
|
|
@@ -504,54 +501,28 @@ function Chart({
|
|
|
504
501
|
legendOptions,
|
|
505
502
|
colorAxisOptions,
|
|
506
503
|
seriesOptions,
|
|
507
|
-
additionalOptions
|
|
508
|
-
chartMarginBottom,
|
|
509
|
-
chartOptions,
|
|
510
|
-
showSubTitle,
|
|
511
|
-
subtitleText,
|
|
512
|
-
legendXPosition,
|
|
513
|
-
legendYPosition,
|
|
514
|
-
xAxisTitlePositionY,
|
|
515
|
-
customTooltipFormatter,
|
|
516
|
-
sharedTooltip,
|
|
517
|
-
plotOptionsEvents,
|
|
518
|
-
subtitleOptions,
|
|
519
|
-
exportingOptions
|
|
504
|
+
additionalOptions
|
|
520
505
|
]
|
|
521
506
|
);
|
|
522
|
-
|
|
523
|
-
() => chartTypesToMenuOptions(chartTypesOptions),
|
|
524
|
-
[chartTypesOptions]
|
|
525
|
-
);
|
|
526
|
-
if (!showchart) {
|
|
527
|
-
return /* @__PURE__ */ jsx(Fragment, { children: fallbackContent });
|
|
528
|
-
}
|
|
529
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
507
|
+
return /* @__PURE__ */ jsx(Fragment, { children: showchart ? /* @__PURE__ */ jsxs(
|
|
530
508
|
"div",
|
|
531
509
|
{
|
|
532
510
|
ref: containerRef,
|
|
533
|
-
"
|
|
534
|
-
|
|
535
|
-
"data-testid": dataTestId,
|
|
536
|
-
id,
|
|
537
|
-
role,
|
|
538
|
-
style: width ? { width } : void 0,
|
|
511
|
+
className: `chart-container ${isExpanded ? "expanded" : ""} ${isAnimating ? "animating" : ""} ${cardContainer ? "card-container" : ""} ${aboveChartComponent ? "above-chart-component" : ""}`,
|
|
512
|
+
style: width ? { width } : {},
|
|
539
513
|
children: [
|
|
540
514
|
showHeader && /* @__PURE__ */ jsxs("div", { className: "chart-container-header", children: [
|
|
541
515
|
/* @__PURE__ */ jsxs("div", { className: "chart-container-header-title", children: [
|
|
542
516
|
/* @__PURE__ */ jsx("span", { className: "chart-container-header-title-text", children: graphTitle }),
|
|
543
|
-
!!topLeftOptions && topLeftOptions !== null && /* @__PURE__ */
|
|
544
|
-
|
|
545
|
-
topLeftOptions
|
|
546
|
-
] })
|
|
517
|
+
!!topLeftOptions && topLeftOptions !== null && /* @__PURE__ */ jsx("div", { className: "divider-line" }),
|
|
518
|
+
topLeftOptions && topLeftOptions
|
|
547
519
|
] }),
|
|
548
520
|
/* @__PURE__ */ jsxs("div", { className: "chart-container-header-actions", children: [
|
|
549
|
-
topRightOptions
|
|
521
|
+
topRightOptions && /* @__PURE__ */ jsx("div", { className: "chart-custom-actions", children: React__default.isValidElement(topRightOptions) ? topRightOptions : null }),
|
|
550
522
|
!!topRightOptions && topRightOptions !== null && /* @__PURE__ */ jsx("div", { className: "divider-line" }),
|
|
551
523
|
showSwitchButton && !isExpanded && /* @__PURE__ */ jsx(Tooltip, { title: "Switch to Table", variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
552
524
|
Button,
|
|
553
525
|
{
|
|
554
|
-
"aria-label": "Switch to table view",
|
|
555
526
|
icon: /* @__PURE__ */ jsx(default_1, {}),
|
|
556
527
|
variant: "text",
|
|
557
528
|
onClick: () => {
|
|
@@ -562,37 +533,34 @@ function Chart({
|
|
|
562
533
|
showChartTypeDropdown && /* @__PURE__ */ jsx(Tooltip, { title: "Change chart type", variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
563
534
|
Button,
|
|
564
535
|
{
|
|
565
|
-
|
|
566
|
-
icon: /* @__PURE__ */ jsx("img", { "aria-hidden": true, alt: "", src: ChartDropdownUrl }),
|
|
536
|
+
icon: /* @__PURE__ */ jsx(ChartDropdown, {}),
|
|
567
537
|
variant: "text",
|
|
568
|
-
onClick: (
|
|
538
|
+
onClick: (event) => {
|
|
569
539
|
setShowChartList((prev) => !prev);
|
|
570
|
-
setSelectMenuAnchor(
|
|
540
|
+
setSelectMenuAnchor(event.currentTarget);
|
|
571
541
|
}
|
|
572
542
|
}
|
|
573
543
|
) }),
|
|
574
544
|
showDownloadButton && /* @__PURE__ */ jsx(Tooltip, { title: "Download", variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
575
545
|
Button,
|
|
576
546
|
{
|
|
577
|
-
"aria-label": "Download chart",
|
|
578
547
|
icon: /* @__PURE__ */ jsx(default_1$1, {}),
|
|
579
548
|
variant: "text",
|
|
580
|
-
onClick: (
|
|
549
|
+
onClick: (event) => {
|
|
581
550
|
if (showDownloadMenu) {
|
|
582
551
|
setShowDownloadList((prev) => !prev);
|
|
583
|
-
setDownloadMenuAnchor(
|
|
552
|
+
setDownloadMenuAnchor(event.currentTarget);
|
|
584
553
|
} else {
|
|
585
|
-
onChartDownload(
|
|
554
|
+
onChartDownload(event);
|
|
586
555
|
}
|
|
587
556
|
}
|
|
588
557
|
}
|
|
589
558
|
) }),
|
|
590
|
-
customSystemButton,
|
|
559
|
+
customSystemButton && customSystemButton,
|
|
591
560
|
showExpandButton && /* @__PURE__ */ jsx(Tooltip, { title: "Expand", variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
592
561
|
Button,
|
|
593
562
|
{
|
|
594
|
-
|
|
595
|
-
icon: isExpanded ? /* @__PURE__ */ jsx("img", { "aria-hidden": true, alt: "", src: CollapseIconUrl }) : /* @__PURE__ */ jsx("img", { "aria-hidden": true, alt: "", src: ExpandIconUrl }),
|
|
563
|
+
icon: isExpanded ? /* @__PURE__ */ jsx(Collapse, {}) : /* @__PURE__ */ jsx(ExpandIcon, {}),
|
|
596
564
|
variant: "text",
|
|
597
565
|
onClick: () => {
|
|
598
566
|
if (isExpanded) exitFullscreen();
|
|
@@ -602,6 +570,7 @@ function Chart({
|
|
|
602
570
|
) })
|
|
603
571
|
] })
|
|
604
572
|
] }),
|
|
573
|
+
aboveChartComponent && aboveChartComponent,
|
|
605
574
|
/* @__PURE__ */ jsx(
|
|
606
575
|
Menu,
|
|
607
576
|
{
|
|
@@ -612,12 +581,12 @@ function Chart({
|
|
|
612
581
|
anchorOrigin: { vertical: "bottom", horizontal: "right" }
|
|
613
582
|
},
|
|
614
583
|
open: showChartList,
|
|
615
|
-
options:
|
|
616
|
-
selected:
|
|
584
|
+
options: chartTypesOptions,
|
|
585
|
+
selected: selectedChart,
|
|
617
586
|
onClose: () => {
|
|
618
587
|
setShowChartList(false);
|
|
619
588
|
},
|
|
620
|
-
...chartMenuProps
|
|
589
|
+
...chartMenuProps
|
|
621
590
|
}
|
|
622
591
|
),
|
|
623
592
|
showDownloadMenu && /* @__PURE__ */ jsx(
|
|
@@ -632,20 +601,15 @@ function Chart({
|
|
|
632
601
|
open: showDownloadList,
|
|
633
602
|
options: [
|
|
634
603
|
...showBuiltInDownloadOptions ? getBuiltInDownloadOptions() : [],
|
|
635
|
-
...downloadMenuOptions
|
|
636
|
-
label: opt.label,
|
|
637
|
-
value: opt.value,
|
|
638
|
-
onClick: opt.onClick
|
|
639
|
-
}))
|
|
604
|
+
...downloadMenuOptions
|
|
640
605
|
],
|
|
641
606
|
onClose: () => {
|
|
642
607
|
setShowDownloadList(false);
|
|
643
608
|
}
|
|
644
609
|
}
|
|
645
610
|
),
|
|
646
|
-
aboveChartComponent && aboveChartComponent,
|
|
647
611
|
isEmpty ? /* @__PURE__ */ jsxs("div", { className: "chart-empty-state", children: [
|
|
648
|
-
/* @__PURE__ */ jsx(
|
|
612
|
+
/* @__PURE__ */ jsx(EmptyStateImage, {}),
|
|
649
613
|
/* @__PURE__ */ jsx("span", { children: "No data to display" })
|
|
650
614
|
] }) : /* @__PURE__ */ jsx(
|
|
651
615
|
HighchartsReact,
|
|
@@ -656,19 +620,22 @@ function Chart({
|
|
|
656
620
|
},
|
|
657
621
|
safeStringify(graphData, "graph") + isExpanded
|
|
658
622
|
),
|
|
659
|
-
customLegend
|
|
623
|
+
customLegend && /* @__PURE__ */ jsx(
|
|
660
624
|
"div",
|
|
661
625
|
{
|
|
662
626
|
className: "chart-custom-legend",
|
|
663
|
-
style: {
|
|
627
|
+
style: {
|
|
628
|
+
marginBottom: 12,
|
|
629
|
+
marginTop: -32,
|
|
630
|
+
...customLegendStyle || {}
|
|
631
|
+
},
|
|
664
632
|
children: React__default.isValidElement(customLegend) ? customLegend : typeof customLegend === "function" ? customLegend((_a = chartComponentRef.current) == null ? void 0 : _a.chart) : null
|
|
665
633
|
}
|
|
666
634
|
)
|
|
667
635
|
]
|
|
668
636
|
}
|
|
669
|
-
) });
|
|
670
|
-
}
|
|
671
|
-
Chart.displayName = "Chart";
|
|
637
|
+
) : fallbackContent });
|
|
638
|
+
};
|
|
672
639
|
export {
|
|
673
640
|
Chart
|
|
674
641
|
};
|