@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.js
CHANGED
|
@@ -49,6 +49,7 @@ __export(index_exports, {
|
|
|
49
49
|
DEFAULT_FOOTFALL_TILE_ICONS: () => DEFAULT_FOOTFALL_TILE_ICONS,
|
|
50
50
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER: () => DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
51
51
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER: () => DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
52
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER: () => DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
52
53
|
FalconAuditTimeline: () => FalconAuditTimeline,
|
|
53
54
|
FalconButton: () => FalconButton,
|
|
54
55
|
FalconDIstrictFilter: () => FalconDIstrictFilter,
|
|
@@ -87,6 +88,17 @@ __export(index_exports, {
|
|
|
87
88
|
QueueTimeBreakdownStackedBar: () => QueueTimeBreakdownStackedBar,
|
|
88
89
|
QueueTimePeriodFilter: () => TimePeriodFilter,
|
|
89
90
|
RankedBarList: () => RankedBarList,
|
|
91
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR: () => STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
92
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER: () => STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
93
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR: () => STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
94
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR: () => STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
95
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS: () => STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
96
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS: () => STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
97
|
+
STORE_PERFORMANCE_DEFAULT_DATA: () => STORE_PERFORMANCE_DEFAULT_DATA,
|
|
98
|
+
StackedComparisonBarChart: () => StackedComparisonBarChart,
|
|
99
|
+
StackedComparisonBarChartCustomizationProvider: () => StackedComparisonBarChartCustomizationProvider,
|
|
100
|
+
StackedComparisonBarChartTooltip: () => StackedComparisonBarChartTooltip,
|
|
101
|
+
StorePerformanceByAssist: () => StorePerformanceByAssist,
|
|
90
102
|
TIME_PERIOD_FILTER_INFO_POPOVER: () => TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
91
103
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN: () => TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
92
104
|
TimePeriodFilter: () => TimePeriodFilter,
|
|
@@ -118,10 +130,13 @@ __export(index_exports, {
|
|
|
118
130
|
peakBillingHoursVisitsMock: () => peakBillingHoursVisitsMock,
|
|
119
131
|
preprocessData: () => preprocessData,
|
|
120
132
|
skipSingleBranchLevels: () => skipSingleBranchLevels,
|
|
133
|
+
stackedComparisonMergeCss: () => mergeCss7,
|
|
134
|
+
stackedComparisonMergeSx: () => mergeSx4,
|
|
121
135
|
toRechartsTreemapData: () => toRechartsTreemapData,
|
|
122
136
|
useBillingCounterAnalyticsCustomization: () => useBillingCounterAnalyticsCustomization,
|
|
123
137
|
usePeakBillingHoursCustomization: () => usePeakBillingHoursCustomization,
|
|
124
|
-
useQueueTimeBreakdownCustomization: () => useQueueTimeBreakdownCustomization
|
|
138
|
+
useQueueTimeBreakdownCustomization: () => useQueueTimeBreakdownCustomization,
|
|
139
|
+
useStackedComparisonBarChartCustomization: () => useStackedComparisonBarChartCustomization
|
|
125
140
|
});
|
|
126
141
|
module.exports = __toCommonJS(index_exports);
|
|
127
142
|
|
|
@@ -4015,7 +4030,7 @@ var FalconAuditTimeline = ({
|
|
|
4015
4030
|
date: run.date,
|
|
4016
4031
|
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
4017
4032
|
status: run.status === "done" ? "completed" : "upcoming",
|
|
4018
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
4033
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date, run) : void 0,
|
|
4019
4034
|
brandFont,
|
|
4020
4035
|
interFont,
|
|
4021
4036
|
completedColor,
|
|
@@ -4053,7 +4068,16 @@ var FalconAuditTimeline = ({
|
|
|
4053
4068
|
date: `${activeMonth.label} 5`,
|
|
4054
4069
|
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
4055
4070
|
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
4056
|
-
onExportClick: onExportReportClick ? (e) =>
|
|
4071
|
+
onExportClick: onExportReportClick ? (e) => {
|
|
4072
|
+
const date = `${activeMonth.label} 5`;
|
|
4073
|
+
onExportReportClick(e, date, {
|
|
4074
|
+
run_number: precedingEvents + 1,
|
|
4075
|
+
date,
|
|
4076
|
+
month: activeMonth.label,
|
|
4077
|
+
year: activeMonth.year,
|
|
4078
|
+
status: isFirstActiveMonth ? "done" : "scheduled"
|
|
4079
|
+
});
|
|
4080
|
+
} : void 0,
|
|
4057
4081
|
brandFont,
|
|
4058
4082
|
interFont,
|
|
4059
4083
|
completedColor,
|
|
@@ -6961,7 +6985,8 @@ function StackTotalLabel({
|
|
|
6961
6985
|
width,
|
|
6962
6986
|
height,
|
|
6963
6987
|
index,
|
|
6964
|
-
stackTotalFill
|
|
6988
|
+
stackTotalFill,
|
|
6989
|
+
angle = 0
|
|
6965
6990
|
}) {
|
|
6966
6991
|
const nx = toNum(x);
|
|
6967
6992
|
const ny = toNum(y);
|
|
@@ -6975,6 +7000,7 @@ function StackTotalLabel({
|
|
|
6975
7000
|
const total = rowTotal(row, series);
|
|
6976
7001
|
const cx = nx + nw / 2;
|
|
6977
7002
|
const cy = ny - 10;
|
|
7003
|
+
const isHorizontal = angle === 0;
|
|
6978
7004
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6979
7005
|
"text",
|
|
6980
7006
|
{
|
|
@@ -6983,7 +7009,8 @@ function StackTotalLabel({
|
|
|
6983
7009
|
fill: stackTotalFill,
|
|
6984
7010
|
fontSize: 12,
|
|
6985
7011
|
fontWeight: 500,
|
|
6986
|
-
textAnchor: "middle",
|
|
7012
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
7013
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
6987
7014
|
children: formatBarLabel(total)
|
|
6988
7015
|
}
|
|
6989
7016
|
);
|
|
@@ -7034,7 +7061,8 @@ function FootfallByAgeGroups({
|
|
|
7034
7061
|
barStackId = "footfall-by-age-groups",
|
|
7035
7062
|
xAxisTickAngle = 0,
|
|
7036
7063
|
xAxisTickDx = 0,
|
|
7037
|
-
xAxisTickStyle
|
|
7064
|
+
xAxisTickStyle,
|
|
7065
|
+
barValueLabelAngle = 0
|
|
7038
7066
|
}) {
|
|
7039
7067
|
const [activeIndex, setActiveIndex] = React11.useState(null);
|
|
7040
7068
|
const handleMouseEnter = React11.useCallback((_, index) => {
|
|
@@ -7377,7 +7405,8 @@ function FootfallByAgeGroups({
|
|
|
7377
7405
|
...labelProps,
|
|
7378
7406
|
series,
|
|
7379
7407
|
rows: processedData,
|
|
7380
|
-
stackTotalFill: chartColors.stackTotalLabelFill
|
|
7408
|
+
stackTotalFill: chartColors.stackTotalLabelFill,
|
|
7409
|
+
angle: barValueLabelAngle
|
|
7381
7410
|
}
|
|
7382
7411
|
)
|
|
7383
7412
|
}
|
|
@@ -8575,7 +8604,8 @@ function BarTopLabel({
|
|
|
8575
8604
|
y,
|
|
8576
8605
|
width,
|
|
8577
8606
|
value,
|
|
8578
|
-
fill
|
|
8607
|
+
fill,
|
|
8608
|
+
angle = 0
|
|
8579
8609
|
}) {
|
|
8580
8610
|
const nx = toNum3(x);
|
|
8581
8611
|
const ny = toNum3(y);
|
|
@@ -8589,6 +8619,7 @@ function BarTopLabel({
|
|
|
8589
8619
|
}
|
|
8590
8620
|
const cx = nx + nw / 2;
|
|
8591
8621
|
const cy = ny - 10;
|
|
8622
|
+
const isHorizontal = angle === 0;
|
|
8592
8623
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
8593
8624
|
"text",
|
|
8594
8625
|
{
|
|
@@ -8597,7 +8628,8 @@ function BarTopLabel({
|
|
|
8597
8628
|
fill,
|
|
8598
8629
|
fontSize: 12,
|
|
8599
8630
|
fontWeight: 500,
|
|
8600
|
-
textAnchor: "middle",
|
|
8631
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
8632
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
8601
8633
|
children: formatBarLabel3(n)
|
|
8602
8634
|
}
|
|
8603
8635
|
);
|
|
@@ -8861,6 +8893,7 @@ function PasserbyConversion({
|
|
|
8861
8893
|
showLegend = true,
|
|
8862
8894
|
showConversionLine: showConversionLineProp,
|
|
8863
8895
|
showBarValueLabels = true,
|
|
8896
|
+
barValueLabelAngle = 0,
|
|
8864
8897
|
chartMargin: chartMarginProp,
|
|
8865
8898
|
yAxisTickDx = -8,
|
|
8866
8899
|
yAxisTickStyle,
|
|
@@ -9337,7 +9370,8 @@ function PasserbyConversion({
|
|
|
9337
9370
|
BarTopLabel,
|
|
9338
9371
|
{
|
|
9339
9372
|
...props,
|
|
9340
|
-
fill: chartColors.barValueLabelFill
|
|
9373
|
+
fill: chartColors.barValueLabelFill,
|
|
9374
|
+
angle: barValueLabelAngle
|
|
9341
9375
|
}
|
|
9342
9376
|
)
|
|
9343
9377
|
}
|
|
@@ -9373,7 +9407,8 @@ function PasserbyConversion({
|
|
|
9373
9407
|
BarTopLabel,
|
|
9374
9408
|
{
|
|
9375
9409
|
...props,
|
|
9376
|
-
fill: chartColors.barValueLabelFill
|
|
9410
|
+
fill: chartColors.barValueLabelFill,
|
|
9411
|
+
angle: barValueLabelAngle
|
|
9377
9412
|
}
|
|
9378
9413
|
)
|
|
9379
9414
|
}
|
|
@@ -10032,7 +10067,8 @@ function BarTopLabel2({
|
|
|
10032
10067
|
y,
|
|
10033
10068
|
width,
|
|
10034
10069
|
value,
|
|
10035
|
-
fill
|
|
10070
|
+
fill,
|
|
10071
|
+
angle = 0
|
|
10036
10072
|
}) {
|
|
10037
10073
|
const nx = toNum4(x);
|
|
10038
10074
|
const ny = toNum4(y);
|
|
@@ -10046,6 +10082,7 @@ function BarTopLabel2({
|
|
|
10046
10082
|
}
|
|
10047
10083
|
const cx = nx + nw / 2;
|
|
10048
10084
|
const cy = ny - 10;
|
|
10085
|
+
const isHorizontal = angle === 0;
|
|
10049
10086
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10050
10087
|
"text",
|
|
10051
10088
|
{
|
|
@@ -10054,7 +10091,8 @@ function BarTopLabel2({
|
|
|
10054
10091
|
fill,
|
|
10055
10092
|
fontSize: 12,
|
|
10056
10093
|
fontWeight: 500,
|
|
10057
|
-
textAnchor: "middle",
|
|
10094
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
10095
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
10058
10096
|
children: formatBarLabel4(n)
|
|
10059
10097
|
}
|
|
10060
10098
|
);
|
|
@@ -10320,6 +10358,7 @@ function WalkinTraffic({
|
|
|
10320
10358
|
showTrendLine: showTrendLineProp,
|
|
10321
10359
|
showLineInLegend = false,
|
|
10322
10360
|
showBarValueLabels = true,
|
|
10361
|
+
barValueLabelAngle = 0,
|
|
10323
10362
|
chartMargin: chartMarginProp,
|
|
10324
10363
|
yAxisTickDx = -8,
|
|
10325
10364
|
yAxisTickStyle,
|
|
@@ -10712,7 +10751,8 @@ function WalkinTraffic({
|
|
|
10712
10751
|
BarTopLabel2,
|
|
10713
10752
|
{
|
|
10714
10753
|
...props,
|
|
10715
|
-
fill: chartColors.barValueLabelFill
|
|
10754
|
+
fill: chartColors.barValueLabelFill,
|
|
10755
|
+
angle: barValueLabelAngle
|
|
10716
10756
|
}
|
|
10717
10757
|
)
|
|
10718
10758
|
}
|
|
@@ -12350,12 +12390,956 @@ function QueueTimeBreakdown({
|
|
|
12350
12390
|
] }) }) }) });
|
|
12351
12391
|
}
|
|
12352
12392
|
|
|
12393
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
|
|
12394
|
+
var STACKED_COMPARISON_DEFAULT_STACK_COLORS = [
|
|
12395
|
+
"#CFE0FB",
|
|
12396
|
+
"#7FB1F0",
|
|
12397
|
+
"#3D7CDF",
|
|
12398
|
+
"#1E2A5E"
|
|
12399
|
+
];
|
|
12400
|
+
var STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR = "#F47C7C";
|
|
12401
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR = "#2563EB";
|
|
12402
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR = "#EF4444";
|
|
12403
|
+
var STACKED_COMPARISON_DEFAULT_FRAME_BORDER = "#EAECEF";
|
|
12404
|
+
|
|
12405
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12406
|
+
var import_Box20 = __toESM(require("@mui/material/Box"));
|
|
12407
|
+
var import_ButtonBase2 = __toESM(require("@mui/material/ButtonBase"));
|
|
12408
|
+
var import_Stack18 = __toESM(require("@mui/material/Stack"));
|
|
12409
|
+
var import_Typography17 = __toESM(require("@mui/material/Typography"));
|
|
12410
|
+
var React25 = __toESM(require("react"));
|
|
12411
|
+
var import_recharts9 = require("recharts");
|
|
12412
|
+
|
|
12413
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChartCustomization.merge.ts
|
|
12414
|
+
function mergeCss7(a, b) {
|
|
12415
|
+
if (!b) {
|
|
12416
|
+
return { ...a };
|
|
12417
|
+
}
|
|
12418
|
+
return { ...a, ...b };
|
|
12419
|
+
}
|
|
12420
|
+
function mergeSx4(...parts) {
|
|
12421
|
+
const flat = parts.filter(Boolean);
|
|
12422
|
+
if (flat.length === 0) {
|
|
12423
|
+
return void 0;
|
|
12424
|
+
}
|
|
12425
|
+
if (flat.length === 1) {
|
|
12426
|
+
return flat[0];
|
|
12427
|
+
}
|
|
12428
|
+
return flat.flat();
|
|
12429
|
+
}
|
|
12430
|
+
|
|
12431
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartCustomizationContext.tsx
|
|
12432
|
+
var React24 = __toESM(require("react"));
|
|
12433
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12434
|
+
var StackedComparisonBarChartCustomizationContext = React24.createContext({});
|
|
12435
|
+
function StackedComparisonBarChartCustomizationProvider({
|
|
12436
|
+
value,
|
|
12437
|
+
children
|
|
12438
|
+
}) {
|
|
12439
|
+
const memo = React24.useMemo(() => value, [value]);
|
|
12440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StackedComparisonBarChartCustomizationContext.Provider, { value: memo, children });
|
|
12441
|
+
}
|
|
12442
|
+
function useStackedComparisonBarChartCustomization() {
|
|
12443
|
+
return React24.useContext(StackedComparisonBarChartCustomizationContext);
|
|
12444
|
+
}
|
|
12445
|
+
|
|
12446
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartTooltip.tsx
|
|
12447
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12448
|
+
function fmt(n) {
|
|
12449
|
+
return new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(n);
|
|
12450
|
+
}
|
|
12451
|
+
function StackedComparisonBarChartTooltip({
|
|
12452
|
+
active,
|
|
12453
|
+
row,
|
|
12454
|
+
buckets,
|
|
12455
|
+
bucketColors,
|
|
12456
|
+
comparisonColor,
|
|
12457
|
+
stackedTotalLabel,
|
|
12458
|
+
comparisonLabel
|
|
12459
|
+
}) {
|
|
12460
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12461
|
+
const tt = bc?.tooltip;
|
|
12462
|
+
if (!active || !row) {
|
|
12463
|
+
return null;
|
|
12464
|
+
}
|
|
12465
|
+
const borderColor = tt?.borderColor ?? "#E5E7EB";
|
|
12466
|
+
const radius = tt?.borderRadiusPx ?? 10;
|
|
12467
|
+
const shadow = tt?.boxShadow ?? "0 8px 24px rgba(15, 23, 42, 0.12)";
|
|
12468
|
+
const bg = tt?.backgroundColor ?? "#FFFFFF";
|
|
12469
|
+
const pad = tt?.paddingPx ?? 14;
|
|
12470
|
+
const bucketNameColor = tt?.bucketNameColor ?? "#0F172A";
|
|
12471
|
+
const bucketValueColor = tt?.bucketValueColor ?? "#0F172A";
|
|
12472
|
+
const totalStackedLabelColor = tt?.totalStackedLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12473
|
+
const totalStackedValueColor = tt?.totalStackedValueColor ?? "#1D4ED8";
|
|
12474
|
+
const comparisonLabelColor = tt?.comparisonLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12475
|
+
const comparisonValueColor = tt?.comparisonValueColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12476
|
+
const dividerColor = tt?.dividerColor ?? "#E5E7EB";
|
|
12477
|
+
const titleColor = tt?.titleColor ?? "#0F172A";
|
|
12478
|
+
const fs = tt?.fontSizePx ?? 13;
|
|
12479
|
+
const titleFs = tt?.titleFontSizePx ?? 15;
|
|
12480
|
+
const titleText = row.subName ? `${row.name} ${row.subName}` : row.name;
|
|
12481
|
+
const orderedBuckets = [...buckets].reverse();
|
|
12482
|
+
const bodyStyle = mergeCss7(
|
|
12483
|
+
{
|
|
12484
|
+
boxSizing: "border-box",
|
|
12485
|
+
backgroundColor: bg,
|
|
12486
|
+
padding: pad,
|
|
12487
|
+
borderRadius: radius,
|
|
12488
|
+
border: `1px solid ${borderColor}`,
|
|
12489
|
+
boxShadow: shadow,
|
|
12490
|
+
minWidth: tt?.minWidthPx ?? 220,
|
|
12491
|
+
...tt?.maxWidthPx != null ? { maxWidth: tt.maxWidthPx } : null
|
|
12492
|
+
},
|
|
12493
|
+
tt?.bodyStyle
|
|
12494
|
+
);
|
|
12495
|
+
const rowStyle = {
|
|
12496
|
+
display: "flex",
|
|
12497
|
+
alignItems: "center",
|
|
12498
|
+
justifyContent: "space-between",
|
|
12499
|
+
fontSize: fs,
|
|
12500
|
+
lineHeight: 1.4,
|
|
12501
|
+
margin: "4px 0",
|
|
12502
|
+
fontFamily: "inherit"
|
|
12503
|
+
};
|
|
12504
|
+
const swatch = (color) => ({
|
|
12505
|
+
width: 10,
|
|
12506
|
+
height: 10,
|
|
12507
|
+
borderRadius: "50%",
|
|
12508
|
+
backgroundColor: color,
|
|
12509
|
+
flexShrink: 0,
|
|
12510
|
+
display: "inline-block",
|
|
12511
|
+
marginRight: 8
|
|
12512
|
+
});
|
|
12513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: bodyStyle, children: [
|
|
12514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12515
|
+
"div",
|
|
12516
|
+
{
|
|
12517
|
+
style: {
|
|
12518
|
+
fontSize: titleFs,
|
|
12519
|
+
fontWeight: 700,
|
|
12520
|
+
color: titleColor,
|
|
12521
|
+
marginBottom: 8
|
|
12522
|
+
},
|
|
12523
|
+
children: titleText
|
|
12524
|
+
}
|
|
12525
|
+
),
|
|
12526
|
+
orderedBuckets.map((b, i) => {
|
|
12527
|
+
const originalIndex = buckets.length - 1 - i;
|
|
12528
|
+
const color = b.color ?? bucketColors[originalIndex] ?? "#94A3B8";
|
|
12529
|
+
const v = row.stacked[b.id] ?? 0;
|
|
12530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: rowStyle, children: [
|
|
12531
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12532
|
+
"span",
|
|
12533
|
+
{
|
|
12534
|
+
style: {
|
|
12535
|
+
display: "flex",
|
|
12536
|
+
alignItems: "center",
|
|
12537
|
+
color: bucketNameColor,
|
|
12538
|
+
fontWeight: 500
|
|
12539
|
+
},
|
|
12540
|
+
children: [
|
|
12541
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(color), "aria-hidden": true }),
|
|
12542
|
+
b.label
|
|
12543
|
+
]
|
|
12544
|
+
}
|
|
12545
|
+
),
|
|
12546
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: bucketValueColor, fontWeight: 700 }, children: fmt(v) })
|
|
12547
|
+
] }, b.id);
|
|
12548
|
+
}),
|
|
12549
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12550
|
+
"div",
|
|
12551
|
+
{
|
|
12552
|
+
style: {
|
|
12553
|
+
height: 1,
|
|
12554
|
+
background: dividerColor,
|
|
12555
|
+
margin: "10px 0 8px"
|
|
12556
|
+
}
|
|
12557
|
+
}
|
|
12558
|
+
),
|
|
12559
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "2px 0" }, children: [
|
|
12560
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: totalStackedLabelColor, fontWeight: 700 }, children: stackedTotalLabel }),
|
|
12561
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: totalStackedValueColor, fontWeight: 700 }, children: fmt(buckets.reduce((acc, b) => acc + (row.stacked[b.id] ?? 0), 0)) })
|
|
12562
|
+
] }),
|
|
12563
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "6px 0 0" }, children: [
|
|
12564
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12565
|
+
"span",
|
|
12566
|
+
{
|
|
12567
|
+
style: {
|
|
12568
|
+
display: "flex",
|
|
12569
|
+
alignItems: "center",
|
|
12570
|
+
color: comparisonLabelColor,
|
|
12571
|
+
fontWeight: 600
|
|
12572
|
+
},
|
|
12573
|
+
children: [
|
|
12574
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(comparisonColor), "aria-hidden": true }),
|
|
12575
|
+
comparisonLabel
|
|
12576
|
+
]
|
|
12577
|
+
}
|
|
12578
|
+
),
|
|
12579
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: comparisonValueColor, fontWeight: 700 }, children: fmt(row.comparison) })
|
|
12580
|
+
] })
|
|
12581
|
+
] }) });
|
|
12582
|
+
}
|
|
12583
|
+
|
|
12584
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12585
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12586
|
+
var DEFAULT_AXIS_TICK_FILL = "#9CA3AF";
|
|
12587
|
+
var DEFAULT_GRID_STROKE = "#EEF0F3";
|
|
12588
|
+
var STACK_KEY = (id) => `stack__${id}`;
|
|
12589
|
+
var COMPARISON_KEY = "__comparison";
|
|
12590
|
+
function SortIcon({ color }) {
|
|
12591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12592
|
+
"svg",
|
|
12593
|
+
{
|
|
12594
|
+
width: "14",
|
|
12595
|
+
height: "14",
|
|
12596
|
+
viewBox: "0 0 14 14",
|
|
12597
|
+
fill: "none",
|
|
12598
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12599
|
+
"aria-hidden": true,
|
|
12600
|
+
children: [
|
|
12601
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12602
|
+
"path",
|
|
12603
|
+
{
|
|
12604
|
+
d: "M4 2.5V11.5M4 11.5L1.5 9M4 11.5L6.5 9",
|
|
12605
|
+
stroke: color,
|
|
12606
|
+
strokeWidth: "1.4",
|
|
12607
|
+
strokeLinecap: "round",
|
|
12608
|
+
strokeLinejoin: "round"
|
|
12609
|
+
}
|
|
12610
|
+
),
|
|
12611
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12612
|
+
"path",
|
|
12613
|
+
{
|
|
12614
|
+
d: "M10 11.5V2.5M10 2.5L7.5 5M10 2.5L12.5 5",
|
|
12615
|
+
stroke: color,
|
|
12616
|
+
strokeWidth: "1.4",
|
|
12617
|
+
strokeLinecap: "round",
|
|
12618
|
+
strokeLinejoin: "round"
|
|
12619
|
+
}
|
|
12620
|
+
)
|
|
12621
|
+
]
|
|
12622
|
+
}
|
|
12623
|
+
);
|
|
12624
|
+
}
|
|
12625
|
+
function LegendDot({
|
|
12626
|
+
color,
|
|
12627
|
+
sizePx = 10
|
|
12628
|
+
}) {
|
|
12629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12630
|
+
import_Box20.default,
|
|
12631
|
+
{
|
|
12632
|
+
sx: {
|
|
12633
|
+
width: sizePx,
|
|
12634
|
+
height: sizePx,
|
|
12635
|
+
borderRadius: "50%",
|
|
12636
|
+
bgcolor: color,
|
|
12637
|
+
flexShrink: 0
|
|
12638
|
+
}
|
|
12639
|
+
}
|
|
12640
|
+
);
|
|
12641
|
+
}
|
|
12642
|
+
function MultilineTick(props) {
|
|
12643
|
+
const {
|
|
12644
|
+
x = 0,
|
|
12645
|
+
y = 0,
|
|
12646
|
+
payload,
|
|
12647
|
+
fill = DEFAULT_AXIS_TICK_FILL,
|
|
12648
|
+
fontSize = 12,
|
|
12649
|
+
rowsByName,
|
|
12650
|
+
angle = 0,
|
|
12651
|
+
textAnchor = "middle"
|
|
12652
|
+
} = props;
|
|
12653
|
+
const name = payload?.value ?? "";
|
|
12654
|
+
if (!name) return null;
|
|
12655
|
+
const row = rowsByName ? rowsByName[name] : void 0;
|
|
12656
|
+
const subName = row?.subName;
|
|
12657
|
+
const lines = [];
|
|
12658
|
+
String(name).split("\n").forEach((s) => lines.push(s));
|
|
12659
|
+
if (subName) {
|
|
12660
|
+
String(subName).split("\n").forEach((s) => lines.push(s));
|
|
12661
|
+
}
|
|
12662
|
+
const lineHeight = fontSize * 1.25;
|
|
12663
|
+
const isHorizontal = angle === 0;
|
|
12664
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
12665
|
+
const dy0 = isHorizontal ? lineHeight : 4;
|
|
12666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12667
|
+
"text",
|
|
12668
|
+
{
|
|
12669
|
+
transform: angle !== 0 ? `rotate(${angle})` : void 0,
|
|
12670
|
+
textAnchor: anchor,
|
|
12671
|
+
fontSize,
|
|
12672
|
+
fill,
|
|
12673
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
12674
|
+
}
|
|
12675
|
+
) });
|
|
12676
|
+
}
|
|
12677
|
+
function BarPlot({
|
|
12678
|
+
data,
|
|
12679
|
+
buckets,
|
|
12680
|
+
bucketColors,
|
|
12681
|
+
comparisonColor,
|
|
12682
|
+
rowsByName,
|
|
12683
|
+
yAxisDomain,
|
|
12684
|
+
yAxisTicks,
|
|
12685
|
+
yAxisTickFormatter,
|
|
12686
|
+
stackedTotalLabel,
|
|
12687
|
+
comparisonLabel,
|
|
12688
|
+
renderTooltip,
|
|
12689
|
+
enableHorizontalScroll,
|
|
12690
|
+
chartMinWidth,
|
|
12691
|
+
categoryWidthPx
|
|
12692
|
+
}) {
|
|
12693
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12694
|
+
const height = bc?.heightPx ?? 360;
|
|
12695
|
+
const stackedSize = bc?.stackedBarSizePx ?? 22;
|
|
12696
|
+
const comparisonSize = bc?.comparisonBarSizePx ?? 18;
|
|
12697
|
+
const barCategoryGap = bc?.barCategoryGapPx ?? 20;
|
|
12698
|
+
const barGap = bc?.barGap ?? 2;
|
|
12699
|
+
const barTopRadius = bc?.barTopRadiusPx ?? 3;
|
|
12700
|
+
const m = {
|
|
12701
|
+
top: bc?.margin?.top ?? 16,
|
|
12702
|
+
right: bc?.margin?.right ?? 8,
|
|
12703
|
+
bottom: bc?.margin?.bottom ?? 28,
|
|
12704
|
+
left: bc?.margin?.left ?? 4
|
|
12705
|
+
};
|
|
12706
|
+
const gridStroke = bc?.gridStroke ?? DEFAULT_GRID_STROKE;
|
|
12707
|
+
const dash = bc?.gridStrokeDasharray ?? "0";
|
|
12708
|
+
const xFill = bc?.xAxisTickFill ?? "#6B7280";
|
|
12709
|
+
const xTickAngle = bc?.xAxisTickAngle ?? 0;
|
|
12710
|
+
const xTickAnchor = bc?.xAxisTickAnchor ?? "end";
|
|
12711
|
+
const xAxisHeight = bc?.xAxisHeight ?? 50;
|
|
12712
|
+
const yFill = bc?.yAxisTickFill ?? DEFAULT_AXIS_TICK_FILL;
|
|
12713
|
+
const yWidth = bc?.yAxisWidth ?? 44;
|
|
12714
|
+
const cursorFill = bc?.cursorFill ?? "rgba(15, 23, 42, 0.04)";
|
|
12715
|
+
const defaultFmt = React25.useCallback(
|
|
12716
|
+
(v) => v >= 1e3 ? `${(v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1)}k` : `${v}`,
|
|
12717
|
+
[]
|
|
12718
|
+
);
|
|
12719
|
+
const tickFmt = yAxisTickFormatter ?? defaultFmt;
|
|
12720
|
+
const resolvedCategoryWidth = categoryWidthPx ?? 90;
|
|
12721
|
+
const innerMinWidth = chartMinWidth ?? resolvedCategoryWidth * Math.max(data.length, 1);
|
|
12722
|
+
const outerSx = enableHorizontalScroll ? {
|
|
12723
|
+
width: "100%",
|
|
12724
|
+
height,
|
|
12725
|
+
mt: 0.5,
|
|
12726
|
+
overflowX: "auto",
|
|
12727
|
+
overflowY: "hidden"
|
|
12728
|
+
} : { width: "100%", height, mt: 0.5 };
|
|
12729
|
+
const innerSx = enableHorizontalScroll ? { width: "100%", height: "100%", minWidth: innerMinWidth } : { width: "100%", height: "100%" };
|
|
12730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: outerSx, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: innerSx, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_recharts9.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12731
|
+
import_recharts9.BarChart,
|
|
12732
|
+
{
|
|
12733
|
+
data,
|
|
12734
|
+
margin: m,
|
|
12735
|
+
barCategoryGap,
|
|
12736
|
+
barGap,
|
|
12737
|
+
children: [
|
|
12738
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12739
|
+
import_recharts9.CartesianGrid,
|
|
12740
|
+
{
|
|
12741
|
+
strokeDasharray: dash,
|
|
12742
|
+
vertical: false,
|
|
12743
|
+
stroke: gridStroke
|
|
12744
|
+
}
|
|
12745
|
+
),
|
|
12746
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12747
|
+
import_recharts9.XAxis,
|
|
12748
|
+
{
|
|
12749
|
+
dataKey: "__name",
|
|
12750
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12751
|
+
MultilineTick,
|
|
12752
|
+
{
|
|
12753
|
+
fill: xFill,
|
|
12754
|
+
fontSize: 12,
|
|
12755
|
+
rowsByName,
|
|
12756
|
+
angle: xTickAngle,
|
|
12757
|
+
textAnchor: xTickAnchor
|
|
12758
|
+
}
|
|
12759
|
+
),
|
|
12760
|
+
tickLine: false,
|
|
12761
|
+
axisLine: { stroke: gridStroke },
|
|
12762
|
+
interval: 0,
|
|
12763
|
+
height: xAxisHeight
|
|
12764
|
+
}
|
|
12765
|
+
),
|
|
12766
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12767
|
+
import_recharts9.YAxis,
|
|
12768
|
+
{
|
|
12769
|
+
domain: yAxisDomain,
|
|
12770
|
+
ticks: yAxisTicks,
|
|
12771
|
+
tick: { fill: yFill, fontSize: 11 },
|
|
12772
|
+
tickLine: false,
|
|
12773
|
+
axisLine: false,
|
|
12774
|
+
width: yWidth,
|
|
12775
|
+
tickFormatter: tickFmt
|
|
12776
|
+
}
|
|
12777
|
+
),
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12779
|
+
import_recharts9.Tooltip,
|
|
12780
|
+
{
|
|
12781
|
+
content: (tooltipProps) => {
|
|
12782
|
+
const label = tooltipProps.label;
|
|
12783
|
+
const labelStr = typeof label === "string" ? label : String(label ?? "");
|
|
12784
|
+
const row = rowsByName[labelStr] ?? null;
|
|
12785
|
+
if (renderTooltip) {
|
|
12786
|
+
const custom = renderTooltip({
|
|
12787
|
+
tooltipProps,
|
|
12788
|
+
row,
|
|
12789
|
+
buckets,
|
|
12790
|
+
bucketColors,
|
|
12791
|
+
comparisonColor
|
|
12792
|
+
});
|
|
12793
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: custom });
|
|
12794
|
+
}
|
|
12795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12796
|
+
StackedComparisonBarChartTooltip,
|
|
12797
|
+
{
|
|
12798
|
+
...tooltipProps,
|
|
12799
|
+
row,
|
|
12800
|
+
buckets,
|
|
12801
|
+
bucketColors,
|
|
12802
|
+
comparisonColor,
|
|
12803
|
+
stackedTotalLabel,
|
|
12804
|
+
comparisonLabel
|
|
12805
|
+
}
|
|
12806
|
+
);
|
|
12807
|
+
},
|
|
12808
|
+
cursor: { fill: cursorFill },
|
|
12809
|
+
allowEscapeViewBox: { x: false, y: true }
|
|
12810
|
+
}
|
|
12811
|
+
),
|
|
12812
|
+
buckets.map((b, i) => {
|
|
12813
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
12814
|
+
const isTop = i === buckets.length - 1;
|
|
12815
|
+
const radius = isTop ? [barTopRadius, barTopRadius, 0, 0] : [0, 0, 0, 0];
|
|
12816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12817
|
+
import_recharts9.Bar,
|
|
12818
|
+
{
|
|
12819
|
+
dataKey: STACK_KEY(b.id),
|
|
12820
|
+
name: b.label,
|
|
12821
|
+
stackId: "stacked",
|
|
12822
|
+
fill: color,
|
|
12823
|
+
barSize: stackedSize,
|
|
12824
|
+
isAnimationActive: false,
|
|
12825
|
+
radius
|
|
12826
|
+
},
|
|
12827
|
+
b.id
|
|
12828
|
+
);
|
|
12829
|
+
}),
|
|
12830
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12831
|
+
import_recharts9.Bar,
|
|
12832
|
+
{
|
|
12833
|
+
dataKey: COMPARISON_KEY,
|
|
12834
|
+
name: comparisonLabel,
|
|
12835
|
+
stackId: "comparison",
|
|
12836
|
+
fill: comparisonColor,
|
|
12837
|
+
barSize: comparisonSize,
|
|
12838
|
+
isAnimationActive: false,
|
|
12839
|
+
radius: [barTopRadius, barTopRadius, 0, 0]
|
|
12840
|
+
}
|
|
12841
|
+
)
|
|
12842
|
+
]
|
|
12843
|
+
}
|
|
12844
|
+
) }) }) });
|
|
12845
|
+
}
|
|
12846
|
+
function StackedComparisonBarChart({
|
|
12847
|
+
subHeading,
|
|
12848
|
+
showSortToggle = true,
|
|
12849
|
+
onSortToggle,
|
|
12850
|
+
showSubHeadingDivider = true,
|
|
12851
|
+
showHeaderLegend = true,
|
|
12852
|
+
enableHorizontalScroll = false,
|
|
12853
|
+
chartMinWidth,
|
|
12854
|
+
categoryWidthPx,
|
|
12855
|
+
buckets,
|
|
12856
|
+
data,
|
|
12857
|
+
stackedLegendLabel = "Stacked",
|
|
12858
|
+
comparisonLegendLabel = "Comparison",
|
|
12859
|
+
stackedTotalLabel,
|
|
12860
|
+
yAxisDomain,
|
|
12861
|
+
yAxisTicks,
|
|
12862
|
+
yAxisTickFormatter,
|
|
12863
|
+
renderTooltip,
|
|
12864
|
+
emptyStatePlaceholderProps,
|
|
12865
|
+
customization
|
|
12866
|
+
}) {
|
|
12867
|
+
const bucketColors = customization?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
12868
|
+
const comparisonColor = customization?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
12869
|
+
const legendStackDot = customization?.header?.legendStackColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12870
|
+
const legendComparisonDot = customization?.header?.legendComparisonColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12871
|
+
const legendDividerColor = customization?.header?.legendDividerColor ?? "#E5E7EB";
|
|
12872
|
+
const legendDotSize = customization?.header?.legendDotSizePx ?? 10;
|
|
12873
|
+
const frameBorder = customization?.frame?.borderColor ?? STACKED_COMPARISON_DEFAULT_FRAME_BORDER;
|
|
12874
|
+
const frameBg = customization?.frame?.backgroundColor ?? "#FFFFFF";
|
|
12875
|
+
const rowsByName = React25.useMemo(() => {
|
|
12876
|
+
const r = {};
|
|
12877
|
+
for (const row of data) r[row.name] = row;
|
|
12878
|
+
return r;
|
|
12879
|
+
}, [data]);
|
|
12880
|
+
const chartData = React25.useMemo(() => {
|
|
12881
|
+
return data.map((row) => {
|
|
12882
|
+
const d = {
|
|
12883
|
+
__key: row.name,
|
|
12884
|
+
__name: row.name,
|
|
12885
|
+
__subName: row.subName,
|
|
12886
|
+
__row: row,
|
|
12887
|
+
[COMPARISON_KEY]: row.comparison
|
|
12888
|
+
};
|
|
12889
|
+
for (const b of buckets) {
|
|
12890
|
+
d[STACK_KEY(b.id)] = row.stacked[b.id] ?? 0;
|
|
12891
|
+
}
|
|
12892
|
+
return d;
|
|
12893
|
+
});
|
|
12894
|
+
}, [data, buckets]);
|
|
12895
|
+
const subHeadingSx = mergeSx4(
|
|
12896
|
+
{
|
|
12897
|
+
fontWeight: 700,
|
|
12898
|
+
fontSize: "0.95rem",
|
|
12899
|
+
color: "#0f172a"
|
|
12900
|
+
},
|
|
12901
|
+
customization?.header?.subHeadingSx
|
|
12902
|
+
);
|
|
12903
|
+
const frameSx = mergeSx4(
|
|
12904
|
+
{
|
|
12905
|
+
bgcolor: frameBg,
|
|
12906
|
+
border: `1px solid ${frameBorder}`,
|
|
12907
|
+
borderRadius: 2,
|
|
12908
|
+
px: 2,
|
|
12909
|
+
pt: 2,
|
|
12910
|
+
pb: 1.5,
|
|
12911
|
+
width: "100%",
|
|
12912
|
+
boxSizing: "border-box"
|
|
12913
|
+
},
|
|
12914
|
+
customization?.frame?.sx
|
|
12915
|
+
);
|
|
12916
|
+
const subHeadingDividerColor = customization?.frame?.subHeadingDividerColor ?? "#C7C9D9";
|
|
12917
|
+
const subHeadingDividerSx = mergeSx4(
|
|
12918
|
+
{
|
|
12919
|
+
height: "1px",
|
|
12920
|
+
width: "100%",
|
|
12921
|
+
bgcolor: subHeadingDividerColor,
|
|
12922
|
+
mb: 1.5
|
|
12923
|
+
},
|
|
12924
|
+
customization?.frame?.subHeadingDividerSx
|
|
12925
|
+
);
|
|
12926
|
+
const legendSx = mergeSx4({ flexShrink: 0 }, customization?.header?.legendSx);
|
|
12927
|
+
const showSubHeadingRow = Boolean(subHeading) || showSortToggle || showHeaderLegend;
|
|
12928
|
+
const resolvedStackedTotal = stackedTotalLabel ?? `Total ${stackedLegendLabel}`;
|
|
12929
|
+
if (chartData.length === 0) {
|
|
12930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChartEmptyState, { minHeight: 360, ...emptyStatePlaceholderProps });
|
|
12931
|
+
}
|
|
12932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StackedComparisonBarChartCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Box20.default, { sx: frameSx, children: [
|
|
12933
|
+
showSubHeadingRow ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12934
|
+
import_Stack18.default,
|
|
12935
|
+
{
|
|
12936
|
+
direction: "row",
|
|
12937
|
+
alignItems: "center",
|
|
12938
|
+
justifyContent: "space-between",
|
|
12939
|
+
gap: 2,
|
|
12940
|
+
flexWrap: "wrap",
|
|
12941
|
+
sx: { mb: 1 },
|
|
12942
|
+
children: [
|
|
12943
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
12944
|
+
subHeading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography17.default, { sx: subHeadingSx, children: subHeading }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", {}),
|
|
12945
|
+
showSortToggle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12946
|
+
import_ButtonBase2.default,
|
|
12947
|
+
{
|
|
12948
|
+
onClick: onSortToggle,
|
|
12949
|
+
disableRipple: !onSortToggle,
|
|
12950
|
+
sx: mergeSx4(
|
|
12951
|
+
{
|
|
12952
|
+
width: 26,
|
|
12953
|
+
height: 26,
|
|
12954
|
+
borderRadius: 1,
|
|
12955
|
+
bgcolor: "#EEF2FF",
|
|
12956
|
+
color: "#5B6DEC",
|
|
12957
|
+
display: "inline-flex",
|
|
12958
|
+
alignItems: "center",
|
|
12959
|
+
justifyContent: "center",
|
|
12960
|
+
cursor: onSortToggle ? "pointer" : "default",
|
|
12961
|
+
"&:hover": onSortToggle ? { bgcolor: "#E0E7FF" } : void 0
|
|
12962
|
+
},
|
|
12963
|
+
customization?.header?.sortButtonSx
|
|
12964
|
+
),
|
|
12965
|
+
"aria-label": "Toggle sort order",
|
|
12966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SortIcon, { color: "#5B6DEC" })
|
|
12967
|
+
}
|
|
12968
|
+
) : null
|
|
12969
|
+
] }),
|
|
12970
|
+
showHeaderLegend ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12971
|
+
import_Stack18.default,
|
|
12972
|
+
{
|
|
12973
|
+
direction: "row",
|
|
12974
|
+
alignItems: "center",
|
|
12975
|
+
spacing: 1.5,
|
|
12976
|
+
sx: legendSx,
|
|
12977
|
+
children: [
|
|
12978
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
12979
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LegendDot, { color: legendStackDot, sizePx: legendDotSize }),
|
|
12980
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12981
|
+
import_Typography17.default,
|
|
12982
|
+
{
|
|
12983
|
+
sx: mergeSx4(
|
|
12984
|
+
{
|
|
12985
|
+
fontWeight: 700,
|
|
12986
|
+
fontSize: "0.85rem",
|
|
12987
|
+
color: legendStackDot
|
|
12988
|
+
},
|
|
12989
|
+
customization?.header?.legendLabelSx
|
|
12990
|
+
),
|
|
12991
|
+
children: stackedLegendLabel
|
|
12992
|
+
}
|
|
12993
|
+
)
|
|
12994
|
+
] }),
|
|
12995
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12996
|
+
import_Box20.default,
|
|
12997
|
+
{
|
|
12998
|
+
sx: {
|
|
12999
|
+
width: "1px",
|
|
13000
|
+
height: 18,
|
|
13001
|
+
bgcolor: legendDividerColor
|
|
13002
|
+
}
|
|
13003
|
+
}
|
|
13004
|
+
),
|
|
13005
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
13006
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13007
|
+
LegendDot,
|
|
13008
|
+
{
|
|
13009
|
+
color: legendComparisonDot,
|
|
13010
|
+
sizePx: legendDotSize
|
|
13011
|
+
}
|
|
13012
|
+
),
|
|
13013
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13014
|
+
import_Typography17.default,
|
|
13015
|
+
{
|
|
13016
|
+
sx: mergeSx4(
|
|
13017
|
+
{
|
|
13018
|
+
fontWeight: 700,
|
|
13019
|
+
fontSize: "0.85rem",
|
|
13020
|
+
color: legendComparisonDot
|
|
13021
|
+
},
|
|
13022
|
+
customization?.header?.legendLabelSx
|
|
13023
|
+
),
|
|
13024
|
+
children: comparisonLegendLabel
|
|
13025
|
+
}
|
|
13026
|
+
)
|
|
13027
|
+
] })
|
|
13028
|
+
]
|
|
13029
|
+
}
|
|
13030
|
+
) : null
|
|
13031
|
+
]
|
|
13032
|
+
}
|
|
13033
|
+
) : null,
|
|
13034
|
+
showSubHeadingDivider ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: subHeadingDividerSx }) : null,
|
|
13035
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13036
|
+
BarPlot,
|
|
13037
|
+
{
|
|
13038
|
+
data: chartData,
|
|
13039
|
+
buckets,
|
|
13040
|
+
bucketColors,
|
|
13041
|
+
comparisonColor,
|
|
13042
|
+
rowsByName,
|
|
13043
|
+
yAxisDomain,
|
|
13044
|
+
yAxisTicks,
|
|
13045
|
+
yAxisTickFormatter,
|
|
13046
|
+
stackedTotalLabel: resolvedStackedTotal,
|
|
13047
|
+
comparisonLabel: comparisonLegendLabel,
|
|
13048
|
+
renderTooltip,
|
|
13049
|
+
enableHorizontalScroll,
|
|
13050
|
+
chartMinWidth,
|
|
13051
|
+
categoryWidthPx
|
|
13052
|
+
}
|
|
13053
|
+
)
|
|
13054
|
+
] }) });
|
|
13055
|
+
}
|
|
13056
|
+
|
|
13057
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.defaultInfoPopover.ts
|
|
13058
|
+
var DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER = {
|
|
13059
|
+
title: "Store Performance by Assist",
|
|
13060
|
+
description: "Per-store breakdown of attended customers split by attend-duration buckets, alongside the unattended count.",
|
|
13061
|
+
helpBullets: [
|
|
13062
|
+
"Compare attended vs unattended customer volume by store.",
|
|
13063
|
+
"Identify stores with high unattended counts that need staffing.",
|
|
13064
|
+
"See how attended customers split across 0-10 sec, 11-30 sec, 31-59 sec, and 1-2 min buckets."
|
|
13065
|
+
]
|
|
13066
|
+
};
|
|
13067
|
+
|
|
13068
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.mock.ts
|
|
13069
|
+
var STORE_PERFORMANCE_DEFAULT_BUCKETS = [
|
|
13070
|
+
{ id: "0-10", label: "0-10sec" },
|
|
13071
|
+
{ id: "11-30", label: "11-30sec" },
|
|
13072
|
+
{ id: "31-59", label: "31-59sec" },
|
|
13073
|
+
{ id: "1-2", label: "1-2min" }
|
|
13074
|
+
];
|
|
13075
|
+
var STORE_PERFORMANCE_DEFAULT_DATA = [
|
|
13076
|
+
{
|
|
13077
|
+
name: "Lake Mall",
|
|
13078
|
+
subName: "Kolkata",
|
|
13079
|
+
stacked: { "0-10": 1100, "11-30": 1100, "31-59": 1500, "1-2": 3e3 },
|
|
13080
|
+
comparison: 700
|
|
13081
|
+
},
|
|
13082
|
+
{
|
|
13083
|
+
name: "V3s",
|
|
13084
|
+
subName: "Delhi",
|
|
13085
|
+
stacked: { "0-10": 1e3, "11-30": 1100, "31-59": 1450, "1-2": 2900 },
|
|
13086
|
+
comparison: 620
|
|
13087
|
+
},
|
|
13088
|
+
{
|
|
13089
|
+
name: "Forum Mall",
|
|
13090
|
+
subName: "Bangalore",
|
|
13091
|
+
stacked: { "0-10": 750, "11-30": 800, "31-59": 1450, "1-2": 2050 },
|
|
13092
|
+
comparison: 520
|
|
13093
|
+
},
|
|
13094
|
+
{
|
|
13095
|
+
name: "Phoenix",
|
|
13096
|
+
subName: "Mumbai",
|
|
13097
|
+
stacked: { "0-10": 600, "11-30": 700, "31-59": 1450, "1-2": 1500 },
|
|
13098
|
+
comparison: 470
|
|
13099
|
+
},
|
|
13100
|
+
{
|
|
13101
|
+
name: "DB City",
|
|
13102
|
+
subName: "Bhopal",
|
|
13103
|
+
stacked: { "0-10": 400, "11-30": 600, "31-59": 950, "1-2": 1550 },
|
|
13104
|
+
comparison: 580
|
|
13105
|
+
},
|
|
13106
|
+
{
|
|
13107
|
+
name: "DLF",
|
|
13108
|
+
subName: "Gurgaon",
|
|
13109
|
+
stacked: { "0-10": 225, "11-30": 300, "31-59": 375, "1-2": 600 },
|
|
13110
|
+
comparison: 190
|
|
13111
|
+
},
|
|
13112
|
+
{
|
|
13113
|
+
name: "Highway",
|
|
13114
|
+
subName: "Chennai",
|
|
13115
|
+
stacked: { "0-10": 200, "11-30": 250, "31-59": 350, "1-2": 850 },
|
|
13116
|
+
comparison: 140
|
|
13117
|
+
},
|
|
13118
|
+
{
|
|
13119
|
+
name: "Elante",
|
|
13120
|
+
subName: "Chandigarh",
|
|
13121
|
+
stacked: { "0-10": 150, "11-30": 200, "31-59": 250, "1-2": 600 },
|
|
13122
|
+
comparison: 100
|
|
13123
|
+
}
|
|
13124
|
+
];
|
|
13125
|
+
|
|
13126
|
+
// src/components/widgets/StorePerformanceByAssist/StorePerformanceByAssist.tsx
|
|
13127
|
+
var import_Box21 = __toESM(require("@mui/material/Box"));
|
|
13128
|
+
var import_Card3 = __toESM(require("@mui/material/Card"));
|
|
13129
|
+
var import_CardContent3 = __toESM(require("@mui/material/CardContent"));
|
|
13130
|
+
var import_Stack19 = __toESM(require("@mui/material/Stack"));
|
|
13131
|
+
var import_Typography18 = __toESM(require("@mui/material/Typography"));
|
|
13132
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
13133
|
+
function LegendSquare({
|
|
13134
|
+
color,
|
|
13135
|
+
size = 12
|
|
13136
|
+
}) {
|
|
13137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13138
|
+
import_Box21.default,
|
|
13139
|
+
{
|
|
13140
|
+
sx: {
|
|
13141
|
+
width: size,
|
|
13142
|
+
height: size,
|
|
13143
|
+
borderRadius: 0.5,
|
|
13144
|
+
bgcolor: color,
|
|
13145
|
+
flexShrink: 0
|
|
13146
|
+
}
|
|
13147
|
+
}
|
|
13148
|
+
);
|
|
13149
|
+
}
|
|
13150
|
+
function StorePerformanceByAssist({
|
|
13151
|
+
title,
|
|
13152
|
+
width,
|
|
13153
|
+
maxWidth,
|
|
13154
|
+
minWidth,
|
|
13155
|
+
subHeading = "Stores (Top to Bottom)",
|
|
13156
|
+
showSortToggle = true,
|
|
13157
|
+
onSortToggle,
|
|
13158
|
+
showSubHeadingDivider = true,
|
|
13159
|
+
showHeaderLegend = true,
|
|
13160
|
+
enableHorizontalScroll = false,
|
|
13161
|
+
chartMinWidth,
|
|
13162
|
+
categoryWidthPx,
|
|
13163
|
+
buckets,
|
|
13164
|
+
data,
|
|
13165
|
+
attendedLegendLabel = "Attended",
|
|
13166
|
+
unattendedLegendLabel = "Unattended",
|
|
13167
|
+
unattendedBottomLegendLabel = "Unattended Customers",
|
|
13168
|
+
yAxisDomain,
|
|
13169
|
+
yAxisTicks,
|
|
13170
|
+
yAxisTickFormatter,
|
|
13171
|
+
infoPopover = null,
|
|
13172
|
+
renderTooltip,
|
|
13173
|
+
emptyStatePlaceholderProps,
|
|
13174
|
+
customization
|
|
13175
|
+
}) {
|
|
13176
|
+
const bucketColors = customization?.chart?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
13177
|
+
const comparisonColor = customization?.chart?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
13178
|
+
const bottomLegendColor = customization?.bottomLegend?.labelColor ?? "#6B7280";
|
|
13179
|
+
const bottomLegendFs = customization?.bottomLegend?.fontSizePx ?? 12;
|
|
13180
|
+
const bottomLegendDividerColor = customization?.bottomLegend?.dividerColor ?? "#E5E7EB";
|
|
13181
|
+
const bottomSwatch = customization?.bottomLegend?.swatchSizePx ?? 12;
|
|
13182
|
+
const resolvedInfo = infoPopover === void 0 ? DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER : infoPopover;
|
|
13183
|
+
const rootSx = mergeSx4(
|
|
13184
|
+
{
|
|
13185
|
+
bgcolor: "#FFFFFF",
|
|
13186
|
+
borderRadius: 2,
|
|
13187
|
+
boxShadow: "0 1px 3px rgba(15, 23, 42, 0.08)",
|
|
13188
|
+
...width !== void 0 ? { width } : null,
|
|
13189
|
+
...maxWidth !== void 0 ? { maxWidth } : null,
|
|
13190
|
+
...minWidth !== void 0 ? { minWidth } : null
|
|
13191
|
+
},
|
|
13192
|
+
customization?.rootCard?.sx
|
|
13193
|
+
);
|
|
13194
|
+
const titleSx = mergeSx4(
|
|
13195
|
+
{
|
|
13196
|
+
fontWeight: 700,
|
|
13197
|
+
fontSize: { xs: "1rem", sm: "1.05rem" },
|
|
13198
|
+
color: "#0f172a"
|
|
13199
|
+
},
|
|
13200
|
+
customization?.header?.titleSx
|
|
13201
|
+
);
|
|
13202
|
+
const bottomLegendSx = mergeSx4(
|
|
13203
|
+
{
|
|
13204
|
+
display: "flex",
|
|
13205
|
+
flexWrap: "wrap",
|
|
13206
|
+
alignItems: "center",
|
|
13207
|
+
rowGap: 1,
|
|
13208
|
+
mt: 1.5,
|
|
13209
|
+
px: 0.5
|
|
13210
|
+
},
|
|
13211
|
+
customization?.bottomLegend?.sx
|
|
13212
|
+
);
|
|
13213
|
+
const showOuterHeader = Boolean(title) || Boolean(resolvedInfo);
|
|
13214
|
+
const hasData = data.length > 0;
|
|
13215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Card3.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_CardContent3.default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Stack19.default, { spacing: 1.5, sx: { width: "100%" }, children: [
|
|
13216
|
+
showOuterHeader ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13217
|
+
import_Stack19.default,
|
|
13218
|
+
{
|
|
13219
|
+
direction: "row",
|
|
13220
|
+
alignItems: "center",
|
|
13221
|
+
justifyContent: "space-between",
|
|
13222
|
+
gap: 2,
|
|
13223
|
+
flexWrap: "wrap",
|
|
13224
|
+
children: [
|
|
13225
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Typography18.default, { sx: titleSx, children: title }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", {}),
|
|
13226
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13227
|
+
import_Stack19.default,
|
|
13228
|
+
{
|
|
13229
|
+
direction: "row",
|
|
13230
|
+
alignItems: "center",
|
|
13231
|
+
spacing: 1.5,
|
|
13232
|
+
sx: { flexShrink: 0 },
|
|
13233
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
13234
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
13235
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13236
|
+
ChartWidgetInfoButton,
|
|
13237
|
+
{
|
|
13238
|
+
popover: resolvedInfo,
|
|
13239
|
+
ariaLabel: "Store performance by assist information"
|
|
13240
|
+
}
|
|
13241
|
+
)
|
|
13242
|
+
] }) : null
|
|
13243
|
+
}
|
|
13244
|
+
)
|
|
13245
|
+
]
|
|
13246
|
+
}
|
|
13247
|
+
) : null,
|
|
13248
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13249
|
+
StackedComparisonBarChart,
|
|
13250
|
+
{
|
|
13251
|
+
subHeading,
|
|
13252
|
+
showSortToggle,
|
|
13253
|
+
onSortToggle,
|
|
13254
|
+
showSubHeadingDivider,
|
|
13255
|
+
showHeaderLegend,
|
|
13256
|
+
enableHorizontalScroll,
|
|
13257
|
+
chartMinWidth,
|
|
13258
|
+
categoryWidthPx,
|
|
13259
|
+
buckets,
|
|
13260
|
+
data,
|
|
13261
|
+
stackedLegendLabel: attendedLegendLabel,
|
|
13262
|
+
comparisonLegendLabel: unattendedLegendLabel,
|
|
13263
|
+
yAxisDomain,
|
|
13264
|
+
yAxisTicks,
|
|
13265
|
+
yAxisTickFormatter,
|
|
13266
|
+
renderTooltip,
|
|
13267
|
+
emptyStatePlaceholderProps,
|
|
13268
|
+
customization: customization?.chart
|
|
13269
|
+
}
|
|
13270
|
+
),
|
|
13271
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Box21.default, { sx: bottomLegendSx, children: [
|
|
13272
|
+
buckets.map((b, i) => {
|
|
13273
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
13274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13275
|
+
import_Stack19.default,
|
|
13276
|
+
{
|
|
13277
|
+
direction: "row",
|
|
13278
|
+
alignItems: "center",
|
|
13279
|
+
spacing: 0.75,
|
|
13280
|
+
sx: { mr: 2 },
|
|
13281
|
+
children: [
|
|
13282
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color, size: bottomSwatch }),
|
|
13283
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13284
|
+
import_Typography18.default,
|
|
13285
|
+
{
|
|
13286
|
+
sx: {
|
|
13287
|
+
fontSize: bottomLegendFs,
|
|
13288
|
+
color: bottomLegendColor,
|
|
13289
|
+
fontWeight: 500
|
|
13290
|
+
},
|
|
13291
|
+
children: b.label
|
|
13292
|
+
}
|
|
13293
|
+
)
|
|
13294
|
+
]
|
|
13295
|
+
},
|
|
13296
|
+
b.id
|
|
13297
|
+
);
|
|
13298
|
+
}),
|
|
13299
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13300
|
+
import_Box21.default,
|
|
13301
|
+
{
|
|
13302
|
+
sx: {
|
|
13303
|
+
width: "1px",
|
|
13304
|
+
height: 14,
|
|
13305
|
+
bgcolor: bottomLegendDividerColor,
|
|
13306
|
+
mx: 1
|
|
13307
|
+
}
|
|
13308
|
+
}
|
|
13309
|
+
),
|
|
13310
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13311
|
+
import_Stack19.default,
|
|
13312
|
+
{
|
|
13313
|
+
direction: "row",
|
|
13314
|
+
alignItems: "center",
|
|
13315
|
+
spacing: 0.75,
|
|
13316
|
+
sx: { mr: 2 },
|
|
13317
|
+
children: [
|
|
13318
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color: comparisonColor, size: bottomSwatch }),
|
|
13319
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13320
|
+
import_Typography18.default,
|
|
13321
|
+
{
|
|
13322
|
+
sx: {
|
|
13323
|
+
fontSize: bottomLegendFs,
|
|
13324
|
+
color: bottomLegendColor,
|
|
13325
|
+
fontWeight: 500
|
|
13326
|
+
},
|
|
13327
|
+
children: unattendedBottomLegendLabel
|
|
13328
|
+
}
|
|
13329
|
+
)
|
|
13330
|
+
]
|
|
13331
|
+
}
|
|
13332
|
+
)
|
|
13333
|
+
] }) : null
|
|
13334
|
+
] }) }) });
|
|
13335
|
+
}
|
|
13336
|
+
|
|
12353
13337
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12354
13338
|
var import_react21 = require("@iconify/react");
|
|
12355
13339
|
var import_material19 = require("@mui/material");
|
|
12356
|
-
var
|
|
13340
|
+
var React26 = __toESM(require("react"));
|
|
12357
13341
|
var import_react22 = require("react");
|
|
12358
|
-
var
|
|
13342
|
+
var import_recharts10 = require("recharts");
|
|
12359
13343
|
|
|
12360
13344
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
12361
13345
|
var DEFAULT_FOOTFALL_TILE_ICONS = {
|
|
@@ -12415,18 +13399,28 @@ function rowFromHeuristicLabel(zoneName, total) {
|
|
|
12415
13399
|
}));
|
|
12416
13400
|
return { id, label: zoneName, value: a + b + c + d, segments };
|
|
12417
13401
|
}
|
|
12418
|
-
function deriveFootfallHeatMapKpiStrip(activeZone, childTiles) {
|
|
13402
|
+
function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
|
|
13403
|
+
const buildRow = (node, role, total, fallback) => {
|
|
13404
|
+
if (buildBarRow) {
|
|
13405
|
+
const custom = buildBarRow({ node, activeZone, role, total });
|
|
13406
|
+
if (custom) return custom;
|
|
13407
|
+
}
|
|
13408
|
+
return fallback();
|
|
13409
|
+
};
|
|
12419
13410
|
if (activeZone) {
|
|
12420
13411
|
const childRowsSource = (activeZone.list ?? []).filter(
|
|
12421
13412
|
(n) => parseVisitorCount(n.overallData?.count) > 0
|
|
12422
13413
|
);
|
|
12423
13414
|
if (childRowsSource.length > 0) {
|
|
12424
|
-
const items = childRowsSource.map(
|
|
12425
|
-
(node)
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
13415
|
+
const items = childRowsSource.map((node) => {
|
|
13416
|
+
const total = parseVisitorCount(node.overallData?.count);
|
|
13417
|
+
return buildRow(
|
|
13418
|
+
node,
|
|
13419
|
+
"child",
|
|
13420
|
+
total,
|
|
13421
|
+
() => rowFromHeuristicLabel(node.name, total)
|
|
13422
|
+
);
|
|
13423
|
+
});
|
|
12430
13424
|
const overallVisitorsFromChildren = childRowsSource.reduce(
|
|
12431
13425
|
(sum, node) => sum + parseVisitorCount(node.overallData?.count),
|
|
12432
13426
|
0
|
|
@@ -12457,7 +13451,14 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles) {
|
|
|
12457
13451
|
},
|
|
12458
13452
|
rankedBarList: {
|
|
12459
13453
|
title: "Zone breakdown",
|
|
12460
|
-
items: [
|
|
13454
|
+
items: [
|
|
13455
|
+
buildRow(
|
|
13456
|
+
activeZone,
|
|
13457
|
+
"active",
|
|
13458
|
+
zs.overallVisitors,
|
|
13459
|
+
() => rowFromExplicitStrip(activeZone.name, zs)
|
|
13460
|
+
)
|
|
13461
|
+
],
|
|
12461
13462
|
listHeaderLabel: "Zone",
|
|
12462
13463
|
valueColumnHeader: "Visitors"
|
|
12463
13464
|
}
|
|
@@ -12474,7 +13475,14 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles) {
|
|
|
12474
13475
|
summaryKpis: { storeCount: storeCount2, overallVisitors: overallVisitors2 },
|
|
12475
13476
|
rankedBarList: {
|
|
12476
13477
|
title: "Zone breakdown",
|
|
12477
|
-
items: [
|
|
13478
|
+
items: [
|
|
13479
|
+
buildRow(
|
|
13480
|
+
activeZone,
|
|
13481
|
+
"active",
|
|
13482
|
+
overallVisitors2,
|
|
13483
|
+
() => rowFromHeuristicLabel(activeZone.name, overallVisitors2)
|
|
13484
|
+
)
|
|
13485
|
+
],
|
|
12478
13486
|
listHeaderLabel: "Zone",
|
|
12479
13487
|
valueColumnHeader: "Visitors"
|
|
12480
13488
|
}
|
|
@@ -12486,11 +13494,26 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles) {
|
|
|
12486
13494
|
0
|
|
12487
13495
|
);
|
|
12488
13496
|
const storeCount = childTiles.length;
|
|
13497
|
+
const overviewNode = {
|
|
13498
|
+
name: "Overview",
|
|
13499
|
+
value: overallVisitors,
|
|
13500
|
+
originalValue: overallVisitors,
|
|
13501
|
+
color: "",
|
|
13502
|
+
overallData: { count: overallVisitors, dwell: "" },
|
|
13503
|
+
list: []
|
|
13504
|
+
};
|
|
12489
13505
|
return {
|
|
12490
13506
|
summaryKpis: { storeCount, overallVisitors },
|
|
12491
13507
|
rankedBarList: {
|
|
12492
13508
|
title: "Footfall overview",
|
|
12493
|
-
items: [
|
|
13509
|
+
items: [
|
|
13510
|
+
buildRow(
|
|
13511
|
+
overviewNode,
|
|
13512
|
+
"overview",
|
|
13513
|
+
overallVisitors,
|
|
13514
|
+
() => rowFromHeuristicLabel("Overview", overallVisitors)
|
|
13515
|
+
)
|
|
13516
|
+
],
|
|
12494
13517
|
listHeaderLabel: "Scope",
|
|
12495
13518
|
valueColumnHeader: "Visitors"
|
|
12496
13519
|
}
|
|
@@ -12739,7 +13762,7 @@ function getNestedList(payload) {
|
|
|
12739
13762
|
}
|
|
12740
13763
|
|
|
12741
13764
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12742
|
-
var
|
|
13765
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12743
13766
|
function toDisplayNumber(value) {
|
|
12744
13767
|
if (!Number.isFinite(value)) return "0";
|
|
12745
13768
|
return new Intl.NumberFormat("en-IN").format(value);
|
|
@@ -12758,7 +13781,7 @@ function InlineStatCard({
|
|
|
12758
13781
|
sx,
|
|
12759
13782
|
iconColor = "#1565C0"
|
|
12760
13783
|
}) {
|
|
12761
|
-
return /* @__PURE__ */ (0,
|
|
13784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12762
13785
|
import_material19.Paper,
|
|
12763
13786
|
{
|
|
12764
13787
|
elevation: 0,
|
|
@@ -12774,8 +13797,8 @@ function InlineStatCard({
|
|
|
12774
13797
|
},
|
|
12775
13798
|
...sx ? [sx] : []
|
|
12776
13799
|
],
|
|
12777
|
-
children: /* @__PURE__ */ (0,
|
|
12778
|
-
/* @__PURE__ */ (0,
|
|
13800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
13801
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12779
13802
|
import_react21.Icon,
|
|
12780
13803
|
{
|
|
12781
13804
|
icon,
|
|
@@ -12785,8 +13808,8 @@ function InlineStatCard({
|
|
|
12785
13808
|
style: { flexShrink: 0 }
|
|
12786
13809
|
}
|
|
12787
13810
|
),
|
|
12788
|
-
/* @__PURE__ */ (0,
|
|
12789
|
-
/* @__PURE__ */ (0,
|
|
13811
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.15, children: [
|
|
13812
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12790
13813
|
import_material19.Typography,
|
|
12791
13814
|
{
|
|
12792
13815
|
variant: "body2",
|
|
@@ -12794,7 +13817,7 @@ function InlineStatCard({
|
|
|
12794
13817
|
children: title
|
|
12795
13818
|
}
|
|
12796
13819
|
),
|
|
12797
|
-
/* @__PURE__ */ (0,
|
|
13820
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12798
13821
|
import_material19.Typography,
|
|
12799
13822
|
{
|
|
12800
13823
|
variant: "h6",
|
|
@@ -12824,8 +13847,8 @@ function InlineSegmentStrip({
|
|
|
12824
13847
|
const barHeight = presentation?.barHeight ?? 12;
|
|
12825
13848
|
const trackInsetPx = presentation?.trackInsetPx ?? 3;
|
|
12826
13849
|
const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
|
|
12827
|
-
return /* @__PURE__ */ (0,
|
|
12828
|
-
/* @__PURE__ */ (0,
|
|
13850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.75, children: [
|
|
13851
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12829
13852
|
import_material19.Stack,
|
|
12830
13853
|
{
|
|
12831
13854
|
direction: "row",
|
|
@@ -12833,7 +13856,7 @@ function InlineSegmentStrip({
|
|
|
12833
13856
|
justifyContent: "space-between",
|
|
12834
13857
|
gap: 1,
|
|
12835
13858
|
children: [
|
|
12836
|
-
/* @__PURE__ */ (0,
|
|
13859
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12837
13860
|
import_material19.Typography,
|
|
12838
13861
|
{
|
|
12839
13862
|
variant: "subtitle2",
|
|
@@ -12844,7 +13867,7 @@ function InlineSegmentStrip({
|
|
|
12844
13867
|
children: item.label
|
|
12845
13868
|
}
|
|
12846
13869
|
),
|
|
12847
|
-
/* @__PURE__ */ (0,
|
|
13870
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12848
13871
|
import_material19.Typography,
|
|
12849
13872
|
{
|
|
12850
13873
|
variant: "body2",
|
|
@@ -12858,7 +13881,7 @@ function InlineSegmentStrip({
|
|
|
12858
13881
|
]
|
|
12859
13882
|
}
|
|
12860
13883
|
),
|
|
12861
|
-
/* @__PURE__ */ (0,
|
|
13884
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12862
13885
|
import_material19.Box,
|
|
12863
13886
|
{
|
|
12864
13887
|
sx: {
|
|
@@ -12876,7 +13899,7 @@ function InlineSegmentStrip({
|
|
|
12876
13899
|
const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
|
|
12877
13900
|
const isLast = idx === lastIdx;
|
|
12878
13901
|
const fill = resolveSegmentFill(presentation, idx, segment.color);
|
|
12879
|
-
return /* @__PURE__ */ (0,
|
|
13902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12880
13903
|
import_material19.Tooltip,
|
|
12881
13904
|
{
|
|
12882
13905
|
title: (() => {
|
|
@@ -12889,7 +13912,7 @@ function InlineSegmentStrip({
|
|
|
12889
13912
|
});
|
|
12890
13913
|
return custom == null ? "" : custom;
|
|
12891
13914
|
}
|
|
12892
|
-
return /* @__PURE__ */ (0,
|
|
13915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12893
13916
|
InlineSegmentTooltipCard,
|
|
12894
13917
|
{
|
|
12895
13918
|
segment,
|
|
@@ -12904,7 +13927,7 @@ function InlineSegmentStrip({
|
|
|
12904
13927
|
sx: inlineSegmentTooltipPopperSx
|
|
12905
13928
|
}
|
|
12906
13929
|
},
|
|
12907
|
-
children: /* @__PURE__ */ (0,
|
|
13930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12908
13931
|
import_material19.Box,
|
|
12909
13932
|
{
|
|
12910
13933
|
sx: {
|
|
@@ -12949,9 +13972,9 @@ function InlineSegmentTooltipCard({
|
|
|
12949
13972
|
cardSx
|
|
12950
13973
|
}) {
|
|
12951
13974
|
const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
|
|
12952
|
-
return /* @__PURE__ */ (0,
|
|
12953
|
-
/* @__PURE__ */ (0,
|
|
12954
|
-
/* @__PURE__ */ (0,
|
|
13975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Box, { sx: tooltipSurfaceSx, children: [
|
|
13976
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Box, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
|
|
13977
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12955
13978
|
import_material19.Box,
|
|
12956
13979
|
{
|
|
12957
13980
|
sx: {
|
|
@@ -12964,7 +13987,7 @@ function InlineSegmentTooltipCard({
|
|
|
12964
13987
|
py: 1.25
|
|
12965
13988
|
},
|
|
12966
13989
|
children: [
|
|
12967
|
-
/* @__PURE__ */ (0,
|
|
13990
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12968
13991
|
import_material19.Box,
|
|
12969
13992
|
{
|
|
12970
13993
|
component: "span",
|
|
@@ -12978,7 +14001,7 @@ function InlineSegmentTooltipCard({
|
|
|
12978
14001
|
}
|
|
12979
14002
|
}
|
|
12980
14003
|
),
|
|
12981
|
-
/* @__PURE__ */ (0,
|
|
14004
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12982
14005
|
import_material19.Typography,
|
|
12983
14006
|
{
|
|
12984
14007
|
component: "span",
|
|
@@ -12991,7 +14014,7 @@ function InlineSegmentTooltipCard({
|
|
|
12991
14014
|
children: segment.label
|
|
12992
14015
|
}
|
|
12993
14016
|
),
|
|
12994
|
-
/* @__PURE__ */ (0,
|
|
14017
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12995
14018
|
import_material19.Typography,
|
|
12996
14019
|
{
|
|
12997
14020
|
component: "span",
|
|
@@ -13004,7 +14027,7 @@ function InlineSegmentTooltipCard({
|
|
|
13004
14027
|
children: " : "
|
|
13005
14028
|
}
|
|
13006
14029
|
),
|
|
13007
|
-
/* @__PURE__ */ (0,
|
|
14030
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13008
14031
|
import_material19.Typography,
|
|
13009
14032
|
{
|
|
13010
14033
|
component: "span",
|
|
@@ -13035,7 +14058,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13035
14058
|
const statIcon = presentation?.statCardIconColor ?? "#1565C0";
|
|
13036
14059
|
const customSummary = presentation?.summaryCards?.(summaryKpis);
|
|
13037
14060
|
const useCustomSummary = customSummary !== void 0;
|
|
13038
|
-
return /* @__PURE__ */ (0,
|
|
14061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13039
14062
|
import_material19.Stack,
|
|
13040
14063
|
{
|
|
13041
14064
|
spacing: 2,
|
|
@@ -13045,7 +14068,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13045
14068
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
13046
14069
|
],
|
|
13047
14070
|
children: [
|
|
13048
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0,
|
|
14071
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13049
14072
|
import_material19.Stack,
|
|
13050
14073
|
{
|
|
13051
14074
|
direction: "row",
|
|
@@ -13053,7 +14076,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13053
14076
|
flexWrap: "wrap",
|
|
13054
14077
|
useFlexGap: true,
|
|
13055
14078
|
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
13056
|
-
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0,
|
|
14079
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13057
14080
|
InlineStatCard,
|
|
13058
14081
|
{
|
|
13059
14082
|
icon: card.icon ?? "mdi:chart-box-outline",
|
|
@@ -13066,7 +14089,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13066
14089
|
},
|
|
13067
14090
|
card.id
|
|
13068
14091
|
)) : [
|
|
13069
|
-
/* @__PURE__ */ (0,
|
|
14092
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13070
14093
|
InlineStatCard,
|
|
13071
14094
|
{
|
|
13072
14095
|
icon: "mdi:store-marker-outline",
|
|
@@ -13077,7 +14100,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13077
14100
|
},
|
|
13078
14101
|
"default-stores"
|
|
13079
14102
|
),
|
|
13080
|
-
/* @__PURE__ */ (0,
|
|
14103
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13081
14104
|
InlineStatCard,
|
|
13082
14105
|
{
|
|
13083
14106
|
icon: "fluent:people-community-16-filled",
|
|
@@ -13091,7 +14114,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13091
14114
|
]
|
|
13092
14115
|
}
|
|
13093
14116
|
),
|
|
13094
|
-
/* @__PURE__ */ (0,
|
|
14117
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13095
14118
|
import_material19.Stack,
|
|
13096
14119
|
{
|
|
13097
14120
|
spacing: 1.25,
|
|
@@ -13099,7 +14122,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13099
14122
|
{ pt: 0.5, pb: 1 },
|
|
13100
14123
|
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
13101
14124
|
],
|
|
13102
|
-
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0,
|
|
14125
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13103
14126
|
InlineSegmentStrip,
|
|
13104
14127
|
{
|
|
13105
14128
|
item,
|
|
@@ -13328,9 +14351,17 @@ function FootFallHeatMapView({
|
|
|
13328
14351
|
const activeZoneForStrip = trackingDetails.length > 0 ? trackingDetails[trackingDetails.length - 1] : void 0;
|
|
13329
14352
|
return deriveFootfallHeatMapKpiStrip(
|
|
13330
14353
|
activeZoneForStrip,
|
|
13331
|
-
data.current ?? []
|
|
14354
|
+
data.current ?? [],
|
|
14355
|
+
kpiStripPresentation?.buildBarRow
|
|
13332
14356
|
);
|
|
13333
|
-
}, [
|
|
14357
|
+
}, [
|
|
14358
|
+
isLoading,
|
|
14359
|
+
loading,
|
|
14360
|
+
initialData,
|
|
14361
|
+
trackingDetails,
|
|
14362
|
+
data,
|
|
14363
|
+
kpiStripPresentation?.buildBarRow
|
|
14364
|
+
]);
|
|
13334
14365
|
const formatPercentage = (value) => {
|
|
13335
14366
|
if (typeof value !== "number") return "0%";
|
|
13336
14367
|
const formatted = value.toFixed(2);
|
|
@@ -13411,7 +14442,7 @@ function FootFallHeatMapView({
|
|
|
13411
14442
|
);
|
|
13412
14443
|
const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
|
|
13413
14444
|
const p = inner;
|
|
13414
|
-
return /* @__PURE__ */ (0,
|
|
14445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13415
14446
|
"foreignObject",
|
|
13416
14447
|
{
|
|
13417
14448
|
x,
|
|
@@ -13419,7 +14450,7 @@ function FootFallHeatMapView({
|
|
|
13419
14450
|
width,
|
|
13420
14451
|
height,
|
|
13421
14452
|
style: { borderRadius: "12px", overflow: "hidden" },
|
|
13422
|
-
children: /* @__PURE__ */ (0,
|
|
14453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13423
14454
|
import_material19.Stack,
|
|
13424
14455
|
{
|
|
13425
14456
|
onClick: handleClick,
|
|
@@ -13450,7 +14481,7 @@ function FootFallHeatMapView({
|
|
|
13450
14481
|
}
|
|
13451
14482
|
},
|
|
13452
14483
|
children: [
|
|
13453
|
-
/* @__PURE__ */ (0,
|
|
14484
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13454
14485
|
import_material19.Stack,
|
|
13455
14486
|
{
|
|
13456
14487
|
direction: isSmall ? "row" : "column",
|
|
@@ -13462,7 +14493,7 @@ function FootFallHeatMapView({
|
|
|
13462
14493
|
mb: isSmall ? 0.5 : 1
|
|
13463
14494
|
},
|
|
13464
14495
|
children: [
|
|
13465
|
-
/* @__PURE__ */ (0,
|
|
14496
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13466
14497
|
import_material19.Typography,
|
|
13467
14498
|
{
|
|
13468
14499
|
sx: {
|
|
@@ -13485,7 +14516,7 @@ function FootFallHeatMapView({
|
|
|
13485
14516
|
children: name
|
|
13486
14517
|
}
|
|
13487
14518
|
),
|
|
13488
|
-
/* @__PURE__ */ (0,
|
|
14519
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13489
14520
|
import_material19.Typography,
|
|
13490
14521
|
{
|
|
13491
14522
|
sx: {
|
|
@@ -13500,7 +14531,7 @@ function FootFallHeatMapView({
|
|
|
13500
14531
|
]
|
|
13501
14532
|
}
|
|
13502
14533
|
),
|
|
13503
|
-
/* @__PURE__ */ (0,
|
|
14534
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13504
14535
|
import_material19.Stack,
|
|
13505
14536
|
{
|
|
13506
14537
|
direction: "row",
|
|
@@ -13514,7 +14545,7 @@ function FootFallHeatMapView({
|
|
|
13514
14545
|
...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
|
|
13515
14546
|
],
|
|
13516
14547
|
children: [
|
|
13517
|
-
/* @__PURE__ */ (0,
|
|
14548
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13518
14549
|
import_material19.Stack,
|
|
13519
14550
|
{
|
|
13520
14551
|
direction: "row",
|
|
@@ -13532,7 +14563,7 @@ function FootFallHeatMapView({
|
|
|
13532
14563
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13533
14564
|
],
|
|
13534
14565
|
children: [
|
|
13535
|
-
/* @__PURE__ */ (0,
|
|
14566
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13536
14567
|
import_material19.Box,
|
|
13537
14568
|
{
|
|
13538
14569
|
sx: [
|
|
@@ -13545,7 +14576,7 @@ function FootFallHeatMapView({
|
|
|
13545
14576
|
},
|
|
13546
14577
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13547
14578
|
],
|
|
13548
|
-
children: /* @__PURE__ */ (0,
|
|
14579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13549
14580
|
import_react21.Icon,
|
|
13550
14581
|
{
|
|
13551
14582
|
icon: icons.visitors,
|
|
@@ -13555,7 +14586,7 @@ function FootFallHeatMapView({
|
|
|
13555
14586
|
)
|
|
13556
14587
|
}
|
|
13557
14588
|
),
|
|
13558
|
-
/* @__PURE__ */ (0,
|
|
14589
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13559
14590
|
import_material19.Typography,
|
|
13560
14591
|
{
|
|
13561
14592
|
sx: [
|
|
@@ -13573,7 +14604,7 @@ function FootFallHeatMapView({
|
|
|
13573
14604
|
]
|
|
13574
14605
|
}
|
|
13575
14606
|
),
|
|
13576
|
-
/* @__PURE__ */ (0,
|
|
14607
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13577
14608
|
import_material19.Stack,
|
|
13578
14609
|
{
|
|
13579
14610
|
direction: "row",
|
|
@@ -13591,7 +14622,7 @@ function FootFallHeatMapView({
|
|
|
13591
14622
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13592
14623
|
],
|
|
13593
14624
|
children: [
|
|
13594
|
-
/* @__PURE__ */ (0,
|
|
14625
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13595
14626
|
import_material19.Box,
|
|
13596
14627
|
{
|
|
13597
14628
|
sx: [
|
|
@@ -13604,7 +14635,7 @@ function FootFallHeatMapView({
|
|
|
13604
14635
|
},
|
|
13605
14636
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13606
14637
|
],
|
|
13607
|
-
children: /* @__PURE__ */ (0,
|
|
14638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13608
14639
|
import_react21.Icon,
|
|
13609
14640
|
{
|
|
13610
14641
|
icon: icons.dwell,
|
|
@@ -13614,7 +14645,7 @@ function FootFallHeatMapView({
|
|
|
13614
14645
|
)
|
|
13615
14646
|
}
|
|
13616
14647
|
),
|
|
13617
|
-
/* @__PURE__ */ (0,
|
|
14648
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13618
14649
|
import_material19.Typography,
|
|
13619
14650
|
{
|
|
13620
14651
|
sx: [
|
|
@@ -13657,7 +14688,7 @@ function FootFallHeatMapView({
|
|
|
13657
14688
|
const LabelTag = ({ textColor = "#f0f0f0" }) => {
|
|
13658
14689
|
const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
|
|
13659
14690
|
const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
|
|
13660
|
-
return /* @__PURE__ */ (0,
|
|
14691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Stack, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13661
14692
|
import_material19.Typography,
|
|
13662
14693
|
{
|
|
13663
14694
|
component: "span",
|
|
@@ -13671,9 +14702,9 @@ function FootFallHeatMapView({
|
|
|
13671
14702
|
color: textColor,
|
|
13672
14703
|
children: brandLabel
|
|
13673
14704
|
}
|
|
13674
|
-
) : /* @__PURE__ */ (0,
|
|
13675
|
-
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0,
|
|
13676
|
-
i > 0 ? /* @__PURE__ */ (0,
|
|
14705
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14706
|
+
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(React26.Fragment, { children: [
|
|
14707
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13677
14708
|
import_material19.Typography,
|
|
13678
14709
|
{
|
|
13679
14710
|
component: "span",
|
|
@@ -13684,7 +14715,7 @@ function FootFallHeatMapView({
|
|
|
13684
14715
|
children: "/"
|
|
13685
14716
|
}
|
|
13686
14717
|
) : null,
|
|
13687
|
-
/* @__PURE__ */ (0,
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13688
14719
|
import_material19.Typography,
|
|
13689
14720
|
{
|
|
13690
14721
|
component: "span",
|
|
@@ -13700,8 +14731,8 @@ function FootFallHeatMapView({
|
|
|
13700
14731
|
}
|
|
13701
14732
|
)
|
|
13702
14733
|
] }, `${seg}-${i}`)),
|
|
13703
|
-
brandLabel ? /* @__PURE__ */ (0,
|
|
13704
|
-
/* @__PURE__ */ (0,
|
|
14734
|
+
brandLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14735
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13705
14736
|
import_material19.Typography,
|
|
13706
14737
|
{
|
|
13707
14738
|
component: "span",
|
|
@@ -13711,7 +14742,7 @@ function FootFallHeatMapView({
|
|
|
13711
14742
|
children: "/"
|
|
13712
14743
|
}
|
|
13713
14744
|
),
|
|
13714
|
-
/* @__PURE__ */ (0,
|
|
14745
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13715
14746
|
import_material19.Typography,
|
|
13716
14747
|
{
|
|
13717
14748
|
component: "span",
|
|
@@ -13731,10 +14762,10 @@ function FootFallHeatMapView({
|
|
|
13731
14762
|
};
|
|
13732
14763
|
const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
|
|
13733
14764
|
if (is500Error) {
|
|
13734
|
-
return /* @__PURE__ */ (0,
|
|
14765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Box, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { color: "error", children: "Something went wrong (500). Try again later." }) });
|
|
13735
14766
|
}
|
|
13736
14767
|
if (isLoading || loading) {
|
|
13737
|
-
return /* @__PURE__ */ (0,
|
|
14768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13738
14769
|
import_material19.Skeleton,
|
|
13739
14770
|
{
|
|
13740
14771
|
variant: "rectangular",
|
|
@@ -13775,8 +14806,8 @@ function FootFallHeatMapView({
|
|
|
13775
14806
|
"#888888",
|
|
13776
14807
|
"header"
|
|
13777
14808
|
);
|
|
13778
|
-
return /* @__PURE__ */ (0,
|
|
13779
|
-
/* @__PURE__ */ (0,
|
|
14809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { width: "100%", children: [
|
|
14810
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13780
14811
|
import_material19.Box,
|
|
13781
14812
|
{
|
|
13782
14813
|
sx: {
|
|
@@ -13788,16 +14819,16 @@ function FootFallHeatMapView({
|
|
|
13788
14819
|
gap: 1
|
|
13789
14820
|
},
|
|
13790
14821
|
children: [
|
|
13791
|
-
/* @__PURE__ */ (0,
|
|
13792
|
-
/* @__PURE__ */ (0,
|
|
13793
|
-
isFetching ? /* @__PURE__ */ (0,
|
|
13794
|
-
/* @__PURE__ */ (0,
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "h6", fontWeight: 700, children: title }),
|
|
14823
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
14824
|
+
isFetching ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
|
|
14825
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Tooltip, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13795
14826
|
import_material19.IconButton,
|
|
13796
14827
|
{
|
|
13797
14828
|
size: "small",
|
|
13798
14829
|
"aria-label": "Zone performance info",
|
|
13799
14830
|
edge: "end",
|
|
13800
|
-
children: /* @__PURE__ */ (0,
|
|
14831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13801
14832
|
import_react21.Icon,
|
|
13802
14833
|
{
|
|
13803
14834
|
icon: icons.headerInfo,
|
|
@@ -13812,7 +14843,7 @@ function FootFallHeatMapView({
|
|
|
13812
14843
|
]
|
|
13813
14844
|
}
|
|
13814
14845
|
),
|
|
13815
|
-
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0,
|
|
14846
|
+
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13816
14847
|
import_material19.Stack,
|
|
13817
14848
|
{
|
|
13818
14849
|
direction: "row",
|
|
@@ -13827,13 +14858,13 @@ function FootFallHeatMapView({
|
|
|
13827
14858
|
backgroundColor: zoneBarColor
|
|
13828
14859
|
},
|
|
13829
14860
|
children: [
|
|
13830
|
-
/* @__PURE__ */ (0,
|
|
13831
|
-
/* @__PURE__ */ (0,
|
|
14861
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
14862
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13832
14863
|
import_material19.Button,
|
|
13833
14864
|
{
|
|
13834
14865
|
size: "small",
|
|
13835
14866
|
onClick: handleClose,
|
|
13836
|
-
startIcon: /* @__PURE__ */ (0,
|
|
14867
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13837
14868
|
import_react21.Icon,
|
|
13838
14869
|
{
|
|
13839
14870
|
icon: "mdi:chevron-left",
|
|
@@ -13853,9 +14884,9 @@ function FootFallHeatMapView({
|
|
|
13853
14884
|
children: "Back"
|
|
13854
14885
|
}
|
|
13855
14886
|
),
|
|
13856
|
-
/* @__PURE__ */ (0,
|
|
14887
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LabelTag, { textColor: zoneBarHeaderFg })
|
|
13857
14888
|
] }),
|
|
13858
|
-
/* @__PURE__ */ (0,
|
|
14889
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13859
14890
|
import_material19.Typography,
|
|
13860
14891
|
{
|
|
13861
14892
|
variant: "h6",
|
|
@@ -13870,7 +14901,7 @@ function FootFallHeatMapView({
|
|
|
13870
14901
|
]
|
|
13871
14902
|
}
|
|
13872
14903
|
) : null,
|
|
13873
|
-
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0,
|
|
14904
|
+
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13874
14905
|
FootfallHeatMapKpiRankedBlock,
|
|
13875
14906
|
{
|
|
13876
14907
|
strip: derivedKpiStrip,
|
|
@@ -13887,7 +14918,7 @@ function FootFallHeatMapView({
|
|
|
13887
14918
|
}
|
|
13888
14919
|
}
|
|
13889
14920
|
) : null,
|
|
13890
|
-
showLeafDetailsBody ? /* @__PURE__ */ (0,
|
|
14921
|
+
showLeafDetailsBody ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13891
14922
|
import_material19.Box,
|
|
13892
14923
|
{
|
|
13893
14924
|
sx: [
|
|
@@ -13903,8 +14934,8 @@ function FootFallHeatMapView({
|
|
|
13903
14934
|
]
|
|
13904
14935
|
}
|
|
13905
14936
|
) : null,
|
|
13906
|
-
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0,
|
|
13907
|
-
|
|
14937
|
+
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_recharts10.ResponsiveContainer, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14938
|
+
import_recharts10.Treemap,
|
|
13908
14939
|
{
|
|
13909
14940
|
data: data?.current ?? [],
|
|
13910
14941
|
dataKey: "value",
|
|
@@ -13916,22 +14947,22 @@ function FootFallHeatMapView({
|
|
|
13916
14947
|
animationDuration: 0,
|
|
13917
14948
|
style: { borderRadius: "12px" }
|
|
13918
14949
|
}
|
|
13919
|
-
) }) : /* @__PURE__ */ (0,
|
|
14950
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13920
14951
|
ChartEmptyState,
|
|
13921
14952
|
{
|
|
13922
14953
|
minHeight: treemapHeight,
|
|
13923
14954
|
...emptyStatePlaceholderProps
|
|
13924
14955
|
}
|
|
13925
|
-
) : /* @__PURE__ */ (0,
|
|
14956
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
|
|
13926
14957
|
] });
|
|
13927
14958
|
}
|
|
13928
14959
|
|
|
13929
14960
|
// src/components/widgets/FootFallHeatMap/ZoneWiseKpiCards.tsx
|
|
13930
14961
|
var import_Grid2 = __toESM(require("@mui/material/Grid"));
|
|
13931
14962
|
var import_Paper3 = __toESM(require("@mui/material/Paper"));
|
|
13932
|
-
var
|
|
13933
|
-
var
|
|
13934
|
-
var
|
|
14963
|
+
var import_Stack20 = __toESM(require("@mui/material/Stack"));
|
|
14964
|
+
var import_Typography19 = __toESM(require("@mui/material/Typography"));
|
|
14965
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13935
14966
|
function metricsToRows(metrics) {
|
|
13936
14967
|
return [
|
|
13937
14968
|
{ id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
|
|
@@ -13969,7 +15000,7 @@ function metricsToRows(metrics) {
|
|
|
13969
15000
|
}
|
|
13970
15001
|
var ZoneWiseKpiCards = ({ metrics }) => {
|
|
13971
15002
|
const rows = metricsToRows(metrics);
|
|
13972
|
-
return /* @__PURE__ */ (0,
|
|
15003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Grid2.default, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
13973
15004
|
import_Grid2.default,
|
|
13974
15005
|
{
|
|
13975
15006
|
size: {
|
|
@@ -13977,7 +15008,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13977
15008
|
sm: 6,
|
|
13978
15009
|
md: 3
|
|
13979
15010
|
},
|
|
13980
|
-
children: /* @__PURE__ */ (0,
|
|
15011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
13981
15012
|
import_Paper3.default,
|
|
13982
15013
|
{
|
|
13983
15014
|
elevation: 0,
|
|
@@ -13989,8 +15020,8 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13989
15020
|
height: "100%"
|
|
13990
15021
|
},
|
|
13991
15022
|
children: [
|
|
13992
|
-
/* @__PURE__ */ (0,
|
|
13993
|
-
|
|
15023
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
15024
|
+
import_Typography19.default,
|
|
13994
15025
|
{
|
|
13995
15026
|
variant: "caption",
|
|
13996
15027
|
color: "text.secondary",
|
|
@@ -13998,7 +15029,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
13998
15029
|
children: item.title
|
|
13999
15030
|
}
|
|
14000
15031
|
),
|
|
14001
|
-
/* @__PURE__ */ (0,
|
|
15032
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Stack20.default, { mt: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Typography19.default, { variant: "h6", fontWeight: 700, children: item.value }) })
|
|
14002
15033
|
]
|
|
14003
15034
|
}
|
|
14004
15035
|
)
|
|
@@ -14057,32 +15088,32 @@ var peakBillingHoursMockSeriesByTabId = {
|
|
|
14057
15088
|
};
|
|
14058
15089
|
|
|
14059
15090
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14060
|
-
var
|
|
14061
|
-
var
|
|
14062
|
-
var
|
|
15091
|
+
var import_Box22 = __toESM(require("@mui/material/Box"));
|
|
15092
|
+
var import_Card4 = __toESM(require("@mui/material/Card"));
|
|
15093
|
+
var import_CardContent4 = __toESM(require("@mui/material/CardContent"));
|
|
14063
15094
|
var import_Skeleton7 = __toESM(require("@mui/material/Skeleton"));
|
|
14064
|
-
var
|
|
14065
|
-
var
|
|
14066
|
-
var
|
|
14067
|
-
var
|
|
15095
|
+
var import_Stack21 = __toESM(require("@mui/material/Stack"));
|
|
15096
|
+
var import_Typography20 = __toESM(require("@mui/material/Typography"));
|
|
15097
|
+
var React28 = __toESM(require("react"));
|
|
15098
|
+
var import_recharts11 = require("recharts");
|
|
14068
15099
|
|
|
14069
15100
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
|
|
14070
|
-
var
|
|
14071
|
-
var
|
|
14072
|
-
var PeakBillingHoursCustomizationContext =
|
|
15101
|
+
var React27 = __toESM(require("react"));
|
|
15102
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
15103
|
+
var PeakBillingHoursCustomizationContext = React27.createContext({});
|
|
14073
15104
|
function PeakBillingHoursCustomizationProvider({
|
|
14074
15105
|
value,
|
|
14075
15106
|
children
|
|
14076
15107
|
}) {
|
|
14077
|
-
const memo =
|
|
14078
|
-
return /* @__PURE__ */ (0,
|
|
15108
|
+
const memo = React27.useMemo(() => value, [value]);
|
|
15109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
|
|
14079
15110
|
}
|
|
14080
15111
|
function usePeakBillingHoursCustomization() {
|
|
14081
|
-
return
|
|
15112
|
+
return React27.useContext(PeakBillingHoursCustomizationContext);
|
|
14082
15113
|
}
|
|
14083
15114
|
|
|
14084
15115
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
|
|
14085
|
-
var
|
|
15116
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14086
15117
|
function formatTooltipValue2(n) {
|
|
14087
15118
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
14088
15119
|
Math.round(n)
|
|
@@ -14129,7 +15160,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14129
15160
|
},
|
|
14130
15161
|
tt?.bodyStyle
|
|
14131
15162
|
);
|
|
14132
|
-
return /* @__PURE__ */ (0,
|
|
15163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14133
15164
|
"div",
|
|
14134
15165
|
{
|
|
14135
15166
|
style: {
|
|
@@ -14137,7 +15168,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14137
15168
|
minWidth: 160,
|
|
14138
15169
|
maxWidth: 280
|
|
14139
15170
|
},
|
|
14140
|
-
children: /* @__PURE__ */ (0,
|
|
15171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14141
15172
|
"div",
|
|
14142
15173
|
{
|
|
14143
15174
|
style: {
|
|
@@ -14148,7 +15179,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14148
15179
|
boxShadow: shadow
|
|
14149
15180
|
},
|
|
14150
15181
|
children: [
|
|
14151
|
-
/* @__PURE__ */ (0,
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14152
15183
|
"div",
|
|
14153
15184
|
{
|
|
14154
15185
|
style: {
|
|
@@ -14159,14 +15190,14 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14159
15190
|
"aria-hidden": true
|
|
14160
15191
|
}
|
|
14161
15192
|
),
|
|
14162
|
-
/* @__PURE__ */ (0,
|
|
14163
|
-
/* @__PURE__ */ (0,
|
|
14164
|
-
/* @__PURE__ */ (0,
|
|
14165
|
-
/* @__PURE__ */ (0,
|
|
15193
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: bodyStyle, children: [
|
|
15194
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: rowStyle, children: [
|
|
15195
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
15196
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
14166
15197
|
] }),
|
|
14167
|
-
/* @__PURE__ */ (0,
|
|
14168
|
-
/* @__PURE__ */ (0,
|
|
14169
|
-
/* @__PURE__ */ (0,
|
|
15198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
15200
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
|
|
14170
15201
|
] })
|
|
14171
15202
|
] })
|
|
14172
15203
|
]
|
|
@@ -14177,7 +15208,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14177
15208
|
}
|
|
14178
15209
|
|
|
14179
15210
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14180
|
-
var
|
|
15211
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
14181
15212
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
|
|
14182
15213
|
cartesianGridStroke: "#D3D6DF",
|
|
14183
15214
|
xAxisLineStroke: "#7566FC",
|
|
@@ -14189,7 +15220,7 @@ function toNum5(n) {
|
|
|
14189
15220
|
return typeof n === "number" ? n : Number(n);
|
|
14190
15221
|
}
|
|
14191
15222
|
function PeakBarTopLabel(props) {
|
|
14192
|
-
const { x, y, width, value, fill, fontSize, fontWeight } = props;
|
|
15223
|
+
const { x, y, width, value, fill, fontSize, fontWeight, angle = 0 } = props;
|
|
14193
15224
|
const nx = toNum5(x);
|
|
14194
15225
|
const ny = toNum5(y);
|
|
14195
15226
|
const nw = toNum5(width);
|
|
@@ -14202,7 +15233,8 @@ function PeakBarTopLabel(props) {
|
|
|
14202
15233
|
}
|
|
14203
15234
|
const cx = nx + nw / 2;
|
|
14204
15235
|
const cy = ny - 6;
|
|
14205
|
-
|
|
15236
|
+
const isHorizontal = angle === 0;
|
|
15237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14206
15238
|
"text",
|
|
14207
15239
|
{
|
|
14208
15240
|
x: cx,
|
|
@@ -14210,12 +15242,13 @@ function PeakBarTopLabel(props) {
|
|
|
14210
15242
|
fill,
|
|
14211
15243
|
fontSize,
|
|
14212
15244
|
fontWeight,
|
|
14213
|
-
textAnchor: "middle",
|
|
15245
|
+
textAnchor: isHorizontal ? "middle" : "start",
|
|
15246
|
+
transform: isHorizontal ? void 0 : `rotate(${angle} ${cx} ${cy})`,
|
|
14214
15247
|
children: String(Math.round(n))
|
|
14215
15248
|
}
|
|
14216
15249
|
);
|
|
14217
15250
|
}
|
|
14218
|
-
function
|
|
15251
|
+
function BarPlot2({
|
|
14219
15252
|
data,
|
|
14220
15253
|
yAxisDomain,
|
|
14221
15254
|
yAxisTicks,
|
|
@@ -14225,7 +15258,8 @@ function BarPlot({
|
|
|
14225
15258
|
yAxisTickDx = -6,
|
|
14226
15259
|
yAxisTickStyle,
|
|
14227
15260
|
xAxisTickDx = 0,
|
|
14228
|
-
xAxisTickStyle
|
|
15261
|
+
xAxisTickStyle,
|
|
15262
|
+
barValueLabelAngle = 0
|
|
14229
15263
|
}) {
|
|
14230
15264
|
const { barChart: bc } = usePeakBillingHoursCustomization();
|
|
14231
15265
|
const height = bc?.heightPx ?? 320;
|
|
@@ -14253,24 +15287,24 @@ function BarPlot({
|
|
|
14253
15287
|
barRadius,
|
|
14254
15288
|
barRadius
|
|
14255
15289
|
];
|
|
14256
|
-
return /* @__PURE__ */ (0,
|
|
14257
|
-
|
|
15290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Box22.default, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts11.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
15291
|
+
import_recharts11.BarChart,
|
|
14258
15292
|
{
|
|
14259
15293
|
data,
|
|
14260
15294
|
margin: m,
|
|
14261
15295
|
barCategoryGap: categoryGap,
|
|
14262
15296
|
barGap,
|
|
14263
15297
|
children: [
|
|
14264
|
-
/* @__PURE__ */ (0,
|
|
14265
|
-
|
|
15298
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15299
|
+
import_recharts11.CartesianGrid,
|
|
14266
15300
|
{
|
|
14267
15301
|
strokeDasharray: dash,
|
|
14268
15302
|
vertical: false,
|
|
14269
15303
|
stroke: gridStroke
|
|
14270
15304
|
}
|
|
14271
15305
|
),
|
|
14272
|
-
/* @__PURE__ */ (0,
|
|
14273
|
-
|
|
15306
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15307
|
+
import_recharts11.XAxis,
|
|
14274
15308
|
{
|
|
14275
15309
|
dataKey: "label",
|
|
14276
15310
|
dx: xAxisTickDx,
|
|
@@ -14283,8 +15317,8 @@ function BarPlot({
|
|
|
14283
15317
|
height: 36
|
|
14284
15318
|
}
|
|
14285
15319
|
),
|
|
14286
|
-
/* @__PURE__ */ (0,
|
|
14287
|
-
|
|
15320
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15321
|
+
import_recharts11.YAxis,
|
|
14288
15322
|
{
|
|
14289
15323
|
domain: yAxisDomain,
|
|
14290
15324
|
ticks: yAxisTicks,
|
|
@@ -14295,8 +15329,8 @@ function BarPlot({
|
|
|
14295
15329
|
width: yWidth
|
|
14296
15330
|
}
|
|
14297
15331
|
),
|
|
14298
|
-
/* @__PURE__ */ (0,
|
|
14299
|
-
|
|
15332
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15333
|
+
import_recharts11.Tooltip,
|
|
14300
15334
|
{
|
|
14301
15335
|
content: (tooltipProps) => {
|
|
14302
15336
|
if (renderTooltip) {
|
|
@@ -14305,9 +15339,9 @@ function BarPlot({
|
|
|
14305
15339
|
data,
|
|
14306
15340
|
activeTabId
|
|
14307
15341
|
});
|
|
14308
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
15342
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: customTooltip });
|
|
14309
15343
|
}
|
|
14310
|
-
return /* @__PURE__ */ (0,
|
|
15344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PeakBillingHoursTooltip, { ...tooltipProps });
|
|
14311
15345
|
},
|
|
14312
15346
|
cursor: {
|
|
14313
15347
|
fill: hoverBandFill,
|
|
@@ -14317,8 +15351,8 @@ function BarPlot({
|
|
|
14317
15351
|
allowEscapeViewBox: { x: false, y: true }
|
|
14318
15352
|
}
|
|
14319
15353
|
),
|
|
14320
|
-
/* @__PURE__ */ (0,
|
|
14321
|
-
|
|
15354
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15355
|
+
import_recharts11.Bar,
|
|
14322
15356
|
{
|
|
14323
15357
|
dataKey: "value",
|
|
14324
15358
|
name: "Visits",
|
|
@@ -14326,17 +15360,18 @@ function BarPlot({
|
|
|
14326
15360
|
radius: radiusTuple,
|
|
14327
15361
|
isAnimationActive: false,
|
|
14328
15362
|
maxBarSize: 48,
|
|
14329
|
-
children: /* @__PURE__ */ (0,
|
|
14330
|
-
|
|
15363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15364
|
+
import_recharts11.LabelList,
|
|
14331
15365
|
{
|
|
14332
15366
|
dataKey: "value",
|
|
14333
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
15367
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14334
15368
|
PeakBarTopLabel,
|
|
14335
15369
|
{
|
|
14336
15370
|
...props,
|
|
14337
15371
|
fill: labelFill,
|
|
14338
15372
|
fontSize: labelFs,
|
|
14339
|
-
fontWeight: 500
|
|
15373
|
+
fontWeight: 500,
|
|
15374
|
+
angle: barValueLabelAngle
|
|
14340
15375
|
}
|
|
14341
15376
|
)
|
|
14342
15377
|
}
|
|
@@ -14361,6 +15396,7 @@ function PeakBillingHours({
|
|
|
14361
15396
|
yAxisTickStyle,
|
|
14362
15397
|
xAxisTickDx = 0,
|
|
14363
15398
|
xAxisTickStyle,
|
|
15399
|
+
barValueLabelAngle = 0,
|
|
14364
15400
|
yAxisDomain = [0, 50],
|
|
14365
15401
|
yAxisTicks = [0, 10, 20, 30, 40, 50],
|
|
14366
15402
|
infoPopover,
|
|
@@ -14368,7 +15404,7 @@ function PeakBillingHours({
|
|
|
14368
15404
|
emptyStatePlaceholderProps,
|
|
14369
15405
|
customization
|
|
14370
15406
|
}) {
|
|
14371
|
-
const chartData =
|
|
15407
|
+
const chartData = React28.useMemo(() => {
|
|
14372
15408
|
if (seriesByTabId) {
|
|
14373
15409
|
return seriesByTabId[activeTabId] ?? [];
|
|
14374
15410
|
}
|
|
@@ -14403,9 +15439,9 @@ function PeakBillingHours({
|
|
|
14403
15439
|
},
|
|
14404
15440
|
customization?.header?.subtitleSx
|
|
14405
15441
|
);
|
|
14406
|
-
return /* @__PURE__ */ (0,
|
|
14407
|
-
/* @__PURE__ */ (0,
|
|
14408
|
-
|
|
15442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PeakBillingHoursCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Card4.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_CardContent4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_Stack21.default, { spacing: 1.75, sx: { width: "100%" }, children: [
|
|
15443
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
15444
|
+
import_Stack21.default,
|
|
14409
15445
|
{
|
|
14410
15446
|
direction: "row",
|
|
14411
15447
|
alignItems: "flex-start",
|
|
@@ -14413,20 +15449,20 @@ function PeakBillingHours({
|
|
|
14413
15449
|
gap: 2,
|
|
14414
15450
|
flexWrap: "wrap",
|
|
14415
15451
|
children: [
|
|
14416
|
-
/* @__PURE__ */ (0,
|
|
14417
|
-
/* @__PURE__ */ (0,
|
|
14418
|
-
/* @__PURE__ */ (0,
|
|
15452
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_Box22.default, { component: "div", sx: { minWidth: 0 }, children: [
|
|
15453
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: titleSx, children: title }),
|
|
15454
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: subtitleSx, children: subtitle })
|
|
14419
15455
|
] }),
|
|
14420
|
-
/* @__PURE__ */ (0,
|
|
14421
|
-
|
|
15456
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15457
|
+
import_Stack21.default,
|
|
14422
15458
|
{
|
|
14423
15459
|
direction: "row",
|
|
14424
15460
|
alignItems: "center",
|
|
14425
15461
|
spacing: 1.5,
|
|
14426
15462
|
sx: { flexShrink: 0 },
|
|
14427
|
-
children: resolvedInfo ? /* @__PURE__ */ (0,
|
|
14428
|
-
/* @__PURE__ */ (0,
|
|
14429
|
-
/* @__PURE__ */ (0,
|
|
15463
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
15464
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
15465
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14430
15466
|
ChartWidgetInfoButton,
|
|
14431
15467
|
{
|
|
14432
15468
|
popover: resolvedInfo,
|
|
@@ -14439,7 +15475,7 @@ function PeakBillingHours({
|
|
|
14439
15475
|
]
|
|
14440
15476
|
}
|
|
14441
15477
|
),
|
|
14442
|
-
/* @__PURE__ */ (0,
|
|
15478
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14443
15479
|
ChartWidgetSegmentedTabs,
|
|
14444
15480
|
{
|
|
14445
15481
|
tabs,
|
|
@@ -14459,8 +15495,8 @@ function PeakBillingHours({
|
|
|
14459
15495
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
14460
15496
|
}
|
|
14461
15497
|
),
|
|
14462
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
14463
|
-
|
|
15498
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Skeleton7.default, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15499
|
+
BarPlot2,
|
|
14464
15500
|
{
|
|
14465
15501
|
data: chartData,
|
|
14466
15502
|
yAxisDomain,
|
|
@@ -14471,9 +15507,10 @@ function PeakBillingHours({
|
|
|
14471
15507
|
yAxisTickDx,
|
|
14472
15508
|
yAxisTickStyle,
|
|
14473
15509
|
xAxisTickDx,
|
|
14474
|
-
xAxisTickStyle
|
|
15510
|
+
xAxisTickStyle,
|
|
15511
|
+
barValueLabelAngle
|
|
14475
15512
|
}
|
|
14476
|
-
) : /* @__PURE__ */ (0,
|
|
15513
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14477
15514
|
ChartEmptyState,
|
|
14478
15515
|
{
|
|
14479
15516
|
minHeight: 320,
|
|
@@ -14484,10 +15521,10 @@ function PeakBillingHours({
|
|
|
14484
15521
|
}
|
|
14485
15522
|
|
|
14486
15523
|
// src/components/widgets/CustomerJourneyAnalysis/CustomerJourneyAnalysis.tsx
|
|
14487
|
-
var
|
|
14488
|
-
var
|
|
14489
|
-
var
|
|
14490
|
-
var
|
|
15524
|
+
var import_Box23 = __toESM(require("@mui/material/Box"));
|
|
15525
|
+
var import_Stack22 = __toESM(require("@mui/material/Stack"));
|
|
15526
|
+
var import_Typography21 = __toESM(require("@mui/material/Typography"));
|
|
15527
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
14491
15528
|
var DEFAULT_WALK_INS_BG = "#5B8DEF";
|
|
14492
15529
|
var DEFAULT_TRIAL_VISITS_BG = "#F59E42";
|
|
14493
15530
|
var DEFAULT_BILLING_VISITS_BG = "#6EBE7A";
|
|
@@ -14535,7 +15572,7 @@ function resolveMetricConfig(shared, perCard, props) {
|
|
|
14535
15572
|
sx: perCard?.sx ?? shared?.sx
|
|
14536
15573
|
};
|
|
14537
15574
|
}
|
|
14538
|
-
function
|
|
15575
|
+
function mergeSx5(...items) {
|
|
14539
15576
|
return items.flatMap(
|
|
14540
15577
|
(item) => Array.isArray(item) ? item : item ? [item] : []
|
|
14541
15578
|
);
|
|
@@ -14551,6 +15588,7 @@ function CustomerJourneyAnalysis({
|
|
|
14551
15588
|
avgBillingPerTrial,
|
|
14552
15589
|
// Labels
|
|
14553
15590
|
title = "Customer Journey Analysis",
|
|
15591
|
+
hideTitle = false,
|
|
14554
15592
|
titleFontSize,
|
|
14555
15593
|
titleFontWeight = 700,
|
|
14556
15594
|
titleColor = "#0f172a",
|
|
@@ -14741,17 +15779,17 @@ function CustomerJourneyAnalysis({
|
|
|
14741
15779
|
...Array.isArray(metricsSx) ? metricsSx : metricsSx ? [metricsSx] : []
|
|
14742
15780
|
];
|
|
14743
15781
|
const bodyDirection = { xs: "column", [bodyBreakpoint]: "row" };
|
|
14744
|
-
return /* @__PURE__ */ (0,
|
|
14745
|
-
/* @__PURE__ */ (0,
|
|
14746
|
-
|
|
15782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: outerSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Stack22.default, { spacing: 2, children: [
|
|
15783
|
+
!hideTitle && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15784
|
+
import_Stack22.default,
|
|
14747
15785
|
{
|
|
14748
15786
|
direction: "row",
|
|
14749
15787
|
alignItems: "flex-start",
|
|
14750
15788
|
justifyContent: "space-between",
|
|
14751
15789
|
gap: 2,
|
|
14752
15790
|
children: [
|
|
14753
|
-
/* @__PURE__ */ (0,
|
|
14754
|
-
|
|
15791
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15792
|
+
import_Typography21.default,
|
|
14755
15793
|
{
|
|
14756
15794
|
component: "h2",
|
|
14757
15795
|
variant: "h6",
|
|
@@ -14764,8 +15802,8 @@ function CustomerJourneyAnalysis({
|
|
|
14764
15802
|
children: title
|
|
14765
15803
|
}
|
|
14766
15804
|
),
|
|
14767
|
-
headerActions != null ? /* @__PURE__ */ (0,
|
|
14768
|
-
|
|
15805
|
+
headerActions != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15806
|
+
import_Box23.default,
|
|
14769
15807
|
{
|
|
14770
15808
|
sx: {
|
|
14771
15809
|
flexShrink: 0,
|
|
@@ -14779,9 +15817,9 @@ function CustomerJourneyAnalysis({
|
|
|
14779
15817
|
]
|
|
14780
15818
|
}
|
|
14781
15819
|
),
|
|
14782
|
-
/* @__PURE__ */ (0,
|
|
14783
|
-
/* @__PURE__ */ (0,
|
|
14784
|
-
/* @__PURE__ */ (0,
|
|
15820
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Stack22.default, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
|
|
15821
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: stripSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Box23.default, { sx: statCardsRowSx, children: [
|
|
15822
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14785
15823
|
JourneyStatCard,
|
|
14786
15824
|
{
|
|
14787
15825
|
icon: wiConfig.icon,
|
|
@@ -14802,7 +15840,7 @@ function CustomerJourneyAnalysis({
|
|
|
14802
15840
|
borderRadius: wiConfig.borderRadius,
|
|
14803
15841
|
minHeight: wiConfig.minHeight,
|
|
14804
15842
|
isLoading,
|
|
14805
|
-
sx:
|
|
15843
|
+
sx: mergeSx5(
|
|
14806
15844
|
{
|
|
14807
15845
|
flex: statCardFlexes[0],
|
|
14808
15846
|
borderRadius: `${statStripInnerBorderRadius} 0 0 ${statStripInnerBorderRadius}`
|
|
@@ -14811,7 +15849,7 @@ function CustomerJourneyAnalysis({
|
|
|
14811
15849
|
)
|
|
14812
15850
|
}
|
|
14813
15851
|
),
|
|
14814
|
-
/* @__PURE__ */ (0,
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14815
15853
|
JourneyStatCard,
|
|
14816
15854
|
{
|
|
14817
15855
|
icon: tvConfig.icon,
|
|
@@ -14832,10 +15870,10 @@ function CustomerJourneyAnalysis({
|
|
|
14832
15870
|
borderRadius: tvConfig.borderRadius,
|
|
14833
15871
|
minHeight: tvConfig.minHeight,
|
|
14834
15872
|
isLoading,
|
|
14835
|
-
sx:
|
|
15873
|
+
sx: mergeSx5({ flex: statCardFlexes[1] }, tvConfig.sx)
|
|
14836
15874
|
}
|
|
14837
15875
|
),
|
|
14838
|
-
/* @__PURE__ */ (0,
|
|
15876
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14839
15877
|
JourneyStatCard,
|
|
14840
15878
|
{
|
|
14841
15879
|
icon: bvConfig.icon,
|
|
@@ -14856,7 +15894,7 @@ function CustomerJourneyAnalysis({
|
|
|
14856
15894
|
borderRadius: bvConfig.borderRadius,
|
|
14857
15895
|
minHeight: bvConfig.minHeight,
|
|
14858
15896
|
isLoading,
|
|
14859
|
-
sx:
|
|
15897
|
+
sx: mergeSx5(
|
|
14860
15898
|
{
|
|
14861
15899
|
flex: statCardFlexes[2],
|
|
14862
15900
|
borderRadius: `0 ${statStripInnerBorderRadius} ${statStripInnerBorderRadius} 0`
|
|
@@ -14866,8 +15904,8 @@ function CustomerJourneyAnalysis({
|
|
|
14866
15904
|
}
|
|
14867
15905
|
)
|
|
14868
15906
|
] }) }),
|
|
14869
|
-
/* @__PURE__ */ (0,
|
|
14870
|
-
|
|
15907
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: metricsBoxSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15908
|
+
import_Box23.default,
|
|
14871
15909
|
{
|
|
14872
15910
|
sx: {
|
|
14873
15911
|
display: "grid",
|
|
@@ -14900,8 +15938,8 @@ function CustomerJourneyAnalysis({
|
|
|
14900
15938
|
label: avgBillingPerTrialLabel,
|
|
14901
15939
|
value: formatAverage(avgBillingPerTrial)
|
|
14902
15940
|
}
|
|
14903
|
-
].map(({ cfg, label, value }) => /* @__PURE__ */ (0,
|
|
14904
|
-
|
|
15941
|
+
].map(({ cfg, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15942
|
+
import_Box23.default,
|
|
14905
15943
|
{
|
|
14906
15944
|
sx: {
|
|
14907
15945
|
bgcolor: metricsCardBg,
|
|
@@ -14910,7 +15948,7 @@ function CustomerJourneyAnalysis({
|
|
|
14910
15948
|
height: "100%",
|
|
14911
15949
|
minWidth: 0
|
|
14912
15950
|
},
|
|
14913
|
-
children: /* @__PURE__ */ (0,
|
|
15951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14914
15952
|
JourneyMetricCard,
|
|
14915
15953
|
{
|
|
14916
15954
|
label,
|
|
@@ -14941,7 +15979,7 @@ function CustomerJourneyAnalysis({
|
|
|
14941
15979
|
// src/components/FalconThemeProvider/FalconThemeProvider.tsx
|
|
14942
15980
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
14943
15981
|
var import_styles7 = require("@mui/material/styles");
|
|
14944
|
-
var
|
|
15982
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
14945
15983
|
var lightColor = "51, 48, 60";
|
|
14946
15984
|
var darkColor = "228, 230, 244";
|
|
14947
15985
|
var darkPaperBg = "#2F3349";
|
|
@@ -15021,8 +16059,8 @@ var FalconThemeProvider = ({
|
|
|
15021
16059
|
mixins: { toolbar: { minHeight: 64 } }
|
|
15022
16060
|
})
|
|
15023
16061
|
);
|
|
15024
|
-
return /* @__PURE__ */ (0,
|
|
15025
|
-
/* @__PURE__ */ (0,
|
|
16062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_styles7.ThemeProvider, { theme, children: [
|
|
16063
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_CssBaseline.default, {}),
|
|
15026
16064
|
children
|
|
15027
16065
|
] });
|
|
15028
16066
|
};
|
|
@@ -15046,6 +16084,7 @@ var FalconThemeProvider = ({
|
|
|
15046
16084
|
DEFAULT_FOOTFALL_TILE_ICONS,
|
|
15047
16085
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
15048
16086
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
16087
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
15049
16088
|
FalconAuditTimeline,
|
|
15050
16089
|
FalconButton,
|
|
15051
16090
|
FalconDIstrictFilter,
|
|
@@ -15084,6 +16123,17 @@ var FalconThemeProvider = ({
|
|
|
15084
16123
|
QueueTimeBreakdownStackedBar,
|
|
15085
16124
|
QueueTimePeriodFilter,
|
|
15086
16125
|
RankedBarList,
|
|
16126
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
16127
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
16128
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
16129
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
16130
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
16131
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
16132
|
+
STORE_PERFORMANCE_DEFAULT_DATA,
|
|
16133
|
+
StackedComparisonBarChart,
|
|
16134
|
+
StackedComparisonBarChartCustomizationProvider,
|
|
16135
|
+
StackedComparisonBarChartTooltip,
|
|
16136
|
+
StorePerformanceByAssist,
|
|
15087
16137
|
TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
15088
16138
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
15089
16139
|
TimePeriodFilter,
|
|
@@ -15115,9 +16165,12 @@ var FalconThemeProvider = ({
|
|
|
15115
16165
|
peakBillingHoursVisitsMock,
|
|
15116
16166
|
preprocessData,
|
|
15117
16167
|
skipSingleBranchLevels,
|
|
16168
|
+
stackedComparisonMergeCss,
|
|
16169
|
+
stackedComparisonMergeSx,
|
|
15118
16170
|
toRechartsTreemapData,
|
|
15119
16171
|
useBillingCounterAnalyticsCustomization,
|
|
15120
16172
|
usePeakBillingHoursCustomization,
|
|
15121
|
-
useQueueTimeBreakdownCustomization
|
|
16173
|
+
useQueueTimeBreakdownCustomization,
|
|
16174
|
+
useStackedComparisonBarChartCustomization
|
|
15122
16175
|
});
|
|
15123
16176
|
//# sourceMappingURL=index.js.map
|