@bpfdev/oly-ui 1.0.8 → 1.0.10
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 +102 -7
- package/dist/index.d.ts +102 -7
- package/dist/index.js +179 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +181 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3517,6 +3517,12 @@ var FalconAuditTimeline = ({
|
|
|
3517
3517
|
chevronLeftIcon,
|
|
3518
3518
|
chevronRightIcon,
|
|
3519
3519
|
exportIcon,
|
|
3520
|
+
eventsMaxHeight = "280px",
|
|
3521
|
+
cardMaxWidth = "1324px",
|
|
3522
|
+
hideScrollbar = false,
|
|
3523
|
+
scrollbarWidth = "6px",
|
|
3524
|
+
scrollbarThumbColor = "#D1D5DB",
|
|
3525
|
+
scrollbarTrackColor = "transparent",
|
|
3520
3526
|
timeControlsRowSx
|
|
3521
3527
|
}) => {
|
|
3522
3528
|
const getInitialKey = () => {
|
|
@@ -3622,10 +3628,25 @@ var FalconAuditTimeline = ({
|
|
|
3622
3628
|
{
|
|
3623
3629
|
sx: {
|
|
3624
3630
|
display: "flex !important",
|
|
3625
|
-
alignItems: "
|
|
3631
|
+
alignItems: "flex-start !important",
|
|
3626
3632
|
gap: "8px !important",
|
|
3627
3633
|
width: "100% !important",
|
|
3628
|
-
flexWrap: "wrap"
|
|
3634
|
+
flexWrap: "wrap",
|
|
3635
|
+
overflowY: "auto",
|
|
3636
|
+
maxHeight: eventsMaxHeight,
|
|
3637
|
+
paddingRight: hideScrollbar ? 0 : "4px",
|
|
3638
|
+
scrollbarWidth: hideScrollbar ? "none" : "auto",
|
|
3639
|
+
"&::-webkit-scrollbar": {
|
|
3640
|
+
width: hideScrollbar ? 0 : scrollbarWidth,
|
|
3641
|
+
display: hideScrollbar ? "none" : void 0
|
|
3642
|
+
},
|
|
3643
|
+
"&::-webkit-scrollbar-thumb": {
|
|
3644
|
+
backgroundColor: scrollbarThumbColor,
|
|
3645
|
+
borderRadius: "999px"
|
|
3646
|
+
},
|
|
3647
|
+
"&::-webkit-scrollbar-track": {
|
|
3648
|
+
backgroundColor: scrollbarTrackColor
|
|
3649
|
+
}
|
|
3629
3650
|
},
|
|
3630
3651
|
children: activeRuns.map((run, idx) => /* @__PURE__ */ jsx15(
|
|
3631
3652
|
TimelineEventCard,
|
|
@@ -3715,9 +3736,9 @@ var FalconAuditTimeline = ({
|
|
|
3715
3736
|
{
|
|
3716
3737
|
sx: {
|
|
3717
3738
|
width: "100% !important",
|
|
3718
|
-
maxWidth:
|
|
3739
|
+
maxWidth: `${cardMaxWidth} !important`,
|
|
3719
3740
|
height: "auto !important",
|
|
3720
|
-
minHeight: isZeroCount ? "166px !important" : "
|
|
3741
|
+
minHeight: isZeroCount ? "166px !important" : "200px !important",
|
|
3721
3742
|
padding: "16px !important",
|
|
3722
3743
|
borderRadius: `${borderRadius} !important`,
|
|
3723
3744
|
border: `${borderWidth} solid ${borderColor} !important`,
|
|
@@ -3750,7 +3771,9 @@ var FalconAuditTimeline = ({
|
|
|
3750
3771
|
display: "flex !important",
|
|
3751
3772
|
alignItems: "center !important",
|
|
3752
3773
|
gap: "8px !important",
|
|
3753
|
-
|
|
3774
|
+
overflowX: "auto",
|
|
3775
|
+
overflowY: "hidden",
|
|
3776
|
+
paddingBottom: "2px"
|
|
3754
3777
|
},
|
|
3755
3778
|
...timeControlsRowSx ? [timeControlsRowSx] : []
|
|
3756
3779
|
],
|
|
@@ -6348,6 +6371,7 @@ var ProgressBarNumber = ({
|
|
|
6348
6371
|
// src/components/widgets/FootfallByAgeGroups/FootfallByAgeGroups.tsx
|
|
6349
6372
|
import Box20 from "@mui/material/Box";
|
|
6350
6373
|
import Divider3 from "@mui/material/Divider";
|
|
6374
|
+
import Skeleton from "@mui/material/Skeleton";
|
|
6351
6375
|
import Stack13 from "@mui/material/Stack";
|
|
6352
6376
|
import Typography15 from "@mui/material/Typography";
|
|
6353
6377
|
import * as React11 from "react";
|
|
@@ -6391,10 +6415,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME = {
|
|
|
6391
6415
|
axisTickLineStroke: "#E5E7EB"
|
|
6392
6416
|
};
|
|
6393
6417
|
var OLY_DEFAULT_FOOTFALL_BY_AGE_CHART_MARGIN = {
|
|
6394
|
-
top:
|
|
6395
|
-
right:
|
|
6396
|
-
left:
|
|
6397
|
-
bottom:
|
|
6418
|
+
top: 16,
|
|
6419
|
+
right: 8,
|
|
6420
|
+
left: 6,
|
|
6421
|
+
bottom: 0
|
|
6398
6422
|
};
|
|
6399
6423
|
var OLY_DEFAULT_FOOTFALL_BY_AGE_STACK_TOTAL_LABEL_FILL = "#28293D";
|
|
6400
6424
|
function mergeCss2(base, override) {
|
|
@@ -6421,6 +6445,8 @@ function MultiLineTick({
|
|
|
6421
6445
|
y = 0,
|
|
6422
6446
|
payload,
|
|
6423
6447
|
angle = -38,
|
|
6448
|
+
dx = 0,
|
|
6449
|
+
style,
|
|
6424
6450
|
textAnchor = "end",
|
|
6425
6451
|
fontSize = 12
|
|
6426
6452
|
}) {
|
|
@@ -6430,13 +6456,14 @@ function MultiLineTick({
|
|
|
6430
6456
|
const isHorizontal = angle === 0;
|
|
6431
6457
|
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
6432
6458
|
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
6433
|
-
return /* @__PURE__ */ jsx30("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx30(
|
|
6459
|
+
return /* @__PURE__ */ jsx30("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx30(
|
|
6434
6460
|
"text",
|
|
6435
6461
|
{
|
|
6436
6462
|
transform: `rotate(${angle})`,
|
|
6437
6463
|
textAnchor: anchor,
|
|
6438
6464
|
fontSize,
|
|
6439
6465
|
fill: "#666",
|
|
6466
|
+
...style,
|
|
6440
6467
|
children: lines.map((line, i) => /* @__PURE__ */ jsx30("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
6441
6468
|
}
|
|
6442
6469
|
) });
|
|
@@ -6655,6 +6682,7 @@ function FootfallByAgeGroups({
|
|
|
6655
6682
|
title,
|
|
6656
6683
|
data,
|
|
6657
6684
|
series,
|
|
6685
|
+
isLoading = false,
|
|
6658
6686
|
chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX,
|
|
6659
6687
|
minWidthPerCategory = defaultMinWidthPerCategory,
|
|
6660
6688
|
horizontalScroll: horizontalScrollProp = "auto",
|
|
@@ -6678,11 +6706,15 @@ function FootfallByAgeGroups({
|
|
|
6678
6706
|
renderTooltip,
|
|
6679
6707
|
showLegend = true,
|
|
6680
6708
|
chartMargin: chartMarginProp,
|
|
6709
|
+
yAxisTickDx = -8,
|
|
6710
|
+
yAxisTickStyle,
|
|
6681
6711
|
chartColors: chartColorsProp,
|
|
6682
6712
|
emptyStatePlaceholderProps,
|
|
6683
6713
|
dimmedStackOpacity = 0.35,
|
|
6684
6714
|
barStackId = "footfall-by-age-groups",
|
|
6685
|
-
xAxisTickAngle = 0
|
|
6715
|
+
xAxisTickAngle = 0,
|
|
6716
|
+
xAxisTickDx = 0,
|
|
6717
|
+
xAxisTickStyle
|
|
6686
6718
|
}) {
|
|
6687
6719
|
const [activeIndex, setActiveIndex] = React11.useState(null);
|
|
6688
6720
|
const handleMouseEnter = React11.useCallback((_, index) => {
|
|
@@ -6756,10 +6788,7 @@ function FootfallByAgeGroups({
|
|
|
6756
6788
|
const barOpacity = (index) => activeIndex === null || activeIndex === index ? 1 : dimmedStackOpacity;
|
|
6757
6789
|
const lastSeriesIndex = series.length - 1;
|
|
6758
6790
|
const chartMargin = React11.useMemo(
|
|
6759
|
-
() =>
|
|
6760
|
-
...defaultChartMargin,
|
|
6761
|
-
...chartMarginProp
|
|
6762
|
-
}),
|
|
6791
|
+
() => chartMarginProp ?? defaultChartMargin,
|
|
6763
6792
|
[chartMarginProp]
|
|
6764
6793
|
);
|
|
6765
6794
|
const chartColors = React11.useMemo(
|
|
@@ -6833,7 +6862,7 @@ function FootfallByAgeGroups({
|
|
|
6833
6862
|
}
|
|
6834
6863
|
),
|
|
6835
6864
|
/* @__PURE__ */ jsx30(Divider3, { sx: sxChain({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
6836
|
-
showLegend && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ jsx30(
|
|
6865
|
+
showLegend && !isLoading && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ jsx30(
|
|
6837
6866
|
Box20,
|
|
6838
6867
|
{
|
|
6839
6868
|
sx: sxChain(
|
|
@@ -6908,7 +6937,7 @@ function FootfallByAgeGroups({
|
|
|
6908
6937
|
},
|
|
6909
6938
|
chartScrollAreaSx
|
|
6910
6939
|
),
|
|
6911
|
-
children: hasMeaningfulData ? /* @__PURE__ */ jsxs22(
|
|
6940
|
+
children: isLoading ? /* @__PURE__ */ jsx30(Skeleton, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs22(
|
|
6912
6941
|
BarChart,
|
|
6913
6942
|
{
|
|
6914
6943
|
width: chartWidthPx,
|
|
@@ -6935,7 +6964,14 @@ function FootfallByAgeGroups({
|
|
|
6935
6964
|
interval: 0,
|
|
6936
6965
|
height: 68,
|
|
6937
6966
|
tickMargin: 10,
|
|
6938
|
-
tick: /* @__PURE__ */ jsx30(
|
|
6967
|
+
tick: /* @__PURE__ */ jsx30(
|
|
6968
|
+
MultiLineTick,
|
|
6969
|
+
{
|
|
6970
|
+
angle: xAxisTickAngle,
|
|
6971
|
+
dx: xAxisTickDx,
|
|
6972
|
+
style: xAxisTickStyle
|
|
6973
|
+
}
|
|
6974
|
+
),
|
|
6939
6975
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
6940
6976
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
6941
6977
|
}
|
|
@@ -6943,8 +6979,9 @@ function FootfallByAgeGroups({
|
|
|
6943
6979
|
/* @__PURE__ */ jsx30(
|
|
6944
6980
|
YAxis,
|
|
6945
6981
|
{
|
|
6982
|
+
dx: yAxisTickDx,
|
|
6946
6983
|
tickSize: 8,
|
|
6947
|
-
tick: { fontSize: 12, fontWeight: 400 },
|
|
6984
|
+
tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
|
|
6948
6985
|
axisLine: { stroke: chartColors.axisTickLineStroke },
|
|
6949
6986
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
6950
6987
|
}
|
|
@@ -7043,11 +7080,12 @@ function FootfallByAgeGroups({
|
|
|
7043
7080
|
}
|
|
7044
7081
|
|
|
7045
7082
|
// src/components/widgets/FootfallByGender/FootfallByGender.tsx
|
|
7083
|
+
import { Icon as Icon11 } from "@iconify/react";
|
|
7046
7084
|
import Box21 from "@mui/material/Box";
|
|
7047
7085
|
import Divider4 from "@mui/material/Divider";
|
|
7086
|
+
import Skeleton2 from "@mui/material/Skeleton";
|
|
7048
7087
|
import Stack14 from "@mui/material/Stack";
|
|
7049
7088
|
import Typography16 from "@mui/material/Typography";
|
|
7050
|
-
import { Icon as Icon11 } from "@iconify/react";
|
|
7051
7089
|
import * as React12 from "react";
|
|
7052
7090
|
import {
|
|
7053
7091
|
Bar as Bar2,
|
|
@@ -7067,10 +7105,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME2 = {
|
|
|
7067
7105
|
axisTickLineStroke: "#E5E7EB"
|
|
7068
7106
|
};
|
|
7069
7107
|
var OLY_DEFAULT_FOOTFALL_GENDER_CHART_MARGIN = {
|
|
7070
|
-
top:
|
|
7071
|
-
right:
|
|
7072
|
-
left:
|
|
7073
|
-
bottom:
|
|
7108
|
+
top: 16,
|
|
7109
|
+
right: 8,
|
|
7110
|
+
left: 4,
|
|
7111
|
+
bottom: 0
|
|
7074
7112
|
};
|
|
7075
7113
|
var OLY_DEFAULT_FOOTFALL_GENDER_SERIES_COLORS = {
|
|
7076
7114
|
male: "#7266E9",
|
|
@@ -7208,6 +7246,8 @@ function MultiLineTick2({
|
|
|
7208
7246
|
y = 0,
|
|
7209
7247
|
payload,
|
|
7210
7248
|
angle = -38,
|
|
7249
|
+
dx = 0,
|
|
7250
|
+
style,
|
|
7211
7251
|
textAnchor = "end",
|
|
7212
7252
|
fontSize = 12
|
|
7213
7253
|
}) {
|
|
@@ -7217,13 +7257,14 @@ function MultiLineTick2({
|
|
|
7217
7257
|
const isHorizontal = angle === 0;
|
|
7218
7258
|
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
7219
7259
|
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
7220
|
-
return /* @__PURE__ */ jsx31("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx31(
|
|
7260
|
+
return /* @__PURE__ */ jsx31("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx31(
|
|
7221
7261
|
"text",
|
|
7222
7262
|
{
|
|
7223
7263
|
transform: `rotate(${angle})`,
|
|
7224
7264
|
textAnchor: anchor,
|
|
7225
7265
|
fontSize,
|
|
7226
7266
|
fill: "#666",
|
|
7267
|
+
...style,
|
|
7227
7268
|
children: lines.map((line, i) => /* @__PURE__ */ jsx31("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
7228
7269
|
}
|
|
7229
7270
|
) });
|
|
@@ -7497,6 +7538,7 @@ function resolveCategoryScroll(minWidthPerCategory, horizontalScroll, categoryCo
|
|
|
7497
7538
|
function FootfallByGender({
|
|
7498
7539
|
title,
|
|
7499
7540
|
data,
|
|
7541
|
+
isLoading = false,
|
|
7500
7542
|
seriesLabels: seriesLabelsProp,
|
|
7501
7543
|
seriesColors: seriesColorsProp,
|
|
7502
7544
|
chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX2,
|
|
@@ -7528,10 +7570,14 @@ function FootfallByGender({
|
|
|
7528
7570
|
tooltipStyles,
|
|
7529
7571
|
renderTooltip,
|
|
7530
7572
|
chartMargin: chartMarginProp,
|
|
7573
|
+
yAxisTickDx = -6,
|
|
7574
|
+
yAxisTickStyle,
|
|
7531
7575
|
chartColors: chartColorsProp,
|
|
7532
7576
|
emptyStatePlaceholderProps,
|
|
7533
7577
|
yAxisTickFormatter,
|
|
7534
7578
|
xAxisTickAngle = 0,
|
|
7579
|
+
xAxisTickDx = 0,
|
|
7580
|
+
xAxisTickStyle,
|
|
7535
7581
|
barValueLabelAngle = 0,
|
|
7536
7582
|
growthBadgeWidth = 45,
|
|
7537
7583
|
growthBadgeHeight = 38,
|
|
@@ -7633,7 +7679,8 @@ function FootfallByGender({
|
|
|
7633
7679
|
if (hasGrowthBadges) top = topReserveForGrowthBadges;
|
|
7634
7680
|
else if (showBarValueLabels) top = topReserveForBarLabels;
|
|
7635
7681
|
else top = topReserveNoBarLabels;
|
|
7636
|
-
|
|
7682
|
+
if (chartMarginProp) return chartMarginProp;
|
|
7683
|
+
return { ...defaultChartMargin2, top };
|
|
7637
7684
|
}, [hasGrowthBadges, showBarValueLabels, chartMarginProp]);
|
|
7638
7685
|
const chartColors = React12.useMemo(
|
|
7639
7686
|
() => ({
|
|
@@ -7736,7 +7783,7 @@ function FootfallByGender({
|
|
|
7736
7783
|
},
|
|
7737
7784
|
chartScrollAreaSx
|
|
7738
7785
|
),
|
|
7739
|
-
children: processedData.length > 0 ? /* @__PURE__ */ jsxs23(
|
|
7786
|
+
children: isLoading ? /* @__PURE__ */ jsx31(Skeleton2, { variant: "rounded", width: "100%", height: "100%" }) : processedData.length > 0 ? /* @__PURE__ */ jsxs23(
|
|
7740
7787
|
BarChart2,
|
|
7741
7788
|
{
|
|
7742
7789
|
width: chartWidthPx,
|
|
@@ -7765,7 +7812,14 @@ function FootfallByGender({
|
|
|
7765
7812
|
interval: 0,
|
|
7766
7813
|
height: 68,
|
|
7767
7814
|
tickMargin: 10,
|
|
7768
|
-
tick: /* @__PURE__ */ jsx31(
|
|
7815
|
+
tick: /* @__PURE__ */ jsx31(
|
|
7816
|
+
MultiLineTick2,
|
|
7817
|
+
{
|
|
7818
|
+
angle: xAxisTickAngle,
|
|
7819
|
+
dx: xAxisTickDx,
|
|
7820
|
+
style: xAxisTickStyle
|
|
7821
|
+
}
|
|
7822
|
+
),
|
|
7769
7823
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
7770
7824
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
7771
7825
|
}
|
|
@@ -7774,8 +7828,9 @@ function FootfallByGender({
|
|
|
7774
7828
|
YAxis2,
|
|
7775
7829
|
{
|
|
7776
7830
|
width: 52,
|
|
7831
|
+
dx: yAxisTickDx,
|
|
7777
7832
|
tickSize: 8,
|
|
7778
|
-
tick: { fontSize: 12, fontWeight: 400 },
|
|
7833
|
+
tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
|
|
7779
7834
|
tickFormatter: yAxisTick,
|
|
7780
7835
|
axisLine: { stroke: chartColors.axisTickLineStroke },
|
|
7781
7836
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
@@ -7815,6 +7870,7 @@ function FootfallByGender({
|
|
|
7815
7870
|
dataKey: "male",
|
|
7816
7871
|
name: seriesLabels.male,
|
|
7817
7872
|
fill: seriesColors.male,
|
|
7873
|
+
barSize: resolvedMaxBarSize,
|
|
7818
7874
|
onMouseEnter: handleMouseEnter,
|
|
7819
7875
|
onMouseLeave: handleMouseLeave,
|
|
7820
7876
|
children: [
|
|
@@ -7865,6 +7921,7 @@ function FootfallByGender({
|
|
|
7865
7921
|
dataKey: "female",
|
|
7866
7922
|
name: seriesLabels.female,
|
|
7867
7923
|
fill: seriesColors.female,
|
|
7924
|
+
barSize: resolvedMaxBarSize,
|
|
7868
7925
|
onMouseEnter: handleMouseEnter,
|
|
7869
7926
|
onMouseLeave: handleMouseLeave,
|
|
7870
7927
|
children: [
|
|
@@ -7934,7 +7991,7 @@ function FootfallByGender({
|
|
|
7934
7991
|
)
|
|
7935
7992
|
}
|
|
7936
7993
|
),
|
|
7937
|
-
showLegend && processedData.length > 0 ? /* @__PURE__ */ jsxs23(
|
|
7994
|
+
showLegend && !isLoading && processedData.length > 0 ? /* @__PURE__ */ jsxs23(
|
|
7938
7995
|
Box21,
|
|
7939
7996
|
{
|
|
7940
7997
|
component: "ul",
|
|
@@ -8069,6 +8126,7 @@ function FootfallByGender({
|
|
|
8069
8126
|
// src/components/widgets/PasserbyConversion/PasserbyConversion.tsx
|
|
8070
8127
|
import Box22 from "@mui/material/Box";
|
|
8071
8128
|
import Divider5 from "@mui/material/Divider";
|
|
8129
|
+
import Skeleton3 from "@mui/material/Skeleton";
|
|
8072
8130
|
import Stack15 from "@mui/material/Stack";
|
|
8073
8131
|
import Typography17 from "@mui/material/Typography";
|
|
8074
8132
|
import * as React14 from "react";
|
|
@@ -8119,10 +8177,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME3 = {
|
|
|
8119
8177
|
axisTickLineStroke: "#E5E7EB"
|
|
8120
8178
|
};
|
|
8121
8179
|
var OLY_DEFAULT_PASSERBY_CHART_MARGIN = {
|
|
8122
|
-
top:
|
|
8180
|
+
top: 16,
|
|
8123
8181
|
right: 8,
|
|
8124
|
-
left:
|
|
8125
|
-
bottom:
|
|
8182
|
+
left: 6,
|
|
8183
|
+
bottom: 0
|
|
8126
8184
|
};
|
|
8127
8185
|
var OLY_DEFAULT_PASSERBY_CHART_SERIES_COLORS = {
|
|
8128
8186
|
passerbyBarFill: "#FFCC4D",
|
|
@@ -8151,6 +8209,8 @@ function MultiLineTick3({
|
|
|
8151
8209
|
y = 0,
|
|
8152
8210
|
payload,
|
|
8153
8211
|
angle = -42,
|
|
8212
|
+
dx = 0,
|
|
8213
|
+
style,
|
|
8154
8214
|
textAnchor = "end",
|
|
8155
8215
|
fontSize = 12
|
|
8156
8216
|
}) {
|
|
@@ -8160,13 +8220,14 @@ function MultiLineTick3({
|
|
|
8160
8220
|
const isHorizontal = angle === 0;
|
|
8161
8221
|
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
8162
8222
|
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
8163
|
-
return /* @__PURE__ */ jsx32("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx32(
|
|
8223
|
+
return /* @__PURE__ */ jsx32("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx32(
|
|
8164
8224
|
"text",
|
|
8165
8225
|
{
|
|
8166
8226
|
transform: `rotate(${angle})`,
|
|
8167
8227
|
textAnchor: anchor,
|
|
8168
8228
|
fontSize,
|
|
8169
8229
|
fill: "#666",
|
|
8230
|
+
...style,
|
|
8170
8231
|
children: lines.map((line, i) => /* @__PURE__ */ jsx32("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
8171
8232
|
}
|
|
8172
8233
|
) });
|
|
@@ -8437,6 +8498,7 @@ function defaultFormatTooltipConversion(value) {
|
|
|
8437
8498
|
function PasserbyConversion({
|
|
8438
8499
|
title,
|
|
8439
8500
|
data,
|
|
8501
|
+
isLoading = false,
|
|
8440
8502
|
timeSlots,
|
|
8441
8503
|
fillMissingTimeSlots = true,
|
|
8442
8504
|
chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX3,
|
|
@@ -8476,12 +8538,20 @@ function PasserbyConversion({
|
|
|
8476
8538
|
showConversionLine: showConversionLineProp,
|
|
8477
8539
|
showBarValueLabels = true,
|
|
8478
8540
|
chartMargin: chartMarginProp,
|
|
8541
|
+
yAxisTickDx = -8,
|
|
8542
|
+
yAxisTickStyle,
|
|
8543
|
+
conversionAxisTickDx = 0,
|
|
8544
|
+
conversionAxisTickStyle,
|
|
8545
|
+
rightYAxisTickDx,
|
|
8546
|
+
rightYAxisTickStyle,
|
|
8479
8547
|
chartColors: chartColorsProp,
|
|
8480
8548
|
emptyStatePlaceholderProps,
|
|
8481
8549
|
isChartAnimationActive = true,
|
|
8482
8550
|
chartAnimationDuration = 400,
|
|
8483
8551
|
scrollChartToEndOnDataChange = true,
|
|
8484
|
-
xAxisTickAngle = 0
|
|
8552
|
+
xAxisTickAngle = 0,
|
|
8553
|
+
xAxisTickDx = 0,
|
|
8554
|
+
xAxisTickStyle
|
|
8485
8555
|
}) {
|
|
8486
8556
|
const [activeIndex, setActiveIndex] = React14.useState(null);
|
|
8487
8557
|
const handleBarMouseEnter = React14.useCallback((_, index) => {
|
|
@@ -8604,12 +8674,8 @@ function PasserbyConversion({
|
|
|
8604
8674
|
const chartMargin = React14.useMemo(() => {
|
|
8605
8675
|
const top = showBarValueLabels ? topReserveForBarLabels2 : topReserveNoBarLabels2;
|
|
8606
8676
|
const right = showConversionLine ? 52 : defaultChartMargin3.right;
|
|
8607
|
-
return
|
|
8608
|
-
|
|
8609
|
-
top,
|
|
8610
|
-
right,
|
|
8611
|
-
...chartMarginProp
|
|
8612
|
-
};
|
|
8677
|
+
if (chartMarginProp) return chartMarginProp;
|
|
8678
|
+
return { ...defaultChartMargin3, top, right };
|
|
8613
8679
|
}, [showBarValueLabels, showConversionLine, chartMarginProp]);
|
|
8614
8680
|
const yTickLeft = yAxisTickFormatter ?? formatYAxisTickDefault2;
|
|
8615
8681
|
const yTickRight = conversionAxisTickFormatter ?? formatYAxisTickDefault2;
|
|
@@ -8706,7 +8772,7 @@ function PasserbyConversion({
|
|
|
8706
8772
|
}
|
|
8707
8773
|
),
|
|
8708
8774
|
/* @__PURE__ */ jsx32(Divider5, { sx: sxChain3({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
8709
|
-
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx32(
|
|
8775
|
+
showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx32(
|
|
8710
8776
|
Box22,
|
|
8711
8777
|
{
|
|
8712
8778
|
sx: sxChain3(
|
|
@@ -8796,7 +8862,7 @@ function PasserbyConversion({
|
|
|
8796
8862
|
},
|
|
8797
8863
|
chartScrollAreaSx
|
|
8798
8864
|
),
|
|
8799
|
-
children: hasMeaningfulData ? /* @__PURE__ */ jsxs24(
|
|
8865
|
+
children: isLoading ? /* @__PURE__ */ jsx32(Skeleton3, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs24(
|
|
8800
8866
|
ComposedChart,
|
|
8801
8867
|
{
|
|
8802
8868
|
width: chartWidthPx,
|
|
@@ -8826,7 +8892,14 @@ function PasserbyConversion({
|
|
|
8826
8892
|
interval: 0,
|
|
8827
8893
|
height: 68,
|
|
8828
8894
|
tickMargin: 10,
|
|
8829
|
-
tick: /* @__PURE__ */ jsx32(
|
|
8895
|
+
tick: /* @__PURE__ */ jsx32(
|
|
8896
|
+
MultiLineTick3,
|
|
8897
|
+
{
|
|
8898
|
+
angle: xAxisTickAngle,
|
|
8899
|
+
dx: xAxisTickDx,
|
|
8900
|
+
style: xAxisTickStyle
|
|
8901
|
+
}
|
|
8902
|
+
),
|
|
8830
8903
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
8831
8904
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
8832
8905
|
}
|
|
@@ -8835,8 +8908,9 @@ function PasserbyConversion({
|
|
|
8835
8908
|
YAxis3,
|
|
8836
8909
|
{
|
|
8837
8910
|
yAxisId: "left",
|
|
8911
|
+
dx: yAxisTickDx,
|
|
8838
8912
|
tickSize: 8,
|
|
8839
|
-
tick: { fontSize: 12, fontWeight: 400 },
|
|
8913
|
+
tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
|
|
8840
8914
|
tickFormatter: yTickLeft,
|
|
8841
8915
|
axisLine: { stroke: chartColors.axisTickLineStroke },
|
|
8842
8916
|
tickLine: { stroke: chartColors.axisTickLineStroke },
|
|
@@ -8848,8 +8922,13 @@ function PasserbyConversion({
|
|
|
8848
8922
|
{
|
|
8849
8923
|
yAxisId: "right",
|
|
8850
8924
|
orientation: "right",
|
|
8925
|
+
dx: rightYAxisTickDx ?? conversionAxisTickDx,
|
|
8851
8926
|
tickSize: 8,
|
|
8852
|
-
tick: {
|
|
8927
|
+
tick: {
|
|
8928
|
+
fontSize: 12,
|
|
8929
|
+
fontWeight: 400,
|
|
8930
|
+
...rightYAxisTickStyle ?? conversionAxisTickStyle
|
|
8931
|
+
},
|
|
8853
8932
|
tickFormatter: yTickRight,
|
|
8854
8933
|
axisLine: { stroke: chartColors.axisTickLineStroke },
|
|
8855
8934
|
tickLine: { stroke: chartColors.axisTickLineStroke },
|
|
@@ -9498,6 +9577,7 @@ var WalkinAnalysis = ({
|
|
|
9498
9577
|
// src/components/widgets/WalkinTraffic/WalkinTraffic.tsx
|
|
9499
9578
|
import Box24 from "@mui/material/Box";
|
|
9500
9579
|
import Divider6 from "@mui/material/Divider";
|
|
9580
|
+
import Skeleton4 from "@mui/material/Skeleton";
|
|
9501
9581
|
import Stack17 from "@mui/material/Stack";
|
|
9502
9582
|
import Typography19 from "@mui/material/Typography";
|
|
9503
9583
|
import * as React16 from "react";
|
|
@@ -9520,10 +9600,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME4 = {
|
|
|
9520
9600
|
axisTickLineStroke: "#E5E7EB"
|
|
9521
9601
|
};
|
|
9522
9602
|
var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_MARGIN = {
|
|
9523
|
-
top:
|
|
9524
|
-
right:
|
|
9525
|
-
left:
|
|
9526
|
-
bottom:
|
|
9603
|
+
top: 16,
|
|
9604
|
+
right: 8,
|
|
9605
|
+
left: 6,
|
|
9606
|
+
bottom: 0
|
|
9527
9607
|
};
|
|
9528
9608
|
var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_SERIES_COLORS = {
|
|
9529
9609
|
barFill: "#0086A9",
|
|
@@ -9593,6 +9673,8 @@ function MultiLineTick4({
|
|
|
9593
9673
|
y = 0,
|
|
9594
9674
|
payload,
|
|
9595
9675
|
angle = -42,
|
|
9676
|
+
dx = 0,
|
|
9677
|
+
style,
|
|
9596
9678
|
textAnchor = "end",
|
|
9597
9679
|
fontSize = 12
|
|
9598
9680
|
}) {
|
|
@@ -9602,13 +9684,14 @@ function MultiLineTick4({
|
|
|
9602
9684
|
const isHorizontal = angle === 0;
|
|
9603
9685
|
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
9604
9686
|
const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
|
|
9605
|
-
return /* @__PURE__ */ jsx34("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx34(
|
|
9687
|
+
return /* @__PURE__ */ jsx34("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx34(
|
|
9606
9688
|
"text",
|
|
9607
9689
|
{
|
|
9608
9690
|
transform: `rotate(${angle})`,
|
|
9609
9691
|
textAnchor: anchor,
|
|
9610
9692
|
fontSize,
|
|
9611
9693
|
fill: "#666",
|
|
9694
|
+
...style,
|
|
9612
9695
|
children: lines.map((line, i) => /* @__PURE__ */ jsx34("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
9613
9696
|
}
|
|
9614
9697
|
) });
|
|
@@ -9886,6 +9969,7 @@ var defaultChartColors4 = {
|
|
|
9886
9969
|
function WalkinTraffic({
|
|
9887
9970
|
title,
|
|
9888
9971
|
data,
|
|
9972
|
+
isLoading = false,
|
|
9889
9973
|
chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX4,
|
|
9890
9974
|
barSeriesName = "Walk-ins",
|
|
9891
9975
|
lineSeriesName = "Trend",
|
|
@@ -9920,13 +10004,17 @@ function WalkinTraffic({
|
|
|
9920
10004
|
showLineInLegend = false,
|
|
9921
10005
|
showBarValueLabels = true,
|
|
9922
10006
|
chartMargin: chartMarginProp,
|
|
10007
|
+
yAxisTickDx = -8,
|
|
10008
|
+
yAxisTickStyle,
|
|
9923
10009
|
chartColors: chartColorsProp,
|
|
9924
10010
|
emptyStatePlaceholderProps,
|
|
9925
10011
|
yAxisTickFormatter,
|
|
9926
10012
|
isChartAnimationActive = true,
|
|
9927
10013
|
chartAnimationDuration = 400,
|
|
9928
10014
|
scrollChartToEndOnDataChange = true,
|
|
9929
|
-
xAxisTickAngle = 0
|
|
10015
|
+
xAxisTickAngle = 0,
|
|
10016
|
+
xAxisTickDx = 0,
|
|
10017
|
+
xAxisTickStyle
|
|
9930
10018
|
}) {
|
|
9931
10019
|
const tooltipFooterNote = tooltipFooterNoteProp === void 0 ? defaultFfGrowthTooltipFooterNote : tooltipFooterNoteProp;
|
|
9932
10020
|
const processedData = React16.useMemo(
|
|
@@ -10003,11 +10091,8 @@ function WalkinTraffic({
|
|
|
10003
10091
|
}, [chartInnerMinWidthPx, containerWidth]);
|
|
10004
10092
|
const chartMargin = React16.useMemo(() => {
|
|
10005
10093
|
const top = showBarValueLabels ? topReserveForBarLabels3 : topReserveNoBarLabels3;
|
|
10006
|
-
return
|
|
10007
|
-
|
|
10008
|
-
top,
|
|
10009
|
-
...chartMarginProp
|
|
10010
|
-
};
|
|
10094
|
+
if (chartMarginProp) return chartMarginProp;
|
|
10095
|
+
return { ...defaultChartMargin4, top };
|
|
10011
10096
|
}, [showBarValueLabels, chartMarginProp]);
|
|
10012
10097
|
const chartColors = React16.useMemo(
|
|
10013
10098
|
() => ({
|
|
@@ -10107,7 +10192,7 @@ function WalkinTraffic({
|
|
|
10107
10192
|
}
|
|
10108
10193
|
),
|
|
10109
10194
|
/* @__PURE__ */ jsx34(Divider6, { sx: sxChain4({ borderColor: "#D8D9E4" }, dividerSx) }),
|
|
10110
|
-
showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx34(
|
|
10195
|
+
showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx34(
|
|
10111
10196
|
Box24,
|
|
10112
10197
|
{
|
|
10113
10198
|
sx: sxChain4(
|
|
@@ -10197,7 +10282,7 @@ function WalkinTraffic({
|
|
|
10197
10282
|
},
|
|
10198
10283
|
chartScrollAreaSx
|
|
10199
10284
|
),
|
|
10200
|
-
children: hasMeaningfulData ? /* @__PURE__ */ jsxs26(
|
|
10285
|
+
children: isLoading ? /* @__PURE__ */ jsx34(Skeleton4, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs26(
|
|
10201
10286
|
ComposedChart2,
|
|
10202
10287
|
{
|
|
10203
10288
|
width: chartWidthPx,
|
|
@@ -10223,7 +10308,14 @@ function WalkinTraffic({
|
|
|
10223
10308
|
interval: 0,
|
|
10224
10309
|
height: 68,
|
|
10225
10310
|
tickMargin: 10,
|
|
10226
|
-
tick: /* @__PURE__ */ jsx34(
|
|
10311
|
+
tick: /* @__PURE__ */ jsx34(
|
|
10312
|
+
MultiLineTick4,
|
|
10313
|
+
{
|
|
10314
|
+
angle: xAxisTickAngle,
|
|
10315
|
+
dx: xAxisTickDx,
|
|
10316
|
+
style: xAxisTickStyle
|
|
10317
|
+
}
|
|
10318
|
+
),
|
|
10227
10319
|
axisLine: { stroke: chartColors.xAxisLineStroke },
|
|
10228
10320
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
10229
10321
|
}
|
|
@@ -10231,8 +10323,9 @@ function WalkinTraffic({
|
|
|
10231
10323
|
/* @__PURE__ */ jsx34(
|
|
10232
10324
|
YAxis4,
|
|
10233
10325
|
{
|
|
10326
|
+
dx: yAxisTickDx,
|
|
10234
10327
|
tickSize: 8,
|
|
10235
|
-
tick: { fontSize: 12, fontWeight: 400 },
|
|
10328
|
+
tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
|
|
10236
10329
|
tickFormatter: yTick,
|
|
10237
10330
|
axisLine: { stroke: chartColors.axisTickLineStroke },
|
|
10238
10331
|
tickLine: { stroke: chartColors.axisTickLineStroke }
|
|
@@ -11947,7 +12040,7 @@ import {
|
|
|
11947
12040
|
Button as Button8,
|
|
11948
12041
|
IconButton as IconButton5,
|
|
11949
12042
|
Paper as Paper5,
|
|
11950
|
-
Skeleton,
|
|
12043
|
+
Skeleton as Skeleton5,
|
|
11951
12044
|
Stack as Stack23,
|
|
11952
12045
|
Tooltip as Tooltip12,
|
|
11953
12046
|
Typography as Typography24
|
|
@@ -13334,7 +13427,7 @@ function FootFallHeatMapView({
|
|
|
13334
13427
|
}
|
|
13335
13428
|
if (isLoading || loading) {
|
|
13336
13429
|
return /* @__PURE__ */ jsx43(
|
|
13337
|
-
|
|
13430
|
+
Skeleton5,
|
|
13338
13431
|
{
|
|
13339
13432
|
variant: "rectangular",
|
|
13340
13433
|
width: "100%",
|
|
@@ -13659,6 +13752,7 @@ var peakBillingHoursMockSeriesByTabId = {
|
|
|
13659
13752
|
import Box30 from "@mui/material/Box";
|
|
13660
13753
|
import Card4 from "@mui/material/Card";
|
|
13661
13754
|
import CardContent3 from "@mui/material/CardContent";
|
|
13755
|
+
import Skeleton6 from "@mui/material/Skeleton";
|
|
13662
13756
|
import Stack25 from "@mui/material/Stack";
|
|
13663
13757
|
import Typography26 from "@mui/material/Typography";
|
|
13664
13758
|
import * as React26 from "react";
|
|
@@ -13827,7 +13921,12 @@ function BarPlot({
|
|
|
13827
13921
|
yAxisDomain,
|
|
13828
13922
|
yAxisTicks,
|
|
13829
13923
|
activeTabId,
|
|
13830
|
-
renderTooltip
|
|
13924
|
+
renderTooltip,
|
|
13925
|
+
chartMargin,
|
|
13926
|
+
yAxisTickDx = -6,
|
|
13927
|
+
yAxisTickStyle,
|
|
13928
|
+
xAxisTickDx = 0,
|
|
13929
|
+
xAxisTickStyle
|
|
13831
13930
|
}) {
|
|
13832
13931
|
const { barChart: bc } = usePeakBillingHoursCustomization();
|
|
13833
13932
|
const height = bc?.heightPx ?? 320;
|
|
@@ -13835,7 +13934,7 @@ function BarPlot({
|
|
|
13835
13934
|
const barRadius = bc?.barRadius ?? 0;
|
|
13836
13935
|
const gridStroke = bc?.gridStroke ?? OLY_DEFAULT_COMPOSED_CHART_CHROME6.cartesianGridStroke;
|
|
13837
13936
|
const dash = bc?.gridStrokeDasharray ?? "3 3";
|
|
13838
|
-
const m = {
|
|
13937
|
+
const m = chartMargin ?? {
|
|
13839
13938
|
top: bc?.margin?.top ?? 28,
|
|
13840
13939
|
right: bc?.margin?.right ?? 12,
|
|
13841
13940
|
bottom: bc?.margin?.bottom ?? 8,
|
|
@@ -13875,7 +13974,8 @@ function BarPlot({
|
|
|
13875
13974
|
XAxis7,
|
|
13876
13975
|
{
|
|
13877
13976
|
dataKey: "label",
|
|
13878
|
-
|
|
13977
|
+
dx: xAxisTickDx,
|
|
13978
|
+
tick: { fill: xFill, fontSize: 11, ...xAxisTickStyle },
|
|
13879
13979
|
tickLine: false,
|
|
13880
13980
|
axisLine: {
|
|
13881
13981
|
stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME6.axisTickLineStroke
|
|
@@ -13889,7 +13989,8 @@ function BarPlot({
|
|
|
13889
13989
|
{
|
|
13890
13990
|
domain: yAxisDomain,
|
|
13891
13991
|
ticks: yAxisTicks,
|
|
13892
|
-
|
|
13992
|
+
dx: yAxisTickDx,
|
|
13993
|
+
tick: { fill: yFill, fontSize: 11, ...yAxisTickStyle },
|
|
13893
13994
|
tickLine: false,
|
|
13894
13995
|
axisLine: false,
|
|
13895
13996
|
width: yWidth
|
|
@@ -13954,7 +14055,13 @@ function PeakBillingHours({
|
|
|
13954
14055
|
activeTabId,
|
|
13955
14056
|
onTabChange,
|
|
13956
14057
|
data,
|
|
14058
|
+
isLoading = false,
|
|
13957
14059
|
seriesByTabId,
|
|
14060
|
+
chartMargin,
|
|
14061
|
+
yAxisTickDx = -6,
|
|
14062
|
+
yAxisTickStyle,
|
|
14063
|
+
xAxisTickDx = 0,
|
|
14064
|
+
xAxisTickStyle,
|
|
13958
14065
|
yAxisDomain = [0, 50],
|
|
13959
14066
|
yAxisTicks = [0, 10, 20, 30, 40, 50],
|
|
13960
14067
|
infoPopover,
|
|
@@ -14053,14 +14160,19 @@ function PeakBillingHours({
|
|
|
14053
14160
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
14054
14161
|
}
|
|
14055
14162
|
),
|
|
14056
|
-
chartData.length > 0 ? /* @__PURE__ */ jsx47(
|
|
14163
|
+
isLoading ? /* @__PURE__ */ jsx47(Skeleton6, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ jsx47(
|
|
14057
14164
|
BarPlot,
|
|
14058
14165
|
{
|
|
14059
14166
|
data: chartData,
|
|
14060
14167
|
yAxisDomain,
|
|
14061
14168
|
yAxisTicks,
|
|
14062
14169
|
activeTabId,
|
|
14063
|
-
renderTooltip
|
|
14170
|
+
renderTooltip,
|
|
14171
|
+
chartMargin,
|
|
14172
|
+
yAxisTickDx,
|
|
14173
|
+
yAxisTickStyle,
|
|
14174
|
+
xAxisTickDx,
|
|
14175
|
+
xAxisTickStyle
|
|
14064
14176
|
}
|
|
14065
14177
|
) : /* @__PURE__ */ jsx47(
|
|
14066
14178
|
ChartEmptyState,
|