@bpfdev/oly-ui 1.0.12 → 1.0.14

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
@@ -668,7 +668,12 @@ function InfoPopoverPanel({
668
668
  placement,
669
669
  compact
670
670
  }) {
671
- const helpTitle = content.helpTitle ?? "How does it help?";
671
+ const hasTitle = typeof content.title === "string" && content.title.trim() !== "";
672
+ const hasDescription = typeof content.description === "string" && content.description.trim() !== "";
673
+ const hasBullets = content.helpBullets.length > 0;
674
+ const hasExplicitHelpTitle = typeof content.helpTitle === "string" && content.helpTitle.trim() !== "";
675
+ const showHelpSection = hasBullets || hasExplicitHelpTitle;
676
+ const helpTitle = hasExplicitHelpTitle ? content.helpTitle : "How does it help?";
672
677
  const border = isDark ? popperBorderDark : popperBorder;
673
678
  const paperBg = isDark ? "#1c2128" : "#fff";
674
679
  const textPrimary = isDark ? "#f0f6fc" : "#1a1a1a";
@@ -696,7 +701,7 @@ function InfoPopoverPanel({
696
701
  boxShadow: panelShadow
697
702
  },
698
703
  children: /* @__PURE__ */ jsxs4(Stack2, { spacing: stackSpacing, sx: { position: "relative", zIndex: 1 }, children: [
699
- /* @__PURE__ */ jsx5(
704
+ hasTitle && /* @__PURE__ */ jsx5(
700
705
  Typography4,
701
706
  {
702
707
  component: "h3",
@@ -709,7 +714,7 @@ function InfoPopoverPanel({
709
714
  children: content.title
710
715
  }
711
716
  ),
712
- /* @__PURE__ */ jsx5(
717
+ hasDescription && /* @__PURE__ */ jsx5(
713
718
  Typography4,
714
719
  {
715
720
  sx: {
@@ -720,7 +725,7 @@ function InfoPopoverPanel({
720
725
  children: content.description
721
726
  }
722
727
  ),
723
- /* @__PURE__ */ jsx5(
728
+ showHelpSection && /* @__PURE__ */ jsx5(
724
729
  Typography4,
725
730
  {
726
731
  sx: {
@@ -733,7 +738,7 @@ function InfoPopoverPanel({
733
738
  children: helpTitle
734
739
  }
735
740
  ),
736
- /* @__PURE__ */ jsx5(
741
+ hasBullets && /* @__PURE__ */ jsx5(
737
742
  Box4,
738
743
  {
739
744
  component: "ul",
@@ -3901,7 +3906,7 @@ var FalconAuditTimeline = ({
3901
3906
  date: run.date,
3902
3907
  ordinal: run.label ?? getOrdinalStr(idx + 1),
3903
3908
  status: run.status === "done" ? "completed" : "upcoming",
3904
- onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
3909
+ onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date, run) : void 0,
3905
3910
  brandFont,
3906
3911
  interFont,
3907
3912
  completedColor,
@@ -3939,7 +3944,16 @@ var FalconAuditTimeline = ({
3939
3944
  date: `${activeMonth.label} 5`,
3940
3945
  ordinal: getOrdinalStr(precedingEvents + 1),
3941
3946
  status: isFirstActiveMonth ? "completed" : "upcoming",
3942
- onExportClick: onExportReportClick ? (e) => onExportReportClick(e, `${activeMonth.label} 5`) : void 0,
3947
+ onExportClick: onExportReportClick ? (e) => {
3948
+ const date = `${activeMonth.label} 5`;
3949
+ onExportReportClick(e, date, {
3950
+ run_number: precedingEvents + 1,
3951
+ date,
3952
+ month: activeMonth.label,
3953
+ year: activeMonth.year,
3954
+ status: isFirstActiveMonth ? "done" : "scheduled"
3955
+ });
3956
+ } : void 0,
3943
3957
  brandFont,
3944
3958
  interFont,
3945
3959
  completedColor,
@@ -10958,6 +10972,10 @@ function LinePlot({
10958
10972
  left: lc?.margin?.left ?? 4
10959
10973
  };
10960
10974
  const xFill = lc?.xAxisTickFill ?? OLY_DEFAULT_CHART_AXIS_TICK_FILL;
10975
+ const xTickAngle = lc?.xAxisTickAngle ?? 0;
10976
+ const xTickStyle = lc?.xAxisTickStyle;
10977
+ const xAxisHeight = lc?.xAxisHeight ?? 40;
10978
+ const xTickAnchor = xTickAngle < 0 ? "end" : xTickAngle > 0 ? "start" : "middle";
10961
10979
  const yFill = lc?.yAxisTickFill ?? OLY_DEFAULT_CHART_AXIS_TICK_FILL;
10962
10980
  const yWidth = lc?.yAxisWidth ?? 36;
10963
10981
  const cursorStroke = lc?.cursorStroke ?? "#9CA3AF";
@@ -10976,13 +10994,15 @@ function LinePlot({
10976
10994
  XAxis5,
10977
10995
  {
10978
10996
  dataKey: "label",
10979
- tick: { fill: xFill, fontSize: 11 },
10997
+ tick: { fill: xFill, fontSize: 11, style: xTickStyle },
10980
10998
  tickLine: false,
10981
10999
  axisLine: {
10982
11000
  stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME5.axisTickLineStroke
10983
11001
  },
10984
11002
  interval: 0,
10985
- height: 40
11003
+ height: xAxisHeight,
11004
+ angle: xTickAngle,
11005
+ textAnchor: xTickAnchor
10986
11006
  }
10987
11007
  ),
10988
11008
  /* @__PURE__ */ jsx39(
@@ -11270,6 +11290,7 @@ var QueueTimeBreakdownArea = ({
11270
11290
  () => mergeAreaData(series, xAxis),
11271
11291
  [series, xAxis]
11272
11292
  );
11293
+ const fill = ac?.fillHeight ?? false;
11273
11294
  const stackH = ac?.stackHeightPx ?? 330;
11274
11295
  const chartH = ac?.chartHeightPx ?? 350;
11275
11296
  const margin = React20.useMemo(
@@ -11289,90 +11310,102 @@ var QueueTimeBreakdownArea = ({
11289
11310
  }, [chartData, series]);
11290
11311
  const yDomain = allZero ? [0, 16e3] : [0, "auto"];
11291
11312
  const yTickCount = allZero ? 5 : void 0;
11292
- return /* @__PURE__ */ jsx41(Stack21, { justifyContent: "center", height: stackH, children: /* @__PURE__ */ jsx41(ResponsiveContainer3, { width: "100%", height: chartH, children: /* @__PURE__ */ jsxs32(AreaChart, { data: chartData, margin, children: [
11293
- /* @__PURE__ */ jsx41(
11294
- CartesianGrid6,
11295
- {
11296
- strokeDasharray: "3 3",
11297
- stroke: gridStroke,
11298
- vertical: false
11299
- }
11300
- ),
11301
- /* @__PURE__ */ jsx41(
11302
- XAxis6,
11303
- {
11304
- dataKey: "name",
11305
- tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11306
- axisLine: false,
11307
- tickLine: false
11308
- }
11309
- ),
11310
- /* @__PURE__ */ jsx41(
11311
- YAxis6,
11312
- {
11313
- domain: yDomain,
11314
- tickCount: yTickCount,
11315
- tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11316
- axisLine: false,
11317
- tickLine: false,
11318
- tickFormatter: (v) => {
11319
- const n = typeof v === "number" ? v : Number(v);
11320
- const safe = Number.isFinite(n) ? n : 0;
11321
- return safe > 1e3 ? `${Math.ceil(safe / 1e3)}k` : String(safe);
11322
- },
11323
- label: {
11324
- value: yLabel,
11325
- angle: -90,
11326
- position: "insideLeft",
11327
- style: { fill: theme.palette.text.secondary, fontSize: 11 }
11328
- }
11329
- }
11330
- ),
11331
- series.map((s, i) => /* @__PURE__ */ jsx41(
11332
- Area,
11333
- {
11334
- type: "monotone",
11335
- dataKey: s.name,
11336
- stackId: "queueArea",
11337
- stroke: palette[i % palette.length],
11338
- fill: palette[i % palette.length],
11339
- fillOpacity: 1,
11340
- strokeWidth: 0
11341
- },
11342
- s.name
11343
- )),
11344
- /* @__PURE__ */ jsx41(
11345
- Tooltip9,
11346
- {
11347
- content: (tooltipProps) => {
11348
- if (renderTooltip) {
11349
- const custom = renderTooltip({
11350
- tooltipProps,
11351
- chartData,
11352
- series,
11353
- xAxis
11354
- });
11355
- return custom == null ? null : /* @__PURE__ */ jsx41(Fragment14, { children: custom });
11313
+ return /* @__PURE__ */ jsx41(
11314
+ Stack21,
11315
+ {
11316
+ justifyContent: fill ? "stretch" : "center",
11317
+ sx: fill ? {
11318
+ flexGrow: 1,
11319
+ minHeight: 0,
11320
+ height: "100%",
11321
+ "& > *": { flex: 1, minHeight: 0 }
11322
+ } : { height: stackH },
11323
+ children: /* @__PURE__ */ jsx41(ResponsiveContainer3, { width: "100%", height: fill ? "100%" : chartH, children: /* @__PURE__ */ jsxs32(AreaChart, { data: chartData, margin, children: [
11324
+ /* @__PURE__ */ jsx41(
11325
+ CartesianGrid6,
11326
+ {
11327
+ strokeDasharray: "3 3",
11328
+ stroke: gridStroke,
11329
+ vertical: false
11356
11330
  }
11357
- const { active, payload, label } = tooltipProps;
11358
- return /* @__PURE__ */ jsx41(
11359
- QueueTimeBreakdownAreaTooltip,
11360
- {
11361
- active,
11362
- label,
11363
- payload,
11364
- styleOverrides: ac?.areaTooltip
11331
+ ),
11332
+ /* @__PURE__ */ jsx41(
11333
+ XAxis6,
11334
+ {
11335
+ dataKey: "name",
11336
+ tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11337
+ axisLine: false,
11338
+ tickLine: false
11339
+ }
11340
+ ),
11341
+ /* @__PURE__ */ jsx41(
11342
+ YAxis6,
11343
+ {
11344
+ domain: yDomain,
11345
+ tickCount: yTickCount,
11346
+ tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11347
+ axisLine: false,
11348
+ tickLine: false,
11349
+ tickFormatter: (v) => {
11350
+ const n = typeof v === "number" ? v : Number(v);
11351
+ const safe = Number.isFinite(n) ? n : 0;
11352
+ return safe > 1e3 ? `${Math.ceil(safe / 1e3)}k` : String(safe);
11353
+ },
11354
+ label: {
11355
+ value: yLabel,
11356
+ angle: -90,
11357
+ position: "insideLeft",
11358
+ style: { fill: theme.palette.text.secondary, fontSize: 11 }
11365
11359
  }
11366
- );
11367
- },
11368
- cursor: {
11369
- stroke: ac?.cursorStroke ?? "#D4D4D8",
11370
- strokeWidth: ac?.cursorStrokeWidth ?? 1
11371
- },
11372
- wrapperStyle: { outline: "none" }
11373
- }
11374
- )
11375
- ] }) }) });
11360
+ }
11361
+ ),
11362
+ series.map((s, i) => /* @__PURE__ */ jsx41(
11363
+ Area,
11364
+ {
11365
+ type: "monotone",
11366
+ dataKey: s.name,
11367
+ stackId: "queueArea",
11368
+ stroke: palette[i % palette.length],
11369
+ fill: palette[i % palette.length],
11370
+ fillOpacity: 1,
11371
+ strokeWidth: 0
11372
+ },
11373
+ s.name
11374
+ )),
11375
+ /* @__PURE__ */ jsx41(
11376
+ Tooltip9,
11377
+ {
11378
+ content: (tooltipProps) => {
11379
+ if (renderTooltip) {
11380
+ const custom = renderTooltip({
11381
+ tooltipProps,
11382
+ chartData,
11383
+ series,
11384
+ xAxis
11385
+ });
11386
+ return custom == null ? null : /* @__PURE__ */ jsx41(Fragment14, { children: custom });
11387
+ }
11388
+ const { active, payload, label } = tooltipProps;
11389
+ return /* @__PURE__ */ jsx41(
11390
+ QueueTimeBreakdownAreaTooltip,
11391
+ {
11392
+ active,
11393
+ label,
11394
+ payload,
11395
+ styleOverrides: ac?.areaTooltip
11396
+ }
11397
+ );
11398
+ },
11399
+ cursor: {
11400
+ stroke: ac?.cursorStroke ?? "#D4D4D8",
11401
+ strokeWidth: ac?.cursorStrokeWidth ?? 1
11402
+ },
11403
+ wrapperStyle: { outline: "none" }
11404
+ }
11405
+ )
11406
+ ] }) })
11407
+ }
11408
+ );
11376
11409
  };
11377
11410
  var QueueTimeBreakdownArea_default = QueueTimeBreakdownArea;
11378
11411
  var xDays = [
@@ -11553,10 +11586,10 @@ function DonutInnerPercentLabel(props) {
11553
11586
  );
11554
11587
  }
11555
11588
  var DEFAULT_LABELS = [
11556
- "0-20 years old (male)",
11557
- "21-45 years old (male)",
11558
- "46-60 years old (male)",
11559
- "60+ years old (male)"
11589
+ "1-15 mins",
11590
+ "16-30 mins",
11591
+ "30-45 mins",
11592
+ "> 45 mins"
11560
11593
  ];
11561
11594
  function QueueTimeBreakdownDonut({
11562
11595
  chartFilter,
@@ -11576,8 +11609,9 @@ function QueueTimeBreakdownDonut({
11576
11609
  const padAngle = dn?.paddingAngle ?? 0;
11577
11610
  const chartH = dn?.chartHeightPx ?? 220;
11578
11611
  const pieData = React21.useMemo(() => {
11579
- return labels.map((name, i) => ({
11580
- name,
11612
+ const count = Math.max(averageData.length, labels.length);
11613
+ return Array.from({ length: count }, (_, i) => ({
11614
+ name: labels[i] ?? `Bucket ${i + 1}`,
11581
11615
  value: Math.max(0, averageData[i] ?? 0)
11582
11616
  }));
11583
11617
  }, [averageData, labels]);
@@ -12060,6 +12094,9 @@ function QueueTimeBreakdown({
12060
12094
  data,
12061
12095
  Donut_data,
12062
12096
  donutYesterdayData,
12097
+ donutLabels,
12098
+ areaSeries,
12099
+ areaXAxis,
12063
12100
  headerImageSrc,
12064
12101
  headlineTotal = "14,123",
12065
12102
  headlineSubtitle = "Queue Time Breakdown Of All Visitors",
@@ -12084,6 +12121,12 @@ function QueueTimeBreakdown({
12084
12121
  () => data.some((row) => row.data.some((seg) => (seg.data[0] ?? 0) > 0)),
12085
12122
  [data]
12086
12123
  );
12124
+ const areaProvided = areaSeries !== void 0;
12125
+ const resolvedAreaSeries = areaSeries !== void 0 ? areaSeries : getQueueTimeBreakdownAreaSeriesData(filter);
12126
+ const resolvedAreaXAxis = areaProvided ? areaXAxis ?? [] : areaXAxis && areaXAxis.length > 0 ? areaXAxis : getQueueTimeBreakdownAreaXAxisData(filter);
12127
+ const hasAreaData = resolvedAreaXAxis.length > 0 && resolvedAreaSeries.some(
12128
+ (s) => s.data.some((v) => (typeof v === "number" ? v : 0) > 0)
12129
+ );
12087
12130
  const palette = customization?.chartPalette && customization.chartPalette.length > 0 ? customization.chartPalette : QUEUE_CHART_COLORS;
12088
12131
  const legend = queueBucketLegend ?? defaultBucketLegendFromPalette(palette);
12089
12132
  const resolvedHeaderImageSrc = headerImageSrc === void 0 ? QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC : headerImageSrc;
@@ -12101,258 +12144,1221 @@ function QueueTimeBreakdown({
12101
12144
  { fontWeight: 700, color: "#0f172a" },
12102
12145
  customization?.periodFilter?.titleSx
12103
12146
  );
12104
- return /* @__PURE__ */ jsx44(QueueTimeBreakdownCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsx44(Card3, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ jsx44(CardContent2, { sx: mergeSx2(customization?.rootCard?.cardContentSx), children: /* @__PURE__ */ jsxs35(Stack24, { width: "100%", direction: "column", gap: 3, mb: 4, children: [
12105
- /* @__PURE__ */ jsxs35(
12106
- Stack24,
12107
- {
12108
- direction: "row",
12109
- alignItems: "center",
12110
- justifyContent: "space-between",
12111
- flexWrap: "wrap",
12112
- gap: 2,
12113
- width: "100%",
12114
- children: [
12115
- /* @__PURE__ */ jsx44(
12116
- Typography25,
12117
- {
12118
- variant: isSmallScreen ? "subtitle2" : "body1",
12119
- sx: periodTitleSx,
12120
- children: title
12121
- }
12122
- ),
12123
- /* @__PURE__ */ jsx44(
12124
- TimePeriodFilter,
12125
- {
12126
- selectedFilter: filter,
12127
- onFilterChange: setFilter,
12128
- infoPopover: resolvedPeriodInfoPopover
12129
- }
12130
- )
12131
- ]
12132
- }
12133
- ),
12134
- /* @__PURE__ */ jsx44(Box30, { children: /* @__PURE__ */ jsxs35(Grid, { container: true, spacing: 3, children: [
12135
- /* @__PURE__ */ jsxs35(Grid, { size: { md: 6, xs: 12 }, children: [
12147
+ return /* @__PURE__ */ jsx44(QueueTimeBreakdownCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsx44(Card3, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ jsx44(CardContent2, { sx: mergeSx2(customization?.rootCard?.cardContentSx), children: /* @__PURE__ */ jsxs35(
12148
+ Stack24,
12149
+ {
12150
+ width: "100%",
12151
+ direction: "column",
12152
+ gap: 3,
12153
+ sx: mergeSx2({ mb: 4 }, customization?.rootCard?.contentStackSx),
12154
+ children: [
12136
12155
  /* @__PURE__ */ jsxs35(
12137
12156
  Stack24,
12138
12157
  {
12139
- gap: 1,
12140
- sx: mergeSx2(customization?.leftColumn?.columnStackSx),
12158
+ direction: "row",
12159
+ alignItems: "center",
12160
+ justifyContent: "space-between",
12161
+ flexWrap: "wrap",
12162
+ gap: 2,
12163
+ width: "100%",
12141
12164
  children: [
12142
- /* @__PURE__ */ jsx44(Stack24, { children: /* @__PURE__ */ jsxs35(
12143
- Stack24,
12165
+ /* @__PURE__ */ jsx44(
12166
+ Typography25,
12144
12167
  {
12145
- direction: "row",
12146
- gap: 4,
12147
- justifyContent: "start",
12148
- alignItems: "center",
12149
- children: [
12150
- resolvedHeaderImageSrc ? /* @__PURE__ */ jsx44(
12151
- Box30,
12152
- {
12153
- component: "img",
12154
- src: resolvedHeaderImageSrc,
12155
- alt: "",
12156
- width: 52,
12157
- height: 52,
12158
- sx: { objectFit: "contain" }
12159
- }
12160
- ) : null,
12161
- /* @__PURE__ */ jsxs35(Stack24, { children: [
12162
- /* @__PURE__ */ jsx44(
12163
- Typography25,
12164
- {
12165
- sx: mergeSx2(
12166
- {
12167
- fontSize: "20px",
12168
- fontWeight: 600,
12169
- color: "#222222"
12170
- },
12171
- customization?.header?.headlineSx
12172
- ),
12173
- children: headlineTotal
12174
- }
12175
- ),
12176
- /* @__PURE__ */ jsxs35(Stack24, { direction: "row", alignItems: "center", gap: 1, children: [
12177
- /* @__PURE__ */ jsx44(
12178
- Typography25,
12179
- {
12180
- sx: mergeSx2(
12181
- {
12182
- fontSize: "11px",
12183
- fontWeight: 400,
12184
- color: "#222222"
12185
- },
12186
- customization?.header?.subtitleSx
12187
- ),
12188
- children: headlineSubtitle
12189
- }
12190
- ),
12191
- resolvedHeadlineInfoPopover ? /* @__PURE__ */ jsx44(
12192
- ChartWidgetInfoButton,
12193
- {
12194
- density: "compact",
12195
- popover: resolvedHeadlineInfoPopover,
12196
- ariaLabel: "Queue time breakdown information"
12197
- }
12198
- ) : null
12199
- ] })
12200
- ] })
12201
- ]
12168
+ variant: isSmallScreen ? "subtitle2" : "body1",
12169
+ sx: periodTitleSx,
12170
+ children: title
12202
12171
  }
12203
- ) }),
12172
+ ),
12204
12173
  /* @__PURE__ */ jsx44(
12205
- Stack24,
12174
+ TimePeriodFilter,
12206
12175
  {
12207
- sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
12208
- children: data.map((item) => /* @__PURE__ */ jsx44(
12209
- QueueTimeBreakdownStackedBar,
12210
- {
12211
- row: item,
12212
- legendRows: legend,
12213
- renderTooltip: renderStackedBarTooltip
12214
- },
12215
- item.name
12216
- ))
12176
+ selectedFilter: filter,
12177
+ onFilterChange: setFilter,
12178
+ infoPopover: resolvedPeriodInfoPopover
12217
12179
  }
12218
12180
  )
12219
12181
  ]
12220
12182
  }
12221
12183
  ),
12222
- /* @__PURE__ */ jsx44(
12223
- Typography25,
12224
- {
12225
- sx: mergeSx2(
12226
- {
12227
- marginTop: "10px",
12228
- fontSize: "14px",
12229
- fontWeight: 500,
12230
- color: "#222222"
12231
- },
12232
- customization?.dataComparison?.titleSx
12233
- ),
12234
- children: dataComparisonTitle
12235
- }
12236
- ),
12237
- /* @__PURE__ */ jsx44(
12238
- Card3,
12239
- {
12240
- elevation: 0,
12241
- sx: mergeSx2(
12242
- {
12243
- cursor: "pointer",
12244
- marginTop: "10px",
12245
- bgcolor: "#FFFFFF",
12246
- border: "1px solid #E5E7EB",
12247
- borderRadius: 2
12248
- },
12249
- customization?.dataComparison?.cardSx
12250
- ),
12251
- children: /* @__PURE__ */ jsx44(CardContent2, { sx: { padding: "4px 8px" }, children: hasComparisonData ? /* @__PURE__ */ jsxs35(
12184
+ /* @__PURE__ */ jsx44(Box30, { children: /* @__PURE__ */ jsxs35(Grid, { container: true, spacing: 3, children: [
12185
+ /* @__PURE__ */ jsxs35(Grid, { size: { md: 6, xs: 12 }, children: [
12186
+ /* @__PURE__ */ jsxs35(
12252
12187
  Stack24,
12253
12188
  {
12254
- direction: "row",
12255
- justifyContent: "space-evenly",
12256
- alignItems: "center",
12189
+ gap: 1,
12190
+ sx: mergeSx2(customization?.leftColumn?.columnStackSx),
12257
12191
  children: [
12258
- /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12259
- QueueTimeBreakdownDonut,
12192
+ /* @__PURE__ */ jsx44(Stack24, { children: /* @__PURE__ */ jsxs35(
12193
+ Stack24,
12260
12194
  {
12261
- averageData: Donut_data,
12262
- chartFilter: filter,
12263
- LabelName: "Today",
12264
- renderTooltip: renderDonutTooltip
12195
+ direction: "row",
12196
+ gap: 4,
12197
+ justifyContent: "start",
12198
+ alignItems: "center",
12199
+ children: [
12200
+ resolvedHeaderImageSrc ? /* @__PURE__ */ jsx44(
12201
+ Box30,
12202
+ {
12203
+ component: "img",
12204
+ src: resolvedHeaderImageSrc,
12205
+ alt: "",
12206
+ width: 52,
12207
+ height: 52,
12208
+ sx: { objectFit: "contain" }
12209
+ }
12210
+ ) : null,
12211
+ /* @__PURE__ */ jsxs35(Stack24, { children: [
12212
+ /* @__PURE__ */ jsx44(
12213
+ Typography25,
12214
+ {
12215
+ sx: mergeSx2(
12216
+ {
12217
+ fontSize: "20px",
12218
+ fontWeight: 600,
12219
+ color: "#222222"
12220
+ },
12221
+ customization?.header?.headlineSx
12222
+ ),
12223
+ children: headlineTotal
12224
+ }
12225
+ ),
12226
+ /* @__PURE__ */ jsxs35(Stack24, { direction: "row", alignItems: "center", gap: 1, children: [
12227
+ /* @__PURE__ */ jsx44(
12228
+ Typography25,
12229
+ {
12230
+ sx: mergeSx2(
12231
+ {
12232
+ fontSize: "11px",
12233
+ fontWeight: 400,
12234
+ color: "#222222"
12235
+ },
12236
+ customization?.header?.subtitleSx
12237
+ ),
12238
+ children: headlineSubtitle
12239
+ }
12240
+ ),
12241
+ resolvedHeadlineInfoPopover ? /* @__PURE__ */ jsx44(
12242
+ ChartWidgetInfoButton,
12243
+ {
12244
+ density: "compact",
12245
+ popover: resolvedHeadlineInfoPopover,
12246
+ ariaLabel: "Queue time breakdown information"
12247
+ }
12248
+ ) : null
12249
+ ] })
12250
+ ] })
12251
+ ]
12265
12252
  }
12266
12253
  ) }),
12267
12254
  /* @__PURE__ */ jsx44(
12268
- Box30,
12255
+ Stack24,
12269
12256
  {
12270
- component: "span",
12271
- sx: mergeSx2(
12257
+ sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
12258
+ children: data.map((item) => /* @__PURE__ */ jsx44(
12259
+ QueueTimeBreakdownStackedBar,
12272
12260
  {
12273
- height: "180px",
12274
- width: "2px",
12275
- backgroundColor: "#D8D9E4",
12276
- display: "inline-block"
12261
+ row: item,
12262
+ legendRows: legend,
12263
+ renderTooltip: renderStackedBarTooltip
12277
12264
  },
12278
- customization?.dataComparison?.dividerSx
12279
- )
12280
- }
12281
- ),
12282
- /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12283
- QueueTimeBreakdownDonut,
12284
- {
12285
- averageData: yesterdayDonut,
12286
- chartFilter: filter,
12287
- LabelName: "Yesterday",
12288
- renderTooltip: renderDonutTooltip
12265
+ item.name
12266
+ ))
12289
12267
  }
12290
- ) })
12268
+ )
12291
12269
  ]
12292
12270
  }
12293
- ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 220 }) })
12294
- }
12295
- )
12296
- ] }),
12297
- /* @__PURE__ */ jsx44(Grid, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ jsx44(
12298
- Card3,
12299
- {
12300
- elevation: 0,
12301
- sx: mergeSx2(
12302
- {
12303
- cursor: "pointer",
12304
- borderRadius: "8px",
12305
- border: "1px solid #E5E7EB",
12306
- bgcolor: "#FFFFFF",
12307
- height: "100%"
12308
- },
12309
- customization?.areaChart?.cardSx
12310
- ),
12311
- children: /* @__PURE__ */ jsx44(
12312
- CardContent2,
12271
+ ),
12272
+ /* @__PURE__ */ jsx44(
12273
+ Typography25,
12274
+ {
12275
+ sx: mergeSx2(
12276
+ {
12277
+ marginTop: "10px",
12278
+ fontSize: "14px",
12279
+ fontWeight: 500,
12280
+ color: "#222222"
12281
+ },
12282
+ customization?.dataComparison?.titleSx
12283
+ ),
12284
+ children: dataComparisonTitle
12285
+ }
12286
+ ),
12287
+ /* @__PURE__ */ jsx44(
12288
+ Card3,
12289
+ {
12290
+ elevation: 0,
12291
+ sx: mergeSx2(
12292
+ {
12293
+ cursor: "pointer",
12294
+ marginTop: "10px",
12295
+ bgcolor: "#FFFFFF",
12296
+ border: "1px solid #E5E7EB",
12297
+ borderRadius: 2
12298
+ },
12299
+ customization?.dataComparison?.cardSx
12300
+ ),
12301
+ children: /* @__PURE__ */ jsx44(CardContent2, { sx: { padding: "4px 8px" }, children: hasComparisonData ? /* @__PURE__ */ jsxs35(
12302
+ Stack24,
12303
+ {
12304
+ direction: "row",
12305
+ justifyContent: "space-evenly",
12306
+ alignItems: "center",
12307
+ children: [
12308
+ /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12309
+ QueueTimeBreakdownDonut,
12310
+ {
12311
+ averageData: Donut_data,
12312
+ labels: donutLabels,
12313
+ chartFilter: filter,
12314
+ LabelName: "Today",
12315
+ renderTooltip: renderDonutTooltip
12316
+ }
12317
+ ) }),
12318
+ /* @__PURE__ */ jsx44(
12319
+ Box30,
12320
+ {
12321
+ component: "span",
12322
+ sx: mergeSx2(
12323
+ {
12324
+ height: "180px",
12325
+ width: "2px",
12326
+ backgroundColor: "#D8D9E4",
12327
+ display: "inline-block"
12328
+ },
12329
+ customization?.dataComparison?.dividerSx
12330
+ )
12331
+ }
12332
+ ),
12333
+ /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12334
+ QueueTimeBreakdownDonut,
12335
+ {
12336
+ averageData: yesterdayDonut,
12337
+ labels: donutLabels,
12338
+ chartFilter: filter,
12339
+ LabelName: "Yesterday",
12340
+ renderTooltip: renderDonutTooltip
12341
+ }
12342
+ ) })
12343
+ ]
12344
+ }
12345
+ ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 220 }) })
12346
+ }
12347
+ )
12348
+ ] }),
12349
+ /* @__PURE__ */ jsx44(Grid, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ jsx44(
12350
+ Card3,
12313
12351
  {
12352
+ elevation: 0,
12314
12353
  sx: mergeSx2(
12315
- { padding: "10px 8px" },
12316
- customization?.areaChart?.cardContentSx
12354
+ {
12355
+ cursor: "pointer",
12356
+ borderRadius: "8px",
12357
+ border: "1px solid #E5E7EB",
12358
+ bgcolor: "#FFFFFF",
12359
+ height: "100%"
12360
+ },
12361
+ customization?.areaChart?.cardSx
12317
12362
  ),
12318
- children: hasBarData ? /* @__PURE__ */ jsx44(
12319
- QueueTimeBreakdownArea_default,
12363
+ children: /* @__PURE__ */ jsx44(
12364
+ CardContent2,
12320
12365
  {
12321
- series: getQueueTimeBreakdownAreaSeriesData(filter),
12322
- xAxis: getQueueTimeBreakdownAreaXAxisData(filter),
12323
- renderTooltip: renderAreaTooltip
12366
+ sx: mergeSx2(
12367
+ { padding: "10px 8px" },
12368
+ customization?.areaChart?.cardContentSx
12369
+ ),
12370
+ children: (areaProvided ? hasAreaData : hasBarData) ? /* @__PURE__ */ jsx44(
12371
+ QueueTimeBreakdownArea_default,
12372
+ {
12373
+ series: resolvedAreaSeries,
12374
+ xAxis: resolvedAreaXAxis,
12375
+ renderTooltip: renderAreaTooltip
12376
+ }
12377
+ ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 330 })
12324
12378
  }
12325
- ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 330 })
12379
+ )
12326
12380
  }
12327
- )
12328
- }
12329
- ) })
12330
- ] }) })
12331
- ] }) }) }) });
12381
+ ) })
12382
+ ] }) })
12383
+ ]
12384
+ }
12385
+ ) }) }) });
12332
12386
  }
12333
12387
 
12334
- // src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
12335
- import { Icon as Icon13 } from "@iconify/react";
12388
+ // src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
12389
+ var STACKED_COMPARISON_DEFAULT_STACK_COLORS = [
12390
+ "#CFE0FB",
12391
+ "#7FB1F0",
12392
+ "#3D7CDF",
12393
+ "#1E2A5E"
12394
+ ];
12395
+ var STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR = "#F47C7C";
12396
+ var STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR = "#2563EB";
12397
+ var STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR = "#EF4444";
12398
+ var STACKED_COMPARISON_DEFAULT_FRAME_BORDER = "#EAECEF";
12399
+
12400
+ // src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
12401
+ import Box31 from "@mui/material/Box";
12402
+ import ButtonBase2 from "@mui/material/ButtonBase";
12403
+ import Stack25 from "@mui/material/Stack";
12404
+ import Typography26 from "@mui/material/Typography";
12405
+ import * as React25 from "react";
12336
12406
  import {
12337
- Box as Box31,
12338
- Button as Button8,
12339
- IconButton as IconButton5,
12340
- Paper as Paper5,
12341
- Skeleton as Skeleton7,
12342
- Stack as Stack25,
12407
+ Bar as Bar5,
12408
+ BarChart as BarChart3,
12409
+ CartesianGrid as CartesianGrid7,
12410
+ ResponsiveContainer as ResponsiveContainer5,
12343
12411
  Tooltip as Tooltip12,
12344
- Typography as Typography26
12345
- } from "@mui/material";
12346
- import * as React24 from "react";
12347
- import { useEffect as useEffect3, useMemo as useMemo19, useState as useState17 } from "react";
12348
- import { ResponsiveContainer as ResponsiveContainer5, Treemap } from "recharts";
12349
-
12350
- // src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
12351
- var DEFAULT_FOOTFALL_TILE_ICONS = {
12352
- visitors: "fluent:people-community-16-filled",
12353
- dwell: "clarity:clock-solid",
12354
- headerInfo: "mdi:information-outline"
12355
- };
12412
+ XAxis as XAxis7,
12413
+ YAxis as YAxis7
12414
+ } from "recharts";
12415
+
12416
+ // src/components/charts/StackedComparisonBarChart/stackedComparisonBarChartCustomization.merge.ts
12417
+ function mergeCss7(a, b) {
12418
+ if (!b) {
12419
+ return { ...a };
12420
+ }
12421
+ return { ...a, ...b };
12422
+ }
12423
+ function mergeSx4(...parts) {
12424
+ const flat = parts.filter(Boolean);
12425
+ if (flat.length === 0) {
12426
+ return void 0;
12427
+ }
12428
+ if (flat.length === 1) {
12429
+ return flat[0];
12430
+ }
12431
+ return flat.flat();
12432
+ }
12433
+
12434
+ // src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartCustomizationContext.tsx
12435
+ import * as React24 from "react";
12436
+ import { jsx as jsx45 } from "react/jsx-runtime";
12437
+ var StackedComparisonBarChartCustomizationContext = React24.createContext({});
12438
+ function StackedComparisonBarChartCustomizationProvider({
12439
+ value,
12440
+ children
12441
+ }) {
12442
+ const memo = React24.useMemo(() => value, [value]);
12443
+ return /* @__PURE__ */ jsx45(StackedComparisonBarChartCustomizationContext.Provider, { value: memo, children });
12444
+ }
12445
+ function useStackedComparisonBarChartCustomization() {
12446
+ return React24.useContext(StackedComparisonBarChartCustomizationContext);
12447
+ }
12448
+
12449
+ // src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartTooltip.tsx
12450
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
12451
+ function fmt(n) {
12452
+ return new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(n);
12453
+ }
12454
+ function StackedComparisonBarChartTooltip({
12455
+ active,
12456
+ row,
12457
+ buckets,
12458
+ bucketColors,
12459
+ comparisonColor,
12460
+ stackedTotalLabel,
12461
+ comparisonLabel
12462
+ }) {
12463
+ const { barChart: bc } = useStackedComparisonBarChartCustomization();
12464
+ const tt = bc?.tooltip;
12465
+ if (!active || !row) {
12466
+ return null;
12467
+ }
12468
+ const borderColor = tt?.borderColor ?? "#E5E7EB";
12469
+ const radius = tt?.borderRadiusPx ?? 10;
12470
+ const shadow = tt?.boxShadow ?? "0 8px 24px rgba(15, 23, 42, 0.12)";
12471
+ const bg = tt?.backgroundColor ?? "#FFFFFF";
12472
+ const pad = tt?.paddingPx ?? 14;
12473
+ const bucketNameColor = tt?.bucketNameColor ?? "#0F172A";
12474
+ const bucketValueColor = tt?.bucketValueColor ?? "#0F172A";
12475
+ const totalStackedLabelColor = tt?.totalStackedLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
12476
+ const totalStackedValueColor = tt?.totalStackedValueColor ?? "#1D4ED8";
12477
+ const comparisonLabelColor = tt?.comparisonLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
12478
+ const comparisonValueColor = tt?.comparisonValueColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
12479
+ const dividerColor = tt?.dividerColor ?? "#E5E7EB";
12480
+ const titleColor = tt?.titleColor ?? "#0F172A";
12481
+ const fs = tt?.fontSizePx ?? 13;
12482
+ const titleFs = tt?.titleFontSizePx ?? 15;
12483
+ const titleText = row.subName ? `${row.name} ${row.subName}` : row.name;
12484
+ const orderedBuckets = [...buckets].reverse();
12485
+ const bodyStyle = mergeCss7(
12486
+ {
12487
+ boxSizing: "border-box",
12488
+ backgroundColor: bg,
12489
+ padding: pad,
12490
+ borderRadius: radius,
12491
+ border: `1px solid ${borderColor}`,
12492
+ boxShadow: shadow,
12493
+ minWidth: tt?.minWidthPx ?? 220,
12494
+ ...tt?.maxWidthPx != null ? { maxWidth: tt.maxWidthPx } : null
12495
+ },
12496
+ tt?.bodyStyle
12497
+ );
12498
+ const rowStyle = {
12499
+ display: "flex",
12500
+ alignItems: "center",
12501
+ justifyContent: "space-between",
12502
+ fontSize: fs,
12503
+ lineHeight: 1.4,
12504
+ margin: "4px 0",
12505
+ fontFamily: "inherit"
12506
+ };
12507
+ const swatch = (color) => ({
12508
+ width: 10,
12509
+ height: 10,
12510
+ borderRadius: "50%",
12511
+ backgroundColor: color,
12512
+ flexShrink: 0,
12513
+ display: "inline-block",
12514
+ marginRight: 8
12515
+ });
12516
+ return /* @__PURE__ */ jsx46("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsxs36("div", { style: bodyStyle, children: [
12517
+ /* @__PURE__ */ jsx46(
12518
+ "div",
12519
+ {
12520
+ style: {
12521
+ fontSize: titleFs,
12522
+ fontWeight: 700,
12523
+ color: titleColor,
12524
+ marginBottom: 8
12525
+ },
12526
+ children: titleText
12527
+ }
12528
+ ),
12529
+ orderedBuckets.map((b, i) => {
12530
+ const originalIndex = buckets.length - 1 - i;
12531
+ const color = b.color ?? bucketColors[originalIndex] ?? "#94A3B8";
12532
+ const v = row.stacked[b.id] ?? 0;
12533
+ return /* @__PURE__ */ jsxs36("div", { style: rowStyle, children: [
12534
+ /* @__PURE__ */ jsxs36(
12535
+ "span",
12536
+ {
12537
+ style: {
12538
+ display: "flex",
12539
+ alignItems: "center",
12540
+ color: bucketNameColor,
12541
+ fontWeight: 500
12542
+ },
12543
+ children: [
12544
+ /* @__PURE__ */ jsx46("span", { style: swatch(color), "aria-hidden": true }),
12545
+ b.label
12546
+ ]
12547
+ }
12548
+ ),
12549
+ /* @__PURE__ */ jsx46("span", { style: { color: bucketValueColor, fontWeight: 700 }, children: fmt(v) })
12550
+ ] }, b.id);
12551
+ }),
12552
+ /* @__PURE__ */ jsx46(
12553
+ "div",
12554
+ {
12555
+ style: {
12556
+ height: 1,
12557
+ background: dividerColor,
12558
+ margin: "10px 0 8px"
12559
+ }
12560
+ }
12561
+ ),
12562
+ /* @__PURE__ */ jsxs36("div", { style: { ...rowStyle, margin: "2px 0" }, children: [
12563
+ /* @__PURE__ */ jsx46("span", { style: { color: totalStackedLabelColor, fontWeight: 700 }, children: stackedTotalLabel }),
12564
+ /* @__PURE__ */ jsx46("span", { style: { color: totalStackedValueColor, fontWeight: 700 }, children: fmt(buckets.reduce((acc, b) => acc + (row.stacked[b.id] ?? 0), 0)) })
12565
+ ] }),
12566
+ /* @__PURE__ */ jsxs36("div", { style: { ...rowStyle, margin: "6px 0 0" }, children: [
12567
+ /* @__PURE__ */ jsxs36(
12568
+ "span",
12569
+ {
12570
+ style: {
12571
+ display: "flex",
12572
+ alignItems: "center",
12573
+ color: comparisonLabelColor,
12574
+ fontWeight: 600
12575
+ },
12576
+ children: [
12577
+ /* @__PURE__ */ jsx46("span", { style: swatch(comparisonColor), "aria-hidden": true }),
12578
+ comparisonLabel
12579
+ ]
12580
+ }
12581
+ ),
12582
+ /* @__PURE__ */ jsx46("span", { style: { color: comparisonValueColor, fontWeight: 700 }, children: fmt(row.comparison) })
12583
+ ] })
12584
+ ] }) });
12585
+ }
12586
+
12587
+ // src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
12588
+ import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
12589
+ var DEFAULT_AXIS_TICK_FILL = "#9CA3AF";
12590
+ var DEFAULT_GRID_STROKE = "#EEF0F3";
12591
+ var STACK_KEY = (id) => `stack__${id}`;
12592
+ var COMPARISON_KEY = "__comparison";
12593
+ function SortIcon({ color }) {
12594
+ return /* @__PURE__ */ jsxs37(
12595
+ "svg",
12596
+ {
12597
+ width: "14",
12598
+ height: "14",
12599
+ viewBox: "0 0 14 14",
12600
+ fill: "none",
12601
+ xmlns: "http://www.w3.org/2000/svg",
12602
+ "aria-hidden": true,
12603
+ children: [
12604
+ /* @__PURE__ */ jsx47(
12605
+ "path",
12606
+ {
12607
+ d: "M4 2.5V11.5M4 11.5L1.5 9M4 11.5L6.5 9",
12608
+ stroke: color,
12609
+ strokeWidth: "1.4",
12610
+ strokeLinecap: "round",
12611
+ strokeLinejoin: "round"
12612
+ }
12613
+ ),
12614
+ /* @__PURE__ */ jsx47(
12615
+ "path",
12616
+ {
12617
+ d: "M10 11.5V2.5M10 2.5L7.5 5M10 2.5L12.5 5",
12618
+ stroke: color,
12619
+ strokeWidth: "1.4",
12620
+ strokeLinecap: "round",
12621
+ strokeLinejoin: "round"
12622
+ }
12623
+ )
12624
+ ]
12625
+ }
12626
+ );
12627
+ }
12628
+ function LegendDot({
12629
+ color,
12630
+ sizePx = 10
12631
+ }) {
12632
+ return /* @__PURE__ */ jsx47(
12633
+ Box31,
12634
+ {
12635
+ sx: {
12636
+ width: sizePx,
12637
+ height: sizePx,
12638
+ borderRadius: "50%",
12639
+ bgcolor: color,
12640
+ flexShrink: 0
12641
+ }
12642
+ }
12643
+ );
12644
+ }
12645
+ function MultilineTick(props) {
12646
+ const {
12647
+ x = 0,
12648
+ y = 0,
12649
+ payload,
12650
+ fill = DEFAULT_AXIS_TICK_FILL,
12651
+ fontSize = 12,
12652
+ rowsByName,
12653
+ angle = 0,
12654
+ textAnchor = "middle"
12655
+ } = props;
12656
+ const name = payload?.value ?? "";
12657
+ if (!name) return null;
12658
+ const row = rowsByName ? rowsByName[name] : void 0;
12659
+ const subName = row?.subName;
12660
+ const lines = [];
12661
+ String(name).split("\n").forEach((s) => lines.push(s));
12662
+ if (subName) {
12663
+ String(subName).split("\n").forEach((s) => lines.push(s));
12664
+ }
12665
+ const lineHeight = fontSize * 1.25;
12666
+ const isHorizontal = angle === 0;
12667
+ const anchor = isHorizontal ? "middle" : textAnchor;
12668
+ const dy0 = isHorizontal ? lineHeight : 4;
12669
+ return /* @__PURE__ */ jsx47("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx47(
12670
+ "text",
12671
+ {
12672
+ transform: angle !== 0 ? `rotate(${angle})` : void 0,
12673
+ textAnchor: anchor,
12674
+ fontSize,
12675
+ fill,
12676
+ children: lines.map((line, i) => /* @__PURE__ */ jsx47("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
12677
+ }
12678
+ ) });
12679
+ }
12680
+ function BarPlot({
12681
+ data,
12682
+ buckets,
12683
+ bucketColors,
12684
+ comparisonColor,
12685
+ rowsByName,
12686
+ yAxisDomain,
12687
+ yAxisTicks,
12688
+ yAxisTickFormatter,
12689
+ stackedTotalLabel,
12690
+ comparisonLabel,
12691
+ renderTooltip,
12692
+ enableHorizontalScroll,
12693
+ chartMinWidth,
12694
+ categoryWidthPx
12695
+ }) {
12696
+ const { barChart: bc } = useStackedComparisonBarChartCustomization();
12697
+ const height = bc?.heightPx ?? 360;
12698
+ const stackedSize = bc?.stackedBarSizePx ?? 22;
12699
+ const comparisonSize = bc?.comparisonBarSizePx ?? 18;
12700
+ const barCategoryGap = bc?.barCategoryGapPx ?? 20;
12701
+ const barGap = bc?.barGap ?? 2;
12702
+ const barTopRadius = bc?.barTopRadiusPx ?? 3;
12703
+ const m = {
12704
+ top: bc?.margin?.top ?? 16,
12705
+ right: bc?.margin?.right ?? 8,
12706
+ bottom: bc?.margin?.bottom ?? 28,
12707
+ left: bc?.margin?.left ?? 4
12708
+ };
12709
+ const gridStroke = bc?.gridStroke ?? DEFAULT_GRID_STROKE;
12710
+ const dash = bc?.gridStrokeDasharray ?? "0";
12711
+ const xFill = bc?.xAxisTickFill ?? "#6B7280";
12712
+ const xTickAngle = bc?.xAxisTickAngle ?? 0;
12713
+ const xTickAnchor = bc?.xAxisTickAnchor ?? "end";
12714
+ const xAxisHeight = bc?.xAxisHeight ?? 50;
12715
+ const yFill = bc?.yAxisTickFill ?? DEFAULT_AXIS_TICK_FILL;
12716
+ const yWidth = bc?.yAxisWidth ?? 44;
12717
+ const cursorFill = bc?.cursorFill ?? "rgba(15, 23, 42, 0.04)";
12718
+ const defaultFmt = React25.useCallback(
12719
+ (v) => v >= 1e3 ? `${(v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1)}k` : `${v}`,
12720
+ []
12721
+ );
12722
+ const tickFmt = yAxisTickFormatter ?? defaultFmt;
12723
+ const resolvedCategoryWidth = categoryWidthPx ?? 90;
12724
+ const innerMinWidth = chartMinWidth ?? resolvedCategoryWidth * Math.max(data.length, 1);
12725
+ const outerSx = enableHorizontalScroll ? {
12726
+ width: "100%",
12727
+ height,
12728
+ mt: 0.5,
12729
+ overflowX: "auto",
12730
+ overflowY: "hidden"
12731
+ } : { width: "100%", height, mt: 0.5 };
12732
+ const innerSx = enableHorizontalScroll ? { width: "100%", height: "100%", minWidth: innerMinWidth } : { width: "100%", height: "100%" };
12733
+ return /* @__PURE__ */ jsx47(Box31, { sx: outerSx, children: /* @__PURE__ */ jsx47(Box31, { sx: innerSx, children: /* @__PURE__ */ jsx47(ResponsiveContainer5, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs37(
12734
+ BarChart3,
12735
+ {
12736
+ data,
12737
+ margin: m,
12738
+ barCategoryGap,
12739
+ barGap,
12740
+ children: [
12741
+ /* @__PURE__ */ jsx47(
12742
+ CartesianGrid7,
12743
+ {
12744
+ strokeDasharray: dash,
12745
+ vertical: false,
12746
+ stroke: gridStroke
12747
+ }
12748
+ ),
12749
+ /* @__PURE__ */ jsx47(
12750
+ XAxis7,
12751
+ {
12752
+ dataKey: "__name",
12753
+ tick: /* @__PURE__ */ jsx47(
12754
+ MultilineTick,
12755
+ {
12756
+ fill: xFill,
12757
+ fontSize: 12,
12758
+ rowsByName,
12759
+ angle: xTickAngle,
12760
+ textAnchor: xTickAnchor
12761
+ }
12762
+ ),
12763
+ tickLine: false,
12764
+ axisLine: { stroke: gridStroke },
12765
+ interval: 0,
12766
+ height: xAxisHeight
12767
+ }
12768
+ ),
12769
+ /* @__PURE__ */ jsx47(
12770
+ YAxis7,
12771
+ {
12772
+ domain: yAxisDomain,
12773
+ ticks: yAxisTicks,
12774
+ tick: { fill: yFill, fontSize: 11 },
12775
+ tickLine: false,
12776
+ axisLine: false,
12777
+ width: yWidth,
12778
+ tickFormatter: tickFmt
12779
+ }
12780
+ ),
12781
+ /* @__PURE__ */ jsx47(
12782
+ Tooltip12,
12783
+ {
12784
+ content: (tooltipProps) => {
12785
+ const label = tooltipProps.label;
12786
+ const labelStr = typeof label === "string" ? label : String(label ?? "");
12787
+ const row = rowsByName[labelStr] ?? null;
12788
+ if (renderTooltip) {
12789
+ const custom = renderTooltip({
12790
+ tooltipProps,
12791
+ row,
12792
+ buckets,
12793
+ bucketColors,
12794
+ comparisonColor
12795
+ });
12796
+ return custom == null ? null : /* @__PURE__ */ jsx47(Fragment16, { children: custom });
12797
+ }
12798
+ return /* @__PURE__ */ jsx47(
12799
+ StackedComparisonBarChartTooltip,
12800
+ {
12801
+ ...tooltipProps,
12802
+ row,
12803
+ buckets,
12804
+ bucketColors,
12805
+ comparisonColor,
12806
+ stackedTotalLabel,
12807
+ comparisonLabel
12808
+ }
12809
+ );
12810
+ },
12811
+ cursor: { fill: cursorFill },
12812
+ allowEscapeViewBox: { x: false, y: true }
12813
+ }
12814
+ ),
12815
+ buckets.map((b, i) => {
12816
+ const color = b.color ?? bucketColors[i] ?? "#94A3B8";
12817
+ const isTop = i === buckets.length - 1;
12818
+ const radius = isTop ? [barTopRadius, barTopRadius, 0, 0] : [0, 0, 0, 0];
12819
+ return /* @__PURE__ */ jsx47(
12820
+ Bar5,
12821
+ {
12822
+ dataKey: STACK_KEY(b.id),
12823
+ name: b.label,
12824
+ stackId: "stacked",
12825
+ fill: color,
12826
+ barSize: stackedSize,
12827
+ isAnimationActive: false,
12828
+ radius
12829
+ },
12830
+ b.id
12831
+ );
12832
+ }),
12833
+ /* @__PURE__ */ jsx47(
12834
+ Bar5,
12835
+ {
12836
+ dataKey: COMPARISON_KEY,
12837
+ name: comparisonLabel,
12838
+ stackId: "comparison",
12839
+ fill: comparisonColor,
12840
+ barSize: comparisonSize,
12841
+ isAnimationActive: false,
12842
+ radius: [barTopRadius, barTopRadius, 0, 0]
12843
+ }
12844
+ )
12845
+ ]
12846
+ }
12847
+ ) }) }) });
12848
+ }
12849
+ function StackedComparisonBarChart({
12850
+ subHeading,
12851
+ showSortToggle = true,
12852
+ onSortToggle,
12853
+ showSubHeadingDivider = true,
12854
+ showHeaderLegend = true,
12855
+ enableHorizontalScroll = false,
12856
+ chartMinWidth,
12857
+ categoryWidthPx,
12858
+ buckets,
12859
+ data,
12860
+ stackedLegendLabel = "Stacked",
12861
+ comparisonLegendLabel = "Comparison",
12862
+ stackedTotalLabel,
12863
+ yAxisDomain,
12864
+ yAxisTicks,
12865
+ yAxisTickFormatter,
12866
+ renderTooltip,
12867
+ emptyStatePlaceholderProps,
12868
+ customization
12869
+ }) {
12870
+ const bucketColors = customization?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
12871
+ const comparisonColor = customization?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
12872
+ const legendStackDot = customization?.header?.legendStackColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
12873
+ const legendComparisonDot = customization?.header?.legendComparisonColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
12874
+ const legendDividerColor = customization?.header?.legendDividerColor ?? "#E5E7EB";
12875
+ const legendDotSize = customization?.header?.legendDotSizePx ?? 10;
12876
+ const frameBorder = customization?.frame?.borderColor ?? STACKED_COMPARISON_DEFAULT_FRAME_BORDER;
12877
+ const frameBg = customization?.frame?.backgroundColor ?? "#FFFFFF";
12878
+ const rowsByName = React25.useMemo(() => {
12879
+ const r = {};
12880
+ for (const row of data) r[row.name] = row;
12881
+ return r;
12882
+ }, [data]);
12883
+ const chartData = React25.useMemo(() => {
12884
+ return data.map((row) => {
12885
+ const d = {
12886
+ __key: row.name,
12887
+ __name: row.name,
12888
+ __subName: row.subName,
12889
+ __row: row,
12890
+ [COMPARISON_KEY]: row.comparison
12891
+ };
12892
+ for (const b of buckets) {
12893
+ d[STACK_KEY(b.id)] = row.stacked[b.id] ?? 0;
12894
+ }
12895
+ return d;
12896
+ });
12897
+ }, [data, buckets]);
12898
+ const subHeadingSx = mergeSx4(
12899
+ {
12900
+ fontWeight: 700,
12901
+ fontSize: "0.95rem",
12902
+ color: "#0f172a"
12903
+ },
12904
+ customization?.header?.subHeadingSx
12905
+ );
12906
+ const frameSx = mergeSx4(
12907
+ {
12908
+ bgcolor: frameBg,
12909
+ border: `1px solid ${frameBorder}`,
12910
+ borderRadius: 2,
12911
+ px: 2,
12912
+ pt: 2,
12913
+ pb: 1.5,
12914
+ width: "100%",
12915
+ boxSizing: "border-box"
12916
+ },
12917
+ customization?.frame?.sx
12918
+ );
12919
+ const subHeadingDividerColor = customization?.frame?.subHeadingDividerColor ?? "#C7C9D9";
12920
+ const subHeadingDividerSx = mergeSx4(
12921
+ {
12922
+ height: "1px",
12923
+ width: "100%",
12924
+ bgcolor: subHeadingDividerColor,
12925
+ mb: 1.5
12926
+ },
12927
+ customization?.frame?.subHeadingDividerSx
12928
+ );
12929
+ const legendSx = mergeSx4({ flexShrink: 0 }, customization?.header?.legendSx);
12930
+ const showSubHeadingRow = Boolean(subHeading) || showSortToggle || showHeaderLegend;
12931
+ const resolvedStackedTotal = stackedTotalLabel ?? `Total ${stackedLegendLabel}`;
12932
+ if (chartData.length === 0) {
12933
+ return /* @__PURE__ */ jsx47(ChartEmptyState, { minHeight: 360, ...emptyStatePlaceholderProps });
12934
+ }
12935
+ return /* @__PURE__ */ jsx47(StackedComparisonBarChartCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsxs37(Box31, { sx: frameSx, children: [
12936
+ showSubHeadingRow ? /* @__PURE__ */ jsxs37(
12937
+ Stack25,
12938
+ {
12939
+ direction: "row",
12940
+ alignItems: "center",
12941
+ justifyContent: "space-between",
12942
+ gap: 2,
12943
+ flexWrap: "wrap",
12944
+ sx: { mb: 1 },
12945
+ children: [
12946
+ /* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 1, children: [
12947
+ subHeading ? /* @__PURE__ */ jsx47(Typography26, { sx: subHeadingSx, children: subHeading }) : /* @__PURE__ */ jsx47("span", {}),
12948
+ showSortToggle ? /* @__PURE__ */ jsx47(
12949
+ ButtonBase2,
12950
+ {
12951
+ onClick: onSortToggle,
12952
+ disableRipple: !onSortToggle,
12953
+ sx: mergeSx4(
12954
+ {
12955
+ width: 26,
12956
+ height: 26,
12957
+ borderRadius: 1,
12958
+ bgcolor: "#EEF2FF",
12959
+ color: "#5B6DEC",
12960
+ display: "inline-flex",
12961
+ alignItems: "center",
12962
+ justifyContent: "center",
12963
+ cursor: onSortToggle ? "pointer" : "default",
12964
+ "&:hover": onSortToggle ? { bgcolor: "#E0E7FF" } : void 0
12965
+ },
12966
+ customization?.header?.sortButtonSx
12967
+ ),
12968
+ "aria-label": "Toggle sort order",
12969
+ children: /* @__PURE__ */ jsx47(SortIcon, { color: "#5B6DEC" })
12970
+ }
12971
+ ) : null
12972
+ ] }),
12973
+ showHeaderLegend ? /* @__PURE__ */ jsxs37(
12974
+ Stack25,
12975
+ {
12976
+ direction: "row",
12977
+ alignItems: "center",
12978
+ spacing: 1.5,
12979
+ sx: legendSx,
12980
+ children: [
12981
+ /* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 0.75, children: [
12982
+ /* @__PURE__ */ jsx47(LegendDot, { color: legendStackDot, sizePx: legendDotSize }),
12983
+ /* @__PURE__ */ jsx47(
12984
+ Typography26,
12985
+ {
12986
+ sx: mergeSx4(
12987
+ {
12988
+ fontWeight: 700,
12989
+ fontSize: "0.85rem",
12990
+ color: legendStackDot
12991
+ },
12992
+ customization?.header?.legendLabelSx
12993
+ ),
12994
+ children: stackedLegendLabel
12995
+ }
12996
+ )
12997
+ ] }),
12998
+ /* @__PURE__ */ jsx47(
12999
+ Box31,
13000
+ {
13001
+ sx: {
13002
+ width: "1px",
13003
+ height: 18,
13004
+ bgcolor: legendDividerColor
13005
+ }
13006
+ }
13007
+ ),
13008
+ /* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 0.75, children: [
13009
+ /* @__PURE__ */ jsx47(
13010
+ LegendDot,
13011
+ {
13012
+ color: legendComparisonDot,
13013
+ sizePx: legendDotSize
13014
+ }
13015
+ ),
13016
+ /* @__PURE__ */ jsx47(
13017
+ Typography26,
13018
+ {
13019
+ sx: mergeSx4(
13020
+ {
13021
+ fontWeight: 700,
13022
+ fontSize: "0.85rem",
13023
+ color: legendComparisonDot
13024
+ },
13025
+ customization?.header?.legendLabelSx
13026
+ ),
13027
+ children: comparisonLegendLabel
13028
+ }
13029
+ )
13030
+ ] })
13031
+ ]
13032
+ }
13033
+ ) : null
13034
+ ]
13035
+ }
13036
+ ) : null,
13037
+ showSubHeadingDivider ? /* @__PURE__ */ jsx47(Box31, { sx: subHeadingDividerSx }) : null,
13038
+ /* @__PURE__ */ jsx47(
13039
+ BarPlot,
13040
+ {
13041
+ data: chartData,
13042
+ buckets,
13043
+ bucketColors,
13044
+ comparisonColor,
13045
+ rowsByName,
13046
+ yAxisDomain,
13047
+ yAxisTicks,
13048
+ yAxisTickFormatter,
13049
+ stackedTotalLabel: resolvedStackedTotal,
13050
+ comparisonLabel: comparisonLegendLabel,
13051
+ renderTooltip,
13052
+ enableHorizontalScroll,
13053
+ chartMinWidth,
13054
+ categoryWidthPx
13055
+ }
13056
+ )
13057
+ ] }) });
13058
+ }
13059
+
13060
+ // src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.defaultInfoPopover.ts
13061
+ var DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER = {
13062
+ title: "Store Performance by Assist",
13063
+ description: "Per-store breakdown of attended customers split by attend-duration buckets, alongside the unattended count.",
13064
+ helpBullets: [
13065
+ "Compare attended vs unattended customer volume by store.",
13066
+ "Identify stores with high unattended counts that need staffing.",
13067
+ "See how attended customers split across 0-10 sec, 11-30 sec, 31-59 sec, and 1-2 min buckets."
13068
+ ]
13069
+ };
13070
+
13071
+ // src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.mock.ts
13072
+ var STORE_PERFORMANCE_DEFAULT_BUCKETS = [
13073
+ { id: "0-10", label: "0-10sec" },
13074
+ { id: "11-30", label: "11-30sec" },
13075
+ { id: "31-59", label: "31-59sec" },
13076
+ { id: "1-2", label: "1-2min" }
13077
+ ];
13078
+ var STORE_PERFORMANCE_DEFAULT_DATA = [
13079
+ {
13080
+ name: "Lake Mall",
13081
+ subName: "Kolkata",
13082
+ stacked: { "0-10": 1100, "11-30": 1100, "31-59": 1500, "1-2": 3e3 },
13083
+ comparison: 700
13084
+ },
13085
+ {
13086
+ name: "V3s",
13087
+ subName: "Delhi",
13088
+ stacked: { "0-10": 1e3, "11-30": 1100, "31-59": 1450, "1-2": 2900 },
13089
+ comparison: 620
13090
+ },
13091
+ {
13092
+ name: "Forum Mall",
13093
+ subName: "Bangalore",
13094
+ stacked: { "0-10": 750, "11-30": 800, "31-59": 1450, "1-2": 2050 },
13095
+ comparison: 520
13096
+ },
13097
+ {
13098
+ name: "Phoenix",
13099
+ subName: "Mumbai",
13100
+ stacked: { "0-10": 600, "11-30": 700, "31-59": 1450, "1-2": 1500 },
13101
+ comparison: 470
13102
+ },
13103
+ {
13104
+ name: "DB City",
13105
+ subName: "Bhopal",
13106
+ stacked: { "0-10": 400, "11-30": 600, "31-59": 950, "1-2": 1550 },
13107
+ comparison: 580
13108
+ },
13109
+ {
13110
+ name: "DLF",
13111
+ subName: "Gurgaon",
13112
+ stacked: { "0-10": 225, "11-30": 300, "31-59": 375, "1-2": 600 },
13113
+ comparison: 190
13114
+ },
13115
+ {
13116
+ name: "Highway",
13117
+ subName: "Chennai",
13118
+ stacked: { "0-10": 200, "11-30": 250, "31-59": 350, "1-2": 850 },
13119
+ comparison: 140
13120
+ },
13121
+ {
13122
+ name: "Elante",
13123
+ subName: "Chandigarh",
13124
+ stacked: { "0-10": 150, "11-30": 200, "31-59": 250, "1-2": 600 },
13125
+ comparison: 100
13126
+ }
13127
+ ];
13128
+
13129
+ // src/components/widgets/StorePerformanceByAssist/StorePerformanceByAssist.tsx
13130
+ import Box32 from "@mui/material/Box";
13131
+ import Card4 from "@mui/material/Card";
13132
+ import CardContent3 from "@mui/material/CardContent";
13133
+ import Stack26 from "@mui/material/Stack";
13134
+ import Typography27 from "@mui/material/Typography";
13135
+ import { Fragment as Fragment17, jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
13136
+ function LegendSquare({
13137
+ color,
13138
+ size = 12
13139
+ }) {
13140
+ return /* @__PURE__ */ jsx48(
13141
+ Box32,
13142
+ {
13143
+ sx: {
13144
+ width: size,
13145
+ height: size,
13146
+ borderRadius: 0.5,
13147
+ bgcolor: color,
13148
+ flexShrink: 0
13149
+ }
13150
+ }
13151
+ );
13152
+ }
13153
+ function StorePerformanceByAssist({
13154
+ title,
13155
+ width,
13156
+ maxWidth,
13157
+ minWidth,
13158
+ subHeading = "Stores (Top to Bottom)",
13159
+ showSortToggle = true,
13160
+ onSortToggle,
13161
+ showSubHeadingDivider = true,
13162
+ showHeaderLegend = true,
13163
+ enableHorizontalScroll = false,
13164
+ chartMinWidth,
13165
+ categoryWidthPx,
13166
+ buckets,
13167
+ data,
13168
+ attendedLegendLabel = "Attended",
13169
+ unattendedLegendLabel = "Unattended",
13170
+ unattendedBottomLegendLabel = "Unattended Customers",
13171
+ yAxisDomain,
13172
+ yAxisTicks,
13173
+ yAxisTickFormatter,
13174
+ infoPopover = null,
13175
+ renderTooltip,
13176
+ emptyStatePlaceholderProps,
13177
+ customization
13178
+ }) {
13179
+ const bucketColors = customization?.chart?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
13180
+ const comparisonColor = customization?.chart?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
13181
+ const bottomLegendColor = customization?.bottomLegend?.labelColor ?? "#6B7280";
13182
+ const bottomLegendFs = customization?.bottomLegend?.fontSizePx ?? 12;
13183
+ const bottomLegendDividerColor = customization?.bottomLegend?.dividerColor ?? "#E5E7EB";
13184
+ const bottomSwatch = customization?.bottomLegend?.swatchSizePx ?? 12;
13185
+ const resolvedInfo = infoPopover === void 0 ? DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER : infoPopover;
13186
+ const rootSx = mergeSx4(
13187
+ {
13188
+ bgcolor: "#FFFFFF",
13189
+ borderRadius: 2,
13190
+ boxShadow: "0 1px 3px rgba(15, 23, 42, 0.08)",
13191
+ ...width !== void 0 ? { width } : null,
13192
+ ...maxWidth !== void 0 ? { maxWidth } : null,
13193
+ ...minWidth !== void 0 ? { minWidth } : null
13194
+ },
13195
+ customization?.rootCard?.sx
13196
+ );
13197
+ const titleSx = mergeSx4(
13198
+ {
13199
+ fontWeight: 700,
13200
+ fontSize: { xs: "1rem", sm: "1.05rem" },
13201
+ color: "#0f172a"
13202
+ },
13203
+ customization?.header?.titleSx
13204
+ );
13205
+ const bottomLegendSx = mergeSx4(
13206
+ {
13207
+ display: "flex",
13208
+ flexWrap: "wrap",
13209
+ alignItems: "center",
13210
+ rowGap: 1,
13211
+ mt: 1.5,
13212
+ px: 0.5
13213
+ },
13214
+ customization?.bottomLegend?.sx
13215
+ );
13216
+ const showOuterHeader = Boolean(title) || Boolean(resolvedInfo);
13217
+ const hasData = data.length > 0;
13218
+ return /* @__PURE__ */ jsx48(Card4, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ jsx48(CardContent3, { children: /* @__PURE__ */ jsxs38(Stack26, { spacing: 1.5, sx: { width: "100%" }, children: [
13219
+ showOuterHeader ? /* @__PURE__ */ jsxs38(
13220
+ Stack26,
13221
+ {
13222
+ direction: "row",
13223
+ alignItems: "center",
13224
+ justifyContent: "space-between",
13225
+ gap: 2,
13226
+ flexWrap: "wrap",
13227
+ children: [
13228
+ title ? /* @__PURE__ */ jsx48(Typography27, { sx: titleSx, children: title }) : /* @__PURE__ */ jsx48("span", {}),
13229
+ /* @__PURE__ */ jsx48(
13230
+ Stack26,
13231
+ {
13232
+ direction: "row",
13233
+ alignItems: "center",
13234
+ spacing: 1.5,
13235
+ sx: { flexShrink: 0 },
13236
+ children: resolvedInfo ? /* @__PURE__ */ jsxs38(Fragment17, { children: [
13237
+ /* @__PURE__ */ jsx48(ChartWidgetHeaderSeparator, {}),
13238
+ /* @__PURE__ */ jsx48(
13239
+ ChartWidgetInfoButton,
13240
+ {
13241
+ popover: resolvedInfo,
13242
+ ariaLabel: "Store performance by assist information"
13243
+ }
13244
+ )
13245
+ ] }) : null
13246
+ }
13247
+ )
13248
+ ]
13249
+ }
13250
+ ) : null,
13251
+ /* @__PURE__ */ jsx48(
13252
+ StackedComparisonBarChart,
13253
+ {
13254
+ subHeading,
13255
+ showSortToggle,
13256
+ onSortToggle,
13257
+ showSubHeadingDivider,
13258
+ showHeaderLegend,
13259
+ enableHorizontalScroll,
13260
+ chartMinWidth,
13261
+ categoryWidthPx,
13262
+ buckets,
13263
+ data,
13264
+ stackedLegendLabel: attendedLegendLabel,
13265
+ comparisonLegendLabel: unattendedLegendLabel,
13266
+ yAxisDomain,
13267
+ yAxisTicks,
13268
+ yAxisTickFormatter,
13269
+ renderTooltip,
13270
+ emptyStatePlaceholderProps,
13271
+ customization: customization?.chart
13272
+ }
13273
+ ),
13274
+ hasData ? /* @__PURE__ */ jsxs38(Box32, { sx: bottomLegendSx, children: [
13275
+ buckets.map((b, i) => {
13276
+ const color = b.color ?? bucketColors[i] ?? "#94A3B8";
13277
+ return /* @__PURE__ */ jsxs38(
13278
+ Stack26,
13279
+ {
13280
+ direction: "row",
13281
+ alignItems: "center",
13282
+ spacing: 0.75,
13283
+ sx: { mr: 2 },
13284
+ children: [
13285
+ /* @__PURE__ */ jsx48(LegendSquare, { color, size: bottomSwatch }),
13286
+ /* @__PURE__ */ jsx48(
13287
+ Typography27,
13288
+ {
13289
+ sx: {
13290
+ fontSize: bottomLegendFs,
13291
+ color: bottomLegendColor,
13292
+ fontWeight: 500
13293
+ },
13294
+ children: b.label
13295
+ }
13296
+ )
13297
+ ]
13298
+ },
13299
+ b.id
13300
+ );
13301
+ }),
13302
+ /* @__PURE__ */ jsx48(
13303
+ Box32,
13304
+ {
13305
+ sx: {
13306
+ width: "1px",
13307
+ height: 14,
13308
+ bgcolor: bottomLegendDividerColor,
13309
+ mx: 1
13310
+ }
13311
+ }
13312
+ ),
13313
+ /* @__PURE__ */ jsxs38(
13314
+ Stack26,
13315
+ {
13316
+ direction: "row",
13317
+ alignItems: "center",
13318
+ spacing: 0.75,
13319
+ sx: { mr: 2 },
13320
+ children: [
13321
+ /* @__PURE__ */ jsx48(LegendSquare, { color: comparisonColor, size: bottomSwatch }),
13322
+ /* @__PURE__ */ jsx48(
13323
+ Typography27,
13324
+ {
13325
+ sx: {
13326
+ fontSize: bottomLegendFs,
13327
+ color: bottomLegendColor,
13328
+ fontWeight: 500
13329
+ },
13330
+ children: unattendedBottomLegendLabel
13331
+ }
13332
+ )
13333
+ ]
13334
+ }
13335
+ )
13336
+ ] }) : null
13337
+ ] }) }) });
13338
+ }
13339
+
13340
+ // src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
13341
+ import { Icon as Icon13 } from "@iconify/react";
13342
+ import {
13343
+ Box as Box33,
13344
+ Button as Button8,
13345
+ IconButton as IconButton5,
13346
+ Paper as Paper5,
13347
+ Skeleton as Skeleton7,
13348
+ Stack as Stack27,
13349
+ Tooltip as Tooltip13,
13350
+ Typography as Typography28
13351
+ } from "@mui/material";
13352
+ import * as React26 from "react";
13353
+ import { useEffect as useEffect3, useMemo as useMemo21, useState as useState17 } from "react";
13354
+ import { ResponsiveContainer as ResponsiveContainer6, Treemap } from "recharts";
13355
+
13356
+ // src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
13357
+ var DEFAULT_FOOTFALL_TILE_ICONS = {
13358
+ visitors: "fluent:people-community-16-filled",
13359
+ dwell: "clarity:clock-solid",
13360
+ headerInfo: "mdi:information-outline"
13361
+ };
12356
13362
 
12357
13363
  // src/components/widgets/FootFallHeatMap/footfallHeatMapDerivedStrip.ts
12358
13364
  var ZONE_SEGMENT_COLORS = [
@@ -12405,7 +13411,8 @@ function rowFromHeuristicLabel(zoneName, total) {
12405
13411
  }));
12406
13412
  return { id, label: zoneName, value: a + b + c + d, segments };
12407
13413
  }
12408
- function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
13414
+ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow, options) {
13415
+ const includeZeroValueRows = options?.includeZeroValueRows ?? false;
12409
13416
  const buildRow = (node, role, total, fallback) => {
12410
13417
  if (buildBarRow) {
12411
13418
  const custom = buildBarRow({ node, activeZone, role, total });
@@ -12415,7 +13422,7 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
12415
13422
  };
12416
13423
  if (activeZone) {
12417
13424
  const childRowsSource = (activeZone.list ?? []).filter(
12418
- (n) => parseVisitorCount(n.overallData?.count) > 0
13425
+ (n) => includeZeroValueRows ? true : parseVisitorCount(n.overallData?.count) > 0
12419
13426
  );
12420
13427
  if (childRowsSource.length > 0) {
12421
13428
  const items = childRowsSource.map((node) => {
@@ -12768,7 +13775,7 @@ function getNestedList(payload) {
12768
13775
  }
12769
13776
 
12770
13777
  // src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
12771
- import { Fragment as Fragment17, jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
13778
+ import { Fragment as Fragment19, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
12772
13779
  function toDisplayNumber(value) {
12773
13780
  if (!Number.isFinite(value)) return "0";
12774
13781
  return new Intl.NumberFormat("en-IN").format(value);
@@ -12787,7 +13794,7 @@ function InlineStatCard({
12787
13794
  sx,
12788
13795
  iconColor = "#1565C0"
12789
13796
  }) {
12790
- return /* @__PURE__ */ jsx45(
13797
+ return /* @__PURE__ */ jsx49(
12791
13798
  Paper5,
12792
13799
  {
12793
13800
  elevation: 0,
@@ -12803,8 +13810,8 @@ function InlineStatCard({
12803
13810
  },
12804
13811
  ...sx ? [sx] : []
12805
13812
  ],
12806
- children: /* @__PURE__ */ jsxs36(Stack25, { direction: "row", alignItems: "center", spacing: 1.5, children: [
12807
- /* @__PURE__ */ jsx45(
13813
+ children: /* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", spacing: 1.5, children: [
13814
+ /* @__PURE__ */ jsx49(
12808
13815
  Icon13,
12809
13816
  {
12810
13817
  icon,
@@ -12814,17 +13821,17 @@ function InlineStatCard({
12814
13821
  style: { flexShrink: 0 }
12815
13822
  }
12816
13823
  ),
12817
- /* @__PURE__ */ jsxs36(Stack25, { spacing: 0.15, children: [
12818
- /* @__PURE__ */ jsx45(
12819
- Typography26,
13824
+ /* @__PURE__ */ jsxs39(Stack27, { spacing: 0.15, children: [
13825
+ /* @__PURE__ */ jsx49(
13826
+ Typography28,
12820
13827
  {
12821
13828
  variant: "body2",
12822
13829
  sx: { fontWeight: 500, color: "text.primary" },
12823
13830
  children: title
12824
13831
  }
12825
13832
  ),
12826
- /* @__PURE__ */ jsx45(
12827
- Typography26,
13833
+ /* @__PURE__ */ jsx49(
13834
+ Typography28,
12828
13835
  {
12829
13836
  variant: "h6",
12830
13837
  sx: { lineHeight: 1.1, fontWeight: 700, color: "text.primary" },
@@ -12853,17 +13860,17 @@ function InlineSegmentStrip({
12853
13860
  const barHeight = presentation?.barHeight ?? 12;
12854
13861
  const trackInsetPx = presentation?.trackInsetPx ?? 3;
12855
13862
  const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
12856
- return /* @__PURE__ */ jsxs36(Stack25, { spacing: 0.75, children: [
12857
- /* @__PURE__ */ jsxs36(
12858
- Stack25,
13863
+ return /* @__PURE__ */ jsxs39(Stack27, { spacing: 0.75, children: [
13864
+ /* @__PURE__ */ jsxs39(
13865
+ Stack27,
12859
13866
  {
12860
13867
  direction: "row",
12861
13868
  alignItems: "center",
12862
13869
  justifyContent: "space-between",
12863
13870
  gap: 1,
12864
13871
  children: [
12865
- /* @__PURE__ */ jsx45(
12866
- Typography26,
13872
+ /* @__PURE__ */ jsx49(
13873
+ Typography28,
12867
13874
  {
12868
13875
  variant: "subtitle2",
12869
13876
  sx: [
@@ -12873,8 +13880,8 @@ function InlineSegmentStrip({
12873
13880
  children: item.label
12874
13881
  }
12875
13882
  ),
12876
- /* @__PURE__ */ jsx45(
12877
- Typography26,
13883
+ /* @__PURE__ */ jsx49(
13884
+ Typography28,
12878
13885
  {
12879
13886
  variant: "body2",
12880
13887
  sx: [
@@ -12887,8 +13894,8 @@ function InlineSegmentStrip({
12887
13894
  ]
12888
13895
  }
12889
13896
  ),
12890
- /* @__PURE__ */ jsx45(
12891
- Box31,
13897
+ /* @__PURE__ */ jsx49(
13898
+ Box33,
12892
13899
  {
12893
13900
  sx: {
12894
13901
  width: "100%",
@@ -12905,8 +13912,8 @@ function InlineSegmentStrip({
12905
13912
  const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
12906
13913
  const isLast = idx === lastIdx;
12907
13914
  const fill = resolveSegmentFill(presentation, idx, segment.color);
12908
- return /* @__PURE__ */ jsx45(
12909
- Tooltip12,
13915
+ return /* @__PURE__ */ jsx49(
13916
+ Tooltip13,
12910
13917
  {
12911
13918
  title: (() => {
12912
13919
  if (presentation?.renderSegmentTooltip) {
@@ -12918,7 +13925,7 @@ function InlineSegmentStrip({
12918
13925
  });
12919
13926
  return custom == null ? "" : custom;
12920
13927
  }
12921
- return /* @__PURE__ */ jsx45(
13928
+ return /* @__PURE__ */ jsx49(
12922
13929
  InlineSegmentTooltipCard,
12923
13930
  {
12924
13931
  segment,
@@ -12933,8 +13940,8 @@ function InlineSegmentStrip({
12933
13940
  sx: inlineSegmentTooltipPopperSx
12934
13941
  }
12935
13942
  },
12936
- children: /* @__PURE__ */ jsx45(
12937
- Box31,
13943
+ children: /* @__PURE__ */ jsx49(
13944
+ Box33,
12938
13945
  {
12939
13946
  sx: {
12940
13947
  width: `${Math.max(0, widthPercent)}%`,
@@ -12978,10 +13985,10 @@ function InlineSegmentTooltipCard({
12978
13985
  cardSx
12979
13986
  }) {
12980
13987
  const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
12981
- return /* @__PURE__ */ jsxs36(Box31, { sx: tooltipSurfaceSx, children: [
12982
- /* @__PURE__ */ jsx45(Box31, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
12983
- /* @__PURE__ */ jsxs36(
12984
- Box31,
13988
+ return /* @__PURE__ */ jsxs39(Box33, { sx: tooltipSurfaceSx, children: [
13989
+ /* @__PURE__ */ jsx49(Box33, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
13990
+ /* @__PURE__ */ jsxs39(
13991
+ Box33,
12985
13992
  {
12986
13993
  sx: {
12987
13994
  display: "flex",
@@ -12993,8 +14000,8 @@ function InlineSegmentTooltipCard({
12993
14000
  py: 1.25
12994
14001
  },
12995
14002
  children: [
12996
- /* @__PURE__ */ jsx45(
12997
- Box31,
14003
+ /* @__PURE__ */ jsx49(
14004
+ Box33,
12998
14005
  {
12999
14006
  component: "span",
13000
14007
  "aria-hidden": true,
@@ -13007,8 +14014,8 @@ function InlineSegmentTooltipCard({
13007
14014
  }
13008
14015
  }
13009
14016
  ),
13010
- /* @__PURE__ */ jsx45(
13011
- Typography26,
14017
+ /* @__PURE__ */ jsx49(
14018
+ Typography28,
13012
14019
  {
13013
14020
  component: "span",
13014
14021
  sx: {
@@ -13020,8 +14027,8 @@ function InlineSegmentTooltipCard({
13020
14027
  children: segment.label
13021
14028
  }
13022
14029
  ),
13023
- /* @__PURE__ */ jsx45(
13024
- Typography26,
14030
+ /* @__PURE__ */ jsx49(
14031
+ Typography28,
13025
14032
  {
13026
14033
  component: "span",
13027
14034
  sx: {
@@ -13033,8 +14040,8 @@ function InlineSegmentTooltipCard({
13033
14040
  children: " : "
13034
14041
  }
13035
14042
  ),
13036
- /* @__PURE__ */ jsx45(
13037
- Typography26,
14043
+ /* @__PURE__ */ jsx49(
14044
+ Typography28,
13038
14045
  {
13039
14046
  component: "span",
13040
14047
  sx: {
@@ -13064,8 +14071,8 @@ function FootfallHeatMapKpiRankedBlock({
13064
14071
  const statIcon = presentation?.statCardIconColor ?? "#1565C0";
13065
14072
  const customSummary = presentation?.summaryCards?.(summaryKpis);
13066
14073
  const useCustomSummary = customSummary !== void 0;
13067
- return /* @__PURE__ */ jsxs36(
13068
- Stack25,
14074
+ return /* @__PURE__ */ jsxs39(
14075
+ Stack27,
13069
14076
  {
13070
14077
  spacing: 2,
13071
14078
  sx: [
@@ -13074,15 +14081,15 @@ function FootfallHeatMapKpiRankedBlock({
13074
14081
  ...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
13075
14082
  ],
13076
14083
  children: [
13077
- useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ jsx45(
13078
- Stack25,
14084
+ useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ jsx49(
14085
+ Stack27,
13079
14086
  {
13080
14087
  direction: "row",
13081
14088
  spacing: 1.5,
13082
14089
  flexWrap: "wrap",
13083
14090
  useFlexGap: true,
13084
14091
  sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
13085
- children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ jsx45(
14092
+ children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ jsx49(
13086
14093
  InlineStatCard,
13087
14094
  {
13088
14095
  icon: card.icon ?? "mdi:chart-box-outline",
@@ -13095,7 +14102,7 @@ function FootfallHeatMapKpiRankedBlock({
13095
14102
  },
13096
14103
  card.id
13097
14104
  )) : [
13098
- /* @__PURE__ */ jsx45(
14105
+ /* @__PURE__ */ jsx49(
13099
14106
  InlineStatCard,
13100
14107
  {
13101
14108
  icon: "mdi:store-marker-outline",
@@ -13106,7 +14113,7 @@ function FootfallHeatMapKpiRankedBlock({
13106
14113
  },
13107
14114
  "default-stores"
13108
14115
  ),
13109
- /* @__PURE__ */ jsx45(
14116
+ /* @__PURE__ */ jsx49(
13110
14117
  InlineStatCard,
13111
14118
  {
13112
14119
  icon: "fluent:people-community-16-filled",
@@ -13120,15 +14127,15 @@ function FootfallHeatMapKpiRankedBlock({
13120
14127
  ]
13121
14128
  }
13122
14129
  ),
13123
- /* @__PURE__ */ jsx45(
13124
- Stack25,
14130
+ /* @__PURE__ */ jsx49(
14131
+ Stack27,
13125
14132
  {
13126
14133
  spacing: 1.25,
13127
14134
  sx: [
13128
14135
  { pt: 0.5, pb: 1 },
13129
14136
  ...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
13130
14137
  ],
13131
- children: rankedBarList.items.map((item) => /* @__PURE__ */ jsx45(
14138
+ children: rankedBarList.items.map((item) => /* @__PURE__ */ jsx49(
13132
14139
  InlineSegmentStrip,
13133
14140
  {
13134
14141
  item,
@@ -13310,7 +14317,7 @@ function FootFallHeatMapView({
13310
14317
  tileColors: treemapProp?.tileColors
13311
14318
  };
13312
14319
  const tileMetrics = treemapLayout.tileMetrics;
13313
- const tileColorFromSeed = useMemo19(
14320
+ const tileColorFromSeed = useMemo21(
13314
14321
  () => createTreemapTileColorResolver(treemapLayout.tileColors),
13315
14322
  [treemapLayout.tileColors]
13316
14323
  );
@@ -13352,13 +14359,14 @@ function FootFallHeatMapView({
13352
14359
  startFromPathMode,
13353
14360
  tileColorFromSeed
13354
14361
  ]);
13355
- const derivedKpiStrip = useMemo19(() => {
14362
+ const derivedKpiStrip = useMemo21(() => {
13356
14363
  if (isLoading || loading || !initialData) return null;
13357
14364
  const activeZoneForStrip = trackingDetails.length > 0 ? trackingDetails[trackingDetails.length - 1] : void 0;
13358
14365
  return deriveFootfallHeatMapKpiStrip(
13359
14366
  activeZoneForStrip,
13360
14367
  data.current ?? [],
13361
- kpiStripPresentation?.buildBarRow
14368
+ kpiStripPresentation?.buildBarRow,
14369
+ { includeZeroValueRows: kpiStripPresentation?.includeZeroValueRows }
13362
14370
  );
13363
14371
  }, [
13364
14372
  isLoading,
@@ -13366,7 +14374,8 @@ function FootFallHeatMapView({
13366
14374
  initialData,
13367
14375
  trackingDetails,
13368
14376
  data,
13369
- kpiStripPresentation?.buildBarRow
14377
+ kpiStripPresentation?.buildBarRow,
14378
+ kpiStripPresentation?.includeZeroValueRows
13370
14379
  ]);
13371
14380
  const formatPercentage = (value) => {
13372
14381
  if (typeof value !== "number") return "0%";
@@ -13448,7 +14457,7 @@ function FootFallHeatMapView({
13448
14457
  );
13449
14458
  const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
13450
14459
  const p = inner;
13451
- return /* @__PURE__ */ jsx45(
14460
+ return /* @__PURE__ */ jsx49(
13452
14461
  "foreignObject",
13453
14462
  {
13454
14463
  x,
@@ -13456,8 +14465,8 @@ function FootFallHeatMapView({
13456
14465
  width,
13457
14466
  height,
13458
14467
  style: { borderRadius: "12px", overflow: "hidden" },
13459
- children: /* @__PURE__ */ jsxs36(
13460
- Stack25,
14468
+ children: /* @__PURE__ */ jsxs39(
14469
+ Stack27,
13461
14470
  {
13462
14471
  onClick: handleClick,
13463
14472
  onKeyDown: (e) => {
@@ -13487,8 +14496,8 @@ function FootFallHeatMapView({
13487
14496
  }
13488
14497
  },
13489
14498
  children: [
13490
- /* @__PURE__ */ jsxs36(
13491
- Stack25,
14499
+ /* @__PURE__ */ jsxs39(
14500
+ Stack27,
13492
14501
  {
13493
14502
  direction: isSmall ? "row" : "column",
13494
14503
  justifyContent: "center",
@@ -13499,8 +14508,8 @@ function FootFallHeatMapView({
13499
14508
  mb: isSmall ? 0.5 : 1
13500
14509
  },
13501
14510
  children: [
13502
- /* @__PURE__ */ jsx45(
13503
- Typography26,
14511
+ /* @__PURE__ */ jsx49(
14512
+ Typography28,
13504
14513
  {
13505
14514
  sx: {
13506
14515
  fontSize: `${fontSize}px!important`,
@@ -13522,8 +14531,8 @@ function FootFallHeatMapView({
13522
14531
  children: name
13523
14532
  }
13524
14533
  ),
13525
- /* @__PURE__ */ jsx45(
13526
- Typography26,
14534
+ /* @__PURE__ */ jsx49(
14535
+ Typography28,
13527
14536
  {
13528
14537
  sx: {
13529
14538
  fontSize: `${fontSize}px!important`,
@@ -13537,8 +14546,8 @@ function FootFallHeatMapView({
13537
14546
  ]
13538
14547
  }
13539
14548
  ),
13540
- /* @__PURE__ */ jsxs36(
13541
- Stack25,
14549
+ /* @__PURE__ */ jsxs39(
14550
+ Stack27,
13542
14551
  {
13543
14552
  direction: "row",
13544
14553
  justifyContent: "center",
@@ -13551,8 +14560,8 @@ function FootFallHeatMapView({
13551
14560
  ...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
13552
14561
  ],
13553
14562
  children: [
13554
- /* @__PURE__ */ jsxs36(
13555
- Stack25,
14563
+ /* @__PURE__ */ jsxs39(
14564
+ Stack27,
13556
14565
  {
13557
14566
  direction: "row",
13558
14567
  alignItems: "center",
@@ -13569,8 +14578,8 @@ function FootFallHeatMapView({
13569
14578
  ...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
13570
14579
  ],
13571
14580
  children: [
13572
- /* @__PURE__ */ jsx45(
13573
- Box31,
14581
+ /* @__PURE__ */ jsx49(
14582
+ Box33,
13574
14583
  {
13575
14584
  sx: [
13576
14585
  {
@@ -13582,7 +14591,7 @@ function FootFallHeatMapView({
13582
14591
  },
13583
14592
  ...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
13584
14593
  ],
13585
- children: /* @__PURE__ */ jsx45(
14594
+ children: /* @__PURE__ */ jsx49(
13586
14595
  Icon13,
13587
14596
  {
13588
14597
  icon: icons.visitors,
@@ -13592,8 +14601,8 @@ function FootFallHeatMapView({
13592
14601
  )
13593
14602
  }
13594
14603
  ),
13595
- /* @__PURE__ */ jsx45(
13596
- Typography26,
14604
+ /* @__PURE__ */ jsx49(
14605
+ Typography28,
13597
14606
  {
13598
14607
  sx: [
13599
14608
  {
@@ -13610,8 +14619,8 @@ function FootFallHeatMapView({
13610
14619
  ]
13611
14620
  }
13612
14621
  ),
13613
- /* @__PURE__ */ jsxs36(
13614
- Stack25,
14622
+ /* @__PURE__ */ jsxs39(
14623
+ Stack27,
13615
14624
  {
13616
14625
  direction: "row",
13617
14626
  alignItems: "center",
@@ -13628,8 +14637,8 @@ function FootFallHeatMapView({
13628
14637
  ...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
13629
14638
  ],
13630
14639
  children: [
13631
- /* @__PURE__ */ jsx45(
13632
- Box31,
14640
+ /* @__PURE__ */ jsx49(
14641
+ Box33,
13633
14642
  {
13634
14643
  sx: [
13635
14644
  {
@@ -13641,7 +14650,7 @@ function FootFallHeatMapView({
13641
14650
  },
13642
14651
  ...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
13643
14652
  ],
13644
- children: /* @__PURE__ */ jsx45(
14653
+ children: /* @__PURE__ */ jsx49(
13645
14654
  Icon13,
13646
14655
  {
13647
14656
  icon: icons.dwell,
@@ -13651,8 +14660,8 @@ function FootFallHeatMapView({
13651
14660
  )
13652
14661
  }
13653
14662
  ),
13654
- /* @__PURE__ */ jsx45(
13655
- Typography26,
14663
+ /* @__PURE__ */ jsx49(
14664
+ Typography28,
13656
14665
  {
13657
14666
  sx: [
13658
14667
  {
@@ -13694,8 +14703,8 @@ function FootFallHeatMapView({
13694
14703
  const LabelTag = ({ textColor = "#f0f0f0" }) => {
13695
14704
  const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
13696
14705
  const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
13697
- return /* @__PURE__ */ jsx45(Stack25, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ jsx45(
13698
- Typography26,
14706
+ return /* @__PURE__ */ jsx49(Stack27, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ jsx49(
14707
+ Typography28,
13699
14708
  {
13700
14709
  component: "span",
13701
14710
  sx: {
@@ -13708,10 +14717,10 @@ function FootFallHeatMapView({
13708
14717
  color: textColor,
13709
14718
  children: brandLabel
13710
14719
  }
13711
- ) : /* @__PURE__ */ jsxs36(Fragment17, { children: [
13712
- breadcrumbSegments.map((seg, i) => /* @__PURE__ */ jsxs36(React24.Fragment, { children: [
13713
- i > 0 ? /* @__PURE__ */ jsx45(
13714
- Typography26,
14720
+ ) : /* @__PURE__ */ jsxs39(Fragment19, { children: [
14721
+ breadcrumbSegments.map((seg, i) => /* @__PURE__ */ jsxs39(React26.Fragment, { children: [
14722
+ i > 0 ? /* @__PURE__ */ jsx49(
14723
+ Typography28,
13715
14724
  {
13716
14725
  component: "span",
13717
14726
  fontSize: "15px !important",
@@ -13721,8 +14730,8 @@ function FootFallHeatMapView({
13721
14730
  children: "/"
13722
14731
  }
13723
14732
  ) : null,
13724
- /* @__PURE__ */ jsx45(
13725
- Typography26,
14733
+ /* @__PURE__ */ jsx49(
14734
+ Typography28,
13726
14735
  {
13727
14736
  component: "span",
13728
14737
  sx: {
@@ -13737,9 +14746,9 @@ function FootFallHeatMapView({
13737
14746
  }
13738
14747
  )
13739
14748
  ] }, `${seg}-${i}`)),
13740
- brandLabel ? /* @__PURE__ */ jsxs36(Fragment17, { children: [
13741
- /* @__PURE__ */ jsx45(
13742
- Typography26,
14749
+ brandLabel ? /* @__PURE__ */ jsxs39(Fragment19, { children: [
14750
+ /* @__PURE__ */ jsx49(
14751
+ Typography28,
13743
14752
  {
13744
14753
  component: "span",
13745
14754
  fontSize: "15px !important",
@@ -13748,8 +14757,8 @@ function FootFallHeatMapView({
13748
14757
  children: "/"
13749
14758
  }
13750
14759
  ),
13751
- /* @__PURE__ */ jsx45(
13752
- Typography26,
14760
+ /* @__PURE__ */ jsx49(
14761
+ Typography28,
13753
14762
  {
13754
14763
  component: "span",
13755
14764
  sx: {
@@ -13768,10 +14777,10 @@ function FootFallHeatMapView({
13768
14777
  };
13769
14778
  const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
13770
14779
  if (is500Error) {
13771
- return /* @__PURE__ */ jsx45(Box31, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ jsx45(Typography26, { color: "error", children: "Something went wrong (500). Try again later." }) });
14780
+ return /* @__PURE__ */ jsx49(Box33, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ jsx49(Typography28, { color: "error", children: "Something went wrong (500). Try again later." }) });
13772
14781
  }
13773
14782
  if (isLoading || loading) {
13774
- return /* @__PURE__ */ jsx45(
14783
+ return /* @__PURE__ */ jsx49(
13775
14784
  Skeleton7,
13776
14785
  {
13777
14786
  variant: "rectangular",
@@ -13812,9 +14821,9 @@ function FootFallHeatMapView({
13812
14821
  "#888888",
13813
14822
  "header"
13814
14823
  );
13815
- return /* @__PURE__ */ jsxs36(Stack25, { width: "100%", children: [
13816
- /* @__PURE__ */ jsxs36(
13817
- Box31,
14824
+ return /* @__PURE__ */ jsxs39(Stack27, { width: "100%", children: [
14825
+ /* @__PURE__ */ jsxs39(
14826
+ Box33,
13818
14827
  {
13819
14828
  sx: {
13820
14829
  width: "100%",
@@ -13825,16 +14834,16 @@ function FootFallHeatMapView({
13825
14834
  gap: 1
13826
14835
  },
13827
14836
  children: [
13828
- /* @__PURE__ */ jsx45(Typography26, { variant: "h6", fontWeight: 700, children: title }),
13829
- /* @__PURE__ */ jsxs36(Stack25, { direction: "row", alignItems: "center", gap: 1, children: [
13830
- isFetching ? /* @__PURE__ */ jsx45(Typography26, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
13831
- /* @__PURE__ */ jsx45(Tooltip12, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ jsx45(
14837
+ /* @__PURE__ */ jsx49(Typography28, { variant: "h6", fontWeight: 700, children: title }),
14838
+ /* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", gap: 1, children: [
14839
+ isFetching ? /* @__PURE__ */ jsx49(Typography28, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
14840
+ /* @__PURE__ */ jsx49(Tooltip13, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ jsx49(
13832
14841
  IconButton5,
13833
14842
  {
13834
14843
  size: "small",
13835
14844
  "aria-label": "Zone performance info",
13836
14845
  edge: "end",
13837
- children: /* @__PURE__ */ jsx45(
14846
+ children: /* @__PURE__ */ jsx49(
13838
14847
  Icon13,
13839
14848
  {
13840
14849
  icon: icons.headerInfo,
@@ -13849,8 +14858,8 @@ function FootFallHeatMapView({
13849
14858
  ]
13850
14859
  }
13851
14860
  ),
13852
- data?.previous?.length > 0 && headerData ? /* @__PURE__ */ jsxs36(
13853
- Stack25,
14861
+ data?.previous?.length > 0 && headerData ? /* @__PURE__ */ jsxs39(
14862
+ Stack27,
13854
14863
  {
13855
14864
  direction: "row",
13856
14865
  alignItems: "center",
@@ -13864,13 +14873,13 @@ function FootFallHeatMapView({
13864
14873
  backgroundColor: zoneBarColor
13865
14874
  },
13866
14875
  children: [
13867
- /* @__PURE__ */ jsxs36(Stack25, { direction: "row", alignItems: "center", spacing: 1, children: [
13868
- /* @__PURE__ */ jsx45(
14876
+ /* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", spacing: 1, children: [
14877
+ /* @__PURE__ */ jsx49(
13869
14878
  Button8,
13870
14879
  {
13871
14880
  size: "small",
13872
14881
  onClick: handleClose,
13873
- startIcon: /* @__PURE__ */ jsx45(
14882
+ startIcon: /* @__PURE__ */ jsx49(
13874
14883
  Icon13,
13875
14884
  {
13876
14885
  icon: "mdi:chevron-left",
@@ -13890,10 +14899,10 @@ function FootFallHeatMapView({
13890
14899
  children: "Back"
13891
14900
  }
13892
14901
  ),
13893
- /* @__PURE__ */ jsx45(LabelTag, { textColor: zoneBarHeaderFg })
14902
+ /* @__PURE__ */ jsx49(LabelTag, { textColor: zoneBarHeaderFg })
13894
14903
  ] }),
13895
- /* @__PURE__ */ jsxs36(
13896
- Typography26,
14904
+ /* @__PURE__ */ jsxs39(
14905
+ Typography28,
13897
14906
  {
13898
14907
  variant: "h6",
13899
14908
  sx: { color: zoneBarHeaderFg, fontWeight: 700 },
@@ -13907,7 +14916,7 @@ function FootFallHeatMapView({
13907
14916
  ]
13908
14917
  }
13909
14918
  ) : null,
13910
- isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ jsx45(
14919
+ isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ jsx49(
13911
14920
  FootfallHeatMapKpiRankedBlock,
13912
14921
  {
13913
14922
  strip: derivedKpiStrip,
@@ -13924,8 +14933,8 @@ function FootFallHeatMapView({
13924
14933
  }
13925
14934
  }
13926
14935
  ) : null,
13927
- showLeafDetailsBody ? /* @__PURE__ */ jsx45(
13928
- Box31,
14936
+ showLeafDetailsBody ? /* @__PURE__ */ jsx49(
14937
+ Box33,
13929
14938
  {
13930
14939
  sx: [
13931
14940
  {
@@ -13940,7 +14949,7 @@ function FootFallHeatMapView({
13940
14949
  ]
13941
14950
  }
13942
14951
  ) : null,
13943
- showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ jsx45(ResponsiveContainer5, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ jsx45(
14952
+ showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ jsx49(ResponsiveContainer6, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ jsx49(
13944
14953
  Treemap,
13945
14954
  {
13946
14955
  data: data?.current ?? [],
@@ -13953,22 +14962,22 @@ function FootFallHeatMapView({
13953
14962
  animationDuration: 0,
13954
14963
  style: { borderRadius: "12px" }
13955
14964
  }
13956
- ) }) : /* @__PURE__ */ jsx45(
14965
+ ) }) : /* @__PURE__ */ jsx49(
13957
14966
  ChartEmptyState,
13958
14967
  {
13959
14968
  minHeight: treemapHeight,
13960
14969
  ...emptyStatePlaceholderProps
13961
14970
  }
13962
- ) : /* @__PURE__ */ jsx45(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
14971
+ ) : /* @__PURE__ */ jsx49(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
13963
14972
  ] });
13964
14973
  }
13965
14974
 
13966
14975
  // src/components/widgets/FootFallHeatMap/ZoneWiseKpiCards.tsx
13967
14976
  import Grid2 from "@mui/material/Grid";
13968
14977
  import Paper6 from "@mui/material/Paper";
13969
- import Stack26 from "@mui/material/Stack";
13970
- import Typography27 from "@mui/material/Typography";
13971
- import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
14978
+ import Stack28 from "@mui/material/Stack";
14979
+ import Typography29 from "@mui/material/Typography";
14980
+ import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
13972
14981
  function metricsToRows(metrics) {
13973
14982
  return [
13974
14983
  { id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
@@ -14006,7 +15015,7 @@ function metricsToRows(metrics) {
14006
15015
  }
14007
15016
  var ZoneWiseKpiCards = ({ metrics }) => {
14008
15017
  const rows = metricsToRows(metrics);
14009
- return /* @__PURE__ */ jsx46(Grid2, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ jsx46(
15018
+ return /* @__PURE__ */ jsx50(Grid2, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ jsx50(
14010
15019
  Grid2,
14011
15020
  {
14012
15021
  size: {
@@ -14014,7 +15023,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
14014
15023
  sm: 6,
14015
15024
  md: 3
14016
15025
  },
14017
- children: /* @__PURE__ */ jsxs37(
15026
+ children: /* @__PURE__ */ jsxs40(
14018
15027
  Paper6,
14019
15028
  {
14020
15029
  elevation: 0,
@@ -14026,8 +15035,8 @@ var ZoneWiseKpiCards = ({ metrics }) => {
14026
15035
  height: "100%"
14027
15036
  },
14028
15037
  children: [
14029
- /* @__PURE__ */ jsx46(
14030
- Typography27,
15038
+ /* @__PURE__ */ jsx50(
15039
+ Typography29,
14031
15040
  {
14032
15041
  variant: "caption",
14033
15042
  color: "text.secondary",
@@ -14035,7 +15044,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
14035
15044
  children: item.title
14036
15045
  }
14037
15046
  ),
14038
- /* @__PURE__ */ jsx46(Stack26, { mt: 1, children: /* @__PURE__ */ jsx46(Typography27, { variant: "h6", fontWeight: 700, children: item.value }) })
15047
+ /* @__PURE__ */ jsx50(Stack28, { mt: 1, children: /* @__PURE__ */ jsx50(Typography29, { variant: "h6", fontWeight: 700, children: item.value }) })
14039
15048
  ]
14040
15049
  }
14041
15050
  )
@@ -14094,41 +15103,41 @@ var peakBillingHoursMockSeriesByTabId = {
14094
15103
  };
14095
15104
 
14096
15105
  // src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
14097
- import Box32 from "@mui/material/Box";
14098
- import Card4 from "@mui/material/Card";
14099
- import CardContent3 from "@mui/material/CardContent";
15106
+ import Box34 from "@mui/material/Box";
15107
+ import Card5 from "@mui/material/Card";
15108
+ import CardContent4 from "@mui/material/CardContent";
14100
15109
  import Skeleton8 from "@mui/material/Skeleton";
14101
- import Stack27 from "@mui/material/Stack";
14102
- import Typography28 from "@mui/material/Typography";
14103
- import * as React26 from "react";
15110
+ import Stack29 from "@mui/material/Stack";
15111
+ import Typography30 from "@mui/material/Typography";
15112
+ import * as React28 from "react";
14104
15113
  import {
14105
- Bar as Bar5,
14106
- BarChart as BarChart3,
14107
- CartesianGrid as CartesianGrid7,
15114
+ Bar as Bar6,
15115
+ BarChart as BarChart4,
15116
+ CartesianGrid as CartesianGrid8,
14108
15117
  LabelList as LabelList5,
14109
- ResponsiveContainer as ResponsiveContainer6,
14110
- Tooltip as Tooltip13,
14111
- XAxis as XAxis7,
14112
- YAxis as YAxis7
15118
+ ResponsiveContainer as ResponsiveContainer7,
15119
+ Tooltip as Tooltip14,
15120
+ XAxis as XAxis8,
15121
+ YAxis as YAxis8
14113
15122
  } from "recharts";
14114
15123
 
14115
15124
  // src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
14116
- import * as React25 from "react";
14117
- import { jsx as jsx47 } from "react/jsx-runtime";
14118
- var PeakBillingHoursCustomizationContext = React25.createContext({});
15125
+ import * as React27 from "react";
15126
+ import { jsx as jsx51 } from "react/jsx-runtime";
15127
+ var PeakBillingHoursCustomizationContext = React27.createContext({});
14119
15128
  function PeakBillingHoursCustomizationProvider({
14120
15129
  value,
14121
15130
  children
14122
15131
  }) {
14123
- const memo = React25.useMemo(() => value, [value]);
14124
- return /* @__PURE__ */ jsx47(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
15132
+ const memo = React27.useMemo(() => value, [value]);
15133
+ return /* @__PURE__ */ jsx51(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
14125
15134
  }
14126
15135
  function usePeakBillingHoursCustomization() {
14127
- return React25.useContext(PeakBillingHoursCustomizationContext);
15136
+ return React27.useContext(PeakBillingHoursCustomizationContext);
14128
15137
  }
14129
15138
 
14130
15139
  // src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
14131
- import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
15140
+ import { jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
14132
15141
  function formatTooltipValue2(n) {
14133
15142
  return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
14134
15143
  Math.round(n)
@@ -14175,7 +15184,7 @@ function PeakBillingHoursTooltip(props) {
14175
15184
  },
14176
15185
  tt?.bodyStyle
14177
15186
  );
14178
- return /* @__PURE__ */ jsx48(
15187
+ return /* @__PURE__ */ jsx52(
14179
15188
  "div",
14180
15189
  {
14181
15190
  style: {
@@ -14183,7 +15192,7 @@ function PeakBillingHoursTooltip(props) {
14183
15192
  minWidth: 160,
14184
15193
  maxWidth: 280
14185
15194
  },
14186
- children: /* @__PURE__ */ jsxs38(
15195
+ children: /* @__PURE__ */ jsxs41(
14187
15196
  "div",
14188
15197
  {
14189
15198
  style: {
@@ -14194,7 +15203,7 @@ function PeakBillingHoursTooltip(props) {
14194
15203
  boxShadow: shadow
14195
15204
  },
14196
15205
  children: [
14197
- /* @__PURE__ */ jsx48(
15206
+ /* @__PURE__ */ jsx52(
14198
15207
  "div",
14199
15208
  {
14200
15209
  style: {
@@ -14205,14 +15214,14 @@ function PeakBillingHoursTooltip(props) {
14205
15214
  "aria-hidden": true
14206
15215
  }
14207
15216
  ),
14208
- /* @__PURE__ */ jsxs38("div", { style: bodyStyle, children: [
14209
- /* @__PURE__ */ jsxs38("div", { style: rowStyle, children: [
14210
- /* @__PURE__ */ jsx48("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
14211
- /* @__PURE__ */ jsx48("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
15217
+ /* @__PURE__ */ jsxs41("div", { style: bodyStyle, children: [
15218
+ /* @__PURE__ */ jsxs41("div", { style: rowStyle, children: [
15219
+ /* @__PURE__ */ jsx52("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
15220
+ /* @__PURE__ */ jsx52("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
14212
15221
  ] }),
14213
- /* @__PURE__ */ jsxs38("div", { style: { ...rowStyle, marginTop: gap }, children: [
14214
- /* @__PURE__ */ jsx48("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
14215
- /* @__PURE__ */ jsx48("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
15222
+ /* @__PURE__ */ jsxs41("div", { style: { ...rowStyle, marginTop: gap }, children: [
15223
+ /* @__PURE__ */ jsx52("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
15224
+ /* @__PURE__ */ jsx52("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
14216
15225
  ] })
14217
15226
  ] })
14218
15227
  ]
@@ -14223,7 +15232,7 @@ function PeakBillingHoursTooltip(props) {
14223
15232
  }
14224
15233
 
14225
15234
  // src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
14226
- import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
15235
+ import { Fragment as Fragment20, jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
14227
15236
  var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
14228
15237
  cartesianGridStroke: "#D3D6DF",
14229
15238
  xAxisLineStroke: "#7566FC",
@@ -14249,7 +15258,7 @@ function PeakBarTopLabel(props) {
14249
15258
  const cx = nx + nw / 2;
14250
15259
  const cy = ny - 6;
14251
15260
  const isHorizontal = angle === 0;
14252
- return /* @__PURE__ */ jsx49(
15261
+ return /* @__PURE__ */ jsx53(
14253
15262
  "text",
14254
15263
  {
14255
15264
  x: cx,
@@ -14263,7 +15272,7 @@ function PeakBarTopLabel(props) {
14263
15272
  }
14264
15273
  );
14265
15274
  }
14266
- function BarPlot({
15275
+ function BarPlot2({
14267
15276
  data,
14268
15277
  yAxisDomain,
14269
15278
  yAxisTicks,
@@ -14302,24 +15311,24 @@ function BarPlot({
14302
15311
  barRadius,
14303
15312
  barRadius
14304
15313
  ];
14305
- return /* @__PURE__ */ jsx49(Box32, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ jsx49(ResponsiveContainer6, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs39(
14306
- BarChart3,
15314
+ return /* @__PURE__ */ jsx53(Box34, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ jsx53(ResponsiveContainer7, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs42(
15315
+ BarChart4,
14307
15316
  {
14308
15317
  data,
14309
15318
  margin: m,
14310
15319
  barCategoryGap: categoryGap,
14311
15320
  barGap,
14312
15321
  children: [
14313
- /* @__PURE__ */ jsx49(
14314
- CartesianGrid7,
15322
+ /* @__PURE__ */ jsx53(
15323
+ CartesianGrid8,
14315
15324
  {
14316
15325
  strokeDasharray: dash,
14317
15326
  vertical: false,
14318
15327
  stroke: gridStroke
14319
15328
  }
14320
15329
  ),
14321
- /* @__PURE__ */ jsx49(
14322
- XAxis7,
15330
+ /* @__PURE__ */ jsx53(
15331
+ XAxis8,
14323
15332
  {
14324
15333
  dataKey: "label",
14325
15334
  dx: xAxisTickDx,
@@ -14332,8 +15341,8 @@ function BarPlot({
14332
15341
  height: 36
14333
15342
  }
14334
15343
  ),
14335
- /* @__PURE__ */ jsx49(
14336
- YAxis7,
15344
+ /* @__PURE__ */ jsx53(
15345
+ YAxis8,
14337
15346
  {
14338
15347
  domain: yAxisDomain,
14339
15348
  ticks: yAxisTicks,
@@ -14344,8 +15353,8 @@ function BarPlot({
14344
15353
  width: yWidth
14345
15354
  }
14346
15355
  ),
14347
- /* @__PURE__ */ jsx49(
14348
- Tooltip13,
15356
+ /* @__PURE__ */ jsx53(
15357
+ Tooltip14,
14349
15358
  {
14350
15359
  content: (tooltipProps) => {
14351
15360
  if (renderTooltip) {
@@ -14354,9 +15363,9 @@ function BarPlot({
14354
15363
  data,
14355
15364
  activeTabId
14356
15365
  });
14357
- return customTooltip == null ? null : /* @__PURE__ */ jsx49(Fragment18, { children: customTooltip });
15366
+ return customTooltip == null ? null : /* @__PURE__ */ jsx53(Fragment20, { children: customTooltip });
14358
15367
  }
14359
- return /* @__PURE__ */ jsx49(PeakBillingHoursTooltip, { ...tooltipProps });
15368
+ return /* @__PURE__ */ jsx53(PeakBillingHoursTooltip, { ...tooltipProps });
14360
15369
  },
14361
15370
  cursor: {
14362
15371
  fill: hoverBandFill,
@@ -14366,8 +15375,8 @@ function BarPlot({
14366
15375
  allowEscapeViewBox: { x: false, y: true }
14367
15376
  }
14368
15377
  ),
14369
- /* @__PURE__ */ jsx49(
14370
- Bar5,
15378
+ /* @__PURE__ */ jsx53(
15379
+ Bar6,
14371
15380
  {
14372
15381
  dataKey: "value",
14373
15382
  name: "Visits",
@@ -14375,11 +15384,11 @@ function BarPlot({
14375
15384
  radius: radiusTuple,
14376
15385
  isAnimationActive: false,
14377
15386
  maxBarSize: 48,
14378
- children: /* @__PURE__ */ jsx49(
15387
+ children: /* @__PURE__ */ jsx53(
14379
15388
  LabelList5,
14380
15389
  {
14381
15390
  dataKey: "value",
14382
- content: (props) => /* @__PURE__ */ jsx49(
15391
+ content: (props) => /* @__PURE__ */ jsx53(
14383
15392
  PeakBarTopLabel,
14384
15393
  {
14385
15394
  ...props,
@@ -14419,7 +15428,7 @@ function PeakBillingHours({
14419
15428
  emptyStatePlaceholderProps,
14420
15429
  customization
14421
15430
  }) {
14422
- const chartData = React26.useMemo(() => {
15431
+ const chartData = React28.useMemo(() => {
14423
15432
  if (seriesByTabId) {
14424
15433
  return seriesByTabId[activeTabId] ?? [];
14425
15434
  }
@@ -14454,9 +15463,9 @@ function PeakBillingHours({
14454
15463
  },
14455
15464
  customization?.header?.subtitleSx
14456
15465
  );
14457
- return /* @__PURE__ */ jsx49(PeakBillingHoursCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsx49(Card4, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ jsx49(CardContent3, { children: /* @__PURE__ */ jsxs39(Stack27, { spacing: 1.75, sx: { width: "100%" }, children: [
14458
- /* @__PURE__ */ jsxs39(
14459
- Stack27,
15466
+ return /* @__PURE__ */ jsx53(PeakBillingHoursCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsx53(Card5, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ jsx53(CardContent4, { children: /* @__PURE__ */ jsxs42(Stack29, { spacing: 1.75, sx: { width: "100%" }, children: [
15467
+ /* @__PURE__ */ jsxs42(
15468
+ Stack29,
14460
15469
  {
14461
15470
  direction: "row",
14462
15471
  alignItems: "flex-start",
@@ -14464,20 +15473,20 @@ function PeakBillingHours({
14464
15473
  gap: 2,
14465
15474
  flexWrap: "wrap",
14466
15475
  children: [
14467
- /* @__PURE__ */ jsxs39(Box32, { component: "div", sx: { minWidth: 0 }, children: [
14468
- /* @__PURE__ */ jsx49(Typography28, { component: "span", sx: titleSx, children: title }),
14469
- /* @__PURE__ */ jsx49(Typography28, { component: "span", sx: subtitleSx, children: subtitle })
15476
+ /* @__PURE__ */ jsxs42(Box34, { component: "div", sx: { minWidth: 0 }, children: [
15477
+ /* @__PURE__ */ jsx53(Typography30, { component: "span", sx: titleSx, children: title }),
15478
+ /* @__PURE__ */ jsx53(Typography30, { component: "span", sx: subtitleSx, children: subtitle })
14470
15479
  ] }),
14471
- /* @__PURE__ */ jsx49(
14472
- Stack27,
15480
+ /* @__PURE__ */ jsx53(
15481
+ Stack29,
14473
15482
  {
14474
15483
  direction: "row",
14475
15484
  alignItems: "center",
14476
15485
  spacing: 1.5,
14477
15486
  sx: { flexShrink: 0 },
14478
- children: resolvedInfo ? /* @__PURE__ */ jsxs39(Fragment18, { children: [
14479
- /* @__PURE__ */ jsx49(ChartWidgetHeaderSeparator, {}),
14480
- /* @__PURE__ */ jsx49(
15487
+ children: resolvedInfo ? /* @__PURE__ */ jsxs42(Fragment20, { children: [
15488
+ /* @__PURE__ */ jsx53(ChartWidgetHeaderSeparator, {}),
15489
+ /* @__PURE__ */ jsx53(
14481
15490
  ChartWidgetInfoButton,
14482
15491
  {
14483
15492
  popover: resolvedInfo,
@@ -14490,7 +15499,7 @@ function PeakBillingHours({
14490
15499
  ]
14491
15500
  }
14492
15501
  ),
14493
- /* @__PURE__ */ jsx49(
15502
+ /* @__PURE__ */ jsx53(
14494
15503
  ChartWidgetSegmentedTabs,
14495
15504
  {
14496
15505
  tabs,
@@ -14510,8 +15519,8 @@ function PeakBillingHours({
14510
15519
  inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
14511
15520
  }
14512
15521
  ),
14513
- isLoading ? /* @__PURE__ */ jsx49(Skeleton8, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ jsx49(
14514
- BarPlot,
15522
+ isLoading ? /* @__PURE__ */ jsx53(Skeleton8, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ jsx53(
15523
+ BarPlot2,
14515
15524
  {
14516
15525
  data: chartData,
14517
15526
  yAxisDomain,
@@ -14525,7 +15534,7 @@ function PeakBillingHours({
14525
15534
  xAxisTickStyle,
14526
15535
  barValueLabelAngle
14527
15536
  }
14528
- ) : /* @__PURE__ */ jsx49(
15537
+ ) : /* @__PURE__ */ jsx53(
14529
15538
  ChartEmptyState,
14530
15539
  {
14531
15540
  minHeight: 320,
@@ -14536,10 +15545,10 @@ function PeakBillingHours({
14536
15545
  }
14537
15546
 
14538
15547
  // src/components/widgets/CustomerJourneyAnalysis/CustomerJourneyAnalysis.tsx
14539
- import Box33 from "@mui/material/Box";
14540
- import Stack28 from "@mui/material/Stack";
14541
- import Typography29 from "@mui/material/Typography";
14542
- import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
15548
+ import Box35 from "@mui/material/Box";
15549
+ import Stack30 from "@mui/material/Stack";
15550
+ import Typography31 from "@mui/material/Typography";
15551
+ import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
14543
15552
  var DEFAULT_WALK_INS_BG = "#5B8DEF";
14544
15553
  var DEFAULT_TRIAL_VISITS_BG = "#F59E42";
14545
15554
  var DEFAULT_BILLING_VISITS_BG = "#6EBE7A";
@@ -14587,7 +15596,7 @@ function resolveMetricConfig(shared, perCard, props) {
14587
15596
  sx: perCard?.sx ?? shared?.sx
14588
15597
  };
14589
15598
  }
14590
- function mergeSx4(...items) {
15599
+ function mergeSx5(...items) {
14591
15600
  return items.flatMap(
14592
15601
  (item) => Array.isArray(item) ? item : item ? [item] : []
14593
15602
  );
@@ -14794,17 +15803,17 @@ function CustomerJourneyAnalysis({
14794
15803
  ...Array.isArray(metricsSx) ? metricsSx : metricsSx ? [metricsSx] : []
14795
15804
  ];
14796
15805
  const bodyDirection = { xs: "column", [bodyBreakpoint]: "row" };
14797
- return /* @__PURE__ */ jsx50(Box33, { sx: outerSx, children: /* @__PURE__ */ jsxs40(Stack28, { spacing: 2, children: [
14798
- !hideTitle && /* @__PURE__ */ jsxs40(
14799
- Stack28,
15806
+ return /* @__PURE__ */ jsx54(Box35, { sx: outerSx, children: /* @__PURE__ */ jsxs43(Stack30, { spacing: 2, children: [
15807
+ !hideTitle && /* @__PURE__ */ jsxs43(
15808
+ Stack30,
14800
15809
  {
14801
15810
  direction: "row",
14802
15811
  alignItems: "flex-start",
14803
15812
  justifyContent: "space-between",
14804
15813
  gap: 2,
14805
15814
  children: [
14806
- /* @__PURE__ */ jsx50(
14807
- Typography29,
15815
+ /* @__PURE__ */ jsx54(
15816
+ Typography31,
14808
15817
  {
14809
15818
  component: "h2",
14810
15819
  variant: "h6",
@@ -14817,8 +15826,8 @@ function CustomerJourneyAnalysis({
14817
15826
  children: title
14818
15827
  }
14819
15828
  ),
14820
- headerActions != null ? /* @__PURE__ */ jsx50(
14821
- Box33,
15829
+ headerActions != null ? /* @__PURE__ */ jsx54(
15830
+ Box35,
14822
15831
  {
14823
15832
  sx: {
14824
15833
  flexShrink: 0,
@@ -14832,9 +15841,9 @@ function CustomerJourneyAnalysis({
14832
15841
  ]
14833
15842
  }
14834
15843
  ),
14835
- /* @__PURE__ */ jsxs40(Stack28, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
14836
- /* @__PURE__ */ jsx50(Box33, { sx: stripSx, children: /* @__PURE__ */ jsxs40(Box33, { sx: statCardsRowSx, children: [
14837
- /* @__PURE__ */ jsx50(
15844
+ /* @__PURE__ */ jsxs43(Stack30, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
15845
+ /* @__PURE__ */ jsx54(Box35, { sx: stripSx, children: /* @__PURE__ */ jsxs43(Box35, { sx: statCardsRowSx, children: [
15846
+ /* @__PURE__ */ jsx54(
14838
15847
  JourneyStatCard,
14839
15848
  {
14840
15849
  icon: wiConfig.icon,
@@ -14855,7 +15864,7 @@ function CustomerJourneyAnalysis({
14855
15864
  borderRadius: wiConfig.borderRadius,
14856
15865
  minHeight: wiConfig.minHeight,
14857
15866
  isLoading,
14858
- sx: mergeSx4(
15867
+ sx: mergeSx5(
14859
15868
  {
14860
15869
  flex: statCardFlexes[0],
14861
15870
  borderRadius: `${statStripInnerBorderRadius} 0 0 ${statStripInnerBorderRadius}`
@@ -14864,7 +15873,7 @@ function CustomerJourneyAnalysis({
14864
15873
  )
14865
15874
  }
14866
15875
  ),
14867
- /* @__PURE__ */ jsx50(
15876
+ /* @__PURE__ */ jsx54(
14868
15877
  JourneyStatCard,
14869
15878
  {
14870
15879
  icon: tvConfig.icon,
@@ -14885,10 +15894,10 @@ function CustomerJourneyAnalysis({
14885
15894
  borderRadius: tvConfig.borderRadius,
14886
15895
  minHeight: tvConfig.minHeight,
14887
15896
  isLoading,
14888
- sx: mergeSx4({ flex: statCardFlexes[1] }, tvConfig.sx)
15897
+ sx: mergeSx5({ flex: statCardFlexes[1] }, tvConfig.sx)
14889
15898
  }
14890
15899
  ),
14891
- /* @__PURE__ */ jsx50(
15900
+ /* @__PURE__ */ jsx54(
14892
15901
  JourneyStatCard,
14893
15902
  {
14894
15903
  icon: bvConfig.icon,
@@ -14909,7 +15918,7 @@ function CustomerJourneyAnalysis({
14909
15918
  borderRadius: bvConfig.borderRadius,
14910
15919
  minHeight: bvConfig.minHeight,
14911
15920
  isLoading,
14912
- sx: mergeSx4(
15921
+ sx: mergeSx5(
14913
15922
  {
14914
15923
  flex: statCardFlexes[2],
14915
15924
  borderRadius: `0 ${statStripInnerBorderRadius} ${statStripInnerBorderRadius} 0`
@@ -14919,8 +15928,8 @@ function CustomerJourneyAnalysis({
14919
15928
  }
14920
15929
  )
14921
15930
  ] }) }),
14922
- /* @__PURE__ */ jsx50(Box33, { sx: metricsBoxSx, children: /* @__PURE__ */ jsx50(
14923
- Box33,
15931
+ /* @__PURE__ */ jsx54(Box35, { sx: metricsBoxSx, children: /* @__PURE__ */ jsx54(
15932
+ Box35,
14924
15933
  {
14925
15934
  sx: {
14926
15935
  display: "grid",
@@ -14953,8 +15962,8 @@ function CustomerJourneyAnalysis({
14953
15962
  label: avgBillingPerTrialLabel,
14954
15963
  value: formatAverage(avgBillingPerTrial)
14955
15964
  }
14956
- ].map(({ cfg, label, value }) => /* @__PURE__ */ jsx50(
14957
- Box33,
15965
+ ].map(({ cfg, label, value }) => /* @__PURE__ */ jsx54(
15966
+ Box35,
14958
15967
  {
14959
15968
  sx: {
14960
15969
  bgcolor: metricsCardBg,
@@ -14963,7 +15972,7 @@ function CustomerJourneyAnalysis({
14963
15972
  height: "100%",
14964
15973
  minWidth: 0
14965
15974
  },
14966
- children: /* @__PURE__ */ jsx50(
15975
+ children: /* @__PURE__ */ jsx54(
14967
15976
  JourneyMetricCard,
14968
15977
  {
14969
15978
  label,
@@ -14998,7 +16007,7 @@ import {
14998
16007
  createTheme,
14999
16008
  responsiveFontSizes
15000
16009
  } from "@mui/material/styles";
15001
- import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
16010
+ import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
15002
16011
  var lightColor = "51, 48, 60";
15003
16012
  var darkColor = "228, 230, 244";
15004
16013
  var darkPaperBg = "#2F3349";
@@ -15078,8 +16087,8 @@ var FalconThemeProvider = ({
15078
16087
  mixins: { toolbar: { minHeight: 64 } }
15079
16088
  })
15080
16089
  );
15081
- return /* @__PURE__ */ jsxs41(ThemeProvider, { theme, children: [
15082
- /* @__PURE__ */ jsx51(CssBaseline, {}),
16090
+ return /* @__PURE__ */ jsxs44(ThemeProvider, { theme, children: [
16091
+ /* @__PURE__ */ jsx55(CssBaseline, {}),
15083
16092
  children
15084
16093
  ] });
15085
16094
  };
@@ -15102,6 +16111,7 @@ export {
15102
16111
  DEFAULT_FOOTFALL_TILE_ICONS,
15103
16112
  DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
15104
16113
  DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
16114
+ DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
15105
16115
  FalconAuditTimeline,
15106
16116
  FalconButton,
15107
16117
  FalconDIstrictFilter,
@@ -15140,6 +16150,17 @@ export {
15140
16150
  QueueTimeBreakdownStackedBar,
15141
16151
  TimePeriodFilter as QueueTimePeriodFilter,
15142
16152
  RankedBarList,
16153
+ STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
16154
+ STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
16155
+ STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
16156
+ STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
16157
+ STACKED_COMPARISON_DEFAULT_STACK_COLORS,
16158
+ STORE_PERFORMANCE_DEFAULT_BUCKETS,
16159
+ STORE_PERFORMANCE_DEFAULT_DATA,
16160
+ StackedComparisonBarChart,
16161
+ StackedComparisonBarChartCustomizationProvider,
16162
+ StackedComparisonBarChartTooltip,
16163
+ StorePerformanceByAssist,
15143
16164
  TIME_PERIOD_FILTER_INFO_POPOVER,
15144
16165
  TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
15145
16166
  TimePeriodFilter,
@@ -15171,9 +16192,12 @@ export {
15171
16192
  peakBillingHoursVisitsMock,
15172
16193
  preprocessData,
15173
16194
  skipSingleBranchLevels,
16195
+ mergeCss7 as stackedComparisonMergeCss,
16196
+ mergeSx4 as stackedComparisonMergeSx,
15174
16197
  toRechartsTreemapData,
15175
16198
  useBillingCounterAnalyticsCustomization,
15176
16199
  usePeakBillingHoursCustomization,
15177
- useQueueTimeBreakdownCustomization
16200
+ useQueueTimeBreakdownCustomization,
16201
+ useStackedComparisonBarChartCustomization
15178
16202
  };
15179
16203
  //# sourceMappingURL=index.mjs.map