@bpfdev/oly-ui 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +339 -6
- package/dist/index.d.ts +339 -6
- package/dist/index.js +1516 -485
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1552 -528
- 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
|
|
|
@@ -782,7 +797,12 @@ function InfoPopoverPanel({
|
|
|
782
797
|
placement,
|
|
783
798
|
compact
|
|
784
799
|
}) {
|
|
785
|
-
const
|
|
800
|
+
const hasTitle = typeof content.title === "string" && content.title.trim() !== "";
|
|
801
|
+
const hasDescription = typeof content.description === "string" && content.description.trim() !== "";
|
|
802
|
+
const hasBullets = content.helpBullets.length > 0;
|
|
803
|
+
const hasExplicitHelpTitle = typeof content.helpTitle === "string" && content.helpTitle.trim() !== "";
|
|
804
|
+
const showHelpSection = hasBullets || hasExplicitHelpTitle;
|
|
805
|
+
const helpTitle = hasExplicitHelpTitle ? content.helpTitle : "How does it help?";
|
|
786
806
|
const border = isDark ? popperBorderDark : popperBorder;
|
|
787
807
|
const paperBg = isDark ? "#1c2128" : "#fff";
|
|
788
808
|
const textPrimary = isDark ? "#f0f6fc" : "#1a1a1a";
|
|
@@ -810,7 +830,7 @@ function InfoPopoverPanel({
|
|
|
810
830
|
boxShadow: panelShadow
|
|
811
831
|
},
|
|
812
832
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_Stack.default, { spacing: stackSpacing, sx: { position: "relative", zIndex: 1 }, children: [
|
|
813
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
833
|
+
hasTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
814
834
|
import_Typography.default,
|
|
815
835
|
{
|
|
816
836
|
component: "h3",
|
|
@@ -823,7 +843,7 @@ function InfoPopoverPanel({
|
|
|
823
843
|
children: content.title
|
|
824
844
|
}
|
|
825
845
|
),
|
|
826
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
846
|
+
hasDescription && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
827
847
|
import_Typography.default,
|
|
828
848
|
{
|
|
829
849
|
sx: {
|
|
@@ -834,7 +854,7 @@ function InfoPopoverPanel({
|
|
|
834
854
|
children: content.description
|
|
835
855
|
}
|
|
836
856
|
),
|
|
837
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
857
|
+
showHelpSection && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
838
858
|
import_Typography.default,
|
|
839
859
|
{
|
|
840
860
|
sx: {
|
|
@@ -847,7 +867,7 @@ function InfoPopoverPanel({
|
|
|
847
867
|
children: helpTitle
|
|
848
868
|
}
|
|
849
869
|
),
|
|
850
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
870
|
+
hasBullets && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
851
871
|
import_Box2.default,
|
|
852
872
|
{
|
|
853
873
|
component: "ul",
|
|
@@ -4015,7 +4035,7 @@ var FalconAuditTimeline = ({
|
|
|
4015
4035
|
date: run.date,
|
|
4016
4036
|
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
4017
4037
|
status: run.status === "done" ? "completed" : "upcoming",
|
|
4018
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
4038
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date, run) : void 0,
|
|
4019
4039
|
brandFont,
|
|
4020
4040
|
interFont,
|
|
4021
4041
|
completedColor,
|
|
@@ -4053,7 +4073,16 @@ var FalconAuditTimeline = ({
|
|
|
4053
4073
|
date: `${activeMonth.label} 5`,
|
|
4054
4074
|
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
4055
4075
|
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
4056
|
-
onExportClick: onExportReportClick ? (e) =>
|
|
4076
|
+
onExportClick: onExportReportClick ? (e) => {
|
|
4077
|
+
const date = `${activeMonth.label} 5`;
|
|
4078
|
+
onExportReportClick(e, date, {
|
|
4079
|
+
run_number: precedingEvents + 1,
|
|
4080
|
+
date,
|
|
4081
|
+
month: activeMonth.label,
|
|
4082
|
+
year: activeMonth.year,
|
|
4083
|
+
status: isFirstActiveMonth ? "done" : "scheduled"
|
|
4084
|
+
});
|
|
4085
|
+
} : void 0,
|
|
4057
4086
|
brandFont,
|
|
4058
4087
|
interFont,
|
|
4059
4088
|
completedColor,
|
|
@@ -11001,6 +11030,10 @@ function LinePlot({
|
|
|
11001
11030
|
left: lc?.margin?.left ?? 4
|
|
11002
11031
|
};
|
|
11003
11032
|
const xFill = lc?.xAxisTickFill ?? OLY_DEFAULT_CHART_AXIS_TICK_FILL;
|
|
11033
|
+
const xTickAngle = lc?.xAxisTickAngle ?? 0;
|
|
11034
|
+
const xTickStyle = lc?.xAxisTickStyle;
|
|
11035
|
+
const xAxisHeight = lc?.xAxisHeight ?? 40;
|
|
11036
|
+
const xTickAnchor = xTickAngle < 0 ? "end" : xTickAngle > 0 ? "start" : "middle";
|
|
11004
11037
|
const yFill = lc?.yAxisTickFill ?? OLY_DEFAULT_CHART_AXIS_TICK_FILL;
|
|
11005
11038
|
const yWidth = lc?.yAxisWidth ?? 36;
|
|
11006
11039
|
const cursorStroke = lc?.cursorStroke ?? "#9CA3AF";
|
|
@@ -11019,13 +11052,15 @@ function LinePlot({
|
|
|
11019
11052
|
import_recharts6.XAxis,
|
|
11020
11053
|
{
|
|
11021
11054
|
dataKey: "label",
|
|
11022
|
-
tick: { fill: xFill, fontSize: 11 },
|
|
11055
|
+
tick: { fill: xFill, fontSize: 11, style: xTickStyle },
|
|
11023
11056
|
tickLine: false,
|
|
11024
11057
|
axisLine: {
|
|
11025
11058
|
stroke: OLY_DEFAULT_COMPOSED_CHART_CHROME5.axisTickLineStroke
|
|
11026
11059
|
},
|
|
11027
11060
|
interval: 0,
|
|
11028
|
-
height:
|
|
11061
|
+
height: xAxisHeight,
|
|
11062
|
+
angle: xTickAngle,
|
|
11063
|
+
textAnchor: xTickAnchor
|
|
11029
11064
|
}
|
|
11030
11065
|
),
|
|
11031
11066
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -11305,6 +11340,7 @@ var QueueTimeBreakdownArea = ({
|
|
|
11305
11340
|
() => mergeAreaData(series, xAxis),
|
|
11306
11341
|
[series, xAxis]
|
|
11307
11342
|
);
|
|
11343
|
+
const fill = ac?.fillHeight ?? false;
|
|
11308
11344
|
const stackH = ac?.stackHeightPx ?? 330;
|
|
11309
11345
|
const chartH = ac?.chartHeightPx ?? 350;
|
|
11310
11346
|
const margin = React20.useMemo(
|
|
@@ -11324,90 +11360,102 @@ var QueueTimeBreakdownArea = ({
|
|
|
11324
11360
|
}, [chartData, series]);
|
|
11325
11361
|
const yDomain = allZero ? [0, 16e3] : [0, "auto"];
|
|
11326
11362
|
const yTickCount = allZero ? 5 : void 0;
|
|
11327
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
import_recharts7.
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
),
|
|
11345
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11346
|
-
import_recharts7.YAxis,
|
|
11347
|
-
{
|
|
11348
|
-
domain: yDomain,
|
|
11349
|
-
tickCount: yTickCount,
|
|
11350
|
-
tick: { fill: theme.palette.text.secondary, fontSize: 11 },
|
|
11351
|
-
axisLine: false,
|
|
11352
|
-
tickLine: false,
|
|
11353
|
-
tickFormatter: (v) => {
|
|
11354
|
-
const n = typeof v === "number" ? v : Number(v);
|
|
11355
|
-
const safe = Number.isFinite(n) ? n : 0;
|
|
11356
|
-
return safe > 1e3 ? `${Math.ceil(safe / 1e3)}k` : String(safe);
|
|
11357
|
-
},
|
|
11358
|
-
label: {
|
|
11359
|
-
value: yLabel,
|
|
11360
|
-
angle: -90,
|
|
11361
|
-
position: "insideLeft",
|
|
11362
|
-
style: { fill: theme.palette.text.secondary, fontSize: 11 }
|
|
11363
|
-
}
|
|
11364
|
-
}
|
|
11365
|
-
),
|
|
11366
|
-
series.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11367
|
-
import_recharts7.Area,
|
|
11368
|
-
{
|
|
11369
|
-
type: "monotone",
|
|
11370
|
-
dataKey: s.name,
|
|
11371
|
-
stackId: "queueArea",
|
|
11372
|
-
stroke: palette[i % palette.length],
|
|
11373
|
-
fill: palette[i % palette.length],
|
|
11374
|
-
fillOpacity: 1,
|
|
11375
|
-
strokeWidth: 0
|
|
11376
|
-
},
|
|
11377
|
-
s.name
|
|
11378
|
-
)),
|
|
11379
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11380
|
-
import_recharts7.Tooltip,
|
|
11381
|
-
{
|
|
11382
|
-
content: (tooltipProps) => {
|
|
11383
|
-
if (renderTooltip) {
|
|
11384
|
-
const custom = renderTooltip({
|
|
11385
|
-
tooltipProps,
|
|
11386
|
-
chartData,
|
|
11387
|
-
series,
|
|
11388
|
-
xAxis
|
|
11389
|
-
});
|
|
11390
|
-
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: custom });
|
|
11363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11364
|
+
import_material18.Stack,
|
|
11365
|
+
{
|
|
11366
|
+
justifyContent: fill ? "stretch" : "center",
|
|
11367
|
+
sx: fill ? {
|
|
11368
|
+
flexGrow: 1,
|
|
11369
|
+
minHeight: 0,
|
|
11370
|
+
height: "100%",
|
|
11371
|
+
"& > *": { flex: 1, minHeight: 0 }
|
|
11372
|
+
} : { height: stackH },
|
|
11373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_recharts7.ResponsiveContainer, { width: "100%", height: fill ? "100%" : chartH, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_recharts7.AreaChart, { data: chartData, margin, children: [
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11375
|
+
import_recharts7.CartesianGrid,
|
|
11376
|
+
{
|
|
11377
|
+
strokeDasharray: "3 3",
|
|
11378
|
+
stroke: gridStroke,
|
|
11379
|
+
vertical: false
|
|
11391
11380
|
}
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11381
|
+
),
|
|
11382
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11383
|
+
import_recharts7.XAxis,
|
|
11384
|
+
{
|
|
11385
|
+
dataKey: "name",
|
|
11386
|
+
tick: { fill: theme.palette.text.secondary, fontSize: 11 },
|
|
11387
|
+
axisLine: false,
|
|
11388
|
+
tickLine: false
|
|
11389
|
+
}
|
|
11390
|
+
),
|
|
11391
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11392
|
+
import_recharts7.YAxis,
|
|
11393
|
+
{
|
|
11394
|
+
domain: yDomain,
|
|
11395
|
+
tickCount: yTickCount,
|
|
11396
|
+
tick: { fill: theme.palette.text.secondary, fontSize: 11 },
|
|
11397
|
+
axisLine: false,
|
|
11398
|
+
tickLine: false,
|
|
11399
|
+
tickFormatter: (v) => {
|
|
11400
|
+
const n = typeof v === "number" ? v : Number(v);
|
|
11401
|
+
const safe = Number.isFinite(n) ? n : 0;
|
|
11402
|
+
return safe > 1e3 ? `${Math.ceil(safe / 1e3)}k` : String(safe);
|
|
11403
|
+
},
|
|
11404
|
+
label: {
|
|
11405
|
+
value: yLabel,
|
|
11406
|
+
angle: -90,
|
|
11407
|
+
position: "insideLeft",
|
|
11408
|
+
style: { fill: theme.palette.text.secondary, fontSize: 11 }
|
|
11400
11409
|
}
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11410
|
+
}
|
|
11411
|
+
),
|
|
11412
|
+
series.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11413
|
+
import_recharts7.Area,
|
|
11414
|
+
{
|
|
11415
|
+
type: "monotone",
|
|
11416
|
+
dataKey: s.name,
|
|
11417
|
+
stackId: "queueArea",
|
|
11418
|
+
stroke: palette[i % palette.length],
|
|
11419
|
+
fill: palette[i % palette.length],
|
|
11420
|
+
fillOpacity: 1,
|
|
11421
|
+
strokeWidth: 0
|
|
11422
|
+
},
|
|
11423
|
+
s.name
|
|
11424
|
+
)),
|
|
11425
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11426
|
+
import_recharts7.Tooltip,
|
|
11427
|
+
{
|
|
11428
|
+
content: (tooltipProps) => {
|
|
11429
|
+
if (renderTooltip) {
|
|
11430
|
+
const custom = renderTooltip({
|
|
11431
|
+
tooltipProps,
|
|
11432
|
+
chartData,
|
|
11433
|
+
series,
|
|
11434
|
+
xAxis
|
|
11435
|
+
});
|
|
11436
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: custom });
|
|
11437
|
+
}
|
|
11438
|
+
const { active, payload, label } = tooltipProps;
|
|
11439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11440
|
+
QueueTimeBreakdownAreaTooltip,
|
|
11441
|
+
{
|
|
11442
|
+
active,
|
|
11443
|
+
label,
|
|
11444
|
+
payload,
|
|
11445
|
+
styleOverrides: ac?.areaTooltip
|
|
11446
|
+
}
|
|
11447
|
+
);
|
|
11448
|
+
},
|
|
11449
|
+
cursor: {
|
|
11450
|
+
stroke: ac?.cursorStroke ?? "#D4D4D8",
|
|
11451
|
+
strokeWidth: ac?.cursorStrokeWidth ?? 1
|
|
11452
|
+
},
|
|
11453
|
+
wrapperStyle: { outline: "none" }
|
|
11454
|
+
}
|
|
11455
|
+
)
|
|
11456
|
+
] }) })
|
|
11457
|
+
}
|
|
11458
|
+
);
|
|
11411
11459
|
};
|
|
11412
11460
|
var QueueTimeBreakdownArea_default = QueueTimeBreakdownArea;
|
|
11413
11461
|
var xDays = [
|
|
@@ -11588,10 +11636,10 @@ function DonutInnerPercentLabel(props) {
|
|
|
11588
11636
|
);
|
|
11589
11637
|
}
|
|
11590
11638
|
var DEFAULT_LABELS = [
|
|
11591
|
-
"
|
|
11592
|
-
"
|
|
11593
|
-
"
|
|
11594
|
-
"
|
|
11639
|
+
"1-15 mins",
|
|
11640
|
+
"16-30 mins",
|
|
11641
|
+
"30-45 mins",
|
|
11642
|
+
"> 45 mins"
|
|
11595
11643
|
];
|
|
11596
11644
|
function QueueTimeBreakdownDonut({
|
|
11597
11645
|
chartFilter,
|
|
@@ -11611,8 +11659,9 @@ function QueueTimeBreakdownDonut({
|
|
|
11611
11659
|
const padAngle = dn?.paddingAngle ?? 0;
|
|
11612
11660
|
const chartH = dn?.chartHeightPx ?? 220;
|
|
11613
11661
|
const pieData = React21.useMemo(() => {
|
|
11614
|
-
|
|
11615
|
-
|
|
11662
|
+
const count = Math.max(averageData.length, labels.length);
|
|
11663
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
11664
|
+
name: labels[i] ?? `Bucket ${i + 1}`,
|
|
11616
11665
|
value: Math.max(0, averageData[i] ?? 0)
|
|
11617
11666
|
}));
|
|
11618
11667
|
}, [averageData, labels]);
|
|
@@ -12095,6 +12144,9 @@ function QueueTimeBreakdown({
|
|
|
12095
12144
|
data,
|
|
12096
12145
|
Donut_data,
|
|
12097
12146
|
donutYesterdayData,
|
|
12147
|
+
donutLabels,
|
|
12148
|
+
areaSeries,
|
|
12149
|
+
areaXAxis,
|
|
12098
12150
|
headerImageSrc,
|
|
12099
12151
|
headlineTotal = "14,123",
|
|
12100
12152
|
headlineSubtitle = "Queue Time Breakdown Of All Visitors",
|
|
@@ -12119,6 +12171,12 @@ function QueueTimeBreakdown({
|
|
|
12119
12171
|
() => data.some((row) => row.data.some((seg) => (seg.data[0] ?? 0) > 0)),
|
|
12120
12172
|
[data]
|
|
12121
12173
|
);
|
|
12174
|
+
const areaProvided = areaSeries !== void 0;
|
|
12175
|
+
const resolvedAreaSeries = areaSeries !== void 0 ? areaSeries : getQueueTimeBreakdownAreaSeriesData(filter);
|
|
12176
|
+
const resolvedAreaXAxis = areaProvided ? areaXAxis ?? [] : areaXAxis && areaXAxis.length > 0 ? areaXAxis : getQueueTimeBreakdownAreaXAxisData(filter);
|
|
12177
|
+
const hasAreaData = resolvedAreaXAxis.length > 0 && resolvedAreaSeries.some(
|
|
12178
|
+
(s) => s.data.some((v) => (typeof v === "number" ? v : 0) > 0)
|
|
12179
|
+
);
|
|
12122
12180
|
const palette = customization?.chartPalette && customization.chartPalette.length > 0 ? customization.chartPalette : QUEUE_CHART_COLORS;
|
|
12123
12181
|
const legend = queueBucketLegend ?? defaultBucketLegendFromPalette(palette);
|
|
12124
12182
|
const resolvedHeaderImageSrc = headerImageSrc === void 0 ? QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC : headerImageSrc;
|
|
@@ -12136,256 +12194,1211 @@ function QueueTimeBreakdown({
|
|
|
12136
12194
|
{ fontWeight: 700, color: "#0f172a" },
|
|
12137
12195
|
customization?.periodFilter?.titleSx
|
|
12138
12196
|
);
|
|
12139
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(QueueTimeBreakdownCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Card2.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_CardContent2.default, { sx: mergeSx2(customization?.rootCard?.cardContentSx), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
gap: 2,
|
|
12148
|
-
width: "100%",
|
|
12149
|
-
children: [
|
|
12150
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12151
|
-
import_Typography16.default,
|
|
12152
|
-
{
|
|
12153
|
-
variant: isSmallScreen ? "subtitle2" : "body1",
|
|
12154
|
-
sx: periodTitleSx,
|
|
12155
|
-
children: title
|
|
12156
|
-
}
|
|
12157
|
-
),
|
|
12158
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12159
|
-
TimePeriodFilter,
|
|
12160
|
-
{
|
|
12161
|
-
selectedFilter: filter,
|
|
12162
|
-
onFilterChange: setFilter,
|
|
12163
|
-
infoPopover: resolvedPeriodInfoPopover
|
|
12164
|
-
}
|
|
12165
|
-
)
|
|
12166
|
-
]
|
|
12167
|
-
}
|
|
12168
|
-
),
|
|
12169
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Box19.default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Grid.default, { container: true, spacing: 3, children: [
|
|
12170
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Grid.default, { size: { md: 6, xs: 12 }, children: [
|
|
12197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(QueueTimeBreakdownCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Card2.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_CardContent2.default, { sx: mergeSx2(customization?.rootCard?.cardContentSx), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12198
|
+
import_Stack17.default,
|
|
12199
|
+
{
|
|
12200
|
+
width: "100%",
|
|
12201
|
+
direction: "column",
|
|
12202
|
+
gap: 3,
|
|
12203
|
+
sx: mergeSx2({ mb: 4 }, customization?.rootCard?.contentStackSx),
|
|
12204
|
+
children: [
|
|
12171
12205
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12172
12206
|
import_Stack17.default,
|
|
12173
12207
|
{
|
|
12174
|
-
|
|
12175
|
-
|
|
12208
|
+
direction: "row",
|
|
12209
|
+
alignItems: "center",
|
|
12210
|
+
justifyContent: "space-between",
|
|
12211
|
+
flexWrap: "wrap",
|
|
12212
|
+
gap: 2,
|
|
12213
|
+
width: "100%",
|
|
12176
12214
|
children: [
|
|
12177
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12178
|
-
|
|
12215
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12216
|
+
import_Typography16.default,
|
|
12179
12217
|
{
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
alignItems: "center",
|
|
12184
|
-
children: [
|
|
12185
|
-
resolvedHeaderImageSrc ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12186
|
-
import_Box19.default,
|
|
12187
|
-
{
|
|
12188
|
-
component: "img",
|
|
12189
|
-
src: resolvedHeaderImageSrc,
|
|
12190
|
-
alt: "",
|
|
12191
|
-
width: 52,
|
|
12192
|
-
height: 52,
|
|
12193
|
-
sx: { objectFit: "contain" }
|
|
12194
|
-
}
|
|
12195
|
-
) : null,
|
|
12196
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Stack17.default, { children: [
|
|
12197
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12198
|
-
import_Typography16.default,
|
|
12199
|
-
{
|
|
12200
|
-
sx: mergeSx2(
|
|
12201
|
-
{
|
|
12202
|
-
fontSize: "20px",
|
|
12203
|
-
fontWeight: 600,
|
|
12204
|
-
color: "#222222"
|
|
12205
|
-
},
|
|
12206
|
-
customization?.header?.headlineSx
|
|
12207
|
-
),
|
|
12208
|
-
children: headlineTotal
|
|
12209
|
-
}
|
|
12210
|
-
),
|
|
12211
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Stack17.default, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
12212
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12213
|
-
import_Typography16.default,
|
|
12214
|
-
{
|
|
12215
|
-
sx: mergeSx2(
|
|
12216
|
-
{
|
|
12217
|
-
fontSize: "11px",
|
|
12218
|
-
fontWeight: 400,
|
|
12219
|
-
color: "#222222"
|
|
12220
|
-
},
|
|
12221
|
-
customization?.header?.subtitleSx
|
|
12222
|
-
),
|
|
12223
|
-
children: headlineSubtitle
|
|
12224
|
-
}
|
|
12225
|
-
),
|
|
12226
|
-
resolvedHeadlineInfoPopover ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12227
|
-
ChartWidgetInfoButton,
|
|
12228
|
-
{
|
|
12229
|
-
density: "compact",
|
|
12230
|
-
popover: resolvedHeadlineInfoPopover,
|
|
12231
|
-
ariaLabel: "Queue time breakdown information"
|
|
12232
|
-
}
|
|
12233
|
-
) : null
|
|
12234
|
-
] })
|
|
12235
|
-
] })
|
|
12236
|
-
]
|
|
12218
|
+
variant: isSmallScreen ? "subtitle2" : "body1",
|
|
12219
|
+
sx: periodTitleSx,
|
|
12220
|
+
children: title
|
|
12237
12221
|
}
|
|
12238
|
-
)
|
|
12222
|
+
),
|
|
12239
12223
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12240
|
-
|
|
12224
|
+
TimePeriodFilter,
|
|
12241
12225
|
{
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
{
|
|
12246
|
-
row: item,
|
|
12247
|
-
legendRows: legend,
|
|
12248
|
-
renderTooltip: renderStackedBarTooltip
|
|
12249
|
-
},
|
|
12250
|
-
item.name
|
|
12251
|
-
))
|
|
12226
|
+
selectedFilter: filter,
|
|
12227
|
+
onFilterChange: setFilter,
|
|
12228
|
+
infoPopover: resolvedPeriodInfoPopover
|
|
12252
12229
|
}
|
|
12253
12230
|
)
|
|
12254
12231
|
]
|
|
12255
12232
|
}
|
|
12256
12233
|
),
|
|
12257
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
sx: mergeSx2(
|
|
12261
|
-
{
|
|
12262
|
-
marginTop: "10px",
|
|
12263
|
-
fontSize: "14px",
|
|
12264
|
-
fontWeight: 500,
|
|
12265
|
-
color: "#222222"
|
|
12266
|
-
},
|
|
12267
|
-
customization?.dataComparison?.titleSx
|
|
12268
|
-
),
|
|
12269
|
-
children: dataComparisonTitle
|
|
12270
|
-
}
|
|
12271
|
-
),
|
|
12272
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12273
|
-
import_Card2.default,
|
|
12274
|
-
{
|
|
12275
|
-
elevation: 0,
|
|
12276
|
-
sx: mergeSx2(
|
|
12277
|
-
{
|
|
12278
|
-
cursor: "pointer",
|
|
12279
|
-
marginTop: "10px",
|
|
12280
|
-
bgcolor: "#FFFFFF",
|
|
12281
|
-
border: "1px solid #E5E7EB",
|
|
12282
|
-
borderRadius: 2
|
|
12283
|
-
},
|
|
12284
|
-
customization?.dataComparison?.cardSx
|
|
12285
|
-
),
|
|
12286
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_CardContent2.default, { sx: { padding: "4px 8px" }, children: hasComparisonData ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12234
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Box19.default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Grid.default, { container: true, spacing: 3, children: [
|
|
12235
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Grid.default, { size: { md: 6, xs: 12 }, children: [
|
|
12236
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12287
12237
|
import_Stack17.default,
|
|
12288
12238
|
{
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
alignItems: "center",
|
|
12239
|
+
gap: 1,
|
|
12240
|
+
sx: mergeSx2(customization?.leftColumn?.columnStackSx),
|
|
12292
12241
|
children: [
|
|
12293
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack17.default, {
|
|
12294
|
-
|
|
12242
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack17.default, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12243
|
+
import_Stack17.default,
|
|
12295
12244
|
{
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12245
|
+
direction: "row",
|
|
12246
|
+
gap: 4,
|
|
12247
|
+
justifyContent: "start",
|
|
12248
|
+
alignItems: "center",
|
|
12249
|
+
children: [
|
|
12250
|
+
resolvedHeaderImageSrc ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12251
|
+
import_Box19.default,
|
|
12252
|
+
{
|
|
12253
|
+
component: "img",
|
|
12254
|
+
src: resolvedHeaderImageSrc,
|
|
12255
|
+
alt: "",
|
|
12256
|
+
width: 52,
|
|
12257
|
+
height: 52,
|
|
12258
|
+
sx: { objectFit: "contain" }
|
|
12259
|
+
}
|
|
12260
|
+
) : null,
|
|
12261
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Stack17.default, { children: [
|
|
12262
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12263
|
+
import_Typography16.default,
|
|
12264
|
+
{
|
|
12265
|
+
sx: mergeSx2(
|
|
12266
|
+
{
|
|
12267
|
+
fontSize: "20px",
|
|
12268
|
+
fontWeight: 600,
|
|
12269
|
+
color: "#222222"
|
|
12270
|
+
},
|
|
12271
|
+
customization?.header?.headlineSx
|
|
12272
|
+
),
|
|
12273
|
+
children: headlineTotal
|
|
12274
|
+
}
|
|
12275
|
+
),
|
|
12276
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Stack17.default, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
12277
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12278
|
+
import_Typography16.default,
|
|
12279
|
+
{
|
|
12280
|
+
sx: mergeSx2(
|
|
12281
|
+
{
|
|
12282
|
+
fontSize: "11px",
|
|
12283
|
+
fontWeight: 400,
|
|
12284
|
+
color: "#222222"
|
|
12285
|
+
},
|
|
12286
|
+
customization?.header?.subtitleSx
|
|
12287
|
+
),
|
|
12288
|
+
children: headlineSubtitle
|
|
12289
|
+
}
|
|
12290
|
+
),
|
|
12291
|
+
resolvedHeadlineInfoPopover ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12292
|
+
ChartWidgetInfoButton,
|
|
12293
|
+
{
|
|
12294
|
+
density: "compact",
|
|
12295
|
+
popover: resolvedHeadlineInfoPopover,
|
|
12296
|
+
ariaLabel: "Queue time breakdown information"
|
|
12297
|
+
}
|
|
12298
|
+
) : null
|
|
12299
|
+
] })
|
|
12300
|
+
] })
|
|
12301
|
+
]
|
|
12300
12302
|
}
|
|
12301
12303
|
) }),
|
|
12302
12304
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12303
|
-
|
|
12305
|
+
import_Stack17.default,
|
|
12304
12306
|
{
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
+
sx: mergeSx2(customization?.leftColumn?.barRowsStackSx),
|
|
12308
|
+
children: data.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12309
|
+
QueueTimeBreakdownStackedBar,
|
|
12307
12310
|
{
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
display: "inline-block"
|
|
12311
|
+
row: item,
|
|
12312
|
+
legendRows: legend,
|
|
12313
|
+
renderTooltip: renderStackedBarTooltip
|
|
12312
12314
|
},
|
|
12313
|
-
|
|
12314
|
-
)
|
|
12315
|
-
}
|
|
12316
|
-
),
|
|
12317
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack17.default, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12318
|
-
QueueTimeBreakdownDonut,
|
|
12319
|
-
{
|
|
12320
|
-
averageData: yesterdayDonut,
|
|
12321
|
-
chartFilter: filter,
|
|
12322
|
-
LabelName: "Yesterday",
|
|
12323
|
-
renderTooltip: renderDonutTooltip
|
|
12315
|
+
item.name
|
|
12316
|
+
))
|
|
12324
12317
|
}
|
|
12325
|
-
)
|
|
12318
|
+
)
|
|
12326
12319
|
]
|
|
12327
12320
|
}
|
|
12328
|
-
)
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12321
|
+
),
|
|
12322
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12323
|
+
import_Typography16.default,
|
|
12324
|
+
{
|
|
12325
|
+
sx: mergeSx2(
|
|
12326
|
+
{
|
|
12327
|
+
marginTop: "10px",
|
|
12328
|
+
fontSize: "14px",
|
|
12329
|
+
fontWeight: 500,
|
|
12330
|
+
color: "#222222"
|
|
12331
|
+
},
|
|
12332
|
+
customization?.dataComparison?.titleSx
|
|
12333
|
+
),
|
|
12334
|
+
children: dataComparisonTitle
|
|
12335
|
+
}
|
|
12336
|
+
),
|
|
12337
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12338
|
+
import_Card2.default,
|
|
12339
|
+
{
|
|
12340
|
+
elevation: 0,
|
|
12341
|
+
sx: mergeSx2(
|
|
12342
|
+
{
|
|
12343
|
+
cursor: "pointer",
|
|
12344
|
+
marginTop: "10px",
|
|
12345
|
+
bgcolor: "#FFFFFF",
|
|
12346
|
+
border: "1px solid #E5E7EB",
|
|
12347
|
+
borderRadius: 2
|
|
12348
|
+
},
|
|
12349
|
+
customization?.dataComparison?.cardSx
|
|
12350
|
+
),
|
|
12351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_CardContent2.default, { sx: { padding: "4px 8px" }, children: hasComparisonData ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12352
|
+
import_Stack17.default,
|
|
12353
|
+
{
|
|
12354
|
+
direction: "row",
|
|
12355
|
+
justifyContent: "space-evenly",
|
|
12356
|
+
alignItems: "center",
|
|
12357
|
+
children: [
|
|
12358
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack17.default, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12359
|
+
QueueTimeBreakdownDonut,
|
|
12360
|
+
{
|
|
12361
|
+
averageData: Donut_data,
|
|
12362
|
+
labels: donutLabels,
|
|
12363
|
+
chartFilter: filter,
|
|
12364
|
+
LabelName: "Today",
|
|
12365
|
+
renderTooltip: renderDonutTooltip
|
|
12366
|
+
}
|
|
12367
|
+
) }),
|
|
12368
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12369
|
+
import_Box19.default,
|
|
12370
|
+
{
|
|
12371
|
+
component: "span",
|
|
12372
|
+
sx: mergeSx2(
|
|
12373
|
+
{
|
|
12374
|
+
height: "180px",
|
|
12375
|
+
width: "2px",
|
|
12376
|
+
backgroundColor: "#D8D9E4",
|
|
12377
|
+
display: "inline-block"
|
|
12378
|
+
},
|
|
12379
|
+
customization?.dataComparison?.dividerSx
|
|
12380
|
+
)
|
|
12381
|
+
}
|
|
12382
|
+
),
|
|
12383
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Stack17.default, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12384
|
+
QueueTimeBreakdownDonut,
|
|
12385
|
+
{
|
|
12386
|
+
averageData: yesterdayDonut,
|
|
12387
|
+
labels: donutLabels,
|
|
12388
|
+
chartFilter: filter,
|
|
12389
|
+
LabelName: "Yesterday",
|
|
12390
|
+
renderTooltip: renderDonutTooltip
|
|
12391
|
+
}
|
|
12392
|
+
) })
|
|
12393
|
+
]
|
|
12394
|
+
}
|
|
12395
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ChartEmptyState, { minHeight: 220 }) })
|
|
12396
|
+
}
|
|
12397
|
+
)
|
|
12398
|
+
] }),
|
|
12399
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_Grid.default, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12400
|
+
import_Card2.default,
|
|
12348
12401
|
{
|
|
12402
|
+
elevation: 0,
|
|
12349
12403
|
sx: mergeSx2(
|
|
12350
|
-
{
|
|
12351
|
-
|
|
12404
|
+
{
|
|
12405
|
+
cursor: "pointer",
|
|
12406
|
+
borderRadius: "8px",
|
|
12407
|
+
border: "1px solid #E5E7EB",
|
|
12408
|
+
bgcolor: "#FFFFFF",
|
|
12409
|
+
height: "100%"
|
|
12410
|
+
},
|
|
12411
|
+
customization?.areaChart?.cardSx
|
|
12352
12412
|
),
|
|
12353
|
-
children:
|
|
12354
|
-
|
|
12413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12414
|
+
import_CardContent2.default,
|
|
12355
12415
|
{
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12416
|
+
sx: mergeSx2(
|
|
12417
|
+
{ padding: "10px 8px" },
|
|
12418
|
+
customization?.areaChart?.cardContentSx
|
|
12419
|
+
),
|
|
12420
|
+
children: (areaProvided ? hasAreaData : hasBarData) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12421
|
+
QueueTimeBreakdownArea_default,
|
|
12422
|
+
{
|
|
12423
|
+
series: resolvedAreaSeries,
|
|
12424
|
+
xAxis: resolvedAreaXAxis,
|
|
12425
|
+
renderTooltip: renderAreaTooltip
|
|
12426
|
+
}
|
|
12427
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ChartEmptyState, { minHeight: 330 })
|
|
12359
12428
|
}
|
|
12360
|
-
)
|
|
12429
|
+
)
|
|
12361
12430
|
}
|
|
12362
|
-
)
|
|
12363
|
-
}
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12431
|
+
) })
|
|
12432
|
+
] }) })
|
|
12433
|
+
]
|
|
12434
|
+
}
|
|
12435
|
+
) }) }) });
|
|
12367
12436
|
}
|
|
12368
12437
|
|
|
12369
|
-
// src/components/
|
|
12370
|
-
var
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12438
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
|
|
12439
|
+
var STACKED_COMPARISON_DEFAULT_STACK_COLORS = [
|
|
12440
|
+
"#CFE0FB",
|
|
12441
|
+
"#7FB1F0",
|
|
12442
|
+
"#3D7CDF",
|
|
12443
|
+
"#1E2A5E"
|
|
12444
|
+
];
|
|
12445
|
+
var STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR = "#F47C7C";
|
|
12446
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR = "#2563EB";
|
|
12447
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR = "#EF4444";
|
|
12448
|
+
var STACKED_COMPARISON_DEFAULT_FRAME_BORDER = "#EAECEF";
|
|
12375
12449
|
|
|
12376
|
-
// src/components/
|
|
12377
|
-
var
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12450
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12451
|
+
var import_Box20 = __toESM(require("@mui/material/Box"));
|
|
12452
|
+
var import_ButtonBase2 = __toESM(require("@mui/material/ButtonBase"));
|
|
12453
|
+
var import_Stack18 = __toESM(require("@mui/material/Stack"));
|
|
12454
|
+
var import_Typography17 = __toESM(require("@mui/material/Typography"));
|
|
12455
|
+
var React25 = __toESM(require("react"));
|
|
12456
|
+
var import_recharts9 = require("recharts");
|
|
12382
12457
|
|
|
12383
|
-
// src/components/
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12458
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChartCustomization.merge.ts
|
|
12459
|
+
function mergeCss7(a, b) {
|
|
12460
|
+
if (!b) {
|
|
12461
|
+
return { ...a };
|
|
12462
|
+
}
|
|
12463
|
+
return { ...a, ...b };
|
|
12464
|
+
}
|
|
12465
|
+
function mergeSx4(...parts) {
|
|
12466
|
+
const flat = parts.filter(Boolean);
|
|
12467
|
+
if (flat.length === 0) {
|
|
12468
|
+
return void 0;
|
|
12469
|
+
}
|
|
12470
|
+
if (flat.length === 1) {
|
|
12471
|
+
return flat[0];
|
|
12472
|
+
}
|
|
12473
|
+
return flat.flat();
|
|
12474
|
+
}
|
|
12475
|
+
|
|
12476
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartCustomizationContext.tsx
|
|
12477
|
+
var React24 = __toESM(require("react"));
|
|
12478
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12479
|
+
var StackedComparisonBarChartCustomizationContext = React24.createContext({});
|
|
12480
|
+
function StackedComparisonBarChartCustomizationProvider({
|
|
12481
|
+
value,
|
|
12482
|
+
children
|
|
12483
|
+
}) {
|
|
12484
|
+
const memo = React24.useMemo(() => value, [value]);
|
|
12485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StackedComparisonBarChartCustomizationContext.Provider, { value: memo, children });
|
|
12486
|
+
}
|
|
12487
|
+
function useStackedComparisonBarChartCustomization() {
|
|
12488
|
+
return React24.useContext(StackedComparisonBarChartCustomizationContext);
|
|
12489
|
+
}
|
|
12490
|
+
|
|
12491
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartTooltip.tsx
|
|
12492
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12493
|
+
function fmt(n) {
|
|
12494
|
+
return new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(n);
|
|
12495
|
+
}
|
|
12496
|
+
function StackedComparisonBarChartTooltip({
|
|
12497
|
+
active,
|
|
12498
|
+
row,
|
|
12499
|
+
buckets,
|
|
12500
|
+
bucketColors,
|
|
12501
|
+
comparisonColor,
|
|
12502
|
+
stackedTotalLabel,
|
|
12503
|
+
comparisonLabel
|
|
12504
|
+
}) {
|
|
12505
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12506
|
+
const tt = bc?.tooltip;
|
|
12507
|
+
if (!active || !row) {
|
|
12508
|
+
return null;
|
|
12509
|
+
}
|
|
12510
|
+
const borderColor = tt?.borderColor ?? "#E5E7EB";
|
|
12511
|
+
const radius = tt?.borderRadiusPx ?? 10;
|
|
12512
|
+
const shadow = tt?.boxShadow ?? "0 8px 24px rgba(15, 23, 42, 0.12)";
|
|
12513
|
+
const bg = tt?.backgroundColor ?? "#FFFFFF";
|
|
12514
|
+
const pad = tt?.paddingPx ?? 14;
|
|
12515
|
+
const bucketNameColor = tt?.bucketNameColor ?? "#0F172A";
|
|
12516
|
+
const bucketValueColor = tt?.bucketValueColor ?? "#0F172A";
|
|
12517
|
+
const totalStackedLabelColor = tt?.totalStackedLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12518
|
+
const totalStackedValueColor = tt?.totalStackedValueColor ?? "#1D4ED8";
|
|
12519
|
+
const comparisonLabelColor = tt?.comparisonLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12520
|
+
const comparisonValueColor = tt?.comparisonValueColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12521
|
+
const dividerColor = tt?.dividerColor ?? "#E5E7EB";
|
|
12522
|
+
const titleColor = tt?.titleColor ?? "#0F172A";
|
|
12523
|
+
const fs = tt?.fontSizePx ?? 13;
|
|
12524
|
+
const titleFs = tt?.titleFontSizePx ?? 15;
|
|
12525
|
+
const titleText = row.subName ? `${row.name} ${row.subName}` : row.name;
|
|
12526
|
+
const orderedBuckets = [...buckets].reverse();
|
|
12527
|
+
const bodyStyle = mergeCss7(
|
|
12528
|
+
{
|
|
12529
|
+
boxSizing: "border-box",
|
|
12530
|
+
backgroundColor: bg,
|
|
12531
|
+
padding: pad,
|
|
12532
|
+
borderRadius: radius,
|
|
12533
|
+
border: `1px solid ${borderColor}`,
|
|
12534
|
+
boxShadow: shadow,
|
|
12535
|
+
minWidth: tt?.minWidthPx ?? 220,
|
|
12536
|
+
...tt?.maxWidthPx != null ? { maxWidth: tt.maxWidthPx } : null
|
|
12537
|
+
},
|
|
12538
|
+
tt?.bodyStyle
|
|
12539
|
+
);
|
|
12540
|
+
const rowStyle = {
|
|
12541
|
+
display: "flex",
|
|
12542
|
+
alignItems: "center",
|
|
12543
|
+
justifyContent: "space-between",
|
|
12544
|
+
fontSize: fs,
|
|
12545
|
+
lineHeight: 1.4,
|
|
12546
|
+
margin: "4px 0",
|
|
12547
|
+
fontFamily: "inherit"
|
|
12548
|
+
};
|
|
12549
|
+
const swatch = (color) => ({
|
|
12550
|
+
width: 10,
|
|
12551
|
+
height: 10,
|
|
12552
|
+
borderRadius: "50%",
|
|
12553
|
+
backgroundColor: color,
|
|
12554
|
+
flexShrink: 0,
|
|
12555
|
+
display: "inline-block",
|
|
12556
|
+
marginRight: 8
|
|
12557
|
+
});
|
|
12558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: bodyStyle, children: [
|
|
12559
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12560
|
+
"div",
|
|
12561
|
+
{
|
|
12562
|
+
style: {
|
|
12563
|
+
fontSize: titleFs,
|
|
12564
|
+
fontWeight: 700,
|
|
12565
|
+
color: titleColor,
|
|
12566
|
+
marginBottom: 8
|
|
12567
|
+
},
|
|
12568
|
+
children: titleText
|
|
12569
|
+
}
|
|
12570
|
+
),
|
|
12571
|
+
orderedBuckets.map((b, i) => {
|
|
12572
|
+
const originalIndex = buckets.length - 1 - i;
|
|
12573
|
+
const color = b.color ?? bucketColors[originalIndex] ?? "#94A3B8";
|
|
12574
|
+
const v = row.stacked[b.id] ?? 0;
|
|
12575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: rowStyle, children: [
|
|
12576
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12577
|
+
"span",
|
|
12578
|
+
{
|
|
12579
|
+
style: {
|
|
12580
|
+
display: "flex",
|
|
12581
|
+
alignItems: "center",
|
|
12582
|
+
color: bucketNameColor,
|
|
12583
|
+
fontWeight: 500
|
|
12584
|
+
},
|
|
12585
|
+
children: [
|
|
12586
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(color), "aria-hidden": true }),
|
|
12587
|
+
b.label
|
|
12588
|
+
]
|
|
12589
|
+
}
|
|
12590
|
+
),
|
|
12591
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: bucketValueColor, fontWeight: 700 }, children: fmt(v) })
|
|
12592
|
+
] }, b.id);
|
|
12593
|
+
}),
|
|
12594
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12595
|
+
"div",
|
|
12596
|
+
{
|
|
12597
|
+
style: {
|
|
12598
|
+
height: 1,
|
|
12599
|
+
background: dividerColor,
|
|
12600
|
+
margin: "10px 0 8px"
|
|
12601
|
+
}
|
|
12602
|
+
}
|
|
12603
|
+
),
|
|
12604
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "2px 0" }, children: [
|
|
12605
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: totalStackedLabelColor, fontWeight: 700 }, children: stackedTotalLabel }),
|
|
12606
|
+
/* @__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)) })
|
|
12607
|
+
] }),
|
|
12608
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "6px 0 0" }, children: [
|
|
12609
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12610
|
+
"span",
|
|
12611
|
+
{
|
|
12612
|
+
style: {
|
|
12613
|
+
display: "flex",
|
|
12614
|
+
alignItems: "center",
|
|
12615
|
+
color: comparisonLabelColor,
|
|
12616
|
+
fontWeight: 600
|
|
12617
|
+
},
|
|
12618
|
+
children: [
|
|
12619
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(comparisonColor), "aria-hidden": true }),
|
|
12620
|
+
comparisonLabel
|
|
12621
|
+
]
|
|
12622
|
+
}
|
|
12623
|
+
),
|
|
12624
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: comparisonValueColor, fontWeight: 700 }, children: fmt(row.comparison) })
|
|
12625
|
+
] })
|
|
12626
|
+
] }) });
|
|
12627
|
+
}
|
|
12628
|
+
|
|
12629
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12630
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12631
|
+
var DEFAULT_AXIS_TICK_FILL = "#9CA3AF";
|
|
12632
|
+
var DEFAULT_GRID_STROKE = "#EEF0F3";
|
|
12633
|
+
var STACK_KEY = (id) => `stack__${id}`;
|
|
12634
|
+
var COMPARISON_KEY = "__comparison";
|
|
12635
|
+
function SortIcon({ color }) {
|
|
12636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12637
|
+
"svg",
|
|
12638
|
+
{
|
|
12639
|
+
width: "14",
|
|
12640
|
+
height: "14",
|
|
12641
|
+
viewBox: "0 0 14 14",
|
|
12642
|
+
fill: "none",
|
|
12643
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12644
|
+
"aria-hidden": true,
|
|
12645
|
+
children: [
|
|
12646
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12647
|
+
"path",
|
|
12648
|
+
{
|
|
12649
|
+
d: "M4 2.5V11.5M4 11.5L1.5 9M4 11.5L6.5 9",
|
|
12650
|
+
stroke: color,
|
|
12651
|
+
strokeWidth: "1.4",
|
|
12652
|
+
strokeLinecap: "round",
|
|
12653
|
+
strokeLinejoin: "round"
|
|
12654
|
+
}
|
|
12655
|
+
),
|
|
12656
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12657
|
+
"path",
|
|
12658
|
+
{
|
|
12659
|
+
d: "M10 11.5V2.5M10 2.5L7.5 5M10 2.5L12.5 5",
|
|
12660
|
+
stroke: color,
|
|
12661
|
+
strokeWidth: "1.4",
|
|
12662
|
+
strokeLinecap: "round",
|
|
12663
|
+
strokeLinejoin: "round"
|
|
12664
|
+
}
|
|
12665
|
+
)
|
|
12666
|
+
]
|
|
12667
|
+
}
|
|
12668
|
+
);
|
|
12669
|
+
}
|
|
12670
|
+
function LegendDot({
|
|
12671
|
+
color,
|
|
12672
|
+
sizePx = 10
|
|
12673
|
+
}) {
|
|
12674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12675
|
+
import_Box20.default,
|
|
12676
|
+
{
|
|
12677
|
+
sx: {
|
|
12678
|
+
width: sizePx,
|
|
12679
|
+
height: sizePx,
|
|
12680
|
+
borderRadius: "50%",
|
|
12681
|
+
bgcolor: color,
|
|
12682
|
+
flexShrink: 0
|
|
12683
|
+
}
|
|
12684
|
+
}
|
|
12685
|
+
);
|
|
12686
|
+
}
|
|
12687
|
+
function MultilineTick(props) {
|
|
12688
|
+
const {
|
|
12689
|
+
x = 0,
|
|
12690
|
+
y = 0,
|
|
12691
|
+
payload,
|
|
12692
|
+
fill = DEFAULT_AXIS_TICK_FILL,
|
|
12693
|
+
fontSize = 12,
|
|
12694
|
+
rowsByName,
|
|
12695
|
+
angle = 0,
|
|
12696
|
+
textAnchor = "middle"
|
|
12697
|
+
} = props;
|
|
12698
|
+
const name = payload?.value ?? "";
|
|
12699
|
+
if (!name) return null;
|
|
12700
|
+
const row = rowsByName ? rowsByName[name] : void 0;
|
|
12701
|
+
const subName = row?.subName;
|
|
12702
|
+
const lines = [];
|
|
12703
|
+
String(name).split("\n").forEach((s) => lines.push(s));
|
|
12704
|
+
if (subName) {
|
|
12705
|
+
String(subName).split("\n").forEach((s) => lines.push(s));
|
|
12706
|
+
}
|
|
12707
|
+
const lineHeight = fontSize * 1.25;
|
|
12708
|
+
const isHorizontal = angle === 0;
|
|
12709
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
12710
|
+
const dy0 = isHorizontal ? lineHeight : 4;
|
|
12711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12712
|
+
"text",
|
|
12713
|
+
{
|
|
12714
|
+
transform: angle !== 0 ? `rotate(${angle})` : void 0,
|
|
12715
|
+
textAnchor: anchor,
|
|
12716
|
+
fontSize,
|
|
12717
|
+
fill,
|
|
12718
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
12719
|
+
}
|
|
12720
|
+
) });
|
|
12721
|
+
}
|
|
12722
|
+
function BarPlot({
|
|
12723
|
+
data,
|
|
12724
|
+
buckets,
|
|
12725
|
+
bucketColors,
|
|
12726
|
+
comparisonColor,
|
|
12727
|
+
rowsByName,
|
|
12728
|
+
yAxisDomain,
|
|
12729
|
+
yAxisTicks,
|
|
12730
|
+
yAxisTickFormatter,
|
|
12731
|
+
stackedTotalLabel,
|
|
12732
|
+
comparisonLabel,
|
|
12733
|
+
renderTooltip,
|
|
12734
|
+
enableHorizontalScroll,
|
|
12735
|
+
chartMinWidth,
|
|
12736
|
+
categoryWidthPx
|
|
12737
|
+
}) {
|
|
12738
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12739
|
+
const height = bc?.heightPx ?? 360;
|
|
12740
|
+
const stackedSize = bc?.stackedBarSizePx ?? 22;
|
|
12741
|
+
const comparisonSize = bc?.comparisonBarSizePx ?? 18;
|
|
12742
|
+
const barCategoryGap = bc?.barCategoryGapPx ?? 20;
|
|
12743
|
+
const barGap = bc?.barGap ?? 2;
|
|
12744
|
+
const barTopRadius = bc?.barTopRadiusPx ?? 3;
|
|
12745
|
+
const m = {
|
|
12746
|
+
top: bc?.margin?.top ?? 16,
|
|
12747
|
+
right: bc?.margin?.right ?? 8,
|
|
12748
|
+
bottom: bc?.margin?.bottom ?? 28,
|
|
12749
|
+
left: bc?.margin?.left ?? 4
|
|
12750
|
+
};
|
|
12751
|
+
const gridStroke = bc?.gridStroke ?? DEFAULT_GRID_STROKE;
|
|
12752
|
+
const dash = bc?.gridStrokeDasharray ?? "0";
|
|
12753
|
+
const xFill = bc?.xAxisTickFill ?? "#6B7280";
|
|
12754
|
+
const xTickAngle = bc?.xAxisTickAngle ?? 0;
|
|
12755
|
+
const xTickAnchor = bc?.xAxisTickAnchor ?? "end";
|
|
12756
|
+
const xAxisHeight = bc?.xAxisHeight ?? 50;
|
|
12757
|
+
const yFill = bc?.yAxisTickFill ?? DEFAULT_AXIS_TICK_FILL;
|
|
12758
|
+
const yWidth = bc?.yAxisWidth ?? 44;
|
|
12759
|
+
const cursorFill = bc?.cursorFill ?? "rgba(15, 23, 42, 0.04)";
|
|
12760
|
+
const defaultFmt = React25.useCallback(
|
|
12761
|
+
(v) => v >= 1e3 ? `${(v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1)}k` : `${v}`,
|
|
12762
|
+
[]
|
|
12763
|
+
);
|
|
12764
|
+
const tickFmt = yAxisTickFormatter ?? defaultFmt;
|
|
12765
|
+
const resolvedCategoryWidth = categoryWidthPx ?? 90;
|
|
12766
|
+
const innerMinWidth = chartMinWidth ?? resolvedCategoryWidth * Math.max(data.length, 1);
|
|
12767
|
+
const outerSx = enableHorizontalScroll ? {
|
|
12768
|
+
width: "100%",
|
|
12769
|
+
height,
|
|
12770
|
+
mt: 0.5,
|
|
12771
|
+
overflowX: "auto",
|
|
12772
|
+
overflowY: "hidden"
|
|
12773
|
+
} : { width: "100%", height, mt: 0.5 };
|
|
12774
|
+
const innerSx = enableHorizontalScroll ? { width: "100%", height: "100%", minWidth: innerMinWidth } : { width: "100%", height: "100%" };
|
|
12775
|
+
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)(
|
|
12776
|
+
import_recharts9.BarChart,
|
|
12777
|
+
{
|
|
12778
|
+
data,
|
|
12779
|
+
margin: m,
|
|
12780
|
+
barCategoryGap,
|
|
12781
|
+
barGap,
|
|
12782
|
+
children: [
|
|
12783
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12784
|
+
import_recharts9.CartesianGrid,
|
|
12785
|
+
{
|
|
12786
|
+
strokeDasharray: dash,
|
|
12787
|
+
vertical: false,
|
|
12788
|
+
stroke: gridStroke
|
|
12789
|
+
}
|
|
12790
|
+
),
|
|
12791
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12792
|
+
import_recharts9.XAxis,
|
|
12793
|
+
{
|
|
12794
|
+
dataKey: "__name",
|
|
12795
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12796
|
+
MultilineTick,
|
|
12797
|
+
{
|
|
12798
|
+
fill: xFill,
|
|
12799
|
+
fontSize: 12,
|
|
12800
|
+
rowsByName,
|
|
12801
|
+
angle: xTickAngle,
|
|
12802
|
+
textAnchor: xTickAnchor
|
|
12803
|
+
}
|
|
12804
|
+
),
|
|
12805
|
+
tickLine: false,
|
|
12806
|
+
axisLine: { stroke: gridStroke },
|
|
12807
|
+
interval: 0,
|
|
12808
|
+
height: xAxisHeight
|
|
12809
|
+
}
|
|
12810
|
+
),
|
|
12811
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12812
|
+
import_recharts9.YAxis,
|
|
12813
|
+
{
|
|
12814
|
+
domain: yAxisDomain,
|
|
12815
|
+
ticks: yAxisTicks,
|
|
12816
|
+
tick: { fill: yFill, fontSize: 11 },
|
|
12817
|
+
tickLine: false,
|
|
12818
|
+
axisLine: false,
|
|
12819
|
+
width: yWidth,
|
|
12820
|
+
tickFormatter: tickFmt
|
|
12821
|
+
}
|
|
12822
|
+
),
|
|
12823
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12824
|
+
import_recharts9.Tooltip,
|
|
12825
|
+
{
|
|
12826
|
+
content: (tooltipProps) => {
|
|
12827
|
+
const label = tooltipProps.label;
|
|
12828
|
+
const labelStr = typeof label === "string" ? label : String(label ?? "");
|
|
12829
|
+
const row = rowsByName[labelStr] ?? null;
|
|
12830
|
+
if (renderTooltip) {
|
|
12831
|
+
const custom = renderTooltip({
|
|
12832
|
+
tooltipProps,
|
|
12833
|
+
row,
|
|
12834
|
+
buckets,
|
|
12835
|
+
bucketColors,
|
|
12836
|
+
comparisonColor
|
|
12837
|
+
});
|
|
12838
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: custom });
|
|
12839
|
+
}
|
|
12840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12841
|
+
StackedComparisonBarChartTooltip,
|
|
12842
|
+
{
|
|
12843
|
+
...tooltipProps,
|
|
12844
|
+
row,
|
|
12845
|
+
buckets,
|
|
12846
|
+
bucketColors,
|
|
12847
|
+
comparisonColor,
|
|
12848
|
+
stackedTotalLabel,
|
|
12849
|
+
comparisonLabel
|
|
12850
|
+
}
|
|
12851
|
+
);
|
|
12852
|
+
},
|
|
12853
|
+
cursor: { fill: cursorFill },
|
|
12854
|
+
allowEscapeViewBox: { x: false, y: true }
|
|
12855
|
+
}
|
|
12856
|
+
),
|
|
12857
|
+
buckets.map((b, i) => {
|
|
12858
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
12859
|
+
const isTop = i === buckets.length - 1;
|
|
12860
|
+
const radius = isTop ? [barTopRadius, barTopRadius, 0, 0] : [0, 0, 0, 0];
|
|
12861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12862
|
+
import_recharts9.Bar,
|
|
12863
|
+
{
|
|
12864
|
+
dataKey: STACK_KEY(b.id),
|
|
12865
|
+
name: b.label,
|
|
12866
|
+
stackId: "stacked",
|
|
12867
|
+
fill: color,
|
|
12868
|
+
barSize: stackedSize,
|
|
12869
|
+
isAnimationActive: false,
|
|
12870
|
+
radius
|
|
12871
|
+
},
|
|
12872
|
+
b.id
|
|
12873
|
+
);
|
|
12874
|
+
}),
|
|
12875
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12876
|
+
import_recharts9.Bar,
|
|
12877
|
+
{
|
|
12878
|
+
dataKey: COMPARISON_KEY,
|
|
12879
|
+
name: comparisonLabel,
|
|
12880
|
+
stackId: "comparison",
|
|
12881
|
+
fill: comparisonColor,
|
|
12882
|
+
barSize: comparisonSize,
|
|
12883
|
+
isAnimationActive: false,
|
|
12884
|
+
radius: [barTopRadius, barTopRadius, 0, 0]
|
|
12885
|
+
}
|
|
12886
|
+
)
|
|
12887
|
+
]
|
|
12888
|
+
}
|
|
12889
|
+
) }) }) });
|
|
12890
|
+
}
|
|
12891
|
+
function StackedComparisonBarChart({
|
|
12892
|
+
subHeading,
|
|
12893
|
+
showSortToggle = true,
|
|
12894
|
+
onSortToggle,
|
|
12895
|
+
showSubHeadingDivider = true,
|
|
12896
|
+
showHeaderLegend = true,
|
|
12897
|
+
enableHorizontalScroll = false,
|
|
12898
|
+
chartMinWidth,
|
|
12899
|
+
categoryWidthPx,
|
|
12900
|
+
buckets,
|
|
12901
|
+
data,
|
|
12902
|
+
stackedLegendLabel = "Stacked",
|
|
12903
|
+
comparisonLegendLabel = "Comparison",
|
|
12904
|
+
stackedTotalLabel,
|
|
12905
|
+
yAxisDomain,
|
|
12906
|
+
yAxisTicks,
|
|
12907
|
+
yAxisTickFormatter,
|
|
12908
|
+
renderTooltip,
|
|
12909
|
+
emptyStatePlaceholderProps,
|
|
12910
|
+
customization
|
|
12911
|
+
}) {
|
|
12912
|
+
const bucketColors = customization?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
12913
|
+
const comparisonColor = customization?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
12914
|
+
const legendStackDot = customization?.header?.legendStackColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12915
|
+
const legendComparisonDot = customization?.header?.legendComparisonColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12916
|
+
const legendDividerColor = customization?.header?.legendDividerColor ?? "#E5E7EB";
|
|
12917
|
+
const legendDotSize = customization?.header?.legendDotSizePx ?? 10;
|
|
12918
|
+
const frameBorder = customization?.frame?.borderColor ?? STACKED_COMPARISON_DEFAULT_FRAME_BORDER;
|
|
12919
|
+
const frameBg = customization?.frame?.backgroundColor ?? "#FFFFFF";
|
|
12920
|
+
const rowsByName = React25.useMemo(() => {
|
|
12921
|
+
const r = {};
|
|
12922
|
+
for (const row of data) r[row.name] = row;
|
|
12923
|
+
return r;
|
|
12924
|
+
}, [data]);
|
|
12925
|
+
const chartData = React25.useMemo(() => {
|
|
12926
|
+
return data.map((row) => {
|
|
12927
|
+
const d = {
|
|
12928
|
+
__key: row.name,
|
|
12929
|
+
__name: row.name,
|
|
12930
|
+
__subName: row.subName,
|
|
12931
|
+
__row: row,
|
|
12932
|
+
[COMPARISON_KEY]: row.comparison
|
|
12933
|
+
};
|
|
12934
|
+
for (const b of buckets) {
|
|
12935
|
+
d[STACK_KEY(b.id)] = row.stacked[b.id] ?? 0;
|
|
12936
|
+
}
|
|
12937
|
+
return d;
|
|
12938
|
+
});
|
|
12939
|
+
}, [data, buckets]);
|
|
12940
|
+
const subHeadingSx = mergeSx4(
|
|
12941
|
+
{
|
|
12942
|
+
fontWeight: 700,
|
|
12943
|
+
fontSize: "0.95rem",
|
|
12944
|
+
color: "#0f172a"
|
|
12945
|
+
},
|
|
12946
|
+
customization?.header?.subHeadingSx
|
|
12947
|
+
);
|
|
12948
|
+
const frameSx = mergeSx4(
|
|
12949
|
+
{
|
|
12950
|
+
bgcolor: frameBg,
|
|
12951
|
+
border: `1px solid ${frameBorder}`,
|
|
12952
|
+
borderRadius: 2,
|
|
12953
|
+
px: 2,
|
|
12954
|
+
pt: 2,
|
|
12955
|
+
pb: 1.5,
|
|
12956
|
+
width: "100%",
|
|
12957
|
+
boxSizing: "border-box"
|
|
12958
|
+
},
|
|
12959
|
+
customization?.frame?.sx
|
|
12960
|
+
);
|
|
12961
|
+
const subHeadingDividerColor = customization?.frame?.subHeadingDividerColor ?? "#C7C9D9";
|
|
12962
|
+
const subHeadingDividerSx = mergeSx4(
|
|
12963
|
+
{
|
|
12964
|
+
height: "1px",
|
|
12965
|
+
width: "100%",
|
|
12966
|
+
bgcolor: subHeadingDividerColor,
|
|
12967
|
+
mb: 1.5
|
|
12968
|
+
},
|
|
12969
|
+
customization?.frame?.subHeadingDividerSx
|
|
12970
|
+
);
|
|
12971
|
+
const legendSx = mergeSx4({ flexShrink: 0 }, customization?.header?.legendSx);
|
|
12972
|
+
const showSubHeadingRow = Boolean(subHeading) || showSortToggle || showHeaderLegend;
|
|
12973
|
+
const resolvedStackedTotal = stackedTotalLabel ?? `Total ${stackedLegendLabel}`;
|
|
12974
|
+
if (chartData.length === 0) {
|
|
12975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChartEmptyState, { minHeight: 360, ...emptyStatePlaceholderProps });
|
|
12976
|
+
}
|
|
12977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StackedComparisonBarChartCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Box20.default, { sx: frameSx, children: [
|
|
12978
|
+
showSubHeadingRow ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12979
|
+
import_Stack18.default,
|
|
12980
|
+
{
|
|
12981
|
+
direction: "row",
|
|
12982
|
+
alignItems: "center",
|
|
12983
|
+
justifyContent: "space-between",
|
|
12984
|
+
gap: 2,
|
|
12985
|
+
flexWrap: "wrap",
|
|
12986
|
+
sx: { mb: 1 },
|
|
12987
|
+
children: [
|
|
12988
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
12989
|
+
subHeading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography17.default, { sx: subHeadingSx, children: subHeading }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", {}),
|
|
12990
|
+
showSortToggle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12991
|
+
import_ButtonBase2.default,
|
|
12992
|
+
{
|
|
12993
|
+
onClick: onSortToggle,
|
|
12994
|
+
disableRipple: !onSortToggle,
|
|
12995
|
+
sx: mergeSx4(
|
|
12996
|
+
{
|
|
12997
|
+
width: 26,
|
|
12998
|
+
height: 26,
|
|
12999
|
+
borderRadius: 1,
|
|
13000
|
+
bgcolor: "#EEF2FF",
|
|
13001
|
+
color: "#5B6DEC",
|
|
13002
|
+
display: "inline-flex",
|
|
13003
|
+
alignItems: "center",
|
|
13004
|
+
justifyContent: "center",
|
|
13005
|
+
cursor: onSortToggle ? "pointer" : "default",
|
|
13006
|
+
"&:hover": onSortToggle ? { bgcolor: "#E0E7FF" } : void 0
|
|
13007
|
+
},
|
|
13008
|
+
customization?.header?.sortButtonSx
|
|
13009
|
+
),
|
|
13010
|
+
"aria-label": "Toggle sort order",
|
|
13011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SortIcon, { color: "#5B6DEC" })
|
|
13012
|
+
}
|
|
13013
|
+
) : null
|
|
13014
|
+
] }),
|
|
13015
|
+
showHeaderLegend ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
13016
|
+
import_Stack18.default,
|
|
13017
|
+
{
|
|
13018
|
+
direction: "row",
|
|
13019
|
+
alignItems: "center",
|
|
13020
|
+
spacing: 1.5,
|
|
13021
|
+
sx: legendSx,
|
|
13022
|
+
children: [
|
|
13023
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
13024
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LegendDot, { color: legendStackDot, sizePx: legendDotSize }),
|
|
13025
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13026
|
+
import_Typography17.default,
|
|
13027
|
+
{
|
|
13028
|
+
sx: mergeSx4(
|
|
13029
|
+
{
|
|
13030
|
+
fontWeight: 700,
|
|
13031
|
+
fontSize: "0.85rem",
|
|
13032
|
+
color: legendStackDot
|
|
13033
|
+
},
|
|
13034
|
+
customization?.header?.legendLabelSx
|
|
13035
|
+
),
|
|
13036
|
+
children: stackedLegendLabel
|
|
13037
|
+
}
|
|
13038
|
+
)
|
|
13039
|
+
] }),
|
|
13040
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13041
|
+
import_Box20.default,
|
|
13042
|
+
{
|
|
13043
|
+
sx: {
|
|
13044
|
+
width: "1px",
|
|
13045
|
+
height: 18,
|
|
13046
|
+
bgcolor: legendDividerColor
|
|
13047
|
+
}
|
|
13048
|
+
}
|
|
13049
|
+
),
|
|
13050
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
13051
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13052
|
+
LegendDot,
|
|
13053
|
+
{
|
|
13054
|
+
color: legendComparisonDot,
|
|
13055
|
+
sizePx: legendDotSize
|
|
13056
|
+
}
|
|
13057
|
+
),
|
|
13058
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13059
|
+
import_Typography17.default,
|
|
13060
|
+
{
|
|
13061
|
+
sx: mergeSx4(
|
|
13062
|
+
{
|
|
13063
|
+
fontWeight: 700,
|
|
13064
|
+
fontSize: "0.85rem",
|
|
13065
|
+
color: legendComparisonDot
|
|
13066
|
+
},
|
|
13067
|
+
customization?.header?.legendLabelSx
|
|
13068
|
+
),
|
|
13069
|
+
children: comparisonLegendLabel
|
|
13070
|
+
}
|
|
13071
|
+
)
|
|
13072
|
+
] })
|
|
13073
|
+
]
|
|
13074
|
+
}
|
|
13075
|
+
) : null
|
|
13076
|
+
]
|
|
13077
|
+
}
|
|
13078
|
+
) : null,
|
|
13079
|
+
showSubHeadingDivider ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: subHeadingDividerSx }) : null,
|
|
13080
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13081
|
+
BarPlot,
|
|
13082
|
+
{
|
|
13083
|
+
data: chartData,
|
|
13084
|
+
buckets,
|
|
13085
|
+
bucketColors,
|
|
13086
|
+
comparisonColor,
|
|
13087
|
+
rowsByName,
|
|
13088
|
+
yAxisDomain,
|
|
13089
|
+
yAxisTicks,
|
|
13090
|
+
yAxisTickFormatter,
|
|
13091
|
+
stackedTotalLabel: resolvedStackedTotal,
|
|
13092
|
+
comparisonLabel: comparisonLegendLabel,
|
|
13093
|
+
renderTooltip,
|
|
13094
|
+
enableHorizontalScroll,
|
|
13095
|
+
chartMinWidth,
|
|
13096
|
+
categoryWidthPx
|
|
13097
|
+
}
|
|
13098
|
+
)
|
|
13099
|
+
] }) });
|
|
13100
|
+
}
|
|
13101
|
+
|
|
13102
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.defaultInfoPopover.ts
|
|
13103
|
+
var DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER = {
|
|
13104
|
+
title: "Store Performance by Assist",
|
|
13105
|
+
description: "Per-store breakdown of attended customers split by attend-duration buckets, alongside the unattended count.",
|
|
13106
|
+
helpBullets: [
|
|
13107
|
+
"Compare attended vs unattended customer volume by store.",
|
|
13108
|
+
"Identify stores with high unattended counts that need staffing.",
|
|
13109
|
+
"See how attended customers split across 0-10 sec, 11-30 sec, 31-59 sec, and 1-2 min buckets."
|
|
13110
|
+
]
|
|
13111
|
+
};
|
|
13112
|
+
|
|
13113
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.mock.ts
|
|
13114
|
+
var STORE_PERFORMANCE_DEFAULT_BUCKETS = [
|
|
13115
|
+
{ id: "0-10", label: "0-10sec" },
|
|
13116
|
+
{ id: "11-30", label: "11-30sec" },
|
|
13117
|
+
{ id: "31-59", label: "31-59sec" },
|
|
13118
|
+
{ id: "1-2", label: "1-2min" }
|
|
13119
|
+
];
|
|
13120
|
+
var STORE_PERFORMANCE_DEFAULT_DATA = [
|
|
13121
|
+
{
|
|
13122
|
+
name: "Lake Mall",
|
|
13123
|
+
subName: "Kolkata",
|
|
13124
|
+
stacked: { "0-10": 1100, "11-30": 1100, "31-59": 1500, "1-2": 3e3 },
|
|
13125
|
+
comparison: 700
|
|
13126
|
+
},
|
|
13127
|
+
{
|
|
13128
|
+
name: "V3s",
|
|
13129
|
+
subName: "Delhi",
|
|
13130
|
+
stacked: { "0-10": 1e3, "11-30": 1100, "31-59": 1450, "1-2": 2900 },
|
|
13131
|
+
comparison: 620
|
|
13132
|
+
},
|
|
13133
|
+
{
|
|
13134
|
+
name: "Forum Mall",
|
|
13135
|
+
subName: "Bangalore",
|
|
13136
|
+
stacked: { "0-10": 750, "11-30": 800, "31-59": 1450, "1-2": 2050 },
|
|
13137
|
+
comparison: 520
|
|
13138
|
+
},
|
|
13139
|
+
{
|
|
13140
|
+
name: "Phoenix",
|
|
13141
|
+
subName: "Mumbai",
|
|
13142
|
+
stacked: { "0-10": 600, "11-30": 700, "31-59": 1450, "1-2": 1500 },
|
|
13143
|
+
comparison: 470
|
|
13144
|
+
},
|
|
13145
|
+
{
|
|
13146
|
+
name: "DB City",
|
|
13147
|
+
subName: "Bhopal",
|
|
13148
|
+
stacked: { "0-10": 400, "11-30": 600, "31-59": 950, "1-2": 1550 },
|
|
13149
|
+
comparison: 580
|
|
13150
|
+
},
|
|
13151
|
+
{
|
|
13152
|
+
name: "DLF",
|
|
13153
|
+
subName: "Gurgaon",
|
|
13154
|
+
stacked: { "0-10": 225, "11-30": 300, "31-59": 375, "1-2": 600 },
|
|
13155
|
+
comparison: 190
|
|
13156
|
+
},
|
|
13157
|
+
{
|
|
13158
|
+
name: "Highway",
|
|
13159
|
+
subName: "Chennai",
|
|
13160
|
+
stacked: { "0-10": 200, "11-30": 250, "31-59": 350, "1-2": 850 },
|
|
13161
|
+
comparison: 140
|
|
13162
|
+
},
|
|
13163
|
+
{
|
|
13164
|
+
name: "Elante",
|
|
13165
|
+
subName: "Chandigarh",
|
|
13166
|
+
stacked: { "0-10": 150, "11-30": 200, "31-59": 250, "1-2": 600 },
|
|
13167
|
+
comparison: 100
|
|
13168
|
+
}
|
|
13169
|
+
];
|
|
13170
|
+
|
|
13171
|
+
// src/components/widgets/StorePerformanceByAssist/StorePerformanceByAssist.tsx
|
|
13172
|
+
var import_Box21 = __toESM(require("@mui/material/Box"));
|
|
13173
|
+
var import_Card3 = __toESM(require("@mui/material/Card"));
|
|
13174
|
+
var import_CardContent3 = __toESM(require("@mui/material/CardContent"));
|
|
13175
|
+
var import_Stack19 = __toESM(require("@mui/material/Stack"));
|
|
13176
|
+
var import_Typography18 = __toESM(require("@mui/material/Typography"));
|
|
13177
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
13178
|
+
function LegendSquare({
|
|
13179
|
+
color,
|
|
13180
|
+
size = 12
|
|
13181
|
+
}) {
|
|
13182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13183
|
+
import_Box21.default,
|
|
13184
|
+
{
|
|
13185
|
+
sx: {
|
|
13186
|
+
width: size,
|
|
13187
|
+
height: size,
|
|
13188
|
+
borderRadius: 0.5,
|
|
13189
|
+
bgcolor: color,
|
|
13190
|
+
flexShrink: 0
|
|
13191
|
+
}
|
|
13192
|
+
}
|
|
13193
|
+
);
|
|
13194
|
+
}
|
|
13195
|
+
function StorePerformanceByAssist({
|
|
13196
|
+
title,
|
|
13197
|
+
width,
|
|
13198
|
+
maxWidth,
|
|
13199
|
+
minWidth,
|
|
13200
|
+
subHeading = "Stores (Top to Bottom)",
|
|
13201
|
+
showSortToggle = true,
|
|
13202
|
+
onSortToggle,
|
|
13203
|
+
showSubHeadingDivider = true,
|
|
13204
|
+
showHeaderLegend = true,
|
|
13205
|
+
enableHorizontalScroll = false,
|
|
13206
|
+
chartMinWidth,
|
|
13207
|
+
categoryWidthPx,
|
|
13208
|
+
buckets,
|
|
13209
|
+
data,
|
|
13210
|
+
attendedLegendLabel = "Attended",
|
|
13211
|
+
unattendedLegendLabel = "Unattended",
|
|
13212
|
+
unattendedBottomLegendLabel = "Unattended Customers",
|
|
13213
|
+
yAxisDomain,
|
|
13214
|
+
yAxisTicks,
|
|
13215
|
+
yAxisTickFormatter,
|
|
13216
|
+
infoPopover = null,
|
|
13217
|
+
renderTooltip,
|
|
13218
|
+
emptyStatePlaceholderProps,
|
|
13219
|
+
customization
|
|
13220
|
+
}) {
|
|
13221
|
+
const bucketColors = customization?.chart?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
13222
|
+
const comparisonColor = customization?.chart?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
13223
|
+
const bottomLegendColor = customization?.bottomLegend?.labelColor ?? "#6B7280";
|
|
13224
|
+
const bottomLegendFs = customization?.bottomLegend?.fontSizePx ?? 12;
|
|
13225
|
+
const bottomLegendDividerColor = customization?.bottomLegend?.dividerColor ?? "#E5E7EB";
|
|
13226
|
+
const bottomSwatch = customization?.bottomLegend?.swatchSizePx ?? 12;
|
|
13227
|
+
const resolvedInfo = infoPopover === void 0 ? DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER : infoPopover;
|
|
13228
|
+
const rootSx = mergeSx4(
|
|
13229
|
+
{
|
|
13230
|
+
bgcolor: "#FFFFFF",
|
|
13231
|
+
borderRadius: 2,
|
|
13232
|
+
boxShadow: "0 1px 3px rgba(15, 23, 42, 0.08)",
|
|
13233
|
+
...width !== void 0 ? { width } : null,
|
|
13234
|
+
...maxWidth !== void 0 ? { maxWidth } : null,
|
|
13235
|
+
...minWidth !== void 0 ? { minWidth } : null
|
|
13236
|
+
},
|
|
13237
|
+
customization?.rootCard?.sx
|
|
13238
|
+
);
|
|
13239
|
+
const titleSx = mergeSx4(
|
|
13240
|
+
{
|
|
13241
|
+
fontWeight: 700,
|
|
13242
|
+
fontSize: { xs: "1rem", sm: "1.05rem" },
|
|
13243
|
+
color: "#0f172a"
|
|
13244
|
+
},
|
|
13245
|
+
customization?.header?.titleSx
|
|
13246
|
+
);
|
|
13247
|
+
const bottomLegendSx = mergeSx4(
|
|
13248
|
+
{
|
|
13249
|
+
display: "flex",
|
|
13250
|
+
flexWrap: "wrap",
|
|
13251
|
+
alignItems: "center",
|
|
13252
|
+
rowGap: 1,
|
|
13253
|
+
mt: 1.5,
|
|
13254
|
+
px: 0.5
|
|
13255
|
+
},
|
|
13256
|
+
customization?.bottomLegend?.sx
|
|
13257
|
+
);
|
|
13258
|
+
const showOuterHeader = Boolean(title) || Boolean(resolvedInfo);
|
|
13259
|
+
const hasData = data.length > 0;
|
|
13260
|
+
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: [
|
|
13261
|
+
showOuterHeader ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13262
|
+
import_Stack19.default,
|
|
13263
|
+
{
|
|
13264
|
+
direction: "row",
|
|
13265
|
+
alignItems: "center",
|
|
13266
|
+
justifyContent: "space-between",
|
|
13267
|
+
gap: 2,
|
|
13268
|
+
flexWrap: "wrap",
|
|
13269
|
+
children: [
|
|
13270
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Typography18.default, { sx: titleSx, children: title }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", {}),
|
|
13271
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13272
|
+
import_Stack19.default,
|
|
13273
|
+
{
|
|
13274
|
+
direction: "row",
|
|
13275
|
+
alignItems: "center",
|
|
13276
|
+
spacing: 1.5,
|
|
13277
|
+
sx: { flexShrink: 0 },
|
|
13278
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
13279
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
13280
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13281
|
+
ChartWidgetInfoButton,
|
|
13282
|
+
{
|
|
13283
|
+
popover: resolvedInfo,
|
|
13284
|
+
ariaLabel: "Store performance by assist information"
|
|
13285
|
+
}
|
|
13286
|
+
)
|
|
13287
|
+
] }) : null
|
|
13288
|
+
}
|
|
13289
|
+
)
|
|
13290
|
+
]
|
|
13291
|
+
}
|
|
13292
|
+
) : null,
|
|
13293
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13294
|
+
StackedComparisonBarChart,
|
|
13295
|
+
{
|
|
13296
|
+
subHeading,
|
|
13297
|
+
showSortToggle,
|
|
13298
|
+
onSortToggle,
|
|
13299
|
+
showSubHeadingDivider,
|
|
13300
|
+
showHeaderLegend,
|
|
13301
|
+
enableHorizontalScroll,
|
|
13302
|
+
chartMinWidth,
|
|
13303
|
+
categoryWidthPx,
|
|
13304
|
+
buckets,
|
|
13305
|
+
data,
|
|
13306
|
+
stackedLegendLabel: attendedLegendLabel,
|
|
13307
|
+
comparisonLegendLabel: unattendedLegendLabel,
|
|
13308
|
+
yAxisDomain,
|
|
13309
|
+
yAxisTicks,
|
|
13310
|
+
yAxisTickFormatter,
|
|
13311
|
+
renderTooltip,
|
|
13312
|
+
emptyStatePlaceholderProps,
|
|
13313
|
+
customization: customization?.chart
|
|
13314
|
+
}
|
|
13315
|
+
),
|
|
13316
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Box21.default, { sx: bottomLegendSx, children: [
|
|
13317
|
+
buckets.map((b, i) => {
|
|
13318
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
13319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13320
|
+
import_Stack19.default,
|
|
13321
|
+
{
|
|
13322
|
+
direction: "row",
|
|
13323
|
+
alignItems: "center",
|
|
13324
|
+
spacing: 0.75,
|
|
13325
|
+
sx: { mr: 2 },
|
|
13326
|
+
children: [
|
|
13327
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color, size: bottomSwatch }),
|
|
13328
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13329
|
+
import_Typography18.default,
|
|
13330
|
+
{
|
|
13331
|
+
sx: {
|
|
13332
|
+
fontSize: bottomLegendFs,
|
|
13333
|
+
color: bottomLegendColor,
|
|
13334
|
+
fontWeight: 500
|
|
13335
|
+
},
|
|
13336
|
+
children: b.label
|
|
13337
|
+
}
|
|
13338
|
+
)
|
|
13339
|
+
]
|
|
13340
|
+
},
|
|
13341
|
+
b.id
|
|
13342
|
+
);
|
|
13343
|
+
}),
|
|
13344
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13345
|
+
import_Box21.default,
|
|
13346
|
+
{
|
|
13347
|
+
sx: {
|
|
13348
|
+
width: "1px",
|
|
13349
|
+
height: 14,
|
|
13350
|
+
bgcolor: bottomLegendDividerColor,
|
|
13351
|
+
mx: 1
|
|
13352
|
+
}
|
|
13353
|
+
}
|
|
13354
|
+
),
|
|
13355
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13356
|
+
import_Stack19.default,
|
|
13357
|
+
{
|
|
13358
|
+
direction: "row",
|
|
13359
|
+
alignItems: "center",
|
|
13360
|
+
spacing: 0.75,
|
|
13361
|
+
sx: { mr: 2 },
|
|
13362
|
+
children: [
|
|
13363
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color: comparisonColor, size: bottomSwatch }),
|
|
13364
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13365
|
+
import_Typography18.default,
|
|
13366
|
+
{
|
|
13367
|
+
sx: {
|
|
13368
|
+
fontSize: bottomLegendFs,
|
|
13369
|
+
color: bottomLegendColor,
|
|
13370
|
+
fontWeight: 500
|
|
13371
|
+
},
|
|
13372
|
+
children: unattendedBottomLegendLabel
|
|
13373
|
+
}
|
|
13374
|
+
)
|
|
13375
|
+
]
|
|
13376
|
+
}
|
|
13377
|
+
)
|
|
13378
|
+
] }) : null
|
|
13379
|
+
] }) }) });
|
|
13380
|
+
}
|
|
13381
|
+
|
|
13382
|
+
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
13383
|
+
var import_react21 = require("@iconify/react");
|
|
13384
|
+
var import_material19 = require("@mui/material");
|
|
13385
|
+
var React26 = __toESM(require("react"));
|
|
13386
|
+
var import_react22 = require("react");
|
|
13387
|
+
var import_recharts10 = require("recharts");
|
|
13388
|
+
|
|
13389
|
+
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
13390
|
+
var DEFAULT_FOOTFALL_TILE_ICONS = {
|
|
13391
|
+
visitors: "fluent:people-community-16-filled",
|
|
13392
|
+
dwell: "clarity:clock-solid",
|
|
13393
|
+
headerInfo: "mdi:information-outline"
|
|
13394
|
+
};
|
|
13395
|
+
|
|
13396
|
+
// src/components/widgets/FootFallHeatMap/footfallHeatMapDerivedStrip.ts
|
|
13397
|
+
var ZONE_SEGMENT_COLORS = [
|
|
13398
|
+
"#E5735F",
|
|
13399
|
+
"#7EB0C2",
|
|
13400
|
+
"#F4C20D",
|
|
13401
|
+
"#6D6ED7"
|
|
12389
13402
|
];
|
|
12390
13403
|
var DEFAULT_SEGMENT_LABELS = [
|
|
12391
13404
|
"Walk-by",
|
|
@@ -12431,7 +13444,8 @@ function rowFromHeuristicLabel(zoneName, total) {
|
|
|
12431
13444
|
}));
|
|
12432
13445
|
return { id, label: zoneName, value: a + b + c + d, segments };
|
|
12433
13446
|
}
|
|
12434
|
-
function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
|
|
13447
|
+
function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow, options) {
|
|
13448
|
+
const includeZeroValueRows = options?.includeZeroValueRows ?? false;
|
|
12435
13449
|
const buildRow = (node, role, total, fallback) => {
|
|
12436
13450
|
if (buildBarRow) {
|
|
12437
13451
|
const custom = buildBarRow({ node, activeZone, role, total });
|
|
@@ -12441,7 +13455,7 @@ function deriveFootfallHeatMapKpiStrip(activeZone, childTiles, buildBarRow) {
|
|
|
12441
13455
|
};
|
|
12442
13456
|
if (activeZone) {
|
|
12443
13457
|
const childRowsSource = (activeZone.list ?? []).filter(
|
|
12444
|
-
(n) => parseVisitorCount(n.overallData?.count) > 0
|
|
13458
|
+
(n) => includeZeroValueRows ? true : parseVisitorCount(n.overallData?.count) > 0
|
|
12445
13459
|
);
|
|
12446
13460
|
if (childRowsSource.length > 0) {
|
|
12447
13461
|
const items = childRowsSource.map((node) => {
|
|
@@ -12794,7 +13808,7 @@ function getNestedList(payload) {
|
|
|
12794
13808
|
}
|
|
12795
13809
|
|
|
12796
13810
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12797
|
-
var
|
|
13811
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12798
13812
|
function toDisplayNumber(value) {
|
|
12799
13813
|
if (!Number.isFinite(value)) return "0";
|
|
12800
13814
|
return new Intl.NumberFormat("en-IN").format(value);
|
|
@@ -12813,7 +13827,7 @@ function InlineStatCard({
|
|
|
12813
13827
|
sx,
|
|
12814
13828
|
iconColor = "#1565C0"
|
|
12815
13829
|
}) {
|
|
12816
|
-
return /* @__PURE__ */ (0,
|
|
13830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12817
13831
|
import_material19.Paper,
|
|
12818
13832
|
{
|
|
12819
13833
|
elevation: 0,
|
|
@@ -12829,8 +13843,8 @@ function InlineStatCard({
|
|
|
12829
13843
|
},
|
|
12830
13844
|
...sx ? [sx] : []
|
|
12831
13845
|
],
|
|
12832
|
-
children: /* @__PURE__ */ (0,
|
|
12833
|
-
/* @__PURE__ */ (0,
|
|
13846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
13847
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12834
13848
|
import_react21.Icon,
|
|
12835
13849
|
{
|
|
12836
13850
|
icon,
|
|
@@ -12840,8 +13854,8 @@ function InlineStatCard({
|
|
|
12840
13854
|
style: { flexShrink: 0 }
|
|
12841
13855
|
}
|
|
12842
13856
|
),
|
|
12843
|
-
/* @__PURE__ */ (0,
|
|
12844
|
-
/* @__PURE__ */ (0,
|
|
13857
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.15, children: [
|
|
13858
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12845
13859
|
import_material19.Typography,
|
|
12846
13860
|
{
|
|
12847
13861
|
variant: "body2",
|
|
@@ -12849,7 +13863,7 @@ function InlineStatCard({
|
|
|
12849
13863
|
children: title
|
|
12850
13864
|
}
|
|
12851
13865
|
),
|
|
12852
|
-
/* @__PURE__ */ (0,
|
|
13866
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12853
13867
|
import_material19.Typography,
|
|
12854
13868
|
{
|
|
12855
13869
|
variant: "h6",
|
|
@@ -12879,8 +13893,8 @@ function InlineSegmentStrip({
|
|
|
12879
13893
|
const barHeight = presentation?.barHeight ?? 12;
|
|
12880
13894
|
const trackInsetPx = presentation?.trackInsetPx ?? 3;
|
|
12881
13895
|
const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
|
|
12882
|
-
return /* @__PURE__ */ (0,
|
|
12883
|
-
/* @__PURE__ */ (0,
|
|
13896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.75, children: [
|
|
13897
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12884
13898
|
import_material19.Stack,
|
|
12885
13899
|
{
|
|
12886
13900
|
direction: "row",
|
|
@@ -12888,7 +13902,7 @@ function InlineSegmentStrip({
|
|
|
12888
13902
|
justifyContent: "space-between",
|
|
12889
13903
|
gap: 1,
|
|
12890
13904
|
children: [
|
|
12891
|
-
/* @__PURE__ */ (0,
|
|
13905
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12892
13906
|
import_material19.Typography,
|
|
12893
13907
|
{
|
|
12894
13908
|
variant: "subtitle2",
|
|
@@ -12899,7 +13913,7 @@ function InlineSegmentStrip({
|
|
|
12899
13913
|
children: item.label
|
|
12900
13914
|
}
|
|
12901
13915
|
),
|
|
12902
|
-
/* @__PURE__ */ (0,
|
|
13916
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12903
13917
|
import_material19.Typography,
|
|
12904
13918
|
{
|
|
12905
13919
|
variant: "body2",
|
|
@@ -12913,7 +13927,7 @@ function InlineSegmentStrip({
|
|
|
12913
13927
|
]
|
|
12914
13928
|
}
|
|
12915
13929
|
),
|
|
12916
|
-
/* @__PURE__ */ (0,
|
|
13930
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12917
13931
|
import_material19.Box,
|
|
12918
13932
|
{
|
|
12919
13933
|
sx: {
|
|
@@ -12931,7 +13945,7 @@ function InlineSegmentStrip({
|
|
|
12931
13945
|
const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
|
|
12932
13946
|
const isLast = idx === lastIdx;
|
|
12933
13947
|
const fill = resolveSegmentFill(presentation, idx, segment.color);
|
|
12934
|
-
return /* @__PURE__ */ (0,
|
|
13948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12935
13949
|
import_material19.Tooltip,
|
|
12936
13950
|
{
|
|
12937
13951
|
title: (() => {
|
|
@@ -12944,7 +13958,7 @@ function InlineSegmentStrip({
|
|
|
12944
13958
|
});
|
|
12945
13959
|
return custom == null ? "" : custom;
|
|
12946
13960
|
}
|
|
12947
|
-
return /* @__PURE__ */ (0,
|
|
13961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12948
13962
|
InlineSegmentTooltipCard,
|
|
12949
13963
|
{
|
|
12950
13964
|
segment,
|
|
@@ -12959,7 +13973,7 @@ function InlineSegmentStrip({
|
|
|
12959
13973
|
sx: inlineSegmentTooltipPopperSx
|
|
12960
13974
|
}
|
|
12961
13975
|
},
|
|
12962
|
-
children: /* @__PURE__ */ (0,
|
|
13976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12963
13977
|
import_material19.Box,
|
|
12964
13978
|
{
|
|
12965
13979
|
sx: {
|
|
@@ -13004,9 +14018,9 @@ function InlineSegmentTooltipCard({
|
|
|
13004
14018
|
cardSx
|
|
13005
14019
|
}) {
|
|
13006
14020
|
const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
|
|
13007
|
-
return /* @__PURE__ */ (0,
|
|
13008
|
-
/* @__PURE__ */ (0,
|
|
13009
|
-
/* @__PURE__ */ (0,
|
|
14021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Box, { sx: tooltipSurfaceSx, children: [
|
|
14022
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Box, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
|
|
14023
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13010
14024
|
import_material19.Box,
|
|
13011
14025
|
{
|
|
13012
14026
|
sx: {
|
|
@@ -13019,7 +14033,7 @@ function InlineSegmentTooltipCard({
|
|
|
13019
14033
|
py: 1.25
|
|
13020
14034
|
},
|
|
13021
14035
|
children: [
|
|
13022
|
-
/* @__PURE__ */ (0,
|
|
14036
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13023
14037
|
import_material19.Box,
|
|
13024
14038
|
{
|
|
13025
14039
|
component: "span",
|
|
@@ -13033,7 +14047,7 @@ function InlineSegmentTooltipCard({
|
|
|
13033
14047
|
}
|
|
13034
14048
|
}
|
|
13035
14049
|
),
|
|
13036
|
-
/* @__PURE__ */ (0,
|
|
14050
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13037
14051
|
import_material19.Typography,
|
|
13038
14052
|
{
|
|
13039
14053
|
component: "span",
|
|
@@ -13046,7 +14060,7 @@ function InlineSegmentTooltipCard({
|
|
|
13046
14060
|
children: segment.label
|
|
13047
14061
|
}
|
|
13048
14062
|
),
|
|
13049
|
-
/* @__PURE__ */ (0,
|
|
14063
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13050
14064
|
import_material19.Typography,
|
|
13051
14065
|
{
|
|
13052
14066
|
component: "span",
|
|
@@ -13059,7 +14073,7 @@ function InlineSegmentTooltipCard({
|
|
|
13059
14073
|
children: " : "
|
|
13060
14074
|
}
|
|
13061
14075
|
),
|
|
13062
|
-
/* @__PURE__ */ (0,
|
|
14076
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13063
14077
|
import_material19.Typography,
|
|
13064
14078
|
{
|
|
13065
14079
|
component: "span",
|
|
@@ -13090,7 +14104,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13090
14104
|
const statIcon = presentation?.statCardIconColor ?? "#1565C0";
|
|
13091
14105
|
const customSummary = presentation?.summaryCards?.(summaryKpis);
|
|
13092
14106
|
const useCustomSummary = customSummary !== void 0;
|
|
13093
|
-
return /* @__PURE__ */ (0,
|
|
14107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13094
14108
|
import_material19.Stack,
|
|
13095
14109
|
{
|
|
13096
14110
|
spacing: 2,
|
|
@@ -13100,7 +14114,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13100
14114
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
13101
14115
|
],
|
|
13102
14116
|
children: [
|
|
13103
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0,
|
|
14117
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13104
14118
|
import_material19.Stack,
|
|
13105
14119
|
{
|
|
13106
14120
|
direction: "row",
|
|
@@ -13108,7 +14122,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13108
14122
|
flexWrap: "wrap",
|
|
13109
14123
|
useFlexGap: true,
|
|
13110
14124
|
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
13111
|
-
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0,
|
|
14125
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13112
14126
|
InlineStatCard,
|
|
13113
14127
|
{
|
|
13114
14128
|
icon: card.icon ?? "mdi:chart-box-outline",
|
|
@@ -13121,7 +14135,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13121
14135
|
},
|
|
13122
14136
|
card.id
|
|
13123
14137
|
)) : [
|
|
13124
|
-
/* @__PURE__ */ (0,
|
|
14138
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13125
14139
|
InlineStatCard,
|
|
13126
14140
|
{
|
|
13127
14141
|
icon: "mdi:store-marker-outline",
|
|
@@ -13132,7 +14146,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13132
14146
|
},
|
|
13133
14147
|
"default-stores"
|
|
13134
14148
|
),
|
|
13135
|
-
/* @__PURE__ */ (0,
|
|
14149
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13136
14150
|
InlineStatCard,
|
|
13137
14151
|
{
|
|
13138
14152
|
icon: "fluent:people-community-16-filled",
|
|
@@ -13146,7 +14160,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13146
14160
|
]
|
|
13147
14161
|
}
|
|
13148
14162
|
),
|
|
13149
|
-
/* @__PURE__ */ (0,
|
|
14163
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13150
14164
|
import_material19.Stack,
|
|
13151
14165
|
{
|
|
13152
14166
|
spacing: 1.25,
|
|
@@ -13154,7 +14168,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13154
14168
|
{ pt: 0.5, pb: 1 },
|
|
13155
14169
|
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
13156
14170
|
],
|
|
13157
|
-
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0,
|
|
14171
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13158
14172
|
InlineSegmentStrip,
|
|
13159
14173
|
{
|
|
13160
14174
|
item,
|
|
@@ -13384,7 +14398,8 @@ function FootFallHeatMapView({
|
|
|
13384
14398
|
return deriveFootfallHeatMapKpiStrip(
|
|
13385
14399
|
activeZoneForStrip,
|
|
13386
14400
|
data.current ?? [],
|
|
13387
|
-
kpiStripPresentation?.buildBarRow
|
|
14401
|
+
kpiStripPresentation?.buildBarRow,
|
|
14402
|
+
{ includeZeroValueRows: kpiStripPresentation?.includeZeroValueRows }
|
|
13388
14403
|
);
|
|
13389
14404
|
}, [
|
|
13390
14405
|
isLoading,
|
|
@@ -13392,7 +14407,8 @@ function FootFallHeatMapView({
|
|
|
13392
14407
|
initialData,
|
|
13393
14408
|
trackingDetails,
|
|
13394
14409
|
data,
|
|
13395
|
-
kpiStripPresentation?.buildBarRow
|
|
14410
|
+
kpiStripPresentation?.buildBarRow,
|
|
14411
|
+
kpiStripPresentation?.includeZeroValueRows
|
|
13396
14412
|
]);
|
|
13397
14413
|
const formatPercentage = (value) => {
|
|
13398
14414
|
if (typeof value !== "number") return "0%";
|
|
@@ -13474,7 +14490,7 @@ function FootFallHeatMapView({
|
|
|
13474
14490
|
);
|
|
13475
14491
|
const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
|
|
13476
14492
|
const p = inner;
|
|
13477
|
-
return /* @__PURE__ */ (0,
|
|
14493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13478
14494
|
"foreignObject",
|
|
13479
14495
|
{
|
|
13480
14496
|
x,
|
|
@@ -13482,7 +14498,7 @@ function FootFallHeatMapView({
|
|
|
13482
14498
|
width,
|
|
13483
14499
|
height,
|
|
13484
14500
|
style: { borderRadius: "12px", overflow: "hidden" },
|
|
13485
|
-
children: /* @__PURE__ */ (0,
|
|
14501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13486
14502
|
import_material19.Stack,
|
|
13487
14503
|
{
|
|
13488
14504
|
onClick: handleClick,
|
|
@@ -13513,7 +14529,7 @@ function FootFallHeatMapView({
|
|
|
13513
14529
|
}
|
|
13514
14530
|
},
|
|
13515
14531
|
children: [
|
|
13516
|
-
/* @__PURE__ */ (0,
|
|
14532
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13517
14533
|
import_material19.Stack,
|
|
13518
14534
|
{
|
|
13519
14535
|
direction: isSmall ? "row" : "column",
|
|
@@ -13525,7 +14541,7 @@ function FootFallHeatMapView({
|
|
|
13525
14541
|
mb: isSmall ? 0.5 : 1
|
|
13526
14542
|
},
|
|
13527
14543
|
children: [
|
|
13528
|
-
/* @__PURE__ */ (0,
|
|
14544
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13529
14545
|
import_material19.Typography,
|
|
13530
14546
|
{
|
|
13531
14547
|
sx: {
|
|
@@ -13548,7 +14564,7 @@ function FootFallHeatMapView({
|
|
|
13548
14564
|
children: name
|
|
13549
14565
|
}
|
|
13550
14566
|
),
|
|
13551
|
-
/* @__PURE__ */ (0,
|
|
14567
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13552
14568
|
import_material19.Typography,
|
|
13553
14569
|
{
|
|
13554
14570
|
sx: {
|
|
@@ -13563,7 +14579,7 @@ function FootFallHeatMapView({
|
|
|
13563
14579
|
]
|
|
13564
14580
|
}
|
|
13565
14581
|
),
|
|
13566
|
-
/* @__PURE__ */ (0,
|
|
14582
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13567
14583
|
import_material19.Stack,
|
|
13568
14584
|
{
|
|
13569
14585
|
direction: "row",
|
|
@@ -13577,7 +14593,7 @@ function FootFallHeatMapView({
|
|
|
13577
14593
|
...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
|
|
13578
14594
|
],
|
|
13579
14595
|
children: [
|
|
13580
|
-
/* @__PURE__ */ (0,
|
|
14596
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13581
14597
|
import_material19.Stack,
|
|
13582
14598
|
{
|
|
13583
14599
|
direction: "row",
|
|
@@ -13595,7 +14611,7 @@ function FootFallHeatMapView({
|
|
|
13595
14611
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13596
14612
|
],
|
|
13597
14613
|
children: [
|
|
13598
|
-
/* @__PURE__ */ (0,
|
|
14614
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13599
14615
|
import_material19.Box,
|
|
13600
14616
|
{
|
|
13601
14617
|
sx: [
|
|
@@ -13608,7 +14624,7 @@ function FootFallHeatMapView({
|
|
|
13608
14624
|
},
|
|
13609
14625
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13610
14626
|
],
|
|
13611
|
-
children: /* @__PURE__ */ (0,
|
|
14627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13612
14628
|
import_react21.Icon,
|
|
13613
14629
|
{
|
|
13614
14630
|
icon: icons.visitors,
|
|
@@ -13618,7 +14634,7 @@ function FootFallHeatMapView({
|
|
|
13618
14634
|
)
|
|
13619
14635
|
}
|
|
13620
14636
|
),
|
|
13621
|
-
/* @__PURE__ */ (0,
|
|
14637
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13622
14638
|
import_material19.Typography,
|
|
13623
14639
|
{
|
|
13624
14640
|
sx: [
|
|
@@ -13636,7 +14652,7 @@ function FootFallHeatMapView({
|
|
|
13636
14652
|
]
|
|
13637
14653
|
}
|
|
13638
14654
|
),
|
|
13639
|
-
/* @__PURE__ */ (0,
|
|
14655
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13640
14656
|
import_material19.Stack,
|
|
13641
14657
|
{
|
|
13642
14658
|
direction: "row",
|
|
@@ -13654,7 +14670,7 @@ function FootFallHeatMapView({
|
|
|
13654
14670
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13655
14671
|
],
|
|
13656
14672
|
children: [
|
|
13657
|
-
/* @__PURE__ */ (0,
|
|
14673
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13658
14674
|
import_material19.Box,
|
|
13659
14675
|
{
|
|
13660
14676
|
sx: [
|
|
@@ -13667,7 +14683,7 @@ function FootFallHeatMapView({
|
|
|
13667
14683
|
},
|
|
13668
14684
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13669
14685
|
],
|
|
13670
|
-
children: /* @__PURE__ */ (0,
|
|
14686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13671
14687
|
import_react21.Icon,
|
|
13672
14688
|
{
|
|
13673
14689
|
icon: icons.dwell,
|
|
@@ -13677,7 +14693,7 @@ function FootFallHeatMapView({
|
|
|
13677
14693
|
)
|
|
13678
14694
|
}
|
|
13679
14695
|
),
|
|
13680
|
-
/* @__PURE__ */ (0,
|
|
14696
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13681
14697
|
import_material19.Typography,
|
|
13682
14698
|
{
|
|
13683
14699
|
sx: [
|
|
@@ -13720,7 +14736,7 @@ function FootFallHeatMapView({
|
|
|
13720
14736
|
const LabelTag = ({ textColor = "#f0f0f0" }) => {
|
|
13721
14737
|
const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
|
|
13722
14738
|
const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
|
|
13723
|
-
return /* @__PURE__ */ (0,
|
|
14739
|
+
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)(
|
|
13724
14740
|
import_material19.Typography,
|
|
13725
14741
|
{
|
|
13726
14742
|
component: "span",
|
|
@@ -13734,9 +14750,9 @@ function FootFallHeatMapView({
|
|
|
13734
14750
|
color: textColor,
|
|
13735
14751
|
children: brandLabel
|
|
13736
14752
|
}
|
|
13737
|
-
) : /* @__PURE__ */ (0,
|
|
13738
|
-
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0,
|
|
13739
|
-
i > 0 ? /* @__PURE__ */ (0,
|
|
14753
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14754
|
+
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(React26.Fragment, { children: [
|
|
14755
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13740
14756
|
import_material19.Typography,
|
|
13741
14757
|
{
|
|
13742
14758
|
component: "span",
|
|
@@ -13747,7 +14763,7 @@ function FootFallHeatMapView({
|
|
|
13747
14763
|
children: "/"
|
|
13748
14764
|
}
|
|
13749
14765
|
) : null,
|
|
13750
|
-
/* @__PURE__ */ (0,
|
|
14766
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13751
14767
|
import_material19.Typography,
|
|
13752
14768
|
{
|
|
13753
14769
|
component: "span",
|
|
@@ -13763,8 +14779,8 @@ function FootFallHeatMapView({
|
|
|
13763
14779
|
}
|
|
13764
14780
|
)
|
|
13765
14781
|
] }, `${seg}-${i}`)),
|
|
13766
|
-
brandLabel ? /* @__PURE__ */ (0,
|
|
13767
|
-
/* @__PURE__ */ (0,
|
|
14782
|
+
brandLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14783
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13768
14784
|
import_material19.Typography,
|
|
13769
14785
|
{
|
|
13770
14786
|
component: "span",
|
|
@@ -13774,7 +14790,7 @@ function FootFallHeatMapView({
|
|
|
13774
14790
|
children: "/"
|
|
13775
14791
|
}
|
|
13776
14792
|
),
|
|
13777
|
-
/* @__PURE__ */ (0,
|
|
14793
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13778
14794
|
import_material19.Typography,
|
|
13779
14795
|
{
|
|
13780
14796
|
component: "span",
|
|
@@ -13794,10 +14810,10 @@ function FootFallHeatMapView({
|
|
|
13794
14810
|
};
|
|
13795
14811
|
const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
|
|
13796
14812
|
if (is500Error) {
|
|
13797
|
-
return /* @__PURE__ */ (0,
|
|
14813
|
+
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." }) });
|
|
13798
14814
|
}
|
|
13799
14815
|
if (isLoading || loading) {
|
|
13800
|
-
return /* @__PURE__ */ (0,
|
|
14816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13801
14817
|
import_material19.Skeleton,
|
|
13802
14818
|
{
|
|
13803
14819
|
variant: "rectangular",
|
|
@@ -13838,8 +14854,8 @@ function FootFallHeatMapView({
|
|
|
13838
14854
|
"#888888",
|
|
13839
14855
|
"header"
|
|
13840
14856
|
);
|
|
13841
|
-
return /* @__PURE__ */ (0,
|
|
13842
|
-
/* @__PURE__ */ (0,
|
|
14857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { width: "100%", children: [
|
|
14858
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13843
14859
|
import_material19.Box,
|
|
13844
14860
|
{
|
|
13845
14861
|
sx: {
|
|
@@ -13851,16 +14867,16 @@ function FootFallHeatMapView({
|
|
|
13851
14867
|
gap: 1
|
|
13852
14868
|
},
|
|
13853
14869
|
children: [
|
|
13854
|
-
/* @__PURE__ */ (0,
|
|
13855
|
-
/* @__PURE__ */ (0,
|
|
13856
|
-
isFetching ? /* @__PURE__ */ (0,
|
|
13857
|
-
/* @__PURE__ */ (0,
|
|
14870
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "h6", fontWeight: 700, children: title }),
|
|
14871
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
14872
|
+
isFetching ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
|
|
14873
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Tooltip, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13858
14874
|
import_material19.IconButton,
|
|
13859
14875
|
{
|
|
13860
14876
|
size: "small",
|
|
13861
14877
|
"aria-label": "Zone performance info",
|
|
13862
14878
|
edge: "end",
|
|
13863
|
-
children: /* @__PURE__ */ (0,
|
|
14879
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13864
14880
|
import_react21.Icon,
|
|
13865
14881
|
{
|
|
13866
14882
|
icon: icons.headerInfo,
|
|
@@ -13875,7 +14891,7 @@ function FootFallHeatMapView({
|
|
|
13875
14891
|
]
|
|
13876
14892
|
}
|
|
13877
14893
|
),
|
|
13878
|
-
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0,
|
|
14894
|
+
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13879
14895
|
import_material19.Stack,
|
|
13880
14896
|
{
|
|
13881
14897
|
direction: "row",
|
|
@@ -13890,13 +14906,13 @@ function FootFallHeatMapView({
|
|
|
13890
14906
|
backgroundColor: zoneBarColor
|
|
13891
14907
|
},
|
|
13892
14908
|
children: [
|
|
13893
|
-
/* @__PURE__ */ (0,
|
|
13894
|
-
/* @__PURE__ */ (0,
|
|
14909
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
14910
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13895
14911
|
import_material19.Button,
|
|
13896
14912
|
{
|
|
13897
14913
|
size: "small",
|
|
13898
14914
|
onClick: handleClose,
|
|
13899
|
-
startIcon: /* @__PURE__ */ (0,
|
|
14915
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13900
14916
|
import_react21.Icon,
|
|
13901
14917
|
{
|
|
13902
14918
|
icon: "mdi:chevron-left",
|
|
@@ -13916,9 +14932,9 @@ function FootFallHeatMapView({
|
|
|
13916
14932
|
children: "Back"
|
|
13917
14933
|
}
|
|
13918
14934
|
),
|
|
13919
|
-
/* @__PURE__ */ (0,
|
|
14935
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LabelTag, { textColor: zoneBarHeaderFg })
|
|
13920
14936
|
] }),
|
|
13921
|
-
/* @__PURE__ */ (0,
|
|
14937
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13922
14938
|
import_material19.Typography,
|
|
13923
14939
|
{
|
|
13924
14940
|
variant: "h6",
|
|
@@ -13933,7 +14949,7 @@ function FootFallHeatMapView({
|
|
|
13933
14949
|
]
|
|
13934
14950
|
}
|
|
13935
14951
|
) : null,
|
|
13936
|
-
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0,
|
|
14952
|
+
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13937
14953
|
FootfallHeatMapKpiRankedBlock,
|
|
13938
14954
|
{
|
|
13939
14955
|
strip: derivedKpiStrip,
|
|
@@ -13950,7 +14966,7 @@ function FootFallHeatMapView({
|
|
|
13950
14966
|
}
|
|
13951
14967
|
}
|
|
13952
14968
|
) : null,
|
|
13953
|
-
showLeafDetailsBody ? /* @__PURE__ */ (0,
|
|
14969
|
+
showLeafDetailsBody ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13954
14970
|
import_material19.Box,
|
|
13955
14971
|
{
|
|
13956
14972
|
sx: [
|
|
@@ -13966,8 +14982,8 @@ function FootFallHeatMapView({
|
|
|
13966
14982
|
]
|
|
13967
14983
|
}
|
|
13968
14984
|
) : null,
|
|
13969
|
-
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0,
|
|
13970
|
-
|
|
14985
|
+
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)(
|
|
14986
|
+
import_recharts10.Treemap,
|
|
13971
14987
|
{
|
|
13972
14988
|
data: data?.current ?? [],
|
|
13973
14989
|
dataKey: "value",
|
|
@@ -13979,22 +14995,22 @@ function FootFallHeatMapView({
|
|
|
13979
14995
|
animationDuration: 0,
|
|
13980
14996
|
style: { borderRadius: "12px" }
|
|
13981
14997
|
}
|
|
13982
|
-
) }) : /* @__PURE__ */ (0,
|
|
14998
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13983
14999
|
ChartEmptyState,
|
|
13984
15000
|
{
|
|
13985
15001
|
minHeight: treemapHeight,
|
|
13986
15002
|
...emptyStatePlaceholderProps
|
|
13987
15003
|
}
|
|
13988
|
-
) : /* @__PURE__ */ (0,
|
|
15004
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
|
|
13989
15005
|
] });
|
|
13990
15006
|
}
|
|
13991
15007
|
|
|
13992
15008
|
// src/components/widgets/FootFallHeatMap/ZoneWiseKpiCards.tsx
|
|
13993
15009
|
var import_Grid2 = __toESM(require("@mui/material/Grid"));
|
|
13994
15010
|
var import_Paper3 = __toESM(require("@mui/material/Paper"));
|
|
13995
|
-
var
|
|
13996
|
-
var
|
|
13997
|
-
var
|
|
15011
|
+
var import_Stack20 = __toESM(require("@mui/material/Stack"));
|
|
15012
|
+
var import_Typography19 = __toESM(require("@mui/material/Typography"));
|
|
15013
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13998
15014
|
function metricsToRows(metrics) {
|
|
13999
15015
|
return [
|
|
14000
15016
|
{ id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
|
|
@@ -14032,7 +15048,7 @@ function metricsToRows(metrics) {
|
|
|
14032
15048
|
}
|
|
14033
15049
|
var ZoneWiseKpiCards = ({ metrics }) => {
|
|
14034
15050
|
const rows = metricsToRows(metrics);
|
|
14035
|
-
return /* @__PURE__ */ (0,
|
|
15051
|
+
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)(
|
|
14036
15052
|
import_Grid2.default,
|
|
14037
15053
|
{
|
|
14038
15054
|
size: {
|
|
@@ -14040,7 +15056,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14040
15056
|
sm: 6,
|
|
14041
15057
|
md: 3
|
|
14042
15058
|
},
|
|
14043
|
-
children: /* @__PURE__ */ (0,
|
|
15059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
14044
15060
|
import_Paper3.default,
|
|
14045
15061
|
{
|
|
14046
15062
|
elevation: 0,
|
|
@@ -14052,8 +15068,8 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14052
15068
|
height: "100%"
|
|
14053
15069
|
},
|
|
14054
15070
|
children: [
|
|
14055
|
-
/* @__PURE__ */ (0,
|
|
14056
|
-
|
|
15071
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
15072
|
+
import_Typography19.default,
|
|
14057
15073
|
{
|
|
14058
15074
|
variant: "caption",
|
|
14059
15075
|
color: "text.secondary",
|
|
@@ -14061,7 +15077,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14061
15077
|
children: item.title
|
|
14062
15078
|
}
|
|
14063
15079
|
),
|
|
14064
|
-
/* @__PURE__ */ (0,
|
|
15080
|
+
/* @__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 }) })
|
|
14065
15081
|
]
|
|
14066
15082
|
}
|
|
14067
15083
|
)
|
|
@@ -14120,32 +15136,32 @@ var peakBillingHoursMockSeriesByTabId = {
|
|
|
14120
15136
|
};
|
|
14121
15137
|
|
|
14122
15138
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14123
|
-
var
|
|
14124
|
-
var
|
|
14125
|
-
var
|
|
15139
|
+
var import_Box22 = __toESM(require("@mui/material/Box"));
|
|
15140
|
+
var import_Card4 = __toESM(require("@mui/material/Card"));
|
|
15141
|
+
var import_CardContent4 = __toESM(require("@mui/material/CardContent"));
|
|
14126
15142
|
var import_Skeleton7 = __toESM(require("@mui/material/Skeleton"));
|
|
14127
|
-
var
|
|
14128
|
-
var
|
|
14129
|
-
var
|
|
14130
|
-
var
|
|
15143
|
+
var import_Stack21 = __toESM(require("@mui/material/Stack"));
|
|
15144
|
+
var import_Typography20 = __toESM(require("@mui/material/Typography"));
|
|
15145
|
+
var React28 = __toESM(require("react"));
|
|
15146
|
+
var import_recharts11 = require("recharts");
|
|
14131
15147
|
|
|
14132
15148
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
|
|
14133
|
-
var
|
|
14134
|
-
var
|
|
14135
|
-
var PeakBillingHoursCustomizationContext =
|
|
15149
|
+
var React27 = __toESM(require("react"));
|
|
15150
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
15151
|
+
var PeakBillingHoursCustomizationContext = React27.createContext({});
|
|
14136
15152
|
function PeakBillingHoursCustomizationProvider({
|
|
14137
15153
|
value,
|
|
14138
15154
|
children
|
|
14139
15155
|
}) {
|
|
14140
|
-
const memo =
|
|
14141
|
-
return /* @__PURE__ */ (0,
|
|
15156
|
+
const memo = React27.useMemo(() => value, [value]);
|
|
15157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
|
|
14142
15158
|
}
|
|
14143
15159
|
function usePeakBillingHoursCustomization() {
|
|
14144
|
-
return
|
|
15160
|
+
return React27.useContext(PeakBillingHoursCustomizationContext);
|
|
14145
15161
|
}
|
|
14146
15162
|
|
|
14147
15163
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
|
|
14148
|
-
var
|
|
15164
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14149
15165
|
function formatTooltipValue2(n) {
|
|
14150
15166
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
14151
15167
|
Math.round(n)
|
|
@@ -14192,7 +15208,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14192
15208
|
},
|
|
14193
15209
|
tt?.bodyStyle
|
|
14194
15210
|
);
|
|
14195
|
-
return /* @__PURE__ */ (0,
|
|
15211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14196
15212
|
"div",
|
|
14197
15213
|
{
|
|
14198
15214
|
style: {
|
|
@@ -14200,7 +15216,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14200
15216
|
minWidth: 160,
|
|
14201
15217
|
maxWidth: 280
|
|
14202
15218
|
},
|
|
14203
|
-
children: /* @__PURE__ */ (0,
|
|
15219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14204
15220
|
"div",
|
|
14205
15221
|
{
|
|
14206
15222
|
style: {
|
|
@@ -14211,7 +15227,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14211
15227
|
boxShadow: shadow
|
|
14212
15228
|
},
|
|
14213
15229
|
children: [
|
|
14214
|
-
/* @__PURE__ */ (0,
|
|
15230
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14215
15231
|
"div",
|
|
14216
15232
|
{
|
|
14217
15233
|
style: {
|
|
@@ -14222,14 +15238,14 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14222
15238
|
"aria-hidden": true
|
|
14223
15239
|
}
|
|
14224
15240
|
),
|
|
14225
|
-
/* @__PURE__ */ (0,
|
|
14226
|
-
/* @__PURE__ */ (0,
|
|
14227
|
-
/* @__PURE__ */ (0,
|
|
14228
|
-
/* @__PURE__ */ (0,
|
|
15241
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: bodyStyle, children: [
|
|
15242
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: rowStyle, children: [
|
|
15243
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
15244
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
14229
15245
|
] }),
|
|
14230
|
-
/* @__PURE__ */ (0,
|
|
14231
|
-
/* @__PURE__ */ (0,
|
|
14232
|
-
/* @__PURE__ */ (0,
|
|
15246
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
15247
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
15248
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
|
|
14233
15249
|
] })
|
|
14234
15250
|
] })
|
|
14235
15251
|
]
|
|
@@ -14240,7 +15256,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14240
15256
|
}
|
|
14241
15257
|
|
|
14242
15258
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14243
|
-
var
|
|
15259
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
14244
15260
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
|
|
14245
15261
|
cartesianGridStroke: "#D3D6DF",
|
|
14246
15262
|
xAxisLineStroke: "#7566FC",
|
|
@@ -14266,7 +15282,7 @@ function PeakBarTopLabel(props) {
|
|
|
14266
15282
|
const cx = nx + nw / 2;
|
|
14267
15283
|
const cy = ny - 6;
|
|
14268
15284
|
const isHorizontal = angle === 0;
|
|
14269
|
-
return /* @__PURE__ */ (0,
|
|
15285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14270
15286
|
"text",
|
|
14271
15287
|
{
|
|
14272
15288
|
x: cx,
|
|
@@ -14280,7 +15296,7 @@ function PeakBarTopLabel(props) {
|
|
|
14280
15296
|
}
|
|
14281
15297
|
);
|
|
14282
15298
|
}
|
|
14283
|
-
function
|
|
15299
|
+
function BarPlot2({
|
|
14284
15300
|
data,
|
|
14285
15301
|
yAxisDomain,
|
|
14286
15302
|
yAxisTicks,
|
|
@@ -14319,24 +15335,24 @@ function BarPlot({
|
|
|
14319
15335
|
barRadius,
|
|
14320
15336
|
barRadius
|
|
14321
15337
|
];
|
|
14322
|
-
return /* @__PURE__ */ (0,
|
|
14323
|
-
|
|
15338
|
+
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)(
|
|
15339
|
+
import_recharts11.BarChart,
|
|
14324
15340
|
{
|
|
14325
15341
|
data,
|
|
14326
15342
|
margin: m,
|
|
14327
15343
|
barCategoryGap: categoryGap,
|
|
14328
15344
|
barGap,
|
|
14329
15345
|
children: [
|
|
14330
|
-
/* @__PURE__ */ (0,
|
|
14331
|
-
|
|
15346
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15347
|
+
import_recharts11.CartesianGrid,
|
|
14332
15348
|
{
|
|
14333
15349
|
strokeDasharray: dash,
|
|
14334
15350
|
vertical: false,
|
|
14335
15351
|
stroke: gridStroke
|
|
14336
15352
|
}
|
|
14337
15353
|
),
|
|
14338
|
-
/* @__PURE__ */ (0,
|
|
14339
|
-
|
|
15354
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15355
|
+
import_recharts11.XAxis,
|
|
14340
15356
|
{
|
|
14341
15357
|
dataKey: "label",
|
|
14342
15358
|
dx: xAxisTickDx,
|
|
@@ -14349,8 +15365,8 @@ function BarPlot({
|
|
|
14349
15365
|
height: 36
|
|
14350
15366
|
}
|
|
14351
15367
|
),
|
|
14352
|
-
/* @__PURE__ */ (0,
|
|
14353
|
-
|
|
15368
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15369
|
+
import_recharts11.YAxis,
|
|
14354
15370
|
{
|
|
14355
15371
|
domain: yAxisDomain,
|
|
14356
15372
|
ticks: yAxisTicks,
|
|
@@ -14361,8 +15377,8 @@ function BarPlot({
|
|
|
14361
15377
|
width: yWidth
|
|
14362
15378
|
}
|
|
14363
15379
|
),
|
|
14364
|
-
/* @__PURE__ */ (0,
|
|
14365
|
-
|
|
15380
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15381
|
+
import_recharts11.Tooltip,
|
|
14366
15382
|
{
|
|
14367
15383
|
content: (tooltipProps) => {
|
|
14368
15384
|
if (renderTooltip) {
|
|
@@ -14371,9 +15387,9 @@ function BarPlot({
|
|
|
14371
15387
|
data,
|
|
14372
15388
|
activeTabId
|
|
14373
15389
|
});
|
|
14374
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
15390
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: customTooltip });
|
|
14375
15391
|
}
|
|
14376
|
-
return /* @__PURE__ */ (0,
|
|
15392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PeakBillingHoursTooltip, { ...tooltipProps });
|
|
14377
15393
|
},
|
|
14378
15394
|
cursor: {
|
|
14379
15395
|
fill: hoverBandFill,
|
|
@@ -14383,8 +15399,8 @@ function BarPlot({
|
|
|
14383
15399
|
allowEscapeViewBox: { x: false, y: true }
|
|
14384
15400
|
}
|
|
14385
15401
|
),
|
|
14386
|
-
/* @__PURE__ */ (0,
|
|
14387
|
-
|
|
15402
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15403
|
+
import_recharts11.Bar,
|
|
14388
15404
|
{
|
|
14389
15405
|
dataKey: "value",
|
|
14390
15406
|
name: "Visits",
|
|
@@ -14392,11 +15408,11 @@ function BarPlot({
|
|
|
14392
15408
|
radius: radiusTuple,
|
|
14393
15409
|
isAnimationActive: false,
|
|
14394
15410
|
maxBarSize: 48,
|
|
14395
|
-
children: /* @__PURE__ */ (0,
|
|
14396
|
-
|
|
15411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15412
|
+
import_recharts11.LabelList,
|
|
14397
15413
|
{
|
|
14398
15414
|
dataKey: "value",
|
|
14399
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
15415
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14400
15416
|
PeakBarTopLabel,
|
|
14401
15417
|
{
|
|
14402
15418
|
...props,
|
|
@@ -14436,7 +15452,7 @@ function PeakBillingHours({
|
|
|
14436
15452
|
emptyStatePlaceholderProps,
|
|
14437
15453
|
customization
|
|
14438
15454
|
}) {
|
|
14439
|
-
const chartData =
|
|
15455
|
+
const chartData = React28.useMemo(() => {
|
|
14440
15456
|
if (seriesByTabId) {
|
|
14441
15457
|
return seriesByTabId[activeTabId] ?? [];
|
|
14442
15458
|
}
|
|
@@ -14471,9 +15487,9 @@ function PeakBillingHours({
|
|
|
14471
15487
|
},
|
|
14472
15488
|
customization?.header?.subtitleSx
|
|
14473
15489
|
);
|
|
14474
|
-
return /* @__PURE__ */ (0,
|
|
14475
|
-
/* @__PURE__ */ (0,
|
|
14476
|
-
|
|
15490
|
+
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: [
|
|
15491
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
15492
|
+
import_Stack21.default,
|
|
14477
15493
|
{
|
|
14478
15494
|
direction: "row",
|
|
14479
15495
|
alignItems: "flex-start",
|
|
@@ -14481,20 +15497,20 @@ function PeakBillingHours({
|
|
|
14481
15497
|
gap: 2,
|
|
14482
15498
|
flexWrap: "wrap",
|
|
14483
15499
|
children: [
|
|
14484
|
-
/* @__PURE__ */ (0,
|
|
14485
|
-
/* @__PURE__ */ (0,
|
|
14486
|
-
/* @__PURE__ */ (0,
|
|
15500
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_Box22.default, { component: "div", sx: { minWidth: 0 }, children: [
|
|
15501
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: titleSx, children: title }),
|
|
15502
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: subtitleSx, children: subtitle })
|
|
14487
15503
|
] }),
|
|
14488
|
-
/* @__PURE__ */ (0,
|
|
14489
|
-
|
|
15504
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15505
|
+
import_Stack21.default,
|
|
14490
15506
|
{
|
|
14491
15507
|
direction: "row",
|
|
14492
15508
|
alignItems: "center",
|
|
14493
15509
|
spacing: 1.5,
|
|
14494
15510
|
sx: { flexShrink: 0 },
|
|
14495
|
-
children: resolvedInfo ? /* @__PURE__ */ (0,
|
|
14496
|
-
/* @__PURE__ */ (0,
|
|
14497
|
-
/* @__PURE__ */ (0,
|
|
15511
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
15512
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
15513
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14498
15514
|
ChartWidgetInfoButton,
|
|
14499
15515
|
{
|
|
14500
15516
|
popover: resolvedInfo,
|
|
@@ -14507,7 +15523,7 @@ function PeakBillingHours({
|
|
|
14507
15523
|
]
|
|
14508
15524
|
}
|
|
14509
15525
|
),
|
|
14510
|
-
/* @__PURE__ */ (0,
|
|
15526
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14511
15527
|
ChartWidgetSegmentedTabs,
|
|
14512
15528
|
{
|
|
14513
15529
|
tabs,
|
|
@@ -14527,8 +15543,8 @@ function PeakBillingHours({
|
|
|
14527
15543
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
14528
15544
|
}
|
|
14529
15545
|
),
|
|
14530
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
14531
|
-
|
|
15546
|
+
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)(
|
|
15547
|
+
BarPlot2,
|
|
14532
15548
|
{
|
|
14533
15549
|
data: chartData,
|
|
14534
15550
|
yAxisDomain,
|
|
@@ -14542,7 +15558,7 @@ function PeakBillingHours({
|
|
|
14542
15558
|
xAxisTickStyle,
|
|
14543
15559
|
barValueLabelAngle
|
|
14544
15560
|
}
|
|
14545
|
-
) : /* @__PURE__ */ (0,
|
|
15561
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14546
15562
|
ChartEmptyState,
|
|
14547
15563
|
{
|
|
14548
15564
|
minHeight: 320,
|
|
@@ -14553,10 +15569,10 @@ function PeakBillingHours({
|
|
|
14553
15569
|
}
|
|
14554
15570
|
|
|
14555
15571
|
// src/components/widgets/CustomerJourneyAnalysis/CustomerJourneyAnalysis.tsx
|
|
14556
|
-
var
|
|
14557
|
-
var
|
|
14558
|
-
var
|
|
14559
|
-
var
|
|
15572
|
+
var import_Box23 = __toESM(require("@mui/material/Box"));
|
|
15573
|
+
var import_Stack22 = __toESM(require("@mui/material/Stack"));
|
|
15574
|
+
var import_Typography21 = __toESM(require("@mui/material/Typography"));
|
|
15575
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
14560
15576
|
var DEFAULT_WALK_INS_BG = "#5B8DEF";
|
|
14561
15577
|
var DEFAULT_TRIAL_VISITS_BG = "#F59E42";
|
|
14562
15578
|
var DEFAULT_BILLING_VISITS_BG = "#6EBE7A";
|
|
@@ -14604,7 +15620,7 @@ function resolveMetricConfig(shared, perCard, props) {
|
|
|
14604
15620
|
sx: perCard?.sx ?? shared?.sx
|
|
14605
15621
|
};
|
|
14606
15622
|
}
|
|
14607
|
-
function
|
|
15623
|
+
function mergeSx5(...items) {
|
|
14608
15624
|
return items.flatMap(
|
|
14609
15625
|
(item) => Array.isArray(item) ? item : item ? [item] : []
|
|
14610
15626
|
);
|
|
@@ -14811,17 +15827,17 @@ function CustomerJourneyAnalysis({
|
|
|
14811
15827
|
...Array.isArray(metricsSx) ? metricsSx : metricsSx ? [metricsSx] : []
|
|
14812
15828
|
];
|
|
14813
15829
|
const bodyDirection = { xs: "column", [bodyBreakpoint]: "row" };
|
|
14814
|
-
return /* @__PURE__ */ (0,
|
|
14815
|
-
!hideTitle && /* @__PURE__ */ (0,
|
|
14816
|
-
|
|
15830
|
+
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: [
|
|
15831
|
+
!hideTitle && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15832
|
+
import_Stack22.default,
|
|
14817
15833
|
{
|
|
14818
15834
|
direction: "row",
|
|
14819
15835
|
alignItems: "flex-start",
|
|
14820
15836
|
justifyContent: "space-between",
|
|
14821
15837
|
gap: 2,
|
|
14822
15838
|
children: [
|
|
14823
|
-
/* @__PURE__ */ (0,
|
|
14824
|
-
|
|
15839
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15840
|
+
import_Typography21.default,
|
|
14825
15841
|
{
|
|
14826
15842
|
component: "h2",
|
|
14827
15843
|
variant: "h6",
|
|
@@ -14834,8 +15850,8 @@ function CustomerJourneyAnalysis({
|
|
|
14834
15850
|
children: title
|
|
14835
15851
|
}
|
|
14836
15852
|
),
|
|
14837
|
-
headerActions != null ? /* @__PURE__ */ (0,
|
|
14838
|
-
|
|
15853
|
+
headerActions != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15854
|
+
import_Box23.default,
|
|
14839
15855
|
{
|
|
14840
15856
|
sx: {
|
|
14841
15857
|
flexShrink: 0,
|
|
@@ -14849,9 +15865,9 @@ function CustomerJourneyAnalysis({
|
|
|
14849
15865
|
]
|
|
14850
15866
|
}
|
|
14851
15867
|
),
|
|
14852
|
-
/* @__PURE__ */ (0,
|
|
14853
|
-
/* @__PURE__ */ (0,
|
|
14854
|
-
/* @__PURE__ */ (0,
|
|
15868
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Stack22.default, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
|
|
15869
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: stripSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Box23.default, { sx: statCardsRowSx, children: [
|
|
15870
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14855
15871
|
JourneyStatCard,
|
|
14856
15872
|
{
|
|
14857
15873
|
icon: wiConfig.icon,
|
|
@@ -14872,7 +15888,7 @@ function CustomerJourneyAnalysis({
|
|
|
14872
15888
|
borderRadius: wiConfig.borderRadius,
|
|
14873
15889
|
minHeight: wiConfig.minHeight,
|
|
14874
15890
|
isLoading,
|
|
14875
|
-
sx:
|
|
15891
|
+
sx: mergeSx5(
|
|
14876
15892
|
{
|
|
14877
15893
|
flex: statCardFlexes[0],
|
|
14878
15894
|
borderRadius: `${statStripInnerBorderRadius} 0 0 ${statStripInnerBorderRadius}`
|
|
@@ -14881,7 +15897,7 @@ function CustomerJourneyAnalysis({
|
|
|
14881
15897
|
)
|
|
14882
15898
|
}
|
|
14883
15899
|
),
|
|
14884
|
-
/* @__PURE__ */ (0,
|
|
15900
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14885
15901
|
JourneyStatCard,
|
|
14886
15902
|
{
|
|
14887
15903
|
icon: tvConfig.icon,
|
|
@@ -14902,10 +15918,10 @@ function CustomerJourneyAnalysis({
|
|
|
14902
15918
|
borderRadius: tvConfig.borderRadius,
|
|
14903
15919
|
minHeight: tvConfig.minHeight,
|
|
14904
15920
|
isLoading,
|
|
14905
|
-
sx:
|
|
15921
|
+
sx: mergeSx5({ flex: statCardFlexes[1] }, tvConfig.sx)
|
|
14906
15922
|
}
|
|
14907
15923
|
),
|
|
14908
|
-
/* @__PURE__ */ (0,
|
|
15924
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14909
15925
|
JourneyStatCard,
|
|
14910
15926
|
{
|
|
14911
15927
|
icon: bvConfig.icon,
|
|
@@ -14926,7 +15942,7 @@ function CustomerJourneyAnalysis({
|
|
|
14926
15942
|
borderRadius: bvConfig.borderRadius,
|
|
14927
15943
|
minHeight: bvConfig.minHeight,
|
|
14928
15944
|
isLoading,
|
|
14929
|
-
sx:
|
|
15945
|
+
sx: mergeSx5(
|
|
14930
15946
|
{
|
|
14931
15947
|
flex: statCardFlexes[2],
|
|
14932
15948
|
borderRadius: `0 ${statStripInnerBorderRadius} ${statStripInnerBorderRadius} 0`
|
|
@@ -14936,8 +15952,8 @@ function CustomerJourneyAnalysis({
|
|
|
14936
15952
|
}
|
|
14937
15953
|
)
|
|
14938
15954
|
] }) }),
|
|
14939
|
-
/* @__PURE__ */ (0,
|
|
14940
|
-
|
|
15955
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: metricsBoxSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15956
|
+
import_Box23.default,
|
|
14941
15957
|
{
|
|
14942
15958
|
sx: {
|
|
14943
15959
|
display: "grid",
|
|
@@ -14970,8 +15986,8 @@ function CustomerJourneyAnalysis({
|
|
|
14970
15986
|
label: avgBillingPerTrialLabel,
|
|
14971
15987
|
value: formatAverage(avgBillingPerTrial)
|
|
14972
15988
|
}
|
|
14973
|
-
].map(({ cfg, label, value }) => /* @__PURE__ */ (0,
|
|
14974
|
-
|
|
15989
|
+
].map(({ cfg, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15990
|
+
import_Box23.default,
|
|
14975
15991
|
{
|
|
14976
15992
|
sx: {
|
|
14977
15993
|
bgcolor: metricsCardBg,
|
|
@@ -14980,7 +15996,7 @@ function CustomerJourneyAnalysis({
|
|
|
14980
15996
|
height: "100%",
|
|
14981
15997
|
minWidth: 0
|
|
14982
15998
|
},
|
|
14983
|
-
children: /* @__PURE__ */ (0,
|
|
15999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14984
16000
|
JourneyMetricCard,
|
|
14985
16001
|
{
|
|
14986
16002
|
label,
|
|
@@ -15011,7 +16027,7 @@ function CustomerJourneyAnalysis({
|
|
|
15011
16027
|
// src/components/FalconThemeProvider/FalconThemeProvider.tsx
|
|
15012
16028
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
15013
16029
|
var import_styles7 = require("@mui/material/styles");
|
|
15014
|
-
var
|
|
16030
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
15015
16031
|
var lightColor = "51, 48, 60";
|
|
15016
16032
|
var darkColor = "228, 230, 244";
|
|
15017
16033
|
var darkPaperBg = "#2F3349";
|
|
@@ -15091,8 +16107,8 @@ var FalconThemeProvider = ({
|
|
|
15091
16107
|
mixins: { toolbar: { minHeight: 64 } }
|
|
15092
16108
|
})
|
|
15093
16109
|
);
|
|
15094
|
-
return /* @__PURE__ */ (0,
|
|
15095
|
-
/* @__PURE__ */ (0,
|
|
16110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_styles7.ThemeProvider, { theme, children: [
|
|
16111
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_CssBaseline.default, {}),
|
|
15096
16112
|
children
|
|
15097
16113
|
] });
|
|
15098
16114
|
};
|
|
@@ -15116,6 +16132,7 @@ var FalconThemeProvider = ({
|
|
|
15116
16132
|
DEFAULT_FOOTFALL_TILE_ICONS,
|
|
15117
16133
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
15118
16134
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
16135
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
15119
16136
|
FalconAuditTimeline,
|
|
15120
16137
|
FalconButton,
|
|
15121
16138
|
FalconDIstrictFilter,
|
|
@@ -15154,6 +16171,17 @@ var FalconThemeProvider = ({
|
|
|
15154
16171
|
QueueTimeBreakdownStackedBar,
|
|
15155
16172
|
QueueTimePeriodFilter,
|
|
15156
16173
|
RankedBarList,
|
|
16174
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
16175
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
16176
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
16177
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
16178
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
16179
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
16180
|
+
STORE_PERFORMANCE_DEFAULT_DATA,
|
|
16181
|
+
StackedComparisonBarChart,
|
|
16182
|
+
StackedComparisonBarChartCustomizationProvider,
|
|
16183
|
+
StackedComparisonBarChartTooltip,
|
|
16184
|
+
StorePerformanceByAssist,
|
|
15157
16185
|
TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
15158
16186
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
15159
16187
|
TimePeriodFilter,
|
|
@@ -15185,9 +16213,12 @@ var FalconThemeProvider = ({
|
|
|
15185
16213
|
peakBillingHoursVisitsMock,
|
|
15186
16214
|
preprocessData,
|
|
15187
16215
|
skipSingleBranchLevels,
|
|
16216
|
+
stackedComparisonMergeCss,
|
|
16217
|
+
stackedComparisonMergeSx,
|
|
15188
16218
|
toRechartsTreemapData,
|
|
15189
16219
|
useBillingCounterAnalyticsCustomization,
|
|
15190
16220
|
usePeakBillingHoursCustomization,
|
|
15191
|
-
useQueueTimeBreakdownCustomization
|
|
16221
|
+
useQueueTimeBreakdownCustomization,
|
|
16222
|
+
useStackedComparisonBarChartCustomization
|
|
15192
16223
|
});
|
|
15193
16224
|
//# sourceMappingURL=index.js.map
|