@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.js CHANGED
@@ -6433,6 +6433,7 @@ var ProgressBarNumber = ({
6433
6433
  // src/components/widgets/FootfallByAgeGroups/FootfallByAgeGroups.tsx
6434
6434
  var import_Box9 = __toESM(require("@mui/material/Box"));
6435
6435
  var import_Divider2 = __toESM(require("@mui/material/Divider"));
6436
+ var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
6436
6437
  var import_Stack7 = __toESM(require("@mui/material/Stack"));
6437
6438
  var import_Typography6 = __toESM(require("@mui/material/Typography"));
6438
6439
  var React11 = __toESM(require("react"));
@@ -6467,10 +6468,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME = {
6467
6468
  axisTickLineStroke: "#E5E7EB"
6468
6469
  };
6469
6470
  var OLY_DEFAULT_FOOTFALL_BY_AGE_CHART_MARGIN = {
6470
- top: 36,
6471
- right: 28,
6472
- left: 12,
6473
- bottom: 28
6471
+ top: 16,
6472
+ right: 8,
6473
+ left: 6,
6474
+ bottom: 0
6474
6475
  };
6475
6476
  var OLY_DEFAULT_FOOTFALL_BY_AGE_STACK_TOTAL_LABEL_FILL = "#28293D";
6476
6477
  function mergeCss2(base, override) {
@@ -6497,6 +6498,8 @@ function MultiLineTick({
6497
6498
  y = 0,
6498
6499
  payload,
6499
6500
  angle = -38,
6501
+ dx = 0,
6502
+ style,
6500
6503
  textAnchor = "end",
6501
6504
  fontSize = 12
6502
6505
  }) {
@@ -6506,13 +6509,14 @@ function MultiLineTick({
6506
6509
  const isHorizontal = angle === 0;
6507
6510
  const anchor = isHorizontal ? "middle" : textAnchor;
6508
6511
  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)(
6512
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6510
6513
  "text",
6511
6514
  {
6512
6515
  transform: `rotate(${angle})`,
6513
6516
  textAnchor: anchor,
6514
6517
  fontSize,
6515
6518
  fill: "#666",
6519
+ ...style,
6516
6520
  children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
6517
6521
  }
6518
6522
  ) });
@@ -6731,6 +6735,7 @@ function FootfallByAgeGroups({
6731
6735
  title,
6732
6736
  data,
6733
6737
  series,
6738
+ isLoading = false,
6734
6739
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX,
6735
6740
  minWidthPerCategory = defaultMinWidthPerCategory,
6736
6741
  horizontalScroll: horizontalScrollProp = "auto",
@@ -6754,11 +6759,15 @@ function FootfallByAgeGroups({
6754
6759
  renderTooltip,
6755
6760
  showLegend = true,
6756
6761
  chartMargin: chartMarginProp,
6762
+ yAxisTickDx = -8,
6763
+ yAxisTickStyle,
6757
6764
  chartColors: chartColorsProp,
6758
6765
  emptyStatePlaceholderProps,
6759
6766
  dimmedStackOpacity = 0.35,
6760
6767
  barStackId = "footfall-by-age-groups",
6761
- xAxisTickAngle = 0
6768
+ xAxisTickAngle = 0,
6769
+ xAxisTickDx = 0,
6770
+ xAxisTickStyle
6762
6771
  }) {
6763
6772
  const [activeIndex, setActiveIndex] = React11.useState(null);
6764
6773
  const handleMouseEnter = React11.useCallback((_, index) => {
@@ -6832,10 +6841,7 @@ function FootfallByAgeGroups({
6832
6841
  const barOpacity = (index) => activeIndex === null || activeIndex === index ? 1 : dimmedStackOpacity;
6833
6842
  const lastSeriesIndex = series.length - 1;
6834
6843
  const chartMargin = React11.useMemo(
6835
- () => ({
6836
- ...defaultChartMargin,
6837
- ...chartMarginProp
6838
- }),
6844
+ () => chartMarginProp ?? defaultChartMargin,
6839
6845
  [chartMarginProp]
6840
6846
  );
6841
6847
  const chartColors = React11.useMemo(
@@ -6909,7 +6915,7 @@ function FootfallByAgeGroups({
6909
6915
  }
6910
6916
  ),
6911
6917
  /* @__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)(
6918
+ showLegend && !isLoading && hasMeaningfulData && series.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6913
6919
  import_Box9.default,
6914
6920
  {
6915
6921
  sx: sxChain(
@@ -6984,7 +6990,7 @@ function FootfallByAgeGroups({
6984
6990
  },
6985
6991
  chartScrollAreaSx
6986
6992
  ),
6987
- children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
6993
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_Skeleton.default, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
6988
6994
  import_recharts.BarChart,
6989
6995
  {
6990
6996
  width: chartWidthPx,
@@ -7011,7 +7017,14 @@ function FootfallByAgeGroups({
7011
7017
  interval: 0,
7012
7018
  height: 68,
7013
7019
  tickMargin: 10,
7014
- tick: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MultiLineTick, { angle: xAxisTickAngle }),
7020
+ tick: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7021
+ MultiLineTick,
7022
+ {
7023
+ angle: xAxisTickAngle,
7024
+ dx: xAxisTickDx,
7025
+ style: xAxisTickStyle
7026
+ }
7027
+ ),
7015
7028
  axisLine: { stroke: chartColors.xAxisLineStroke },
7016
7029
  tickLine: { stroke: chartColors.axisTickLineStroke }
7017
7030
  }
@@ -7019,8 +7032,9 @@ function FootfallByAgeGroups({
7019
7032
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7020
7033
  import_recharts.YAxis,
7021
7034
  {
7035
+ dx: yAxisTickDx,
7022
7036
  tickSize: 8,
7023
- tick: { fontSize: 12, fontWeight: 400 },
7037
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
7024
7038
  axisLine: { stroke: chartColors.axisTickLineStroke },
7025
7039
  tickLine: { stroke: chartColors.axisTickLineStroke }
7026
7040
  }
@@ -7119,11 +7133,12 @@ function FootfallByAgeGroups({
7119
7133
  }
7120
7134
 
7121
7135
  // src/components/widgets/FootfallByGender/FootfallByGender.tsx
7136
+ var import_react19 = require("@iconify/react");
7122
7137
  var import_Box10 = __toESM(require("@mui/material/Box"));
7123
7138
  var import_Divider3 = __toESM(require("@mui/material/Divider"));
7139
+ var import_Skeleton2 = __toESM(require("@mui/material/Skeleton"));
7124
7140
  var import_Stack8 = __toESM(require("@mui/material/Stack"));
7125
7141
  var import_Typography7 = __toESM(require("@mui/material/Typography"));
7126
- var import_react19 = require("@iconify/react");
7127
7142
  var React12 = __toESM(require("react"));
7128
7143
  var import_recharts2 = require("recharts");
7129
7144
  var import_jsx_runtime31 = require("react/jsx-runtime");
@@ -7134,10 +7149,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME2 = {
7134
7149
  axisTickLineStroke: "#E5E7EB"
7135
7150
  };
7136
7151
  var OLY_DEFAULT_FOOTFALL_GENDER_CHART_MARGIN = {
7137
- top: 28,
7138
- right: 20,
7139
- left: 16,
7140
- bottom: 28
7152
+ top: 16,
7153
+ right: 8,
7154
+ left: 4,
7155
+ bottom: 0
7141
7156
  };
7142
7157
  var OLY_DEFAULT_FOOTFALL_GENDER_SERIES_COLORS = {
7143
7158
  male: "#7266E9",
@@ -7275,6 +7290,8 @@ function MultiLineTick2({
7275
7290
  y = 0,
7276
7291
  payload,
7277
7292
  angle = -38,
7293
+ dx = 0,
7294
+ style,
7278
7295
  textAnchor = "end",
7279
7296
  fontSize = 12
7280
7297
  }) {
@@ -7284,13 +7301,14 @@ function MultiLineTick2({
7284
7301
  const isHorizontal = angle === 0;
7285
7302
  const anchor = isHorizontal ? "middle" : textAnchor;
7286
7303
  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)(
7304
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7288
7305
  "text",
7289
7306
  {
7290
7307
  transform: `rotate(${angle})`,
7291
7308
  textAnchor: anchor,
7292
7309
  fontSize,
7293
7310
  fill: "#666",
7311
+ ...style,
7294
7312
  children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
7295
7313
  }
7296
7314
  ) });
@@ -7564,6 +7582,7 @@ function resolveCategoryScroll(minWidthPerCategory, horizontalScroll, categoryCo
7564
7582
  function FootfallByGender({
7565
7583
  title,
7566
7584
  data,
7585
+ isLoading = false,
7567
7586
  seriesLabels: seriesLabelsProp,
7568
7587
  seriesColors: seriesColorsProp,
7569
7588
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX2,
@@ -7595,10 +7614,14 @@ function FootfallByGender({
7595
7614
  tooltipStyles,
7596
7615
  renderTooltip,
7597
7616
  chartMargin: chartMarginProp,
7617
+ yAxisTickDx = -6,
7618
+ yAxisTickStyle,
7598
7619
  chartColors: chartColorsProp,
7599
7620
  emptyStatePlaceholderProps,
7600
7621
  yAxisTickFormatter,
7601
7622
  xAxisTickAngle = 0,
7623
+ xAxisTickDx = 0,
7624
+ xAxisTickStyle,
7602
7625
  barValueLabelAngle = 0,
7603
7626
  growthBadgeWidth = 45,
7604
7627
  growthBadgeHeight = 38,
@@ -7700,7 +7723,8 @@ function FootfallByGender({
7700
7723
  if (hasGrowthBadges) top = topReserveForGrowthBadges;
7701
7724
  else if (showBarValueLabels) top = topReserveForBarLabels;
7702
7725
  else top = topReserveNoBarLabels;
7703
- return { ...defaultChartMargin2, top, ...chartMarginProp };
7726
+ if (chartMarginProp) return chartMarginProp;
7727
+ return { ...defaultChartMargin2, top };
7704
7728
  }, [hasGrowthBadges, showBarValueLabels, chartMarginProp]);
7705
7729
  const chartColors = React12.useMemo(
7706
7730
  () => ({
@@ -7803,7 +7827,7 @@ function FootfallByGender({
7803
7827
  },
7804
7828
  chartScrollAreaSx
7805
7829
  ),
7806
- children: processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7830
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_Skeleton2.default, { variant: "rounded", width: "100%", height: "100%" }) : processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7807
7831
  import_recharts2.BarChart,
7808
7832
  {
7809
7833
  width: chartWidthPx,
@@ -7832,7 +7856,14 @@ function FootfallByGender({
7832
7856
  interval: 0,
7833
7857
  height: 68,
7834
7858
  tickMargin: 10,
7835
- tick: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MultiLineTick2, { angle: xAxisTickAngle }),
7859
+ tick: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7860
+ MultiLineTick2,
7861
+ {
7862
+ angle: xAxisTickAngle,
7863
+ dx: xAxisTickDx,
7864
+ style: xAxisTickStyle
7865
+ }
7866
+ ),
7836
7867
  axisLine: { stroke: chartColors.xAxisLineStroke },
7837
7868
  tickLine: { stroke: chartColors.axisTickLineStroke }
7838
7869
  }
@@ -7841,8 +7872,9 @@ function FootfallByGender({
7841
7872
  import_recharts2.YAxis,
7842
7873
  {
7843
7874
  width: 52,
7875
+ dx: yAxisTickDx,
7844
7876
  tickSize: 8,
7845
- tick: { fontSize: 12, fontWeight: 400 },
7877
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
7846
7878
  tickFormatter: yAxisTick,
7847
7879
  axisLine: { stroke: chartColors.axisTickLineStroke },
7848
7880
  tickLine: { stroke: chartColors.axisTickLineStroke }
@@ -7882,6 +7914,7 @@ function FootfallByGender({
7882
7914
  dataKey: "male",
7883
7915
  name: seriesLabels.male,
7884
7916
  fill: seriesColors.male,
7917
+ barSize: resolvedMaxBarSize,
7885
7918
  onMouseEnter: handleMouseEnter,
7886
7919
  onMouseLeave: handleMouseLeave,
7887
7920
  children: [
@@ -7932,6 +7965,7 @@ function FootfallByGender({
7932
7965
  dataKey: "female",
7933
7966
  name: seriesLabels.female,
7934
7967
  fill: seriesColors.female,
7968
+ barSize: resolvedMaxBarSize,
7935
7969
  onMouseEnter: handleMouseEnter,
7936
7970
  onMouseLeave: handleMouseLeave,
7937
7971
  children: [
@@ -8001,7 +8035,7 @@ function FootfallByGender({
8001
8035
  )
8002
8036
  }
8003
8037
  ),
8004
- showLegend && processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8038
+ showLegend && !isLoading && processedData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8005
8039
  import_Box10.default,
8006
8040
  {
8007
8041
  component: "ul",
@@ -8136,6 +8170,7 @@ function FootfallByGender({
8136
8170
  // src/components/widgets/PasserbyConversion/PasserbyConversion.tsx
8137
8171
  var import_Box11 = __toESM(require("@mui/material/Box"));
8138
8172
  var import_Divider4 = __toESM(require("@mui/material/Divider"));
8173
+ var import_Skeleton3 = __toESM(require("@mui/material/Skeleton"));
8139
8174
  var import_Stack9 = __toESM(require("@mui/material/Stack"));
8140
8175
  var import_Typography8 = __toESM(require("@mui/material/Typography"));
8141
8176
  var React14 = __toESM(require("react"));
@@ -8176,10 +8211,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME3 = {
8176
8211
  axisTickLineStroke: "#E5E7EB"
8177
8212
  };
8178
8213
  var OLY_DEFAULT_PASSERBY_CHART_MARGIN = {
8179
- top: 28,
8214
+ top: 16,
8180
8215
  right: 8,
8181
- left: 4,
8182
- bottom: 28
8216
+ left: 6,
8217
+ bottom: 0
8183
8218
  };
8184
8219
  var OLY_DEFAULT_PASSERBY_CHART_SERIES_COLORS = {
8185
8220
  passerbyBarFill: "#FFCC4D",
@@ -8208,6 +8243,8 @@ function MultiLineTick3({
8208
8243
  y = 0,
8209
8244
  payload,
8210
8245
  angle = -42,
8246
+ dx = 0,
8247
+ style,
8211
8248
  textAnchor = "end",
8212
8249
  fontSize = 12
8213
8250
  }) {
@@ -8217,13 +8254,14 @@ function MultiLineTick3({
8217
8254
  const isHorizontal = angle === 0;
8218
8255
  const anchor = isHorizontal ? "middle" : textAnchor;
8219
8256
  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)(
8257
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8221
8258
  "text",
8222
8259
  {
8223
8260
  transform: `rotate(${angle})`,
8224
8261
  textAnchor: anchor,
8225
8262
  fontSize,
8226
8263
  fill: "#666",
8264
+ ...style,
8227
8265
  children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
8228
8266
  }
8229
8267
  ) });
@@ -8494,6 +8532,7 @@ function defaultFormatTooltipConversion(value) {
8494
8532
  function PasserbyConversion({
8495
8533
  title,
8496
8534
  data,
8535
+ isLoading = false,
8497
8536
  timeSlots,
8498
8537
  fillMissingTimeSlots = true,
8499
8538
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX3,
@@ -8533,12 +8572,20 @@ function PasserbyConversion({
8533
8572
  showConversionLine: showConversionLineProp,
8534
8573
  showBarValueLabels = true,
8535
8574
  chartMargin: chartMarginProp,
8575
+ yAxisTickDx = -8,
8576
+ yAxisTickStyle,
8577
+ conversionAxisTickDx = 0,
8578
+ conversionAxisTickStyle,
8579
+ rightYAxisTickDx,
8580
+ rightYAxisTickStyle,
8536
8581
  chartColors: chartColorsProp,
8537
8582
  emptyStatePlaceholderProps,
8538
8583
  isChartAnimationActive = true,
8539
8584
  chartAnimationDuration = 400,
8540
8585
  scrollChartToEndOnDataChange = true,
8541
- xAxisTickAngle = 0
8586
+ xAxisTickAngle = 0,
8587
+ xAxisTickDx = 0,
8588
+ xAxisTickStyle
8542
8589
  }) {
8543
8590
  const [activeIndex, setActiveIndex] = React14.useState(null);
8544
8591
  const handleBarMouseEnter = React14.useCallback((_, index) => {
@@ -8661,12 +8708,8 @@ function PasserbyConversion({
8661
8708
  const chartMargin = React14.useMemo(() => {
8662
8709
  const top = showBarValueLabels ? topReserveForBarLabels2 : topReserveNoBarLabels2;
8663
8710
  const right = showConversionLine ? 52 : defaultChartMargin3.right;
8664
- return {
8665
- ...defaultChartMargin3,
8666
- top,
8667
- right,
8668
- ...chartMarginProp
8669
- };
8711
+ if (chartMarginProp) return chartMarginProp;
8712
+ return { ...defaultChartMargin3, top, right };
8670
8713
  }, [showBarValueLabels, showConversionLine, chartMarginProp]);
8671
8714
  const yTickLeft = yAxisTickFormatter ?? formatYAxisTickDefault2;
8672
8715
  const yTickRight = conversionAxisTickFormatter ?? formatYAxisTickDefault2;
@@ -8763,7 +8806,7 @@ function PasserbyConversion({
8763
8806
  }
8764
8807
  ),
8765
8808
  /* @__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)(
8809
+ showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8767
8810
  import_Box11.default,
8768
8811
  {
8769
8812
  sx: sxChain3(
@@ -8853,7 +8896,7 @@ function PasserbyConversion({
8853
8896
  },
8854
8897
  chartScrollAreaSx
8855
8898
  ),
8856
- children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
8899
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_Skeleton3.default, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
8857
8900
  import_recharts3.ComposedChart,
8858
8901
  {
8859
8902
  width: chartWidthPx,
@@ -8883,7 +8926,14 @@ function PasserbyConversion({
8883
8926
  interval: 0,
8884
8927
  height: 68,
8885
8928
  tickMargin: 10,
8886
- tick: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MultiLineTick3, { angle: xAxisTickAngle }),
8929
+ tick: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8930
+ MultiLineTick3,
8931
+ {
8932
+ angle: xAxisTickAngle,
8933
+ dx: xAxisTickDx,
8934
+ style: xAxisTickStyle
8935
+ }
8936
+ ),
8887
8937
  axisLine: { stroke: chartColors.xAxisLineStroke },
8888
8938
  tickLine: { stroke: chartColors.axisTickLineStroke }
8889
8939
  }
@@ -8892,8 +8942,9 @@ function PasserbyConversion({
8892
8942
  import_recharts3.YAxis,
8893
8943
  {
8894
8944
  yAxisId: "left",
8945
+ dx: yAxisTickDx,
8895
8946
  tickSize: 8,
8896
- tick: { fontSize: 12, fontWeight: 400 },
8947
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
8897
8948
  tickFormatter: yTickLeft,
8898
8949
  axisLine: { stroke: chartColors.axisTickLineStroke },
8899
8950
  tickLine: { stroke: chartColors.axisTickLineStroke },
@@ -8905,8 +8956,13 @@ function PasserbyConversion({
8905
8956
  {
8906
8957
  yAxisId: "right",
8907
8958
  orientation: "right",
8959
+ dx: rightYAxisTickDx ?? conversionAxisTickDx,
8908
8960
  tickSize: 8,
8909
- tick: { fontSize: 12, fontWeight: 400 },
8961
+ tick: {
8962
+ fontSize: 12,
8963
+ fontWeight: 400,
8964
+ ...rightYAxisTickStyle ?? conversionAxisTickStyle
8965
+ },
8910
8966
  tickFormatter: yTickRight,
8911
8967
  axisLine: { stroke: chartColors.axisTickLineStroke },
8912
8968
  tickLine: { stroke: chartColors.axisTickLineStroke },
@@ -9555,6 +9611,7 @@ var WalkinAnalysis = ({
9555
9611
  // src/components/widgets/WalkinTraffic/WalkinTraffic.tsx
9556
9612
  var import_Box13 = __toESM(require("@mui/material/Box"));
9557
9613
  var import_Divider5 = __toESM(require("@mui/material/Divider"));
9614
+ var import_Skeleton4 = __toESM(require("@mui/material/Skeleton"));
9558
9615
  var import_Stack11 = __toESM(require("@mui/material/Stack"));
9559
9616
  var import_Typography10 = __toESM(require("@mui/material/Typography"));
9560
9617
  var React16 = __toESM(require("react"));
@@ -9568,10 +9625,10 @@ var OLY_DEFAULT_COMPOSED_CHART_CHROME4 = {
9568
9625
  axisTickLineStroke: "#E5E7EB"
9569
9626
  };
9570
9627
  var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_MARGIN = {
9571
- top: 28,
9572
- right: 20,
9573
- left: 12,
9574
- bottom: 28
9628
+ top: 16,
9629
+ right: 8,
9630
+ left: 6,
9631
+ bottom: 0
9575
9632
  };
9576
9633
  var OLY_DEFAULT_WALKIN_TRAFFIC_CHART_SERIES_COLORS = {
9577
9634
  barFill: "#0086A9",
@@ -9641,6 +9698,8 @@ function MultiLineTick4({
9641
9698
  y = 0,
9642
9699
  payload,
9643
9700
  angle = -42,
9701
+ dx = 0,
9702
+ style,
9644
9703
  textAnchor = "end",
9645
9704
  fontSize = 12
9646
9705
  }) {
@@ -9650,13 +9709,14 @@ function MultiLineTick4({
9650
9709
  const isHorizontal = angle === 0;
9651
9710
  const anchor = isHorizontal ? "middle" : textAnchor;
9652
9711
  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)(
9712
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("g", { transform: `translate(${x + dx},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9654
9713
  "text",
9655
9714
  {
9656
9715
  transform: `rotate(${angle})`,
9657
9716
  textAnchor: anchor,
9658
9717
  fontSize,
9659
9718
  fill: "#666",
9719
+ ...style,
9660
9720
  children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
9661
9721
  }
9662
9722
  ) });
@@ -9934,6 +9994,7 @@ var defaultChartColors4 = {
9934
9994
  function WalkinTraffic({
9935
9995
  title,
9936
9996
  data,
9997
+ isLoading = false,
9937
9998
  chartHeight = OLY_DEFAULT_COMPOSED_CHART_HEIGHT_PX4,
9938
9999
  barSeriesName = "Walk-ins",
9939
10000
  lineSeriesName = "Trend",
@@ -9968,13 +10029,17 @@ function WalkinTraffic({
9968
10029
  showLineInLegend = false,
9969
10030
  showBarValueLabels = true,
9970
10031
  chartMargin: chartMarginProp,
10032
+ yAxisTickDx = -8,
10033
+ yAxisTickStyle,
9971
10034
  chartColors: chartColorsProp,
9972
10035
  emptyStatePlaceholderProps,
9973
10036
  yAxisTickFormatter,
9974
10037
  isChartAnimationActive = true,
9975
10038
  chartAnimationDuration = 400,
9976
10039
  scrollChartToEndOnDataChange = true,
9977
- xAxisTickAngle = 0
10040
+ xAxisTickAngle = 0,
10041
+ xAxisTickDx = 0,
10042
+ xAxisTickStyle
9978
10043
  }) {
9979
10044
  const tooltipFooterNote = tooltipFooterNoteProp === void 0 ? defaultFfGrowthTooltipFooterNote : tooltipFooterNoteProp;
9980
10045
  const processedData = React16.useMemo(
@@ -10051,11 +10116,8 @@ function WalkinTraffic({
10051
10116
  }, [chartInnerMinWidthPx, containerWidth]);
10052
10117
  const chartMargin = React16.useMemo(() => {
10053
10118
  const top = showBarValueLabels ? topReserveForBarLabels3 : topReserveNoBarLabels3;
10054
- return {
10055
- ...defaultChartMargin4,
10056
- top,
10057
- ...chartMarginProp
10058
- };
10119
+ if (chartMarginProp) return chartMarginProp;
10120
+ return { ...defaultChartMargin4, top };
10059
10121
  }, [showBarValueLabels, chartMarginProp]);
10060
10122
  const chartColors = React16.useMemo(
10061
10123
  () => ({
@@ -10155,7 +10217,7 @@ function WalkinTraffic({
10155
10217
  }
10156
10218
  ),
10157
10219
  /* @__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)(
10220
+ showLegend && !isLoading && hasMeaningfulData && legendItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10159
10221
  import_Box13.default,
10160
10222
  {
10161
10223
  sx: sxChain4(
@@ -10245,7 +10307,7 @@ function WalkinTraffic({
10245
10307
  },
10246
10308
  chartScrollAreaSx
10247
10309
  ),
10248
- children: hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10310
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_Skeleton4.default, { variant: "rounded", width: "100%", height: "100%" }) : hasMeaningfulData ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10249
10311
  import_recharts5.ComposedChart,
10250
10312
  {
10251
10313
  width: chartWidthPx,
@@ -10271,7 +10333,14 @@ function WalkinTraffic({
10271
10333
  interval: 0,
10272
10334
  height: 68,
10273
10335
  tickMargin: 10,
10274
- tick: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MultiLineTick4, { angle: xAxisTickAngle }),
10336
+ tick: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10337
+ MultiLineTick4,
10338
+ {
10339
+ angle: xAxisTickAngle,
10340
+ dx: xAxisTickDx,
10341
+ style: xAxisTickStyle
10342
+ }
10343
+ ),
10275
10344
  axisLine: { stroke: chartColors.xAxisLineStroke },
10276
10345
  tickLine: { stroke: chartColors.axisTickLineStroke }
10277
10346
  }
@@ -10279,8 +10348,9 @@ function WalkinTraffic({
10279
10348
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10280
10349
  import_recharts5.YAxis,
10281
10350
  {
10351
+ dx: yAxisTickDx,
10282
10352
  tickSize: 8,
10283
- tick: { fontSize: 12, fontWeight: 400 },
10353
+ tick: { fontSize: 12, fontWeight: 400, ...yAxisTickStyle },
10284
10354
  tickFormatter: yTick,
10285
10355
  axisLine: { stroke: chartColors.axisTickLineStroke },
10286
10356
  tickLine: { stroke: chartColors.axisTickLineStroke }
@@ -13682,6 +13752,7 @@ var peakBillingHoursMockSeriesByTabId = {
13682
13752
  var import_Box18 = __toESM(require("@mui/material/Box"));
13683
13753
  var import_Card3 = __toESM(require("@mui/material/Card"));
13684
13754
  var import_CardContent3 = __toESM(require("@mui/material/CardContent"));
13755
+ var import_Skeleton5 = __toESM(require("@mui/material/Skeleton"));
13685
13756
  var import_Stack17 = __toESM(require("@mui/material/Stack"));
13686
13757
  var import_Typography16 = __toESM(require("@mui/material/Typography"));
13687
13758
  var React26 = __toESM(require("react"));
@@ -13841,7 +13912,12 @@ function BarPlot({
13841
13912
  yAxisDomain,
13842
13913
  yAxisTicks,
13843
13914
  activeTabId,
13844
- renderTooltip
13915
+ renderTooltip,
13916
+ chartMargin,
13917
+ yAxisTickDx = -6,
13918
+ yAxisTickStyle,
13919
+ xAxisTickDx = 0,
13920
+ xAxisTickStyle
13845
13921
  }) {
13846
13922
  const { barChart: bc } = usePeakBillingHoursCustomization();
13847
13923
  const height = bc?.heightPx ?? 320;
@@ -13849,7 +13925,7 @@ function BarPlot({
13849
13925
  const barRadius = bc?.barRadius ?? 0;
13850
13926
  const gridStroke = bc?.gridStroke ?? OLY_DEFAULT_COMPOSED_CHART_CHROME6.cartesianGridStroke;
13851
13927
  const dash = bc?.gridStrokeDasharray ?? "3 3";
13852
- const m = {
13928
+ const m = chartMargin ?? {
13853
13929
  top: bc?.margin?.top ?? 28,
13854
13930
  right: bc?.margin?.right ?? 12,
13855
13931
  bottom: bc?.margin?.bottom ?? 8,
@@ -13889,7 +13965,8 @@ function BarPlot({
13889
13965
  import_recharts10.XAxis,
13890
13966
  {
13891
13967
  dataKey: "label",
13892
- tick: { fill: xFill, fontSize: 11 },
13968
+ dx: xAxisTickDx,
13969
+ tick: { fill: xFill, fontSize: 11, ...xAxisTickStyle },
13893
13970
  tickLine: false,
13894
13971
  axisLine: {
13895
13972
  stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME6.axisTickLineStroke
@@ -13903,7 +13980,8 @@ function BarPlot({
13903
13980
  {
13904
13981
  domain: yAxisDomain,
13905
13982
  ticks: yAxisTicks,
13906
- tick: { fill: yFill, fontSize: 11 },
13983
+ dx: yAxisTickDx,
13984
+ tick: { fill: yFill, fontSize: 11, ...yAxisTickStyle },
13907
13985
  tickLine: false,
13908
13986
  axisLine: false,
13909
13987
  width: yWidth
@@ -13968,7 +14046,13 @@ function PeakBillingHours({
13968
14046
  activeTabId,
13969
14047
  onTabChange,
13970
14048
  data,
14049
+ isLoading = false,
13971
14050
  seriesByTabId,
14051
+ chartMargin,
14052
+ yAxisTickDx = -6,
14053
+ yAxisTickStyle,
14054
+ xAxisTickDx = 0,
14055
+ xAxisTickStyle,
13972
14056
  yAxisDomain = [0, 50],
13973
14057
  yAxisTicks = [0, 10, 20, 30, 40, 50],
13974
14058
  infoPopover,
@@ -14067,14 +14151,19 @@ function PeakBillingHours({
14067
14151
  inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
14068
14152
  }
14069
14153
  ),
14070
- chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14154
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Skeleton5.default, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14071
14155
  BarPlot,
14072
14156
  {
14073
14157
  data: chartData,
14074
14158
  yAxisDomain,
14075
14159
  yAxisTicks,
14076
14160
  activeTabId,
14077
- renderTooltip
14161
+ renderTooltip,
14162
+ chartMargin,
14163
+ yAxisTickDx,
14164
+ yAxisTickStyle,
14165
+ xAxisTickDx,
14166
+ xAxisTickStyle
14078
14167
  }
14079
14168
  ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14080
14169
  ChartEmptyState,