@bpfdev/oly-ui 1.0.7 → 1.0.8
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.d.mts +76 -5
- package/dist/index.d.ts +76 -5
- package/dist/index.js +1269 -812
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1377 -922
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,6 +58,8 @@ __export(index_exports, {
|
|
|
58
58
|
FalconPagination: () => FalconPagination,
|
|
59
59
|
FalconSelect: () => FalconSelect,
|
|
60
60
|
FalconSingleSwitch: () => FalconSingleSwitch,
|
|
61
|
+
FalconStatBanner: () => FalconStatBanner,
|
|
62
|
+
FalconStatBannerGroup: () => FalconStatBannerGroup,
|
|
61
63
|
FalconTable: () => FalconTable,
|
|
62
64
|
FalconThemeProvider: () => FalconThemeProvider,
|
|
63
65
|
FalconTicketColumsFilter: () => FalconTicketColumsFilter,
|
|
@@ -5689,17 +5691,150 @@ var FalconDIstrictFilter = ({
|
|
|
5689
5691
|
}
|
|
5690
5692
|
);
|
|
5691
5693
|
|
|
5692
|
-
// src/components/
|
|
5694
|
+
// src/components/FalconStatBanner/FalconStatBanner.tsx
|
|
5693
5695
|
var import_material10 = require("@mui/material");
|
|
5696
|
+
var import_react16 = require("@iconify/react");
|
|
5694
5697
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5698
|
+
var TREND_UP_COLOR = "#6D9F92";
|
|
5699
|
+
var TREND_DOWN_COLOR = "#ED1C24";
|
|
5700
|
+
var formatValue2 = (value) => typeof value === "number" ? value.toLocaleString() : value;
|
|
5701
|
+
var FalconStatBanner = ({
|
|
5702
|
+
label,
|
|
5703
|
+
value,
|
|
5704
|
+
color = "#1BA9B5",
|
|
5705
|
+
textColor = "#fff",
|
|
5706
|
+
width = "100%",
|
|
5707
|
+
height,
|
|
5708
|
+
fontSize = "1rem",
|
|
5709
|
+
fontWeight = 600,
|
|
5710
|
+
trend,
|
|
5711
|
+
trendPlacement = "inline",
|
|
5712
|
+
sx,
|
|
5713
|
+
className
|
|
5714
|
+
}) => {
|
|
5715
|
+
const accentColor = trend?.direction === "up" ? TREND_UP_COLOR : TREND_DOWN_COLOR;
|
|
5716
|
+
const badgeBg = trend?.badgeBg ?? "#fff";
|
|
5717
|
+
const badgeColor = trend?.badgeColor ?? accentColor;
|
|
5718
|
+
const badgeIconBg = trend?.badgeIconBg ?? accentColor;
|
|
5719
|
+
const badgeIconColor = trend?.badgeIconColor ?? "#fff";
|
|
5720
|
+
const showTrend = Boolean(trend?.label);
|
|
5721
|
+
const isEnd = showTrend && trendPlacement === "end";
|
|
5722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
5723
|
+
import_material10.Box,
|
|
5724
|
+
{
|
|
5725
|
+
className,
|
|
5726
|
+
sx: {
|
|
5727
|
+
width,
|
|
5728
|
+
bgcolor: color,
|
|
5729
|
+
borderRadius: "50px",
|
|
5730
|
+
px: 4,
|
|
5731
|
+
display: "flex",
|
|
5732
|
+
alignItems: "center",
|
|
5733
|
+
justifyContent: isEnd ? "space-between" : "center",
|
|
5734
|
+
gap: showTrend ? 2 : 0,
|
|
5735
|
+
...height ? { height } : { py: 1.5 },
|
|
5736
|
+
...sx
|
|
5737
|
+
},
|
|
5738
|
+
children: [
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
5740
|
+
import_material10.Typography,
|
|
5741
|
+
{
|
|
5742
|
+
variant: "body1",
|
|
5743
|
+
sx: { color: textColor, fontSize, lineHeight: 1.4 },
|
|
5744
|
+
children: [
|
|
5745
|
+
label,
|
|
5746
|
+
":",
|
|
5747
|
+
" ",
|
|
5748
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material10.Box, { component: "span", sx: { fontWeight }, children: formatValue2(value) })
|
|
5749
|
+
]
|
|
5750
|
+
}
|
|
5751
|
+
),
|
|
5752
|
+
showTrend && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
5753
|
+
import_material10.Box,
|
|
5754
|
+
{
|
|
5755
|
+
sx: {
|
|
5756
|
+
display: "flex",
|
|
5757
|
+
alignItems: "center",
|
|
5758
|
+
gap: 1,
|
|
5759
|
+
bgcolor: badgeBg,
|
|
5760
|
+
borderRadius: "50px",
|
|
5761
|
+
px: 2,
|
|
5762
|
+
py: 0.75,
|
|
5763
|
+
flexShrink: 0
|
|
5764
|
+
},
|
|
5765
|
+
children: [
|
|
5766
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
5767
|
+
import_material10.Typography,
|
|
5768
|
+
{
|
|
5769
|
+
variant: "body2",
|
|
5770
|
+
sx: {
|
|
5771
|
+
color: badgeColor,
|
|
5772
|
+
fontSize: "0.8rem",
|
|
5773
|
+
fontWeight: 600,
|
|
5774
|
+
lineHeight: 1
|
|
5775
|
+
},
|
|
5776
|
+
children: trend.label
|
|
5777
|
+
}
|
|
5778
|
+
),
|
|
5779
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
5780
|
+
import_material10.Box,
|
|
5781
|
+
{
|
|
5782
|
+
sx: {
|
|
5783
|
+
width: 18,
|
|
5784
|
+
height: 18,
|
|
5785
|
+
borderRadius: "50%",
|
|
5786
|
+
bgcolor: badgeIconBg,
|
|
5787
|
+
display: "flex",
|
|
5788
|
+
alignItems: "center",
|
|
5789
|
+
justifyContent: "center",
|
|
5790
|
+
flexShrink: 0
|
|
5791
|
+
},
|
|
5792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
5793
|
+
import_react16.Icon,
|
|
5794
|
+
{
|
|
5795
|
+
icon: trend.direction === "up" ? "mdi:arrow-up" : "mdi:arrow-down",
|
|
5796
|
+
color: badgeIconColor,
|
|
5797
|
+
width: 11,
|
|
5798
|
+
height: 11
|
|
5799
|
+
}
|
|
5800
|
+
)
|
|
5801
|
+
}
|
|
5802
|
+
)
|
|
5803
|
+
]
|
|
5804
|
+
}
|
|
5805
|
+
)
|
|
5806
|
+
]
|
|
5807
|
+
}
|
|
5808
|
+
);
|
|
5809
|
+
};
|
|
5810
|
+
|
|
5811
|
+
// src/components/FalconStatBanner/FalconStatBannerGroup.tsx
|
|
5812
|
+
var import_material11 = require("@mui/material");
|
|
5813
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
5814
|
+
var FalconStatBannerGroup = ({
|
|
5815
|
+
banners,
|
|
5816
|
+
spacing = 2,
|
|
5817
|
+
sx
|
|
5818
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material11.Stack, { direction: "row", spacing, sx: { width: "100%", ...sx }, children: banners.map(({ width, ...bannerProps }, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5819
|
+
import_material11.Box,
|
|
5820
|
+
{
|
|
5821
|
+
sx: width ? { width, flexShrink: 0 } : { flex: 1, minWidth: 0 },
|
|
5822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FalconStatBanner, { width: "100%", ...bannerProps })
|
|
5823
|
+
},
|
|
5824
|
+
index
|
|
5825
|
+
)) });
|
|
5826
|
+
|
|
5827
|
+
// src/components/FalconGrayButton/FalconGrayButton.tsx
|
|
5828
|
+
var import_material12 = require("@mui/material");
|
|
5829
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
5695
5830
|
var FalconGrayButton = ({
|
|
5696
5831
|
text,
|
|
5697
|
-
Icon:
|
|
5832
|
+
Icon: Icon13,
|
|
5698
5833
|
onClick
|
|
5699
5834
|
}) => {
|
|
5700
|
-
const theme = (0,
|
|
5701
|
-
return /* @__PURE__ */ (0,
|
|
5702
|
-
|
|
5835
|
+
const theme = (0, import_material12.useTheme)();
|
|
5836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5837
|
+
import_material12.Box,
|
|
5703
5838
|
{
|
|
5704
5839
|
sx: {
|
|
5705
5840
|
cursor: onClick ? "pointer" : "default",
|
|
@@ -5709,17 +5844,17 @@ var FalconGrayButton = ({
|
|
|
5709
5844
|
},
|
|
5710
5845
|
onClick,
|
|
5711
5846
|
role: onClick ? "button" : void 0,
|
|
5712
|
-
children: /* @__PURE__ */ (0,
|
|
5713
|
-
|
|
5714
|
-
/* @__PURE__ */ (0,
|
|
5847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_material12.Stack, { direction: "row", justifyContent: "center", gap: 4, alignItems: "center", children: [
|
|
5848
|
+
Icon13,
|
|
5849
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material12.Typography, { fontSize: 12, align: "center", fontWeight: "bold", children: text })
|
|
5715
5850
|
] })
|
|
5716
5851
|
}
|
|
5717
5852
|
);
|
|
5718
5853
|
};
|
|
5719
5854
|
|
|
5720
5855
|
// src/components/FalconPagination/FalconPagination.tsx
|
|
5721
|
-
var
|
|
5722
|
-
var
|
|
5856
|
+
var import_material13 = require("@mui/material");
|
|
5857
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5723
5858
|
var selectStyle = {
|
|
5724
5859
|
border: "none",
|
|
5725
5860
|
backgroundColor: "transparent",
|
|
@@ -5747,8 +5882,8 @@ var FalconPagination = ({
|
|
|
5747
5882
|
perPageOptions = [12, 24, 36]
|
|
5748
5883
|
}) => {
|
|
5749
5884
|
const totalPage = Math.ceil(totalItems / perPage) || 1;
|
|
5750
|
-
return /* @__PURE__ */ (0,
|
|
5751
|
-
|
|
5885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5886
|
+
import_material13.Stack,
|
|
5752
5887
|
{
|
|
5753
5888
|
spacing: 2,
|
|
5754
5889
|
alignItems: "center",
|
|
@@ -5756,18 +5891,18 @@ var FalconPagination = ({
|
|
|
5756
5891
|
width: "100%",
|
|
5757
5892
|
bgcolor: "#F0F0F0",
|
|
5758
5893
|
children: [
|
|
5759
|
-
/* @__PURE__ */ (0,
|
|
5894
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5760
5895
|
"select",
|
|
5761
5896
|
{
|
|
5762
5897
|
style: selectStyle,
|
|
5763
5898
|
value: perPage,
|
|
5764
5899
|
onChange: (e) => setPerPage(Number(e.target.value)),
|
|
5765
5900
|
"aria-label": "Items per page",
|
|
5766
|
-
children: perPageOptions.map((n) => /* @__PURE__ */ (0,
|
|
5901
|
+
children: perPageOptions.map((n) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { style: optionStyle, value: n, children: n }, n))
|
|
5767
5902
|
}
|
|
5768
5903
|
) }),
|
|
5769
|
-
/* @__PURE__ */ (0,
|
|
5770
|
-
/* @__PURE__ */ (0,
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Divider, { orientation: "vertical", flexItem: true }),
|
|
5905
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Box, { sx: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_material13.Box, { sx: { color: "#525252", fontFamily: "roboto" }, children: [
|
|
5771
5906
|
perPage * (pageNo - 1) + 1,
|
|
5772
5907
|
" - ",
|
|
5773
5908
|
Math.min(perPage * pageNo, totalItems),
|
|
@@ -5776,27 +5911,27 @@ var FalconPagination = ({
|
|
|
5776
5911
|
totalItems,
|
|
5777
5912
|
" items"
|
|
5778
5913
|
] }) }),
|
|
5779
|
-
/* @__PURE__ */ (0,
|
|
5780
|
-
/* @__PURE__ */ (0,
|
|
5781
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Divider, { orientation: "vertical", flexItem: true }),
|
|
5915
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_material13.Stack, { alignItems: "center", direction: "row", gap: 1, children: [
|
|
5916
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5782
5917
|
"select",
|
|
5783
5918
|
{
|
|
5784
5919
|
style: selectStyle,
|
|
5785
5920
|
value: pageNo,
|
|
5786
5921
|
onChange: (e) => setPageNo(Number(e.target.value)),
|
|
5787
5922
|
"aria-label": "Page number",
|
|
5788
|
-
children: Array.from({ length: totalPage }, (_, i) => /* @__PURE__ */ (0,
|
|
5923
|
+
children: Array.from({ length: totalPage }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { style: optionStyle, value: i + 1, children: i + 1 }, i))
|
|
5789
5924
|
}
|
|
5790
5925
|
) }),
|
|
5791
|
-
/* @__PURE__ */ (0,
|
|
5926
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_material13.Box, { sx: { color: "#525252", fontFamily: "roboto" }, children: [
|
|
5792
5927
|
"of ",
|
|
5793
5928
|
totalPage,
|
|
5794
5929
|
" pages"
|
|
5795
5930
|
] })
|
|
5796
5931
|
] }),
|
|
5797
|
-
/* @__PURE__ */ (0,
|
|
5798
|
-
/* @__PURE__ */ (0,
|
|
5799
|
-
/* @__PURE__ */ (0,
|
|
5932
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material13.Divider, { orientation: "vertical", flexItem: true }),
|
|
5933
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_material13.Stack, { direction: "row", gap: 1, children: [
|
|
5934
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5800
5935
|
"button",
|
|
5801
5936
|
{
|
|
5802
5937
|
type: "button",
|
|
@@ -5804,7 +5939,7 @@ var FalconPagination = ({
|
|
|
5804
5939
|
onClick: () => setPageNo(pageNo - 1),
|
|
5805
5940
|
style: btnStyle,
|
|
5806
5941
|
"aria-label": "Previous page",
|
|
5807
|
-
children: /* @__PURE__ */ (0,
|
|
5942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5808
5943
|
"svg",
|
|
5809
5944
|
{
|
|
5810
5945
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5812,12 +5947,12 @@ var FalconPagination = ({
|
|
|
5812
5947
|
height: "16",
|
|
5813
5948
|
viewBox: "0 0 16 16",
|
|
5814
5949
|
fill: "none",
|
|
5815
|
-
children: /* @__PURE__ */ (0,
|
|
5950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M10 12L5 8L10 4V12Z", fill: "#161616" })
|
|
5816
5951
|
}
|
|
5817
5952
|
)
|
|
5818
5953
|
}
|
|
5819
5954
|
),
|
|
5820
|
-
/* @__PURE__ */ (0,
|
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5821
5956
|
"button",
|
|
5822
5957
|
{
|
|
5823
5958
|
type: "button",
|
|
@@ -5825,7 +5960,7 @@ var FalconPagination = ({
|
|
|
5825
5960
|
onClick: () => setPageNo(pageNo + 1),
|
|
5826
5961
|
style: btnStyle,
|
|
5827
5962
|
"aria-label": "Next page",
|
|
5828
|
-
children: /* @__PURE__ */ (0,
|
|
5963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5829
5964
|
"svg",
|
|
5830
5965
|
{
|
|
5831
5966
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5833,7 +5968,7 @@ var FalconPagination = ({
|
|
|
5833
5968
|
height: "16",
|
|
5834
5969
|
viewBox: "0 0 16 16",
|
|
5835
5970
|
fill: "none",
|
|
5836
|
-
children: /* @__PURE__ */ (0,
|
|
5971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M6 4L11 8L6 12V4Z", fill: "#161616" })
|
|
5837
5972
|
}
|
|
5838
5973
|
)
|
|
5839
5974
|
}
|
|
@@ -5845,8 +5980,8 @@ var FalconPagination = ({
|
|
|
5845
5980
|
};
|
|
5846
5981
|
|
|
5847
5982
|
// src/components/FalconSelect/FalconSelect.tsx
|
|
5848
|
-
var
|
|
5849
|
-
var
|
|
5983
|
+
var import_material14 = require("@mui/material");
|
|
5984
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
5850
5985
|
function normalizeOptions(options) {
|
|
5851
5986
|
return options.map(
|
|
5852
5987
|
(opt) => typeof opt === "string" ? { value: opt.toLowerCase(), label: opt } : opt
|
|
@@ -5865,14 +6000,14 @@ var FalconSelect = ({
|
|
|
5865
6000
|
const v = event.target.value;
|
|
5866
6001
|
onChange(v !== "" ? v : "");
|
|
5867
6002
|
};
|
|
5868
|
-
return /* @__PURE__ */ (0,
|
|
5869
|
-
/* @__PURE__ */ (0,
|
|
6003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_material14.FormControl, { variant: "filled", fullWidth: true, color: "primary", children: [
|
|
6004
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_material14.InputLabel, { id: `falcon-select-${label}-label`, children: [
|
|
5870
6005
|
"Select ",
|
|
5871
6006
|
label,
|
|
5872
6007
|
" *"
|
|
5873
6008
|
] }),
|
|
5874
|
-
/* @__PURE__ */ (0,
|
|
5875
|
-
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6010
|
+
import_material14.Select,
|
|
5876
6011
|
{
|
|
5877
6012
|
disabled,
|
|
5878
6013
|
value: value?.toLowerCase() ?? "",
|
|
@@ -5881,8 +6016,8 @@ var FalconSelect = ({
|
|
|
5881
6016
|
labelId: `falcon-select-${label}-label`,
|
|
5882
6017
|
id: `falcon-select-${label}`,
|
|
5883
6018
|
children: [
|
|
5884
|
-
clearable && /* @__PURE__ */ (0,
|
|
5885
|
-
items.map((item, i) => /* @__PURE__ */ (0,
|
|
6019
|
+
clearable && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_material14.MenuItem, { value: "", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("em", { children: "--Clear--" }) }),
|
|
6020
|
+
items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_material14.MenuItem, { value: item.value, children: item.label }, i))
|
|
5886
6021
|
]
|
|
5887
6022
|
}
|
|
5888
6023
|
)
|
|
@@ -5893,7 +6028,7 @@ var FalconSelect = ({
|
|
|
5893
6028
|
var import_Stack6 = __toESM(require("@mui/material/Stack"));
|
|
5894
6029
|
var import_Switch = __toESM(require("@mui/material/Switch"));
|
|
5895
6030
|
var import_styles4 = require("@mui/material/styles");
|
|
5896
|
-
var
|
|
6031
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
5897
6032
|
var AntSwitch = (0, import_styles4.styled)(import_Switch.default)(() => ({
|
|
5898
6033
|
width: 28,
|
|
5899
6034
|
height: 16,
|
|
@@ -5934,7 +6069,7 @@ var FalconSingleSwitch = ({
|
|
|
5934
6069
|
setStatus?.(checked);
|
|
5935
6070
|
onChange?.(event, checked);
|
|
5936
6071
|
};
|
|
5937
|
-
return /* @__PURE__ */ (0,
|
|
6072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_Stack6.default, { direction: "row", margin: 2, spacing: 1, alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5938
6073
|
AntSwitch,
|
|
5939
6074
|
{
|
|
5940
6075
|
checked: value,
|
|
@@ -5947,29 +6082,29 @@ var FalconSingleSwitch = ({
|
|
|
5947
6082
|
};
|
|
5948
6083
|
|
|
5949
6084
|
// src/components/FalconTable/FalconTable.tsx
|
|
5950
|
-
var
|
|
6085
|
+
var import_material15 = require("@mui/material");
|
|
5951
6086
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
5952
|
-
var
|
|
5953
|
-
var
|
|
6087
|
+
var import_react17 = require("react");
|
|
6088
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5954
6089
|
var FalconTable = ({
|
|
5955
6090
|
rows,
|
|
5956
6091
|
getRowId,
|
|
5957
6092
|
columns,
|
|
5958
6093
|
pageSizeOptions = [7, 10, 25, 50]
|
|
5959
6094
|
}) => {
|
|
5960
|
-
const [paginationModel, setPaginationModel] = (0,
|
|
6095
|
+
const [paginationModel, setPaginationModel] = (0, import_react17.useState)({
|
|
5961
6096
|
page: 0,
|
|
5962
6097
|
pageSize: 7
|
|
5963
6098
|
});
|
|
5964
|
-
return /* @__PURE__ */ (0,
|
|
5965
|
-
|
|
6099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
6100
|
+
import_material15.Box,
|
|
5966
6101
|
{
|
|
5967
6102
|
sx: {
|
|
5968
6103
|
border: "2px solid #F2F2F2",
|
|
5969
6104
|
padding: "16px",
|
|
5970
6105
|
borderRadius: "12px"
|
|
5971
6106
|
},
|
|
5972
|
-
children: /* @__PURE__ */ (0,
|
|
6107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5973
6108
|
import_x_data_grid.DataGrid,
|
|
5974
6109
|
{
|
|
5975
6110
|
autoHeight: true,
|
|
@@ -5997,37 +6132,37 @@ var FalconTable = ({
|
|
|
5997
6132
|
};
|
|
5998
6133
|
|
|
5999
6134
|
// src/components/FalconTicketColumsFilter/FalconTicketColumsFilter.tsx
|
|
6000
|
-
var
|
|
6001
|
-
var
|
|
6135
|
+
var import_material16 = require("@mui/material");
|
|
6136
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
6002
6137
|
var FalconTicketColumsFilter = ({
|
|
6003
6138
|
columns = [],
|
|
6004
6139
|
selected = [],
|
|
6005
6140
|
onSelectionChange
|
|
6006
|
-
}) => /* @__PURE__ */ (0,
|
|
6007
|
-
/* @__PURE__ */ (0,
|
|
6008
|
-
columns.length === 0 ? /* @__PURE__ */ (0,
|
|
6141
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material16.Box, { sx: { p: 2, minWidth: 280 }, children: [
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material16.Typography, { variant: "subtitle2", gutterBottom: true, children: "Select columns" }),
|
|
6143
|
+
columns.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material16.Typography, { variant: "body2", color: "text.secondary", children: "No columns configured. Pass columns prop." }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_material16.Typography, { variant: "body2", children: [
|
|
6009
6144
|
selected.length,
|
|
6010
6145
|
" of ",
|
|
6011
6146
|
columns.length,
|
|
6012
6147
|
" selected"
|
|
6013
6148
|
] }),
|
|
6014
|
-
onSelectionChange && /* @__PURE__ */ (0,
|
|
6149
|
+
onSelectionChange && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material16.Typography, { variant: "caption", display: "block", sx: { mt: 1 }, children: "(Column checkboxes to be wired from app)" })
|
|
6015
6150
|
] });
|
|
6016
6151
|
|
|
6017
6152
|
// src/components/FalconTicketFilter/FalconTicketFilter.tsx
|
|
6018
|
-
var
|
|
6019
|
-
var
|
|
6020
|
-
var
|
|
6153
|
+
var import_material17 = require("@mui/material");
|
|
6154
|
+
var import_react18 = require("react");
|
|
6155
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
6021
6156
|
var FalconTicketFilter = ({
|
|
6022
6157
|
children,
|
|
6023
6158
|
label = "FILTERS",
|
|
6024
6159
|
open: controlledOpen,
|
|
6025
6160
|
onOpenChange
|
|
6026
6161
|
}) => {
|
|
6027
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
6162
|
+
const [internalOpen, setInternalOpen] = (0, import_react18.useState)(false);
|
|
6028
6163
|
const open = controlledOpen ?? internalOpen;
|
|
6029
6164
|
const setOpen = onOpenChange ?? setInternalOpen;
|
|
6030
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
6165
|
+
const [anchorEl, setAnchorEl] = (0, import_react18.useState)(null);
|
|
6031
6166
|
const handleClick = (event) => {
|
|
6032
6167
|
setAnchorEl(event.currentTarget);
|
|
6033
6168
|
setOpen(true);
|
|
@@ -6036,16 +6171,16 @@ var FalconTicketFilter = ({
|
|
|
6036
6171
|
setAnchorEl(null);
|
|
6037
6172
|
setOpen(false);
|
|
6038
6173
|
};
|
|
6039
|
-
return /* @__PURE__ */ (0,
|
|
6040
|
-
/* @__PURE__ */ (0,
|
|
6041
|
-
/* @__PURE__ */ (0,
|
|
6042
|
-
|
|
6174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
6175
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material17.Button, { onClick: handleClick, variant: "outlined", size: "medium", children: label }),
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
6177
|
+
import_material17.Popover,
|
|
6043
6178
|
{
|
|
6044
6179
|
open,
|
|
6045
6180
|
anchorEl,
|
|
6046
6181
|
onClose: handleClose,
|
|
6047
6182
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
6048
|
-
children: /* @__PURE__ */ (0,
|
|
6183
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { padding: 16, minWidth: 280 }, children })
|
|
6049
6184
|
}
|
|
6050
6185
|
)
|
|
6051
6186
|
] });
|
|
@@ -6076,13 +6211,13 @@ var QUEUE_TIME_BREAKDOWN_INFO_POPOVER = TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOW
|
|
|
6076
6211
|
var DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER = TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN;
|
|
6077
6212
|
|
|
6078
6213
|
// src/components/HeatMapChartLegend/HeatMapChartLegend.tsx
|
|
6079
|
-
var
|
|
6214
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
6080
6215
|
var HeatMapChartLegend = ({
|
|
6081
6216
|
title,
|
|
6082
6217
|
items,
|
|
6083
6218
|
gradientId,
|
|
6084
6219
|
gradientStops
|
|
6085
|
-
}) => /* @__PURE__ */ (0,
|
|
6220
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
6086
6221
|
"div",
|
|
6087
6222
|
{
|
|
6088
6223
|
style: {
|
|
@@ -6093,7 +6228,7 @@ var HeatMapChartLegend = ({
|
|
|
6093
6228
|
fontFamily: "sans-serif"
|
|
6094
6229
|
},
|
|
6095
6230
|
children: [
|
|
6096
|
-
/* @__PURE__ */ (0,
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6097
6232
|
"span",
|
|
6098
6233
|
{
|
|
6099
6234
|
style: {
|
|
@@ -6106,7 +6241,7 @@ var HeatMapChartLegend = ({
|
|
|
6106
6241
|
children: title
|
|
6107
6242
|
}
|
|
6108
6243
|
),
|
|
6109
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
6110
6245
|
"div",
|
|
6111
6246
|
{
|
|
6112
6247
|
style: {
|
|
@@ -6117,14 +6252,14 @@ var HeatMapChartLegend = ({
|
|
|
6117
6252
|
maxWidth: "600px"
|
|
6118
6253
|
},
|
|
6119
6254
|
children: [
|
|
6120
|
-
/* @__PURE__ */ (0,
|
|
6255
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
6121
6256
|
"svg",
|
|
6122
6257
|
{
|
|
6123
6258
|
width: "100%",
|
|
6124
6259
|
height: "32",
|
|
6125
6260
|
style: { filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1))" },
|
|
6126
6261
|
children: [
|
|
6127
|
-
/* @__PURE__ */ (0,
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6128
6263
|
"linearGradient",
|
|
6129
6264
|
{
|
|
6130
6265
|
id: gradientId,
|
|
@@ -6132,7 +6267,7 @@ var HeatMapChartLegend = ({
|
|
|
6132
6267
|
y1: "0%",
|
|
6133
6268
|
x2: "100%",
|
|
6134
6269
|
y2: "0%",
|
|
6135
|
-
children: gradientStops.map((stop, index) => /* @__PURE__ */ (0,
|
|
6270
|
+
children: gradientStops.map((stop, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6136
6271
|
"stop",
|
|
6137
6272
|
{
|
|
6138
6273
|
offset: stop.offset,
|
|
@@ -6143,7 +6278,7 @@ var HeatMapChartLegend = ({
|
|
|
6143
6278
|
))
|
|
6144
6279
|
}
|
|
6145
6280
|
) }),
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6281
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6147
6282
|
"rect",
|
|
6148
6283
|
{
|
|
6149
6284
|
width: "100%",
|
|
@@ -6154,7 +6289,7 @@ var HeatMapChartLegend = ({
|
|
|
6154
6289
|
]
|
|
6155
6290
|
}
|
|
6156
6291
|
),
|
|
6157
|
-
/* @__PURE__ */ (0,
|
|
6292
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6158
6293
|
"div",
|
|
6159
6294
|
{
|
|
6160
6295
|
style: {
|
|
@@ -6169,7 +6304,7 @@ var HeatMapChartLegend = ({
|
|
|
6169
6304
|
paddingLeft: "16px",
|
|
6170
6305
|
paddingRight: "16px"
|
|
6171
6306
|
},
|
|
6172
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
6307
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6173
6308
|
"span",
|
|
6174
6309
|
{
|
|
6175
6310
|
style: {
|
|
@@ -6193,11 +6328,11 @@ var HeatMapChartLegend = ({
|
|
|
6193
6328
|
);
|
|
6194
6329
|
|
|
6195
6330
|
// src/components/ProgressBarNumber/ProgressBarNumber.tsx
|
|
6196
|
-
var
|
|
6331
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
6197
6332
|
var FullProgress = ({
|
|
6198
6333
|
number,
|
|
6199
6334
|
numColor
|
|
6200
|
-
}) => /* @__PURE__ */ (0,
|
|
6335
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
6201
6336
|
"svg",
|
|
6202
6337
|
{
|
|
6203
6338
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6206,7 +6341,7 @@ var FullProgress = ({
|
|
|
6206
6341
|
viewBox: "0 0 56 56",
|
|
6207
6342
|
fill: "none",
|
|
6208
6343
|
children: [
|
|
6209
|
-
/* @__PURE__ */ (0,
|
|
6344
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6210
6345
|
"circle",
|
|
6211
6346
|
{
|
|
6212
6347
|
cx: 28,
|
|
@@ -6217,14 +6352,14 @@ var FullProgress = ({
|
|
|
6217
6352
|
strokeWidth: 4
|
|
6218
6353
|
}
|
|
6219
6354
|
),
|
|
6220
|
-
/* @__PURE__ */ (0,
|
|
6355
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("text", { x: 28, y: 36, fontSize: 24, textAnchor: "middle", fill: numColor, children: number })
|
|
6221
6356
|
]
|
|
6222
6357
|
}
|
|
6223
6358
|
);
|
|
6224
6359
|
var HalfProgress = ({
|
|
6225
6360
|
number,
|
|
6226
6361
|
numColor
|
|
6227
|
-
}) => /* @__PURE__ */ (0,
|
|
6362
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
6228
6363
|
"svg",
|
|
6229
6364
|
{
|
|
6230
6365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6233,7 +6368,7 @@ var HalfProgress = ({
|
|
|
6233
6368
|
viewBox: "0 0 56 56",
|
|
6234
6369
|
fill: "none",
|
|
6235
6370
|
children: [
|
|
6236
|
-
/* @__PURE__ */ (0,
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6237
6372
|
"circle",
|
|
6238
6373
|
{
|
|
6239
6374
|
cx: 28,
|
|
@@ -6246,14 +6381,14 @@ var HalfProgress = ({
|
|
|
6246
6381
|
strokeDashoffset: 130
|
|
6247
6382
|
}
|
|
6248
6383
|
),
|
|
6249
|
-
/* @__PURE__ */ (0,
|
|
6384
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("text", { x: 28, y: 36, fontSize: 24, textAnchor: "middle", fill: numColor, children: number })
|
|
6250
6385
|
]
|
|
6251
6386
|
}
|
|
6252
6387
|
);
|
|
6253
6388
|
var NoProgress = ({
|
|
6254
6389
|
number,
|
|
6255
6390
|
numColor
|
|
6256
|
-
}) => /* @__PURE__ */ (0,
|
|
6391
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
6257
6392
|
"svg",
|
|
6258
6393
|
{
|
|
6259
6394
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6262,7 +6397,7 @@ var NoProgress = ({
|
|
|
6262
6397
|
viewBox: "0 0 56 56",
|
|
6263
6398
|
fill: "none",
|
|
6264
6399
|
children: [
|
|
6265
|
-
/* @__PURE__ */ (0,
|
|
6400
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6266
6401
|
"circle",
|
|
6267
6402
|
{
|
|
6268
6403
|
cx: 28,
|
|
@@ -6274,7 +6409,7 @@ var NoProgress = ({
|
|
|
6274
6409
|
strokeWidth: "4"
|
|
6275
6410
|
}
|
|
6276
6411
|
),
|
|
6277
|
-
/* @__PURE__ */ (0,
|
|
6412
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("text", { x: 28, y: 36, fontSize: 24, textAnchor: "middle", fill: numColor, children: number })
|
|
6278
6413
|
]
|
|
6279
6414
|
}
|
|
6280
6415
|
);
|
|
@@ -6284,15 +6419,15 @@ var ProgressBarNumber = ({
|
|
|
6284
6419
|
numColor
|
|
6285
6420
|
}) => {
|
|
6286
6421
|
if (progress === 0) {
|
|
6287
|
-
return /* @__PURE__ */ (0,
|
|
6422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NoProgress, { number, numColor });
|
|
6288
6423
|
}
|
|
6289
6424
|
if (progress === 50) {
|
|
6290
|
-
return /* @__PURE__ */ (0,
|
|
6425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HalfProgress, { number, numColor });
|
|
6291
6426
|
}
|
|
6292
6427
|
if (progress === 100) {
|
|
6293
|
-
return /* @__PURE__ */ (0,
|
|
6428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FullProgress, { number, numColor });
|
|
6294
6429
|
}
|
|
6295
|
-
return /* @__PURE__ */ (0,
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: "Invalid Progress" });
|
|
6296
6431
|
};
|
|
6297
6432
|
|
|
6298
6433
|
// src/components/widgets/FootfallByAgeGroups/FootfallByAgeGroups.tsx
|
|
@@ -6324,7 +6459,7 @@ function resolveChartCardMaxWidth(cardMaxWidth) {
|
|
|
6324
6459
|
}
|
|
6325
6460
|
|
|
6326
6461
|
// src/components/widgets/FootfallByAgeGroups/FootfallByAgeGroups.tsx
|
|
6327
|
-
var
|
|
6462
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
6328
6463
|
var OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX = 430;
|
|
6329
6464
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME = {
|
|
6330
6465
|
cartesianGridStroke: "#D3D6DF",
|
|
@@ -6357,17 +6492,41 @@ function formatBarLabel(value) {
|
|
|
6357
6492
|
}
|
|
6358
6493
|
return String(value);
|
|
6359
6494
|
}
|
|
6495
|
+
function MultiLineTick({
|
|
6496
|
+
x = 0,
|
|
6497
|
+
y = 0,
|
|
6498
|
+
payload,
|
|
6499
|
+
angle = -38,
|
|
6500
|
+
textAnchor = "end",
|
|
6501
|
+
fontSize = 12
|
|
6502
|
+
}) {
|
|
6503
|
+
if (!payload?.value) return null;
|
|
6504
|
+
const lines = String(payload.value).split("\n");
|
|
6505
|
+
const lineHeight = fontSize * 1.3;
|
|
6506
|
+
const isHorizontal = angle === 0;
|
|
6507
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
6508
|
+
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
6509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6510
|
+
"text",
|
|
6511
|
+
{
|
|
6512
|
+
transform: `rotate(${angle})`,
|
|
6513
|
+
textAnchor: anchor,
|
|
6514
|
+
fontSize,
|
|
6515
|
+
fill: "#666",
|
|
6516
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
6517
|
+
}
|
|
6518
|
+
) });
|
|
6519
|
+
}
|
|
6360
6520
|
function FootfallAgeTooltip({
|
|
6361
6521
|
active,
|
|
6362
6522
|
payload,
|
|
6363
6523
|
label,
|
|
6364
|
-
isBarHovered,
|
|
6365
6524
|
series,
|
|
6366
6525
|
categoryLabel,
|
|
6367
6526
|
overallLabel,
|
|
6368
6527
|
tooltipStyles
|
|
6369
6528
|
}) {
|
|
6370
|
-
if (!active || !payload?.length ||
|
|
6529
|
+
if (!active || !payload?.length || label === void 0) {
|
|
6371
6530
|
return null;
|
|
6372
6531
|
}
|
|
6373
6532
|
const total = payload.reduce((sum, entry) => {
|
|
@@ -6382,7 +6541,7 @@ function FootfallAgeTooltip({
|
|
|
6382
6541
|
gap: 4,
|
|
6383
6542
|
marginBottom: "8px"
|
|
6384
6543
|
};
|
|
6385
|
-
return /* @__PURE__ */ (0,
|
|
6544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6386
6545
|
"div",
|
|
6387
6546
|
{
|
|
6388
6547
|
style: mergeCss2(
|
|
@@ -6397,7 +6556,7 @@ function FootfallAgeTooltip({
|
|
|
6397
6556
|
ts?.container
|
|
6398
6557
|
),
|
|
6399
6558
|
children: [
|
|
6400
|
-
/* @__PURE__ */ (0,
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6401
6560
|
"div",
|
|
6402
6561
|
{
|
|
6403
6562
|
style: mergeCss2(
|
|
@@ -6405,7 +6564,7 @@ function FootfallAgeTooltip({
|
|
|
6405
6564
|
ts?.sectionRow
|
|
6406
6565
|
),
|
|
6407
6566
|
children: [
|
|
6408
|
-
/* @__PURE__ */ (0,
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6409
6568
|
"div",
|
|
6410
6569
|
{
|
|
6411
6570
|
style: mergeCss2(
|
|
@@ -6423,7 +6582,7 @@ function FootfallAgeTooltip({
|
|
|
6423
6582
|
]
|
|
6424
6583
|
}
|
|
6425
6584
|
),
|
|
6426
|
-
/* @__PURE__ */ (0,
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6427
6586
|
"div",
|
|
6428
6587
|
{
|
|
6429
6588
|
style: mergeCss2(
|
|
@@ -6436,8 +6595,8 @@ function FootfallAgeTooltip({
|
|
|
6436
6595
|
]
|
|
6437
6596
|
}
|
|
6438
6597
|
),
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6440
|
-
/* @__PURE__ */ (0,
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: mergeCss2(sectionBase, ts?.sectionRow), children: [
|
|
6599
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6441
6600
|
"div",
|
|
6442
6601
|
{
|
|
6443
6602
|
style: mergeCss2(
|
|
@@ -6455,7 +6614,7 @@ function FootfallAgeTooltip({
|
|
|
6455
6614
|
]
|
|
6456
6615
|
}
|
|
6457
6616
|
),
|
|
6458
|
-
/* @__PURE__ */ (0,
|
|
6617
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6459
6618
|
"div",
|
|
6460
6619
|
{
|
|
6461
6620
|
style: mergeCss2(
|
|
@@ -6472,8 +6631,8 @@ function FootfallAgeTooltip({
|
|
|
6472
6631
|
);
|
|
6473
6632
|
const raw = entry?.value;
|
|
6474
6633
|
const value = typeof raw === "number" ? raw : Number(raw ?? 0);
|
|
6475
|
-
return /* @__PURE__ */ (0,
|
|
6476
|
-
/* @__PURE__ */ (0,
|
|
6634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: mergeCss2(sectionBase, ts?.sectionRow), children: [
|
|
6635
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6477
6636
|
"div",
|
|
6478
6637
|
{
|
|
6479
6638
|
style: mergeCss2(
|
|
@@ -6487,7 +6646,7 @@ function FootfallAgeTooltip({
|
|
|
6487
6646
|
)
|
|
6488
6647
|
}
|
|
6489
6648
|
),
|
|
6490
|
-
/* @__PURE__ */ (0,
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6491
6650
|
"div",
|
|
6492
6651
|
{
|
|
6493
6652
|
style: mergeCss2(
|
|
@@ -6505,7 +6664,7 @@ function FootfallAgeTooltip({
|
|
|
6505
6664
|
]
|
|
6506
6665
|
}
|
|
6507
6666
|
),
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6509
6668
|
"div",
|
|
6510
6669
|
{
|
|
6511
6670
|
style: mergeCss2(
|
|
@@ -6546,8 +6705,8 @@ function StackTotalLabel({
|
|
|
6546
6705
|
if (!row) return null;
|
|
6547
6706
|
const total = rowTotal(row, series);
|
|
6548
6707
|
const cx = nx + nw / 2;
|
|
6549
|
-
const cy = ny -
|
|
6550
|
-
return /* @__PURE__ */ (0,
|
|
6708
|
+
const cy = ny - 10;
|
|
6709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6551
6710
|
"text",
|
|
6552
6711
|
{
|
|
6553
6712
|
x: cx,
|
|
@@ -6598,16 +6757,14 @@ function FootfallByAgeGroups({
|
|
|
6598
6757
|
chartColors: chartColorsProp,
|
|
6599
6758
|
emptyStatePlaceholderProps,
|
|
6600
6759
|
dimmedStackOpacity = 0.35,
|
|
6601
|
-
barStackId = "footfall-by-age-groups"
|
|
6760
|
+
barStackId = "footfall-by-age-groups",
|
|
6761
|
+
xAxisTickAngle = 0
|
|
6602
6762
|
}) {
|
|
6603
6763
|
const [activeIndex, setActiveIndex] = React11.useState(null);
|
|
6604
|
-
const [barHovered, setBarHovered] = React11.useState(false);
|
|
6605
6764
|
const handleMouseEnter = React11.useCallback((_, index) => {
|
|
6606
|
-
setBarHovered(true);
|
|
6607
6765
|
setActiveIndex(index);
|
|
6608
6766
|
}, []);
|
|
6609
6767
|
const handleMouseLeave = React11.useCallback(() => {
|
|
6610
|
-
setBarHovered(false);
|
|
6611
6768
|
setActiveIndex(null);
|
|
6612
6769
|
}, []);
|
|
6613
6770
|
const processedData = React11.useMemo(
|
|
@@ -6688,7 +6845,7 @@ function FootfallByAgeGroups({
|
|
|
6688
6845
|
}),
|
|
6689
6846
|
[chartColorsProp]
|
|
6690
6847
|
);
|
|
6691
|
-
return /* @__PURE__ */ (0,
|
|
6848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6692
6849
|
import_Box9.default,
|
|
6693
6850
|
{
|
|
6694
6851
|
sx: sxChain(
|
|
@@ -6705,8 +6862,8 @@ function FootfallByAgeGroups({
|
|
|
6705
6862
|
},
|
|
6706
6863
|
cardSx
|
|
6707
6864
|
),
|
|
6708
|
-
children: /* @__PURE__ */ (0,
|
|
6709
|
-
/* @__PURE__ */ (0,
|
|
6865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_Stack7.default, { spacing: 2, sx: sxChain({ minWidth: 0 }, stackSx), children: [
|
|
6866
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6710
6867
|
import_Box9.default,
|
|
6711
6868
|
{
|
|
6712
6869
|
sx: sxChain(
|
|
@@ -6717,7 +6874,7 @@ function FootfallByAgeGroups({
|
|
|
6717
6874
|
titleRowSx
|
|
6718
6875
|
),
|
|
6719
6876
|
children: [
|
|
6720
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
6877
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6721
6878
|
import_Box9.default,
|
|
6722
6879
|
{
|
|
6723
6880
|
sx: {
|
|
@@ -6730,7 +6887,7 @@ function FootfallByAgeGroups({
|
|
|
6730
6887
|
children: headerActions
|
|
6731
6888
|
}
|
|
6732
6889
|
) : null,
|
|
6733
|
-
/* @__PURE__ */ (0,
|
|
6890
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6734
6891
|
import_Typography6.default,
|
|
6735
6892
|
{
|
|
6736
6893
|
component: "h2",
|
|
@@ -6751,8 +6908,8 @@ function FootfallByAgeGroups({
|
|
|
6751
6908
|
]
|
|
6752
6909
|
}
|
|
6753
6910
|
),
|
|
6754
|
-
/* @__PURE__ */ (0,
|
|
6755
|
-
showLegend && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ (0,
|
|
6911
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_Divider2.default, { sx: sxChain({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
6912
|
+
showLegend && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6756
6913
|
import_Box9.default,
|
|
6757
6914
|
{
|
|
6758
6915
|
sx: sxChain(
|
|
@@ -6768,14 +6925,14 @@ function FootfallByAgeGroups({
|
|
|
6768
6925
|
},
|
|
6769
6926
|
legendRowSx
|
|
6770
6927
|
),
|
|
6771
|
-
children: series.map((s) => /* @__PURE__ */ (0,
|
|
6928
|
+
children: series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6772
6929
|
import_Stack7.default,
|
|
6773
6930
|
{
|
|
6774
6931
|
direction: "row",
|
|
6775
6932
|
alignItems: "center",
|
|
6776
6933
|
sx: sxChain({ gap: 1 }, legendItemSx),
|
|
6777
6934
|
children: [
|
|
6778
|
-
/* @__PURE__ */ (0,
|
|
6935
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6779
6936
|
import_Box9.default,
|
|
6780
6937
|
{
|
|
6781
6938
|
sx: sxChain(
|
|
@@ -6790,7 +6947,7 @@ function FootfallByAgeGroups({
|
|
|
6790
6947
|
)
|
|
6791
6948
|
}
|
|
6792
6949
|
),
|
|
6793
|
-
/* @__PURE__ */ (0,
|
|
6950
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6794
6951
|
import_Typography6.default,
|
|
6795
6952
|
{
|
|
6796
6953
|
sx: sxChain(
|
|
@@ -6811,7 +6968,7 @@ function FootfallByAgeGroups({
|
|
|
6811
6968
|
))
|
|
6812
6969
|
}
|
|
6813
6970
|
) : null,
|
|
6814
|
-
/* @__PURE__ */ (0,
|
|
6971
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6815
6972
|
import_Box9.default,
|
|
6816
6973
|
{
|
|
6817
6974
|
ref: scrollRef,
|
|
@@ -6827,7 +6984,7 @@ function FootfallByAgeGroups({
|
|
|
6827
6984
|
},
|
|
6828
6985
|
chartScrollAreaSx
|
|
6829
6986
|
),
|
|
6830
|
-
children: hasMeaningfulData ? /* @__PURE__ */ (0,
|
|
6987
|
+
children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6831
6988
|
import_recharts.BarChart,
|
|
6832
6989
|
{
|
|
6833
6990
|
width: chartWidthPx,
|
|
@@ -6838,7 +6995,7 @@ function FootfallByAgeGroups({
|
|
|
6838
6995
|
onMouseLeave: handleMouseLeave,
|
|
6839
6996
|
style: { overflow: "visible" },
|
|
6840
6997
|
children: [
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
6998
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6842
6999
|
import_recharts.CartesianGrid,
|
|
6843
7000
|
{
|
|
6844
7001
|
strokeDasharray: "3 3",
|
|
@@ -6847,21 +7004,19 @@ function FootfallByAgeGroups({
|
|
|
6847
7004
|
stroke: chartColors.cartesianGridStroke
|
|
6848
7005
|
}
|
|
6849
7006
|
),
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
7007
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6851
7008
|
import_recharts.XAxis,
|
|
6852
7009
|
{
|
|
6853
7010
|
dataKey: "name",
|
|
6854
|
-
angle: -38,
|
|
6855
|
-
textAnchor: "end",
|
|
6856
7011
|
interval: 0,
|
|
6857
|
-
height:
|
|
6858
|
-
|
|
6859
|
-
tick: {
|
|
7012
|
+
height: 68,
|
|
7013
|
+
tickMargin: 10,
|
|
7014
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MultiLineTick, { angle: xAxisTickAngle }),
|
|
6860
7015
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
6861
7016
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
6862
7017
|
}
|
|
6863
7018
|
),
|
|
6864
|
-
/* @__PURE__ */ (0,
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6865
7020
|
import_recharts.YAxis,
|
|
6866
7021
|
{
|
|
6867
7022
|
tickSize: 8,
|
|
@@ -6870,10 +7025,12 @@ function FootfallByAgeGroups({
|
|
|
6870
7025
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
6871
7026
|
}
|
|
6872
7027
|
),
|
|
6873
|
-
/* @__PURE__ */ (0,
|
|
7028
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6874
7029
|
import_recharts.Tooltip,
|
|
6875
7030
|
{
|
|
6876
7031
|
cursor: false,
|
|
7032
|
+
allowEscapeViewBox: { x: true, y: true },
|
|
7033
|
+
wrapperStyle: { outline: "none", zIndex: 10 },
|
|
6877
7034
|
content: (tooltipProps) => {
|
|
6878
7035
|
if (renderTooltip) {
|
|
6879
7036
|
const customTooltip = renderTooltip({
|
|
@@ -6881,13 +7038,12 @@ function FootfallByAgeGroups({
|
|
|
6881
7038
|
rows: processedData,
|
|
6882
7039
|
series
|
|
6883
7040
|
});
|
|
6884
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
7041
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: customTooltip });
|
|
6885
7042
|
}
|
|
6886
|
-
return /* @__PURE__ */ (0,
|
|
7043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6887
7044
|
FootfallAgeTooltip,
|
|
6888
7045
|
{
|
|
6889
7046
|
...tooltipProps,
|
|
6890
|
-
isBarHovered: barHovered,
|
|
6891
7047
|
series,
|
|
6892
7048
|
categoryLabel: tooltipCategoryLabel,
|
|
6893
7049
|
overallLabel: tooltipOverallLabel,
|
|
@@ -6897,7 +7053,7 @@ function FootfallByAgeGroups({
|
|
|
6897
7053
|
}
|
|
6898
7054
|
}
|
|
6899
7055
|
),
|
|
6900
|
-
series.map((s, i) => /* @__PURE__ */ (0,
|
|
7056
|
+
series.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
6901
7057
|
import_recharts.Bar,
|
|
6902
7058
|
{
|
|
6903
7059
|
dataKey: s.dataKey,
|
|
@@ -6907,17 +7063,17 @@ function FootfallByAgeGroups({
|
|
|
6907
7063
|
onMouseEnter: handleMouseEnter,
|
|
6908
7064
|
onMouseLeave: handleMouseLeave,
|
|
6909
7065
|
children: [
|
|
6910
|
-
processedData.map((row, index) => /* @__PURE__ */ (0,
|
|
7066
|
+
processedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6911
7067
|
import_recharts.Cell,
|
|
6912
7068
|
{
|
|
6913
7069
|
fillOpacity: barOpacity(index)
|
|
6914
7070
|
},
|
|
6915
7071
|
`${s.dataKey}-${row.name}-${index}`
|
|
6916
7072
|
)),
|
|
6917
|
-
i === lastSeriesIndex ? /* @__PURE__ */ (0,
|
|
7073
|
+
i === lastSeriesIndex ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6918
7074
|
import_recharts.LabelList,
|
|
6919
7075
|
{
|
|
6920
|
-
content: (labelProps) => /* @__PURE__ */ (0,
|
|
7076
|
+
content: (labelProps) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6921
7077
|
StackTotalLabel,
|
|
6922
7078
|
{
|
|
6923
7079
|
...labelProps,
|
|
@@ -6934,7 +7090,7 @@ function FootfallByAgeGroups({
|
|
|
6934
7090
|
))
|
|
6935
7091
|
]
|
|
6936
7092
|
}
|
|
6937
|
-
) : /* @__PURE__ */ (0,
|
|
7093
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6938
7094
|
import_Box9.default,
|
|
6939
7095
|
{
|
|
6940
7096
|
sx: sxChain(
|
|
@@ -6946,7 +7102,7 @@ function FootfallByAgeGroups({
|
|
|
6946
7102
|
},
|
|
6947
7103
|
emptyStateSx
|
|
6948
7104
|
),
|
|
6949
|
-
children: /* @__PURE__ */ (0,
|
|
7105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6950
7106
|
ChartEmptyState,
|
|
6951
7107
|
{
|
|
6952
7108
|
minHeight: chartHeight,
|
|
@@ -6967,9 +7123,10 @@ var import_Box10 = __toESM(require("@mui/material/Box"));
|
|
|
6967
7123
|
var import_Divider3 = __toESM(require("@mui/material/Divider"));
|
|
6968
7124
|
var import_Stack8 = __toESM(require("@mui/material/Stack"));
|
|
6969
7125
|
var import_Typography7 = __toESM(require("@mui/material/Typography"));
|
|
7126
|
+
var import_react19 = require("@iconify/react");
|
|
6970
7127
|
var React12 = __toESM(require("react"));
|
|
6971
7128
|
var import_recharts2 = require("recharts");
|
|
6972
|
-
var
|
|
7129
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
6973
7130
|
var OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX2 = 430;
|
|
6974
7131
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME2 = {
|
|
6975
7132
|
cartesianGridStroke: "#D3D6DF",
|
|
@@ -7006,12 +7163,138 @@ var defaultChartColors2 = {
|
|
|
7006
7163
|
};
|
|
7007
7164
|
var topReserveForBarLabels = 58;
|
|
7008
7165
|
var topReserveNoBarLabels = 28;
|
|
7166
|
+
var topReserveForGrowthBadges = 90;
|
|
7009
7167
|
function formatBarLabel2(value) {
|
|
7010
7168
|
if (value > 1e3) {
|
|
7011
7169
|
return `${(value / 1e3).toFixed(1)}k`;
|
|
7012
7170
|
}
|
|
7013
7171
|
return String(value);
|
|
7014
7172
|
}
|
|
7173
|
+
function toNum2(v) {
|
|
7174
|
+
if (v === void 0) return void 0;
|
|
7175
|
+
return typeof v === "number" ? v : Number(v);
|
|
7176
|
+
}
|
|
7177
|
+
function GrowthBadgeLabel({
|
|
7178
|
+
x,
|
|
7179
|
+
y,
|
|
7180
|
+
width,
|
|
7181
|
+
index,
|
|
7182
|
+
rows,
|
|
7183
|
+
barGap,
|
|
7184
|
+
series,
|
|
7185
|
+
badgeWidth = 45,
|
|
7186
|
+
badgeHeight = 38,
|
|
7187
|
+
badgeOffsetY = 35
|
|
7188
|
+
}) {
|
|
7189
|
+
const nx = toNum2(x);
|
|
7190
|
+
const ny = toNum2(y);
|
|
7191
|
+
const nw = toNum2(width);
|
|
7192
|
+
if (index === void 0 || nx === void 0 || ny === void 0 || nw === void 0) {
|
|
7193
|
+
return null;
|
|
7194
|
+
}
|
|
7195
|
+
const row = rows[index];
|
|
7196
|
+
if (!row || !Number.isFinite(row.ffGrowthPercent)) return null;
|
|
7197
|
+
const maleTaller = row.male >= row.female;
|
|
7198
|
+
if (series === "male" && !maleTaller) return null;
|
|
7199
|
+
if (series === "female" && maleTaller) return null;
|
|
7200
|
+
const pct = row.ffGrowthPercent;
|
|
7201
|
+
const isPositive = pct >= 0;
|
|
7202
|
+
const color = isPositive ? "#6D9F92" : "#ED1C24";
|
|
7203
|
+
const iconName = isPositive ? "mdi:arrow-up" : "mdi:arrow-down";
|
|
7204
|
+
const label = `${isPositive ? "+" : ""}${pct.toFixed(1)}%`;
|
|
7205
|
+
const centerX = series === "male" ? nx + nw + barGap / 2 : nx - barGap / 2;
|
|
7206
|
+
const foX = centerX - badgeWidth / 2;
|
|
7207
|
+
const foY = ny - badgeOffsetY - badgeHeight;
|
|
7208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7209
|
+
"foreignObject",
|
|
7210
|
+
{
|
|
7211
|
+
x: foX,
|
|
7212
|
+
y: foY,
|
|
7213
|
+
width: badgeWidth,
|
|
7214
|
+
height: badgeHeight,
|
|
7215
|
+
style: { overflow: "visible" },
|
|
7216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7217
|
+
"div",
|
|
7218
|
+
{
|
|
7219
|
+
...{ xmlns: "http://www.w3.org/1999/xhtml" },
|
|
7220
|
+
style: {
|
|
7221
|
+
width: `${badgeWidth}px`,
|
|
7222
|
+
height: `${badgeHeight}px`,
|
|
7223
|
+
display: "flex",
|
|
7224
|
+
flexDirection: "column",
|
|
7225
|
+
alignItems: "center",
|
|
7226
|
+
justifyContent: "center",
|
|
7227
|
+
gap: "2px",
|
|
7228
|
+
background: "#F3F4F6",
|
|
7229
|
+
borderRadius: "6px",
|
|
7230
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.08)",
|
|
7231
|
+
border: "1px solid #E5E7EB",
|
|
7232
|
+
boxSizing: "border-box",
|
|
7233
|
+
padding: "3px 4px",
|
|
7234
|
+
pointerEvents: "none",
|
|
7235
|
+
userSelect: "none"
|
|
7236
|
+
},
|
|
7237
|
+
children: [
|
|
7238
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7239
|
+
"div",
|
|
7240
|
+
{
|
|
7241
|
+
style: {
|
|
7242
|
+
display: "inline-flex",
|
|
7243
|
+
alignItems: "center",
|
|
7244
|
+
justifyContent: "center",
|
|
7245
|
+
width: "12px",
|
|
7246
|
+
height: "12px",
|
|
7247
|
+
borderRadius: "50%",
|
|
7248
|
+
backgroundColor: color,
|
|
7249
|
+
flexShrink: 0
|
|
7250
|
+
},
|
|
7251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react19.Icon, { icon: iconName, color: "#fff", width: 8, height: 8 })
|
|
7252
|
+
}
|
|
7253
|
+
),
|
|
7254
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7255
|
+
"span",
|
|
7256
|
+
{
|
|
7257
|
+
style: {
|
|
7258
|
+
fontSize: "9px",
|
|
7259
|
+
fontWeight: 700,
|
|
7260
|
+
color,
|
|
7261
|
+
whiteSpace: "nowrap",
|
|
7262
|
+
lineHeight: 1
|
|
7263
|
+
},
|
|
7264
|
+
children: label
|
|
7265
|
+
}
|
|
7266
|
+
)
|
|
7267
|
+
]
|
|
7268
|
+
}
|
|
7269
|
+
)
|
|
7270
|
+
}
|
|
7271
|
+
);
|
|
7272
|
+
}
|
|
7273
|
+
function MultiLineTick2({
|
|
7274
|
+
x = 0,
|
|
7275
|
+
y = 0,
|
|
7276
|
+
payload,
|
|
7277
|
+
angle = -38,
|
|
7278
|
+
textAnchor = "end",
|
|
7279
|
+
fontSize = 12
|
|
7280
|
+
}) {
|
|
7281
|
+
if (!payload?.value) return null;
|
|
7282
|
+
const lines = String(payload.value).split("\n");
|
|
7283
|
+
const lineHeight = fontSize * 1.3;
|
|
7284
|
+
const isHorizontal = angle === 0;
|
|
7285
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
7286
|
+
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
7287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7288
|
+
"text",
|
|
7289
|
+
{
|
|
7290
|
+
transform: `rotate(${angle})`,
|
|
7291
|
+
textAnchor: anchor,
|
|
7292
|
+
fontSize,
|
|
7293
|
+
fill: "#666",
|
|
7294
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
7295
|
+
}
|
|
7296
|
+
) });
|
|
7297
|
+
}
|
|
7015
7298
|
function formatYAxisTickDefault(value) {
|
|
7016
7299
|
if (!Number.isFinite(value)) {
|
|
7017
7300
|
return "";
|
|
@@ -7028,14 +7311,13 @@ function GenderTooltip({
|
|
|
7028
7311
|
active,
|
|
7029
7312
|
payload,
|
|
7030
7313
|
label,
|
|
7031
|
-
isBarHovered,
|
|
7032
7314
|
categoryLabel,
|
|
7033
7315
|
overallLabel,
|
|
7034
7316
|
seriesLabels,
|
|
7035
7317
|
seriesColors,
|
|
7036
7318
|
tooltipStyles
|
|
7037
7319
|
}) {
|
|
7038
|
-
if (!active || !payload?.length ||
|
|
7320
|
+
if (!active || !payload?.length || label === void 0) {
|
|
7039
7321
|
return null;
|
|
7040
7322
|
}
|
|
7041
7323
|
const maleEntry = payload.find(
|
|
@@ -7054,177 +7336,215 @@ function GenderTooltip({
|
|
|
7054
7336
|
gap: 4,
|
|
7055
7337
|
marginBottom: "8px"
|
|
7056
7338
|
};
|
|
7057
|
-
return /* @__PURE__ */ (0,
|
|
7339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7058
7340
|
"div",
|
|
7059
7341
|
{
|
|
7060
7342
|
style: mergeCss3(
|
|
7061
7343
|
{
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
width: "180px",
|
|
7066
|
-
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.1)"
|
|
7344
|
+
position: "relative",
|
|
7345
|
+
display: "inline-flex",
|
|
7346
|
+
alignItems: "stretch"
|
|
7067
7347
|
},
|
|
7068
|
-
ts?.
|
|
7348
|
+
ts?.wrapper
|
|
7069
7349
|
),
|
|
7070
7350
|
children: [
|
|
7071
|
-
/* @__PURE__ */ (0,
|
|
7351
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7352
|
+
"div",
|
|
7353
|
+
{
|
|
7354
|
+
style: {
|
|
7355
|
+
position: "absolute",
|
|
7356
|
+
left: -6,
|
|
7357
|
+
top: 18,
|
|
7358
|
+
width: 0,
|
|
7359
|
+
height: 0,
|
|
7360
|
+
borderTop: "6px solid transparent",
|
|
7361
|
+
borderBottom: "6px solid transparent",
|
|
7362
|
+
borderRight: "7px solid #fff",
|
|
7363
|
+
zIndex: 1,
|
|
7364
|
+
filter: "drop-shadow(-1px 0 0 #E8E8E8)"
|
|
7365
|
+
},
|
|
7366
|
+
"aria-hidden": true
|
|
7367
|
+
}
|
|
7368
|
+
),
|
|
7369
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7072
7370
|
"div",
|
|
7073
7371
|
{
|
|
7074
7372
|
style: mergeCss3(
|
|
7075
|
-
{
|
|
7076
|
-
|
|
7373
|
+
{
|
|
7374
|
+
position: "relative",
|
|
7375
|
+
zIndex: 2,
|
|
7376
|
+
backgroundColor: "white",
|
|
7377
|
+
borderRadius: "8px",
|
|
7378
|
+
padding: "10px 12px 10px",
|
|
7379
|
+
width: "max-content",
|
|
7380
|
+
maxWidth: 200,
|
|
7381
|
+
boxSizing: "border-box",
|
|
7382
|
+
boxShadow: "0 2px 12px rgba(0, 0, 0, 0.12)",
|
|
7383
|
+
border: "1px solid #E8E8E8"
|
|
7384
|
+
},
|
|
7385
|
+
ts?.container
|
|
7077
7386
|
),
|
|
7078
7387
|
children: [
|
|
7079
|
-
/* @__PURE__ */ (0,
|
|
7388
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7080
7389
|
"div",
|
|
7081
7390
|
{
|
|
7082
7391
|
style: mergeCss3(
|
|
7083
|
-
{
|
|
7084
|
-
|
|
7085
|
-
fontSize: "11px",
|
|
7086
|
-
fontWeight: 500
|
|
7087
|
-
},
|
|
7088
|
-
ts?.metaLabel
|
|
7392
|
+
{ ...sectionBase, marginBottom: "8px" },
|
|
7393
|
+
ts?.sectionRow
|
|
7089
7394
|
),
|
|
7090
7395
|
children: [
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7397
|
+
"div",
|
|
7398
|
+
{
|
|
7399
|
+
style: mergeCss3(
|
|
7400
|
+
{
|
|
7401
|
+
color: "#0F0F0F",
|
|
7402
|
+
fontSize: "11px",
|
|
7403
|
+
fontWeight: 500
|
|
7404
|
+
},
|
|
7405
|
+
ts?.metaLabel
|
|
7406
|
+
),
|
|
7407
|
+
children: [
|
|
7408
|
+
categoryLabel,
|
|
7409
|
+
":",
|
|
7410
|
+
" "
|
|
7411
|
+
]
|
|
7412
|
+
}
|
|
7413
|
+
),
|
|
7414
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7415
|
+
"div",
|
|
7416
|
+
{
|
|
7417
|
+
style: mergeCss3(
|
|
7418
|
+
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7419
|
+
ts?.metaValue
|
|
7420
|
+
),
|
|
7421
|
+
children: label
|
|
7422
|
+
}
|
|
7423
|
+
)
|
|
7094
7424
|
]
|
|
7095
7425
|
}
|
|
7096
7426
|
),
|
|
7097
|
-
/* @__PURE__ */ (0,
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7427
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7428
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7429
|
+
"div",
|
|
7430
|
+
{
|
|
7431
|
+
style: mergeCss3(
|
|
7432
|
+
{
|
|
7433
|
+
color: "#0F0F0F",
|
|
7434
|
+
fontSize: "11px",
|
|
7435
|
+
fontWeight: 500
|
|
7436
|
+
},
|
|
7437
|
+
ts?.metaLabel
|
|
7438
|
+
),
|
|
7439
|
+
children: [
|
|
7440
|
+
overallLabel,
|
|
7441
|
+
":",
|
|
7442
|
+
" "
|
|
7443
|
+
]
|
|
7444
|
+
}
|
|
7445
|
+
),
|
|
7446
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7447
|
+
"div",
|
|
7448
|
+
{
|
|
7449
|
+
style: mergeCss3(
|
|
7450
|
+
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7451
|
+
ts?.metaValue
|
|
7452
|
+
),
|
|
7453
|
+
children: total.toLocaleString()
|
|
7454
|
+
}
|
|
7455
|
+
)
|
|
7456
|
+
] }),
|
|
7457
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7458
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7459
|
+
"div",
|
|
7460
|
+
{
|
|
7461
|
+
style: mergeCss3(
|
|
7462
|
+
{
|
|
7463
|
+
width: "10px",
|
|
7464
|
+
height: "10px",
|
|
7465
|
+
borderRadius: "50%",
|
|
7466
|
+
backgroundColor: seriesColors.male
|
|
7467
|
+
},
|
|
7468
|
+
ts?.seriesDot
|
|
7469
|
+
)
|
|
7470
|
+
}
|
|
7471
|
+
),
|
|
7472
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7473
|
+
"div",
|
|
7474
|
+
{
|
|
7475
|
+
style: mergeCss3(
|
|
7476
|
+
{
|
|
7477
|
+
color: "#0F0F0F",
|
|
7478
|
+
fontSize: "11px",
|
|
7479
|
+
fontWeight: 500
|
|
7480
|
+
},
|
|
7481
|
+
ts?.seriesName
|
|
7482
|
+
),
|
|
7483
|
+
children: [
|
|
7484
|
+
seriesLabels.male,
|
|
7485
|
+
":",
|
|
7486
|
+
" "
|
|
7487
|
+
]
|
|
7488
|
+
}
|
|
7489
|
+
),
|
|
7490
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7491
|
+
"div",
|
|
7492
|
+
{
|
|
7493
|
+
style: mergeCss3(
|
|
7494
|
+
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7495
|
+
ts?.seriesValue
|
|
7496
|
+
),
|
|
7497
|
+
children: male.toLocaleString()
|
|
7498
|
+
}
|
|
7499
|
+
)
|
|
7500
|
+
] }),
|
|
7501
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7502
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7503
|
+
"div",
|
|
7504
|
+
{
|
|
7505
|
+
style: mergeCss3(
|
|
7506
|
+
{
|
|
7507
|
+
width: "10px",
|
|
7508
|
+
height: "10px",
|
|
7509
|
+
borderRadius: "50%",
|
|
7510
|
+
backgroundColor: seriesColors.female
|
|
7511
|
+
},
|
|
7512
|
+
ts?.seriesDot
|
|
7513
|
+
)
|
|
7514
|
+
}
|
|
7515
|
+
),
|
|
7516
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7517
|
+
"div",
|
|
7518
|
+
{
|
|
7519
|
+
style: mergeCss3(
|
|
7520
|
+
{
|
|
7521
|
+
color: "#0F0F0F",
|
|
7522
|
+
fontSize: "11px",
|
|
7523
|
+
fontWeight: 500
|
|
7524
|
+
},
|
|
7525
|
+
ts?.seriesName
|
|
7526
|
+
),
|
|
7527
|
+
children: [
|
|
7528
|
+
seriesLabels.female,
|
|
7529
|
+
":",
|
|
7530
|
+
" "
|
|
7531
|
+
]
|
|
7532
|
+
}
|
|
7533
|
+
),
|
|
7534
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7535
|
+
"div",
|
|
7536
|
+
{
|
|
7537
|
+
style: mergeCss3(
|
|
7538
|
+
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7539
|
+
ts?.seriesValue
|
|
7540
|
+
),
|
|
7541
|
+
children: female.toLocaleString()
|
|
7542
|
+
}
|
|
7543
|
+
)
|
|
7544
|
+
] })
|
|
7107
7545
|
]
|
|
7108
7546
|
}
|
|
7109
|
-
)
|
|
7110
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7111
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
7112
|
-
"div",
|
|
7113
|
-
{
|
|
7114
|
-
style: mergeCss3(
|
|
7115
|
-
{
|
|
7116
|
-
color: "#0F0F0F",
|
|
7117
|
-
fontSize: "11px",
|
|
7118
|
-
fontWeight: 500
|
|
7119
|
-
},
|
|
7120
|
-
ts?.metaLabel
|
|
7121
|
-
),
|
|
7122
|
-
children: [
|
|
7123
|
-
overallLabel,
|
|
7124
|
-
":",
|
|
7125
|
-
" "
|
|
7126
|
-
]
|
|
7127
|
-
}
|
|
7128
|
-
),
|
|
7129
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7130
|
-
"div",
|
|
7131
|
-
{
|
|
7132
|
-
style: mergeCss3(
|
|
7133
|
-
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7134
|
-
ts?.metaValue
|
|
7135
|
-
),
|
|
7136
|
-
children: total.toLocaleString()
|
|
7137
|
-
}
|
|
7138
|
-
)
|
|
7139
|
-
] }),
|
|
7140
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7141
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7142
|
-
"div",
|
|
7143
|
-
{
|
|
7144
|
-
style: mergeCss3(
|
|
7145
|
-
{
|
|
7146
|
-
width: "10px",
|
|
7147
|
-
height: "10px",
|
|
7148
|
-
borderRadius: "50%",
|
|
7149
|
-
backgroundColor: seriesColors.male
|
|
7150
|
-
},
|
|
7151
|
-
ts?.seriesDot
|
|
7152
|
-
)
|
|
7153
|
-
}
|
|
7154
|
-
),
|
|
7155
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
7156
|
-
"div",
|
|
7157
|
-
{
|
|
7158
|
-
style: mergeCss3(
|
|
7159
|
-
{
|
|
7160
|
-
color: "#0F0F0F",
|
|
7161
|
-
fontSize: "11px",
|
|
7162
|
-
fontWeight: 500
|
|
7163
|
-
},
|
|
7164
|
-
ts?.seriesName
|
|
7165
|
-
),
|
|
7166
|
-
children: [
|
|
7167
|
-
seriesLabels.male,
|
|
7168
|
-
":",
|
|
7169
|
-
" "
|
|
7170
|
-
]
|
|
7171
|
-
}
|
|
7172
|
-
),
|
|
7173
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7174
|
-
"div",
|
|
7175
|
-
{
|
|
7176
|
-
style: mergeCss3(
|
|
7177
|
-
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7178
|
-
ts?.seriesValue
|
|
7179
|
-
),
|
|
7180
|
-
children: male.toLocaleString()
|
|
7181
|
-
}
|
|
7182
|
-
)
|
|
7183
|
-
] }),
|
|
7184
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: mergeCss3(sectionBase, ts?.sectionRow), children: [
|
|
7185
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7186
|
-
"div",
|
|
7187
|
-
{
|
|
7188
|
-
style: mergeCss3(
|
|
7189
|
-
{
|
|
7190
|
-
width: "10px",
|
|
7191
|
-
height: "10px",
|
|
7192
|
-
borderRadius: "50%",
|
|
7193
|
-
backgroundColor: seriesColors.female
|
|
7194
|
-
},
|
|
7195
|
-
ts?.seriesDot
|
|
7196
|
-
)
|
|
7197
|
-
}
|
|
7198
|
-
),
|
|
7199
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
7200
|
-
"div",
|
|
7201
|
-
{
|
|
7202
|
-
style: mergeCss3(
|
|
7203
|
-
{
|
|
7204
|
-
color: "#0F0F0F",
|
|
7205
|
-
fontSize: "11px",
|
|
7206
|
-
fontWeight: 500
|
|
7207
|
-
},
|
|
7208
|
-
ts?.seriesName
|
|
7209
|
-
),
|
|
7210
|
-
children: [
|
|
7211
|
-
seriesLabels.female,
|
|
7212
|
-
":",
|
|
7213
|
-
" "
|
|
7214
|
-
]
|
|
7215
|
-
}
|
|
7216
|
-
),
|
|
7217
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7218
|
-
"div",
|
|
7219
|
-
{
|
|
7220
|
-
style: mergeCss3(
|
|
7221
|
-
{ color: "#5A5A5A", fontSize: "11px", fontWeight: 400 },
|
|
7222
|
-
ts?.seriesValue
|
|
7223
|
-
),
|
|
7224
|
-
children: female.toLocaleString()
|
|
7225
|
-
}
|
|
7226
|
-
)
|
|
7227
|
-
] })
|
|
7547
|
+
)
|
|
7228
7548
|
]
|
|
7229
7549
|
}
|
|
7230
7550
|
);
|
|
@@ -7253,6 +7573,7 @@ function FootfallByGender({
|
|
|
7253
7573
|
barGap = 0,
|
|
7254
7574
|
showLegend = true,
|
|
7255
7575
|
showBarValueLabels = true,
|
|
7576
|
+
showGrowthBadges = false,
|
|
7256
7577
|
dimmedBarOpacity = 0.3,
|
|
7257
7578
|
hoveredBarOpacity = 0.9,
|
|
7258
7579
|
cardMaxWidth,
|
|
@@ -7276,23 +7597,46 @@ function FootfallByGender({
|
|
|
7276
7597
|
chartMargin: chartMarginProp,
|
|
7277
7598
|
chartColors: chartColorsProp,
|
|
7278
7599
|
emptyStatePlaceholderProps,
|
|
7279
|
-
yAxisTickFormatter
|
|
7600
|
+
yAxisTickFormatter,
|
|
7601
|
+
xAxisTickAngle = 0,
|
|
7602
|
+
barValueLabelAngle = 0,
|
|
7603
|
+
growthBadgeWidth = 45,
|
|
7604
|
+
growthBadgeHeight = 38,
|
|
7605
|
+
growthBadgeOffsetY = 35
|
|
7280
7606
|
}) {
|
|
7281
7607
|
const seriesLabels = { ...defaultSeriesLabels, ...seriesLabelsProp };
|
|
7282
7608
|
const seriesColors = { ...defaultSeriesColors, ...seriesColorsProp };
|
|
7283
7609
|
const [activeIndex, setActiveIndex] = React12.useState(null);
|
|
7284
|
-
const [barHovered, setBarHovered] = React12.useState(false);
|
|
7285
7610
|
const handleMouseEnter = React12.useCallback((_, index) => {
|
|
7286
|
-
setBarHovered(true);
|
|
7287
7611
|
setActiveIndex(index);
|
|
7288
7612
|
}, []);
|
|
7289
7613
|
const handleMouseLeave = React12.useCallback(() => {
|
|
7290
|
-
setBarHovered(false);
|
|
7291
7614
|
setActiveIndex(null);
|
|
7292
7615
|
}, []);
|
|
7293
7616
|
const processedData = React12.useMemo(() => {
|
|
7294
7617
|
return data.map((row) => ({ ...row }));
|
|
7295
7618
|
}, [data]);
|
|
7619
|
+
const hasMaleBar = React12.useMemo(
|
|
7620
|
+
() => processedData.some((r) => typeof r.male === "number" && r.male > 0),
|
|
7621
|
+
[processedData]
|
|
7622
|
+
);
|
|
7623
|
+
const hasFemaleBar = React12.useMemo(
|
|
7624
|
+
() => processedData.some((r) => typeof r.female === "number" && r.female > 0),
|
|
7625
|
+
[processedData]
|
|
7626
|
+
);
|
|
7627
|
+
const showMaleLegend = React12.useMemo(
|
|
7628
|
+
() => processedData.some((r) => typeof r.male === "number"),
|
|
7629
|
+
[processedData]
|
|
7630
|
+
);
|
|
7631
|
+
const showFemaleLegend = React12.useMemo(
|
|
7632
|
+
() => processedData.some((r) => typeof r.female === "number"),
|
|
7633
|
+
[processedData]
|
|
7634
|
+
);
|
|
7635
|
+
const visibleBarCount = (hasMaleBar ? 1 : 0) + (hasFemaleBar ? 1 : 0) || 1;
|
|
7636
|
+
const hasGrowthBadges = React12.useMemo(
|
|
7637
|
+
() => showGrowthBadges && processedData.some((r) => Number.isFinite(r.ffGrowthPercent)),
|
|
7638
|
+
[showGrowthBadges, processedData]
|
|
7639
|
+
);
|
|
7296
7640
|
const categoryScrollActive = React12.useMemo(
|
|
7297
7641
|
() => resolveCategoryScroll(
|
|
7298
7642
|
minWidthPerCategory,
|
|
@@ -7330,21 +7674,34 @@ function FootfallByGender({
|
|
|
7330
7674
|
}
|
|
7331
7675
|
return Math.max(chartInnerMinWidthPx, containerWidth);
|
|
7332
7676
|
}, [chartInnerMinWidthPx, containerWidth]);
|
|
7333
|
-
const
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
const
|
|
7338
|
-
|
|
7339
|
-
|
|
7677
|
+
const targetBarWidth = maxBarSizeProp ?? defaultMaxBarThickness2;
|
|
7678
|
+
const resolvedBarCategoryGapPx = React12.useMemo(() => {
|
|
7679
|
+
const effectiveWidth = chartWidthPx > 0 ? chartWidthPx : containerWidth;
|
|
7680
|
+
if (effectiveWidth <= 0) return 4;
|
|
7681
|
+
const n = Math.max(processedData.length, 1);
|
|
7682
|
+
const plotWidth = effectiveWidth - chartWidthAxisGutter2;
|
|
7683
|
+
const bandSize = plotWidth / n;
|
|
7684
|
+
const gapBetweenBars = visibleBarCount > 1 ? barGap : 0;
|
|
7685
|
+
return Math.max(
|
|
7686
|
+
0,
|
|
7687
|
+
(bandSize - targetBarWidth * visibleBarCount - gapBetweenBars) / 2
|
|
7688
|
+
);
|
|
7689
|
+
}, [
|
|
7690
|
+
processedData.length,
|
|
7691
|
+
chartWidthPx,
|
|
7692
|
+
containerWidth,
|
|
7693
|
+
barGap,
|
|
7694
|
+
targetBarWidth,
|
|
7695
|
+
visibleBarCount
|
|
7696
|
+
]);
|
|
7697
|
+
const resolvedMaxBarSize = targetBarWidth;
|
|
7340
7698
|
const chartMargin = React12.useMemo(() => {
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
}, [showBarValueLabels, chartMarginProp]);
|
|
7699
|
+
let top;
|
|
7700
|
+
if (hasGrowthBadges) top = topReserveForGrowthBadges;
|
|
7701
|
+
else if (showBarValueLabels) top = topReserveForBarLabels;
|
|
7702
|
+
else top = topReserveNoBarLabels;
|
|
7703
|
+
return { ...defaultChartMargin2, top, ...chartMarginProp };
|
|
7704
|
+
}, [hasGrowthBadges, showBarValueLabels, chartMarginProp]);
|
|
7348
7705
|
const chartColors = React12.useMemo(
|
|
7349
7706
|
() => ({
|
|
7350
7707
|
...defaultChartColors2,
|
|
@@ -7354,7 +7711,7 @@ function FootfallByGender({
|
|
|
7354
7711
|
);
|
|
7355
7712
|
const yAxisTick = yAxisTickFormatter ?? formatYAxisTickDefault;
|
|
7356
7713
|
const barOpacity = (index) => activeIndex === null || activeIndex === index ? hoveredBarOpacity : dimmedBarOpacity;
|
|
7357
|
-
return /* @__PURE__ */ (0,
|
|
7714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7358
7715
|
import_Box10.default,
|
|
7359
7716
|
{
|
|
7360
7717
|
sx: sxChain2(
|
|
@@ -7371,8 +7728,8 @@ function FootfallByGender({
|
|
|
7371
7728
|
},
|
|
7372
7729
|
cardSx
|
|
7373
7730
|
),
|
|
7374
|
-
children: /* @__PURE__ */ (0,
|
|
7375
|
-
/* @__PURE__ */ (0,
|
|
7731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_Stack8.default, { spacing: 2, sx: sxChain2({ minWidth: 0 }, stackSx), children: [
|
|
7732
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7376
7733
|
import_Box10.default,
|
|
7377
7734
|
{
|
|
7378
7735
|
sx: sxChain2(
|
|
@@ -7383,7 +7740,7 @@ function FootfallByGender({
|
|
|
7383
7740
|
titleRowSx
|
|
7384
7741
|
),
|
|
7385
7742
|
children: [
|
|
7386
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
7743
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7387
7744
|
import_Box10.default,
|
|
7388
7745
|
{
|
|
7389
7746
|
sx: {
|
|
@@ -7396,7 +7753,7 @@ function FootfallByGender({
|
|
|
7396
7753
|
children: headerActions
|
|
7397
7754
|
}
|
|
7398
7755
|
) : null,
|
|
7399
|
-
/* @__PURE__ */ (0,
|
|
7756
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7400
7757
|
import_Typography7.default,
|
|
7401
7758
|
{
|
|
7402
7759
|
component: "h2",
|
|
@@ -7417,8 +7774,8 @@ function FootfallByGender({
|
|
|
7417
7774
|
]
|
|
7418
7775
|
}
|
|
7419
7776
|
),
|
|
7420
|
-
/* @__PURE__ */ (0,
|
|
7421
|
-
/* @__PURE__ */ (0,
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_Divider3.default, { sx: sxChain2({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
7778
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7422
7779
|
import_Box10.default,
|
|
7423
7780
|
{
|
|
7424
7781
|
sx: sxChain2(
|
|
@@ -7432,7 +7789,7 @@ function FootfallByGender({
|
|
|
7432
7789
|
chartViewportSx
|
|
7433
7790
|
),
|
|
7434
7791
|
children: [
|
|
7435
|
-
/* @__PURE__ */ (0,
|
|
7792
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7436
7793
|
import_Box10.default,
|
|
7437
7794
|
{
|
|
7438
7795
|
ref: scrollRef,
|
|
@@ -7446,7 +7803,7 @@ function FootfallByGender({
|
|
|
7446
7803
|
},
|
|
7447
7804
|
chartScrollAreaSx
|
|
7448
7805
|
),
|
|
7449
|
-
children: processedData.length > 0 ? /* @__PURE__ */ (0,
|
|
7806
|
+
children: processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7450
7807
|
import_recharts2.BarChart,
|
|
7451
7808
|
{
|
|
7452
7809
|
width: chartWidthPx,
|
|
@@ -7454,11 +7811,12 @@ function FootfallByGender({
|
|
|
7454
7811
|
data: processedData,
|
|
7455
7812
|
margin: chartMargin,
|
|
7456
7813
|
barGap,
|
|
7814
|
+
barCategoryGap: resolvedBarCategoryGapPx,
|
|
7457
7815
|
maxBarSize: resolvedMaxBarSize,
|
|
7458
7816
|
onMouseLeave: handleMouseLeave,
|
|
7459
7817
|
style: { overflow: "visible" },
|
|
7460
7818
|
children: [
|
|
7461
|
-
/* @__PURE__ */ (0,
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7462
7820
|
import_recharts2.CartesianGrid,
|
|
7463
7821
|
{
|
|
7464
7822
|
strokeDasharray: "3 3",
|
|
@@ -7467,22 +7825,19 @@ function FootfallByGender({
|
|
|
7467
7825
|
stroke: chartColors.cartesianGridStroke
|
|
7468
7826
|
}
|
|
7469
7827
|
),
|
|
7470
|
-
/* @__PURE__ */ (0,
|
|
7828
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7471
7829
|
import_recharts2.XAxis,
|
|
7472
7830
|
{
|
|
7473
7831
|
dataKey: "name",
|
|
7474
|
-
angle: -38,
|
|
7475
|
-
textAnchor: "end",
|
|
7476
7832
|
interval: 0,
|
|
7477
7833
|
height: 68,
|
|
7478
7834
|
tickMargin: 10,
|
|
7479
|
-
|
|
7480
|
-
tick: { fontSize: 12 },
|
|
7835
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MultiLineTick2, { angle: xAxisTickAngle }),
|
|
7481
7836
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
7482
7837
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
7483
7838
|
}
|
|
7484
7839
|
),
|
|
7485
|
-
/* @__PURE__ */ (0,
|
|
7840
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7486
7841
|
import_recharts2.YAxis,
|
|
7487
7842
|
{
|
|
7488
7843
|
width: 52,
|
|
@@ -7493,23 +7848,24 @@ function FootfallByGender({
|
|
|
7493
7848
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
7494
7849
|
}
|
|
7495
7850
|
),
|
|
7496
|
-
/* @__PURE__ */ (0,
|
|
7851
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7497
7852
|
import_recharts2.Tooltip,
|
|
7498
7853
|
{
|
|
7499
7854
|
cursor: false,
|
|
7855
|
+
allowEscapeViewBox: { x: true, y: true },
|
|
7856
|
+
wrapperStyle: { outline: "none", zIndex: 10 },
|
|
7500
7857
|
content: (tooltipProps) => {
|
|
7501
7858
|
if (renderTooltip) {
|
|
7502
7859
|
const customTooltip = renderTooltip({
|
|
7503
7860
|
tooltipProps,
|
|
7504
7861
|
rows: processedData
|
|
7505
7862
|
});
|
|
7506
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
7863
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: customTooltip });
|
|
7507
7864
|
}
|
|
7508
|
-
return /* @__PURE__ */ (0,
|
|
7865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7509
7866
|
GenderTooltip,
|
|
7510
7867
|
{
|
|
7511
7868
|
...tooltipProps,
|
|
7512
|
-
isBarHovered: barHovered,
|
|
7513
7869
|
categoryLabel: tooltipCategoryLabel,
|
|
7514
7870
|
overallLabel: tooltipOverallLabel,
|
|
7515
7871
|
seriesLabels,
|
|
@@ -7520,7 +7876,7 @@ function FootfallByGender({
|
|
|
7520
7876
|
}
|
|
7521
7877
|
}
|
|
7522
7878
|
),
|
|
7523
|
-
/* @__PURE__ */ (0,
|
|
7879
|
+
hasMaleBar ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7524
7880
|
import_recharts2.Bar,
|
|
7525
7881
|
{
|
|
7526
7882
|
dataKey: "male",
|
|
@@ -7529,29 +7885,48 @@ function FootfallByGender({
|
|
|
7529
7885
|
onMouseEnter: handleMouseEnter,
|
|
7530
7886
|
onMouseLeave: handleMouseLeave,
|
|
7531
7887
|
children: [
|
|
7532
|
-
processedData.map((row, index) => /* @__PURE__ */ (0,
|
|
7888
|
+
processedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7533
7889
|
import_recharts2.Cell,
|
|
7534
7890
|
{
|
|
7535
7891
|
fillOpacity: barOpacity(index)
|
|
7536
7892
|
},
|
|
7537
7893
|
`m-${row.name}-${index}`
|
|
7538
7894
|
)),
|
|
7539
|
-
showBarValueLabels ? /* @__PURE__ */ (0,
|
|
7895
|
+
showBarValueLabels ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7540
7896
|
import_recharts2.LabelList,
|
|
7541
7897
|
{
|
|
7542
7898
|
dataKey: "male",
|
|
7543
7899
|
position: "top",
|
|
7544
|
-
offset:
|
|
7900
|
+
offset: 10,
|
|
7545
7901
|
fill: chartColors.barValueLabelFill,
|
|
7546
7902
|
fontSize: 12,
|
|
7547
|
-
|
|
7903
|
+
fontWeight: 500,
|
|
7904
|
+
angle: barValueLabelAngle,
|
|
7548
7905
|
formatter: (label) => formatBarLabel2(Number(label))
|
|
7549
7906
|
}
|
|
7907
|
+
) : null,
|
|
7908
|
+
hasGrowthBadges ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7909
|
+
import_recharts2.LabelList,
|
|
7910
|
+
{
|
|
7911
|
+
dataKey: "male",
|
|
7912
|
+
content: (labelProps) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7913
|
+
GrowthBadgeLabel,
|
|
7914
|
+
{
|
|
7915
|
+
...labelProps,
|
|
7916
|
+
rows: processedData,
|
|
7917
|
+
barGap,
|
|
7918
|
+
series: "male",
|
|
7919
|
+
badgeWidth: growthBadgeWidth,
|
|
7920
|
+
badgeHeight: growthBadgeHeight,
|
|
7921
|
+
badgeOffsetY: growthBadgeOffsetY
|
|
7922
|
+
}
|
|
7923
|
+
)
|
|
7924
|
+
}
|
|
7550
7925
|
) : null
|
|
7551
7926
|
]
|
|
7552
7927
|
}
|
|
7553
|
-
),
|
|
7554
|
-
/* @__PURE__ */ (0,
|
|
7928
|
+
) : null,
|
|
7929
|
+
hasFemaleBar ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7555
7930
|
import_recharts2.Bar,
|
|
7556
7931
|
{
|
|
7557
7932
|
dataKey: "female",
|
|
@@ -7560,31 +7935,50 @@ function FootfallByGender({
|
|
|
7560
7935
|
onMouseEnter: handleMouseEnter,
|
|
7561
7936
|
onMouseLeave: handleMouseLeave,
|
|
7562
7937
|
children: [
|
|
7563
|
-
processedData.map((row, index) => /* @__PURE__ */ (0,
|
|
7938
|
+
processedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7564
7939
|
import_recharts2.Cell,
|
|
7565
7940
|
{
|
|
7566
7941
|
fillOpacity: barOpacity(index)
|
|
7567
7942
|
},
|
|
7568
7943
|
`f-${row.name}-${index}`
|
|
7569
7944
|
)),
|
|
7570
|
-
showBarValueLabels ? /* @__PURE__ */ (0,
|
|
7945
|
+
showBarValueLabels ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7571
7946
|
import_recharts2.LabelList,
|
|
7572
7947
|
{
|
|
7573
7948
|
dataKey: "female",
|
|
7574
7949
|
position: "top",
|
|
7575
|
-
offset:
|
|
7950
|
+
offset: 10,
|
|
7576
7951
|
fill: chartColors.barValueLabelFill,
|
|
7577
7952
|
fontSize: 12,
|
|
7578
|
-
|
|
7953
|
+
fontWeight: 500,
|
|
7954
|
+
angle: barValueLabelAngle,
|
|
7579
7955
|
formatter: (label) => formatBarLabel2(Number(label))
|
|
7580
7956
|
}
|
|
7957
|
+
) : null,
|
|
7958
|
+
hasGrowthBadges ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7959
|
+
import_recharts2.LabelList,
|
|
7960
|
+
{
|
|
7961
|
+
dataKey: "female",
|
|
7962
|
+
content: (labelProps) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7963
|
+
GrowthBadgeLabel,
|
|
7964
|
+
{
|
|
7965
|
+
...labelProps,
|
|
7966
|
+
rows: processedData,
|
|
7967
|
+
barGap,
|
|
7968
|
+
series: "female",
|
|
7969
|
+
badgeWidth: growthBadgeWidth,
|
|
7970
|
+
badgeHeight: growthBadgeHeight,
|
|
7971
|
+
badgeOffsetY: growthBadgeOffsetY
|
|
7972
|
+
}
|
|
7973
|
+
)
|
|
7974
|
+
}
|
|
7581
7975
|
) : null
|
|
7582
7976
|
]
|
|
7583
7977
|
}
|
|
7584
|
-
)
|
|
7978
|
+
) : null
|
|
7585
7979
|
]
|
|
7586
7980
|
}
|
|
7587
|
-
) : /* @__PURE__ */ (0,
|
|
7981
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7588
7982
|
import_Box10.default,
|
|
7589
7983
|
{
|
|
7590
7984
|
sx: sxChain2(
|
|
@@ -7596,7 +7990,7 @@ function FootfallByGender({
|
|
|
7596
7990
|
},
|
|
7597
7991
|
emptyStateSx
|
|
7598
7992
|
),
|
|
7599
|
-
children: /* @__PURE__ */ (0,
|
|
7993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7600
7994
|
ChartEmptyState,
|
|
7601
7995
|
{
|
|
7602
7996
|
minHeight: chartHeight,
|
|
@@ -7607,7 +8001,7 @@ function FootfallByGender({
|
|
|
7607
8001
|
)
|
|
7608
8002
|
}
|
|
7609
8003
|
),
|
|
7610
|
-
showLegend && processedData.length > 0 ? /* @__PURE__ */ (0,
|
|
8004
|
+
showLegend && processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7611
8005
|
import_Box10.default,
|
|
7612
8006
|
{
|
|
7613
8007
|
component: "ul",
|
|
@@ -7632,7 +8026,7 @@ function FootfallByGender({
|
|
|
7632
8026
|
legendOverlaySx
|
|
7633
8027
|
),
|
|
7634
8028
|
children: [
|
|
7635
|
-
/* @__PURE__ */ (0,
|
|
8029
|
+
showMaleLegend ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7636
8030
|
import_Box10.default,
|
|
7637
8031
|
{
|
|
7638
8032
|
component: "li",
|
|
@@ -7646,7 +8040,7 @@ function FootfallByGender({
|
|
|
7646
8040
|
legendItemSx
|
|
7647
8041
|
),
|
|
7648
8042
|
children: [
|
|
7649
|
-
/* @__PURE__ */ (0,
|
|
8043
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7650
8044
|
import_Box10.default,
|
|
7651
8045
|
{
|
|
7652
8046
|
sx: sxChain2(
|
|
@@ -7661,7 +8055,7 @@ function FootfallByGender({
|
|
|
7661
8055
|
)
|
|
7662
8056
|
}
|
|
7663
8057
|
),
|
|
7664
|
-
/* @__PURE__ */ (0,
|
|
8058
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7665
8059
|
import_Typography7.default,
|
|
7666
8060
|
{
|
|
7667
8061
|
component: "span",
|
|
@@ -7679,8 +8073,8 @@ function FootfallByGender({
|
|
|
7679
8073
|
)
|
|
7680
8074
|
]
|
|
7681
8075
|
}
|
|
7682
|
-
),
|
|
7683
|
-
/* @__PURE__ */ (0,
|
|
8076
|
+
) : null,
|
|
8077
|
+
showFemaleLegend ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
7684
8078
|
import_Box10.default,
|
|
7685
8079
|
{
|
|
7686
8080
|
component: "li",
|
|
@@ -7694,7 +8088,7 @@ function FootfallByGender({
|
|
|
7694
8088
|
legendItemSx
|
|
7695
8089
|
),
|
|
7696
8090
|
children: [
|
|
7697
|
-
/* @__PURE__ */ (0,
|
|
8091
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7698
8092
|
import_Box10.default,
|
|
7699
8093
|
{
|
|
7700
8094
|
sx: sxChain2(
|
|
@@ -7709,7 +8103,7 @@ function FootfallByGender({
|
|
|
7709
8103
|
)
|
|
7710
8104
|
}
|
|
7711
8105
|
),
|
|
7712
|
-
/* @__PURE__ */ (0,
|
|
8106
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7713
8107
|
import_Typography7.default,
|
|
7714
8108
|
{
|
|
7715
8109
|
component: "span",
|
|
@@ -7727,7 +8121,7 @@ function FootfallByGender({
|
|
|
7727
8121
|
)
|
|
7728
8122
|
]
|
|
7729
8123
|
}
|
|
7730
|
-
)
|
|
8124
|
+
) : null
|
|
7731
8125
|
]
|
|
7732
8126
|
}
|
|
7733
8127
|
) : null
|
|
@@ -7774,7 +8168,7 @@ function useChartPlotScrollToEnd(scrollRef, options) {
|
|
|
7774
8168
|
}
|
|
7775
8169
|
|
|
7776
8170
|
// src/components/widgets/PasserbyConversion/PasserbyConversion.tsx
|
|
7777
|
-
var
|
|
8171
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
7778
8172
|
var OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX3 = 430;
|
|
7779
8173
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME3 = {
|
|
7780
8174
|
cartesianGridStroke: "#D3D6DF",
|
|
@@ -7809,6 +8203,31 @@ function formatBarLabel3(value) {
|
|
|
7809
8203
|
}
|
|
7810
8204
|
return String(value);
|
|
7811
8205
|
}
|
|
8206
|
+
function MultiLineTick3({
|
|
8207
|
+
x = 0,
|
|
8208
|
+
y = 0,
|
|
8209
|
+
payload,
|
|
8210
|
+
angle = -42,
|
|
8211
|
+
textAnchor = "end",
|
|
8212
|
+
fontSize = 12
|
|
8213
|
+
}) {
|
|
8214
|
+
if (!payload?.value) return null;
|
|
8215
|
+
const lines = String(payload.value).split("\n");
|
|
8216
|
+
const lineHeight = fontSize * 1.3;
|
|
8217
|
+
const isHorizontal = angle === 0;
|
|
8218
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
8219
|
+
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
8220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8221
|
+
"text",
|
|
8222
|
+
{
|
|
8223
|
+
transform: `rotate(${angle})`,
|
|
8224
|
+
textAnchor: anchor,
|
|
8225
|
+
fontSize,
|
|
8226
|
+
fill: "#666",
|
|
8227
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
8228
|
+
}
|
|
8229
|
+
) });
|
|
8230
|
+
}
|
|
7812
8231
|
function formatYAxisTickDefault2(value) {
|
|
7813
8232
|
if (!Number.isFinite(value)) {
|
|
7814
8233
|
return "";
|
|
@@ -7821,7 +8240,7 @@ function formatYAxisTickDefault2(value) {
|
|
|
7821
8240
|
}
|
|
7822
8241
|
return String(value);
|
|
7823
8242
|
}
|
|
7824
|
-
function
|
|
8243
|
+
function toNum3(n) {
|
|
7825
8244
|
if (n === void 0) return void 0;
|
|
7826
8245
|
return typeof n === "number" ? n : Number(n);
|
|
7827
8246
|
}
|
|
@@ -7832,9 +8251,9 @@ function BarTopLabel({
|
|
|
7832
8251
|
value,
|
|
7833
8252
|
fill
|
|
7834
8253
|
}) {
|
|
7835
|
-
const nx =
|
|
7836
|
-
const ny =
|
|
7837
|
-
const nw =
|
|
8254
|
+
const nx = toNum3(x);
|
|
8255
|
+
const ny = toNum3(y);
|
|
8256
|
+
const nw = toNum3(width);
|
|
7838
8257
|
if (nx === void 0 || ny === void 0 || nw === void 0) {
|
|
7839
8258
|
return null;
|
|
7840
8259
|
}
|
|
@@ -7843,8 +8262,8 @@ function BarTopLabel({
|
|
|
7843
8262
|
return null;
|
|
7844
8263
|
}
|
|
7845
8264
|
const cx = nx + nw / 2;
|
|
7846
|
-
const cy = ny -
|
|
7847
|
-
return /* @__PURE__ */ (0,
|
|
8265
|
+
const cy = ny - 10;
|
|
8266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7848
8267
|
"text",
|
|
7849
8268
|
{
|
|
7850
8269
|
x: cx,
|
|
@@ -7921,7 +8340,7 @@ function ConversionTooltip({
|
|
|
7921
8340
|
},
|
|
7922
8341
|
ts?.seriesDot
|
|
7923
8342
|
);
|
|
7924
|
-
return /* @__PURE__ */ (0,
|
|
8343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
7925
8344
|
"div",
|
|
7926
8345
|
{
|
|
7927
8346
|
style: mergeCss4(
|
|
@@ -7939,28 +8358,28 @@ function ConversionTooltip({
|
|
|
7939
8358
|
ts?.container
|
|
7940
8359
|
),
|
|
7941
8360
|
children: [
|
|
7942
|
-
/* @__PURE__ */ (0,
|
|
7943
|
-
/* @__PURE__ */ (0,
|
|
8361
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: mergeCss4(rowBase, ts?.row), children: [
|
|
8362
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { style: labelStyle, children: [
|
|
7944
8363
|
timeLabel,
|
|
7945
8364
|
":"
|
|
7946
8365
|
] }),
|
|
7947
|
-
/* @__PURE__ */ (0,
|
|
8366
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { style: valueStyle, children: timeDisplay })
|
|
7948
8367
|
] }),
|
|
7949
|
-
/* @__PURE__ */ (0,
|
|
7950
|
-
/* @__PURE__ */ (0,
|
|
8368
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: mergeCss4(rowBase, ts?.row), children: [
|
|
8369
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { style: labelStyle, children: [
|
|
7951
8370
|
overallLabel,
|
|
7952
8371
|
":"
|
|
7953
8372
|
] }),
|
|
7954
|
-
/* @__PURE__ */ (0,
|
|
8373
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { style: valueStyle, children: overall.toLocaleString() })
|
|
7955
8374
|
] }),
|
|
7956
|
-
/* @__PURE__ */ (0,
|
|
7957
|
-
/* @__PURE__ */ (0,
|
|
8375
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: mergeCss4(rowBase, ts?.row), children: [
|
|
8376
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7958
8377
|
"span",
|
|
7959
8378
|
{
|
|
7960
8379
|
style: mergeCss4({ ...dotBase, backgroundColor: colors.walkIns })
|
|
7961
8380
|
}
|
|
7962
8381
|
),
|
|
7963
|
-
/* @__PURE__ */ (0,
|
|
8382
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
7964
8383
|
"span",
|
|
7965
8384
|
{
|
|
7966
8385
|
style: mergeCss4(
|
|
@@ -7973,7 +8392,7 @@ function ConversionTooltip({
|
|
|
7973
8392
|
]
|
|
7974
8393
|
}
|
|
7975
8394
|
),
|
|
7976
|
-
/* @__PURE__ */ (0,
|
|
8395
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7977
8396
|
"span",
|
|
7978
8397
|
{
|
|
7979
8398
|
style: mergeCss4(
|
|
@@ -7984,7 +8403,7 @@ function ConversionTooltip({
|
|
|
7984
8403
|
}
|
|
7985
8404
|
)
|
|
7986
8405
|
] }),
|
|
7987
|
-
/* @__PURE__ */ (0,
|
|
8406
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
7988
8407
|
"div",
|
|
7989
8408
|
{
|
|
7990
8409
|
style: mergeCss4(
|
|
@@ -7992,13 +8411,13 @@ function ConversionTooltip({
|
|
|
7992
8411
|
ts?.row
|
|
7993
8412
|
),
|
|
7994
8413
|
children: [
|
|
7995
|
-
/* @__PURE__ */ (0,
|
|
8414
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7996
8415
|
"span",
|
|
7997
8416
|
{
|
|
7998
8417
|
style: mergeCss4({ ...dotBase, backgroundColor: colors.passerby })
|
|
7999
8418
|
}
|
|
8000
8419
|
),
|
|
8001
|
-
/* @__PURE__ */ (0,
|
|
8420
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8002
8421
|
"span",
|
|
8003
8422
|
{
|
|
8004
8423
|
style: mergeCss4(
|
|
@@ -8011,7 +8430,7 @@ function ConversionTooltip({
|
|
|
8011
8430
|
]
|
|
8012
8431
|
}
|
|
8013
8432
|
),
|
|
8014
|
-
/* @__PURE__ */ (0,
|
|
8433
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8015
8434
|
"span",
|
|
8016
8435
|
{
|
|
8017
8436
|
style: mergeCss4(
|
|
@@ -8024,14 +8443,14 @@ function ConversionTooltip({
|
|
|
8024
8443
|
]
|
|
8025
8444
|
}
|
|
8026
8445
|
),
|
|
8027
|
-
showConv ? /* @__PURE__ */ (0,
|
|
8028
|
-
/* @__PURE__ */ (0,
|
|
8446
|
+
showConv ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: mergeCss4({ ...rowBase, marginBottom: 0 }, ts?.row), children: [
|
|
8447
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8029
8448
|
"span",
|
|
8030
8449
|
{
|
|
8031
8450
|
style: mergeCss4({ ...dotBase, backgroundColor: colors.conversion })
|
|
8032
8451
|
}
|
|
8033
8452
|
),
|
|
8034
|
-
/* @__PURE__ */ (0,
|
|
8453
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8035
8454
|
"span",
|
|
8036
8455
|
{
|
|
8037
8456
|
style: mergeCss4(
|
|
@@ -8044,7 +8463,7 @@ function ConversionTooltip({
|
|
|
8044
8463
|
]
|
|
8045
8464
|
}
|
|
8046
8465
|
),
|
|
8047
|
-
/* @__PURE__ */ (0,
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8048
8467
|
"span",
|
|
8049
8468
|
{
|
|
8050
8469
|
style: mergeCss4(
|
|
@@ -8118,7 +8537,8 @@ function PasserbyConversion({
|
|
|
8118
8537
|
emptyStatePlaceholderProps,
|
|
8119
8538
|
isChartAnimationActive = true,
|
|
8120
8539
|
chartAnimationDuration = 400,
|
|
8121
|
-
scrollChartToEndOnDataChange = true
|
|
8540
|
+
scrollChartToEndOnDataChange = true,
|
|
8541
|
+
xAxisTickAngle = 0
|
|
8122
8542
|
}) {
|
|
8123
8543
|
const [activeIndex, setActiveIndex] = React14.useState(null);
|
|
8124
8544
|
const handleBarMouseEnter = React14.useCallback((_, index) => {
|
|
@@ -8159,17 +8579,6 @@ function PasserbyConversion({
|
|
|
8159
8579
|
[processedData]
|
|
8160
8580
|
);
|
|
8161
8581
|
const showConversionLine = showConversionLineProp !== void 0 ? showConversionLineProp : hasConversionData;
|
|
8162
|
-
const resolvedMaxBarSize = React14.useMemo(() => {
|
|
8163
|
-
if (maxBarSizeProp !== void 0) {
|
|
8164
|
-
return maxBarSizeProp;
|
|
8165
|
-
}
|
|
8166
|
-
const categoryCap = minWidthPerCategory > 0 ? minWidthPerCategory : defaultMinWidthPerCategory3;
|
|
8167
|
-
if (categoryCap <= 2 * defaultMaxBarThickness3) {
|
|
8168
|
-
return Math.min(categoryCap, defaultMaxBarThickness3);
|
|
8169
|
-
}
|
|
8170
|
-
const perBarIdeal = Math.max(8, Math.floor(categoryCap / 2 * 0.92));
|
|
8171
|
-
return Math.min(perBarIdeal, categoryCap);
|
|
8172
|
-
}, [maxBarSizeProp, minWidthPerCategory]);
|
|
8173
8582
|
const categoryScrollActive = React14.useMemo(() => {
|
|
8174
8583
|
if (minWidthPerCategory <= 0) {
|
|
8175
8584
|
return false;
|
|
@@ -8217,6 +8626,31 @@ function PasserbyConversion({
|
|
|
8217
8626
|
}
|
|
8218
8627
|
return Math.max(chartInnerMinWidthPx, containerWidth);
|
|
8219
8628
|
}, [chartInnerMinWidthPx, containerWidth]);
|
|
8629
|
+
const targetBarWidth = maxBarSizeProp ?? defaultMaxBarThickness3;
|
|
8630
|
+
const resolvedPlotGutterPx = React14.useMemo(() => {
|
|
8631
|
+
const leftAxisWidth = 44;
|
|
8632
|
+
const rightAxisWidth = showConversionLine ? 44 : 0;
|
|
8633
|
+
const leftMargin = chartMarginProp?.left ?? defaultChartMargin3.left;
|
|
8634
|
+
const rightMargin = chartMarginProp?.right ?? (showConversionLine ? 52 : defaultChartMargin3.right);
|
|
8635
|
+
return leftMargin + leftAxisWidth + rightAxisWidth + rightMargin;
|
|
8636
|
+
}, [showConversionLine, chartMarginProp]);
|
|
8637
|
+
const resolvedBarCategoryGapPx = React14.useMemo(() => {
|
|
8638
|
+
const effectiveWidth = chartWidthPx > 0 ? chartWidthPx : containerWidth;
|
|
8639
|
+
if (effectiveWidth <= 0) return 4;
|
|
8640
|
+
const n = Math.max(processedData.length, 1);
|
|
8641
|
+
const plotWidth = effectiveWidth - resolvedPlotGutterPx;
|
|
8642
|
+
const bandSize = plotWidth / n;
|
|
8643
|
+
const numericBarGap = typeof barGap === "number" ? barGap : 0;
|
|
8644
|
+
return Math.max(0, (bandSize - targetBarWidth * 2 - numericBarGap) / 2);
|
|
8645
|
+
}, [
|
|
8646
|
+
processedData.length,
|
|
8647
|
+
chartWidthPx,
|
|
8648
|
+
containerWidth,
|
|
8649
|
+
barGap,
|
|
8650
|
+
targetBarWidth,
|
|
8651
|
+
resolvedPlotGutterPx
|
|
8652
|
+
]);
|
|
8653
|
+
const resolvedMaxBarSize = targetBarWidth;
|
|
8220
8654
|
const chartColors = React14.useMemo(
|
|
8221
8655
|
() => ({
|
|
8222
8656
|
...defaultChartColors3,
|
|
@@ -8273,7 +8707,7 @@ function PasserbyConversion({
|
|
|
8273
8707
|
chartColors.conversionLineStroke,
|
|
8274
8708
|
showConversionLine
|
|
8275
8709
|
]);
|
|
8276
|
-
return /* @__PURE__ */ (0,
|
|
8710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8277
8711
|
import_Box11.default,
|
|
8278
8712
|
{
|
|
8279
8713
|
sx: sxChain3(
|
|
@@ -8290,8 +8724,8 @@ function PasserbyConversion({
|
|
|
8290
8724
|
},
|
|
8291
8725
|
cardSx
|
|
8292
8726
|
),
|
|
8293
|
-
children: /* @__PURE__ */ (0,
|
|
8294
|
-
/* @__PURE__ */ (0,
|
|
8727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_Stack9.default, { spacing: 2, sx: sxChain3({ minWidth: 0 }, stackSx), children: [
|
|
8728
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8295
8729
|
import_Box11.default,
|
|
8296
8730
|
{
|
|
8297
8731
|
sx: sxChain3(
|
|
@@ -8306,7 +8740,7 @@ function PasserbyConversion({
|
|
|
8306
8740
|
titleRowSx
|
|
8307
8741
|
),
|
|
8308
8742
|
children: [
|
|
8309
|
-
/* @__PURE__ */ (0,
|
|
8743
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8310
8744
|
import_Typography8.default,
|
|
8311
8745
|
{
|
|
8312
8746
|
component: "h2",
|
|
@@ -8324,12 +8758,12 @@ function PasserbyConversion({
|
|
|
8324
8758
|
children: title
|
|
8325
8759
|
}
|
|
8326
8760
|
),
|
|
8327
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
8761
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_Box11.default, { sx: { flexShrink: 0, display: "flex", alignItems: "center" }, children: headerActions }) : null
|
|
8328
8762
|
]
|
|
8329
8763
|
}
|
|
8330
8764
|
),
|
|
8331
|
-
/* @__PURE__ */ (0,
|
|
8332
|
-
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0,
|
|
8765
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_Divider4.default, { sx: sxChain3({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
8766
|
+
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8333
8767
|
import_Box11.default,
|
|
8334
8768
|
{
|
|
8335
8769
|
sx: sxChain3(
|
|
@@ -8345,14 +8779,14 @@ function PasserbyConversion({
|
|
|
8345
8779
|
},
|
|
8346
8780
|
legendRowSx
|
|
8347
8781
|
),
|
|
8348
|
-
children: legendItems.map((item) => /* @__PURE__ */ (0,
|
|
8782
|
+
children: legendItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8349
8783
|
import_Stack9.default,
|
|
8350
8784
|
{
|
|
8351
8785
|
direction: "row",
|
|
8352
8786
|
alignItems: "center",
|
|
8353
8787
|
sx: sxChain3({ gap: 1 }, legendItemSx),
|
|
8354
8788
|
children: [
|
|
8355
|
-
item.isLine ? /* @__PURE__ */ (0,
|
|
8789
|
+
item.isLine ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8356
8790
|
import_Box11.default,
|
|
8357
8791
|
{
|
|
8358
8792
|
sx: sxChain3(
|
|
@@ -8367,7 +8801,7 @@ function PasserbyConversion({
|
|
|
8367
8801
|
legendSwatchSx
|
|
8368
8802
|
)
|
|
8369
8803
|
}
|
|
8370
|
-
) : /* @__PURE__ */ (0,
|
|
8804
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8371
8805
|
import_Box11.default,
|
|
8372
8806
|
{
|
|
8373
8807
|
sx: sxChain3(
|
|
@@ -8382,7 +8816,7 @@ function PasserbyConversion({
|
|
|
8382
8816
|
)
|
|
8383
8817
|
}
|
|
8384
8818
|
),
|
|
8385
|
-
/* @__PURE__ */ (0,
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8386
8820
|
import_Typography8.default,
|
|
8387
8821
|
{
|
|
8388
8822
|
sx: sxChain3(
|
|
@@ -8403,7 +8837,7 @@ function PasserbyConversion({
|
|
|
8403
8837
|
))
|
|
8404
8838
|
}
|
|
8405
8839
|
) : null,
|
|
8406
|
-
/* @__PURE__ */ (0,
|
|
8840
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8407
8841
|
import_Box11.default,
|
|
8408
8842
|
{
|
|
8409
8843
|
ref: scrollRef,
|
|
@@ -8419,7 +8853,7 @@ function PasserbyConversion({
|
|
|
8419
8853
|
},
|
|
8420
8854
|
chartScrollAreaSx
|
|
8421
8855
|
),
|
|
8422
|
-
children: hasMeaningfulData ? /* @__PURE__ */ (0,
|
|
8856
|
+
children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8423
8857
|
import_recharts3.ComposedChart,
|
|
8424
8858
|
{
|
|
8425
8859
|
width: chartWidthPx,
|
|
@@ -8428,10 +8862,11 @@ function PasserbyConversion({
|
|
|
8428
8862
|
margin: chartMargin,
|
|
8429
8863
|
maxBarSize: resolvedMaxBarSize,
|
|
8430
8864
|
barGap,
|
|
8865
|
+
barCategoryGap: resolvedBarCategoryGapPx,
|
|
8431
8866
|
style: { overflow: "visible" },
|
|
8432
8867
|
onMouseLeave: handleChartMouseLeave,
|
|
8433
8868
|
children: [
|
|
8434
|
-
/* @__PURE__ */ (0,
|
|
8869
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8435
8870
|
import_recharts3.CartesianGrid,
|
|
8436
8871
|
{
|
|
8437
8872
|
strokeDasharray: "3 3",
|
|
@@ -8440,23 +8875,20 @@ function PasserbyConversion({
|
|
|
8440
8875
|
stroke: chartColors.cartesianGridStroke
|
|
8441
8876
|
}
|
|
8442
8877
|
),
|
|
8443
|
-
/* @__PURE__ */ (0,
|
|
8878
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8444
8879
|
import_recharts3.XAxis,
|
|
8445
8880
|
{
|
|
8446
8881
|
dataKey: "name",
|
|
8447
8882
|
xAxisId: "bottom",
|
|
8448
|
-
angle: -42,
|
|
8449
|
-
textAnchor: "end",
|
|
8450
8883
|
interval: 0,
|
|
8451
|
-
height:
|
|
8452
|
-
tickMargin:
|
|
8453
|
-
|
|
8454
|
-
tick: { fontSize: 12 },
|
|
8884
|
+
height: 68,
|
|
8885
|
+
tickMargin: 10,
|
|
8886
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MultiLineTick3, { angle: xAxisTickAngle }),
|
|
8455
8887
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
8456
8888
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
8457
8889
|
}
|
|
8458
8890
|
),
|
|
8459
|
-
/* @__PURE__ */ (0,
|
|
8891
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8460
8892
|
import_recharts3.YAxis,
|
|
8461
8893
|
{
|
|
8462
8894
|
yAxisId: "left",
|
|
@@ -8468,7 +8900,7 @@ function PasserbyConversion({
|
|
|
8468
8900
|
width: 44
|
|
8469
8901
|
}
|
|
8470
8902
|
),
|
|
8471
|
-
showConversionLine ? /* @__PURE__ */ (0,
|
|
8903
|
+
showConversionLine ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8472
8904
|
import_recharts3.YAxis,
|
|
8473
8905
|
{
|
|
8474
8906
|
yAxisId: "right",
|
|
@@ -8495,7 +8927,7 @@ function PasserbyConversion({
|
|
|
8495
8927
|
} : {}
|
|
8496
8928
|
}
|
|
8497
8929
|
) : null,
|
|
8498
|
-
/* @__PURE__ */ (0,
|
|
8930
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8499
8931
|
import_recharts3.Tooltip,
|
|
8500
8932
|
{
|
|
8501
8933
|
cursor: false,
|
|
@@ -8507,9 +8939,9 @@ function PasserbyConversion({
|
|
|
8507
8939
|
rows: processedData,
|
|
8508
8940
|
showConversionLine
|
|
8509
8941
|
});
|
|
8510
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
8942
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: customTooltip });
|
|
8511
8943
|
}
|
|
8512
|
-
return /* @__PURE__ */ (0,
|
|
8944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8513
8945
|
ConversionTooltip,
|
|
8514
8946
|
{
|
|
8515
8947
|
...tooltipProps,
|
|
@@ -8531,7 +8963,7 @@ function PasserbyConversion({
|
|
|
8531
8963
|
}
|
|
8532
8964
|
}
|
|
8533
8965
|
),
|
|
8534
|
-
/* @__PURE__ */ (0,
|
|
8966
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8535
8967
|
import_recharts3.Bar,
|
|
8536
8968
|
{
|
|
8537
8969
|
yAxisId: "left",
|
|
@@ -8544,7 +8976,7 @@ function PasserbyConversion({
|
|
|
8544
8976
|
radius: [2, 2, 0, 0],
|
|
8545
8977
|
onMouseEnter: handleBarMouseEnter,
|
|
8546
8978
|
children: [
|
|
8547
|
-
processedData.map((_, i) => /* @__PURE__ */ (0,
|
|
8979
|
+
processedData.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8548
8980
|
import_recharts3.Cell,
|
|
8549
8981
|
{
|
|
8550
8982
|
fill: chartColors.passerbyBarFill,
|
|
@@ -8552,10 +8984,10 @@ function PasserbyConversion({
|
|
|
8552
8984
|
},
|
|
8553
8985
|
`pb-${i}`
|
|
8554
8986
|
)),
|
|
8555
|
-
showBarValueLabels ? /* @__PURE__ */ (0,
|
|
8987
|
+
showBarValueLabels ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8556
8988
|
import_recharts3.LabelList,
|
|
8557
8989
|
{
|
|
8558
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
8990
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8559
8991
|
BarTopLabel,
|
|
8560
8992
|
{
|
|
8561
8993
|
...props,
|
|
@@ -8567,7 +8999,7 @@ function PasserbyConversion({
|
|
|
8567
8999
|
]
|
|
8568
9000
|
}
|
|
8569
9001
|
),
|
|
8570
|
-
/* @__PURE__ */ (0,
|
|
9002
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8571
9003
|
import_recharts3.Bar,
|
|
8572
9004
|
{
|
|
8573
9005
|
yAxisId: "left",
|
|
@@ -8580,7 +9012,7 @@ function PasserbyConversion({
|
|
|
8580
9012
|
radius: [2, 2, 0, 0],
|
|
8581
9013
|
onMouseEnter: handleBarMouseEnter,
|
|
8582
9014
|
children: [
|
|
8583
|
-
processedData.map((_, i) => /* @__PURE__ */ (0,
|
|
9015
|
+
processedData.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8584
9016
|
import_recharts3.Cell,
|
|
8585
9017
|
{
|
|
8586
9018
|
fill: chartColors.walkInsBarFill,
|
|
@@ -8588,10 +9020,10 @@ function PasserbyConversion({
|
|
|
8588
9020
|
},
|
|
8589
9021
|
`wi-${i}`
|
|
8590
9022
|
)),
|
|
8591
|
-
showBarValueLabels ? /* @__PURE__ */ (0,
|
|
9023
|
+
showBarValueLabels ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8592
9024
|
import_recharts3.LabelList,
|
|
8593
9025
|
{
|
|
8594
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
9026
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8595
9027
|
BarTopLabel,
|
|
8596
9028
|
{
|
|
8597
9029
|
...props,
|
|
@@ -8603,7 +9035,7 @@ function PasserbyConversion({
|
|
|
8603
9035
|
]
|
|
8604
9036
|
}
|
|
8605
9037
|
),
|
|
8606
|
-
showConversionLine ? /* @__PURE__ */ (0,
|
|
9038
|
+
showConversionLine ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8607
9039
|
import_recharts3.Line,
|
|
8608
9040
|
{
|
|
8609
9041
|
yAxisId: "right",
|
|
@@ -8625,7 +9057,7 @@ function PasserbyConversion({
|
|
|
8625
9057
|
) : null
|
|
8626
9058
|
]
|
|
8627
9059
|
}
|
|
8628
|
-
) : /* @__PURE__ */ (0,
|
|
9060
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8629
9061
|
import_Box11.default,
|
|
8630
9062
|
{
|
|
8631
9063
|
sx: sxChain3(
|
|
@@ -8637,7 +9069,7 @@ function PasserbyConversion({
|
|
|
8637
9069
|
},
|
|
8638
9070
|
emptyStateSx
|
|
8639
9071
|
),
|
|
8640
|
-
children: /* @__PURE__ */ (0,
|
|
9072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8641
9073
|
ChartEmptyState,
|
|
8642
9074
|
{
|
|
8643
9075
|
minHeight: chartHeight,
|
|
@@ -8661,7 +9093,7 @@ var import_Typography9 = __toESM(require("@mui/material/Typography"));
|
|
|
8661
9093
|
var import_useMediaQuery = __toESM(require("@mui/material/useMediaQuery"));
|
|
8662
9094
|
var React15 = __toESM(require("react"));
|
|
8663
9095
|
var import_recharts4 = require("recharts");
|
|
8664
|
-
var
|
|
9096
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
8665
9097
|
var OLY_LIFESTYLE_STRONG_TITLE_COLOR = "#0f172a";
|
|
8666
9098
|
var OLY_LIFESTYLE_LEGEND_VALUE_COLOR = "#64748B";
|
|
8667
9099
|
var walkinPieSizeDefaults = { xs: 180, sm: 220, md: 260 };
|
|
@@ -8735,7 +9167,7 @@ function WalkinPieTooltip({
|
|
|
8735
9167
|
return null;
|
|
8736
9168
|
}
|
|
8737
9169
|
const pct = sliceTotal > 0 ? Math.round(datum.value / sliceTotal * 100) : 0;
|
|
8738
|
-
return /* @__PURE__ */ (0,
|
|
9170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8739
9171
|
import_Box12.default,
|
|
8740
9172
|
{
|
|
8741
9173
|
sx: {
|
|
@@ -8748,8 +9180,8 @@ function WalkinPieTooltip({
|
|
|
8748
9180
|
minWidth: 168
|
|
8749
9181
|
},
|
|
8750
9182
|
children: [
|
|
8751
|
-
/* @__PURE__ */ (0,
|
|
8752
|
-
/* @__PURE__ */ (0,
|
|
9183
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_Stack10.default, { direction: "row", alignItems: "center", spacing: 1, sx: { mb: 0.75 }, children: [
|
|
9184
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8753
9185
|
import_Box12.default,
|
|
8754
9186
|
{
|
|
8755
9187
|
sx: {
|
|
@@ -8761,7 +9193,7 @@ function WalkinPieTooltip({
|
|
|
8761
9193
|
}
|
|
8762
9194
|
}
|
|
8763
9195
|
),
|
|
8764
|
-
/* @__PURE__ */ (0,
|
|
9196
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8765
9197
|
import_Typography9.default,
|
|
8766
9198
|
{
|
|
8767
9199
|
sx: {
|
|
@@ -8774,7 +9206,7 @@ function WalkinPieTooltip({
|
|
|
8774
9206
|
}
|
|
8775
9207
|
)
|
|
8776
9208
|
] }),
|
|
8777
|
-
/* @__PURE__ */ (0,
|
|
9209
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8778
9210
|
import_Typography9.default,
|
|
8779
9211
|
{
|
|
8780
9212
|
variant: "body2",
|
|
@@ -8819,7 +9251,7 @@ function WalkinPiePercentLabel(props) {
|
|
|
8819
9251
|
const rad = -midAngle * Math.PI / 180;
|
|
8820
9252
|
const x = cx + labelRadius * Math.cos(rad);
|
|
8821
9253
|
const y = cy + labelRadius * Math.sin(rad);
|
|
8822
|
-
return /* @__PURE__ */ (0,
|
|
9254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8823
9255
|
"text",
|
|
8824
9256
|
{
|
|
8825
9257
|
x,
|
|
@@ -8852,10 +9284,10 @@ function WalkinPieChart({
|
|
|
8852
9284
|
const tooltipTitleSize = resolveFontSize(typography?.tooltipTitle, 13);
|
|
8853
9285
|
const tooltipValueSize = resolveFontSize(typography?.tooltipValue, 12);
|
|
8854
9286
|
if (total <= 0) {
|
|
8855
|
-
return /* @__PURE__ */ (0,
|
|
9287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChartEmptyState, { minHeight: size, ...emptyStatePlaceholderProps });
|
|
8856
9288
|
}
|
|
8857
9289
|
const outerRadius = size * 0.42;
|
|
8858
|
-
return /* @__PURE__ */ (0,
|
|
9290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8859
9291
|
import_Box12.default,
|
|
8860
9292
|
{
|
|
8861
9293
|
role: "img",
|
|
@@ -8866,8 +9298,8 @@ function WalkinPieChart({
|
|
|
8866
9298
|
lineHeight: 0,
|
|
8867
9299
|
"& .recharts-surface:focus": { outline: "none" }
|
|
8868
9300
|
},
|
|
8869
|
-
children: /* @__PURE__ */ (0,
|
|
8870
|
-
/* @__PURE__ */ (0,
|
|
9301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_recharts4.ResponsiveContainer, { width: size, height: size, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_recharts4.PieChart, { children: [
|
|
9302
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8871
9303
|
import_recharts4.Tooltip,
|
|
8872
9304
|
{
|
|
8873
9305
|
content: (tooltipProps) => {
|
|
@@ -8878,9 +9310,9 @@ function WalkinPieChart({
|
|
|
8878
9310
|
total,
|
|
8879
9311
|
activeTabId
|
|
8880
9312
|
});
|
|
8881
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
9313
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: customTooltip });
|
|
8882
9314
|
}
|
|
8883
|
-
return /* @__PURE__ */ (0,
|
|
9315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8884
9316
|
WalkinPieTooltip,
|
|
8885
9317
|
{
|
|
8886
9318
|
...tooltipProps,
|
|
@@ -8893,7 +9325,7 @@ function WalkinPieChart({
|
|
|
8893
9325
|
wrapperStyle: { outline: "none", zIndex: 2 }
|
|
8894
9326
|
}
|
|
8895
9327
|
),
|
|
8896
|
-
/* @__PURE__ */ (0,
|
|
9328
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8897
9329
|
import_recharts4.Pie,
|
|
8898
9330
|
{
|
|
8899
9331
|
data: pieData,
|
|
@@ -8910,17 +9342,17 @@ function WalkinPieChart({
|
|
|
8910
9342
|
labelLine: false,
|
|
8911
9343
|
isAnimationActive: isChartAnimationActive,
|
|
8912
9344
|
animationDuration: chartAnimationDuration,
|
|
8913
|
-
label: (labelProps) => /* @__PURE__ */ (0,
|
|
9345
|
+
label: (labelProps) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8914
9346
|
WalkinPiePercentLabel,
|
|
8915
9347
|
{
|
|
8916
9348
|
...labelProps,
|
|
8917
9349
|
fontSize: piePercentSize
|
|
8918
9350
|
}
|
|
8919
9351
|
),
|
|
8920
|
-
children: pieData.map((entry) => /* @__PURE__ */ (0,
|
|
9352
|
+
children: pieData.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_recharts4.Cell, { fill: entry.color, stroke: "none" }, entry.id))
|
|
8921
9353
|
}
|
|
8922
9354
|
)
|
|
8923
|
-
] }) })
|
|
9355
|
+
] }, activeTabId) })
|
|
8924
9356
|
}
|
|
8925
9357
|
);
|
|
8926
9358
|
}
|
|
@@ -8945,7 +9377,7 @@ var WalkinAnalysis = ({
|
|
|
8945
9377
|
}) => {
|
|
8946
9378
|
const resolvedPieSize = useWalkinResolvedPieSize(pieSize);
|
|
8947
9379
|
const total = slices.reduce((sum, s) => sum + s.count, 0);
|
|
8948
|
-
return /* @__PURE__ */ (0,
|
|
9380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8949
9381
|
import_Box12.default,
|
|
8950
9382
|
{
|
|
8951
9383
|
sx: {
|
|
@@ -8958,8 +9390,8 @@ var WalkinAnalysis = ({
|
|
|
8958
9390
|
boxSizing: "border-box",
|
|
8959
9391
|
...cardSx
|
|
8960
9392
|
},
|
|
8961
|
-
children: /* @__PURE__ */ (0,
|
|
8962
|
-
/* @__PURE__ */ (0,
|
|
9393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_Stack10.default, { spacing: 2.5, children: [
|
|
9394
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8963
9395
|
import_Stack10.default,
|
|
8964
9396
|
{
|
|
8965
9397
|
direction: "row",
|
|
@@ -8970,7 +9402,7 @@ var WalkinAnalysis = ({
|
|
|
8970
9402
|
sx: [customization.titleRowStackSx]
|
|
8971
9403
|
} : {},
|
|
8972
9404
|
children: [
|
|
8973
|
-
/* @__PURE__ */ (0,
|
|
9405
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8974
9406
|
import_Typography9.default,
|
|
8975
9407
|
{
|
|
8976
9408
|
component: "h2",
|
|
@@ -8987,11 +9419,11 @@ var WalkinAnalysis = ({
|
|
|
8987
9419
|
children: title
|
|
8988
9420
|
}
|
|
8989
9421
|
),
|
|
8990
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
9422
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_Box12.default, { sx: { flexShrink: 0 }, children: headerActions }) : null
|
|
8991
9423
|
]
|
|
8992
9424
|
}
|
|
8993
9425
|
),
|
|
8994
|
-
/* @__PURE__ */ (0,
|
|
9426
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8995
9427
|
ChartWidgetSegmentedTabs,
|
|
8996
9428
|
{
|
|
8997
9429
|
tabs,
|
|
@@ -9003,7 +9435,7 @@ var WalkinAnalysis = ({
|
|
|
9003
9435
|
rootSx: segmentedTabsSx
|
|
9004
9436
|
}
|
|
9005
9437
|
),
|
|
9006
|
-
/* @__PURE__ */ (0,
|
|
9438
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9007
9439
|
import_Stack10.default,
|
|
9008
9440
|
{
|
|
9009
9441
|
direction: { xs: "column", sm: "row" },
|
|
@@ -9015,14 +9447,14 @@ var WalkinAnalysis = ({
|
|
|
9015
9447
|
...customization?.chartLegendRowSx != null ? [customization.chartLegendRowSx] : []
|
|
9016
9448
|
],
|
|
9017
9449
|
children: [
|
|
9018
|
-
/* @__PURE__ */ (0,
|
|
9450
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9019
9451
|
import_Box12.default,
|
|
9020
9452
|
{
|
|
9021
9453
|
sx: [
|
|
9022
9454
|
{ flexShrink: 0, lineHeight: 0 },
|
|
9023
9455
|
...customization?.pieChartBoxSx != null ? [customization.pieChartBoxSx] : []
|
|
9024
9456
|
],
|
|
9025
|
-
children: /* @__PURE__ */ (0,
|
|
9457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9026
9458
|
WalkinPieChart,
|
|
9027
9459
|
{
|
|
9028
9460
|
slices,
|
|
@@ -9037,7 +9469,7 @@ var WalkinAnalysis = ({
|
|
|
9037
9469
|
)
|
|
9038
9470
|
}
|
|
9039
9471
|
),
|
|
9040
|
-
/* @__PURE__ */ (0,
|
|
9472
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9041
9473
|
import_Stack10.default,
|
|
9042
9474
|
{
|
|
9043
9475
|
spacing: 2,
|
|
@@ -9052,8 +9484,8 @@ var WalkinAnalysis = ({
|
|
|
9052
9484
|
],
|
|
9053
9485
|
children: slices.map((slice) => {
|
|
9054
9486
|
const pct = total > 0 ? Math.round(slice.count / total * 100) : 0;
|
|
9055
|
-
return /* @__PURE__ */ (0,
|
|
9056
|
-
/* @__PURE__ */ (0,
|
|
9487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_Stack10.default, { spacing: 0.75, children: [
|
|
9488
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9057
9489
|
import_Typography9.default,
|
|
9058
9490
|
{
|
|
9059
9491
|
sx: [
|
|
@@ -9071,8 +9503,8 @@ var WalkinAnalysis = ({
|
|
|
9071
9503
|
children: slice.label
|
|
9072
9504
|
}
|
|
9073
9505
|
),
|
|
9074
|
-
/* @__PURE__ */ (0,
|
|
9075
|
-
/* @__PURE__ */ (0,
|
|
9506
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_Stack10.default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
9507
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9076
9508
|
import_Box12.default,
|
|
9077
9509
|
{
|
|
9078
9510
|
sx: {
|
|
@@ -9084,7 +9516,7 @@ var WalkinAnalysis = ({
|
|
|
9084
9516
|
}
|
|
9085
9517
|
}
|
|
9086
9518
|
),
|
|
9087
|
-
/* @__PURE__ */ (0,
|
|
9519
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9088
9520
|
import_Typography9.default,
|
|
9089
9521
|
{
|
|
9090
9522
|
variant: "body2",
|
|
@@ -9106,7 +9538,7 @@ var WalkinAnalysis = ({
|
|
|
9106
9538
|
]
|
|
9107
9539
|
}
|
|
9108
9540
|
),
|
|
9109
|
-
slice.legendInfo ? /* @__PURE__ */ (0,
|
|
9541
|
+
slice.legendInfo ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_Box12.default, { sx: { display: "inline-flex", flexShrink: 0 }, children: slice.legendInfo }) : null
|
|
9110
9542
|
] })
|
|
9111
9543
|
] }, slice.id);
|
|
9112
9544
|
})
|
|
@@ -9127,7 +9559,7 @@ var import_Stack11 = __toESM(require("@mui/material/Stack"));
|
|
|
9127
9559
|
var import_Typography10 = __toESM(require("@mui/material/Typography"));
|
|
9128
9560
|
var React16 = __toESM(require("react"));
|
|
9129
9561
|
var import_recharts5 = require("recharts");
|
|
9130
|
-
var
|
|
9562
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9131
9563
|
var defaultFfGrowthTooltipFooterNote = "*This FF Growth % compares today's hourly FF with the same hours on this date last year.";
|
|
9132
9564
|
var OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX4 = 430;
|
|
9133
9565
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME4 = {
|
|
@@ -9159,7 +9591,7 @@ function tooltipDatumFromPayload2(payload) {
|
|
|
9159
9591
|
function GrowthDirectionIcon({ direction }) {
|
|
9160
9592
|
const bg = direction === "up" ? "#22C55E" : "#EF4444";
|
|
9161
9593
|
const glyph = direction === "up" ? "\u25B2" : "\u25BC";
|
|
9162
|
-
return /* @__PURE__ */ (0,
|
|
9594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9163
9595
|
"span",
|
|
9164
9596
|
{
|
|
9165
9597
|
style: {
|
|
@@ -9174,7 +9606,7 @@ function GrowthDirectionIcon({ direction }) {
|
|
|
9174
9606
|
flexShrink: 0
|
|
9175
9607
|
},
|
|
9176
9608
|
"aria-hidden": true,
|
|
9177
|
-
children: /* @__PURE__ */ (0,
|
|
9609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9178
9610
|
"span",
|
|
9179
9611
|
{
|
|
9180
9612
|
style: {
|
|
@@ -9204,6 +9636,31 @@ function formatBarLabel4(value) {
|
|
|
9204
9636
|
}
|
|
9205
9637
|
return String(value);
|
|
9206
9638
|
}
|
|
9639
|
+
function MultiLineTick4({
|
|
9640
|
+
x = 0,
|
|
9641
|
+
y = 0,
|
|
9642
|
+
payload,
|
|
9643
|
+
angle = -42,
|
|
9644
|
+
textAnchor = "end",
|
|
9645
|
+
fontSize = 12
|
|
9646
|
+
}) {
|
|
9647
|
+
if (!payload?.value) return null;
|
|
9648
|
+
const lines = String(payload.value).split("\n");
|
|
9649
|
+
const lineHeight = fontSize * 1.3;
|
|
9650
|
+
const isHorizontal = angle === 0;
|
|
9651
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
9652
|
+
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
9653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9654
|
+
"text",
|
|
9655
|
+
{
|
|
9656
|
+
transform: `rotate(${angle})`,
|
|
9657
|
+
textAnchor: anchor,
|
|
9658
|
+
fontSize,
|
|
9659
|
+
fill: "#666",
|
|
9660
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
9661
|
+
}
|
|
9662
|
+
) });
|
|
9663
|
+
}
|
|
9207
9664
|
function formatYAxisTickDefault3(value) {
|
|
9208
9665
|
if (!Number.isFinite(value)) {
|
|
9209
9666
|
return "";
|
|
@@ -9216,7 +9673,7 @@ function formatYAxisTickDefault3(value) {
|
|
|
9216
9673
|
}
|
|
9217
9674
|
return String(value);
|
|
9218
9675
|
}
|
|
9219
|
-
function
|
|
9676
|
+
function toNum4(n) {
|
|
9220
9677
|
if (n === void 0) return void 0;
|
|
9221
9678
|
return typeof n === "number" ? n : Number(n);
|
|
9222
9679
|
}
|
|
@@ -9227,9 +9684,9 @@ function BarTopLabel2({
|
|
|
9227
9684
|
value,
|
|
9228
9685
|
fill
|
|
9229
9686
|
}) {
|
|
9230
|
-
const nx =
|
|
9231
|
-
const ny =
|
|
9232
|
-
const nw =
|
|
9687
|
+
const nx = toNum4(x);
|
|
9688
|
+
const ny = toNum4(y);
|
|
9689
|
+
const nw = toNum4(width);
|
|
9233
9690
|
if (nx === void 0 || ny === void 0 || nw === void 0) {
|
|
9234
9691
|
return null;
|
|
9235
9692
|
}
|
|
@@ -9238,8 +9695,8 @@ function BarTopLabel2({
|
|
|
9238
9695
|
return null;
|
|
9239
9696
|
}
|
|
9240
9697
|
const cx = nx + nw / 2;
|
|
9241
|
-
const cy = ny -
|
|
9242
|
-
return /* @__PURE__ */ (0,
|
|
9698
|
+
const cy = ny - 10;
|
|
9699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9243
9700
|
"text",
|
|
9244
9701
|
{
|
|
9245
9702
|
x: cx,
|
|
@@ -9282,7 +9739,7 @@ function TrafficTooltip({
|
|
|
9282
9739
|
const growth = typeof growthRaw === "number" && Number.isFinite(growthRaw) ? growthRaw : NaN;
|
|
9283
9740
|
const showGrowthRow = Number.isFinite(growth);
|
|
9284
9741
|
const growthDirection = !showGrowthRow ? null : growth > 0 ? "up" : growth < 0 ? "down" : null;
|
|
9285
|
-
const showFooter = hasFooterText(footerNote);
|
|
9742
|
+
const showFooter = hasFooterText(footerNote) && showGrowthRow;
|
|
9286
9743
|
const footerText = showFooter && typeof footerNote === "string" ? footerNote.trim() : "";
|
|
9287
9744
|
const ts = tooltipStyles;
|
|
9288
9745
|
const rowBase = {
|
|
@@ -9301,7 +9758,7 @@ function TrafficTooltip({
|
|
|
9301
9758
|
{ color: "#757575", fontSize: 11, fontWeight: 400 },
|
|
9302
9759
|
ts?.value
|
|
9303
9760
|
);
|
|
9304
|
-
return /* @__PURE__ */ (0,
|
|
9761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9305
9762
|
"div",
|
|
9306
9763
|
{
|
|
9307
9764
|
style: mergeCss5(
|
|
@@ -9313,7 +9770,7 @@ function TrafficTooltip({
|
|
|
9313
9770
|
ts?.wrapper
|
|
9314
9771
|
),
|
|
9315
9772
|
children: [
|
|
9316
|
-
/* @__PURE__ */ (0,
|
|
9773
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9317
9774
|
"div",
|
|
9318
9775
|
{
|
|
9319
9776
|
style: {
|
|
@@ -9331,7 +9788,7 @@ function TrafficTooltip({
|
|
|
9331
9788
|
"aria-hidden": true
|
|
9332
9789
|
}
|
|
9333
9790
|
),
|
|
9334
|
-
/* @__PURE__ */ (0,
|
|
9791
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9335
9792
|
"div",
|
|
9336
9793
|
{
|
|
9337
9794
|
style: mergeCss5(
|
|
@@ -9351,7 +9808,7 @@ function TrafficTooltip({
|
|
|
9351
9808
|
ts?.container
|
|
9352
9809
|
),
|
|
9353
9810
|
children: [
|
|
9354
|
-
/* @__PURE__ */ (0,
|
|
9811
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9355
9812
|
"div",
|
|
9356
9813
|
{
|
|
9357
9814
|
style: mergeCss5(
|
|
@@ -9364,7 +9821,7 @@ function TrafficTooltip({
|
|
|
9364
9821
|
ts?.header
|
|
9365
9822
|
),
|
|
9366
9823
|
children: [
|
|
9367
|
-
/* @__PURE__ */ (0,
|
|
9824
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9368
9825
|
"span",
|
|
9369
9826
|
{
|
|
9370
9827
|
style: mergeCss5(
|
|
@@ -9379,7 +9836,7 @@ function TrafficTooltip({
|
|
|
9379
9836
|
)
|
|
9380
9837
|
}
|
|
9381
9838
|
),
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9839
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9383
9840
|
"span",
|
|
9384
9841
|
{
|
|
9385
9842
|
style: mergeCss5(
|
|
@@ -9397,28 +9854,28 @@ function TrafficTooltip({
|
|
|
9397
9854
|
]
|
|
9398
9855
|
}
|
|
9399
9856
|
),
|
|
9400
|
-
/* @__PURE__ */ (0,
|
|
9401
|
-
/* @__PURE__ */ (0,
|
|
9857
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: mergeCss5(rowBase, ts?.row), children: [
|
|
9858
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: labelStyle, children: [
|
|
9402
9859
|
timeLabel,
|
|
9403
9860
|
":"
|
|
9404
9861
|
] }),
|
|
9405
|
-
/* @__PURE__ */ (0,
|
|
9862
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: valueStyle, children: timeDisplay })
|
|
9406
9863
|
] }),
|
|
9407
|
-
/* @__PURE__ */ (0,
|
|
9408
|
-
/* @__PURE__ */ (0,
|
|
9864
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: mergeCss5(rowBase, ts?.row), children: [
|
|
9865
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: labelStyle, children: [
|
|
9409
9866
|
currentYearLabel,
|
|
9410
9867
|
":"
|
|
9411
9868
|
] }),
|
|
9412
|
-
/* @__PURE__ */ (0,
|
|
9869
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: valueStyle, children: Number.isFinite(walk) ? walk.toLocaleString() : "\u2014" })
|
|
9413
9870
|
] }),
|
|
9414
|
-
showTrendLine && Number.isFinite(trend) ? /* @__PURE__ */ (0,
|
|
9415
|
-
/* @__PURE__ */ (0,
|
|
9871
|
+
showTrendLine && Number.isFinite(trend) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: mergeCss5(rowBase, ts?.row), children: [
|
|
9872
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: labelStyle, children: [
|
|
9416
9873
|
lastYearLabel,
|
|
9417
9874
|
":"
|
|
9418
9875
|
] }),
|
|
9419
|
-
/* @__PURE__ */ (0,
|
|
9876
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: valueStyle, children: trend.toLocaleString() })
|
|
9420
9877
|
] }) : null,
|
|
9421
|
-
showGrowthRow ? /* @__PURE__ */ (0,
|
|
9878
|
+
showGrowthRow ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9422
9879
|
"div",
|
|
9423
9880
|
{
|
|
9424
9881
|
style: mergeCss5(
|
|
@@ -9430,16 +9887,16 @@ function TrafficTooltip({
|
|
|
9430
9887
|
ts?.row
|
|
9431
9888
|
),
|
|
9432
9889
|
children: [
|
|
9433
|
-
/* @__PURE__ */ (0,
|
|
9890
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: labelStyle, children: [
|
|
9434
9891
|
growthLabel,
|
|
9435
9892
|
":"
|
|
9436
9893
|
] }),
|
|
9437
|
-
/* @__PURE__ */ (0,
|
|
9438
|
-
growthDirection ? /* @__PURE__ */ (0,
|
|
9894
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: valueStyle, children: `${Number.isInteger(growth) ? String(growth) : growth.toFixed(1)}%` }),
|
|
9895
|
+
growthDirection ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GrowthDirectionIcon, { direction: growthDirection }) : null
|
|
9439
9896
|
]
|
|
9440
9897
|
}
|
|
9441
9898
|
) : null,
|
|
9442
|
-
showFooter ? /* @__PURE__ */ (0,
|
|
9899
|
+
showFooter ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9443
9900
|
"p",
|
|
9444
9901
|
{
|
|
9445
9902
|
style: mergeCss5(
|
|
@@ -9516,7 +9973,8 @@ function WalkinTraffic({
|
|
|
9516
9973
|
yAxisTickFormatter,
|
|
9517
9974
|
isChartAnimationActive = true,
|
|
9518
9975
|
chartAnimationDuration = 400,
|
|
9519
|
-
scrollChartToEndOnDataChange = true
|
|
9976
|
+
scrollChartToEndOnDataChange = true,
|
|
9977
|
+
xAxisTickAngle = 0
|
|
9520
9978
|
}) {
|
|
9521
9979
|
const tooltipFooterNote = tooltipFooterNoteProp === void 0 ? defaultFfGrowthTooltipFooterNote : tooltipFooterNoteProp;
|
|
9522
9980
|
const processedData = React16.useMemo(
|
|
@@ -9633,7 +10091,7 @@ function WalkinTraffic({
|
|
|
9633
10091
|
showLineInLegend,
|
|
9634
10092
|
showTrendLine
|
|
9635
10093
|
]);
|
|
9636
|
-
return /* @__PURE__ */ (0,
|
|
10094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9637
10095
|
import_Box13.default,
|
|
9638
10096
|
{
|
|
9639
10097
|
sx: sxChain4(
|
|
@@ -9650,8 +10108,8 @@ function WalkinTraffic({
|
|
|
9650
10108
|
},
|
|
9651
10109
|
cardSx
|
|
9652
10110
|
),
|
|
9653
|
-
children: /* @__PURE__ */ (0,
|
|
9654
|
-
/* @__PURE__ */ (0,
|
|
10111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_Stack11.default, { spacing: 2, sx: sxChain4({ minWidth: 0 }, stackSx), children: [
|
|
10112
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9655
10113
|
import_Box13.default,
|
|
9656
10114
|
{
|
|
9657
10115
|
sx: sxChain4(
|
|
@@ -9662,7 +10120,7 @@ function WalkinTraffic({
|
|
|
9662
10120
|
titleRowSx
|
|
9663
10121
|
),
|
|
9664
10122
|
children: [
|
|
9665
|
-
headerActions ? /* @__PURE__ */ (0,
|
|
10123
|
+
headerActions ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9666
10124
|
import_Box13.default,
|
|
9667
10125
|
{
|
|
9668
10126
|
sx: {
|
|
@@ -9675,7 +10133,7 @@ function WalkinTraffic({
|
|
|
9675
10133
|
children: headerActions
|
|
9676
10134
|
}
|
|
9677
10135
|
) : null,
|
|
9678
|
-
/* @__PURE__ */ (0,
|
|
10136
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9679
10137
|
import_Typography10.default,
|
|
9680
10138
|
{
|
|
9681
10139
|
component: "h2",
|
|
@@ -9696,8 +10154,8 @@ function WalkinTraffic({
|
|
|
9696
10154
|
]
|
|
9697
10155
|
}
|
|
9698
10156
|
),
|
|
9699
|
-
/* @__PURE__ */ (0,
|
|
9700
|
-
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0,
|
|
10157
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_Divider5.default, { sx: sxChain4({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
10158
|
+
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9701
10159
|
import_Box13.default,
|
|
9702
10160
|
{
|
|
9703
10161
|
sx: sxChain4(
|
|
@@ -9713,14 +10171,14 @@ function WalkinTraffic({
|
|
|
9713
10171
|
},
|
|
9714
10172
|
legendRowSx
|
|
9715
10173
|
),
|
|
9716
|
-
children: legendItems.map((item) => /* @__PURE__ */ (0,
|
|
10174
|
+
children: legendItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9717
10175
|
import_Stack11.default,
|
|
9718
10176
|
{
|
|
9719
10177
|
direction: "row",
|
|
9720
10178
|
alignItems: "center",
|
|
9721
10179
|
sx: sxChain4({ gap: 1 }, legendItemSx),
|
|
9722
10180
|
children: [
|
|
9723
|
-
item.isLine ? /* @__PURE__ */ (0,
|
|
10181
|
+
item.isLine ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9724
10182
|
import_Box13.default,
|
|
9725
10183
|
{
|
|
9726
10184
|
sx: sxChain4(
|
|
@@ -9735,7 +10193,7 @@ function WalkinTraffic({
|
|
|
9735
10193
|
legendSwatchSx
|
|
9736
10194
|
)
|
|
9737
10195
|
}
|
|
9738
|
-
) : /* @__PURE__ */ (0,
|
|
10196
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9739
10197
|
import_Box13.default,
|
|
9740
10198
|
{
|
|
9741
10199
|
sx: sxChain4(
|
|
@@ -9750,7 +10208,7 @@ function WalkinTraffic({
|
|
|
9750
10208
|
)
|
|
9751
10209
|
}
|
|
9752
10210
|
),
|
|
9753
|
-
/* @__PURE__ */ (0,
|
|
10211
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9754
10212
|
import_Typography10.default,
|
|
9755
10213
|
{
|
|
9756
10214
|
sx: sxChain4(
|
|
@@ -9771,7 +10229,7 @@ function WalkinTraffic({
|
|
|
9771
10229
|
))
|
|
9772
10230
|
}
|
|
9773
10231
|
) : null,
|
|
9774
|
-
/* @__PURE__ */ (0,
|
|
10232
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9775
10233
|
import_Box13.default,
|
|
9776
10234
|
{
|
|
9777
10235
|
ref: scrollRef,
|
|
@@ -9787,7 +10245,7 @@ function WalkinTraffic({
|
|
|
9787
10245
|
},
|
|
9788
10246
|
chartScrollAreaSx
|
|
9789
10247
|
),
|
|
9790
|
-
children: hasMeaningfulData ? /* @__PURE__ */ (0,
|
|
10248
|
+
children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9791
10249
|
import_recharts5.ComposedChart,
|
|
9792
10250
|
{
|
|
9793
10251
|
width: chartWidthPx,
|
|
@@ -9797,7 +10255,7 @@ function WalkinTraffic({
|
|
|
9797
10255
|
maxBarSize: resolvedMaxBarSize,
|
|
9798
10256
|
style: { overflow: "visible" },
|
|
9799
10257
|
children: [
|
|
9800
|
-
/* @__PURE__ */ (0,
|
|
10258
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9801
10259
|
import_recharts5.CartesianGrid,
|
|
9802
10260
|
{
|
|
9803
10261
|
strokeDasharray: "3 3",
|
|
@@ -9806,22 +10264,19 @@ function WalkinTraffic({
|
|
|
9806
10264
|
stroke: chartColors.cartesianGridStroke
|
|
9807
10265
|
}
|
|
9808
10266
|
),
|
|
9809
|
-
/* @__PURE__ */ (0,
|
|
10267
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9810
10268
|
import_recharts5.XAxis,
|
|
9811
10269
|
{
|
|
9812
10270
|
dataKey: "name",
|
|
9813
|
-
angle: -42,
|
|
9814
|
-
textAnchor: "end",
|
|
9815
10271
|
interval: 0,
|
|
9816
|
-
height:
|
|
9817
|
-
tickMargin:
|
|
9818
|
-
|
|
9819
|
-
tick: { fontSize: 12 },
|
|
10272
|
+
height: 68,
|
|
10273
|
+
tickMargin: 10,
|
|
10274
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MultiLineTick4, { angle: xAxisTickAngle }),
|
|
9820
10275
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
9821
10276
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
9822
10277
|
}
|
|
9823
10278
|
),
|
|
9824
|
-
/* @__PURE__ */ (0,
|
|
10279
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9825
10280
|
import_recharts5.YAxis,
|
|
9826
10281
|
{
|
|
9827
10282
|
tickSize: 8,
|
|
@@ -9831,7 +10286,7 @@ function WalkinTraffic({
|
|
|
9831
10286
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
9832
10287
|
}
|
|
9833
10288
|
),
|
|
9834
|
-
/* @__PURE__ */ (0,
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9835
10290
|
import_recharts5.Tooltip,
|
|
9836
10291
|
{
|
|
9837
10292
|
cursor: false,
|
|
@@ -9843,9 +10298,9 @@ function WalkinTraffic({
|
|
|
9843
10298
|
rows: processedData,
|
|
9844
10299
|
showTrendLine
|
|
9845
10300
|
});
|
|
9846
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
10301
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: customTooltip });
|
|
9847
10302
|
}
|
|
9848
|
-
return /* @__PURE__ */ (0,
|
|
10303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9849
10304
|
TrafficTooltip,
|
|
9850
10305
|
{
|
|
9851
10306
|
...tooltipProps,
|
|
@@ -9863,7 +10318,7 @@ function WalkinTraffic({
|
|
|
9863
10318
|
}
|
|
9864
10319
|
}
|
|
9865
10320
|
),
|
|
9866
|
-
/* @__PURE__ */ (0,
|
|
10321
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9867
10322
|
import_recharts5.Bar,
|
|
9868
10323
|
{
|
|
9869
10324
|
dataKey: BAR_KEY,
|
|
@@ -9872,10 +10327,10 @@ function WalkinTraffic({
|
|
|
9872
10327
|
isAnimationActive: isChartAnimationActive,
|
|
9873
10328
|
animationDuration: chartAnimationDuration,
|
|
9874
10329
|
radius: [2, 2, 0, 0],
|
|
9875
|
-
children: showBarValueLabels ? /* @__PURE__ */ (0,
|
|
10330
|
+
children: showBarValueLabels ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9876
10331
|
import_recharts5.LabelList,
|
|
9877
10332
|
{
|
|
9878
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
10333
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9879
10334
|
BarTopLabel2,
|
|
9880
10335
|
{
|
|
9881
10336
|
...props,
|
|
@@ -9886,7 +10341,7 @@ function WalkinTraffic({
|
|
|
9886
10341
|
) : null
|
|
9887
10342
|
}
|
|
9888
10343
|
),
|
|
9889
|
-
showTrendLine ? /* @__PURE__ */ (0,
|
|
10344
|
+
showTrendLine ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9890
10345
|
import_recharts5.Line,
|
|
9891
10346
|
{
|
|
9892
10347
|
type: lineType,
|
|
@@ -9902,7 +10357,7 @@ function WalkinTraffic({
|
|
|
9902
10357
|
) : null
|
|
9903
10358
|
]
|
|
9904
10359
|
}
|
|
9905
|
-
) : /* @__PURE__ */ (0,
|
|
10360
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9906
10361
|
import_Box13.default,
|
|
9907
10362
|
{
|
|
9908
10363
|
sx: sxChain4(
|
|
@@ -9914,7 +10369,7 @@ function WalkinTraffic({
|
|
|
9914
10369
|
},
|
|
9915
10370
|
emptyStateSx
|
|
9916
10371
|
),
|
|
9917
|
-
children: /* @__PURE__ */ (0,
|
|
10372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9918
10373
|
ChartEmptyState,
|
|
9919
10374
|
{
|
|
9920
10375
|
minHeight: chartHeight,
|
|
@@ -10016,21 +10471,21 @@ function mergeSx3(...parts) {
|
|
|
10016
10471
|
|
|
10017
10472
|
// src/components/BillingCounterAnalytics/BillingCounterAnalyticsCustomizationContext.tsx
|
|
10018
10473
|
var React17 = __toESM(require("react"));
|
|
10019
|
-
var
|
|
10474
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
10020
10475
|
var BillingCounterAnalyticsCustomizationContext = React17.createContext({});
|
|
10021
10476
|
function BillingCounterAnalyticsCustomizationProvider({
|
|
10022
10477
|
value,
|
|
10023
10478
|
children
|
|
10024
10479
|
}) {
|
|
10025
10480
|
const memo = React17.useMemo(() => value, [value]);
|
|
10026
|
-
return /* @__PURE__ */ (0,
|
|
10481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BillingCounterAnalyticsCustomizationContext.Provider, { value: memo, children });
|
|
10027
10482
|
}
|
|
10028
10483
|
function useBillingCounterAnalyticsCustomization() {
|
|
10029
10484
|
return React17.useContext(BillingCounterAnalyticsCustomizationContext);
|
|
10030
10485
|
}
|
|
10031
10486
|
|
|
10032
10487
|
// src/components/BillingCounterAnalytics/BillingCounterAnalyticsTooltip.tsx
|
|
10033
|
-
var
|
|
10488
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
10034
10489
|
function formatTooltipValue(n) {
|
|
10035
10490
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
10036
10491
|
Math.round(n)
|
|
@@ -10077,7 +10532,7 @@ function BillingCounterAnalyticsTooltip(props) {
|
|
|
10077
10532
|
},
|
|
10078
10533
|
tt?.bodyStyle
|
|
10079
10534
|
);
|
|
10080
|
-
return /* @__PURE__ */ (0,
|
|
10535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10081
10536
|
"div",
|
|
10082
10537
|
{
|
|
10083
10538
|
style: {
|
|
@@ -10085,7 +10540,7 @@ function BillingCounterAnalyticsTooltip(props) {
|
|
|
10085
10540
|
minWidth: 160,
|
|
10086
10541
|
maxWidth: 280
|
|
10087
10542
|
},
|
|
10088
|
-
children: /* @__PURE__ */ (0,
|
|
10543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
10089
10544
|
"div",
|
|
10090
10545
|
{
|
|
10091
10546
|
style: {
|
|
@@ -10096,7 +10551,7 @@ function BillingCounterAnalyticsTooltip(props) {
|
|
|
10096
10551
|
boxShadow: shadow
|
|
10097
10552
|
},
|
|
10098
10553
|
children: [
|
|
10099
|
-
/* @__PURE__ */ (0,
|
|
10554
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10100
10555
|
"div",
|
|
10101
10556
|
{
|
|
10102
10557
|
style: {
|
|
@@ -10107,14 +10562,14 @@ function BillingCounterAnalyticsTooltip(props) {
|
|
|
10107
10562
|
"aria-hidden": true
|
|
10108
10563
|
}
|
|
10109
10564
|
),
|
|
10110
|
-
/* @__PURE__ */ (0,
|
|
10111
|
-
/* @__PURE__ */ (0,
|
|
10112
|
-
/* @__PURE__ */ (0,
|
|
10113
|
-
/* @__PURE__ */ (0,
|
|
10565
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: bodyStyle, children: [
|
|
10566
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: rowStyle, children: [
|
|
10567
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
10568
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
10114
10569
|
] }),
|
|
10115
|
-
/* @__PURE__ */ (0,
|
|
10116
|
-
/* @__PURE__ */ (0,
|
|
10117
|
-
/* @__PURE__ */ (0,
|
|
10570
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
10571
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
10572
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue(num) })
|
|
10118
10573
|
] })
|
|
10119
10574
|
] })
|
|
10120
10575
|
]
|
|
@@ -10125,7 +10580,7 @@ function BillingCounterAnalyticsTooltip(props) {
|
|
|
10125
10580
|
}
|
|
10126
10581
|
|
|
10127
10582
|
// src/components/BillingCounterAnalytics/BillingCounterAnalytics.tsx
|
|
10128
|
-
var
|
|
10583
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
10129
10584
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME5 = {
|
|
10130
10585
|
cartesianGridStroke: "#D3D6DF",
|
|
10131
10586
|
xAxisLineStroke: "#7566FC",
|
|
@@ -10157,8 +10612,8 @@ function LinePlot({
|
|
|
10157
10612
|
const cursorStroke = lc?.cursorStroke ?? "#9CA3AF";
|
|
10158
10613
|
const cursorDash = lc?.cursorStrokeDasharray ?? "4 4";
|
|
10159
10614
|
const lineType = lc?.lineType ?? "linear";
|
|
10160
|
-
return /* @__PURE__ */ (0,
|
|
10161
|
-
/* @__PURE__ */ (0,
|
|
10615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_Box14.default, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_recharts6.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_recharts6.LineChart, { data, margin: m, children: [
|
|
10616
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10162
10617
|
import_recharts6.CartesianGrid,
|
|
10163
10618
|
{
|
|
10164
10619
|
strokeDasharray: dash,
|
|
@@ -10166,7 +10621,7 @@ function LinePlot({
|
|
|
10166
10621
|
stroke: gridStroke
|
|
10167
10622
|
}
|
|
10168
10623
|
),
|
|
10169
|
-
/* @__PURE__ */ (0,
|
|
10624
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10170
10625
|
import_recharts6.XAxis,
|
|
10171
10626
|
{
|
|
10172
10627
|
dataKey: "label",
|
|
@@ -10179,7 +10634,7 @@ function LinePlot({
|
|
|
10179
10634
|
height: 40
|
|
10180
10635
|
}
|
|
10181
10636
|
),
|
|
10182
|
-
/* @__PURE__ */ (0,
|
|
10637
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10183
10638
|
import_recharts6.YAxis,
|
|
10184
10639
|
{
|
|
10185
10640
|
domain: yAxisDomain,
|
|
@@ -10190,7 +10645,7 @@ function LinePlot({
|
|
|
10190
10645
|
width: yWidth
|
|
10191
10646
|
}
|
|
10192
10647
|
),
|
|
10193
|
-
/* @__PURE__ */ (0,
|
|
10648
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10194
10649
|
import_recharts6.Tooltip,
|
|
10195
10650
|
{
|
|
10196
10651
|
content: (tooltipProps) => {
|
|
@@ -10200,15 +10655,15 @@ function LinePlot({
|
|
|
10200
10655
|
data,
|
|
10201
10656
|
activeTabId
|
|
10202
10657
|
});
|
|
10203
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
10658
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: customTooltip });
|
|
10204
10659
|
}
|
|
10205
|
-
return /* @__PURE__ */ (0,
|
|
10660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BillingCounterAnalyticsTooltip, { ...tooltipProps });
|
|
10206
10661
|
},
|
|
10207
10662
|
cursor: { stroke: cursorStroke, strokeDasharray: cursorDash },
|
|
10208
10663
|
allowEscapeViewBox: { x: false, y: true }
|
|
10209
10664
|
}
|
|
10210
10665
|
),
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
10666
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10212
10667
|
import_recharts6.Line,
|
|
10213
10668
|
{
|
|
10214
10669
|
type: lineType,
|
|
@@ -10267,8 +10722,8 @@ function BillingCounterAnalytics({
|
|
|
10267
10722
|
},
|
|
10268
10723
|
customization?.header?.titleSx
|
|
10269
10724
|
);
|
|
10270
|
-
return /* @__PURE__ */ (0,
|
|
10271
|
-
/* @__PURE__ */ (0,
|
|
10725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BillingCounterAnalyticsCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_Card.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_CardContent.default, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_Stack12.default, { spacing: 1.75, sx: { width: "100%" }, children: [
|
|
10726
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
10272
10727
|
import_Stack12.default,
|
|
10273
10728
|
{
|
|
10274
10729
|
direction: "row",
|
|
@@ -10277,17 +10732,17 @@ function BillingCounterAnalytics({
|
|
|
10277
10732
|
gap: 2,
|
|
10278
10733
|
flexWrap: "wrap",
|
|
10279
10734
|
children: [
|
|
10280
|
-
/* @__PURE__ */ (0,
|
|
10281
|
-
/* @__PURE__ */ (0,
|
|
10735
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_Typography11.default, { sx: titleSx, children: title }),
|
|
10736
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10282
10737
|
import_Stack12.default,
|
|
10283
10738
|
{
|
|
10284
10739
|
direction: "row",
|
|
10285
10740
|
alignItems: "center",
|
|
10286
10741
|
spacing: 1.5,
|
|
10287
10742
|
sx: { flexShrink: 0 },
|
|
10288
|
-
children: resolvedInfo ? /* @__PURE__ */ (0,
|
|
10289
|
-
/* @__PURE__ */ (0,
|
|
10290
|
-
/* @__PURE__ */ (0,
|
|
10743
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
10744
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
10745
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10291
10746
|
ChartWidgetInfoButton,
|
|
10292
10747
|
{
|
|
10293
10748
|
popover: resolvedInfo,
|
|
@@ -10300,7 +10755,7 @@ function BillingCounterAnalytics({
|
|
|
10300
10755
|
]
|
|
10301
10756
|
}
|
|
10302
10757
|
),
|
|
10303
|
-
/* @__PURE__ */ (0,
|
|
10758
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10304
10759
|
ChartWidgetSegmentedTabs,
|
|
10305
10760
|
{
|
|
10306
10761
|
tabs,
|
|
@@ -10320,7 +10775,7 @@ function BillingCounterAnalytics({
|
|
|
10320
10775
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
10321
10776
|
}
|
|
10322
10777
|
),
|
|
10323
|
-
chartData.length > 0 ? /* @__PURE__ */ (0,
|
|
10778
|
+
chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10324
10779
|
LinePlot,
|
|
10325
10780
|
{
|
|
10326
10781
|
data: chartData,
|
|
@@ -10329,7 +10784,7 @@ function BillingCounterAnalytics({
|
|
|
10329
10784
|
activeTabId,
|
|
10330
10785
|
renderTooltip
|
|
10331
10786
|
}
|
|
10332
|
-
) : /* @__PURE__ */ (0,
|
|
10787
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10333
10788
|
ChartEmptyState,
|
|
10334
10789
|
{
|
|
10335
10790
|
minHeight: 300,
|
|
@@ -10362,14 +10817,14 @@ var React23 = __toESM(require("react"));
|
|
|
10362
10817
|
var QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC = "/images/icon/DwellBreakdownIcon.gif";
|
|
10363
10818
|
|
|
10364
10819
|
// src/components/QueueTimeBreakdown/QueueTimeBreakdownArea.tsx
|
|
10365
|
-
var
|
|
10820
|
+
var import_material18 = require("@mui/material");
|
|
10366
10821
|
var import_styles6 = require("@mui/material/styles");
|
|
10367
10822
|
var React20 = __toESM(require("react"));
|
|
10368
10823
|
var import_recharts7 = require("recharts");
|
|
10369
10824
|
|
|
10370
10825
|
// src/components/QueueTimeBreakdown/QueueTimeBreakdownAreaTooltip.tsx
|
|
10371
10826
|
var React19 = __toESM(require("react"));
|
|
10372
|
-
var
|
|
10827
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10373
10828
|
function numberFromTooltipValue(v) {
|
|
10374
10829
|
if (typeof v === "number" && Number.isFinite(v)) {
|
|
10375
10830
|
return v;
|
|
@@ -10408,15 +10863,15 @@ function QueueTimeBreakdownAreaTooltip({
|
|
|
10408
10863
|
if (!active || payload == null || payload.length === 0) {
|
|
10409
10864
|
return null;
|
|
10410
10865
|
}
|
|
10411
|
-
return /* @__PURE__ */ (0,
|
|
10412
|
-
/* @__PURE__ */ (0,
|
|
10413
|
-
/* @__PURE__ */ (0,
|
|
10866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { style: s.container, children: [
|
|
10867
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: s.header, children: label != null ? String(label) : "" }),
|
|
10868
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { style: s.body, children: payload.map((entry, i) => {
|
|
10414
10869
|
const name = typeof entry.name === "string" ? entry.name : entry.name != null ? String(entry.name) : "";
|
|
10415
10870
|
const safe = numberFromTooltipValue(entry.value);
|
|
10416
10871
|
const color = typeof entry.color === "string" ? entry.color : "#8B5CF6";
|
|
10417
10872
|
const key = entry.dataKey != null ? String(entry.dataKey) : `row-${i}`;
|
|
10418
|
-
return /* @__PURE__ */ (0,
|
|
10419
|
-
/* @__PURE__ */ (0,
|
|
10873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { style: s.row, children: [
|
|
10874
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
10420
10875
|
"span",
|
|
10421
10876
|
{
|
|
10422
10877
|
style: {
|
|
@@ -10425,15 +10880,15 @@ function QueueTimeBreakdownAreaTooltip({
|
|
|
10425
10880
|
}
|
|
10426
10881
|
}
|
|
10427
10882
|
),
|
|
10428
|
-
/* @__PURE__ */ (0,
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10883
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { style: s.label, children: `${name} :` }),
|
|
10884
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { style: s.value, children: formatVisitorValue(safe) })
|
|
10430
10885
|
] }, key);
|
|
10431
10886
|
}) })
|
|
10432
10887
|
] });
|
|
10433
10888
|
}
|
|
10434
10889
|
|
|
10435
10890
|
// src/components/QueueTimeBreakdown/QueueTimeBreakdownArea.tsx
|
|
10436
|
-
var
|
|
10891
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
10437
10892
|
function mergeAreaData(seriesList, categories) {
|
|
10438
10893
|
return categories.map((cat, i) => {
|
|
10439
10894
|
const row = { name: cat };
|
|
@@ -10475,8 +10930,8 @@ var QueueTimeBreakdownArea = ({
|
|
|
10475
10930
|
}, [chartData, series]);
|
|
10476
10931
|
const yDomain = allZero ? [0, 16e3] : [0, "auto"];
|
|
10477
10932
|
const yTickCount = allZero ? 5 : void 0;
|
|
10478
|
-
return /* @__PURE__ */ (0,
|
|
10479
|
-
/* @__PURE__ */ (0,
|
|
10933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material18.Stack, { justifyContent: "center", height: stackH, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_recharts7.ResponsiveContainer, { width: "100%", height: chartH, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_recharts7.AreaChart, { data: chartData, margin, children: [
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10480
10935
|
import_recharts7.CartesianGrid,
|
|
10481
10936
|
{
|
|
10482
10937
|
strokeDasharray: "3 3",
|
|
@@ -10484,7 +10939,7 @@ var QueueTimeBreakdownArea = ({
|
|
|
10484
10939
|
vertical: false
|
|
10485
10940
|
}
|
|
10486
10941
|
),
|
|
10487
|
-
/* @__PURE__ */ (0,
|
|
10942
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10488
10943
|
import_recharts7.XAxis,
|
|
10489
10944
|
{
|
|
10490
10945
|
dataKey: "name",
|
|
@@ -10493,7 +10948,7 @@ var QueueTimeBreakdownArea = ({
|
|
|
10493
10948
|
tickLine: false
|
|
10494
10949
|
}
|
|
10495
10950
|
),
|
|
10496
|
-
/* @__PURE__ */ (0,
|
|
10951
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10497
10952
|
import_recharts7.YAxis,
|
|
10498
10953
|
{
|
|
10499
10954
|
domain: yDomain,
|
|
@@ -10514,7 +10969,7 @@ var QueueTimeBreakdownArea = ({
|
|
|
10514
10969
|
}
|
|
10515
10970
|
}
|
|
10516
10971
|
),
|
|
10517
|
-
series.map((s, i) => /* @__PURE__ */ (0,
|
|
10972
|
+
series.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10518
10973
|
import_recharts7.Area,
|
|
10519
10974
|
{
|
|
10520
10975
|
type: "monotone",
|
|
@@ -10527,7 +10982,7 @@ var QueueTimeBreakdownArea = ({
|
|
|
10527
10982
|
},
|
|
10528
10983
|
s.name
|
|
10529
10984
|
)),
|
|
10530
|
-
/* @__PURE__ */ (0,
|
|
10985
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10531
10986
|
import_recharts7.Tooltip,
|
|
10532
10987
|
{
|
|
10533
10988
|
content: (tooltipProps) => {
|
|
@@ -10538,10 +10993,10 @@ var QueueTimeBreakdownArea = ({
|
|
|
10538
10993
|
series,
|
|
10539
10994
|
xAxis
|
|
10540
10995
|
});
|
|
10541
|
-
return custom == null ? null : /* @__PURE__ */ (0,
|
|
10996
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: custom });
|
|
10542
10997
|
}
|
|
10543
10998
|
const { active, payload, label } = tooltipProps;
|
|
10544
|
-
return /* @__PURE__ */ (0,
|
|
10999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10545
11000
|
QueueTimeBreakdownAreaTooltip,
|
|
10546
11001
|
{
|
|
10547
11002
|
active,
|
|
@@ -10608,7 +11063,7 @@ var import_Stack13 = __toESM(require("@mui/material/Stack"));
|
|
|
10608
11063
|
var import_Typography12 = __toESM(require("@mui/material/Typography"));
|
|
10609
11064
|
var React21 = __toESM(require("react"));
|
|
10610
11065
|
var import_recharts8 = require("recharts");
|
|
10611
|
-
var
|
|
11066
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
10612
11067
|
var RADIAN = Math.PI / 180;
|
|
10613
11068
|
function DefaultDonutTooltip({
|
|
10614
11069
|
tooltipProps,
|
|
@@ -10625,7 +11080,7 @@ function DefaultDonutTooltip({
|
|
|
10625
11080
|
const value = typeof rawValue === "number" ? rawValue : Number(rawValue) ?? 0;
|
|
10626
11081
|
const colorIndex = pieData.findIndex((d) => d.name === name);
|
|
10627
11082
|
const color = palette[colorIndex % palette.length];
|
|
10628
|
-
return /* @__PURE__ */ (0,
|
|
11083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10629
11084
|
import_Box15.default,
|
|
10630
11085
|
{
|
|
10631
11086
|
sx: {
|
|
@@ -10638,8 +11093,8 @@ function DefaultDonutTooltip({
|
|
|
10638
11093
|
overflow: "hidden"
|
|
10639
11094
|
},
|
|
10640
11095
|
children: [
|
|
10641
|
-
/* @__PURE__ */ (0,
|
|
10642
|
-
/* @__PURE__ */ (0,
|
|
11096
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_Box15.default, { sx: { height: 3, bgcolor: "#E5E7EB", width: "100%" } }),
|
|
11097
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10643
11098
|
import_Stack13.default,
|
|
10644
11099
|
{
|
|
10645
11100
|
direction: "row",
|
|
@@ -10647,7 +11102,7 @@ function DefaultDonutTooltip({
|
|
|
10647
11102
|
spacing: 1,
|
|
10648
11103
|
sx: { px: "10px", py: "6px" },
|
|
10649
11104
|
children: [
|
|
10650
|
-
/* @__PURE__ */ (0,
|
|
11105
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10651
11106
|
import_Box15.default,
|
|
10652
11107
|
{
|
|
10653
11108
|
sx: {
|
|
@@ -10659,8 +11114,8 @@ function DefaultDonutTooltip({
|
|
|
10659
11114
|
}
|
|
10660
11115
|
}
|
|
10661
11116
|
),
|
|
10662
|
-
/* @__PURE__ */ (0,
|
|
10663
|
-
/* @__PURE__ */ (0,
|
|
11117
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_Stack13.default, { direction: "row", spacing: 0.5, alignItems: "baseline", children: [
|
|
11118
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10664
11119
|
import_Typography12.default,
|
|
10665
11120
|
{
|
|
10666
11121
|
sx: {
|
|
@@ -10675,7 +11130,7 @@ function DefaultDonutTooltip({
|
|
|
10675
11130
|
]
|
|
10676
11131
|
}
|
|
10677
11132
|
),
|
|
10678
|
-
/* @__PURE__ */ (0,
|
|
11133
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10679
11134
|
import_Typography12.default,
|
|
10680
11135
|
{
|
|
10681
11136
|
sx: {
|
|
@@ -10720,7 +11175,7 @@ function DonutInnerPercentLabel(props) {
|
|
|
10720
11175
|
const text = `${(p * 100).toFixed(0)}%`;
|
|
10721
11176
|
const lightSlice = index < 2;
|
|
10722
11177
|
const fill = lightSlice ? lightSliceFill : darkSliceFill;
|
|
10723
|
-
return /* @__PURE__ */ (0,
|
|
11178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10724
11179
|
"text",
|
|
10725
11180
|
{
|
|
10726
11181
|
x,
|
|
@@ -10768,7 +11223,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10768
11223
|
}));
|
|
10769
11224
|
}, [averageData, labels]);
|
|
10770
11225
|
const total = pieData.reduce((s, d) => s + d.value, 0) || 1;
|
|
10771
|
-
return /* @__PURE__ */ (0,
|
|
11226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10772
11227
|
import_Box15.default,
|
|
10773
11228
|
{
|
|
10774
11229
|
sx: mergeSx2(
|
|
@@ -10776,8 +11231,8 @@ function QueueTimeBreakdownDonut({
|
|
|
10776
11231
|
dn?.containerSx
|
|
10777
11232
|
),
|
|
10778
11233
|
children: [
|
|
10779
|
-
/* @__PURE__ */ (0,
|
|
10780
|
-
/* @__PURE__ */ (0,
|
|
11234
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_recharts8.ResponsiveContainer, { width: "100%", height: chartH, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_recharts8.PieChart, { children: [
|
|
11235
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10781
11236
|
import_recharts8.Pie,
|
|
10782
11237
|
{
|
|
10783
11238
|
data: pieData,
|
|
@@ -10789,7 +11244,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10789
11244
|
outerRadius: outerR,
|
|
10790
11245
|
paddingAngle: padAngle,
|
|
10791
11246
|
labelLine: false,
|
|
10792
|
-
label: (props) => /* @__PURE__ */ (0,
|
|
11247
|
+
label: (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10793
11248
|
DonutInnerPercentLabel,
|
|
10794
11249
|
{
|
|
10795
11250
|
...props,
|
|
@@ -10797,7 +11252,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10797
11252
|
darkSliceFill: dn?.innerPercentOnDarkSliceFill
|
|
10798
11253
|
}
|
|
10799
11254
|
),
|
|
10800
|
-
children: pieData.map((_, index) => /* @__PURE__ */ (0,
|
|
11255
|
+
children: pieData.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10801
11256
|
import_recharts8.Cell,
|
|
10802
11257
|
{
|
|
10803
11258
|
fill: palette[index % palette.length],
|
|
@@ -10807,7 +11262,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10807
11262
|
))
|
|
10808
11263
|
}
|
|
10809
11264
|
),
|
|
10810
|
-
/* @__PURE__ */ (0,
|
|
11265
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10811
11266
|
import_recharts8.Tooltip,
|
|
10812
11267
|
{
|
|
10813
11268
|
contentStyle: tt.contentStyle,
|
|
@@ -10823,9 +11278,9 @@ function QueueTimeBreakdownDonut({
|
|
|
10823
11278
|
chartFilter,
|
|
10824
11279
|
labelName: LabelName
|
|
10825
11280
|
});
|
|
10826
|
-
return custom == null ? null : /* @__PURE__ */ (0,
|
|
11281
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: custom });
|
|
10827
11282
|
}
|
|
10828
|
-
return /* @__PURE__ */ (0,
|
|
11283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10829
11284
|
DefaultDonutTooltip,
|
|
10830
11285
|
{
|
|
10831
11286
|
tooltipProps,
|
|
@@ -10844,7 +11299,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10844
11299
|
}
|
|
10845
11300
|
)
|
|
10846
11301
|
] }, chartFilter) }),
|
|
10847
|
-
/* @__PURE__ */ (0,
|
|
11302
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10848
11303
|
import_Box15.default,
|
|
10849
11304
|
{
|
|
10850
11305
|
sx: {
|
|
@@ -10855,7 +11310,7 @@ function QueueTimeBreakdownDonut({
|
|
|
10855
11310
|
pointerEvents: "none",
|
|
10856
11311
|
textAlign: "center"
|
|
10857
11312
|
},
|
|
10858
|
-
children: /* @__PURE__ */ (0,
|
|
11313
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10859
11314
|
import_Typography12.default,
|
|
10860
11315
|
{
|
|
10861
11316
|
sx: mergeSx2(
|
|
@@ -10878,7 +11333,7 @@ var import_Stack14 = __toESM(require("@mui/material/Stack"));
|
|
|
10878
11333
|
var import_Tooltip3 = __toESM(require("@mui/material/Tooltip"));
|
|
10879
11334
|
var import_Typography13 = __toESM(require("@mui/material/Typography"));
|
|
10880
11335
|
var React22 = __toESM(require("react"));
|
|
10881
|
-
var
|
|
11336
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10882
11337
|
var segmentTooltipPopperSx2 = {
|
|
10883
11338
|
p: 0,
|
|
10884
11339
|
m: 0,
|
|
@@ -10902,9 +11357,9 @@ function SegmentTooltip({
|
|
|
10902
11357
|
value,
|
|
10903
11358
|
color
|
|
10904
11359
|
}) {
|
|
10905
|
-
return /* @__PURE__ */ (0,
|
|
10906
|
-
/* @__PURE__ */ (0,
|
|
10907
|
-
/* @__PURE__ */ (0,
|
|
11360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_Box16.default, { sx: defaultSegmentTooltipCardSx2, children: [
|
|
11361
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_Box16.default, { sx: { height: 3, bgcolor: "#E5E7EB", width: "100%" } }),
|
|
11362
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10908
11363
|
import_Stack14.default,
|
|
10909
11364
|
{
|
|
10910
11365
|
direction: "row",
|
|
@@ -10912,7 +11367,7 @@ function SegmentTooltip({
|
|
|
10912
11367
|
spacing: 1,
|
|
10913
11368
|
sx: { px: "10px", py: "6px" },
|
|
10914
11369
|
children: [
|
|
10915
|
-
/* @__PURE__ */ (0,
|
|
11370
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10916
11371
|
import_Box16.default,
|
|
10917
11372
|
{
|
|
10918
11373
|
sx: {
|
|
@@ -10924,8 +11379,8 @@ function SegmentTooltip({
|
|
|
10924
11379
|
}
|
|
10925
11380
|
}
|
|
10926
11381
|
),
|
|
10927
|
-
/* @__PURE__ */ (0,
|
|
10928
|
-
/* @__PURE__ */ (0,
|
|
11382
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_Stack14.default, { direction: "row", spacing: 0.5, alignItems: "baseline", children: [
|
|
11383
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10929
11384
|
import_Typography13.default,
|
|
10930
11385
|
{
|
|
10931
11386
|
sx: {
|
|
@@ -10940,7 +11395,7 @@ function SegmentTooltip({
|
|
|
10940
11395
|
]
|
|
10941
11396
|
}
|
|
10942
11397
|
),
|
|
10943
|
-
/* @__PURE__ */ (0,
|
|
11398
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10944
11399
|
import_Typography13.default,
|
|
10945
11400
|
{
|
|
10946
11401
|
sx: {
|
|
@@ -10984,8 +11439,8 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10984
11439
|
percent: "0%",
|
|
10985
11440
|
color: palette[i % palette.length]
|
|
10986
11441
|
}));
|
|
10987
|
-
return /* @__PURE__ */ (0,
|
|
10988
|
-
/* @__PURE__ */ (0,
|
|
11442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_Stack14.default, { spacing: 0, sx: { width: "100%", mb: 1.5 }, children: [
|
|
11443
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10989
11444
|
import_Box16.default,
|
|
10990
11445
|
{
|
|
10991
11446
|
sx: {
|
|
@@ -10995,7 +11450,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10995
11450
|
overflow: "hidden",
|
|
10996
11451
|
borderRadius: 0
|
|
10997
11452
|
},
|
|
10998
|
-
children: isAllZero ? /* @__PURE__ */ (0,
|
|
11453
|
+
children: isAllZero ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10999
11454
|
import_Box16.default,
|
|
11000
11455
|
{
|
|
11001
11456
|
sx: {
|
|
@@ -11010,7 +11465,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11010
11465
|
const segName = legendRows[i]?.label ?? row.data[i]?.name ?? "";
|
|
11011
11466
|
const count = rawValues[i];
|
|
11012
11467
|
const pctStr = p.toFixed(1);
|
|
11013
|
-
return /* @__PURE__ */ (0,
|
|
11468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11014
11469
|
import_Tooltip3.default,
|
|
11015
11470
|
{
|
|
11016
11471
|
title: renderTooltip ? renderTooltip({
|
|
@@ -11019,7 +11474,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11019
11474
|
percent: p,
|
|
11020
11475
|
count,
|
|
11021
11476
|
color
|
|
11022
|
-
}) : /* @__PURE__ */ (0,
|
|
11477
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11023
11478
|
SegmentTooltip,
|
|
11024
11479
|
{
|
|
11025
11480
|
name: segName,
|
|
@@ -11034,7 +11489,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11034
11489
|
sx: segmentTooltipPopperSx2
|
|
11035
11490
|
}
|
|
11036
11491
|
},
|
|
11037
|
-
children: /* @__PURE__ */ (0,
|
|
11492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11038
11493
|
import_Box16.default,
|
|
11039
11494
|
{
|
|
11040
11495
|
sx: {
|
|
@@ -11055,7 +11510,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11055
11510
|
})
|
|
11056
11511
|
}
|
|
11057
11512
|
),
|
|
11058
|
-
/* @__PURE__ */ (0,
|
|
11513
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11059
11514
|
import_Box16.default,
|
|
11060
11515
|
{
|
|
11061
11516
|
sx: mergeSx2(
|
|
@@ -11071,7 +11526,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11071
11526
|
children: isAllZero ? emptySegments.map((seg, i) => {
|
|
11072
11527
|
const labelText = seg.label ?? row.data[i]?.name ?? "";
|
|
11073
11528
|
const sharePct = 100 / emptySegments.length;
|
|
11074
|
-
return /* @__PURE__ */ (0,
|
|
11529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11075
11530
|
import_Box16.default,
|
|
11076
11531
|
{
|
|
11077
11532
|
sx: mergeSx2(
|
|
@@ -11086,7 +11541,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11086
11541
|
sb?.segmentBoxSx
|
|
11087
11542
|
),
|
|
11088
11543
|
children: [
|
|
11089
|
-
/* @__PURE__ */ (0,
|
|
11544
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11090
11545
|
import_Typography13.default,
|
|
11091
11546
|
{
|
|
11092
11547
|
sx: mergeSx2(
|
|
@@ -11105,7 +11560,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11105
11560
|
children: "0 (0%)"
|
|
11106
11561
|
}
|
|
11107
11562
|
),
|
|
11108
|
-
/* @__PURE__ */ (0,
|
|
11563
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11109
11564
|
import_Typography13.default,
|
|
11110
11565
|
{
|
|
11111
11566
|
sx: mergeSx2(
|
|
@@ -11144,7 +11599,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11144
11599
|
);
|
|
11145
11600
|
displayText = `${countText} (${pctText})`;
|
|
11146
11601
|
}
|
|
11147
|
-
return /* @__PURE__ */ (0,
|
|
11602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11148
11603
|
import_Box16.default,
|
|
11149
11604
|
{
|
|
11150
11605
|
title: `${displayText} ${labelText}`.trim(),
|
|
@@ -11160,7 +11615,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11160
11615
|
sb?.segmentBoxSx
|
|
11161
11616
|
),
|
|
11162
11617
|
children: [
|
|
11163
|
-
/* @__PURE__ */ (0,
|
|
11618
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11164
11619
|
import_Typography13.default,
|
|
11165
11620
|
{
|
|
11166
11621
|
sx: mergeSx2(
|
|
@@ -11179,7 +11634,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
11179
11634
|
children: displayText
|
|
11180
11635
|
}
|
|
11181
11636
|
),
|
|
11182
|
-
/* @__PURE__ */ (0,
|
|
11637
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11183
11638
|
import_Typography13.default,
|
|
11184
11639
|
{
|
|
11185
11640
|
sx: mergeSx2(
|
|
@@ -11233,7 +11688,7 @@ function generateMockPerformanceData() {
|
|
|
11233
11688
|
}
|
|
11234
11689
|
|
|
11235
11690
|
// src/components/QueueTimeBreakdown/QueueTimeBreakdown.tsx
|
|
11236
|
-
var
|
|
11691
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
11237
11692
|
function defaultBucketLegendFromPalette(palette) {
|
|
11238
11693
|
return [
|
|
11239
11694
|
{ percent: "12%", label: "> 16mins", color: palette[0 % palette.length] },
|
|
@@ -11287,8 +11742,8 @@ function QueueTimeBreakdown({
|
|
|
11287
11742
|
{ fontWeight: 700, color: "#0f172a" },
|
|
11288
11743
|
customization?.periodFilter?.titleSx
|
|
11289
11744
|
);
|
|
11290
|
-
return /* @__PURE__ */ (0,
|
|
11291
|
-
/* @__PURE__ */ (0,
|
|
11745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(QueueTimeBreakdownCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Card2.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_CardContent2.default, { sx: mergeSx2(customization?.rootCard?.cardContentSx), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_Stack15.default, { width: "100%", direction: "column", gap: 3, mb: 4, children: [
|
|
11746
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
11292
11747
|
import_Stack15.default,
|
|
11293
11748
|
{
|
|
11294
11749
|
direction: "row",
|
|
@@ -11298,7 +11753,7 @@ function QueueTimeBreakdown({
|
|
|
11298
11753
|
gap: 2,
|
|
11299
11754
|
width: "100%",
|
|
11300
11755
|
children: [
|
|
11301
|
-
/* @__PURE__ */ (0,
|
|
11756
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11302
11757
|
import_Typography14.default,
|
|
11303
11758
|
{
|
|
11304
11759
|
variant: isSmallScreen ? "subtitle2" : "body1",
|
|
@@ -11306,7 +11761,7 @@ function QueueTimeBreakdown({
|
|
|
11306
11761
|
children: title
|
|
11307
11762
|
}
|
|
11308
11763
|
),
|
|
11309
|
-
/* @__PURE__ */ (0,
|
|
11764
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11310
11765
|
TimePeriodFilter,
|
|
11311
11766
|
{
|
|
11312
11767
|
selectedFilter: filter,
|
|
@@ -11317,15 +11772,15 @@ function QueueTimeBreakdown({
|
|
|
11317
11772
|
]
|
|
11318
11773
|
}
|
|
11319
11774
|
),
|
|
11320
|
-
/* @__PURE__ */ (0,
|
|
11321
|
-
/* @__PURE__ */ (0,
|
|
11322
|
-
/* @__PURE__ */ (0,
|
|
11775
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Box17.default, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_Grid.default, { container: true, spacing: 3, children: [
|
|
11776
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_Grid.default, { size: { md: 6, xs: 12 }, children: [
|
|
11777
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
11323
11778
|
import_Stack15.default,
|
|
11324
11779
|
{
|
|
11325
11780
|
gap: 1,
|
|
11326
11781
|
sx: mergeSx2(customization?.leftColumn?.columnStackSx),
|
|
11327
11782
|
children: [
|
|
11328
|
-
/* @__PURE__ */ (0,
|
|
11783
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Stack15.default, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
11329
11784
|
import_Stack15.default,
|
|
11330
11785
|
{
|
|
11331
11786
|
direction: "row",
|
|
@@ -11333,7 +11788,7 @@ function QueueTimeBreakdown({
|
|
|
11333
11788
|
justifyContent: "start",
|
|
11334
11789
|
alignItems: "center",
|
|
11335
11790
|
children: [
|
|
11336
|
-
resolvedHeaderImageSrc ? /* @__PURE__ */ (0,
|
|
11791
|
+
resolvedHeaderImageSrc ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11337
11792
|
import_Box17.default,
|
|
11338
11793
|
{
|
|
11339
11794
|
component: "img",
|
|
@@ -11344,8 +11799,8 @@ function QueueTimeBreakdown({
|
|
|
11344
11799
|
sx: { objectFit: "contain" }
|
|
11345
11800
|
}
|
|
11346
11801
|
) : null,
|
|
11347
|
-
/* @__PURE__ */ (0,
|
|
11348
|
-
/* @__PURE__ */ (0,
|
|
11802
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_Stack15.default, { children: [
|
|
11803
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11349
11804
|
import_Typography14.default,
|
|
11350
11805
|
{
|
|
11351
11806
|
sx: mergeSx2(
|
|
@@ -11359,8 +11814,8 @@ function QueueTimeBreakdown({
|
|
|
11359
11814
|
children: headlineTotal
|
|
11360
11815
|
}
|
|
11361
11816
|
),
|
|
11362
|
-
/* @__PURE__ */ (0,
|
|
11363
|
-
/* @__PURE__ */ (0,
|
|
11817
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_Stack15.default, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
11818
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11364
11819
|
import_Typography14.default,
|
|
11365
11820
|
{
|
|
11366
11821
|
sx: mergeSx2(
|
|
@@ -11374,7 +11829,7 @@ function QueueTimeBreakdown({
|
|
|
11374
11829
|
children: headlineSubtitle
|
|
11375
11830
|
}
|
|
11376
11831
|
),
|
|
11377
|
-
resolvedHeadlineInfoPopover ? /* @__PURE__ */ (0,
|
|
11832
|
+
resolvedHeadlineInfoPopover ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11378
11833
|
ChartWidgetInfoButton,
|
|
11379
11834
|
{
|
|
11380
11835
|
density: "compact",
|
|
@@ -11387,11 +11842,11 @@ function QueueTimeBreakdown({
|
|
|
11387
11842
|
]
|
|
11388
11843
|
}
|
|
11389
11844
|
) }),
|
|
11390
|
-
/* @__PURE__ */ (0,
|
|
11845
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11391
11846
|
import_Stack15.default,
|
|
11392
11847
|
{
|
|
11393
11848
|
sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
|
|
11394
|
-
children: data.map((item) => /* @__PURE__ */ (0,
|
|
11849
|
+
children: data.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11395
11850
|
QueueTimeBreakdownStackedBar,
|
|
11396
11851
|
{
|
|
11397
11852
|
row: item,
|
|
@@ -11405,7 +11860,7 @@ function QueueTimeBreakdown({
|
|
|
11405
11860
|
]
|
|
11406
11861
|
}
|
|
11407
11862
|
),
|
|
11408
|
-
/* @__PURE__ */ (0,
|
|
11863
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11409
11864
|
import_Typography14.default,
|
|
11410
11865
|
{
|
|
11411
11866
|
sx: mergeSx2(
|
|
@@ -11420,7 +11875,7 @@ function QueueTimeBreakdown({
|
|
|
11420
11875
|
children: dataComparisonTitle
|
|
11421
11876
|
}
|
|
11422
11877
|
),
|
|
11423
|
-
/* @__PURE__ */ (0,
|
|
11878
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11424
11879
|
import_Card2.default,
|
|
11425
11880
|
{
|
|
11426
11881
|
elevation: 0,
|
|
@@ -11434,14 +11889,14 @@ function QueueTimeBreakdown({
|
|
|
11434
11889
|
},
|
|
11435
11890
|
customization?.dataComparison?.cardSx
|
|
11436
11891
|
),
|
|
11437
|
-
children: /* @__PURE__ */ (0,
|
|
11892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_CardContent2.default, { sx: { padding: "4px 8px" }, children: hasComparisonData ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
11438
11893
|
import_Stack15.default,
|
|
11439
11894
|
{
|
|
11440
11895
|
direction: "row",
|
|
11441
11896
|
justifyContent: "space-evenly",
|
|
11442
11897
|
alignItems: "center",
|
|
11443
11898
|
children: [
|
|
11444
|
-
/* @__PURE__ */ (0,
|
|
11899
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Stack15.default, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11445
11900
|
QueueTimeBreakdownDonut,
|
|
11446
11901
|
{
|
|
11447
11902
|
averageData: Donut_data,
|
|
@@ -11450,7 +11905,7 @@ function QueueTimeBreakdown({
|
|
|
11450
11905
|
renderTooltip: renderDonutTooltip
|
|
11451
11906
|
}
|
|
11452
11907
|
) }),
|
|
11453
|
-
/* @__PURE__ */ (0,
|
|
11908
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11454
11909
|
import_Box17.default,
|
|
11455
11910
|
{
|
|
11456
11911
|
component: "span",
|
|
@@ -11465,7 +11920,7 @@ function QueueTimeBreakdown({
|
|
|
11465
11920
|
)
|
|
11466
11921
|
}
|
|
11467
11922
|
),
|
|
11468
|
-
/* @__PURE__ */ (0,
|
|
11923
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Stack15.default, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11469
11924
|
QueueTimeBreakdownDonut,
|
|
11470
11925
|
{
|
|
11471
11926
|
averageData: yesterdayDonut,
|
|
@@ -11476,11 +11931,11 @@ function QueueTimeBreakdown({
|
|
|
11476
11931
|
) })
|
|
11477
11932
|
]
|
|
11478
11933
|
}
|
|
11479
|
-
) : /* @__PURE__ */ (0,
|
|
11934
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChartEmptyState, { minHeight: 220 }) })
|
|
11480
11935
|
}
|
|
11481
11936
|
)
|
|
11482
11937
|
] }),
|
|
11483
|
-
/* @__PURE__ */ (0,
|
|
11938
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Grid.default, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11484
11939
|
import_Card2.default,
|
|
11485
11940
|
{
|
|
11486
11941
|
elevation: 0,
|
|
@@ -11494,21 +11949,21 @@ function QueueTimeBreakdown({
|
|
|
11494
11949
|
},
|
|
11495
11950
|
customization?.areaChart?.cardSx
|
|
11496
11951
|
),
|
|
11497
|
-
children: /* @__PURE__ */ (0,
|
|
11952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11498
11953
|
import_CardContent2.default,
|
|
11499
11954
|
{
|
|
11500
11955
|
sx: mergeSx2(
|
|
11501
11956
|
{ padding: "10px 8px" },
|
|
11502
11957
|
customization?.areaChart?.cardContentSx
|
|
11503
11958
|
),
|
|
11504
|
-
children: hasBarData ? /* @__PURE__ */ (0,
|
|
11959
|
+
children: hasBarData ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11505
11960
|
QueueTimeBreakdownArea_default,
|
|
11506
11961
|
{
|
|
11507
11962
|
series: getQueueTimeBreakdownAreaSeriesData(filter),
|
|
11508
11963
|
xAxis: getQueueTimeBreakdownAreaXAxisData(filter),
|
|
11509
11964
|
renderTooltip: renderAreaTooltip
|
|
11510
11965
|
}
|
|
11511
|
-
) : /* @__PURE__ */ (0,
|
|
11966
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChartEmptyState, { minHeight: 330 })
|
|
11512
11967
|
}
|
|
11513
11968
|
)
|
|
11514
11969
|
}
|
|
@@ -11518,10 +11973,10 @@ function QueueTimeBreakdown({
|
|
|
11518
11973
|
}
|
|
11519
11974
|
|
|
11520
11975
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
11521
|
-
var
|
|
11522
|
-
var
|
|
11976
|
+
var import_react20 = require("@iconify/react");
|
|
11977
|
+
var import_material19 = require("@mui/material");
|
|
11523
11978
|
var React24 = __toESM(require("react"));
|
|
11524
|
-
var
|
|
11979
|
+
var import_react21 = require("react");
|
|
11525
11980
|
var import_recharts9 = require("recharts");
|
|
11526
11981
|
|
|
11527
11982
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
@@ -11906,7 +12361,7 @@ function getNestedList(payload) {
|
|
|
11906
12361
|
}
|
|
11907
12362
|
|
|
11908
12363
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
11909
|
-
var
|
|
12364
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11910
12365
|
function toDisplayNumber(value) {
|
|
11911
12366
|
if (!Number.isFinite(value)) return "0";
|
|
11912
12367
|
return new Intl.NumberFormat("en-IN").format(value);
|
|
@@ -11925,8 +12380,8 @@ function InlineStatCard({
|
|
|
11925
12380
|
sx,
|
|
11926
12381
|
iconColor = "#1565C0"
|
|
11927
12382
|
}) {
|
|
11928
|
-
return /* @__PURE__ */ (0,
|
|
11929
|
-
|
|
12383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12384
|
+
import_material19.Paper,
|
|
11930
12385
|
{
|
|
11931
12386
|
elevation: 0,
|
|
11932
12387
|
sx: [
|
|
@@ -11941,9 +12396,9 @@ function InlineStatCard({
|
|
|
11941
12396
|
},
|
|
11942
12397
|
...sx ? [sx] : []
|
|
11943
12398
|
],
|
|
11944
|
-
children: /* @__PURE__ */ (0,
|
|
11945
|
-
/* @__PURE__ */ (0,
|
|
11946
|
-
|
|
12399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
12400
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12401
|
+
import_react20.Icon,
|
|
11947
12402
|
{
|
|
11948
12403
|
icon,
|
|
11949
12404
|
width: 28,
|
|
@@ -11952,17 +12407,17 @@ function InlineStatCard({
|
|
|
11952
12407
|
style: { flexShrink: 0 }
|
|
11953
12408
|
}
|
|
11954
12409
|
),
|
|
11955
|
-
/* @__PURE__ */ (0,
|
|
11956
|
-
/* @__PURE__ */ (0,
|
|
11957
|
-
|
|
12410
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { spacing: 0.15, children: [
|
|
12411
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12412
|
+
import_material19.Typography,
|
|
11958
12413
|
{
|
|
11959
12414
|
variant: "body2",
|
|
11960
12415
|
sx: { fontWeight: 500, color: "text.primary" },
|
|
11961
12416
|
children: title
|
|
11962
12417
|
}
|
|
11963
12418
|
),
|
|
11964
|
-
/* @__PURE__ */ (0,
|
|
11965
|
-
|
|
12419
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12420
|
+
import_material19.Typography,
|
|
11966
12421
|
{
|
|
11967
12422
|
variant: "h6",
|
|
11968
12423
|
sx: { lineHeight: 1.1, fontWeight: 700, color: "text.primary" },
|
|
@@ -11991,17 +12446,17 @@ function InlineSegmentStrip({
|
|
|
11991
12446
|
const barHeight = presentation?.barHeight ?? 12;
|
|
11992
12447
|
const trackInsetPx = presentation?.trackInsetPx ?? 3;
|
|
11993
12448
|
const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
|
|
11994
|
-
return /* @__PURE__ */ (0,
|
|
11995
|
-
/* @__PURE__ */ (0,
|
|
11996
|
-
|
|
12449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { spacing: 0.75, children: [
|
|
12450
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
12451
|
+
import_material19.Stack,
|
|
11997
12452
|
{
|
|
11998
12453
|
direction: "row",
|
|
11999
12454
|
alignItems: "center",
|
|
12000
12455
|
justifyContent: "space-between",
|
|
12001
12456
|
gap: 1,
|
|
12002
12457
|
children: [
|
|
12003
|
-
/* @__PURE__ */ (0,
|
|
12004
|
-
|
|
12458
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12459
|
+
import_material19.Typography,
|
|
12005
12460
|
{
|
|
12006
12461
|
variant: "subtitle2",
|
|
12007
12462
|
sx: [
|
|
@@ -12011,8 +12466,8 @@ function InlineSegmentStrip({
|
|
|
12011
12466
|
children: item.label
|
|
12012
12467
|
}
|
|
12013
12468
|
),
|
|
12014
|
-
/* @__PURE__ */ (0,
|
|
12015
|
-
|
|
12469
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12470
|
+
import_material19.Typography,
|
|
12016
12471
|
{
|
|
12017
12472
|
variant: "body2",
|
|
12018
12473
|
sx: [
|
|
@@ -12025,8 +12480,8 @@ function InlineSegmentStrip({
|
|
|
12025
12480
|
]
|
|
12026
12481
|
}
|
|
12027
12482
|
),
|
|
12028
|
-
/* @__PURE__ */ (0,
|
|
12029
|
-
|
|
12483
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12484
|
+
import_material19.Box,
|
|
12030
12485
|
{
|
|
12031
12486
|
sx: {
|
|
12032
12487
|
width: "100%",
|
|
@@ -12043,8 +12498,8 @@ function InlineSegmentStrip({
|
|
|
12043
12498
|
const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
|
|
12044
12499
|
const isLast = idx === lastIdx;
|
|
12045
12500
|
const fill = resolveSegmentFill(presentation, idx, segment.color);
|
|
12046
|
-
return /* @__PURE__ */ (0,
|
|
12047
|
-
|
|
12501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12502
|
+
import_material19.Tooltip,
|
|
12048
12503
|
{
|
|
12049
12504
|
title: (() => {
|
|
12050
12505
|
if (presentation?.renderSegmentTooltip) {
|
|
@@ -12056,7 +12511,7 @@ function InlineSegmentStrip({
|
|
|
12056
12511
|
});
|
|
12057
12512
|
return custom == null ? "" : custom;
|
|
12058
12513
|
}
|
|
12059
|
-
return /* @__PURE__ */ (0,
|
|
12514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12060
12515
|
InlineSegmentTooltipCard,
|
|
12061
12516
|
{
|
|
12062
12517
|
segment,
|
|
@@ -12071,8 +12526,8 @@ function InlineSegmentStrip({
|
|
|
12071
12526
|
sx: inlineSegmentTooltipPopperSx
|
|
12072
12527
|
}
|
|
12073
12528
|
},
|
|
12074
|
-
children: /* @__PURE__ */ (0,
|
|
12075
|
-
|
|
12529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12530
|
+
import_material19.Box,
|
|
12076
12531
|
{
|
|
12077
12532
|
sx: {
|
|
12078
12533
|
width: `${Math.max(0, widthPercent)}%`,
|
|
@@ -12116,10 +12571,10 @@ function InlineSegmentTooltipCard({
|
|
|
12116
12571
|
cardSx
|
|
12117
12572
|
}) {
|
|
12118
12573
|
const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
|
|
12119
|
-
return /* @__PURE__ */ (0,
|
|
12120
|
-
/* @__PURE__ */ (0,
|
|
12121
|
-
/* @__PURE__ */ (0,
|
|
12122
|
-
|
|
12574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Box, { sx: tooltipSurfaceSx, children: [
|
|
12575
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Box, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
|
|
12576
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
12577
|
+
import_material19.Box,
|
|
12123
12578
|
{
|
|
12124
12579
|
sx: {
|
|
12125
12580
|
display: "flex",
|
|
@@ -12131,8 +12586,8 @@ function InlineSegmentTooltipCard({
|
|
|
12131
12586
|
py: 1.25
|
|
12132
12587
|
},
|
|
12133
12588
|
children: [
|
|
12134
|
-
/* @__PURE__ */ (0,
|
|
12135
|
-
|
|
12589
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12590
|
+
import_material19.Box,
|
|
12136
12591
|
{
|
|
12137
12592
|
component: "span",
|
|
12138
12593
|
"aria-hidden": true,
|
|
@@ -12145,8 +12600,8 @@ function InlineSegmentTooltipCard({
|
|
|
12145
12600
|
}
|
|
12146
12601
|
}
|
|
12147
12602
|
),
|
|
12148
|
-
/* @__PURE__ */ (0,
|
|
12149
|
-
|
|
12603
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12604
|
+
import_material19.Typography,
|
|
12150
12605
|
{
|
|
12151
12606
|
component: "span",
|
|
12152
12607
|
sx: {
|
|
@@ -12158,8 +12613,8 @@ function InlineSegmentTooltipCard({
|
|
|
12158
12613
|
children: segment.label
|
|
12159
12614
|
}
|
|
12160
12615
|
),
|
|
12161
|
-
/* @__PURE__ */ (0,
|
|
12162
|
-
|
|
12616
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12617
|
+
import_material19.Typography,
|
|
12163
12618
|
{
|
|
12164
12619
|
component: "span",
|
|
12165
12620
|
sx: {
|
|
@@ -12171,8 +12626,8 @@ function InlineSegmentTooltipCard({
|
|
|
12171
12626
|
children: " : "
|
|
12172
12627
|
}
|
|
12173
12628
|
),
|
|
12174
|
-
/* @__PURE__ */ (0,
|
|
12175
|
-
|
|
12629
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12630
|
+
import_material19.Typography,
|
|
12176
12631
|
{
|
|
12177
12632
|
component: "span",
|
|
12178
12633
|
sx: {
|
|
@@ -12202,8 +12657,8 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
12202
12657
|
const statIcon = presentation?.statCardIconColor ?? "#1565C0";
|
|
12203
12658
|
const customSummary = presentation?.summaryCards?.(summaryKpis);
|
|
12204
12659
|
const useCustomSummary = customSummary !== void 0;
|
|
12205
|
-
return /* @__PURE__ */ (0,
|
|
12206
|
-
|
|
12660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
12661
|
+
import_material19.Stack,
|
|
12207
12662
|
{
|
|
12208
12663
|
spacing: 2,
|
|
12209
12664
|
sx: [
|
|
@@ -12212,15 +12667,15 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
12212
12667
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
12213
12668
|
],
|
|
12214
12669
|
children: [
|
|
12215
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0,
|
|
12216
|
-
|
|
12670
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12671
|
+
import_material19.Stack,
|
|
12217
12672
|
{
|
|
12218
12673
|
direction: "row",
|
|
12219
12674
|
spacing: 1.5,
|
|
12220
12675
|
flexWrap: "wrap",
|
|
12221
12676
|
useFlexGap: true,
|
|
12222
12677
|
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
12223
|
-
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0,
|
|
12678
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12224
12679
|
InlineStatCard,
|
|
12225
12680
|
{
|
|
12226
12681
|
icon: card.icon ?? "mdi:chart-box-outline",
|
|
@@ -12233,7 +12688,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
12233
12688
|
},
|
|
12234
12689
|
card.id
|
|
12235
12690
|
)) : [
|
|
12236
|
-
/* @__PURE__ */ (0,
|
|
12691
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12237
12692
|
InlineStatCard,
|
|
12238
12693
|
{
|
|
12239
12694
|
icon: "mdi:store-marker-outline",
|
|
@@ -12244,7 +12699,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
12244
12699
|
},
|
|
12245
12700
|
"default-stores"
|
|
12246
12701
|
),
|
|
12247
|
-
/* @__PURE__ */ (0,
|
|
12702
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12248
12703
|
InlineStatCard,
|
|
12249
12704
|
{
|
|
12250
12705
|
icon: "fluent:people-community-16-filled",
|
|
@@ -12258,15 +12713,15 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
12258
12713
|
]
|
|
12259
12714
|
}
|
|
12260
12715
|
),
|
|
12261
|
-
/* @__PURE__ */ (0,
|
|
12262
|
-
|
|
12716
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12717
|
+
import_material19.Stack,
|
|
12263
12718
|
{
|
|
12264
12719
|
spacing: 1.25,
|
|
12265
12720
|
sx: [
|
|
12266
12721
|
{ pt: 0.5, pb: 1 },
|
|
12267
12722
|
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
12268
12723
|
],
|
|
12269
|
-
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0,
|
|
12724
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12270
12725
|
InlineSegmentStrip,
|
|
12271
12726
|
{
|
|
12272
12727
|
item,
|
|
@@ -12448,18 +12903,18 @@ function FootFallHeatMapView({
|
|
|
12448
12903
|
tileColors: treemapProp?.tileColors
|
|
12449
12904
|
};
|
|
12450
12905
|
const tileMetrics = treemapLayout.tileMetrics;
|
|
12451
|
-
const tileColorFromSeed = (0,
|
|
12906
|
+
const tileColorFromSeed = (0, import_react21.useMemo)(
|
|
12452
12907
|
() => createTreemapTileColorResolver(treemapLayout.tileColors),
|
|
12453
12908
|
[treemapLayout.tileColors]
|
|
12454
12909
|
);
|
|
12455
|
-
const [data, setData] = (0,
|
|
12910
|
+
const [data, setData] = (0, import_react21.useState)({
|
|
12456
12911
|
previous: [],
|
|
12457
12912
|
current: []
|
|
12458
12913
|
});
|
|
12459
|
-
const [showLeaf, setShowLeaf] = (0,
|
|
12460
|
-
const [trackingDetails, setTrackingDetails] = (0,
|
|
12461
|
-
const [loading, setLoading] = (0,
|
|
12462
|
-
(0,
|
|
12914
|
+
const [showLeaf, setShowLeaf] = (0, import_react21.useState)(false);
|
|
12915
|
+
const [trackingDetails, setTrackingDetails] = (0, import_react21.useState)([]);
|
|
12916
|
+
const [loading, setLoading] = (0, import_react21.useState)(false);
|
|
12917
|
+
(0, import_react21.useEffect)(() => {
|
|
12463
12918
|
if (!initialData) {
|
|
12464
12919
|
setData({ previous: [], current: [] });
|
|
12465
12920
|
setShowLeaf(false);
|
|
@@ -12490,7 +12945,7 @@ function FootFallHeatMapView({
|
|
|
12490
12945
|
startFromPathMode,
|
|
12491
12946
|
tileColorFromSeed
|
|
12492
12947
|
]);
|
|
12493
|
-
const derivedKpiStrip = (0,
|
|
12948
|
+
const derivedKpiStrip = (0, import_react21.useMemo)(() => {
|
|
12494
12949
|
if (isLoading || loading || !initialData) return null;
|
|
12495
12950
|
const activeZoneForStrip = trackingDetails.length > 0 ? trackingDetails[trackingDetails.length - 1] : void 0;
|
|
12496
12951
|
return deriveFootfallHeatMapKpiStrip(
|
|
@@ -12578,7 +13033,7 @@ function FootFallHeatMapView({
|
|
|
12578
13033
|
);
|
|
12579
13034
|
const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
|
|
12580
13035
|
const p = inner;
|
|
12581
|
-
return /* @__PURE__ */ (0,
|
|
13036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
12582
13037
|
"foreignObject",
|
|
12583
13038
|
{
|
|
12584
13039
|
x,
|
|
@@ -12586,8 +13041,8 @@ function FootFallHeatMapView({
|
|
|
12586
13041
|
width,
|
|
12587
13042
|
height,
|
|
12588
13043
|
style: { borderRadius: "12px", overflow: "hidden" },
|
|
12589
|
-
children: /* @__PURE__ */ (0,
|
|
12590
|
-
|
|
13044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13045
|
+
import_material19.Stack,
|
|
12591
13046
|
{
|
|
12592
13047
|
onClick: handleClick,
|
|
12593
13048
|
onKeyDown: (e) => {
|
|
@@ -12617,8 +13072,8 @@ function FootFallHeatMapView({
|
|
|
12617
13072
|
}
|
|
12618
13073
|
},
|
|
12619
13074
|
children: [
|
|
12620
|
-
/* @__PURE__ */ (0,
|
|
12621
|
-
|
|
13075
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13076
|
+
import_material19.Stack,
|
|
12622
13077
|
{
|
|
12623
13078
|
direction: isSmall ? "row" : "column",
|
|
12624
13079
|
justifyContent: "center",
|
|
@@ -12629,8 +13084,8 @@ function FootFallHeatMapView({
|
|
|
12629
13084
|
mb: isSmall ? 0.5 : 1
|
|
12630
13085
|
},
|
|
12631
13086
|
children: [
|
|
12632
|
-
/* @__PURE__ */ (0,
|
|
12633
|
-
|
|
13087
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13088
|
+
import_material19.Typography,
|
|
12634
13089
|
{
|
|
12635
13090
|
sx: {
|
|
12636
13091
|
fontSize: `${fontSize}px!important`,
|
|
@@ -12652,8 +13107,8 @@ function FootFallHeatMapView({
|
|
|
12652
13107
|
children: name
|
|
12653
13108
|
}
|
|
12654
13109
|
),
|
|
12655
|
-
/* @__PURE__ */ (0,
|
|
12656
|
-
|
|
13110
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13111
|
+
import_material19.Typography,
|
|
12657
13112
|
{
|
|
12658
13113
|
sx: {
|
|
12659
13114
|
fontSize: `${fontSize}px!important`,
|
|
@@ -12667,8 +13122,8 @@ function FootFallHeatMapView({
|
|
|
12667
13122
|
]
|
|
12668
13123
|
}
|
|
12669
13124
|
),
|
|
12670
|
-
/* @__PURE__ */ (0,
|
|
12671
|
-
|
|
13125
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13126
|
+
import_material19.Stack,
|
|
12672
13127
|
{
|
|
12673
13128
|
direction: "row",
|
|
12674
13129
|
justifyContent: "center",
|
|
@@ -12681,8 +13136,8 @@ function FootFallHeatMapView({
|
|
|
12681
13136
|
...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
|
|
12682
13137
|
],
|
|
12683
13138
|
children: [
|
|
12684
|
-
/* @__PURE__ */ (0,
|
|
12685
|
-
|
|
13139
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13140
|
+
import_material19.Stack,
|
|
12686
13141
|
{
|
|
12687
13142
|
direction: "row",
|
|
12688
13143
|
alignItems: "center",
|
|
@@ -12699,8 +13154,8 @@ function FootFallHeatMapView({
|
|
|
12699
13154
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
12700
13155
|
],
|
|
12701
13156
|
children: [
|
|
12702
|
-
/* @__PURE__ */ (0,
|
|
12703
|
-
|
|
13157
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13158
|
+
import_material19.Box,
|
|
12704
13159
|
{
|
|
12705
13160
|
sx: [
|
|
12706
13161
|
{
|
|
@@ -12712,8 +13167,8 @@ function FootFallHeatMapView({
|
|
|
12712
13167
|
},
|
|
12713
13168
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
12714
13169
|
],
|
|
12715
|
-
children: /* @__PURE__ */ (0,
|
|
12716
|
-
|
|
13170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13171
|
+
import_react20.Icon,
|
|
12717
13172
|
{
|
|
12718
13173
|
icon: icons.visitors,
|
|
12719
13174
|
color: visitorsIconColor,
|
|
@@ -12722,8 +13177,8 @@ function FootFallHeatMapView({
|
|
|
12722
13177
|
)
|
|
12723
13178
|
}
|
|
12724
13179
|
),
|
|
12725
|
-
/* @__PURE__ */ (0,
|
|
12726
|
-
|
|
13180
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13181
|
+
import_material19.Typography,
|
|
12727
13182
|
{
|
|
12728
13183
|
sx: [
|
|
12729
13184
|
{
|
|
@@ -12740,8 +13195,8 @@ function FootFallHeatMapView({
|
|
|
12740
13195
|
]
|
|
12741
13196
|
}
|
|
12742
13197
|
),
|
|
12743
|
-
/* @__PURE__ */ (0,
|
|
12744
|
-
|
|
13198
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13199
|
+
import_material19.Stack,
|
|
12745
13200
|
{
|
|
12746
13201
|
direction: "row",
|
|
12747
13202
|
alignItems: "center",
|
|
@@ -12758,8 +13213,8 @@ function FootFallHeatMapView({
|
|
|
12758
13213
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
12759
13214
|
],
|
|
12760
13215
|
children: [
|
|
12761
|
-
/* @__PURE__ */ (0,
|
|
12762
|
-
|
|
13216
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13217
|
+
import_material19.Box,
|
|
12763
13218
|
{
|
|
12764
13219
|
sx: [
|
|
12765
13220
|
{
|
|
@@ -12771,8 +13226,8 @@ function FootFallHeatMapView({
|
|
|
12771
13226
|
},
|
|
12772
13227
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
12773
13228
|
],
|
|
12774
|
-
children: /* @__PURE__ */ (0,
|
|
12775
|
-
|
|
13229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13230
|
+
import_react20.Icon,
|
|
12776
13231
|
{
|
|
12777
13232
|
icon: icons.dwell,
|
|
12778
13233
|
color: dwellIconColor,
|
|
@@ -12781,8 +13236,8 @@ function FootFallHeatMapView({
|
|
|
12781
13236
|
)
|
|
12782
13237
|
}
|
|
12783
13238
|
),
|
|
12784
|
-
/* @__PURE__ */ (0,
|
|
12785
|
-
|
|
13239
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13240
|
+
import_material19.Typography,
|
|
12786
13241
|
{
|
|
12787
13242
|
sx: [
|
|
12788
13243
|
{
|
|
@@ -12824,8 +13279,8 @@ function FootFallHeatMapView({
|
|
|
12824
13279
|
const LabelTag = ({ textColor = "#f0f0f0" }) => {
|
|
12825
13280
|
const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
|
|
12826
13281
|
const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
|
|
12827
|
-
return /* @__PURE__ */ (0,
|
|
12828
|
-
|
|
13282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Stack, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13283
|
+
import_material19.Typography,
|
|
12829
13284
|
{
|
|
12830
13285
|
component: "span",
|
|
12831
13286
|
sx: {
|
|
@@ -12838,10 +13293,10 @@ function FootFallHeatMapView({
|
|
|
12838
13293
|
color: textColor,
|
|
12839
13294
|
children: brandLabel
|
|
12840
13295
|
}
|
|
12841
|
-
) : /* @__PURE__ */ (0,
|
|
12842
|
-
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0,
|
|
12843
|
-
i > 0 ? /* @__PURE__ */ (0,
|
|
12844
|
-
|
|
13296
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
13297
|
+
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(React24.Fragment, { children: [
|
|
13298
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13299
|
+
import_material19.Typography,
|
|
12845
13300
|
{
|
|
12846
13301
|
component: "span",
|
|
12847
13302
|
fontSize: "15px !important",
|
|
@@ -12851,8 +13306,8 @@ function FootFallHeatMapView({
|
|
|
12851
13306
|
children: "/"
|
|
12852
13307
|
}
|
|
12853
13308
|
) : null,
|
|
12854
|
-
/* @__PURE__ */ (0,
|
|
12855
|
-
|
|
13309
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13310
|
+
import_material19.Typography,
|
|
12856
13311
|
{
|
|
12857
13312
|
component: "span",
|
|
12858
13313
|
sx: {
|
|
@@ -12867,9 +13322,9 @@ function FootFallHeatMapView({
|
|
|
12867
13322
|
}
|
|
12868
13323
|
)
|
|
12869
13324
|
] }, `${seg}-${i}`)),
|
|
12870
|
-
brandLabel ? /* @__PURE__ */ (0,
|
|
12871
|
-
/* @__PURE__ */ (0,
|
|
12872
|
-
|
|
13325
|
+
brandLabel ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
13326
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13327
|
+
import_material19.Typography,
|
|
12873
13328
|
{
|
|
12874
13329
|
component: "span",
|
|
12875
13330
|
fontSize: "15px !important",
|
|
@@ -12878,8 +13333,8 @@ function FootFallHeatMapView({
|
|
|
12878
13333
|
children: "/"
|
|
12879
13334
|
}
|
|
12880
13335
|
),
|
|
12881
|
-
/* @__PURE__ */ (0,
|
|
12882
|
-
|
|
13336
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13337
|
+
import_material19.Typography,
|
|
12883
13338
|
{
|
|
12884
13339
|
component: "span",
|
|
12885
13340
|
sx: {
|
|
@@ -12898,11 +13353,11 @@ function FootFallHeatMapView({
|
|
|
12898
13353
|
};
|
|
12899
13354
|
const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
|
|
12900
13355
|
if (is500Error) {
|
|
12901
|
-
return /* @__PURE__ */ (0,
|
|
13356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Box, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Typography, { color: "error", children: "Something went wrong (500). Try again later." }) });
|
|
12902
13357
|
}
|
|
12903
13358
|
if (isLoading || loading) {
|
|
12904
|
-
return /* @__PURE__ */ (0,
|
|
12905
|
-
|
|
13359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13360
|
+
import_material19.Skeleton,
|
|
12906
13361
|
{
|
|
12907
13362
|
variant: "rectangular",
|
|
12908
13363
|
width: "100%",
|
|
@@ -12942,9 +13397,9 @@ function FootFallHeatMapView({
|
|
|
12942
13397
|
"#888888",
|
|
12943
13398
|
"header"
|
|
12944
13399
|
);
|
|
12945
|
-
return /* @__PURE__ */ (0,
|
|
12946
|
-
/* @__PURE__ */ (0,
|
|
12947
|
-
|
|
13400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { width: "100%", children: [
|
|
13401
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13402
|
+
import_material19.Box,
|
|
12948
13403
|
{
|
|
12949
13404
|
sx: {
|
|
12950
13405
|
width: "100%",
|
|
@@ -12955,17 +13410,17 @@ function FootFallHeatMapView({
|
|
|
12955
13410
|
gap: 1
|
|
12956
13411
|
},
|
|
12957
13412
|
children: [
|
|
12958
|
-
/* @__PURE__ */ (0,
|
|
12959
|
-
/* @__PURE__ */ (0,
|
|
12960
|
-
isFetching ? /* @__PURE__ */ (0,
|
|
12961
|
-
/* @__PURE__ */ (0,
|
|
12962
|
-
|
|
13413
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Typography, { variant: "h6", fontWeight: 700, children: title }),
|
|
13414
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
13415
|
+
isFetching ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Typography, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
|
|
13416
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material19.Tooltip, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13417
|
+
import_material19.IconButton,
|
|
12963
13418
|
{
|
|
12964
13419
|
size: "small",
|
|
12965
13420
|
"aria-label": "Zone performance info",
|
|
12966
13421
|
edge: "end",
|
|
12967
|
-
children: /* @__PURE__ */ (0,
|
|
12968
|
-
|
|
13422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13423
|
+
import_react20.Icon,
|
|
12969
13424
|
{
|
|
12970
13425
|
icon: icons.headerInfo,
|
|
12971
13426
|
width: headerIconPx,
|
|
@@ -12979,8 +13434,8 @@ function FootFallHeatMapView({
|
|
|
12979
13434
|
]
|
|
12980
13435
|
}
|
|
12981
13436
|
),
|
|
12982
|
-
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0,
|
|
12983
|
-
|
|
13437
|
+
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13438
|
+
import_material19.Stack,
|
|
12984
13439
|
{
|
|
12985
13440
|
direction: "row",
|
|
12986
13441
|
alignItems: "center",
|
|
@@ -12994,14 +13449,14 @@ function FootFallHeatMapView({
|
|
|
12994
13449
|
backgroundColor: zoneBarColor
|
|
12995
13450
|
},
|
|
12996
13451
|
children: [
|
|
12997
|
-
/* @__PURE__ */ (0,
|
|
12998
|
-
/* @__PURE__ */ (0,
|
|
12999
|
-
|
|
13452
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
13453
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13454
|
+
import_material19.Button,
|
|
13000
13455
|
{
|
|
13001
13456
|
size: "small",
|
|
13002
13457
|
onClick: handleClose,
|
|
13003
|
-
startIcon: /* @__PURE__ */ (0,
|
|
13004
|
-
|
|
13458
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13459
|
+
import_react20.Icon,
|
|
13005
13460
|
{
|
|
13006
13461
|
icon: "mdi:chevron-left",
|
|
13007
13462
|
width: 16,
|
|
@@ -13020,10 +13475,10 @@ function FootFallHeatMapView({
|
|
|
13020
13475
|
children: "Back"
|
|
13021
13476
|
}
|
|
13022
13477
|
),
|
|
13023
|
-
/* @__PURE__ */ (0,
|
|
13478
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LabelTag, { textColor: zoneBarHeaderFg })
|
|
13024
13479
|
] }),
|
|
13025
|
-
/* @__PURE__ */ (0,
|
|
13026
|
-
|
|
13480
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
13481
|
+
import_material19.Typography,
|
|
13027
13482
|
{
|
|
13028
13483
|
variant: "h6",
|
|
13029
13484
|
sx: { color: zoneBarHeaderFg, fontWeight: 700 },
|
|
@@ -13037,7 +13492,7 @@ function FootFallHeatMapView({
|
|
|
13037
13492
|
]
|
|
13038
13493
|
}
|
|
13039
13494
|
) : null,
|
|
13040
|
-
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0,
|
|
13495
|
+
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13041
13496
|
FootfallHeatMapKpiRankedBlock,
|
|
13042
13497
|
{
|
|
13043
13498
|
strip: derivedKpiStrip,
|
|
@@ -13054,8 +13509,8 @@ function FootFallHeatMapView({
|
|
|
13054
13509
|
}
|
|
13055
13510
|
}
|
|
13056
13511
|
) : null,
|
|
13057
|
-
showLeafDetailsBody ? /* @__PURE__ */ (0,
|
|
13058
|
-
|
|
13512
|
+
showLeafDetailsBody ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13513
|
+
import_material19.Box,
|
|
13059
13514
|
{
|
|
13060
13515
|
sx: [
|
|
13061
13516
|
{
|
|
@@ -13070,7 +13525,7 @@ function FootFallHeatMapView({
|
|
|
13070
13525
|
]
|
|
13071
13526
|
}
|
|
13072
13527
|
) : null,
|
|
13073
|
-
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0,
|
|
13528
|
+
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts9.ResponsiveContainer, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13074
13529
|
import_recharts9.Treemap,
|
|
13075
13530
|
{
|
|
13076
13531
|
data: data?.current ?? [],
|
|
@@ -13083,13 +13538,13 @@ function FootFallHeatMapView({
|
|
|
13083
13538
|
animationDuration: 0,
|
|
13084
13539
|
style: { borderRadius: "12px" }
|
|
13085
13540
|
}
|
|
13086
|
-
) }) : /* @__PURE__ */ (0,
|
|
13541
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13087
13542
|
ChartEmptyState,
|
|
13088
13543
|
{
|
|
13089
13544
|
minHeight: treemapHeight,
|
|
13090
13545
|
...emptyStatePlaceholderProps
|
|
13091
13546
|
}
|
|
13092
|
-
) : /* @__PURE__ */ (0,
|
|
13547
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
|
|
13093
13548
|
] });
|
|
13094
13549
|
}
|
|
13095
13550
|
|
|
@@ -13098,7 +13553,7 @@ var import_Grid2 = __toESM(require("@mui/material/Grid"));
|
|
|
13098
13553
|
var import_Paper3 = __toESM(require("@mui/material/Paper"));
|
|
13099
13554
|
var import_Stack16 = __toESM(require("@mui/material/Stack"));
|
|
13100
13555
|
var import_Typography15 = __toESM(require("@mui/material/Typography"));
|
|
13101
|
-
var
|
|
13556
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
13102
13557
|
function metricsToRows(metrics) {
|
|
13103
13558
|
return [
|
|
13104
13559
|
{ id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
|
|
@@ -13136,7 +13591,7 @@ function metricsToRows(metrics) {
|
|
|
13136
13591
|
}
|
|
13137
13592
|
var ZoneWiseKpiCards = ({ metrics }) => {
|
|
13138
13593
|
const rows = metricsToRows(metrics);
|
|
13139
|
-
return /* @__PURE__ */ (0,
|
|
13594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Grid2.default, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13140
13595
|
import_Grid2.default,
|
|
13141
13596
|
{
|
|
13142
13597
|
size: {
|
|
@@ -13144,7 +13599,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13144
13599
|
sm: 6,
|
|
13145
13600
|
md: 3
|
|
13146
13601
|
},
|
|
13147
|
-
children: /* @__PURE__ */ (0,
|
|
13602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
13148
13603
|
import_Paper3.default,
|
|
13149
13604
|
{
|
|
13150
13605
|
elevation: 0,
|
|
@@ -13156,7 +13611,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13156
13611
|
height: "100%"
|
|
13157
13612
|
},
|
|
13158
13613
|
children: [
|
|
13159
|
-
/* @__PURE__ */ (0,
|
|
13614
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13160
13615
|
import_Typography15.default,
|
|
13161
13616
|
{
|
|
13162
13617
|
variant: "caption",
|
|
@@ -13165,7 +13620,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13165
13620
|
children: item.title
|
|
13166
13621
|
}
|
|
13167
13622
|
),
|
|
13168
|
-
/* @__PURE__ */ (0,
|
|
13623
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack16.default, { mt: 1, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Typography15.default, { variant: "h6", fontWeight: 700, children: item.value }) })
|
|
13169
13624
|
]
|
|
13170
13625
|
}
|
|
13171
13626
|
)
|
|
@@ -13234,21 +13689,21 @@ var import_recharts10 = require("recharts");
|
|
|
13234
13689
|
|
|
13235
13690
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
|
|
13236
13691
|
var React25 = __toESM(require("react"));
|
|
13237
|
-
var
|
|
13692
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
13238
13693
|
var PeakBillingHoursCustomizationContext = React25.createContext({});
|
|
13239
13694
|
function PeakBillingHoursCustomizationProvider({
|
|
13240
13695
|
value,
|
|
13241
13696
|
children
|
|
13242
13697
|
}) {
|
|
13243
13698
|
const memo = React25.useMemo(() => value, [value]);
|
|
13244
|
-
return /* @__PURE__ */ (0,
|
|
13699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
|
|
13245
13700
|
}
|
|
13246
13701
|
function usePeakBillingHoursCustomization() {
|
|
13247
13702
|
return React25.useContext(PeakBillingHoursCustomizationContext);
|
|
13248
13703
|
}
|
|
13249
13704
|
|
|
13250
13705
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
|
|
13251
|
-
var
|
|
13706
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
13252
13707
|
function formatTooltipValue2(n) {
|
|
13253
13708
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
13254
13709
|
Math.round(n)
|
|
@@ -13295,7 +13750,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
13295
13750
|
},
|
|
13296
13751
|
tt?.bodyStyle
|
|
13297
13752
|
);
|
|
13298
|
-
return /* @__PURE__ */ (0,
|
|
13753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
13299
13754
|
"div",
|
|
13300
13755
|
{
|
|
13301
13756
|
style: {
|
|
@@ -13303,7 +13758,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
13303
13758
|
minWidth: 160,
|
|
13304
13759
|
maxWidth: 280
|
|
13305
13760
|
},
|
|
13306
|
-
children: /* @__PURE__ */ (0,
|
|
13761
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
13307
13762
|
"div",
|
|
13308
13763
|
{
|
|
13309
13764
|
style: {
|
|
@@ -13314,7 +13769,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
13314
13769
|
boxShadow: shadow
|
|
13315
13770
|
},
|
|
13316
13771
|
children: [
|
|
13317
|
-
/* @__PURE__ */ (0,
|
|
13772
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
13318
13773
|
"div",
|
|
13319
13774
|
{
|
|
13320
13775
|
style: {
|
|
@@ -13325,14 +13780,14 @@ function PeakBillingHoursTooltip(props) {
|
|
|
13325
13780
|
"aria-hidden": true
|
|
13326
13781
|
}
|
|
13327
13782
|
),
|
|
13328
|
-
/* @__PURE__ */ (0,
|
|
13329
|
-
/* @__PURE__ */ (0,
|
|
13330
|
-
/* @__PURE__ */ (0,
|
|
13331
|
-
/* @__PURE__ */ (0,
|
|
13783
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: bodyStyle, children: [
|
|
13784
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: rowStyle, children: [
|
|
13785
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
13786
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
13332
13787
|
] }),
|
|
13333
|
-
/* @__PURE__ */ (0,
|
|
13334
|
-
/* @__PURE__ */ (0,
|
|
13335
|
-
/* @__PURE__ */ (0,
|
|
13788
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
13789
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
13790
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
|
|
13336
13791
|
] })
|
|
13337
13792
|
] })
|
|
13338
13793
|
]
|
|
@@ -13343,22 +13798,22 @@ function PeakBillingHoursTooltip(props) {
|
|
|
13343
13798
|
}
|
|
13344
13799
|
|
|
13345
13800
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
13346
|
-
var
|
|
13801
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
13347
13802
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
|
|
13348
13803
|
cartesianGridStroke: "#D3D6DF",
|
|
13349
13804
|
xAxisLineStroke: "#7566FC",
|
|
13350
13805
|
axisTickLineStroke: "#E5E7EB"
|
|
13351
13806
|
};
|
|
13352
13807
|
var OLY_DEFAULT_CHART_AXIS_TICK_FILL2 = "#64748B";
|
|
13353
|
-
function
|
|
13808
|
+
function toNum5(n) {
|
|
13354
13809
|
if (n === void 0) return void 0;
|
|
13355
13810
|
return typeof n === "number" ? n : Number(n);
|
|
13356
13811
|
}
|
|
13357
13812
|
function PeakBarTopLabel(props) {
|
|
13358
13813
|
const { x, y, width, value, fill, fontSize, fontWeight } = props;
|
|
13359
|
-
const nx =
|
|
13360
|
-
const ny =
|
|
13361
|
-
const nw =
|
|
13814
|
+
const nx = toNum5(x);
|
|
13815
|
+
const ny = toNum5(y);
|
|
13816
|
+
const nw = toNum5(width);
|
|
13362
13817
|
if (nx === void 0 || ny === void 0 || nw === void 0) {
|
|
13363
13818
|
return null;
|
|
13364
13819
|
}
|
|
@@ -13368,7 +13823,7 @@ function PeakBarTopLabel(props) {
|
|
|
13368
13823
|
}
|
|
13369
13824
|
const cx = nx + nw / 2;
|
|
13370
13825
|
const cy = ny - 6;
|
|
13371
|
-
return /* @__PURE__ */ (0,
|
|
13826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13372
13827
|
"text",
|
|
13373
13828
|
{
|
|
13374
13829
|
x: cx,
|
|
@@ -13414,7 +13869,7 @@ function BarPlot({
|
|
|
13414
13869
|
barRadius,
|
|
13415
13870
|
barRadius
|
|
13416
13871
|
];
|
|
13417
|
-
return /* @__PURE__ */ (0,
|
|
13872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box18.default, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_recharts10.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
13418
13873
|
import_recharts10.BarChart,
|
|
13419
13874
|
{
|
|
13420
13875
|
data,
|
|
@@ -13422,7 +13877,7 @@ function BarPlot({
|
|
|
13422
13877
|
barCategoryGap: categoryGap,
|
|
13423
13878
|
barGap,
|
|
13424
13879
|
children: [
|
|
13425
|
-
/* @__PURE__ */ (0,
|
|
13880
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13426
13881
|
import_recharts10.CartesianGrid,
|
|
13427
13882
|
{
|
|
13428
13883
|
strokeDasharray: dash,
|
|
@@ -13430,7 +13885,7 @@ function BarPlot({
|
|
|
13430
13885
|
stroke: gridStroke
|
|
13431
13886
|
}
|
|
13432
13887
|
),
|
|
13433
|
-
/* @__PURE__ */ (0,
|
|
13888
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13434
13889
|
import_recharts10.XAxis,
|
|
13435
13890
|
{
|
|
13436
13891
|
dataKey: "label",
|
|
@@ -13443,7 +13898,7 @@ function BarPlot({
|
|
|
13443
13898
|
height: 36
|
|
13444
13899
|
}
|
|
13445
13900
|
),
|
|
13446
|
-
/* @__PURE__ */ (0,
|
|
13901
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13447
13902
|
import_recharts10.YAxis,
|
|
13448
13903
|
{
|
|
13449
13904
|
domain: yAxisDomain,
|
|
@@ -13454,7 +13909,7 @@ function BarPlot({
|
|
|
13454
13909
|
width: yWidth
|
|
13455
13910
|
}
|
|
13456
13911
|
),
|
|
13457
|
-
/* @__PURE__ */ (0,
|
|
13912
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13458
13913
|
import_recharts10.Tooltip,
|
|
13459
13914
|
{
|
|
13460
13915
|
content: (tooltipProps) => {
|
|
@@ -13464,9 +13919,9 @@ function BarPlot({
|
|
|
13464
13919
|
data,
|
|
13465
13920
|
activeTabId
|
|
13466
13921
|
});
|
|
13467
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
13922
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: customTooltip });
|
|
13468
13923
|
}
|
|
13469
|
-
return /* @__PURE__ */ (0,
|
|
13924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PeakBillingHoursTooltip, { ...tooltipProps });
|
|
13470
13925
|
},
|
|
13471
13926
|
cursor: {
|
|
13472
13927
|
fill: hoverBandFill,
|
|
@@ -13476,7 +13931,7 @@ function BarPlot({
|
|
|
13476
13931
|
allowEscapeViewBox: { x: false, y: true }
|
|
13477
13932
|
}
|
|
13478
13933
|
),
|
|
13479
|
-
/* @__PURE__ */ (0,
|
|
13934
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13480
13935
|
import_recharts10.Bar,
|
|
13481
13936
|
{
|
|
13482
13937
|
dataKey: "value",
|
|
@@ -13485,11 +13940,11 @@ function BarPlot({
|
|
|
13485
13940
|
radius: radiusTuple,
|
|
13486
13941
|
isAnimationActive: false,
|
|
13487
13942
|
maxBarSize: 48,
|
|
13488
|
-
children: /* @__PURE__ */ (0,
|
|
13943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13489
13944
|
import_recharts10.LabelList,
|
|
13490
13945
|
{
|
|
13491
13946
|
dataKey: "value",
|
|
13492
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
13947
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13493
13948
|
PeakBarTopLabel,
|
|
13494
13949
|
{
|
|
13495
13950
|
...props,
|
|
@@ -13556,8 +14011,8 @@ function PeakBillingHours({
|
|
|
13556
14011
|
},
|
|
13557
14012
|
customization?.header?.subtitleSx
|
|
13558
14013
|
);
|
|
13559
|
-
return /* @__PURE__ */ (0,
|
|
13560
|
-
/* @__PURE__ */ (0,
|
|
14014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PeakBillingHoursCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Card3.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_CardContent3.default, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack17.default, { spacing: 1.75, sx: { width: "100%" }, children: [
|
|
14015
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
13561
14016
|
import_Stack17.default,
|
|
13562
14017
|
{
|
|
13563
14018
|
direction: "row",
|
|
@@ -13566,20 +14021,20 @@ function PeakBillingHours({
|
|
|
13566
14021
|
gap: 2,
|
|
13567
14022
|
flexWrap: "wrap",
|
|
13568
14023
|
children: [
|
|
13569
|
-
/* @__PURE__ */ (0,
|
|
13570
|
-
/* @__PURE__ */ (0,
|
|
13571
|
-
/* @__PURE__ */ (0,
|
|
14024
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Box18.default, { component: "div", sx: { minWidth: 0 }, children: [
|
|
14025
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography16.default, { component: "span", sx: titleSx, children: title }),
|
|
14026
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography16.default, { component: "span", sx: subtitleSx, children: subtitle })
|
|
13572
14027
|
] }),
|
|
13573
|
-
/* @__PURE__ */ (0,
|
|
14028
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13574
14029
|
import_Stack17.default,
|
|
13575
14030
|
{
|
|
13576
14031
|
direction: "row",
|
|
13577
14032
|
alignItems: "center",
|
|
13578
14033
|
spacing: 1.5,
|
|
13579
14034
|
sx: { flexShrink: 0 },
|
|
13580
|
-
children: resolvedInfo ? /* @__PURE__ */ (0,
|
|
13581
|
-
/* @__PURE__ */ (0,
|
|
13582
|
-
/* @__PURE__ */ (0,
|
|
14035
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
14036
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
14037
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13583
14038
|
ChartWidgetInfoButton,
|
|
13584
14039
|
{
|
|
13585
14040
|
popover: resolvedInfo,
|
|
@@ -13592,7 +14047,7 @@ function PeakBillingHours({
|
|
|
13592
14047
|
]
|
|
13593
14048
|
}
|
|
13594
14049
|
),
|
|
13595
|
-
/* @__PURE__ */ (0,
|
|
14050
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13596
14051
|
ChartWidgetSegmentedTabs,
|
|
13597
14052
|
{
|
|
13598
14053
|
tabs,
|
|
@@ -13612,7 +14067,7 @@ function PeakBillingHours({
|
|
|
13612
14067
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
13613
14068
|
}
|
|
13614
14069
|
),
|
|
13615
|
-
chartData.length > 0 ? /* @__PURE__ */ (0,
|
|
14070
|
+
chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13616
14071
|
BarPlot,
|
|
13617
14072
|
{
|
|
13618
14073
|
data: chartData,
|
|
@@ -13621,7 +14076,7 @@ function PeakBillingHours({
|
|
|
13621
14076
|
activeTabId,
|
|
13622
14077
|
renderTooltip
|
|
13623
14078
|
}
|
|
13624
|
-
) : /* @__PURE__ */ (0,
|
|
14079
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13625
14080
|
ChartEmptyState,
|
|
13626
14081
|
{
|
|
13627
14082
|
minHeight: 320,
|
|
@@ -13634,7 +14089,7 @@ function PeakBillingHours({
|
|
|
13634
14089
|
// src/components/FalconThemeProvider/FalconThemeProvider.tsx
|
|
13635
14090
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
13636
14091
|
var import_styles7 = require("@mui/material/styles");
|
|
13637
|
-
var
|
|
14092
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
13638
14093
|
var lightColor = "51, 48, 60";
|
|
13639
14094
|
var darkColor = "228, 230, 244";
|
|
13640
14095
|
var darkPaperBg = "#2F3349";
|
|
@@ -13714,8 +14169,8 @@ var FalconThemeProvider = ({
|
|
|
13714
14169
|
mixins: { toolbar: { minHeight: 64 } }
|
|
13715
14170
|
})
|
|
13716
14171
|
);
|
|
13717
|
-
return /* @__PURE__ */ (0,
|
|
13718
|
-
/* @__PURE__ */ (0,
|
|
14172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_styles7.ThemeProvider, { theme, children: [
|
|
14173
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_CssBaseline.default, {}),
|
|
13719
14174
|
children
|
|
13720
14175
|
] });
|
|
13721
14176
|
};
|
|
@@ -13748,6 +14203,8 @@ var FalconThemeProvider = ({
|
|
|
13748
14203
|
FalconPagination,
|
|
13749
14204
|
FalconSelect,
|
|
13750
14205
|
FalconSingleSwitch,
|
|
14206
|
+
FalconStatBanner,
|
|
14207
|
+
FalconStatBannerGroup,
|
|
13751
14208
|
FalconTable,
|
|
13752
14209
|
FalconThemeProvider,
|
|
13753
14210
|
FalconTicketColumsFilter,
|