@bpfdev/oly-ui 1.0.8 → 1.0.9

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.mjs CHANGED
@@ -6348,6 +6348,7 @@ var ProgressBarNumber = ({
6348
6348
  // src/components/widgets/FootfallByAgeGroups/FootfallByAgeGroups.tsx
6349
6349
  import Box20 from "@mui/material/Box";
6350
6350
  import Divider3 from "@mui/material/Divider";
6351
+ import Skeleton from "@mui/material/Skeleton";
6351
6352
  import Stack13 from "@mui/material/Stack";
6352
6353
  import Typography15 from "@mui/material/Typography";
6353
6354
  import * as React11 from "react";
@@ -6391,10 +6392,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME = {
6391
6392
  axisTickLineStroke: "#E5E7EB"
6392
6393
  };
6393
6394
  var OLY_DEFAULT_FOOTFALL_BY_AGE_CHART_MARGIN = {
6394
- top: 36,
6395
- right: 28,
6396
- left: 12,
6397
- bottom: 28
6395
+ top: 16,
6396
+ right: 8,
6397
+ left: 6,
6398
+ bottom: 0
6398
6399
  };
6399
6400
  var OLY_DEFAULT_FOOTFALL_BY_AGE_STACK_TOTAL_LABEL_FILL = "#28293D";
6400
6401
  function mergeCss2(base, override) {
@@ -6421,6 +6422,8 @@ function MultiLineTick({
6421
6422
  y = 0,
6422
6423
  payload,
6423
6424
  angle = -38,
6425
+ dx = 0,
6426
+ style,
6424
6427
  textAnchor = "end",
6425
6428
  fontSize = 12
6426
6429
  }) {
@@ -6430,13 +6433,14 @@ function MultiLineTick({
6430
6433
  const isHorizontal = angle === 0;
6431
6434
  const anchor = isHorizontal ? "middle" : textAnchor;
6432
6435
  const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
6433
- return /* @__PURE__ */ jsx30("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx30(
6436
+ return /* @__PURE__ */ jsx30("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx30(
6434
6437
  "text",
6435
6438
  {
6436
6439
  transform: `rotate(${angle})`,
6437
6440
  textAnchor: anchor,
6438
6441
  fontSize,
6439
6442
  fill: "#666",
6443
+ ...style,
6440
6444
  children: lines.map((line, i) => /* @__PURE__ */ jsx30("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
6441
6445
  }
6442
6446
  ) });
@@ -6655,6 +6659,7 @@ function FootfallByAgeGroups({
6655
6659
  title,
6656
6660
  data,
6657
6661
  series,
6662
+ isLoading = false,
6658
6663
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX,
6659
6664
  minWidthPerCategory = defaultMinWidthPerCategory,
6660
6665
  horizontalScroll: horizontalScrollProp = "auto",
@@ -6678,11 +6683,15 @@ function FootfallByAgeGroups({
6678
6683
  renderTooltip,
6679
6684
  showLegend = true,
6680
6685
  chartMargin: chartMarginProp,
6686
+ yAxisTickDx = -8,
6687
+ yAxisTickStyle,
6681
6688
  chartColors: chartColorsProp,
6682
6689
  emptyStatePlaceholderProps,
6683
6690
  dimmedStackOpacity = 0.35,
6684
6691
  barStackId = "footfall-by-age-groups",
6685
- xAxisTickAngle = 0
6692
+ xAxisTickAngle = 0,
6693
+ xAxisTickDx = 0,
6694
+ xAxisTickStyle
6686
6695
  }) {
6687
6696
  const [activeIndex, setActiveIndex] = React11.useState(null);
6688
6697
  const handleMouseEnter = React11.useCallback((_, index) => {
@@ -6756,10 +6765,7 @@ function FootfallByAgeGroups({
6756
6765
  const barOpacity = (index) => activeIndex === null || activeIndex === index ? 1 : dimmedStackOpacity;
6757
6766
  const lastSeriesIndex = series.length - 1;
6758
6767
  const chartMargin = React11.useMemo(
6759
- () => ({
6760
- ...defaultChartMargin,
6761
- ...chartMarginProp
6762
- }),
6768
+ () => chartMarginProp ?? defaultChartMargin,
6763
6769
  [chartMarginProp]
6764
6770
  );
6765
6771
  const chartColors = React11.useMemo(
@@ -6833,7 +6839,7 @@ function FootfallByAgeGroups({
6833
6839
  }
6834
6840
  ),
6835
6841
  /* @__PURE__ */ jsx30(Divider3, { sx: sxChain({ borderColor: "#D8D9E4" }, dividerSx) }),
6836
- showLegend && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ jsx30(
6842
+ showLegend && !isLoading && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ jsx30(
6837
6843
  Box20,
6838
6844
  {
6839
6845
  sx: sxChain(
@@ -6908,7 +6914,7 @@ function FootfallByAgeGroups({
6908
6914
  },
6909
6915
  chartScrollAreaSx
6910
6916
  ),
6911
- children: hasMeaningfulData ? /* @__PURE__ */ jsxs22(
6917
+ children: isLoading ? /* @__PURE__ */ jsx30(Skeleton, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs22(
6912
6918
  BarChart,
6913
6919
  {
6914
6920
  width: chartWidthPx,
@@ -6935,7 +6941,14 @@ function FootfallByAgeGroups({
6935
6941
  interval: 0,
6936
6942
  height: 68,
6937
6943
  tickMargin: 10,
6938
- tick: /* @__PURE__ */ jsx30(MultiLineTick, { angle: xAxisTickAngle }),
6944
+ tick: /* @__PURE__ */ jsx30(
6945
+ MultiLineTick,
6946
+ {
6947
+ angle: xAxisTickAngle,
6948
+ dx: xAxisTickDx,
6949
+ style: xAxisTickStyle
6950
+ }
6951
+ ),
6939
6952
  axisLine: { stroke: chartColors.xAxisLineStroke },
6940
6953
  tickLine: { stroke: chartColors.axisTickLineStroke }
6941
6954
  }
@@ -6943,8 +6956,9 @@ function FootfallByAgeGroups({
6943
6956
  /* @__PURE__ */ jsx30(
6944
6957
  YAxis,
6945
6958
  {
6959
+ dx: yAxisTickDx,
6946
6960
  tickSize: 8,
6947
- tick: { fontSize: 12, fontWeight: 400 },
6961
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
6948
6962
  axisLine: { stroke: chartColors.axisTickLineStroke },
6949
6963
  tickLine: { stroke: chartColors.axisTickLineStroke }
6950
6964
  }
@@ -7043,11 +7057,12 @@ function FootfallByAgeGroups({
7043
7057
  }
7044
7058
 
7045
7059
  // src/components/widgets/FootfallByGender/FootfallByGender.tsx
7060
+ import { Icon as Icon11 } from "@iconify/react";
7046
7061
  import Box21 from "@mui/material/Box";
7047
7062
  import Divider4 from "@mui/material/Divider";
7063
+ import Skeleton2 from "@mui/material/Skeleton";
7048
7064
  import Stack14 from "@mui/material/Stack";
7049
7065
  import Typography16 from "@mui/material/Typography";
7050
- import { Icon as Icon11 } from "@iconify/react";
7051
7066
  import * as React12 from "react";
7052
7067
  import {
7053
7068
  Bar as Bar2,
@@ -7067,10 +7082,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME2 = {
7067
7082
  axisTickLineStroke: "#E5E7EB"
7068
7083
  };
7069
7084
  var OLY_DEFAULT_FOOTFALL_GENDER_CHART_MARGIN = {
7070
- top: 28,
7071
- right: 20,
7072
- left: 16,
7073
- bottom: 28
7085
+ top: 16,
7086
+ right: 8,
7087
+ left: 4,
7088
+ bottom: 0
7074
7089
  };
7075
7090
  var OLY_DEFAULT_FOOTFALL_GENDER_SERIES_COLORS = {
7076
7091
  male: "#7266E9",
@@ -7208,6 +7223,8 @@ function MultiLineTick2({
7208
7223
  y = 0,
7209
7224
  payload,
7210
7225
  angle = -38,
7226
+ dx = 0,
7227
+ style,
7211
7228
  textAnchor = "end",
7212
7229
  fontSize = 12
7213
7230
  }) {
@@ -7217,13 +7234,14 @@ function MultiLineTick2({
7217
7234
  const isHorizontal = angle === 0;
7218
7235
  const anchor = isHorizontal ? "middle" : textAnchor;
7219
7236
  const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
7220
- return /* @__PURE__ */ jsx31("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx31(
7237
+ return /* @__PURE__ */ jsx31("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx31(
7221
7238
  "text",
7222
7239
  {
7223
7240
  transform: `rotate(${angle})`,
7224
7241
  textAnchor: anchor,
7225
7242
  fontSize,
7226
7243
  fill: "#666",
7244
+ ...style,
7227
7245
  children: lines.map((line, i) => /* @__PURE__ */ jsx31("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
7228
7246
  }
7229
7247
  ) });
@@ -7497,6 +7515,7 @@ function resolveCategoryScroll(minWidthPerCategory, horizontalScroll, categoryCo
7497
7515
  function FootfallByGender({
7498
7516
  title,
7499
7517
  data,
7518
+ isLoading = false,
7500
7519
  seriesLabels: seriesLabelsProp,
7501
7520
  seriesColors: seriesColorsProp,
7502
7521
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX2,
@@ -7528,10 +7547,14 @@ function FootfallByGender({
7528
7547
  tooltipStyles,
7529
7548
  renderTooltip,
7530
7549
  chartMargin: chartMarginProp,
7550
+ yAxisTickDx = -6,
7551
+ yAxisTickStyle,
7531
7552
  chartColors: chartColorsProp,
7532
7553
  emptyStatePlaceholderProps,
7533
7554
  yAxisTickFormatter,
7534
7555
  xAxisTickAngle = 0,
7556
+ xAxisTickDx = 0,
7557
+ xAxisTickStyle,
7535
7558
  barValueLabelAngle = 0,
7536
7559
  growthBadgeWidth = 45,
7537
7560
  growthBadgeHeight = 38,
@@ -7633,7 +7656,8 @@ function FootfallByGender({
7633
7656
  if (hasGrowthBadges) top = topReserveForGrowthBadges;
7634
7657
  else if (showBarValueLabels) top = topReserveForBarLabels;
7635
7658
  else top = topReserveNoBarLabels;
7636
- return { ...defaultChartMargin2, top, ...chartMarginProp };
7659
+ if (chartMarginProp) return chartMarginProp;
7660
+ return { ...defaultChartMargin2, top };
7637
7661
  }, [hasGrowthBadges, showBarValueLabels, chartMarginProp]);
7638
7662
  const chartColors = React12.useMemo(
7639
7663
  () => ({
@@ -7736,7 +7760,7 @@ function FootfallByGender({
7736
7760
  },
7737
7761
  chartScrollAreaSx
7738
7762
  ),
7739
- children: processedData.length > 0 ? /* @__PURE__ */ jsxs23(
7763
+ children: isLoading ? /* @__PURE__ */ jsx31(Skeleton2, { variant: "rounded", width: "100%", height: "100%" }) : processedData.length > 0 ? /* @__PURE__ */ jsxs23(
7740
7764
  BarChart2,
7741
7765
  {
7742
7766
  width: chartWidthPx,
@@ -7765,7 +7789,14 @@ function FootfallByGender({
7765
7789
  interval: 0,
7766
7790
  height: 68,
7767
7791
  tickMargin: 10,
7768
- tick: /* @__PURE__ */ jsx31(MultiLineTick2, { angle: xAxisTickAngle }),
7792
+ tick: /* @__PURE__ */ jsx31(
7793
+ MultiLineTick2,
7794
+ {
7795
+ angle: xAxisTickAngle,
7796
+ dx: xAxisTickDx,
7797
+ style: xAxisTickStyle
7798
+ }
7799
+ ),
7769
7800
  axisLine: { stroke: chartColors.xAxisLineStroke },
7770
7801
  tickLine: { stroke: chartColors.axisTickLineStroke }
7771
7802
  }
@@ -7774,8 +7805,9 @@ function FootfallByGender({
7774
7805
  YAxis2,
7775
7806
  {
7776
7807
  width: 52,
7808
+ dx: yAxisTickDx,
7777
7809
  tickSize: 8,
7778
- tick: { fontSize: 12, fontWeight: 400 },
7810
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
7779
7811
  tickFormatter: yAxisTick,
7780
7812
  axisLine: { stroke: chartColors.axisTickLineStroke },
7781
7813
  tickLine: { stroke: chartColors.axisTickLineStroke }
@@ -7815,6 +7847,7 @@ function FootfallByGender({
7815
7847
  dataKey: "male",
7816
7848
  name: seriesLabels.male,
7817
7849
  fill: seriesColors.male,
7850
+ barSize: resolvedMaxBarSize,
7818
7851
  onMouseEnter: handleMouseEnter,
7819
7852
  onMouseLeave: handleMouseLeave,
7820
7853
  children: [
@@ -7865,6 +7898,7 @@ function FootfallByGender({
7865
7898
  dataKey: "female",
7866
7899
  name: seriesLabels.female,
7867
7900
  fill: seriesColors.female,
7901
+ barSize: resolvedMaxBarSize,
7868
7902
  onMouseEnter: handleMouseEnter,
7869
7903
  onMouseLeave: handleMouseLeave,
7870
7904
  children: [
@@ -7934,7 +7968,7 @@ function FootfallByGender({
7934
7968
  )
7935
7969
  }
7936
7970
  ),
7937
- showLegend && processedData.length > 0 ? /* @__PURE__ */ jsxs23(
7971
+ showLegend && !isLoading && processedData.length > 0 ? /* @__PURE__ */ jsxs23(
7938
7972
  Box21,
7939
7973
  {
7940
7974
  component: "ul",
@@ -8069,6 +8103,7 @@ function FootfallByGender({
8069
8103
  // src/components/widgets/PasserbyConversion/PasserbyConversion.tsx
8070
8104
  import Box22 from "@mui/material/Box";
8071
8105
  import Divider5 from "@mui/material/Divider";
8106
+ import Skeleton3 from "@mui/material/Skeleton";
8072
8107
  import Stack15 from "@mui/material/Stack";
8073
8108
  import Typography17 from "@mui/material/Typography";
8074
8109
  import * as React14 from "react";
@@ -8119,10 +8154,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME3 = {
8119
8154
  axisTickLineStroke: "#E5E7EB"
8120
8155
  };
8121
8156
  var OLY_DEFAULT_PASSERBY_CHART_MARGIN = {
8122
- top: 28,
8157
+ top: 16,
8123
8158
  right: 8,
8124
- left: 4,
8125
- bottom: 28
8159
+ left: 6,
8160
+ bottom: 0
8126
8161
  };
8127
8162
  var OLY_DEFAULT_PASSERBY_CHART_SERIES_COLORS = {
8128
8163
  passerbyBarFill: "#FFCC4D",
@@ -8151,6 +8186,8 @@ function MultiLineTick3({
8151
8186
  y = 0,
8152
8187
  payload,
8153
8188
  angle = -42,
8189
+ dx = 0,
8190
+ style,
8154
8191
  textAnchor = "end",
8155
8192
  fontSize = 12
8156
8193
  }) {
@@ -8160,13 +8197,14 @@ function MultiLineTick3({
8160
8197
  const isHorizontal = angle === 0;
8161
8198
  const anchor = isHorizontal ? "middle" : textAnchor;
8162
8199
  const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
8163
- return /* @__PURE__ */ jsx32("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx32(
8200
+ return /* @__PURE__ */ jsx32("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx32(
8164
8201
  "text",
8165
8202
  {
8166
8203
  transform: `rotate(${angle})`,
8167
8204
  textAnchor: anchor,
8168
8205
  fontSize,
8169
8206
  fill: "#666",
8207
+ ...style,
8170
8208
  children: lines.map((line, i) => /* @__PURE__ */ jsx32("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
8171
8209
  }
8172
8210
  ) });
@@ -8437,6 +8475,7 @@ function defaultFormatTooltipConversion(value) {
8437
8475
  function PasserbyConversion({
8438
8476
  title,
8439
8477
  data,
8478
+ isLoading = false,
8440
8479
  timeSlots,
8441
8480
  fillMissingTimeSlots = true,
8442
8481
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX3,
@@ -8476,12 +8515,20 @@ function PasserbyConversion({
8476
8515
  showConversionLine: showConversionLineProp,
8477
8516
  showBarValueLabels = true,
8478
8517
  chartMargin: chartMarginProp,
8518
+ yAxisTickDx = -8,
8519
+ yAxisTickStyle,
8520
+ conversionAxisTickDx = 0,
8521
+ conversionAxisTickStyle,
8522
+ rightYAxisTickDx,
8523
+ rightYAxisTickStyle,
8479
8524
  chartColors: chartColorsProp,
8480
8525
  emptyStatePlaceholderProps,
8481
8526
  isChartAnimationActive = true,
8482
8527
  chartAnimationDuration = 400,
8483
8528
  scrollChartToEndOnDataChange = true,
8484
- xAxisTickAngle = 0
8529
+ xAxisTickAngle = 0,
8530
+ xAxisTickDx = 0,
8531
+ xAxisTickStyle
8485
8532
  }) {
8486
8533
  const [activeIndex, setActiveIndex] = React14.useState(null);
8487
8534
  const handleBarMouseEnter = React14.useCallback((_, index) => {
@@ -8604,12 +8651,8 @@ function PasserbyConversion({
8604
8651
  const chartMargin = React14.useMemo(() => {
8605
8652
  const top = showBarValueLabels ? topReserveForBarLabels2 : topReserveNoBarLabels2;
8606
8653
  const right = showConversionLine ? 52 : defaultChartMargin3.right;
8607
- return {
8608
- ...defaultChartMargin3,
8609
- top,
8610
- right,
8611
- ...chartMarginProp
8612
- };
8654
+ if (chartMarginProp) return chartMarginProp;
8655
+ return { ...defaultChartMargin3, top, right };
8613
8656
  }, [showBarValueLabels, showConversionLine, chartMarginProp]);
8614
8657
  const yTickLeft = yAxisTickFormatter ?? formatYAxisTickDefault2;
8615
8658
  const yTickRight = conversionAxisTickFormatter ?? formatYAxisTickDefault2;
@@ -8706,7 +8749,7 @@ function PasserbyConversion({
8706
8749
  }
8707
8750
  ),
8708
8751
  /* @__PURE__ */ jsx32(Divider5, { sx: sxChain3({ borderColor: "#D8D9E4" }, dividerSx) }),
8709
- showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx32(
8752
+ showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx32(
8710
8753
  Box22,
8711
8754
  {
8712
8755
  sx: sxChain3(
@@ -8796,7 +8839,7 @@ function PasserbyConversion({
8796
8839
  },
8797
8840
  chartScrollAreaSx
8798
8841
  ),
8799
- children: hasMeaningfulData ? /* @__PURE__ */ jsxs24(
8842
+ children: isLoading ? /* @__PURE__ */ jsx32(Skeleton3, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs24(
8800
8843
  ComposedChart,
8801
8844
  {
8802
8845
  width: chartWidthPx,
@@ -8826,7 +8869,14 @@ function PasserbyConversion({
8826
8869
  interval: 0,
8827
8870
  height: 68,
8828
8871
  tickMargin: 10,
8829
- tick: /* @__PURE__ */ jsx32(MultiLineTick3, { angle: xAxisTickAngle }),
8872
+ tick: /* @__PURE__ */ jsx32(
8873
+ MultiLineTick3,
8874
+ {
8875
+ angle: xAxisTickAngle,
8876
+ dx: xAxisTickDx,
8877
+ style: xAxisTickStyle
8878
+ }
8879
+ ),
8830
8880
  axisLine: { stroke: chartColors.xAxisLineStroke },
8831
8881
  tickLine: { stroke: chartColors.axisTickLineStroke }
8832
8882
  }
@@ -8835,8 +8885,9 @@ function PasserbyConversion({
8835
8885
  YAxis3,
8836
8886
  {
8837
8887
  yAxisId: "left",
8888
+ dx: yAxisTickDx,
8838
8889
  tickSize: 8,
8839
- tick: { fontSize: 12, fontWeight: 400 },
8890
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
8840
8891
  tickFormatter: yTickLeft,
8841
8892
  axisLine: { stroke: chartColors.axisTickLineStroke },
8842
8893
  tickLine: { stroke: chartColors.axisTickLineStroke },
@@ -8848,8 +8899,13 @@ function PasserbyConversion({
8848
8899
  {
8849
8900
  yAxisId: "right",
8850
8901
  orientation: "right",
8902
+ dx: rightYAxisTickDx ?? conversionAxisTickDx,
8851
8903
  tickSize: 8,
8852
- tick: { fontSize: 12, fontWeight: 400 },
8904
+ tick: {
8905
+ fontSize: 12,
8906
+ fontWeight: 400,
8907
+ ...rightYAxisTickStyle ?? conversionAxisTickStyle
8908
+ },
8853
8909
  tickFormatter: yTickRight,
8854
8910
  axisLine: { stroke: chartColors.axisTickLineStroke },
8855
8911
  tickLine: { stroke: chartColors.axisTickLineStroke },
@@ -9498,6 +9554,7 @@ var WalkinAnalysis = ({
9498
9554
  // src/components/widgets/WalkinTraffic/WalkinTraffic.tsx
9499
9555
  import Box24 from "@mui/material/Box";
9500
9556
  import Divider6 from "@mui/material/Divider";
9557
+ import Skeleton4 from "@mui/material/Skeleton";
9501
9558
  import Stack17 from "@mui/material/Stack";
9502
9559
  import Typography19 from "@mui/material/Typography";
9503
9560
  import * as React16 from "react";
@@ -9520,10 +9577,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME4 = {
9520
9577
  axisTickLineStroke: "#E5E7EB"
9521
9578
  };
9522
9579
  var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_MARGIN = {
9523
- top: 28,
9524
- right: 20,
9525
- left: 12,
9526
- bottom: 28
9580
+ top: 16,
9581
+ right: 8,
9582
+ left: 6,
9583
+ bottom: 0
9527
9584
  };
9528
9585
  var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_SERIES_COLORS = {
9529
9586
  barFill: "#0086A9",
@@ -9593,6 +9650,8 @@ function MultiLineTick4({
9593
9650
  y = 0,
9594
9651
  payload,
9595
9652
  angle = -42,
9653
+ dx = 0,
9654
+ style,
9596
9655
  textAnchor = "end",
9597
9656
  fontSize = 12
9598
9657
  }) {
@@ -9602,13 +9661,14 @@ function MultiLineTick4({
9602
9661
  const isHorizontal = angle === 0;
9603
9662
  const anchor = isHorizontal ? "middle" : textAnchor;
9604
9663
  const dy0 = isHorizontal ? lineHeight * 0.35 : 4;
9605
- return /* @__PURE__ */ jsx34("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx34(
9664
+ return /* @__PURE__ */ jsx34("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ jsx34(
9606
9665
  "text",
9607
9666
  {
9608
9667
  transform: `rotate(${angle})`,
9609
9668
  textAnchor: anchor,
9610
9669
  fontSize,
9611
9670
  fill: "#666",
9671
+ ...style,
9612
9672
  children: lines.map((line, i) => /* @__PURE__ */ jsx34("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
9613
9673
  }
9614
9674
  ) });
@@ -9886,6 +9946,7 @@ var defaultChartColors4 = {
9886
9946
  function WalkinTraffic({
9887
9947
  title,
9888
9948
  data,
9949
+ isLoading = false,
9889
9950
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX4,
9890
9951
  barSeriesName = "Walk-ins",
9891
9952
  lineSeriesName = "Trend",
@@ -9920,13 +9981,17 @@ function WalkinTraffic({
9920
9981
  showLineInLegend = false,
9921
9982
  showBarValueLabels = true,
9922
9983
  chartMargin: chartMarginProp,
9984
+ yAxisTickDx = -8,
9985
+ yAxisTickStyle,
9923
9986
  chartColors: chartColorsProp,
9924
9987
  emptyStatePlaceholderProps,
9925
9988
  yAxisTickFormatter,
9926
9989
  isChartAnimationActive = true,
9927
9990
  chartAnimationDuration = 400,
9928
9991
  scrollChartToEndOnDataChange = true,
9929
- xAxisTickAngle = 0
9992
+ xAxisTickAngle = 0,
9993
+ xAxisTickDx = 0,
9994
+ xAxisTickStyle
9930
9995
  }) {
9931
9996
  const tooltipFooterNote = tooltipFooterNoteProp === void 0 ? defaultFfGrowthTooltipFooterNote : tooltipFooterNoteProp;
9932
9997
  const processedData = React16.useMemo(
@@ -10003,11 +10068,8 @@ function WalkinTraffic({
10003
10068
  }, [chartInnerMinWidthPx, containerWidth]);
10004
10069
  const chartMargin = React16.useMemo(() => {
10005
10070
  const top = showBarValueLabels ? topReserveForBarLabels3 : topReserveNoBarLabels3;
10006
- return {
10007
- ...defaultChartMargin4,
10008
- top,
10009
- ...chartMarginProp
10010
- };
10071
+ if (chartMarginProp) return chartMarginProp;
10072
+ return { ...defaultChartMargin4, top };
10011
10073
  }, [showBarValueLabels, chartMarginProp]);
10012
10074
  const chartColors = React16.useMemo(
10013
10075
  () => ({
@@ -10107,7 +10169,7 @@ function WalkinTraffic({
10107
10169
  }
10108
10170
  ),
10109
10171
  /* @__PURE__ */ jsx34(Divider6, { sx: sxChain4({ borderColor: "#D8D9E4" }, dividerSx) }),
10110
- showLegend && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx34(
10172
+ showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ jsx34(
10111
10173
  Box24,
10112
10174
  {
10113
10175
  sx: sxChain4(
@@ -10197,7 +10259,7 @@ function WalkinTraffic({
10197
10259
  },
10198
10260
  chartScrollAreaSx
10199
10261
  ),
10200
- children: hasMeaningfulData ? /* @__PURE__ */ jsxs26(
10262
+ children: isLoading ? /* @__PURE__ */ jsx34(Skeleton4, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ jsxs26(
10201
10263
  ComposedChart2,
10202
10264
  {
10203
10265
  width: chartWidthPx,
@@ -10223,7 +10285,14 @@ function WalkinTraffic({
10223
10285
  interval: 0,
10224
10286
  height: 68,
10225
10287
  tickMargin: 10,
10226
- tick: /* @__PURE__ */ jsx34(MultiLineTick4, { angle: xAxisTickAngle }),
10288
+ tick: /* @__PURE__ */ jsx34(
10289
+ MultiLineTick4,
10290
+ {
10291
+ angle: xAxisTickAngle,
10292
+ dx: xAxisTickDx,
10293
+ style: xAxisTickStyle
10294
+ }
10295
+ ),
10227
10296
  axisLine: { stroke: chartColors.xAxisLineStroke },
10228
10297
  tickLine: { stroke: chartColors.axisTickLineStroke }
10229
10298
  }
@@ -10231,8 +10300,9 @@ function WalkinTraffic({
10231
10300
  /* @__PURE__ */ jsx34(
10232
10301
  YAxis4,
10233
10302
  {
10303
+ dx: yAxisTickDx,
10234
10304
  tickSize: 8,
10235
- tick: { fontSize: 12, fontWeight: 400 },
10305
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
10236
10306
  tickFormatter: yTick,
10237
10307
  axisLine: { stroke: chartColors.axisTickLineStroke },
10238
10308
  tickLine: { stroke: chartColors.axisTickLineStroke }
@@ -11947,7 +12017,7 @@ import {
11947
12017
  Button as Button8,
11948
12018
  IconButton as IconButton5,
11949
12019
  Paper as Paper5,
11950
- Skeleton,
12020
+ Skeleton as Skeleton5,
11951
12021
  Stack as Stack23,
11952
12022
  Tooltip as Tooltip12,
11953
12023
  Typography as Typography24
@@ -13334,7 +13404,7 @@ function FootFallHeatMapView({
13334
13404
  }
13335
13405
  if (isLoading || loading) {
13336
13406
  return /* @__PURE__ */ jsx43(
13337
- Skeleton,
13407
+ Skeleton5,
13338
13408
  {
13339
13409
  variant: "rectangular",
13340
13410
  width: "100%",
@@ -13659,6 +13729,7 @@ var peakBillingHoursMockSeriesByTabId = {
13659
13729
  import Box30 from "@mui/material/Box";
13660
13730
  import Card4 from "@mui/material/Card";
13661
13731
  import CardContent3 from "@mui/material/CardContent";
13732
+ import Skeleton6 from "@mui/material/Skeleton";
13662
13733
  import Stack25 from "@mui/material/Stack";
13663
13734
  import Typography26 from "@mui/material/Typography";
13664
13735
  import * as React26 from "react";
@@ -13827,7 +13898,12 @@ function BarPlot({
13827
13898
  yAxisDomain,
13828
13899
  yAxisTicks,
13829
13900
  activeTabId,
13830
- renderTooltip
13901
+ renderTooltip,
13902
+ chartMargin,
13903
+ yAxisTickDx = -6,
13904
+ yAxisTickStyle,
13905
+ xAxisTickDx = 0,
13906
+ xAxisTickStyle
13831
13907
  }) {
13832
13908
  const { barChart: bc } = usePeakBillingHoursCustomization();
13833
13909
  const height = bc?.heightPx ?? 320;
@@ -13835,7 +13911,7 @@ function BarPlot({
13835
13911
  const barRadius = bc?.barRadius ?? 0;
13836
13912
  const gridStroke = bc?.gridStroke ?? OLY_DEFAULT_COMPOSED_CHART_CHROME6.cartesianGridStroke;
13837
13913
  const dash = bc?.gridStrokeDasharray ?? "3 3";
13838
- const m = {
13914
+ const m = chartMargin ?? {
13839
13915
  top: bc?.margin?.top ?? 28,
13840
13916
  right: bc?.margin?.right ?? 12,
13841
13917
  bottom: bc?.margin?.bottom ?? 8,
@@ -13875,7 +13951,8 @@ function BarPlot({
13875
13951
  XAxis7,
13876
13952
  {
13877
13953
  dataKey: "label",
13878
- tick: { fill: xFill, fontSize: 11 },
13954
+ dx: xAxisTickDx,
13955
+ tick: { fill: xFill, fontSize: 11, ...xAxisTickStyle },
13879
13956
  tickLine: false,
13880
13957
  axisLine: {
13881
13958
  stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME6.axisTickLineStroke
@@ -13889,7 +13966,8 @@ function BarPlot({
13889
13966
  {
13890
13967
  domain: yAxisDomain,
13891
13968
  ticks: yAxisTicks,
13892
- tick: { fill: yFill, fontSize: 11 },
13969
+ dx: yAxisTickDx,
13970
+ tick: { fill: yFill, fontSize: 11, ...yAxisTickStyle },
13893
13971
  tickLine: false,
13894
13972
  axisLine: false,
13895
13973
  width: yWidth
@@ -13954,7 +14032,13 @@ function PeakBillingHours({
13954
14032
  activeTabId,
13955
14033
  onTabChange,
13956
14034
  data,
14035
+ isLoading = false,
13957
14036
  seriesByTabId,
14037
+ chartMargin,
14038
+ yAxisTickDx = -6,
14039
+ yAxisTickStyle,
14040
+ xAxisTickDx = 0,
14041
+ xAxisTickStyle,
13958
14042
  yAxisDomain = [0, 50],
13959
14043
  yAxisTicks = [0, 10, 20, 30, 40, 50],
13960
14044
  infoPopover,
@@ -14053,14 +14137,19 @@ function PeakBillingHours({
14053
14137
  inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
14054
14138
  }
14055
14139
  ),
14056
- chartData.length > 0 ? /* @__PURE__ */ jsx47(
14140
+ isLoading ? /* @__PURE__ */ jsx47(Skeleton6, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ jsx47(
14057
14141
  BarPlot,
14058
14142
  {
14059
14143
  data: chartData,
14060
14144
  yAxisDomain,
14061
14145
  yAxisTicks,
14062
14146
  activeTabId,
14063
- renderTooltip
14147
+ renderTooltip,
14148
+ chartMargin,
14149
+ yAxisTickDx,
14150
+ yAxisTickStyle,
14151
+ xAxisTickDx,
14152
+ xAxisTickStyle
14064
14153
  }
14065
14154
  ) : /* @__PURE__ */ jsx47(
14066
14155
  ChartEmptyState,