@bpfdev/oly-ui 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +355 -10
- package/dist/index.d.ts +355 -10
- package/dist/index.js +1255 -202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1423 -377
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3901,7 +3901,7 @@ var FalconAuditTimeline = ({
|
|
|
3901
3901
|
date: run.date,
|
|
3902
3902
|
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
3903
3903
|
status: run.status === "done" ? "completed" : "upcoming",
|
|
3904
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
3904
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date, run) : void 0,
|
|
3905
3905
|
brandFont,
|
|
3906
3906
|
interFont,
|
|
3907
3907
|
completedColor,
|
|
@@ -3939,7 +3939,16 @@ var FalconAuditTimeline = ({
|
|
|
3939
3939
|
date: `${activeMonth.label} 5`,
|
|
3940
3940
|
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
3941
3941
|
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
3942
|
-
onExportClick: onExportReportClick ? (e) =>
|
|
3942
|
+
onExportClick: onExportReportClick ? (e) => {
|
|
3943
|
+
const date = `${activeMonth.label} 5`;
|
|
3944
|
+
onExportReportClick(e, date, {
|
|
3945
|
+
run_number: precedingEvents + 1,
|
|
3946
|
+
date,
|
|
3947
|
+
month: activeMonth.label,
|
|
3948
|
+
year: activeMonth.year,
|
|
3949
|
+
status: isFirstActiveMonth ? "done" : "scheduled"
|
|
3950
|
+
});
|
|
3951
|
+
} : void 0,
|
|
3943
3952
|
brandFont,
|
|
3944
3953
|
interFont,
|
|
3945
3954
|
completedColor,
|
|
@@ -6882,7 +6891,8 @@ function StackTotalLabel({
|
|
|
6882
6891
|
width,
|
|
6883
6892
|
height,
|
|
6884
6893
|
index,
|
|
6885
|
-
stackTotalFill
|
|
6894
|
+
stackTotalFill,
|
|
6895
|
+
angle = 0
|
|
6886
6896
|
}) {
|
|
6887
6897
|
const nx = toNum(x);
|
|
6888
6898
|
const ny = toNum(y);
|
|
@@ -6896,6 +6906,7 @@ function StackTotalLabel({
|
|
|
6896
6906
|
const total = rowTotal(row, series);
|
|
6897
6907
|
const cx = nx + nw / 2;
|
|
6898
6908
|
const cy = ny - 10;
|
|
6909
|
+
const isHorizontal = angle === 0;
|
|
6899
6910
|
return /* @__PURE__ */ jsx32(
|
|
6900
6911
|
"text",
|
|
6901
6912
|
{
|
|
@@ -6904,7 +6915,8 @@ function StackTotalLabel({
|
|
|
6904
6915
|
fill: stackTotalFill,
|
|
6905
6916
|
fontSize: 12,
|
|
6906
6917
|
fontWeight: 500,
|
|
6907
|
-
textAnchor: "middle",
|
|
6918
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
6919
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
6908
6920
|
children: formatBarLabel(total)
|
|
6909
6921
|
}
|
|
6910
6922
|
);
|
|
@@ -6955,7 +6967,8 @@ function FootfallByAgeGroups({
|
|
|
6955
6967
|
barStackId = "footfall-by-age-groups",
|
|
6956
6968
|
xAxisTickAngle = 0,
|
|
6957
6969
|
xAxisTickDx = 0,
|
|
6958
|
-
xAxisTickStyle
|
|
6970
|
+
xAxisTickStyle,
|
|
6971
|
+
barValueLabelAngle = 0
|
|
6959
6972
|
}) {
|
|
6960
6973
|
const [activeIndex, setActiveIndex] = React11.useState(null);
|
|
6961
6974
|
const handleMouseEnter = React11.useCallback((_, index) => {
|
|
@@ -7298,7 +7311,8 @@ function FootfallByAgeGroups({
|
|
|
7298
7311
|
...labelProps,
|
|
7299
7312
|
series,
|
|
7300
7313
|
rows: processedData,
|
|
7301
|
-
stackTotalFill: chartColors.stackTotalLabelFill
|
|
7314
|
+
stackTotalFill: chartColors.stackTotalLabelFill,
|
|
7315
|
+
angle: barValueLabelAngle
|
|
7302
7316
|
}
|
|
7303
7317
|
)
|
|
7304
7318
|
}
|
|
@@ -8515,7 +8529,8 @@ function BarTopLabel({
|
|
|
8515
8529
|
y,
|
|
8516
8530
|
width,
|
|
8517
8531
|
value,
|
|
8518
|
-
fill
|
|
8532
|
+
fill,
|
|
8533
|
+
angle = 0
|
|
8519
8534
|
}) {
|
|
8520
8535
|
const nx = toNum3(x);
|
|
8521
8536
|
const ny = toNum3(y);
|
|
@@ -8529,6 +8544,7 @@ function BarTopLabel({
|
|
|
8529
8544
|
}
|
|
8530
8545
|
const cx = nx + nw / 2;
|
|
8531
8546
|
const cy = ny - 10;
|
|
8547
|
+
const isHorizontal = angle === 0;
|
|
8532
8548
|
return /* @__PURE__ */ jsx34(
|
|
8533
8549
|
"text",
|
|
8534
8550
|
{
|
|
@@ -8537,7 +8553,8 @@ function BarTopLabel({
|
|
|
8537
8553
|
fill,
|
|
8538
8554
|
fontSize: 12,
|
|
8539
8555
|
fontWeight: 500,
|
|
8540
|
-
textAnchor: "middle",
|
|
8556
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
8557
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
8541
8558
|
children: formatBarLabel3(n)
|
|
8542
8559
|
}
|
|
8543
8560
|
);
|
|
@@ -8801,6 +8818,7 @@ function PasserbyConversion({
|
|
|
8801
8818
|
showLegend = true,
|
|
8802
8819
|
showConversionLine: showConversionLineProp,
|
|
8803
8820
|
showBarValueLabels = true,
|
|
8821
|
+
barValueLabelAngle = 0,
|
|
8804
8822
|
chartMargin: chartMarginProp,
|
|
8805
8823
|
yAxisTickDx = -8,
|
|
8806
8824
|
yAxisTickStyle,
|
|
@@ -9277,7 +9295,8 @@ function PasserbyConversion({
|
|
|
9277
9295
|
BarTopLabel,
|
|
9278
9296
|
{
|
|
9279
9297
|
...props,
|
|
9280
|
-
fill: chartColors.barValueLabelFill
|
|
9298
|
+
fill: chartColors.barValueLabelFill,
|
|
9299
|
+
angle: barValueLabelAngle
|
|
9281
9300
|
}
|
|
9282
9301
|
)
|
|
9283
9302
|
}
|
|
@@ -9313,7 +9332,8 @@ function PasserbyConversion({
|
|
|
9313
9332
|
BarTopLabel,
|
|
9314
9333
|
{
|
|
9315
9334
|
...props,
|
|
9316
|
-
fill: chartColors.barValueLabelFill
|
|
9335
|
+
fill: chartColors.barValueLabelFill,
|
|
9336
|
+
angle: barValueLabelAngle
|
|
9317
9337
|
}
|
|
9318
9338
|
)
|
|
9319
9339
|
}
|
|
@@ -9981,7 +10001,8 @@ function BarTopLabel2({
|
|
|
9981
10001
|
y,
|
|
9982
10002
|
width,
|
|
9983
10003
|
value,
|
|
9984
|
-
fill
|
|
10004
|
+
fill,
|
|
10005
|
+
angle = 0
|
|
9985
10006
|
}) {
|
|
9986
10007
|
const nx = toNum4(x);
|
|
9987
10008
|
const ny = toNum4(y);
|
|
@@ -9995,6 +10016,7 @@ function BarTopLabel2({
|
|
|
9995
10016
|
}
|
|
9996
10017
|
const cx = nx + nw / 2;
|
|
9997
10018
|
const cy = ny - 10;
|
|
10019
|
+
const isHorizontal = angle === 0;
|
|
9998
10020
|
return /* @__PURE__ */ jsx36(
|
|
9999
10021
|
"text",
|
|
10000
10022
|
{
|
|
@@ -10003,7 +10025,8 @@ function BarTopLabel2({
|
|
|
10003
10025
|
fill,
|
|
10004
10026
|
fontSize: 12,
|
|
10005
10027
|
fontWeight: 500,
|
|
10006
|
-
textAnchor: "middle",
|
|
10028
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
10029
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
10007
10030
|
children: formatBarLabel4(n)
|
|
10008
10031
|
}
|
|
10009
10032
|
);
|
|
@@ -10269,6 +10292,7 @@ function WalkinTraffic({
|
|
|
10269
10292
|
showTrendLine: showTrendLineProp,
|
|
10270
10293
|
showLineInLegend = false,
|
|
10271
10294
|
showBarValueLabels = true,
|
|
10295
|
+
barValueLabelAngle = 0,
|
|
10272
10296
|
chartMargin: chartMarginProp,
|
|
10273
10297
|
yAxisTickDx = -8,
|
|
10274
10298
|
yAxisTickStyle,
|
|
@@ -10661,7 +10685,8 @@ function WalkinTraffic({
|
|
|
10661
10685
|
BarTopLabel2,
|
|
10662
10686
|
{
|
|
10663
10687
|
...props,
|
|
10664
|
-
fill: chartColors.barValueLabelFill
|
|
10688
|
+
fill: chartColors.barValueLabelFill,
|
|
10689
|
+
angle: barValueLabelAngle
|
|
10665
10690
|
}
|
|
10666
10691
|
)
|
|
10667
10692
|
}
|
|
@@ -12315,168 +12340,1159 @@ function QueueTimeBreakdown({
|
|
|
12315
12340
|
] }) }) }) });
|
|
12316
12341
|
}
|
|
12317
12342
|
|
|
12318
|
-
// src/components/
|
|
12319
|
-
|
|
12343
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
|
|
12344
|
+
var STACKED_COMPARISON_DEFAULT_STACK_COLORS = [
|
|
12345
|
+
"#CFE0FB",
|
|
12346
|
+
"#7FB1F0",
|
|
12347
|
+
"#3D7CDF",
|
|
12348
|
+
"#1E2A5E"
|
|
12349
|
+
];
|
|
12350
|
+
var STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR = "#F47C7C";
|
|
12351
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR = "#2563EB";
|
|
12352
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR = "#EF4444";
|
|
12353
|
+
var STACKED_COMPARISON_DEFAULT_FRAME_BORDER = "#EAECEF";
|
|
12354
|
+
|
|
12355
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12356
|
+
import Box31 from "@mui/material/Box";
|
|
12357
|
+
import ButtonBase2 from "@mui/material/ButtonBase";
|
|
12358
|
+
import Stack25 from "@mui/material/Stack";
|
|
12359
|
+
import Typography26 from "@mui/material/Typography";
|
|
12360
|
+
import * as React25 from "react";
|
|
12320
12361
|
import {
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12325
|
-
Skeleton as Skeleton7,
|
|
12326
|
-
Stack as Stack25,
|
|
12362
|
+
Bar as Bar5,
|
|
12363
|
+
BarChart as BarChart3,
|
|
12364
|
+
CartesianGrid as CartesianGrid7,
|
|
12365
|
+
ResponsiveContainer as ResponsiveContainer5,
|
|
12327
12366
|
Tooltip as Tooltip12,
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
import { useEffect as useEffect3, useMemo as useMemo19, useState as useState17 } from "react";
|
|
12332
|
-
import { ResponsiveContainer as ResponsiveContainer5, Treemap } from "recharts";
|
|
12333
|
-
|
|
12334
|
-
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
12335
|
-
var DEFAULT_FOOTFALL_TILE_ICONS = {
|
|
12336
|
-
visitors: "fluent:people-community-16-filled",
|
|
12337
|
-
dwell: "clarity:clock-solid",
|
|
12338
|
-
headerInfo: "mdi:information-outline"
|
|
12339
|
-
};
|
|
12367
|
+
XAxis as XAxis7,
|
|
12368
|
+
YAxis as YAxis7
|
|
12369
|
+
} from "recharts";
|
|
12340
12370
|
|
|
12341
|
-
// src/components/
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
"#F4C20D",
|
|
12346
|
-
"#6D6ED7"
|
|
12347
|
-
];
|
|
12348
|
-
var DEFAULT_SEGMENT_LABELS = [
|
|
12349
|
-
"Walk-by",
|
|
12350
|
-
"Browsing",
|
|
12351
|
-
"Engaged",
|
|
12352
|
-
"Converted"
|
|
12353
|
-
];
|
|
12354
|
-
function parseVisitorCount(raw) {
|
|
12355
|
-
if (typeof raw === "number" && Number.isFinite(raw)) return raw;
|
|
12356
|
-
if (typeof raw === "string") {
|
|
12357
|
-
const n = Number(String(raw).replace(/[^\d.]/g, ""));
|
|
12358
|
-
return Number.isFinite(n) ? n : 0;
|
|
12371
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChartCustomization.merge.ts
|
|
12372
|
+
function mergeCss7(a, b) {
|
|
12373
|
+
if (!b) {
|
|
12374
|
+
return { ...a };
|
|
12359
12375
|
}
|
|
12360
|
-
return
|
|
12376
|
+
return { ...a, ...b };
|
|
12361
12377
|
}
|
|
12362
|
-
function
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12378
|
+
function mergeSx4(...parts) {
|
|
12379
|
+
const flat = parts.filter(Boolean);
|
|
12380
|
+
if (flat.length === 0) {
|
|
12381
|
+
return void 0;
|
|
12382
|
+
}
|
|
12383
|
+
if (flat.length === 1) {
|
|
12384
|
+
return flat[0];
|
|
12385
|
+
}
|
|
12386
|
+
return flat.flat();
|
|
12369
12387
|
}
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12388
|
+
|
|
12389
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartCustomizationContext.tsx
|
|
12390
|
+
import * as React24 from "react";
|
|
12391
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
12392
|
+
var StackedComparisonBarChartCustomizationContext = React24.createContext({});
|
|
12393
|
+
function StackedComparisonBarChartCustomizationProvider({
|
|
12394
|
+
value,
|
|
12395
|
+
children
|
|
12396
|
+
}) {
|
|
12397
|
+
const memo = React24.useMemo(() => value, [value]);
|
|
12398
|
+
return /* @__PURE__ */ jsx45(StackedComparisonBarChartCustomizationContext.Provider, { value: memo, children });
|
|
12380
12399
|
}
|
|
12381
|
-
function
|
|
12382
|
-
|
|
12383
|
-
const id = `zone-heuristic-${encodeURIComponent(zoneName)}`;
|
|
12384
|
-
const segments = [a, b, c, d].map((value, i) => ({
|
|
12385
|
-
id: `${id}-seg-${i}`,
|
|
12386
|
-
label: DEFAULT_SEGMENT_LABELS[i],
|
|
12387
|
-
value,
|
|
12388
|
-
color: ZONE_SEGMENT_COLORS[i]
|
|
12389
|
-
}));
|
|
12390
|
-
return { id, label: zoneName, value: a + b + c + d, segments };
|
|
12400
|
+
function useStackedComparisonBarChartCustomization() {
|
|
12401
|
+
return React24.useContext(StackedComparisonBarChartCustomizationContext);
|
|
12391
12402
|
}
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12403
|
+
|
|
12404
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartTooltip.tsx
|
|
12405
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12406
|
+
function fmt(n) {
|
|
12407
|
+
return new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(n);
|
|
12408
|
+
}
|
|
12409
|
+
function StackedComparisonBarChartTooltip({
|
|
12410
|
+
active,
|
|
12411
|
+
row,
|
|
12412
|
+
buckets,
|
|
12413
|
+
bucketColors,
|
|
12414
|
+
comparisonColor,
|
|
12415
|
+
stackedTotalLabel,
|
|
12416
|
+
comparisonLabel
|
|
12417
|
+
}) {
|
|
12418
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12419
|
+
const tt = bc?.tooltip;
|
|
12420
|
+
if (!active || !row) {
|
|
12421
|
+
return null;
|
|
12422
|
+
}
|
|
12423
|
+
const borderColor = tt?.borderColor ?? "#E5E7EB";
|
|
12424
|
+
const radius = tt?.borderRadiusPx ?? 10;
|
|
12425
|
+
const shadow = tt?.boxShadow ?? "0 8px 24px rgba(15, 23, 42, 0.12)";
|
|
12426
|
+
const bg = tt?.backgroundColor ?? "#FFFFFF";
|
|
12427
|
+
const pad = tt?.paddingPx ?? 14;
|
|
12428
|
+
const bucketNameColor = tt?.bucketNameColor ?? "#0F172A";
|
|
12429
|
+
const bucketValueColor = tt?.bucketValueColor ?? "#0F172A";
|
|
12430
|
+
const totalStackedLabelColor = tt?.totalStackedLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12431
|
+
const totalStackedValueColor = tt?.totalStackedValueColor ?? "#1D4ED8";
|
|
12432
|
+
const comparisonLabelColor = tt?.comparisonLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12433
|
+
const comparisonValueColor = tt?.comparisonValueColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12434
|
+
const dividerColor = tt?.dividerColor ?? "#E5E7EB";
|
|
12435
|
+
const titleColor = tt?.titleColor ?? "#0F172A";
|
|
12436
|
+
const fs = tt?.fontSizePx ?? 13;
|
|
12437
|
+
const titleFs = tt?.titleFontSizePx ?? 15;
|
|
12438
|
+
const titleText = row.subName ? `${row.name} ${row.subName}` : row.name;
|
|
12439
|
+
const orderedBuckets = [...buckets].reverse();
|
|
12440
|
+
const bodyStyle = mergeCss7(
|
|
12441
|
+
{
|
|
12442
|
+
boxSizing: "border-box",
|
|
12443
|
+
backgroundColor: bg,
|
|
12444
|
+
padding: pad,
|
|
12445
|
+
borderRadius: radius,
|
|
12446
|
+
border: `1px solid ${borderColor}`,
|
|
12447
|
+
boxShadow: shadow,
|
|
12448
|
+
minWidth: tt?.minWidthPx ?? 220,
|
|
12449
|
+
...tt?.maxWidthPx != null ? { maxWidth: tt.maxWidthPx } : null
|
|
12450
|
+
},
|
|
12451
|
+
tt?.bodyStyle
|
|
12452
|
+
);
|
|
12453
|
+
const rowStyle = {
|
|
12454
|
+
display: "flex",
|
|
12455
|
+
alignItems: "center",
|
|
12456
|
+
justifyContent: "space-between",
|
|
12457
|
+
fontSize: fs,
|
|
12458
|
+
lineHeight: 1.4,
|
|
12459
|
+
margin: "4px 0",
|
|
12460
|
+
fontFamily: "inherit"
|
|
12461
|
+
};
|
|
12462
|
+
const swatch = (color) => ({
|
|
12463
|
+
width: 10,
|
|
12464
|
+
height: 10,
|
|
12465
|
+
borderRadius: "50%",
|
|
12466
|
+
backgroundColor: color,
|
|
12467
|
+
flexShrink: 0,
|
|
12468
|
+
display: "inline-block",
|
|
12469
|
+
marginRight: 8
|
|
12470
|
+
});
|
|
12471
|
+
return /* @__PURE__ */ jsx46("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsxs36("div", { style: bodyStyle, children: [
|
|
12472
|
+
/* @__PURE__ */ jsx46(
|
|
12473
|
+
"div",
|
|
12474
|
+
{
|
|
12475
|
+
style: {
|
|
12476
|
+
fontSize: titleFs,
|
|
12477
|
+
fontWeight: 700,
|
|
12478
|
+
color: titleColor,
|
|
12479
|
+
marginBottom: 8
|
|
12416
12480
|
},
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12481
|
+
children: titleText
|
|
12482
|
+
}
|
|
12483
|
+
),
|
|
12484
|
+
orderedBuckets.map((b, i) => {
|
|
12485
|
+
const originalIndex = buckets.length - 1 - i;
|
|
12486
|
+
const color = b.color ?? bucketColors[originalIndex] ?? "#94A3B8";
|
|
12487
|
+
const v = row.stacked[b.id] ?? 0;
|
|
12488
|
+
return /* @__PURE__ */ jsxs36("div", { style: rowStyle, children: [
|
|
12489
|
+
/* @__PURE__ */ jsxs36(
|
|
12490
|
+
"span",
|
|
12491
|
+
{
|
|
12492
|
+
style: {
|
|
12493
|
+
display: "flex",
|
|
12494
|
+
alignItems: "center",
|
|
12495
|
+
color: bucketNameColor,
|
|
12496
|
+
fontWeight: 500
|
|
12497
|
+
},
|
|
12498
|
+
children: [
|
|
12499
|
+
/* @__PURE__ */ jsx46("span", { style: swatch(color), "aria-hidden": true }),
|
|
12500
|
+
b.label
|
|
12501
|
+
]
|
|
12502
|
+
}
|
|
12503
|
+
),
|
|
12504
|
+
/* @__PURE__ */ jsx46("span", { style: { color: bucketValueColor, fontWeight: 700 }, children: fmt(v) })
|
|
12505
|
+
] }, b.id);
|
|
12506
|
+
}),
|
|
12507
|
+
/* @__PURE__ */ jsx46(
|
|
12508
|
+
"div",
|
|
12509
|
+
{
|
|
12510
|
+
style: {
|
|
12511
|
+
height: 1,
|
|
12512
|
+
background: dividerColor,
|
|
12513
|
+
margin: "10px 0 8px"
|
|
12422
12514
|
}
|
|
12423
|
-
}
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12515
|
+
}
|
|
12516
|
+
),
|
|
12517
|
+
/* @__PURE__ */ jsxs36("div", { style: { ...rowStyle, margin: "2px 0" }, children: [
|
|
12518
|
+
/* @__PURE__ */ jsx46("span", { style: { color: totalStackedLabelColor, fontWeight: 700 }, children: stackedTotalLabel }),
|
|
12519
|
+
/* @__PURE__ */ jsx46("span", { style: { color: totalStackedValueColor, fontWeight: 700 }, children: fmt(buckets.reduce((acc, b) => acc + (row.stacked[b.id] ?? 0), 0)) })
|
|
12520
|
+
] }),
|
|
12521
|
+
/* @__PURE__ */ jsxs36("div", { style: { ...rowStyle, margin: "6px 0 0" }, children: [
|
|
12522
|
+
/* @__PURE__ */ jsxs36(
|
|
12523
|
+
"span",
|
|
12524
|
+
{
|
|
12525
|
+
style: {
|
|
12526
|
+
display: "flex",
|
|
12527
|
+
alignItems: "center",
|
|
12528
|
+
color: comparisonLabelColor,
|
|
12529
|
+
fontWeight: 600
|
|
12530
|
+
},
|
|
12531
|
+
children: [
|
|
12532
|
+
/* @__PURE__ */ jsx46("span", { style: swatch(comparisonColor), "aria-hidden": true }),
|
|
12533
|
+
comparisonLabel
|
|
12534
|
+
]
|
|
12437
12535
|
}
|
|
12438
|
-
|
|
12536
|
+
),
|
|
12537
|
+
/* @__PURE__ */ jsx46("span", { style: { color: comparisonValueColor, fontWeight: 700 }, children: fmt(row.comparison) })
|
|
12538
|
+
] })
|
|
12539
|
+
] }) });
|
|
12540
|
+
}
|
|
12541
|
+
|
|
12542
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12543
|
+
import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12544
|
+
var DEFAULT_AXIS_TICK_FILL = "#9CA3AF";
|
|
12545
|
+
var DEFAULT_GRID_STROKE = "#EEF0F3";
|
|
12546
|
+
var STACK_KEY = (id) => `stack__${id}`;
|
|
12547
|
+
var COMPARISON_KEY = "__comparison";
|
|
12548
|
+
function SortIcon({ color }) {
|
|
12549
|
+
return /* @__PURE__ */ jsxs37(
|
|
12550
|
+
"svg",
|
|
12551
|
+
{
|
|
12552
|
+
width: "14",
|
|
12553
|
+
height: "14",
|
|
12554
|
+
viewBox: "0 0 14 14",
|
|
12555
|
+
fill: "none",
|
|
12556
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12557
|
+
"aria-hidden": true,
|
|
12558
|
+
children: [
|
|
12559
|
+
/* @__PURE__ */ jsx47(
|
|
12560
|
+
"path",
|
|
12561
|
+
{
|
|
12562
|
+
d: "M4 2.5V11.5M4 11.5L1.5 9M4 11.5L6.5 9",
|
|
12563
|
+
stroke: color,
|
|
12564
|
+
strokeWidth: "1.4",
|
|
12565
|
+
strokeLinecap: "round",
|
|
12566
|
+
strokeLinejoin: "round"
|
|
12567
|
+
}
|
|
12568
|
+
),
|
|
12569
|
+
/* @__PURE__ */ jsx47(
|
|
12570
|
+
"path",
|
|
12571
|
+
{
|
|
12572
|
+
d: "M10 11.5V2.5M10 2.5L7.5 5M10 2.5L12.5 5",
|
|
12573
|
+
stroke: color,
|
|
12574
|
+
strokeWidth: "1.4",
|
|
12575
|
+
strokeLinecap: "round",
|
|
12576
|
+
strokeLinejoin: "round"
|
|
12577
|
+
}
|
|
12578
|
+
)
|
|
12579
|
+
]
|
|
12439
12580
|
}
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12581
|
+
);
|
|
12582
|
+
}
|
|
12583
|
+
function LegendDot({
|
|
12584
|
+
color,
|
|
12585
|
+
sizePx = 10
|
|
12586
|
+
}) {
|
|
12587
|
+
return /* @__PURE__ */ jsx47(
|
|
12588
|
+
Box31,
|
|
12589
|
+
{
|
|
12590
|
+
sx: {
|
|
12591
|
+
width: sizePx,
|
|
12592
|
+
height: sizePx,
|
|
12593
|
+
borderRadius: "50%",
|
|
12594
|
+
bgcolor: color,
|
|
12595
|
+
flexShrink: 0
|
|
12454
12596
|
}
|
|
12455
|
-
}
|
|
12456
|
-
}
|
|
12457
|
-
if (!childTiles.length) return null;
|
|
12458
|
-
const overallVisitors = childTiles.reduce(
|
|
12459
|
-
(s, n) => s + parseVisitorCount(n.overallData?.count),
|
|
12460
|
-
0
|
|
12597
|
+
}
|
|
12461
12598
|
);
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12599
|
+
}
|
|
12600
|
+
function MultilineTick(props) {
|
|
12601
|
+
const {
|
|
12602
|
+
x = 0,
|
|
12603
|
+
y = 0,
|
|
12604
|
+
payload,
|
|
12605
|
+
fill = DEFAULT_AXIS_TICK_FILL,
|
|
12606
|
+
fontSize = 12,
|
|
12607
|
+
rowsByName,
|
|
12608
|
+
angle = 0,
|
|
12609
|
+
textAnchor = "middle"
|
|
12610
|
+
} = props;
|
|
12611
|
+
const name = payload?.value ?? "";
|
|
12612
|
+
if (!name) return null;
|
|
12613
|
+
const row = rowsByName ? rowsByName[name] : void 0;
|
|
12614
|
+
const subName = row?.subName;
|
|
12615
|
+
const lines = [];
|
|
12616
|
+
String(name).split("\n").forEach((s) => lines.push(s));
|
|
12617
|
+
if (subName) {
|
|
12618
|
+
String(subName).split("\n").forEach((s) => lines.push(s));
|
|
12619
|
+
}
|
|
12620
|
+
const lineHeight = fontSize * 1.25;
|
|
12621
|
+
const isHorizontal = angle === 0;
|
|
12622
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
12623
|
+
const dy0 = isHorizontal ? lineHeight : 4;
|
|
12624
|
+
return /* @__PURE__ */ jsx47("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx47(
|
|
12625
|
+
"text",
|
|
12626
|
+
{
|
|
12627
|
+
transform: angle !== 0 ? `rotate(${angle})` : void 0,
|
|
12628
|
+
textAnchor: anchor,
|
|
12629
|
+
fontSize,
|
|
12630
|
+
fill,
|
|
12631
|
+
children: lines.map((line, i) => /* @__PURE__ */ jsx47("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
12470
12632
|
}
|
|
12471
|
-
};
|
|
12633
|
+
) });
|
|
12472
12634
|
}
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12635
|
+
function BarPlot({
|
|
12636
|
+
data,
|
|
12637
|
+
buckets,
|
|
12638
|
+
bucketColors,
|
|
12639
|
+
comparisonColor,
|
|
12640
|
+
rowsByName,
|
|
12641
|
+
yAxisDomain,
|
|
12642
|
+
yAxisTicks,
|
|
12643
|
+
yAxisTickFormatter,
|
|
12644
|
+
stackedTotalLabel,
|
|
12645
|
+
comparisonLabel,
|
|
12646
|
+
renderTooltip,
|
|
12647
|
+
enableHorizontalScroll,
|
|
12648
|
+
chartMinWidth,
|
|
12649
|
+
categoryWidthPx
|
|
12650
|
+
}) {
|
|
12651
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12652
|
+
const height = bc?.heightPx ?? 360;
|
|
12653
|
+
const stackedSize = bc?.stackedBarSizePx ?? 22;
|
|
12654
|
+
const comparisonSize = bc?.comparisonBarSizePx ?? 18;
|
|
12655
|
+
const barCategoryGap = bc?.barCategoryGapPx ?? 20;
|
|
12656
|
+
const barGap = bc?.barGap ?? 2;
|
|
12657
|
+
const barTopRadius = bc?.barTopRadiusPx ?? 3;
|
|
12658
|
+
const m = {
|
|
12659
|
+
top: bc?.margin?.top ?? 16,
|
|
12660
|
+
right: bc?.margin?.right ?? 8,
|
|
12661
|
+
bottom: bc?.margin?.bottom ?? 28,
|
|
12662
|
+
left: bc?.margin?.left ?? 4
|
|
12663
|
+
};
|
|
12664
|
+
const gridStroke = bc?.gridStroke ?? DEFAULT_GRID_STROKE;
|
|
12665
|
+
const dash = bc?.gridStrokeDasharray ?? "0";
|
|
12666
|
+
const xFill = bc?.xAxisTickFill ?? "#6B7280";
|
|
12667
|
+
const xTickAngle = bc?.xAxisTickAngle ?? 0;
|
|
12668
|
+
const xTickAnchor = bc?.xAxisTickAnchor ?? "end";
|
|
12669
|
+
const xAxisHeight = bc?.xAxisHeight ?? 50;
|
|
12670
|
+
const yFill = bc?.yAxisTickFill ?? DEFAULT_AXIS_TICK_FILL;
|
|
12671
|
+
const yWidth = bc?.yAxisWidth ?? 44;
|
|
12672
|
+
const cursorFill = bc?.cursorFill ?? "rgba(15, 23, 42, 0.04)";
|
|
12673
|
+
const defaultFmt = React25.useCallback(
|
|
12674
|
+
(v) => v >= 1e3 ? `${(v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1)}k` : `${v}`,
|
|
12675
|
+
[]
|
|
12676
|
+
);
|
|
12677
|
+
const tickFmt = yAxisTickFormatter ?? defaultFmt;
|
|
12678
|
+
const resolvedCategoryWidth = categoryWidthPx ?? 90;
|
|
12679
|
+
const innerMinWidth = chartMinWidth ?? resolvedCategoryWidth * Math.max(data.length, 1);
|
|
12680
|
+
const outerSx = enableHorizontalScroll ? {
|
|
12681
|
+
width: "100%",
|
|
12682
|
+
height,
|
|
12683
|
+
mt: 0.5,
|
|
12684
|
+
overflowX: "auto",
|
|
12685
|
+
overflowY: "hidden"
|
|
12686
|
+
} : { width: "100%", height, mt: 0.5 };
|
|
12687
|
+
const innerSx = enableHorizontalScroll ? { width: "100%", height: "100%", minWidth: innerMinWidth } : { width: "100%", height: "100%" };
|
|
12688
|
+
return /* @__PURE__ */ jsx47(Box31, { sx: outerSx, children: /* @__PURE__ */ jsx47(Box31, { sx: innerSx, children: /* @__PURE__ */ jsx47(ResponsiveContainer5, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs37(
|
|
12689
|
+
BarChart3,
|
|
12690
|
+
{
|
|
12691
|
+
data,
|
|
12692
|
+
margin: m,
|
|
12693
|
+
barCategoryGap,
|
|
12694
|
+
barGap,
|
|
12695
|
+
children: [
|
|
12696
|
+
/* @__PURE__ */ jsx47(
|
|
12697
|
+
CartesianGrid7,
|
|
12698
|
+
{
|
|
12699
|
+
strokeDasharray: dash,
|
|
12700
|
+
vertical: false,
|
|
12701
|
+
stroke: gridStroke
|
|
12702
|
+
}
|
|
12703
|
+
),
|
|
12704
|
+
/* @__PURE__ */ jsx47(
|
|
12705
|
+
XAxis7,
|
|
12706
|
+
{
|
|
12707
|
+
dataKey: "__name",
|
|
12708
|
+
tick: /* @__PURE__ */ jsx47(
|
|
12709
|
+
MultilineTick,
|
|
12710
|
+
{
|
|
12711
|
+
fill: xFill,
|
|
12712
|
+
fontSize: 12,
|
|
12713
|
+
rowsByName,
|
|
12714
|
+
angle: xTickAngle,
|
|
12715
|
+
textAnchor: xTickAnchor
|
|
12716
|
+
}
|
|
12717
|
+
),
|
|
12718
|
+
tickLine: false,
|
|
12719
|
+
axisLine: { stroke: gridStroke },
|
|
12720
|
+
interval: 0,
|
|
12721
|
+
height: xAxisHeight
|
|
12722
|
+
}
|
|
12723
|
+
),
|
|
12724
|
+
/* @__PURE__ */ jsx47(
|
|
12725
|
+
YAxis7,
|
|
12726
|
+
{
|
|
12727
|
+
domain: yAxisDomain,
|
|
12728
|
+
ticks: yAxisTicks,
|
|
12729
|
+
tick: { fill: yFill, fontSize: 11 },
|
|
12730
|
+
tickLine: false,
|
|
12731
|
+
axisLine: false,
|
|
12732
|
+
width: yWidth,
|
|
12733
|
+
tickFormatter: tickFmt
|
|
12734
|
+
}
|
|
12735
|
+
),
|
|
12736
|
+
/* @__PURE__ */ jsx47(
|
|
12737
|
+
Tooltip12,
|
|
12738
|
+
{
|
|
12739
|
+
content: (tooltipProps) => {
|
|
12740
|
+
const label = tooltipProps.label;
|
|
12741
|
+
const labelStr = typeof label === "string" ? label : String(label ?? "");
|
|
12742
|
+
const row = rowsByName[labelStr] ?? null;
|
|
12743
|
+
if (renderTooltip) {
|
|
12744
|
+
const custom = renderTooltip({
|
|
12745
|
+
tooltipProps,
|
|
12746
|
+
row,
|
|
12747
|
+
buckets,
|
|
12748
|
+
bucketColors,
|
|
12749
|
+
comparisonColor
|
|
12750
|
+
});
|
|
12751
|
+
return custom == null ? null : /* @__PURE__ */ jsx47(Fragment16, { children: custom });
|
|
12752
|
+
}
|
|
12753
|
+
return /* @__PURE__ */ jsx47(
|
|
12754
|
+
StackedComparisonBarChartTooltip,
|
|
12755
|
+
{
|
|
12756
|
+
...tooltipProps,
|
|
12757
|
+
row,
|
|
12758
|
+
buckets,
|
|
12759
|
+
bucketColors,
|
|
12760
|
+
comparisonColor,
|
|
12761
|
+
stackedTotalLabel,
|
|
12762
|
+
comparisonLabel
|
|
12763
|
+
}
|
|
12764
|
+
);
|
|
12765
|
+
},
|
|
12766
|
+
cursor: { fill: cursorFill },
|
|
12767
|
+
allowEscapeViewBox: { x: false, y: true }
|
|
12768
|
+
}
|
|
12769
|
+
),
|
|
12770
|
+
buckets.map((b, i) => {
|
|
12771
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
12772
|
+
const isTop = i === buckets.length - 1;
|
|
12773
|
+
const radius = isTop ? [barTopRadius, barTopRadius, 0, 0] : [0, 0, 0, 0];
|
|
12774
|
+
return /* @__PURE__ */ jsx47(
|
|
12775
|
+
Bar5,
|
|
12776
|
+
{
|
|
12777
|
+
dataKey: STACK_KEY(b.id),
|
|
12778
|
+
name: b.label,
|
|
12779
|
+
stackId: "stacked",
|
|
12780
|
+
fill: color,
|
|
12781
|
+
barSize: stackedSize,
|
|
12782
|
+
isAnimationActive: false,
|
|
12783
|
+
radius
|
|
12784
|
+
},
|
|
12785
|
+
b.id
|
|
12786
|
+
);
|
|
12787
|
+
}),
|
|
12788
|
+
/* @__PURE__ */ jsx47(
|
|
12789
|
+
Bar5,
|
|
12790
|
+
{
|
|
12791
|
+
dataKey: COMPARISON_KEY,
|
|
12792
|
+
name: comparisonLabel,
|
|
12793
|
+
stackId: "comparison",
|
|
12794
|
+
fill: comparisonColor,
|
|
12795
|
+
barSize: comparisonSize,
|
|
12796
|
+
isAnimationActive: false,
|
|
12797
|
+
radius: [barTopRadius, barTopRadius, 0, 0]
|
|
12798
|
+
}
|
|
12799
|
+
)
|
|
12800
|
+
]
|
|
12801
|
+
}
|
|
12802
|
+
) }) }) });
|
|
12803
|
+
}
|
|
12804
|
+
function StackedComparisonBarChart({
|
|
12805
|
+
subHeading,
|
|
12806
|
+
showSortToggle = true,
|
|
12807
|
+
onSortToggle,
|
|
12808
|
+
showSubHeadingDivider = true,
|
|
12809
|
+
showHeaderLegend = true,
|
|
12810
|
+
enableHorizontalScroll = false,
|
|
12811
|
+
chartMinWidth,
|
|
12812
|
+
categoryWidthPx,
|
|
12813
|
+
buckets,
|
|
12814
|
+
data,
|
|
12815
|
+
stackedLegendLabel = "Stacked",
|
|
12816
|
+
comparisonLegendLabel = "Comparison",
|
|
12817
|
+
stackedTotalLabel,
|
|
12818
|
+
yAxisDomain,
|
|
12819
|
+
yAxisTicks,
|
|
12820
|
+
yAxisTickFormatter,
|
|
12821
|
+
renderTooltip,
|
|
12822
|
+
emptyStatePlaceholderProps,
|
|
12823
|
+
customization
|
|
12824
|
+
}) {
|
|
12825
|
+
const bucketColors = customization?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
12826
|
+
const comparisonColor = customization?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
12827
|
+
const legendStackDot = customization?.header?.legendStackColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12828
|
+
const legendComparisonDot = customization?.header?.legendComparisonColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12829
|
+
const legendDividerColor = customization?.header?.legendDividerColor ?? "#E5E7EB";
|
|
12830
|
+
const legendDotSize = customization?.header?.legendDotSizePx ?? 10;
|
|
12831
|
+
const frameBorder = customization?.frame?.borderColor ?? STACKED_COMPARISON_DEFAULT_FRAME_BORDER;
|
|
12832
|
+
const frameBg = customization?.frame?.backgroundColor ?? "#FFFFFF";
|
|
12833
|
+
const rowsByName = React25.useMemo(() => {
|
|
12834
|
+
const r = {};
|
|
12835
|
+
for (const row of data) r[row.name] = row;
|
|
12836
|
+
return r;
|
|
12837
|
+
}, [data]);
|
|
12838
|
+
const chartData = React25.useMemo(() => {
|
|
12839
|
+
return data.map((row) => {
|
|
12840
|
+
const d = {
|
|
12841
|
+
__key: row.name,
|
|
12842
|
+
__name: row.name,
|
|
12843
|
+
__subName: row.subName,
|
|
12844
|
+
__row: row,
|
|
12845
|
+
[COMPARISON_KEY]: row.comparison
|
|
12846
|
+
};
|
|
12847
|
+
for (const b of buckets) {
|
|
12848
|
+
d[STACK_KEY(b.id)] = row.stacked[b.id] ?? 0;
|
|
12849
|
+
}
|
|
12850
|
+
return d;
|
|
12851
|
+
});
|
|
12852
|
+
}, [data, buckets]);
|
|
12853
|
+
const subHeadingSx = mergeSx4(
|
|
12854
|
+
{
|
|
12855
|
+
fontWeight: 700,
|
|
12856
|
+
fontSize: "0.95rem",
|
|
12857
|
+
color: "#0f172a"
|
|
12858
|
+
},
|
|
12859
|
+
customization?.header?.subHeadingSx
|
|
12860
|
+
);
|
|
12861
|
+
const frameSx = mergeSx4(
|
|
12862
|
+
{
|
|
12863
|
+
bgcolor: frameBg,
|
|
12864
|
+
border: `1px solid ${frameBorder}`,
|
|
12865
|
+
borderRadius: 2,
|
|
12866
|
+
px: 2,
|
|
12867
|
+
pt: 2,
|
|
12868
|
+
pb: 1.5,
|
|
12869
|
+
width: "100%",
|
|
12870
|
+
boxSizing: "border-box"
|
|
12871
|
+
},
|
|
12872
|
+
customization?.frame?.sx
|
|
12873
|
+
);
|
|
12874
|
+
const subHeadingDividerColor = customization?.frame?.subHeadingDividerColor ?? "#C7C9D9";
|
|
12875
|
+
const subHeadingDividerSx = mergeSx4(
|
|
12876
|
+
{
|
|
12877
|
+
height: "1px",
|
|
12878
|
+
width: "100%",
|
|
12879
|
+
bgcolor: subHeadingDividerColor,
|
|
12880
|
+
mb: 1.5
|
|
12881
|
+
},
|
|
12882
|
+
customization?.frame?.subHeadingDividerSx
|
|
12883
|
+
);
|
|
12884
|
+
const legendSx = mergeSx4({ flexShrink: 0 }, customization?.header?.legendSx);
|
|
12885
|
+
const showSubHeadingRow = Boolean(subHeading) || showSortToggle || showHeaderLegend;
|
|
12886
|
+
const resolvedStackedTotal = stackedTotalLabel ?? `Total ${stackedLegendLabel}`;
|
|
12887
|
+
if (chartData.length === 0) {
|
|
12888
|
+
return /* @__PURE__ */ jsx47(ChartEmptyState, { minHeight: 360, ...emptyStatePlaceholderProps });
|
|
12889
|
+
}
|
|
12890
|
+
return /* @__PURE__ */ jsx47(StackedComparisonBarChartCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ jsxs37(Box31, { sx: frameSx, children: [
|
|
12891
|
+
showSubHeadingRow ? /* @__PURE__ */ jsxs37(
|
|
12892
|
+
Stack25,
|
|
12893
|
+
{
|
|
12894
|
+
direction: "row",
|
|
12895
|
+
alignItems: "center",
|
|
12896
|
+
justifyContent: "space-between",
|
|
12897
|
+
gap: 2,
|
|
12898
|
+
flexWrap: "wrap",
|
|
12899
|
+
sx: { mb: 1 },
|
|
12900
|
+
children: [
|
|
12901
|
+
/* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
12902
|
+
subHeading ? /* @__PURE__ */ jsx47(Typography26, { sx: subHeadingSx, children: subHeading }) : /* @__PURE__ */ jsx47("span", {}),
|
|
12903
|
+
showSortToggle ? /* @__PURE__ */ jsx47(
|
|
12904
|
+
ButtonBase2,
|
|
12905
|
+
{
|
|
12906
|
+
onClick: onSortToggle,
|
|
12907
|
+
disableRipple: !onSortToggle,
|
|
12908
|
+
sx: mergeSx4(
|
|
12909
|
+
{
|
|
12910
|
+
width: 26,
|
|
12911
|
+
height: 26,
|
|
12912
|
+
borderRadius: 1,
|
|
12913
|
+
bgcolor: "#EEF2FF",
|
|
12914
|
+
color: "#5B6DEC",
|
|
12915
|
+
display: "inline-flex",
|
|
12916
|
+
alignItems: "center",
|
|
12917
|
+
justifyContent: "center",
|
|
12918
|
+
cursor: onSortToggle ? "pointer" : "default",
|
|
12919
|
+
"&:hover": onSortToggle ? { bgcolor: "#E0E7FF" } : void 0
|
|
12920
|
+
},
|
|
12921
|
+
customization?.header?.sortButtonSx
|
|
12922
|
+
),
|
|
12923
|
+
"aria-label": "Toggle sort order",
|
|
12924
|
+
children: /* @__PURE__ */ jsx47(SortIcon, { color: "#5B6DEC" })
|
|
12925
|
+
}
|
|
12926
|
+
) : null
|
|
12927
|
+
] }),
|
|
12928
|
+
showHeaderLegend ? /* @__PURE__ */ jsxs37(
|
|
12929
|
+
Stack25,
|
|
12930
|
+
{
|
|
12931
|
+
direction: "row",
|
|
12932
|
+
alignItems: "center",
|
|
12933
|
+
spacing: 1.5,
|
|
12934
|
+
sx: legendSx,
|
|
12935
|
+
children: [
|
|
12936
|
+
/* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
12937
|
+
/* @__PURE__ */ jsx47(LegendDot, { color: legendStackDot, sizePx: legendDotSize }),
|
|
12938
|
+
/* @__PURE__ */ jsx47(
|
|
12939
|
+
Typography26,
|
|
12940
|
+
{
|
|
12941
|
+
sx: mergeSx4(
|
|
12942
|
+
{
|
|
12943
|
+
fontWeight: 700,
|
|
12944
|
+
fontSize: "0.85rem",
|
|
12945
|
+
color: legendStackDot
|
|
12946
|
+
},
|
|
12947
|
+
customization?.header?.legendLabelSx
|
|
12948
|
+
),
|
|
12949
|
+
children: stackedLegendLabel
|
|
12950
|
+
}
|
|
12951
|
+
)
|
|
12952
|
+
] }),
|
|
12953
|
+
/* @__PURE__ */ jsx47(
|
|
12954
|
+
Box31,
|
|
12955
|
+
{
|
|
12956
|
+
sx: {
|
|
12957
|
+
width: "1px",
|
|
12958
|
+
height: 18,
|
|
12959
|
+
bgcolor: legendDividerColor
|
|
12960
|
+
}
|
|
12961
|
+
}
|
|
12962
|
+
),
|
|
12963
|
+
/* @__PURE__ */ jsxs37(Stack25, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
12964
|
+
/* @__PURE__ */ jsx47(
|
|
12965
|
+
LegendDot,
|
|
12966
|
+
{
|
|
12967
|
+
color: legendComparisonDot,
|
|
12968
|
+
sizePx: legendDotSize
|
|
12969
|
+
}
|
|
12970
|
+
),
|
|
12971
|
+
/* @__PURE__ */ jsx47(
|
|
12972
|
+
Typography26,
|
|
12973
|
+
{
|
|
12974
|
+
sx: mergeSx4(
|
|
12975
|
+
{
|
|
12976
|
+
fontWeight: 700,
|
|
12977
|
+
fontSize: "0.85rem",
|
|
12978
|
+
color: legendComparisonDot
|
|
12979
|
+
},
|
|
12980
|
+
customization?.header?.legendLabelSx
|
|
12981
|
+
),
|
|
12982
|
+
children: comparisonLegendLabel
|
|
12983
|
+
}
|
|
12984
|
+
)
|
|
12985
|
+
] })
|
|
12986
|
+
]
|
|
12987
|
+
}
|
|
12988
|
+
) : null
|
|
12989
|
+
]
|
|
12990
|
+
}
|
|
12991
|
+
) : null,
|
|
12992
|
+
showSubHeadingDivider ? /* @__PURE__ */ jsx47(Box31, { sx: subHeadingDividerSx }) : null,
|
|
12993
|
+
/* @__PURE__ */ jsx47(
|
|
12994
|
+
BarPlot,
|
|
12995
|
+
{
|
|
12996
|
+
data: chartData,
|
|
12997
|
+
buckets,
|
|
12998
|
+
bucketColors,
|
|
12999
|
+
comparisonColor,
|
|
13000
|
+
rowsByName,
|
|
13001
|
+
yAxisDomain,
|
|
13002
|
+
yAxisTicks,
|
|
13003
|
+
yAxisTickFormatter,
|
|
13004
|
+
stackedTotalLabel: resolvedStackedTotal,
|
|
13005
|
+
comparisonLabel: comparisonLegendLabel,
|
|
13006
|
+
renderTooltip,
|
|
13007
|
+
enableHorizontalScroll,
|
|
13008
|
+
chartMinWidth,
|
|
13009
|
+
categoryWidthPx
|
|
13010
|
+
}
|
|
13011
|
+
)
|
|
13012
|
+
] }) });
|
|
13013
|
+
}
|
|
13014
|
+
|
|
13015
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.defaultInfoPopover.ts
|
|
13016
|
+
var DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER = {
|
|
13017
|
+
title: "Store Performance by Assist",
|
|
13018
|
+
description: "Per-store breakdown of attended customers split by attend-duration buckets, alongside the unattended count.",
|
|
13019
|
+
helpBullets: [
|
|
13020
|
+
"Compare attended vs unattended customer volume by store.",
|
|
13021
|
+
"Identify stores with high unattended counts that need staffing.",
|
|
13022
|
+
"See how attended customers split across 0-10 sec, 11-30 sec, 31-59 sec, and 1-2 min buckets."
|
|
13023
|
+
]
|
|
13024
|
+
};
|
|
13025
|
+
|
|
13026
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.mock.ts
|
|
13027
|
+
var STORE_PERFORMANCE_DEFAULT_BUCKETS = [
|
|
13028
|
+
{ id: "0-10", label: "0-10sec" },
|
|
13029
|
+
{ id: "11-30", label: "11-30sec" },
|
|
13030
|
+
{ id: "31-59", label: "31-59sec" },
|
|
13031
|
+
{ id: "1-2", label: "1-2min" }
|
|
13032
|
+
];
|
|
13033
|
+
var STORE_PERFORMANCE_DEFAULT_DATA = [
|
|
13034
|
+
{
|
|
13035
|
+
name: "Lake Mall",
|
|
13036
|
+
subName: "Kolkata",
|
|
13037
|
+
stacked: { "0-10": 1100, "11-30": 1100, "31-59": 1500, "1-2": 3e3 },
|
|
13038
|
+
comparison: 700
|
|
13039
|
+
},
|
|
13040
|
+
{
|
|
13041
|
+
name: "V3s",
|
|
13042
|
+
subName: "Delhi",
|
|
13043
|
+
stacked: { "0-10": 1e3, "11-30": 1100, "31-59": 1450, "1-2": 2900 },
|
|
13044
|
+
comparison: 620
|
|
13045
|
+
},
|
|
13046
|
+
{
|
|
13047
|
+
name: "Forum Mall",
|
|
13048
|
+
subName: "Bangalore",
|
|
13049
|
+
stacked: { "0-10": 750, "11-30": 800, "31-59": 1450, "1-2": 2050 },
|
|
13050
|
+
comparison: 520
|
|
13051
|
+
},
|
|
13052
|
+
{
|
|
13053
|
+
name: "Phoenix",
|
|
13054
|
+
subName: "Mumbai",
|
|
13055
|
+
stacked: { "0-10": 600, "11-30": 700, "31-59": 1450, "1-2": 1500 },
|
|
13056
|
+
comparison: 470
|
|
13057
|
+
},
|
|
13058
|
+
{
|
|
13059
|
+
name: "DB City",
|
|
13060
|
+
subName: "Bhopal",
|
|
13061
|
+
stacked: { "0-10": 400, "11-30": 600, "31-59": 950, "1-2": 1550 },
|
|
13062
|
+
comparison: 580
|
|
13063
|
+
},
|
|
13064
|
+
{
|
|
13065
|
+
name: "DLF",
|
|
13066
|
+
subName: "Gurgaon",
|
|
13067
|
+
stacked: { "0-10": 225, "11-30": 300, "31-59": 375, "1-2": 600 },
|
|
13068
|
+
comparison: 190
|
|
13069
|
+
},
|
|
13070
|
+
{
|
|
13071
|
+
name: "Highway",
|
|
13072
|
+
subName: "Chennai",
|
|
13073
|
+
stacked: { "0-10": 200, "11-30": 250, "31-59": 350, "1-2": 850 },
|
|
13074
|
+
comparison: 140
|
|
13075
|
+
},
|
|
13076
|
+
{
|
|
13077
|
+
name: "Elante",
|
|
13078
|
+
subName: "Chandigarh",
|
|
13079
|
+
stacked: { "0-10": 150, "11-30": 200, "31-59": 250, "1-2": 600 },
|
|
13080
|
+
comparison: 100
|
|
13081
|
+
}
|
|
13082
|
+
];
|
|
13083
|
+
|
|
13084
|
+
// src/components/widgets/StorePerformanceByAssist/StorePerformanceByAssist.tsx
|
|
13085
|
+
import Box32 from "@mui/material/Box";
|
|
13086
|
+
import Card4 from "@mui/material/Card";
|
|
13087
|
+
import CardContent3 from "@mui/material/CardContent";
|
|
13088
|
+
import Stack26 from "@mui/material/Stack";
|
|
13089
|
+
import Typography27 from "@mui/material/Typography";
|
|
13090
|
+
import { Fragment as Fragment17, jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
13091
|
+
function LegendSquare({
|
|
13092
|
+
color,
|
|
13093
|
+
size = 12
|
|
13094
|
+
}) {
|
|
13095
|
+
return /* @__PURE__ */ jsx48(
|
|
13096
|
+
Box32,
|
|
13097
|
+
{
|
|
13098
|
+
sx: {
|
|
13099
|
+
width: size,
|
|
13100
|
+
height: size,
|
|
13101
|
+
borderRadius: 0.5,
|
|
13102
|
+
bgcolor: color,
|
|
13103
|
+
flexShrink: 0
|
|
13104
|
+
}
|
|
13105
|
+
}
|
|
13106
|
+
);
|
|
13107
|
+
}
|
|
13108
|
+
function StorePerformanceByAssist({
|
|
13109
|
+
title,
|
|
13110
|
+
width,
|
|
13111
|
+
maxWidth,
|
|
13112
|
+
minWidth,
|
|
13113
|
+
subHeading = "Stores (Top to Bottom)",
|
|
13114
|
+
showSortToggle = true,
|
|
13115
|
+
onSortToggle,
|
|
13116
|
+
showSubHeadingDivider = true,
|
|
13117
|
+
showHeaderLegend = true,
|
|
13118
|
+
enableHorizontalScroll = false,
|
|
13119
|
+
chartMinWidth,
|
|
13120
|
+
categoryWidthPx,
|
|
13121
|
+
buckets,
|
|
13122
|
+
data,
|
|
13123
|
+
attendedLegendLabel = "Attended",
|
|
13124
|
+
unattendedLegendLabel = "Unattended",
|
|
13125
|
+
unattendedBottomLegendLabel = "Unattended Customers",
|
|
13126
|
+
yAxisDomain,
|
|
13127
|
+
yAxisTicks,
|
|
13128
|
+
yAxisTickFormatter,
|
|
13129
|
+
infoPopover = null,
|
|
13130
|
+
renderTooltip,
|
|
13131
|
+
emptyStatePlaceholderProps,
|
|
13132
|
+
customization
|
|
13133
|
+
}) {
|
|
13134
|
+
const bucketColors = customization?.chart?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
13135
|
+
const comparisonColor = customization?.chart?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
13136
|
+
const bottomLegendColor = customization?.bottomLegend?.labelColor ?? "#6B7280";
|
|
13137
|
+
const bottomLegendFs = customization?.bottomLegend?.fontSizePx ?? 12;
|
|
13138
|
+
const bottomLegendDividerColor = customization?.bottomLegend?.dividerColor ?? "#E5E7EB";
|
|
13139
|
+
const bottomSwatch = customization?.bottomLegend?.swatchSizePx ?? 12;
|
|
13140
|
+
const resolvedInfo = infoPopover === void 0 ? DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER : infoPopover;
|
|
13141
|
+
const rootSx = mergeSx4(
|
|
13142
|
+
{
|
|
13143
|
+
bgcolor: "#FFFFFF",
|
|
13144
|
+
borderRadius: 2,
|
|
13145
|
+
boxShadow: "0 1px 3px rgba(15, 23, 42, 0.08)",
|
|
13146
|
+
...width !== void 0 ? { width } : null,
|
|
13147
|
+
...maxWidth !== void 0 ? { maxWidth } : null,
|
|
13148
|
+
...minWidth !== void 0 ? { minWidth } : null
|
|
13149
|
+
},
|
|
13150
|
+
customization?.rootCard?.sx
|
|
13151
|
+
);
|
|
13152
|
+
const titleSx = mergeSx4(
|
|
13153
|
+
{
|
|
13154
|
+
fontWeight: 700,
|
|
13155
|
+
fontSize: { xs: "1rem", sm: "1.05rem" },
|
|
13156
|
+
color: "#0f172a"
|
|
13157
|
+
},
|
|
13158
|
+
customization?.header?.titleSx
|
|
13159
|
+
);
|
|
13160
|
+
const bottomLegendSx = mergeSx4(
|
|
13161
|
+
{
|
|
13162
|
+
display: "flex",
|
|
13163
|
+
flexWrap: "wrap",
|
|
13164
|
+
alignItems: "center",
|
|
13165
|
+
rowGap: 1,
|
|
13166
|
+
mt: 1.5,
|
|
13167
|
+
px: 0.5
|
|
13168
|
+
},
|
|
13169
|
+
customization?.bottomLegend?.sx
|
|
13170
|
+
);
|
|
13171
|
+
const showOuterHeader = Boolean(title) || Boolean(resolvedInfo);
|
|
13172
|
+
const hasData = data.length > 0;
|
|
13173
|
+
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: [
|
|
13174
|
+
showOuterHeader ? /* @__PURE__ */ jsxs38(
|
|
13175
|
+
Stack26,
|
|
13176
|
+
{
|
|
13177
|
+
direction: "row",
|
|
13178
|
+
alignItems: "center",
|
|
13179
|
+
justifyContent: "space-between",
|
|
13180
|
+
gap: 2,
|
|
13181
|
+
flexWrap: "wrap",
|
|
13182
|
+
children: [
|
|
13183
|
+
title ? /* @__PURE__ */ jsx48(Typography27, { sx: titleSx, children: title }) : /* @__PURE__ */ jsx48("span", {}),
|
|
13184
|
+
/* @__PURE__ */ jsx48(
|
|
13185
|
+
Stack26,
|
|
13186
|
+
{
|
|
13187
|
+
direction: "row",
|
|
13188
|
+
alignItems: "center",
|
|
13189
|
+
spacing: 1.5,
|
|
13190
|
+
sx: { flexShrink: 0 },
|
|
13191
|
+
children: resolvedInfo ? /* @__PURE__ */ jsxs38(Fragment17, { children: [
|
|
13192
|
+
/* @__PURE__ */ jsx48(ChartWidgetHeaderSeparator, {}),
|
|
13193
|
+
/* @__PURE__ */ jsx48(
|
|
13194
|
+
ChartWidgetInfoButton,
|
|
13195
|
+
{
|
|
13196
|
+
popover: resolvedInfo,
|
|
13197
|
+
ariaLabel: "Store performance by assist information"
|
|
13198
|
+
}
|
|
13199
|
+
)
|
|
13200
|
+
] }) : null
|
|
13201
|
+
}
|
|
13202
|
+
)
|
|
13203
|
+
]
|
|
13204
|
+
}
|
|
13205
|
+
) : null,
|
|
13206
|
+
/* @__PURE__ */ jsx48(
|
|
13207
|
+
StackedComparisonBarChart,
|
|
13208
|
+
{
|
|
13209
|
+
subHeading,
|
|
13210
|
+
showSortToggle,
|
|
13211
|
+
onSortToggle,
|
|
13212
|
+
showSubHeadingDivider,
|
|
13213
|
+
showHeaderLegend,
|
|
13214
|
+
enableHorizontalScroll,
|
|
13215
|
+
chartMinWidth,
|
|
13216
|
+
categoryWidthPx,
|
|
13217
|
+
buckets,
|
|
13218
|
+
data,
|
|
13219
|
+
stackedLegendLabel: attendedLegendLabel,
|
|
13220
|
+
comparisonLegendLabel: unattendedLegendLabel,
|
|
13221
|
+
yAxisDomain,
|
|
13222
|
+
yAxisTicks,
|
|
13223
|
+
yAxisTickFormatter,
|
|
13224
|
+
renderTooltip,
|
|
13225
|
+
emptyStatePlaceholderProps,
|
|
13226
|
+
customization: customization?.chart
|
|
13227
|
+
}
|
|
13228
|
+
),
|
|
13229
|
+
hasData ? /* @__PURE__ */ jsxs38(Box32, { sx: bottomLegendSx, children: [
|
|
13230
|
+
buckets.map((b, i) => {
|
|
13231
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
13232
|
+
return /* @__PURE__ */ jsxs38(
|
|
13233
|
+
Stack26,
|
|
13234
|
+
{
|
|
13235
|
+
direction: "row",
|
|
13236
|
+
alignItems: "center",
|
|
13237
|
+
spacing: 0.75,
|
|
13238
|
+
sx: { mr: 2 },
|
|
13239
|
+
children: [
|
|
13240
|
+
/* @__PURE__ */ jsx48(LegendSquare, { color, size: bottomSwatch }),
|
|
13241
|
+
/* @__PURE__ */ jsx48(
|
|
13242
|
+
Typography27,
|
|
13243
|
+
{
|
|
13244
|
+
sx: {
|
|
13245
|
+
fontSize: bottomLegendFs,
|
|
13246
|
+
color: bottomLegendColor,
|
|
13247
|
+
fontWeight: 500
|
|
13248
|
+
},
|
|
13249
|
+
children: b.label
|
|
13250
|
+
}
|
|
13251
|
+
)
|
|
13252
|
+
]
|
|
13253
|
+
},
|
|
13254
|
+
b.id
|
|
13255
|
+
);
|
|
13256
|
+
}),
|
|
13257
|
+
/* @__PURE__ */ jsx48(
|
|
13258
|
+
Box32,
|
|
13259
|
+
{
|
|
13260
|
+
sx: {
|
|
13261
|
+
width: "1px",
|
|
13262
|
+
height: 14,
|
|
13263
|
+
bgcolor: bottomLegendDividerColor,
|
|
13264
|
+
mx: 1
|
|
13265
|
+
}
|
|
13266
|
+
}
|
|
13267
|
+
),
|
|
13268
|
+
/* @__PURE__ */ jsxs38(
|
|
13269
|
+
Stack26,
|
|
13270
|
+
{
|
|
13271
|
+
direction: "row",
|
|
13272
|
+
alignItems: "center",
|
|
13273
|
+
spacing: 0.75,
|
|
13274
|
+
sx: { mr: 2 },
|
|
13275
|
+
children: [
|
|
13276
|
+
/* @__PURE__ */ jsx48(LegendSquare, { color: comparisonColor, size: bottomSwatch }),
|
|
13277
|
+
/* @__PURE__ */ jsx48(
|
|
13278
|
+
Typography27,
|
|
13279
|
+
{
|
|
13280
|
+
sx: {
|
|
13281
|
+
fontSize: bottomLegendFs,
|
|
13282
|
+
color: bottomLegendColor,
|
|
13283
|
+
fontWeight: 500
|
|
13284
|
+
},
|
|
13285
|
+
children: unattendedBottomLegendLabel
|
|
13286
|
+
}
|
|
13287
|
+
)
|
|
13288
|
+
]
|
|
13289
|
+
}
|
|
13290
|
+
)
|
|
13291
|
+
] }) : null
|
|
13292
|
+
] }) }) });
|
|
13293
|
+
}
|
|
13294
|
+
|
|
13295
|
+
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
13296
|
+
import { Icon as Icon13 } from "@iconify/react";
|
|
13297
|
+
import {
|
|
13298
|
+
Box as Box33,
|
|
13299
|
+
Button as Button8,
|
|
13300
|
+
IconButton as IconButton5,
|
|
13301
|
+
Paper as Paper5,
|
|
13302
|
+
Skeleton as Skeleton7,
|
|
13303
|
+
Stack as Stack27,
|
|
13304
|
+
Tooltip as Tooltip13,
|
|
13305
|
+
Typography as Typography28
|
|
13306
|
+
} from "@mui/material";
|
|
13307
|
+
import * as React26 from "react";
|
|
13308
|
+
import { useEffect as useEffect3, useMemo as useMemo21, useState as useState17 } from "react";
|
|
13309
|
+
import { ResponsiveContainer as ResponsiveContainer6, Treemap } from "recharts";
|
|
13310
|
+
|
|
13311
|
+
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
13312
|
+
var DEFAULT_FOOTFALL_TILE_ICONS = {
|
|
13313
|
+
visitors: "fluent:people-community-16-filled",
|
|
13314
|
+
dwell: "clarity:clock-solid",
|
|
13315
|
+
headerInfo: "mdi:information-outline"
|
|
13316
|
+
};
|
|
13317
|
+
|
|
13318
|
+
// src/components/widgets/FootFallHeatMap/footfallHeatMapDerivedStrip.ts
|
|
13319
|
+
var ZONE_SEGMENT_COLORS = [
|
|
13320
|
+
"#E5735F",
|
|
13321
|
+
"#7EB0C2",
|
|
13322
|
+
"#F4C20D",
|
|
13323
|
+
"#6D6ED7"
|
|
13324
|
+
];
|
|
13325
|
+
var DEFAULT_SEGMENT_LABELS = [
|
|
13326
|
+
"Walk-by",
|
|
13327
|
+
"Browsing",
|
|
13328
|
+
"Engaged",
|
|
13329
|
+
"Converted"
|
|
13330
|
+
];
|
|
13331
|
+
function parseVisitorCount(raw) {
|
|
13332
|
+
if (typeof raw === "number" && Number.isFinite(raw)) return raw;
|
|
13333
|
+
if (typeof raw === "string") {
|
|
13334
|
+
const n = Number(String(raw).replace(/[^\d.]/g, ""));
|
|
13335
|
+
return Number.isFinite(n) ? n : 0;
|
|
13336
|
+
}
|
|
13337
|
+
return 0;
|
|
13338
|
+
}
|
|
13339
|
+
function defaultFourParts(total) {
|
|
13340
|
+
if (total <= 0) return [0, 0, 0, 0];
|
|
13341
|
+
const a = Math.round(total * 0.38);
|
|
13342
|
+
const b = Math.round(total * 0.32);
|
|
13343
|
+
const c = Math.round(total * 0.2);
|
|
13344
|
+
const d = total - a - b - c;
|
|
13345
|
+
return [a, b, c, d];
|
|
13346
|
+
}
|
|
13347
|
+
function rowFromExplicitStrip(zoneName, strip) {
|
|
13348
|
+
const id = `zone-strip-${encodeURIComponent(zoneName)}`;
|
|
13349
|
+
const segments = strip.segments.map((s, i) => ({
|
|
13350
|
+
id: `${id}-seg-${i}`,
|
|
13351
|
+
label: s.label,
|
|
13352
|
+
value: s.value,
|
|
13353
|
+
color: ZONE_SEGMENT_COLORS[i]
|
|
13354
|
+
}));
|
|
13355
|
+
const value = strip.segments.reduce((sum, s) => sum + s.value, 0);
|
|
13356
|
+
return { id, label: zoneName, value, segments };
|
|
13357
|
+
}
|
|
13358
|
+
function rowFromHeuristicLabel(zoneName, total) {
|
|
13359
|
+
const [a, b, c, d] = defaultFourParts(total);
|
|
13360
|
+
const id = `zone-heuristic-${encodeURIComponent(zoneName)}`;
|
|
13361
|
+
const segments = [a, b, c, d].map((value, i) => ({
|
|
13362
|
+
id: `${id}-seg-${i}`,
|
|
13363
|
+
label: DEFAULT_SEGMENT_LABELS[i],
|
|
13364
|
+
value,
|
|
13365
|
+
color: ZONE_SEGMENT_COLORS[i]
|
|
13366
|
+
}));
|
|
13367
|
+
return { id, label: zoneName, value: a + b + c + d, segments };
|
|
13368
|
+
}
|
|
13369
|
+
function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
|
|
13370
|
+
const buildRow = (node, role, total, fallback) => {
|
|
13371
|
+
if (buildBarRow) {
|
|
13372
|
+
const custom = buildBarRow({ node, activeZone, role, total });
|
|
13373
|
+
if (custom) return custom;
|
|
13374
|
+
}
|
|
13375
|
+
return fallback();
|
|
13376
|
+
};
|
|
13377
|
+
if (activeZone) {
|
|
13378
|
+
const childRowsSource = (activeZone.list ?? []).filter(
|
|
13379
|
+
(n) => parseVisitorCount(n.overallData?.count) > 0
|
|
13380
|
+
);
|
|
13381
|
+
if (childRowsSource.length > 0) {
|
|
13382
|
+
const items = childRowsSource.map((node) => {
|
|
13383
|
+
const total = parseVisitorCount(node.overallData?.count);
|
|
13384
|
+
return buildRow(
|
|
13385
|
+
node,
|
|
13386
|
+
"child",
|
|
13387
|
+
total,
|
|
13388
|
+
() => rowFromHeuristicLabel(node.name, total)
|
|
13389
|
+
);
|
|
13390
|
+
});
|
|
13391
|
+
const overallVisitorsFromChildren = childRowsSource.reduce(
|
|
13392
|
+
(sum, node) => sum + parseVisitorCount(node.overallData?.count),
|
|
13393
|
+
0
|
|
13394
|
+
);
|
|
13395
|
+
const fallbackVisitors = parseVisitorCount(activeZone.overallData?.count);
|
|
13396
|
+
const overallVisitors3 = overallVisitorsFromChildren > 0 ? overallVisitorsFromChildren : fallbackVisitors;
|
|
13397
|
+
const fromExplicitStoreCount = activeZone.zoneKpiStrip?.storeCount;
|
|
13398
|
+
const storeCount3 = fromExplicitStoreCount && fromExplicitStoreCount > 0 ? fromExplicitStoreCount : childRowsSource.length;
|
|
13399
|
+
return {
|
|
13400
|
+
summaryKpis: {
|
|
13401
|
+
storeCount: storeCount3,
|
|
13402
|
+
overallVisitors: activeZone.zoneKpiStrip?.overallVisitors ?? overallVisitors3
|
|
13403
|
+
},
|
|
13404
|
+
rankedBarList: {
|
|
13405
|
+
title: `${activeZone.name} store performance`,
|
|
13406
|
+
items,
|
|
13407
|
+
listHeaderLabel: "Store",
|
|
13408
|
+
valueColumnHeader: "Visitors"
|
|
13409
|
+
}
|
|
13410
|
+
};
|
|
13411
|
+
}
|
|
13412
|
+
if (activeZone.zoneKpiStrip) {
|
|
13413
|
+
const zs = activeZone.zoneKpiStrip;
|
|
13414
|
+
return {
|
|
13415
|
+
summaryKpis: {
|
|
13416
|
+
storeCount: zs.storeCount,
|
|
13417
|
+
overallVisitors: zs.overallVisitors
|
|
13418
|
+
},
|
|
13419
|
+
rankedBarList: {
|
|
13420
|
+
title: "Zone breakdown",
|
|
13421
|
+
items: [
|
|
13422
|
+
buildRow(
|
|
13423
|
+
activeZone,
|
|
13424
|
+
"active",
|
|
13425
|
+
zs.overallVisitors,
|
|
13426
|
+
() => rowFromExplicitStrip(activeZone.name, zs)
|
|
13427
|
+
)
|
|
13428
|
+
],
|
|
13429
|
+
listHeaderLabel: "Zone",
|
|
13430
|
+
valueColumnHeader: "Visitors"
|
|
13431
|
+
}
|
|
13432
|
+
};
|
|
13433
|
+
}
|
|
13434
|
+
const fromNode = parseVisitorCount(activeZone.overallData?.count);
|
|
13435
|
+
const fromChildren = childTiles.reduce(
|
|
13436
|
+
(s, n) => s + parseVisitorCount(n.overallData?.count),
|
|
13437
|
+
0
|
|
13438
|
+
);
|
|
13439
|
+
const overallVisitors2 = fromNode > 0 ? fromNode : fromChildren;
|
|
13440
|
+
const storeCount2 = childTiles.length;
|
|
13441
|
+
return {
|
|
13442
|
+
summaryKpis: { storeCount: storeCount2, overallVisitors: overallVisitors2 },
|
|
13443
|
+
rankedBarList: {
|
|
13444
|
+
title: "Zone breakdown",
|
|
13445
|
+
items: [
|
|
13446
|
+
buildRow(
|
|
13447
|
+
activeZone,
|
|
13448
|
+
"active",
|
|
13449
|
+
overallVisitors2,
|
|
13450
|
+
() => rowFromHeuristicLabel(activeZone.name, overallVisitors2)
|
|
13451
|
+
)
|
|
13452
|
+
],
|
|
13453
|
+
listHeaderLabel: "Zone",
|
|
13454
|
+
valueColumnHeader: "Visitors"
|
|
13455
|
+
}
|
|
13456
|
+
};
|
|
13457
|
+
}
|
|
13458
|
+
if (!childTiles.length) return null;
|
|
13459
|
+
const overallVisitors = childTiles.reduce(
|
|
13460
|
+
(s, n) => s + parseVisitorCount(n.overallData?.count),
|
|
13461
|
+
0
|
|
13462
|
+
);
|
|
13463
|
+
const storeCount = childTiles.length;
|
|
13464
|
+
const overviewNode = {
|
|
13465
|
+
name: "Overview",
|
|
13466
|
+
value: overallVisitors,
|
|
13467
|
+
originalValue: overallVisitors,
|
|
13468
|
+
color: "",
|
|
13469
|
+
overallData: { count: overallVisitors, dwell: "" },
|
|
13470
|
+
list: []
|
|
13471
|
+
};
|
|
13472
|
+
return {
|
|
13473
|
+
summaryKpis: { storeCount, overallVisitors },
|
|
13474
|
+
rankedBarList: {
|
|
13475
|
+
title: "Footfall overview",
|
|
13476
|
+
items: [
|
|
13477
|
+
buildRow(
|
|
13478
|
+
overviewNode,
|
|
13479
|
+
"overview",
|
|
13480
|
+
overallVisitors,
|
|
13481
|
+
() => rowFromHeuristicLabel("Overview", overallVisitors)
|
|
13482
|
+
)
|
|
13483
|
+
],
|
|
13484
|
+
listHeaderLabel: "Scope",
|
|
13485
|
+
valueColumnHeader: "Visitors"
|
|
13486
|
+
}
|
|
13487
|
+
};
|
|
13488
|
+
}
|
|
13489
|
+
|
|
13490
|
+
// src/components/widgets/FootFallHeatMap/footfallHeatMapTree.ts
|
|
13491
|
+
function toRechartsTreemapData(nodes) {
|
|
13492
|
+
return nodes.map((n) => ({
|
|
13493
|
+
...n,
|
|
13494
|
+
children: n.list?.length ? toRechartsTreemapData(n.list) : void 0
|
|
13495
|
+
}));
|
|
12480
13496
|
}
|
|
12481
13497
|
function preprocessData(data) {
|
|
12482
13498
|
if (!data || !Array.isArray(data)) return [];
|
|
@@ -12713,7 +13729,7 @@ function getNestedList(payload) {
|
|
|
12713
13729
|
}
|
|
12714
13730
|
|
|
12715
13731
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12716
|
-
import { Fragment as
|
|
13732
|
+
import { Fragment as Fragment19, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12717
13733
|
function toDisplayNumber(value) {
|
|
12718
13734
|
if (!Number.isFinite(value)) return "0";
|
|
12719
13735
|
return new Intl.NumberFormat("en-IN").format(value);
|
|
@@ -12732,7 +13748,7 @@ function InlineStatCard({
|
|
|
12732
13748
|
sx,
|
|
12733
13749
|
iconColor = "#1565C0"
|
|
12734
13750
|
}) {
|
|
12735
|
-
return /* @__PURE__ */
|
|
13751
|
+
return /* @__PURE__ */ jsx49(
|
|
12736
13752
|
Paper5,
|
|
12737
13753
|
{
|
|
12738
13754
|
elevation: 0,
|
|
@@ -12748,8 +13764,8 @@ function InlineStatCard({
|
|
|
12748
13764
|
},
|
|
12749
13765
|
...sx ? [sx] : []
|
|
12750
13766
|
],
|
|
12751
|
-
children: /* @__PURE__ */
|
|
12752
|
-
/* @__PURE__ */
|
|
13767
|
+
children: /* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
13768
|
+
/* @__PURE__ */ jsx49(
|
|
12753
13769
|
Icon13,
|
|
12754
13770
|
{
|
|
12755
13771
|
icon,
|
|
@@ -12759,17 +13775,17 @@ function InlineStatCard({
|
|
|
12759
13775
|
style: { flexShrink: 0 }
|
|
12760
13776
|
}
|
|
12761
13777
|
),
|
|
12762
|
-
/* @__PURE__ */
|
|
12763
|
-
/* @__PURE__ */
|
|
12764
|
-
|
|
13778
|
+
/* @__PURE__ */ jsxs39(Stack27, { spacing: 0.15, children: [
|
|
13779
|
+
/* @__PURE__ */ jsx49(
|
|
13780
|
+
Typography28,
|
|
12765
13781
|
{
|
|
12766
13782
|
variant: "body2",
|
|
12767
13783
|
sx: { fontWeight: 500, color: "text.primary" },
|
|
12768
13784
|
children: title
|
|
12769
13785
|
}
|
|
12770
13786
|
),
|
|
12771
|
-
/* @__PURE__ */
|
|
12772
|
-
|
|
13787
|
+
/* @__PURE__ */ jsx49(
|
|
13788
|
+
Typography28,
|
|
12773
13789
|
{
|
|
12774
13790
|
variant: "h6",
|
|
12775
13791
|
sx: { lineHeight: 1.1, fontWeight: 700, color: "text.primary" },
|
|
@@ -12798,17 +13814,17 @@ function InlineSegmentStrip({
|
|
|
12798
13814
|
const barHeight = presentation?.barHeight ?? 12;
|
|
12799
13815
|
const trackInsetPx = presentation?.trackInsetPx ?? 3;
|
|
12800
13816
|
const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
|
|
12801
|
-
return /* @__PURE__ */
|
|
12802
|
-
/* @__PURE__ */
|
|
12803
|
-
|
|
13817
|
+
return /* @__PURE__ */ jsxs39(Stack27, { spacing: 0.75, children: [
|
|
13818
|
+
/* @__PURE__ */ jsxs39(
|
|
13819
|
+
Stack27,
|
|
12804
13820
|
{
|
|
12805
13821
|
direction: "row",
|
|
12806
13822
|
alignItems: "center",
|
|
12807
13823
|
justifyContent: "space-between",
|
|
12808
13824
|
gap: 1,
|
|
12809
13825
|
children: [
|
|
12810
|
-
/* @__PURE__ */
|
|
12811
|
-
|
|
13826
|
+
/* @__PURE__ */ jsx49(
|
|
13827
|
+
Typography28,
|
|
12812
13828
|
{
|
|
12813
13829
|
variant: "subtitle2",
|
|
12814
13830
|
sx: [
|
|
@@ -12818,8 +13834,8 @@ function InlineSegmentStrip({
|
|
|
12818
13834
|
children: item.label
|
|
12819
13835
|
}
|
|
12820
13836
|
),
|
|
12821
|
-
/* @__PURE__ */
|
|
12822
|
-
|
|
13837
|
+
/* @__PURE__ */ jsx49(
|
|
13838
|
+
Typography28,
|
|
12823
13839
|
{
|
|
12824
13840
|
variant: "body2",
|
|
12825
13841
|
sx: [
|
|
@@ -12832,8 +13848,8 @@ function InlineSegmentStrip({
|
|
|
12832
13848
|
]
|
|
12833
13849
|
}
|
|
12834
13850
|
),
|
|
12835
|
-
/* @__PURE__ */
|
|
12836
|
-
|
|
13851
|
+
/* @__PURE__ */ jsx49(
|
|
13852
|
+
Box33,
|
|
12837
13853
|
{
|
|
12838
13854
|
sx: {
|
|
12839
13855
|
width: "100%",
|
|
@@ -12850,8 +13866,8 @@ function InlineSegmentStrip({
|
|
|
12850
13866
|
const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
|
|
12851
13867
|
const isLast = idx === lastIdx;
|
|
12852
13868
|
const fill = resolveSegmentFill(presentation, idx, segment.color);
|
|
12853
|
-
return /* @__PURE__ */
|
|
12854
|
-
|
|
13869
|
+
return /* @__PURE__ */ jsx49(
|
|
13870
|
+
Tooltip13,
|
|
12855
13871
|
{
|
|
12856
13872
|
title: (() => {
|
|
12857
13873
|
if (presentation?.renderSegmentTooltip) {
|
|
@@ -12863,7 +13879,7 @@ function InlineSegmentStrip({
|
|
|
12863
13879
|
});
|
|
12864
13880
|
return custom == null ? "" : custom;
|
|
12865
13881
|
}
|
|
12866
|
-
return /* @__PURE__ */
|
|
13882
|
+
return /* @__PURE__ */ jsx49(
|
|
12867
13883
|
InlineSegmentTooltipCard,
|
|
12868
13884
|
{
|
|
12869
13885
|
segment,
|
|
@@ -12878,8 +13894,8 @@ function InlineSegmentStrip({
|
|
|
12878
13894
|
sx: inlineSegmentTooltipPopperSx
|
|
12879
13895
|
}
|
|
12880
13896
|
},
|
|
12881
|
-
children: /* @__PURE__ */
|
|
12882
|
-
|
|
13897
|
+
children: /* @__PURE__ */ jsx49(
|
|
13898
|
+
Box33,
|
|
12883
13899
|
{
|
|
12884
13900
|
sx: {
|
|
12885
13901
|
width: `${Math.max(0, widthPercent)}%`,
|
|
@@ -12923,10 +13939,10 @@ function InlineSegmentTooltipCard({
|
|
|
12923
13939
|
cardSx
|
|
12924
13940
|
}) {
|
|
12925
13941
|
const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
|
|
12926
|
-
return /* @__PURE__ */
|
|
12927
|
-
/* @__PURE__ */
|
|
12928
|
-
/* @__PURE__ */
|
|
12929
|
-
|
|
13942
|
+
return /* @__PURE__ */ jsxs39(Box33, { sx: tooltipSurfaceSx, children: [
|
|
13943
|
+
/* @__PURE__ */ jsx49(Box33, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
|
|
13944
|
+
/* @__PURE__ */ jsxs39(
|
|
13945
|
+
Box33,
|
|
12930
13946
|
{
|
|
12931
13947
|
sx: {
|
|
12932
13948
|
display: "flex",
|
|
@@ -12938,8 +13954,8 @@ function InlineSegmentTooltipCard({
|
|
|
12938
13954
|
py: 1.25
|
|
12939
13955
|
},
|
|
12940
13956
|
children: [
|
|
12941
|
-
/* @__PURE__ */
|
|
12942
|
-
|
|
13957
|
+
/* @__PURE__ */ jsx49(
|
|
13958
|
+
Box33,
|
|
12943
13959
|
{
|
|
12944
13960
|
component: "span",
|
|
12945
13961
|
"aria-hidden": true,
|
|
@@ -12952,8 +13968,8 @@ function InlineSegmentTooltipCard({
|
|
|
12952
13968
|
}
|
|
12953
13969
|
}
|
|
12954
13970
|
),
|
|
12955
|
-
/* @__PURE__ */
|
|
12956
|
-
|
|
13971
|
+
/* @__PURE__ */ jsx49(
|
|
13972
|
+
Typography28,
|
|
12957
13973
|
{
|
|
12958
13974
|
component: "span",
|
|
12959
13975
|
sx: {
|
|
@@ -12965,8 +13981,8 @@ function InlineSegmentTooltipCard({
|
|
|
12965
13981
|
children: segment.label
|
|
12966
13982
|
}
|
|
12967
13983
|
),
|
|
12968
|
-
/* @__PURE__ */
|
|
12969
|
-
|
|
13984
|
+
/* @__PURE__ */ jsx49(
|
|
13985
|
+
Typography28,
|
|
12970
13986
|
{
|
|
12971
13987
|
component: "span",
|
|
12972
13988
|
sx: {
|
|
@@ -12978,8 +13994,8 @@ function InlineSegmentTooltipCard({
|
|
|
12978
13994
|
children: " : "
|
|
12979
13995
|
}
|
|
12980
13996
|
),
|
|
12981
|
-
/* @__PURE__ */
|
|
12982
|
-
|
|
13997
|
+
/* @__PURE__ */ jsx49(
|
|
13998
|
+
Typography28,
|
|
12983
13999
|
{
|
|
12984
14000
|
component: "span",
|
|
12985
14001
|
sx: {
|
|
@@ -13009,8 +14025,8 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13009
14025
|
const statIcon = presentation?.statCardIconColor ?? "#1565C0";
|
|
13010
14026
|
const customSummary = presentation?.summaryCards?.(summaryKpis);
|
|
13011
14027
|
const useCustomSummary = customSummary !== void 0;
|
|
13012
|
-
return /* @__PURE__ */
|
|
13013
|
-
|
|
14028
|
+
return /* @__PURE__ */ jsxs39(
|
|
14029
|
+
Stack27,
|
|
13014
14030
|
{
|
|
13015
14031
|
spacing: 2,
|
|
13016
14032
|
sx: [
|
|
@@ -13019,15 +14035,15 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13019
14035
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
13020
14036
|
],
|
|
13021
14037
|
children: [
|
|
13022
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */
|
|
13023
|
-
|
|
14038
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ jsx49(
|
|
14039
|
+
Stack27,
|
|
13024
14040
|
{
|
|
13025
14041
|
direction: "row",
|
|
13026
14042
|
spacing: 1.5,
|
|
13027
14043
|
flexWrap: "wrap",
|
|
13028
14044
|
useFlexGap: true,
|
|
13029
14045
|
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
13030
|
-
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */
|
|
14046
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ jsx49(
|
|
13031
14047
|
InlineStatCard,
|
|
13032
14048
|
{
|
|
13033
14049
|
icon: card.icon ?? "mdi:chart-box-outline",
|
|
@@ -13040,7 +14056,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13040
14056
|
},
|
|
13041
14057
|
card.id
|
|
13042
14058
|
)) : [
|
|
13043
|
-
/* @__PURE__ */
|
|
14059
|
+
/* @__PURE__ */ jsx49(
|
|
13044
14060
|
InlineStatCard,
|
|
13045
14061
|
{
|
|
13046
14062
|
icon: "mdi:store-marker-outline",
|
|
@@ -13051,7 +14067,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13051
14067
|
},
|
|
13052
14068
|
"default-stores"
|
|
13053
14069
|
),
|
|
13054
|
-
/* @__PURE__ */
|
|
14070
|
+
/* @__PURE__ */ jsx49(
|
|
13055
14071
|
InlineStatCard,
|
|
13056
14072
|
{
|
|
13057
14073
|
icon: "fluent:people-community-16-filled",
|
|
@@ -13065,15 +14081,15 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13065
14081
|
]
|
|
13066
14082
|
}
|
|
13067
14083
|
),
|
|
13068
|
-
/* @__PURE__ */
|
|
13069
|
-
|
|
14084
|
+
/* @__PURE__ */ jsx49(
|
|
14085
|
+
Stack27,
|
|
13070
14086
|
{
|
|
13071
14087
|
spacing: 1.25,
|
|
13072
14088
|
sx: [
|
|
13073
14089
|
{ pt: 0.5, pb: 1 },
|
|
13074
14090
|
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
13075
14091
|
],
|
|
13076
|
-
children: rankedBarList.items.map((item) => /* @__PURE__ */
|
|
14092
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ jsx49(
|
|
13077
14093
|
InlineSegmentStrip,
|
|
13078
14094
|
{
|
|
13079
14095
|
item,
|
|
@@ -13255,7 +14271,7 @@ function FootFallHeatMapView({
|
|
|
13255
14271
|
tileColors: treemapProp?.tileColors
|
|
13256
14272
|
};
|
|
13257
14273
|
const tileMetrics = treemapLayout.tileMetrics;
|
|
13258
|
-
const tileColorFromSeed =
|
|
14274
|
+
const tileColorFromSeed = useMemo21(
|
|
13259
14275
|
() => createTreemapTileColorResolver(treemapLayout.tileColors),
|
|
13260
14276
|
[treemapLayout.tileColors]
|
|
13261
14277
|
);
|
|
@@ -13297,14 +14313,22 @@ function FootFallHeatMapView({
|
|
|
13297
14313
|
startFromPathMode,
|
|
13298
14314
|
tileColorFromSeed
|
|
13299
14315
|
]);
|
|
13300
|
-
const derivedKpiStrip =
|
|
14316
|
+
const derivedKpiStrip = useMemo21(() => {
|
|
13301
14317
|
if (isLoading || loading || !initialData) return null;
|
|
13302
14318
|
const activeZoneForStrip = trackingDetails.length > 0 ? trackingDetails[trackingDetails.length - 1] : void 0;
|
|
13303
14319
|
return deriveFootfallHeatMapKpiStrip(
|
|
13304
14320
|
activeZoneForStrip,
|
|
13305
|
-
data.current ?? []
|
|
14321
|
+
data.current ?? [],
|
|
14322
|
+
kpiStripPresentation?.buildBarRow
|
|
13306
14323
|
);
|
|
13307
|
-
}, [
|
|
14324
|
+
}, [
|
|
14325
|
+
isLoading,
|
|
14326
|
+
loading,
|
|
14327
|
+
initialData,
|
|
14328
|
+
trackingDetails,
|
|
14329
|
+
data,
|
|
14330
|
+
kpiStripPresentation?.buildBarRow
|
|
14331
|
+
]);
|
|
13308
14332
|
const formatPercentage = (value) => {
|
|
13309
14333
|
if (typeof value !== "number") return "0%";
|
|
13310
14334
|
const formatted = value.toFixed(2);
|
|
@@ -13385,7 +14409,7 @@ function FootFallHeatMapView({
|
|
|
13385
14409
|
);
|
|
13386
14410
|
const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
|
|
13387
14411
|
const p = inner;
|
|
13388
|
-
return /* @__PURE__ */
|
|
14412
|
+
return /* @__PURE__ */ jsx49(
|
|
13389
14413
|
"foreignObject",
|
|
13390
14414
|
{
|
|
13391
14415
|
x,
|
|
@@ -13393,8 +14417,8 @@ function FootFallHeatMapView({
|
|
|
13393
14417
|
width,
|
|
13394
14418
|
height,
|
|
13395
14419
|
style: { borderRadius: "12px", overflow: "hidden" },
|
|
13396
|
-
children: /* @__PURE__ */
|
|
13397
|
-
|
|
14420
|
+
children: /* @__PURE__ */ jsxs39(
|
|
14421
|
+
Stack27,
|
|
13398
14422
|
{
|
|
13399
14423
|
onClick: handleClick,
|
|
13400
14424
|
onKeyDown: (e) => {
|
|
@@ -13424,8 +14448,8 @@ function FootFallHeatMapView({
|
|
|
13424
14448
|
}
|
|
13425
14449
|
},
|
|
13426
14450
|
children: [
|
|
13427
|
-
/* @__PURE__ */
|
|
13428
|
-
|
|
14451
|
+
/* @__PURE__ */ jsxs39(
|
|
14452
|
+
Stack27,
|
|
13429
14453
|
{
|
|
13430
14454
|
direction: isSmall ? "row" : "column",
|
|
13431
14455
|
justifyContent: "center",
|
|
@@ -13436,8 +14460,8 @@ function FootFallHeatMapView({
|
|
|
13436
14460
|
mb: isSmall ? 0.5 : 1
|
|
13437
14461
|
},
|
|
13438
14462
|
children: [
|
|
13439
|
-
/* @__PURE__ */
|
|
13440
|
-
|
|
14463
|
+
/* @__PURE__ */ jsx49(
|
|
14464
|
+
Typography28,
|
|
13441
14465
|
{
|
|
13442
14466
|
sx: {
|
|
13443
14467
|
fontSize: `${fontSize}px!important`,
|
|
@@ -13459,8 +14483,8 @@ function FootFallHeatMapView({
|
|
|
13459
14483
|
children: name
|
|
13460
14484
|
}
|
|
13461
14485
|
),
|
|
13462
|
-
/* @__PURE__ */
|
|
13463
|
-
|
|
14486
|
+
/* @__PURE__ */ jsx49(
|
|
14487
|
+
Typography28,
|
|
13464
14488
|
{
|
|
13465
14489
|
sx: {
|
|
13466
14490
|
fontSize: `${fontSize}px!important`,
|
|
@@ -13474,8 +14498,8 @@ function FootFallHeatMapView({
|
|
|
13474
14498
|
]
|
|
13475
14499
|
}
|
|
13476
14500
|
),
|
|
13477
|
-
/* @__PURE__ */
|
|
13478
|
-
|
|
14501
|
+
/* @__PURE__ */ jsxs39(
|
|
14502
|
+
Stack27,
|
|
13479
14503
|
{
|
|
13480
14504
|
direction: "row",
|
|
13481
14505
|
justifyContent: "center",
|
|
@@ -13488,8 +14512,8 @@ function FootFallHeatMapView({
|
|
|
13488
14512
|
...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
|
|
13489
14513
|
],
|
|
13490
14514
|
children: [
|
|
13491
|
-
/* @__PURE__ */
|
|
13492
|
-
|
|
14515
|
+
/* @__PURE__ */ jsxs39(
|
|
14516
|
+
Stack27,
|
|
13493
14517
|
{
|
|
13494
14518
|
direction: "row",
|
|
13495
14519
|
alignItems: "center",
|
|
@@ -13506,8 +14530,8 @@ function FootFallHeatMapView({
|
|
|
13506
14530
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13507
14531
|
],
|
|
13508
14532
|
children: [
|
|
13509
|
-
/* @__PURE__ */
|
|
13510
|
-
|
|
14533
|
+
/* @__PURE__ */ jsx49(
|
|
14534
|
+
Box33,
|
|
13511
14535
|
{
|
|
13512
14536
|
sx: [
|
|
13513
14537
|
{
|
|
@@ -13519,7 +14543,7 @@ function FootFallHeatMapView({
|
|
|
13519
14543
|
},
|
|
13520
14544
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13521
14545
|
],
|
|
13522
|
-
children: /* @__PURE__ */
|
|
14546
|
+
children: /* @__PURE__ */ jsx49(
|
|
13523
14547
|
Icon13,
|
|
13524
14548
|
{
|
|
13525
14549
|
icon: icons.visitors,
|
|
@@ -13529,8 +14553,8 @@ function FootFallHeatMapView({
|
|
|
13529
14553
|
)
|
|
13530
14554
|
}
|
|
13531
14555
|
),
|
|
13532
|
-
/* @__PURE__ */
|
|
13533
|
-
|
|
14556
|
+
/* @__PURE__ */ jsx49(
|
|
14557
|
+
Typography28,
|
|
13534
14558
|
{
|
|
13535
14559
|
sx: [
|
|
13536
14560
|
{
|
|
@@ -13547,8 +14571,8 @@ function FootFallHeatMapView({
|
|
|
13547
14571
|
]
|
|
13548
14572
|
}
|
|
13549
14573
|
),
|
|
13550
|
-
/* @__PURE__ */
|
|
13551
|
-
|
|
14574
|
+
/* @__PURE__ */ jsxs39(
|
|
14575
|
+
Stack27,
|
|
13552
14576
|
{
|
|
13553
14577
|
direction: "row",
|
|
13554
14578
|
alignItems: "center",
|
|
@@ -13565,8 +14589,8 @@ function FootFallHeatMapView({
|
|
|
13565
14589
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13566
14590
|
],
|
|
13567
14591
|
children: [
|
|
13568
|
-
/* @__PURE__ */
|
|
13569
|
-
|
|
14592
|
+
/* @__PURE__ */ jsx49(
|
|
14593
|
+
Box33,
|
|
13570
14594
|
{
|
|
13571
14595
|
sx: [
|
|
13572
14596
|
{
|
|
@@ -13578,7 +14602,7 @@ function FootFallHeatMapView({
|
|
|
13578
14602
|
},
|
|
13579
14603
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13580
14604
|
],
|
|
13581
|
-
children: /* @__PURE__ */
|
|
14605
|
+
children: /* @__PURE__ */ jsx49(
|
|
13582
14606
|
Icon13,
|
|
13583
14607
|
{
|
|
13584
14608
|
icon: icons.dwell,
|
|
@@ -13588,8 +14612,8 @@ function FootFallHeatMapView({
|
|
|
13588
14612
|
)
|
|
13589
14613
|
}
|
|
13590
14614
|
),
|
|
13591
|
-
/* @__PURE__ */
|
|
13592
|
-
|
|
14615
|
+
/* @__PURE__ */ jsx49(
|
|
14616
|
+
Typography28,
|
|
13593
14617
|
{
|
|
13594
14618
|
sx: [
|
|
13595
14619
|
{
|
|
@@ -13631,8 +14655,8 @@ function FootFallHeatMapView({
|
|
|
13631
14655
|
const LabelTag = ({ textColor = "#f0f0f0" }) => {
|
|
13632
14656
|
const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
|
|
13633
14657
|
const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
|
|
13634
|
-
return /* @__PURE__ */
|
|
13635
|
-
|
|
14658
|
+
return /* @__PURE__ */ jsx49(Stack27, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ jsx49(
|
|
14659
|
+
Typography28,
|
|
13636
14660
|
{
|
|
13637
14661
|
component: "span",
|
|
13638
14662
|
sx: {
|
|
@@ -13645,10 +14669,10 @@ function FootFallHeatMapView({
|
|
|
13645
14669
|
color: textColor,
|
|
13646
14670
|
children: brandLabel
|
|
13647
14671
|
}
|
|
13648
|
-
) : /* @__PURE__ */
|
|
13649
|
-
breadcrumbSegments.map((seg, i) => /* @__PURE__ */
|
|
13650
|
-
i > 0 ? /* @__PURE__ */
|
|
13651
|
-
|
|
14672
|
+
) : /* @__PURE__ */ jsxs39(Fragment19, { children: [
|
|
14673
|
+
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ jsxs39(React26.Fragment, { children: [
|
|
14674
|
+
i > 0 ? /* @__PURE__ */ jsx49(
|
|
14675
|
+
Typography28,
|
|
13652
14676
|
{
|
|
13653
14677
|
component: "span",
|
|
13654
14678
|
fontSize: "15px !important",
|
|
@@ -13658,8 +14682,8 @@ function FootFallHeatMapView({
|
|
|
13658
14682
|
children: "/"
|
|
13659
14683
|
}
|
|
13660
14684
|
) : null,
|
|
13661
|
-
/* @__PURE__ */
|
|
13662
|
-
|
|
14685
|
+
/* @__PURE__ */ jsx49(
|
|
14686
|
+
Typography28,
|
|
13663
14687
|
{
|
|
13664
14688
|
component: "span",
|
|
13665
14689
|
sx: {
|
|
@@ -13674,9 +14698,9 @@ function FootFallHeatMapView({
|
|
|
13674
14698
|
}
|
|
13675
14699
|
)
|
|
13676
14700
|
] }, `${seg}-${i}`)),
|
|
13677
|
-
brandLabel ? /* @__PURE__ */
|
|
13678
|
-
/* @__PURE__ */
|
|
13679
|
-
|
|
14701
|
+
brandLabel ? /* @__PURE__ */ jsxs39(Fragment19, { children: [
|
|
14702
|
+
/* @__PURE__ */ jsx49(
|
|
14703
|
+
Typography28,
|
|
13680
14704
|
{
|
|
13681
14705
|
component: "span",
|
|
13682
14706
|
fontSize: "15px !important",
|
|
@@ -13685,8 +14709,8 @@ function FootFallHeatMapView({
|
|
|
13685
14709
|
children: "/"
|
|
13686
14710
|
}
|
|
13687
14711
|
),
|
|
13688
|
-
/* @__PURE__ */
|
|
13689
|
-
|
|
14712
|
+
/* @__PURE__ */ jsx49(
|
|
14713
|
+
Typography28,
|
|
13690
14714
|
{
|
|
13691
14715
|
component: "span",
|
|
13692
14716
|
sx: {
|
|
@@ -13705,10 +14729,10 @@ function FootFallHeatMapView({
|
|
|
13705
14729
|
};
|
|
13706
14730
|
const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
|
|
13707
14731
|
if (is500Error) {
|
|
13708
|
-
return /* @__PURE__ */
|
|
14732
|
+
return /* @__PURE__ */ jsx49(Box33, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ jsx49(Typography28, { color: "error", children: "Something went wrong (500). Try again later." }) });
|
|
13709
14733
|
}
|
|
13710
14734
|
if (isLoading || loading) {
|
|
13711
|
-
return /* @__PURE__ */
|
|
14735
|
+
return /* @__PURE__ */ jsx49(
|
|
13712
14736
|
Skeleton7,
|
|
13713
14737
|
{
|
|
13714
14738
|
variant: "rectangular",
|
|
@@ -13749,9 +14773,9 @@ function FootFallHeatMapView({
|
|
|
13749
14773
|
"#888888",
|
|
13750
14774
|
"header"
|
|
13751
14775
|
);
|
|
13752
|
-
return /* @__PURE__ */
|
|
13753
|
-
/* @__PURE__ */
|
|
13754
|
-
|
|
14776
|
+
return /* @__PURE__ */ jsxs39(Stack27, { width: "100%", children: [
|
|
14777
|
+
/* @__PURE__ */ jsxs39(
|
|
14778
|
+
Box33,
|
|
13755
14779
|
{
|
|
13756
14780
|
sx: {
|
|
13757
14781
|
width: "100%",
|
|
@@ -13762,16 +14786,16 @@ function FootFallHeatMapView({
|
|
|
13762
14786
|
gap: 1
|
|
13763
14787
|
},
|
|
13764
14788
|
children: [
|
|
13765
|
-
/* @__PURE__ */
|
|
13766
|
-
/* @__PURE__ */
|
|
13767
|
-
isFetching ? /* @__PURE__ */
|
|
13768
|
-
/* @__PURE__ */
|
|
14789
|
+
/* @__PURE__ */ jsx49(Typography28, { variant: "h6", fontWeight: 700, children: title }),
|
|
14790
|
+
/* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
14791
|
+
isFetching ? /* @__PURE__ */ jsx49(Typography28, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
|
|
14792
|
+
/* @__PURE__ */ jsx49(Tooltip13, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ jsx49(
|
|
13769
14793
|
IconButton5,
|
|
13770
14794
|
{
|
|
13771
14795
|
size: "small",
|
|
13772
14796
|
"aria-label": "Zone performance info",
|
|
13773
14797
|
edge: "end",
|
|
13774
|
-
children: /* @__PURE__ */
|
|
14798
|
+
children: /* @__PURE__ */ jsx49(
|
|
13775
14799
|
Icon13,
|
|
13776
14800
|
{
|
|
13777
14801
|
icon: icons.headerInfo,
|
|
@@ -13786,8 +14810,8 @@ function FootFallHeatMapView({
|
|
|
13786
14810
|
]
|
|
13787
14811
|
}
|
|
13788
14812
|
),
|
|
13789
|
-
data?.previous?.length > 0 && headerData ? /* @__PURE__ */
|
|
13790
|
-
|
|
14813
|
+
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ jsxs39(
|
|
14814
|
+
Stack27,
|
|
13791
14815
|
{
|
|
13792
14816
|
direction: "row",
|
|
13793
14817
|
alignItems: "center",
|
|
@@ -13801,13 +14825,13 @@ function FootFallHeatMapView({
|
|
|
13801
14825
|
backgroundColor: zoneBarColor
|
|
13802
14826
|
},
|
|
13803
14827
|
children: [
|
|
13804
|
-
/* @__PURE__ */
|
|
13805
|
-
/* @__PURE__ */
|
|
14828
|
+
/* @__PURE__ */ jsxs39(Stack27, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
14829
|
+
/* @__PURE__ */ jsx49(
|
|
13806
14830
|
Button8,
|
|
13807
14831
|
{
|
|
13808
14832
|
size: "small",
|
|
13809
14833
|
onClick: handleClose,
|
|
13810
|
-
startIcon: /* @__PURE__ */
|
|
14834
|
+
startIcon: /* @__PURE__ */ jsx49(
|
|
13811
14835
|
Icon13,
|
|
13812
14836
|
{
|
|
13813
14837
|
icon: "mdi:chevron-left",
|
|
@@ -13827,10 +14851,10 @@ function FootFallHeatMapView({
|
|
|
13827
14851
|
children: "Back"
|
|
13828
14852
|
}
|
|
13829
14853
|
),
|
|
13830
|
-
/* @__PURE__ */
|
|
14854
|
+
/* @__PURE__ */ jsx49(LabelTag, { textColor: zoneBarHeaderFg })
|
|
13831
14855
|
] }),
|
|
13832
|
-
/* @__PURE__ */
|
|
13833
|
-
|
|
14856
|
+
/* @__PURE__ */ jsxs39(
|
|
14857
|
+
Typography28,
|
|
13834
14858
|
{
|
|
13835
14859
|
variant: "h6",
|
|
13836
14860
|
sx: { color: zoneBarHeaderFg, fontWeight: 700 },
|
|
@@ -13844,7 +14868,7 @@ function FootFallHeatMapView({
|
|
|
13844
14868
|
]
|
|
13845
14869
|
}
|
|
13846
14870
|
) : null,
|
|
13847
|
-
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */
|
|
14871
|
+
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ jsx49(
|
|
13848
14872
|
FootfallHeatMapKpiRankedBlock,
|
|
13849
14873
|
{
|
|
13850
14874
|
strip: derivedKpiStrip,
|
|
@@ -13861,8 +14885,8 @@ function FootFallHeatMapView({
|
|
|
13861
14885
|
}
|
|
13862
14886
|
}
|
|
13863
14887
|
) : null,
|
|
13864
|
-
showLeafDetailsBody ? /* @__PURE__ */
|
|
13865
|
-
|
|
14888
|
+
showLeafDetailsBody ? /* @__PURE__ */ jsx49(
|
|
14889
|
+
Box33,
|
|
13866
14890
|
{
|
|
13867
14891
|
sx: [
|
|
13868
14892
|
{
|
|
@@ -13877,7 +14901,7 @@ function FootFallHeatMapView({
|
|
|
13877
14901
|
]
|
|
13878
14902
|
}
|
|
13879
14903
|
) : null,
|
|
13880
|
-
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */
|
|
14904
|
+
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ jsx49(ResponsiveContainer6, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ jsx49(
|
|
13881
14905
|
Treemap,
|
|
13882
14906
|
{
|
|
13883
14907
|
data: data?.current ?? [],
|
|
@@ -13890,22 +14914,22 @@ function FootFallHeatMapView({
|
|
|
13890
14914
|
animationDuration: 0,
|
|
13891
14915
|
style: { borderRadius: "12px" }
|
|
13892
14916
|
}
|
|
13893
|
-
) }) : /* @__PURE__ */
|
|
14917
|
+
) }) : /* @__PURE__ */ jsx49(
|
|
13894
14918
|
ChartEmptyState,
|
|
13895
14919
|
{
|
|
13896
14920
|
minHeight: treemapHeight,
|
|
13897
14921
|
...emptyStatePlaceholderProps
|
|
13898
14922
|
}
|
|
13899
|
-
) : /* @__PURE__ */
|
|
14923
|
+
) : /* @__PURE__ */ jsx49(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
|
|
13900
14924
|
] });
|
|
13901
14925
|
}
|
|
13902
14926
|
|
|
13903
14927
|
// src/components/widgets/FootFallHeatMap/ZoneWiseKpiCards.tsx
|
|
13904
14928
|
import Grid2 from "@mui/material/Grid";
|
|
13905
14929
|
import Paper6 from "@mui/material/Paper";
|
|
13906
|
-
import
|
|
13907
|
-
import
|
|
13908
|
-
import { jsx as
|
|
14930
|
+
import Stack28 from "@mui/material/Stack";
|
|
14931
|
+
import Typography29 from "@mui/material/Typography";
|
|
14932
|
+
import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
13909
14933
|
function metricsToRows(metrics) {
|
|
13910
14934
|
return [
|
|
13911
14935
|
{ id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
|
|
@@ -13943,7 +14967,7 @@ function metricsToRows(metrics) {
|
|
|
13943
14967
|
}
|
|
13944
14968
|
var ZoneWiseKpiCards = ({ metrics }) => {
|
|
13945
14969
|
const rows = metricsToRows(metrics);
|
|
13946
|
-
return /* @__PURE__ */
|
|
14970
|
+
return /* @__PURE__ */ jsx50(Grid2, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ jsx50(
|
|
13947
14971
|
Grid2,
|
|
13948
14972
|
{
|
|
13949
14973
|
size: {
|
|
@@ -13951,7 +14975,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13951
14975
|
sm: 6,
|
|
13952
14976
|
md: 3
|
|
13953
14977
|
},
|
|
13954
|
-
children: /* @__PURE__ */
|
|
14978
|
+
children: /* @__PURE__ */ jsxs40(
|
|
13955
14979
|
Paper6,
|
|
13956
14980
|
{
|
|
13957
14981
|
elevation: 0,
|
|
@@ -13963,8 +14987,8 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13963
14987
|
height: "100%"
|
|
13964
14988
|
},
|
|
13965
14989
|
children: [
|
|
13966
|
-
/* @__PURE__ */
|
|
13967
|
-
|
|
14990
|
+
/* @__PURE__ */ jsx50(
|
|
14991
|
+
Typography29,
|
|
13968
14992
|
{
|
|
13969
14993
|
variant: "caption",
|
|
13970
14994
|
color: "text.secondary",
|
|
@@ -13972,7 +14996,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13972
14996
|
children: item.title
|
|
13973
14997
|
}
|
|
13974
14998
|
),
|
|
13975
|
-
/* @__PURE__ */
|
|
14999
|
+
/* @__PURE__ */ jsx50(Stack28, { mt: 1, children: /* @__PURE__ */ jsx50(Typography29, { variant: "h6", fontWeight: 700, children: item.value }) })
|
|
13976
15000
|
]
|
|
13977
15001
|
}
|
|
13978
15002
|
)
|
|
@@ -14031,41 +15055,41 @@ var peakBillingHoursMockSeriesByTabId = {
|
|
|
14031
15055
|
};
|
|
14032
15056
|
|
|
14033
15057
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14034
|
-
import
|
|
14035
|
-
import
|
|
14036
|
-
import
|
|
15058
|
+
import Box34 from "@mui/material/Box";
|
|
15059
|
+
import Card5 from "@mui/material/Card";
|
|
15060
|
+
import CardContent4 from "@mui/material/CardContent";
|
|
14037
15061
|
import Skeleton8 from "@mui/material/Skeleton";
|
|
14038
|
-
import
|
|
14039
|
-
import
|
|
14040
|
-
import * as
|
|
15062
|
+
import Stack29 from "@mui/material/Stack";
|
|
15063
|
+
import Typography30 from "@mui/material/Typography";
|
|
15064
|
+
import * as React28 from "react";
|
|
14041
15065
|
import {
|
|
14042
|
-
Bar as
|
|
14043
|
-
BarChart as
|
|
14044
|
-
CartesianGrid as
|
|
15066
|
+
Bar as Bar6,
|
|
15067
|
+
BarChart as BarChart4,
|
|
15068
|
+
CartesianGrid as CartesianGrid8,
|
|
14045
15069
|
LabelList as LabelList5,
|
|
14046
|
-
ResponsiveContainer as
|
|
14047
|
-
Tooltip as
|
|
14048
|
-
XAxis as
|
|
14049
|
-
YAxis as
|
|
15070
|
+
ResponsiveContainer as ResponsiveContainer7,
|
|
15071
|
+
Tooltip as Tooltip14,
|
|
15072
|
+
XAxis as XAxis8,
|
|
15073
|
+
YAxis as YAxis8
|
|
14050
15074
|
} from "recharts";
|
|
14051
15075
|
|
|
14052
15076
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
|
|
14053
|
-
import * as
|
|
14054
|
-
import { jsx as
|
|
14055
|
-
var PeakBillingHoursCustomizationContext =
|
|
15077
|
+
import * as React27 from "react";
|
|
15078
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
15079
|
+
var PeakBillingHoursCustomizationContext = React27.createContext({});
|
|
14056
15080
|
function PeakBillingHoursCustomizationProvider({
|
|
14057
15081
|
value,
|
|
14058
15082
|
children
|
|
14059
15083
|
}) {
|
|
14060
|
-
const memo =
|
|
14061
|
-
return /* @__PURE__ */
|
|
15084
|
+
const memo = React27.useMemo(() => value, [value]);
|
|
15085
|
+
return /* @__PURE__ */ jsx51(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
|
|
14062
15086
|
}
|
|
14063
15087
|
function usePeakBillingHoursCustomization() {
|
|
14064
|
-
return
|
|
15088
|
+
return React27.useContext(PeakBillingHoursCustomizationContext);
|
|
14065
15089
|
}
|
|
14066
15090
|
|
|
14067
15091
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
|
|
14068
|
-
import { jsx as
|
|
15092
|
+
import { jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
14069
15093
|
function formatTooltipValue2(n) {
|
|
14070
15094
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
14071
15095
|
Math.round(n)
|
|
@@ -14112,7 +15136,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14112
15136
|
},
|
|
14113
15137
|
tt?.bodyStyle
|
|
14114
15138
|
);
|
|
14115
|
-
return /* @__PURE__ */
|
|
15139
|
+
return /* @__PURE__ */ jsx52(
|
|
14116
15140
|
"div",
|
|
14117
15141
|
{
|
|
14118
15142
|
style: {
|
|
@@ -14120,7 +15144,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14120
15144
|
minWidth: 160,
|
|
14121
15145
|
maxWidth: 280
|
|
14122
15146
|
},
|
|
14123
|
-
children: /* @__PURE__ */
|
|
15147
|
+
children: /* @__PURE__ */ jsxs41(
|
|
14124
15148
|
"div",
|
|
14125
15149
|
{
|
|
14126
15150
|
style: {
|
|
@@ -14131,7 +15155,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14131
15155
|
boxShadow: shadow
|
|
14132
15156
|
},
|
|
14133
15157
|
children: [
|
|
14134
|
-
/* @__PURE__ */
|
|
15158
|
+
/* @__PURE__ */ jsx52(
|
|
14135
15159
|
"div",
|
|
14136
15160
|
{
|
|
14137
15161
|
style: {
|
|
@@ -14142,14 +15166,14 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14142
15166
|
"aria-hidden": true
|
|
14143
15167
|
}
|
|
14144
15168
|
),
|
|
14145
|
-
/* @__PURE__ */
|
|
14146
|
-
/* @__PURE__ */
|
|
14147
|
-
/* @__PURE__ */
|
|
14148
|
-
/* @__PURE__ */
|
|
15169
|
+
/* @__PURE__ */ jsxs41("div", { style: bodyStyle, children: [
|
|
15170
|
+
/* @__PURE__ */ jsxs41("div", { style: rowStyle, children: [
|
|
15171
|
+
/* @__PURE__ */ jsx52("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
15172
|
+
/* @__PURE__ */ jsx52("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
14149
15173
|
] }),
|
|
14150
|
-
/* @__PURE__ */
|
|
14151
|
-
/* @__PURE__ */
|
|
14152
|
-
/* @__PURE__ */
|
|
15174
|
+
/* @__PURE__ */ jsxs41("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
15175
|
+
/* @__PURE__ */ jsx52("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
15176
|
+
/* @__PURE__ */ jsx52("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
|
|
14153
15177
|
] })
|
|
14154
15178
|
] })
|
|
14155
15179
|
]
|
|
@@ -14160,7 +15184,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14160
15184
|
}
|
|
14161
15185
|
|
|
14162
15186
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14163
|
-
import { Fragment as
|
|
15187
|
+
import { Fragment as Fragment20, jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
14164
15188
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
|
|
14165
15189
|
cartesianGridStroke: "#D3D6DF",
|
|
14166
15190
|
xAxisLineStroke: "#7566FC",
|
|
@@ -14172,7 +15196,7 @@ function toNum5(n) {
|
|
|
14172
15196
|
return typeof n === "number" ? n : Number(n);
|
|
14173
15197
|
}
|
|
14174
15198
|
function PeakBarTopLabel(props) {
|
|
14175
|
-
const { x, y, width, value, fill, fontSize, fontWeight } = props;
|
|
15199
|
+
const { x, y, width, value, fill, fontSize, fontWeight, angle = 0 } = props;
|
|
14176
15200
|
const nx = toNum5(x);
|
|
14177
15201
|
const ny = toNum5(y);
|
|
14178
15202
|
const nw = toNum5(width);
|
|
@@ -14185,7 +15209,8 @@ function PeakBarTopLabel(props) {
|
|
|
14185
15209
|
}
|
|
14186
15210
|
const cx = nx + nw / 2;
|
|
14187
15211
|
const cy = ny - 6;
|
|
14188
|
-
|
|
15212
|
+
const isHorizontal = angle === 0;
|
|
15213
|
+
return /* @__PURE__ */ jsx53(
|
|
14189
15214
|
"text",
|
|
14190
15215
|
{
|
|
14191
15216
|
x: cx,
|
|
@@ -14193,12 +15218,13 @@ function PeakBarTopLabel(props) {
|
|
|
14193
15218
|
fill,
|
|
14194
15219
|
fontSize,
|
|
14195
15220
|
fontWeight,
|
|
14196
|
-
textAnchor: "middle",
|
|
15221
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
15222
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
14197
15223
|
children: String(Math.round(n))
|
|
14198
15224
|
}
|
|
14199
15225
|
);
|
|
14200
15226
|
}
|
|
14201
|
-
function
|
|
15227
|
+
function BarPlot2({
|
|
14202
15228
|
data,
|
|
14203
15229
|
yAxisDomain,
|
|
14204
15230
|
yAxisTicks,
|
|
@@ -14208,7 +15234,8 @@ function BarPlot({
|
|
|
14208
15234
|
yAxisTickDx = -6,
|
|
14209
15235
|
yAxisTickStyle,
|
|
14210
15236
|
xAxisTickDx = 0,
|
|
14211
|
-
xAxisTickStyle
|
|
15237
|
+
xAxisTickStyle,
|
|
15238
|
+
barValueLabelAngle = 0
|
|
14212
15239
|
}) {
|
|
14213
15240
|
const { barChart: bc } = usePeakBillingHoursCustomization();
|
|
14214
15241
|
const height = bc?.heightPx ?? 320;
|
|
@@ -14236,24 +15263,24 @@ function BarPlot({
|
|
|
14236
15263
|
barRadius,
|
|
14237
15264
|
barRadius
|
|
14238
15265
|
];
|
|
14239
|
-
return /* @__PURE__ */
|
|
14240
|
-
|
|
15266
|
+
return /* @__PURE__ */ jsx53(Box34, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ jsx53(ResponsiveContainer7, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs42(
|
|
15267
|
+
BarChart4,
|
|
14241
15268
|
{
|
|
14242
15269
|
data,
|
|
14243
15270
|
margin: m,
|
|
14244
15271
|
barCategoryGap: categoryGap,
|
|
14245
15272
|
barGap,
|
|
14246
15273
|
children: [
|
|
14247
|
-
/* @__PURE__ */
|
|
14248
|
-
|
|
15274
|
+
/* @__PURE__ */ jsx53(
|
|
15275
|
+
CartesianGrid8,
|
|
14249
15276
|
{
|
|
14250
15277
|
strokeDasharray: dash,
|
|
14251
15278
|
vertical: false,
|
|
14252
15279
|
stroke: gridStroke
|
|
14253
15280
|
}
|
|
14254
15281
|
),
|
|
14255
|
-
/* @__PURE__ */
|
|
14256
|
-
|
|
15282
|
+
/* @__PURE__ */ jsx53(
|
|
15283
|
+
XAxis8,
|
|
14257
15284
|
{
|
|
14258
15285
|
dataKey: "label",
|
|
14259
15286
|
dx: xAxisTickDx,
|
|
@@ -14266,8 +15293,8 @@ function BarPlot({
|
|
|
14266
15293
|
height: 36
|
|
14267
15294
|
}
|
|
14268
15295
|
),
|
|
14269
|
-
/* @__PURE__ */
|
|
14270
|
-
|
|
15296
|
+
/* @__PURE__ */ jsx53(
|
|
15297
|
+
YAxis8,
|
|
14271
15298
|
{
|
|
14272
15299
|
domain: yAxisDomain,
|
|
14273
15300
|
ticks: yAxisTicks,
|
|
@@ -14278,8 +15305,8 @@ function BarPlot({
|
|
|
14278
15305
|
width: yWidth
|
|
14279
15306
|
}
|
|
14280
15307
|
),
|
|
14281
|
-
/* @__PURE__ */
|
|
14282
|
-
|
|
15308
|
+
/* @__PURE__ */ jsx53(
|
|
15309
|
+
Tooltip14,
|
|
14283
15310
|
{
|
|
14284
15311
|
content: (tooltipProps) => {
|
|
14285
15312
|
if (renderTooltip) {
|
|
@@ -14288,9 +15315,9 @@ function BarPlot({
|
|
|
14288
15315
|
data,
|
|
14289
15316
|
activeTabId
|
|
14290
15317
|
});
|
|
14291
|
-
return customTooltip == null ? null : /* @__PURE__ */
|
|
15318
|
+
return customTooltip == null ? null : /* @__PURE__ */ jsx53(Fragment20, { children: customTooltip });
|
|
14292
15319
|
}
|
|
14293
|
-
return /* @__PURE__ */
|
|
15320
|
+
return /* @__PURE__ */ jsx53(PeakBillingHoursTooltip, { ...tooltipProps });
|
|
14294
15321
|
},
|
|
14295
15322
|
cursor: {
|
|
14296
15323
|
fill: hoverBandFill,
|
|
@@ -14300,8 +15327,8 @@ function BarPlot({
|
|
|
14300
15327
|
allowEscapeViewBox: { x: false, y: true }
|
|
14301
15328
|
}
|
|
14302
15329
|
),
|
|
14303
|
-
/* @__PURE__ */
|
|
14304
|
-
|
|
15330
|
+
/* @__PURE__ */ jsx53(
|
|
15331
|
+
Bar6,
|
|
14305
15332
|
{
|
|
14306
15333
|
dataKey: "value",
|
|
14307
15334
|
name: "Visits",
|
|
@@ -14309,17 +15336,18 @@ function BarPlot({
|
|
|
14309
15336
|
radius: radiusTuple,
|
|
14310
15337
|
isAnimationActive: false,
|
|
14311
15338
|
maxBarSize: 48,
|
|
14312
|
-
children: /* @__PURE__ */
|
|
15339
|
+
children: /* @__PURE__ */ jsx53(
|
|
14313
15340
|
LabelList5,
|
|
14314
15341
|
{
|
|
14315
15342
|
dataKey: "value",
|
|
14316
|
-
content: (props) => /* @__PURE__ */
|
|
15343
|
+
content: (props) => /* @__PURE__ */ jsx53(
|
|
14317
15344
|
PeakBarTopLabel,
|
|
14318
15345
|
{
|
|
14319
15346
|
...props,
|
|
14320
15347
|
fill: labelFill,
|
|
14321
15348
|
fontSize: labelFs,
|
|
14322
|
-
fontWeight: 500
|
|
15349
|
+
fontWeight: 500,
|
|
15350
|
+
angle: barValueLabelAngle
|
|
14323
15351
|
}
|
|
14324
15352
|
)
|
|
14325
15353
|
}
|
|
@@ -14344,6 +15372,7 @@ function PeakBillingHours({
|
|
|
14344
15372
|
yAxisTickStyle,
|
|
14345
15373
|
xAxisTickDx = 0,
|
|
14346
15374
|
xAxisTickStyle,
|
|
15375
|
+
barValueLabelAngle = 0,
|
|
14347
15376
|
yAxisDomain = [0, 50],
|
|
14348
15377
|
yAxisTicks = [0, 10, 20, 30, 40, 50],
|
|
14349
15378
|
infoPopover,
|
|
@@ -14351,7 +15380,7 @@ function PeakBillingHours({
|
|
|
14351
15380
|
emptyStatePlaceholderProps,
|
|
14352
15381
|
customization
|
|
14353
15382
|
}) {
|
|
14354
|
-
const chartData =
|
|
15383
|
+
const chartData = React28.useMemo(() => {
|
|
14355
15384
|
if (seriesByTabId) {
|
|
14356
15385
|
return seriesByTabId[activeTabId] ?? [];
|
|
14357
15386
|
}
|
|
@@ -14386,9 +15415,9 @@ function PeakBillingHours({
|
|
|
14386
15415
|
},
|
|
14387
15416
|
customization?.header?.subtitleSx
|
|
14388
15417
|
);
|
|
14389
|
-
return /* @__PURE__ */
|
|
14390
|
-
/* @__PURE__ */
|
|
14391
|
-
|
|
15418
|
+
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: [
|
|
15419
|
+
/* @__PURE__ */ jsxs42(
|
|
15420
|
+
Stack29,
|
|
14392
15421
|
{
|
|
14393
15422
|
direction: "row",
|
|
14394
15423
|
alignItems: "flex-start",
|
|
@@ -14396,20 +15425,20 @@ function PeakBillingHours({
|
|
|
14396
15425
|
gap: 2,
|
|
14397
15426
|
flexWrap: "wrap",
|
|
14398
15427
|
children: [
|
|
14399
|
-
/* @__PURE__ */
|
|
14400
|
-
/* @__PURE__ */
|
|
14401
|
-
/* @__PURE__ */
|
|
15428
|
+
/* @__PURE__ */ jsxs42(Box34, { component: "div", sx: { minWidth: 0 }, children: [
|
|
15429
|
+
/* @__PURE__ */ jsx53(Typography30, { component: "span", sx: titleSx, children: title }),
|
|
15430
|
+
/* @__PURE__ */ jsx53(Typography30, { component: "span", sx: subtitleSx, children: subtitle })
|
|
14402
15431
|
] }),
|
|
14403
|
-
/* @__PURE__ */
|
|
14404
|
-
|
|
15432
|
+
/* @__PURE__ */ jsx53(
|
|
15433
|
+
Stack29,
|
|
14405
15434
|
{
|
|
14406
15435
|
direction: "row",
|
|
14407
15436
|
alignItems: "center",
|
|
14408
15437
|
spacing: 1.5,
|
|
14409
15438
|
sx: { flexShrink: 0 },
|
|
14410
|
-
children: resolvedInfo ? /* @__PURE__ */
|
|
14411
|
-
/* @__PURE__ */
|
|
14412
|
-
/* @__PURE__ */
|
|
15439
|
+
children: resolvedInfo ? /* @__PURE__ */ jsxs42(Fragment20, { children: [
|
|
15440
|
+
/* @__PURE__ */ jsx53(ChartWidgetHeaderSeparator, {}),
|
|
15441
|
+
/* @__PURE__ */ jsx53(
|
|
14413
15442
|
ChartWidgetInfoButton,
|
|
14414
15443
|
{
|
|
14415
15444
|
popover: resolvedInfo,
|
|
@@ -14422,7 +15451,7 @@ function PeakBillingHours({
|
|
|
14422
15451
|
]
|
|
14423
15452
|
}
|
|
14424
15453
|
),
|
|
14425
|
-
/* @__PURE__ */
|
|
15454
|
+
/* @__PURE__ */ jsx53(
|
|
14426
15455
|
ChartWidgetSegmentedTabs,
|
|
14427
15456
|
{
|
|
14428
15457
|
tabs,
|
|
@@ -14442,8 +15471,8 @@ function PeakBillingHours({
|
|
|
14442
15471
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
14443
15472
|
}
|
|
14444
15473
|
),
|
|
14445
|
-
isLoading ? /* @__PURE__ */
|
|
14446
|
-
|
|
15474
|
+
isLoading ? /* @__PURE__ */ jsx53(Skeleton8, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ jsx53(
|
|
15475
|
+
BarPlot2,
|
|
14447
15476
|
{
|
|
14448
15477
|
data: chartData,
|
|
14449
15478
|
yAxisDomain,
|
|
@@ -14454,9 +15483,10 @@ function PeakBillingHours({
|
|
|
14454
15483
|
yAxisTickDx,
|
|
14455
15484
|
yAxisTickStyle,
|
|
14456
15485
|
xAxisTickDx,
|
|
14457
|
-
xAxisTickStyle
|
|
15486
|
+
xAxisTickStyle,
|
|
15487
|
+
barValueLabelAngle
|
|
14458
15488
|
}
|
|
14459
|
-
) : /* @__PURE__ */
|
|
15489
|
+
) : /* @__PURE__ */ jsx53(
|
|
14460
15490
|
ChartEmptyState,
|
|
14461
15491
|
{
|
|
14462
15492
|
minHeight: 320,
|
|
@@ -14467,10 +15497,10 @@ function PeakBillingHours({
|
|
|
14467
15497
|
}
|
|
14468
15498
|
|
|
14469
15499
|
// src/components/widgets/CustomerJourneyAnalysis/CustomerJourneyAnalysis.tsx
|
|
14470
|
-
import
|
|
14471
|
-
import
|
|
14472
|
-
import
|
|
14473
|
-
import { jsx as
|
|
15500
|
+
import Box35 from "@mui/material/Box";
|
|
15501
|
+
import Stack30 from "@mui/material/Stack";
|
|
15502
|
+
import Typography31 from "@mui/material/Typography";
|
|
15503
|
+
import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
14474
15504
|
var DEFAULT_WALK_INS_BG = "#5B8DEF";
|
|
14475
15505
|
var DEFAULT_TRIAL_VISITS_BG = "#F59E42";
|
|
14476
15506
|
var DEFAULT_BILLING_VISITS_BG = "#6EBE7A";
|
|
@@ -14518,7 +15548,7 @@ function resolveMetricConfig(shared, perCard, props) {
|
|
|
14518
15548
|
sx: perCard?.sx ?? shared?.sx
|
|
14519
15549
|
};
|
|
14520
15550
|
}
|
|
14521
|
-
function
|
|
15551
|
+
function mergeSx5(...items) {
|
|
14522
15552
|
return items.flatMap(
|
|
14523
15553
|
(item) => Array.isArray(item) ? item : item ? [item] : []
|
|
14524
15554
|
);
|
|
@@ -14534,6 +15564,7 @@ function CustomerJourneyAnalysis({
|
|
|
14534
15564
|
avgBillingPerTrial,
|
|
14535
15565
|
// Labels
|
|
14536
15566
|
title = "Customer Journey Analysis",
|
|
15567
|
+
hideTitle = false,
|
|
14537
15568
|
titleFontSize,
|
|
14538
15569
|
titleFontWeight = 700,
|
|
14539
15570
|
titleColor = "#0f172a",
|
|
@@ -14724,17 +15755,17 @@ function CustomerJourneyAnalysis({
|
|
|
14724
15755
|
...Array.isArray(metricsSx) ? metricsSx : metricsSx ? [metricsSx] : []
|
|
14725
15756
|
];
|
|
14726
15757
|
const bodyDirection = { xs: "column", [bodyBreakpoint]: "row" };
|
|
14727
|
-
return /* @__PURE__ */
|
|
14728
|
-
/* @__PURE__ */
|
|
14729
|
-
|
|
15758
|
+
return /* @__PURE__ */ jsx54(Box35, { sx: outerSx, children: /* @__PURE__ */ jsxs43(Stack30, { spacing: 2, children: [
|
|
15759
|
+
!hideTitle && /* @__PURE__ */ jsxs43(
|
|
15760
|
+
Stack30,
|
|
14730
15761
|
{
|
|
14731
15762
|
direction: "row",
|
|
14732
15763
|
alignItems: "flex-start",
|
|
14733
15764
|
justifyContent: "space-between",
|
|
14734
15765
|
gap: 2,
|
|
14735
15766
|
children: [
|
|
14736
|
-
/* @__PURE__ */
|
|
14737
|
-
|
|
15767
|
+
/* @__PURE__ */ jsx54(
|
|
15768
|
+
Typography31,
|
|
14738
15769
|
{
|
|
14739
15770
|
component: "h2",
|
|
14740
15771
|
variant: "h6",
|
|
@@ -14747,8 +15778,8 @@ function CustomerJourneyAnalysis({
|
|
|
14747
15778
|
children: title
|
|
14748
15779
|
}
|
|
14749
15780
|
),
|
|
14750
|
-
headerActions != null ? /* @__PURE__ */
|
|
14751
|
-
|
|
15781
|
+
headerActions != null ? /* @__PURE__ */ jsx54(
|
|
15782
|
+
Box35,
|
|
14752
15783
|
{
|
|
14753
15784
|
sx: {
|
|
14754
15785
|
flexShrink: 0,
|
|
@@ -14762,9 +15793,9 @@ function CustomerJourneyAnalysis({
|
|
|
14762
15793
|
]
|
|
14763
15794
|
}
|
|
14764
15795
|
),
|
|
14765
|
-
/* @__PURE__ */
|
|
14766
|
-
/* @__PURE__ */
|
|
14767
|
-
/* @__PURE__ */
|
|
15796
|
+
/* @__PURE__ */ jsxs43(Stack30, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
|
|
15797
|
+
/* @__PURE__ */ jsx54(Box35, { sx: stripSx, children: /* @__PURE__ */ jsxs43(Box35, { sx: statCardsRowSx, children: [
|
|
15798
|
+
/* @__PURE__ */ jsx54(
|
|
14768
15799
|
JourneyStatCard,
|
|
14769
15800
|
{
|
|
14770
15801
|
icon: wiConfig.icon,
|
|
@@ -14785,7 +15816,7 @@ function CustomerJourneyAnalysis({
|
|
|
14785
15816
|
borderRadius: wiConfig.borderRadius,
|
|
14786
15817
|
minHeight: wiConfig.minHeight,
|
|
14787
15818
|
isLoading,
|
|
14788
|
-
sx:
|
|
15819
|
+
sx: mergeSx5(
|
|
14789
15820
|
{
|
|
14790
15821
|
flex: statCardFlexes[0],
|
|
14791
15822
|
borderRadius: `${statStripInnerBorderRadius} 0 0 ${statStripInnerBorderRadius}`
|
|
@@ -14794,7 +15825,7 @@ function CustomerJourneyAnalysis({
|
|
|
14794
15825
|
)
|
|
14795
15826
|
}
|
|
14796
15827
|
),
|
|
14797
|
-
/* @__PURE__ */
|
|
15828
|
+
/* @__PURE__ */ jsx54(
|
|
14798
15829
|
JourneyStatCard,
|
|
14799
15830
|
{
|
|
14800
15831
|
icon: tvConfig.icon,
|
|
@@ -14815,10 +15846,10 @@ function CustomerJourneyAnalysis({
|
|
|
14815
15846
|
borderRadius: tvConfig.borderRadius,
|
|
14816
15847
|
minHeight: tvConfig.minHeight,
|
|
14817
15848
|
isLoading,
|
|
14818
|
-
sx:
|
|
15849
|
+
sx: mergeSx5({ flex: statCardFlexes[1] }, tvConfig.sx)
|
|
14819
15850
|
}
|
|
14820
15851
|
),
|
|
14821
|
-
/* @__PURE__ */
|
|
15852
|
+
/* @__PURE__ */ jsx54(
|
|
14822
15853
|
JourneyStatCard,
|
|
14823
15854
|
{
|
|
14824
15855
|
icon: bvConfig.icon,
|
|
@@ -14839,7 +15870,7 @@ function CustomerJourneyAnalysis({
|
|
|
14839
15870
|
borderRadius: bvConfig.borderRadius,
|
|
14840
15871
|
minHeight: bvConfig.minHeight,
|
|
14841
15872
|
isLoading,
|
|
14842
|
-
sx:
|
|
15873
|
+
sx: mergeSx5(
|
|
14843
15874
|
{
|
|
14844
15875
|
flex: statCardFlexes[2],
|
|
14845
15876
|
borderRadius: `0 ${statStripInnerBorderRadius} ${statStripInnerBorderRadius} 0`
|
|
@@ -14849,8 +15880,8 @@ function CustomerJourneyAnalysis({
|
|
|
14849
15880
|
}
|
|
14850
15881
|
)
|
|
14851
15882
|
] }) }),
|
|
14852
|
-
/* @__PURE__ */
|
|
14853
|
-
|
|
15883
|
+
/* @__PURE__ */ jsx54(Box35, { sx: metricsBoxSx, children: /* @__PURE__ */ jsx54(
|
|
15884
|
+
Box35,
|
|
14854
15885
|
{
|
|
14855
15886
|
sx: {
|
|
14856
15887
|
display: "grid",
|
|
@@ -14883,8 +15914,8 @@ function CustomerJourneyAnalysis({
|
|
|
14883
15914
|
label: avgBillingPerTrialLabel,
|
|
14884
15915
|
value: formatAverage(avgBillingPerTrial)
|
|
14885
15916
|
}
|
|
14886
|
-
].map(({ cfg, label, value }) => /* @__PURE__ */
|
|
14887
|
-
|
|
15917
|
+
].map(({ cfg, label, value }) => /* @__PURE__ */ jsx54(
|
|
15918
|
+
Box35,
|
|
14888
15919
|
{
|
|
14889
15920
|
sx: {
|
|
14890
15921
|
bgcolor: metricsCardBg,
|
|
@@ -14893,7 +15924,7 @@ function CustomerJourneyAnalysis({
|
|
|
14893
15924
|
height: "100%",
|
|
14894
15925
|
minWidth: 0
|
|
14895
15926
|
},
|
|
14896
|
-
children: /* @__PURE__ */
|
|
15927
|
+
children: /* @__PURE__ */ jsx54(
|
|
14897
15928
|
JourneyMetricCard,
|
|
14898
15929
|
{
|
|
14899
15930
|
label,
|
|
@@ -14928,7 +15959,7 @@ import {
|
|
|
14928
15959
|
createTheme,
|
|
14929
15960
|
responsiveFontSizes
|
|
14930
15961
|
} from "@mui/material/styles";
|
|
14931
|
-
import { jsx as
|
|
15962
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
14932
15963
|
var lightColor = "51, 48, 60";
|
|
14933
15964
|
var darkColor = "228, 230, 244";
|
|
14934
15965
|
var darkPaperBg = "#2F3349";
|
|
@@ -15008,8 +16039,8 @@ var FalconThemeProvider = ({
|
|
|
15008
16039
|
mixins: { toolbar: { minHeight: 64 } }
|
|
15009
16040
|
})
|
|
15010
16041
|
);
|
|
15011
|
-
return /* @__PURE__ */
|
|
15012
|
-
/* @__PURE__ */
|
|
16042
|
+
return /* @__PURE__ */ jsxs44(ThemeProvider, { theme, children: [
|
|
16043
|
+
/* @__PURE__ */ jsx55(CssBaseline, {}),
|
|
15013
16044
|
children
|
|
15014
16045
|
] });
|
|
15015
16046
|
};
|
|
@@ -15032,6 +16063,7 @@ export {
|
|
|
15032
16063
|
DEFAULT_FOOTFALL_TILE_ICONS,
|
|
15033
16064
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
15034
16065
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
16066
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
15035
16067
|
FalconAuditTimeline,
|
|
15036
16068
|
FalconButton,
|
|
15037
16069
|
FalconDIstrictFilter,
|
|
@@ -15070,6 +16102,17 @@ export {
|
|
|
15070
16102
|
QueueTimeBreakdownStackedBar,
|
|
15071
16103
|
TimePeriodFilter as QueueTimePeriodFilter,
|
|
15072
16104
|
RankedBarList,
|
|
16105
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
16106
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
16107
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
16108
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
16109
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
16110
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
16111
|
+
STORE_PERFORMANCE_DEFAULT_DATA,
|
|
16112
|
+
StackedComparisonBarChart,
|
|
16113
|
+
StackedComparisonBarChartCustomizationProvider,
|
|
16114
|
+
StackedComparisonBarChartTooltip,
|
|
16115
|
+
StorePerformanceByAssist,
|
|
15073
16116
|
TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
15074
16117
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
15075
16118
|
TimePeriodFilter,
|
|
@@ -15101,9 +16144,12 @@ export {
|
|
|
15101
16144
|
peakBillingHoursVisitsMock,
|
|
15102
16145
|
preprocessData,
|
|
15103
16146
|
skipSingleBranchLevels,
|
|
16147
|
+
mergeCss7 as stackedComparisonMergeCss,
|
|
16148
|
+
mergeSx4 as stackedComparisonMergeSx,
|
|
15104
16149
|
toRechartsTreemapData,
|
|
15105
16150
|
useBillingCounterAnalyticsCustomization,
|
|
15106
16151
|
usePeakBillingHoursCustomization,
|
|
15107
|
-
useQueueTimeBreakdownCustomization
|
|
16152
|
+
useQueueTimeBreakdownCustomization,
|
|
16153
|
+
useStackedComparisonBarChartCustomization
|
|
15108
16154
|
};
|
|
15109
16155
|
//# sourceMappingURL=index.mjs.map
|