@bpfdev/oly-ui 1.0.13 → 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",
@@ -10967,6 +10972,10 @@ function LinePlot({
10967
10972
  left: lc?.margin?.left ?? 4
10968
10973
  };
10969
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";
10970
10979
  const yFill = lc?.yAxisTickFill ?? OLY_DEFAULT_CHART_AXIS_TICK_FILL;
10971
10980
  const yWidth = lc?.yAxisWidth ?? 36;
10972
10981
  const cursorStroke = lc?.cursorStroke ?? "#9CA3AF";
@@ -10985,13 +10994,15 @@ function LinePlot({
10985
10994
  XAxis5,
10986
10995
  {
10987
10996
  dataKey: "label",
10988
- tick: { fill: xFill, fontSize: 11 },
10997
+ tick: { fill: xFill, fontSize: 11, style: xTickStyle },
10989
10998
  tickLine: false,
10990
10999
  axisLine: {
10991
11000
  stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME5.axisTickLineStroke
10992
11001
  },
10993
11002
  interval: 0,
10994
- height: 40
11003
+ height: xAxisHeight,
11004
+ angle: xTickAngle,
11005
+ textAnchor: xTickAnchor
10995
11006
  }
10996
11007
  ),
10997
11008
  /* @__PURE__ */ jsx39(
@@ -11279,6 +11290,7 @@ var QueueTimeBreakdownArea = ({
11279
11290
  () => mergeAreaData(series, xAxis),
11280
11291
  [series, xAxis]
11281
11292
  );
11293
+ const fill = ac?.fillHeight ?? false;
11282
11294
  const stackH = ac?.stackHeightPx ?? 330;
11283
11295
  const chartH = ac?.chartHeightPx ?? 350;
11284
11296
  const margin = React20.useMemo(
@@ -11298,90 +11310,102 @@ var QueueTimeBreakdownArea = ({
11298
11310
  }, [chartData, series]);
11299
11311
  const yDomain = allZero ? [0, 16e3] : [0, "auto"];
11300
11312
  const yTickCount = allZero ? 5 : void 0;
11301
- return /* @__PURE__ */ jsx41(Stack21, { justifyContent: "center", height: stackH, children: /* @__PURE__ */ jsx41(ResponsiveContainer3, { width: "100%", height: chartH, children: /* @__PURE__ */ jsxs32(AreaChart, { data: chartData, margin, children: [
11302
- /* @__PURE__ */ jsx41(
11303
- CartesianGrid6,
11304
- {
11305
- strokeDasharray: "3 3",
11306
- stroke: gridStroke,
11307
- vertical: false
11308
- }
11309
- ),
11310
- /* @__PURE__ */ jsx41(
11311
- XAxis6,
11312
- {
11313
- dataKey: "name",
11314
- tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11315
- axisLine: false,
11316
- tickLine: false
11317
- }
11318
- ),
11319
- /* @__PURE__ */ jsx41(
11320
- YAxis6,
11321
- {
11322
- domain: yDomain,
11323
- tickCount: yTickCount,
11324
- tick: { fill: theme.palette.text.secondary, fontSize: 11 },
11325
- axisLine: false,
11326
- tickLine: false,
11327
- tickFormatter: (v) => {
11328
- const n = typeof v === "number" ? v : Number(v);
11329
- const safe = Number.isFinite(n) ? n : 0;
11330
- return safe > 1e3 ? `${Math.ceil(safe / 1e3)}k` : String(safe);
11331
- },
11332
- label: {
11333
- value: yLabel,
11334
- angle: -90,
11335
- position: "insideLeft",
11336
- style: { fill: theme.palette.text.secondary, fontSize: 11 }
11337
- }
11338
- }
11339
- ),
11340
- series.map((s, i) => /* @__PURE__ */ jsx41(
11341
- Area,
11342
- {
11343
- type: "monotone",
11344
- dataKey: s.name,
11345
- stackId: "queueArea",
11346
- stroke: palette[i % palette.length],
11347
- fill: palette[i % palette.length],
11348
- fillOpacity: 1,
11349
- strokeWidth: 0
11350
- },
11351
- s.name
11352
- )),
11353
- /* @__PURE__ */ jsx41(
11354
- Tooltip9,
11355
- {
11356
- content: (tooltipProps) => {
11357
- if (renderTooltip) {
11358
- const custom = renderTooltip({
11359
- tooltipProps,
11360
- chartData,
11361
- series,
11362
- xAxis
11363
- });
11364
- 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
11365
11330
  }
11366
- const { active, payload, label } = tooltipProps;
11367
- return /* @__PURE__ */ jsx41(
11368
- QueueTimeBreakdownAreaTooltip,
11369
- {
11370
- active,
11371
- label,
11372
- payload,
11373
- 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 }
11374
11359
  }
11375
- );
11376
- },
11377
- cursor: {
11378
- stroke: ac?.cursorStroke ?? "#D4D4D8",
11379
- strokeWidth: ac?.cursorStrokeWidth ?? 1
11380
- },
11381
- wrapperStyle: { outline: "none" }
11382
- }
11383
- )
11384
- ] }) }) });
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
+ );
11385
11409
  };
11386
11410
  var QueueTimeBreakdownArea_default = QueueTimeBreakdownArea;
11387
11411
  var xDays = [
@@ -11562,10 +11586,10 @@ function DonutInnerPercentLabel(props) {
11562
11586
  );
11563
11587
  }
11564
11588
  var DEFAULT_LABELS = [
11565
- "0-20 years old (male)",
11566
- "21-45 years old (male)",
11567
- "46-60 years old (male)",
11568
- "60+ years old (male)"
11589
+ "1-15 mins",
11590
+ "16-30 mins",
11591
+ "30-45 mins",
11592
+ "> 45 mins"
11569
11593
  ];
11570
11594
  function QueueTimeBreakdownDonut({
11571
11595
  chartFilter,
@@ -11585,8 +11609,9 @@ function QueueTimeBreakdownDonut({
11585
11609
  const padAngle = dn?.paddingAngle ?? 0;
11586
11610
  const chartH = dn?.chartHeightPx ?? 220;
11587
11611
  const pieData = React21.useMemo(() => {
11588
- return labels.map((name, i) => ({
11589
- name,
11612
+ const count = Math.max(averageData.length, labels.length);
11613
+ return Array.from({ length: count }, (_, i) => ({
11614
+ name: labels[i] ?? `Bucket ${i + 1}`,
11590
11615
  value: Math.max(0, averageData[i] ?? 0)
11591
11616
  }));
11592
11617
  }, [averageData, labels]);
@@ -12069,6 +12094,9 @@ function QueueTimeBreakdown({
12069
12094
  data,
12070
12095
  Donut_data,
12071
12096
  donutYesterdayData,
12097
+ donutLabels,
12098
+ areaSeries,
12099
+ areaXAxis,
12072
12100
  headerImageSrc,
12073
12101
  headlineTotal = "14,123",
12074
12102
  headlineSubtitle = "Queue Time Breakdown Of All Visitors",
@@ -12093,6 +12121,12 @@ function QueueTimeBreakdown({
12093
12121
  () => data.some((row) => row.data.some((seg) => (seg.data[0] ?? 0) > 0)),
12094
12122
  [data]
12095
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
+ );
12096
12130
  const palette = customization?.chartPalette && customization.chartPalette.length > 0 ? customization.chartPalette : QUEUE_CHART_COLORS;
12097
12131
  const legend = queueBucketLegend ?? defaultBucketLegendFromPalette(palette);
12098
12132
  const resolvedHeaderImageSrc = headerImageSrc === void 0 ? QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC : headerImageSrc;
@@ -12110,234 +12144,245 @@ function QueueTimeBreakdown({
12110
12144
  { fontWeight: 700, color: "#0f172a" },
12111
12145
  customization?.periodFilter?.titleSx
12112
12146
  );
12113
- 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: [
12114
- /* @__PURE__ */ jsxs35(
12115
- Stack24,
12116
- {
12117
- direction: "row",
12118
- alignItems: "center",
12119
- justifyContent: "space-between",
12120
- flexWrap: "wrap",
12121
- gap: 2,
12122
- width: "100%",
12123
- children: [
12124
- /* @__PURE__ */ jsx44(
12125
- Typography25,
12126
- {
12127
- variant: isSmallScreen ? "subtitle2" : "body1",
12128
- sx: periodTitleSx,
12129
- children: title
12130
- }
12131
- ),
12132
- /* @__PURE__ */ jsx44(
12133
- TimePeriodFilter,
12134
- {
12135
- selectedFilter: filter,
12136
- onFilterChange: setFilter,
12137
- infoPopover: resolvedPeriodInfoPopover
12138
- }
12139
- )
12140
- ]
12141
- }
12142
- ),
12143
- /* @__PURE__ */ jsx44(Box30, { children: /* @__PURE__ */ jsxs35(Grid, { container: true, spacing: 3, children: [
12144
- /* @__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: [
12145
12155
  /* @__PURE__ */ jsxs35(
12146
12156
  Stack24,
12147
12157
  {
12148
- gap: 1,
12149
- sx: mergeSx2(customization?.leftColumn?.columnStackSx),
12158
+ direction: "row",
12159
+ alignItems: "center",
12160
+ justifyContent: "space-between",
12161
+ flexWrap: "wrap",
12162
+ gap: 2,
12163
+ width: "100%",
12150
12164
  children: [
12151
- /* @__PURE__ */ jsx44(Stack24, { children: /* @__PURE__ */ jsxs35(
12152
- Stack24,
12165
+ /* @__PURE__ */ jsx44(
12166
+ Typography25,
12153
12167
  {
12154
- direction: "row",
12155
- gap: 4,
12156
- justifyContent: "start",
12157
- alignItems: "center",
12158
- children: [
12159
- resolvedHeaderImageSrc ? /* @__PURE__ */ jsx44(
12160
- Box30,
12161
- {
12162
- component: "img",
12163
- src: resolvedHeaderImageSrc,
12164
- alt: "",
12165
- width: 52,
12166
- height: 52,
12167
- sx: { objectFit: "contain" }
12168
- }
12169
- ) : null,
12170
- /* @__PURE__ */ jsxs35(Stack24, { children: [
12171
- /* @__PURE__ */ jsx44(
12172
- Typography25,
12173
- {
12174
- sx: mergeSx2(
12175
- {
12176
- fontSize: "20px",
12177
- fontWeight: 600,
12178
- color: "#222222"
12179
- },
12180
- customization?.header?.headlineSx
12181
- ),
12182
- children: headlineTotal
12183
- }
12184
- ),
12185
- /* @__PURE__ */ jsxs35(Stack24, { direction: "row", alignItems: "center", gap: 1, children: [
12186
- /* @__PURE__ */ jsx44(
12187
- Typography25,
12188
- {
12189
- sx: mergeSx2(
12190
- {
12191
- fontSize: "11px",
12192
- fontWeight: 400,
12193
- color: "#222222"
12194
- },
12195
- customization?.header?.subtitleSx
12196
- ),
12197
- children: headlineSubtitle
12198
- }
12199
- ),
12200
- resolvedHeadlineInfoPopover ? /* @__PURE__ */ jsx44(
12201
- ChartWidgetInfoButton,
12202
- {
12203
- density: "compact",
12204
- popover: resolvedHeadlineInfoPopover,
12205
- ariaLabel: "Queue time breakdown information"
12206
- }
12207
- ) : null
12208
- ] })
12209
- ] })
12210
- ]
12168
+ variant: isSmallScreen ? "subtitle2" : "body1",
12169
+ sx: periodTitleSx,
12170
+ children: title
12211
12171
  }
12212
- ) }),
12172
+ ),
12213
12173
  /* @__PURE__ */ jsx44(
12214
- Stack24,
12174
+ TimePeriodFilter,
12215
12175
  {
12216
- sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
12217
- children: data.map((item) => /* @__PURE__ */ jsx44(
12218
- QueueTimeBreakdownStackedBar,
12219
- {
12220
- row: item,
12221
- legendRows: legend,
12222
- renderTooltip: renderStackedBarTooltip
12223
- },
12224
- item.name
12225
- ))
12176
+ selectedFilter: filter,
12177
+ onFilterChange: setFilter,
12178
+ infoPopover: resolvedPeriodInfoPopover
12226
12179
  }
12227
12180
  )
12228
12181
  ]
12229
12182
  }
12230
12183
  ),
12231
- /* @__PURE__ */ jsx44(
12232
- Typography25,
12233
- {
12234
- sx: mergeSx2(
12235
- {
12236
- marginTop: "10px",
12237
- fontSize: "14px",
12238
- fontWeight: 500,
12239
- color: "#222222"
12240
- },
12241
- customization?.dataComparison?.titleSx
12242
- ),
12243
- children: dataComparisonTitle
12244
- }
12245
- ),
12246
- /* @__PURE__ */ jsx44(
12247
- Card3,
12248
- {
12249
- elevation: 0,
12250
- sx: mergeSx2(
12251
- {
12252
- cursor: "pointer",
12253
- marginTop: "10px",
12254
- bgcolor: "#FFFFFF",
12255
- border: "1px solid #E5E7EB",
12256
- borderRadius: 2
12257
- },
12258
- customization?.dataComparison?.cardSx
12259
- ),
12260
- 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(
12261
12187
  Stack24,
12262
12188
  {
12263
- direction: "row",
12264
- justifyContent: "space-evenly",
12265
- alignItems: "center",
12189
+ gap: 1,
12190
+ sx: mergeSx2(customization?.leftColumn?.columnStackSx),
12266
12191
  children: [
12267
- /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12268
- QueueTimeBreakdownDonut,
12192
+ /* @__PURE__ */ jsx44(Stack24, { children: /* @__PURE__ */ jsxs35(
12193
+ Stack24,
12269
12194
  {
12270
- averageData: Donut_data,
12271
- chartFilter: filter,
12272
- LabelName: "Today",
12273
- 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
+ ]
12274
12252
  }
12275
12253
  ) }),
12276
12254
  /* @__PURE__ */ jsx44(
12277
- Box30,
12255
+ Stack24,
12278
12256
  {
12279
- component: "span",
12280
- sx: mergeSx2(
12257
+ sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
12258
+ children: data.map((item) => /* @__PURE__ */ jsx44(
12259
+ QueueTimeBreakdownStackedBar,
12281
12260
  {
12282
- height: "180px",
12283
- width: "2px",
12284
- backgroundColor: "#D8D9E4",
12285
- display: "inline-block"
12261
+ row: item,
12262
+ legendRows: legend,
12263
+ renderTooltip: renderStackedBarTooltip
12286
12264
  },
12287
- customization?.dataComparison?.dividerSx
12288
- )
12289
- }
12290
- ),
12291
- /* @__PURE__ */ jsx44(Stack24, { width: "50%", children: /* @__PURE__ */ jsx44(
12292
- QueueTimeBreakdownDonut,
12293
- {
12294
- averageData: yesterdayDonut,
12295
- chartFilter: filter,
12296
- LabelName: "Yesterday",
12297
- renderTooltip: renderDonutTooltip
12265
+ item.name
12266
+ ))
12298
12267
  }
12299
- ) })
12268
+ )
12300
12269
  ]
12301
12270
  }
12302
- ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 220 }) })
12303
- }
12304
- )
12305
- ] }),
12306
- /* @__PURE__ */ jsx44(Grid, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ jsx44(
12307
- Card3,
12308
- {
12309
- elevation: 0,
12310
- sx: mergeSx2(
12311
- {
12312
- cursor: "pointer",
12313
- borderRadius: "8px",
12314
- border: "1px solid #E5E7EB",
12315
- bgcolor: "#FFFFFF",
12316
- height: "100%"
12317
- },
12318
- customization?.areaChart?.cardSx
12319
- ),
12320
- children: /* @__PURE__ */ jsx44(
12321
- 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,
12322
12351
  {
12352
+ elevation: 0,
12323
12353
  sx: mergeSx2(
12324
- { padding: "10px 8px" },
12325
- 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
12326
12362
  ),
12327
- children: hasBarData ? /* @__PURE__ */ jsx44(
12328
- QueueTimeBreakdownArea_default,
12363
+ children: /* @__PURE__ */ jsx44(
12364
+ CardContent2,
12329
12365
  {
12330
- series: getQueueTimeBreakdownAreaSeriesData(filter),
12331
- xAxis: getQueueTimeBreakdownAreaXAxisData(filter),
12332
- 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 })
12333
12378
  }
12334
- ) : /* @__PURE__ */ jsx44(ChartEmptyState, { minHeight: 330 })
12379
+ )
12335
12380
  }
12336
- )
12337
- }
12338
- ) })
12339
- ] }) })
12340
- ] }) }) }) });
12381
+ ) })
12382
+ ] }) })
12383
+ ]
12384
+ }
12385
+ ) }) }) });
12341
12386
  }
12342
12387
 
12343
12388
  // src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
@@ -13366,7 +13411,8 @@ function rowFromHeuristicLabel(zoneName, total) {
13366
13411
  }));
13367
13412
  return { id, label: zoneName, value: a + b + c + d, segments };
13368
13413
  }
13369
- function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
13414
+ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow, options) {
13415
+ const includeZeroValueRows = options?.includeZeroValueRows ?? false;
13370
13416
  const buildRow = (node, role, total, fallback) => {
13371
13417
  if (buildBarRow) {
13372
13418
  const custom = buildBarRow({ node, activeZone, role, total });
@@ -13376,7 +13422,7 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
13376
13422
  };
13377
13423
  if (activeZone) {
13378
13424
  const childRowsSource = (activeZone.list ?? []).filter(
13379
- (n) => parseVisitorCount(n.overallData?.count) > 0
13425
+ (n) => includeZeroValueRows ? true : parseVisitorCount(n.overallData?.count) > 0
13380
13426
  );
13381
13427
  if (childRowsSource.length > 0) {
13382
13428
  const items = childRowsSource.map((node) => {
@@ -14319,7 +14365,8 @@ function FootFallHeatMapView({
14319
14365
  return deriveFootfallHeatMapKpiStrip(
14320
14366
  activeZoneForStrip,
14321
14367
  data.current ?? [],
14322
- kpiStripPresentation?.buildBarRow
14368
+ kpiStripPresentation?.buildBarRow,
14369
+ { includeZeroValueRows: kpiStripPresentation?.includeZeroValueRows }
14323
14370
  );
14324
14371
  }, [
14325
14372
  isLoading,
@@ -14327,7 +14374,8 @@ function FootFallHeatMapView({
14327
14374
  initialData,
14328
14375
  trackingDetails,
14329
14376
  data,
14330
- kpiStripPresentation?.buildBarRow
14377
+ kpiStripPresentation?.buildBarRow,
14378
+ kpiStripPresentation?.includeZeroValueRows
14331
14379
  ]);
14332
14380
  const formatPercentage = (value) => {
14333
14381
  if (typeof value !== "number") return "0%";