@bpfdev/oly-ui 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +289 -5
- package/dist/index.d.ts +289 -5
- package/dist/index.js +1157 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1196 -220
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,6 +49,7 @@ __export(index_exports, {
|
|
|
49
49
|
DEFAULT_FOOTFALL_TILE_ICONS: () => DEFAULT_FOOTFALL_TILE_ICONS,
|
|
50
50
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER: () => DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
51
51
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER: () => DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
52
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER: () => DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
52
53
|
FalconAuditTimeline: () => FalconAuditTimeline,
|
|
53
54
|
FalconButton: () => FalconButton,
|
|
54
55
|
FalconDIstrictFilter: () => FalconDIstrictFilter,
|
|
@@ -87,6 +88,17 @@ __export(index_exports, {
|
|
|
87
88
|
QueueTimeBreakdownStackedBar: () => QueueTimeBreakdownStackedBar,
|
|
88
89
|
QueueTimePeriodFilter: () => TimePeriodFilter,
|
|
89
90
|
RankedBarList: () => RankedBarList,
|
|
91
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR: () => STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
92
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER: () => STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
93
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR: () => STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
94
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR: () => STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
95
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS: () => STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
96
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS: () => STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
97
|
+
STORE_PERFORMANCE_DEFAULT_DATA: () => STORE_PERFORMANCE_DEFAULT_DATA,
|
|
98
|
+
StackedComparisonBarChart: () => StackedComparisonBarChart,
|
|
99
|
+
StackedComparisonBarChartCustomizationProvider: () => StackedComparisonBarChartCustomizationProvider,
|
|
100
|
+
StackedComparisonBarChartTooltip: () => StackedComparisonBarChartTooltip,
|
|
101
|
+
StorePerformanceByAssist: () => StorePerformanceByAssist,
|
|
90
102
|
TIME_PERIOD_FILTER_INFO_POPOVER: () => TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
91
103
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN: () => TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
92
104
|
TimePeriodFilter: () => TimePeriodFilter,
|
|
@@ -118,10 +130,13 @@ __export(index_exports, {
|
|
|
118
130
|
peakBillingHoursVisitsMock: () => peakBillingHoursVisitsMock,
|
|
119
131
|
preprocessData: () => preprocessData,
|
|
120
132
|
skipSingleBranchLevels: () => skipSingleBranchLevels,
|
|
133
|
+
stackedComparisonMergeCss: () => mergeCss7,
|
|
134
|
+
stackedComparisonMergeSx: () => mergeSx4,
|
|
121
135
|
toRechartsTreemapData: () => toRechartsTreemapData,
|
|
122
136
|
useBillingCounterAnalyticsCustomization: () => useBillingCounterAnalyticsCustomization,
|
|
123
137
|
usePeakBillingHoursCustomization: () => usePeakBillingHoursCustomization,
|
|
124
|
-
useQueueTimeBreakdownCustomization: () => useQueueTimeBreakdownCustomization
|
|
138
|
+
useQueueTimeBreakdownCustomization: () => useQueueTimeBreakdownCustomization,
|
|
139
|
+
useStackedComparisonBarChartCustomization: () => useStackedComparisonBarChartCustomization
|
|
125
140
|
});
|
|
126
141
|
module.exports = __toCommonJS(index_exports);
|
|
127
142
|
|
|
@@ -4015,7 +4030,7 @@ var FalconAuditTimeline = ({
|
|
|
4015
4030
|
date: run.date,
|
|
4016
4031
|
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
4017
4032
|
status: run.status === "done" ? "completed" : "upcoming",
|
|
4018
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
4033
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date, run) : void 0,
|
|
4019
4034
|
brandFont,
|
|
4020
4035
|
interFont,
|
|
4021
4036
|
completedColor,
|
|
@@ -4053,7 +4068,16 @@ var FalconAuditTimeline = ({
|
|
|
4053
4068
|
date: `${activeMonth.label} 5`,
|
|
4054
4069
|
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
4055
4070
|
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
4056
|
-
onExportClick: onExportReportClick ? (e) =>
|
|
4071
|
+
onExportClick: onExportReportClick ? (e) => {
|
|
4072
|
+
const date = `${activeMonth.label} 5`;
|
|
4073
|
+
onExportReportClick(e, date, {
|
|
4074
|
+
run_number: precedingEvents + 1,
|
|
4075
|
+
date,
|
|
4076
|
+
month: activeMonth.label,
|
|
4077
|
+
year: activeMonth.year,
|
|
4078
|
+
status: isFirstActiveMonth ? "done" : "scheduled"
|
|
4079
|
+
});
|
|
4080
|
+
} : void 0,
|
|
4057
4081
|
brandFont,
|
|
4058
4082
|
interFont,
|
|
4059
4083
|
completedColor,
|
|
@@ -12366,12 +12390,956 @@ function QueueTimeBreakdown({
|
|
|
12366
12390
|
] }) }) }) });
|
|
12367
12391
|
}
|
|
12368
12392
|
|
|
12393
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChart.chartTokens.ts
|
|
12394
|
+
var STACKED_COMPARISON_DEFAULT_STACK_COLORS = [
|
|
12395
|
+
"#CFE0FB",
|
|
12396
|
+
"#7FB1F0",
|
|
12397
|
+
"#3D7CDF",
|
|
12398
|
+
"#1E2A5E"
|
|
12399
|
+
];
|
|
12400
|
+
var STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR = "#F47C7C";
|
|
12401
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR = "#2563EB";
|
|
12402
|
+
var STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR = "#EF4444";
|
|
12403
|
+
var STACKED_COMPARISON_DEFAULT_FRAME_BORDER = "#EAECEF";
|
|
12404
|
+
|
|
12405
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12406
|
+
var import_Box20 = __toESM(require("@mui/material/Box"));
|
|
12407
|
+
var import_ButtonBase2 = __toESM(require("@mui/material/ButtonBase"));
|
|
12408
|
+
var import_Stack18 = __toESM(require("@mui/material/Stack"));
|
|
12409
|
+
var import_Typography17 = __toESM(require("@mui/material/Typography"));
|
|
12410
|
+
var React25 = __toESM(require("react"));
|
|
12411
|
+
var import_recharts9 = require("recharts");
|
|
12412
|
+
|
|
12413
|
+
// src/components/charts/StackedComparisonBarChart/stackedComparisonBarChartCustomization.merge.ts
|
|
12414
|
+
function mergeCss7(a, b) {
|
|
12415
|
+
if (!b) {
|
|
12416
|
+
return { ...a };
|
|
12417
|
+
}
|
|
12418
|
+
return { ...a, ...b };
|
|
12419
|
+
}
|
|
12420
|
+
function mergeSx4(...parts) {
|
|
12421
|
+
const flat = parts.filter(Boolean);
|
|
12422
|
+
if (flat.length === 0) {
|
|
12423
|
+
return void 0;
|
|
12424
|
+
}
|
|
12425
|
+
if (flat.length === 1) {
|
|
12426
|
+
return flat[0];
|
|
12427
|
+
}
|
|
12428
|
+
return flat.flat();
|
|
12429
|
+
}
|
|
12430
|
+
|
|
12431
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartCustomizationContext.tsx
|
|
12432
|
+
var React24 = __toESM(require("react"));
|
|
12433
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12434
|
+
var StackedComparisonBarChartCustomizationContext = React24.createContext({});
|
|
12435
|
+
function StackedComparisonBarChartCustomizationProvider({
|
|
12436
|
+
value,
|
|
12437
|
+
children
|
|
12438
|
+
}) {
|
|
12439
|
+
const memo = React24.useMemo(() => value, [value]);
|
|
12440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(StackedComparisonBarChartCustomizationContext.Provider, { value: memo, children });
|
|
12441
|
+
}
|
|
12442
|
+
function useStackedComparisonBarChartCustomization() {
|
|
12443
|
+
return React24.useContext(StackedComparisonBarChartCustomizationContext);
|
|
12444
|
+
}
|
|
12445
|
+
|
|
12446
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChartTooltip.tsx
|
|
12447
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12448
|
+
function fmt(n) {
|
|
12449
|
+
return new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(n);
|
|
12450
|
+
}
|
|
12451
|
+
function StackedComparisonBarChartTooltip({
|
|
12452
|
+
active,
|
|
12453
|
+
row,
|
|
12454
|
+
buckets,
|
|
12455
|
+
bucketColors,
|
|
12456
|
+
comparisonColor,
|
|
12457
|
+
stackedTotalLabel,
|
|
12458
|
+
comparisonLabel
|
|
12459
|
+
}) {
|
|
12460
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12461
|
+
const tt = bc?.tooltip;
|
|
12462
|
+
if (!active || !row) {
|
|
12463
|
+
return null;
|
|
12464
|
+
}
|
|
12465
|
+
const borderColor = tt?.borderColor ?? "#E5E7EB";
|
|
12466
|
+
const radius = tt?.borderRadiusPx ?? 10;
|
|
12467
|
+
const shadow = tt?.boxShadow ?? "0 8px 24px rgba(15, 23, 42, 0.12)";
|
|
12468
|
+
const bg = tt?.backgroundColor ?? "#FFFFFF";
|
|
12469
|
+
const pad = tt?.paddingPx ?? 14;
|
|
12470
|
+
const bucketNameColor = tt?.bucketNameColor ?? "#0F172A";
|
|
12471
|
+
const bucketValueColor = tt?.bucketValueColor ?? "#0F172A";
|
|
12472
|
+
const totalStackedLabelColor = tt?.totalStackedLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12473
|
+
const totalStackedValueColor = tt?.totalStackedValueColor ?? "#1D4ED8";
|
|
12474
|
+
const comparisonLabelColor = tt?.comparisonLabelColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12475
|
+
const comparisonValueColor = tt?.comparisonValueColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12476
|
+
const dividerColor = tt?.dividerColor ?? "#E5E7EB";
|
|
12477
|
+
const titleColor = tt?.titleColor ?? "#0F172A";
|
|
12478
|
+
const fs = tt?.fontSizePx ?? 13;
|
|
12479
|
+
const titleFs = tt?.titleFontSizePx ?? 15;
|
|
12480
|
+
const titleText = row.subName ? `${row.name} ${row.subName}` : row.name;
|
|
12481
|
+
const orderedBuckets = [...buckets].reverse();
|
|
12482
|
+
const bodyStyle = mergeCss7(
|
|
12483
|
+
{
|
|
12484
|
+
boxSizing: "border-box",
|
|
12485
|
+
backgroundColor: bg,
|
|
12486
|
+
padding: pad,
|
|
12487
|
+
borderRadius: radius,
|
|
12488
|
+
border: `1px solid ${borderColor}`,
|
|
12489
|
+
boxShadow: shadow,
|
|
12490
|
+
minWidth: tt?.minWidthPx ?? 220,
|
|
12491
|
+
...tt?.maxWidthPx != null ? { maxWidth: tt.maxWidthPx } : null
|
|
12492
|
+
},
|
|
12493
|
+
tt?.bodyStyle
|
|
12494
|
+
);
|
|
12495
|
+
const rowStyle = {
|
|
12496
|
+
display: "flex",
|
|
12497
|
+
alignItems: "center",
|
|
12498
|
+
justifyContent: "space-between",
|
|
12499
|
+
fontSize: fs,
|
|
12500
|
+
lineHeight: 1.4,
|
|
12501
|
+
margin: "4px 0",
|
|
12502
|
+
fontFamily: "inherit"
|
|
12503
|
+
};
|
|
12504
|
+
const swatch = (color) => ({
|
|
12505
|
+
width: 10,
|
|
12506
|
+
height: 10,
|
|
12507
|
+
borderRadius: "50%",
|
|
12508
|
+
backgroundColor: color,
|
|
12509
|
+
flexShrink: 0,
|
|
12510
|
+
display: "inline-block",
|
|
12511
|
+
marginRight: 8
|
|
12512
|
+
});
|
|
12513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: bodyStyle, children: [
|
|
12514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12515
|
+
"div",
|
|
12516
|
+
{
|
|
12517
|
+
style: {
|
|
12518
|
+
fontSize: titleFs,
|
|
12519
|
+
fontWeight: 700,
|
|
12520
|
+
color: titleColor,
|
|
12521
|
+
marginBottom: 8
|
|
12522
|
+
},
|
|
12523
|
+
children: titleText
|
|
12524
|
+
}
|
|
12525
|
+
),
|
|
12526
|
+
orderedBuckets.map((b, i) => {
|
|
12527
|
+
const originalIndex = buckets.length - 1 - i;
|
|
12528
|
+
const color = b.color ?? bucketColors[originalIndex] ?? "#94A3B8";
|
|
12529
|
+
const v = row.stacked[b.id] ?? 0;
|
|
12530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: rowStyle, children: [
|
|
12531
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12532
|
+
"span",
|
|
12533
|
+
{
|
|
12534
|
+
style: {
|
|
12535
|
+
display: "flex",
|
|
12536
|
+
alignItems: "center",
|
|
12537
|
+
color: bucketNameColor,
|
|
12538
|
+
fontWeight: 500
|
|
12539
|
+
},
|
|
12540
|
+
children: [
|
|
12541
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(color), "aria-hidden": true }),
|
|
12542
|
+
b.label
|
|
12543
|
+
]
|
|
12544
|
+
}
|
|
12545
|
+
),
|
|
12546
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: bucketValueColor, fontWeight: 700 }, children: fmt(v) })
|
|
12547
|
+
] }, b.id);
|
|
12548
|
+
}),
|
|
12549
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12550
|
+
"div",
|
|
12551
|
+
{
|
|
12552
|
+
style: {
|
|
12553
|
+
height: 1,
|
|
12554
|
+
background: dividerColor,
|
|
12555
|
+
margin: "10px 0 8px"
|
|
12556
|
+
}
|
|
12557
|
+
}
|
|
12558
|
+
),
|
|
12559
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "2px 0" }, children: [
|
|
12560
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: totalStackedLabelColor, fontWeight: 700 }, children: stackedTotalLabel }),
|
|
12561
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: totalStackedValueColor, fontWeight: 700 }, children: fmt(buckets.reduce((acc, b) => acc + (row.stacked[b.id] ?? 0), 0)) })
|
|
12562
|
+
] }),
|
|
12563
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { ...rowStyle, margin: "6px 0 0" }, children: [
|
|
12564
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12565
|
+
"span",
|
|
12566
|
+
{
|
|
12567
|
+
style: {
|
|
12568
|
+
display: "flex",
|
|
12569
|
+
alignItems: "center",
|
|
12570
|
+
color: comparisonLabelColor,
|
|
12571
|
+
fontWeight: 600
|
|
12572
|
+
},
|
|
12573
|
+
children: [
|
|
12574
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: swatch(comparisonColor), "aria-hidden": true }),
|
|
12575
|
+
comparisonLabel
|
|
12576
|
+
]
|
|
12577
|
+
}
|
|
12578
|
+
),
|
|
12579
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { color: comparisonValueColor, fontWeight: 700 }, children: fmt(row.comparison) })
|
|
12580
|
+
] })
|
|
12581
|
+
] }) });
|
|
12582
|
+
}
|
|
12583
|
+
|
|
12584
|
+
// src/components/charts/StackedComparisonBarChart/StackedComparisonBarChart.tsx
|
|
12585
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12586
|
+
var DEFAULT_AXIS_TICK_FILL = "#9CA3AF";
|
|
12587
|
+
var DEFAULT_GRID_STROKE = "#EEF0F3";
|
|
12588
|
+
var STACK_KEY = (id) => `stack__${id}`;
|
|
12589
|
+
var COMPARISON_KEY = "__comparison";
|
|
12590
|
+
function SortIcon({ color }) {
|
|
12591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12592
|
+
"svg",
|
|
12593
|
+
{
|
|
12594
|
+
width: "14",
|
|
12595
|
+
height: "14",
|
|
12596
|
+
viewBox: "0 0 14 14",
|
|
12597
|
+
fill: "none",
|
|
12598
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12599
|
+
"aria-hidden": true,
|
|
12600
|
+
children: [
|
|
12601
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12602
|
+
"path",
|
|
12603
|
+
{
|
|
12604
|
+
d: "M4 2.5V11.5M4 11.5L1.5 9M4 11.5L6.5 9",
|
|
12605
|
+
stroke: color,
|
|
12606
|
+
strokeWidth: "1.4",
|
|
12607
|
+
strokeLinecap: "round",
|
|
12608
|
+
strokeLinejoin: "round"
|
|
12609
|
+
}
|
|
12610
|
+
),
|
|
12611
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12612
|
+
"path",
|
|
12613
|
+
{
|
|
12614
|
+
d: "M10 11.5V2.5M10 2.5L7.5 5M10 2.5L12.5 5",
|
|
12615
|
+
stroke: color,
|
|
12616
|
+
strokeWidth: "1.4",
|
|
12617
|
+
strokeLinecap: "round",
|
|
12618
|
+
strokeLinejoin: "round"
|
|
12619
|
+
}
|
|
12620
|
+
)
|
|
12621
|
+
]
|
|
12622
|
+
}
|
|
12623
|
+
);
|
|
12624
|
+
}
|
|
12625
|
+
function LegendDot({
|
|
12626
|
+
color,
|
|
12627
|
+
sizePx = 10
|
|
12628
|
+
}) {
|
|
12629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12630
|
+
import_Box20.default,
|
|
12631
|
+
{
|
|
12632
|
+
sx: {
|
|
12633
|
+
width: sizePx,
|
|
12634
|
+
height: sizePx,
|
|
12635
|
+
borderRadius: "50%",
|
|
12636
|
+
bgcolor: color,
|
|
12637
|
+
flexShrink: 0
|
|
12638
|
+
}
|
|
12639
|
+
}
|
|
12640
|
+
);
|
|
12641
|
+
}
|
|
12642
|
+
function MultilineTick(props) {
|
|
12643
|
+
const {
|
|
12644
|
+
x = 0,
|
|
12645
|
+
y = 0,
|
|
12646
|
+
payload,
|
|
12647
|
+
fill = DEFAULT_AXIS_TICK_FILL,
|
|
12648
|
+
fontSize = 12,
|
|
12649
|
+
rowsByName,
|
|
12650
|
+
angle = 0,
|
|
12651
|
+
textAnchor = "middle"
|
|
12652
|
+
} = props;
|
|
12653
|
+
const name = payload?.value ?? "";
|
|
12654
|
+
if (!name) return null;
|
|
12655
|
+
const row = rowsByName ? rowsByName[name] : void 0;
|
|
12656
|
+
const subName = row?.subName;
|
|
12657
|
+
const lines = [];
|
|
12658
|
+
String(name).split("\n").forEach((s) => lines.push(s));
|
|
12659
|
+
if (subName) {
|
|
12660
|
+
String(subName).split("\n").forEach((s) => lines.push(s));
|
|
12661
|
+
}
|
|
12662
|
+
const lineHeight = fontSize * 1.25;
|
|
12663
|
+
const isHorizontal = angle === 0;
|
|
12664
|
+
const anchor = isHorizontal ? "middle" : textAnchor;
|
|
12665
|
+
const dy0 = isHorizontal ? lineHeight : 4;
|
|
12666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12667
|
+
"text",
|
|
12668
|
+
{
|
|
12669
|
+
transform: angle !== 0 ? `rotate(${angle})` : void 0,
|
|
12670
|
+
textAnchor: anchor,
|
|
12671
|
+
fontSize,
|
|
12672
|
+
fill,
|
|
12673
|
+
children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tspan", { x: 0, dy: i === 0 ? dy0 : lineHeight, children: line }, i))
|
|
12674
|
+
}
|
|
12675
|
+
) });
|
|
12676
|
+
}
|
|
12677
|
+
function BarPlot({
|
|
12678
|
+
data,
|
|
12679
|
+
buckets,
|
|
12680
|
+
bucketColors,
|
|
12681
|
+
comparisonColor,
|
|
12682
|
+
rowsByName,
|
|
12683
|
+
yAxisDomain,
|
|
12684
|
+
yAxisTicks,
|
|
12685
|
+
yAxisTickFormatter,
|
|
12686
|
+
stackedTotalLabel,
|
|
12687
|
+
comparisonLabel,
|
|
12688
|
+
renderTooltip,
|
|
12689
|
+
enableHorizontalScroll,
|
|
12690
|
+
chartMinWidth,
|
|
12691
|
+
categoryWidthPx
|
|
12692
|
+
}) {
|
|
12693
|
+
const { barChart: bc } = useStackedComparisonBarChartCustomization();
|
|
12694
|
+
const height = bc?.heightPx ?? 360;
|
|
12695
|
+
const stackedSize = bc?.stackedBarSizePx ?? 22;
|
|
12696
|
+
const comparisonSize = bc?.comparisonBarSizePx ?? 18;
|
|
12697
|
+
const barCategoryGap = bc?.barCategoryGapPx ?? 20;
|
|
12698
|
+
const barGap = bc?.barGap ?? 2;
|
|
12699
|
+
const barTopRadius = bc?.barTopRadiusPx ?? 3;
|
|
12700
|
+
const m = {
|
|
12701
|
+
top: bc?.margin?.top ?? 16,
|
|
12702
|
+
right: bc?.margin?.right ?? 8,
|
|
12703
|
+
bottom: bc?.margin?.bottom ?? 28,
|
|
12704
|
+
left: bc?.margin?.left ?? 4
|
|
12705
|
+
};
|
|
12706
|
+
const gridStroke = bc?.gridStroke ?? DEFAULT_GRID_STROKE;
|
|
12707
|
+
const dash = bc?.gridStrokeDasharray ?? "0";
|
|
12708
|
+
const xFill = bc?.xAxisTickFill ?? "#6B7280";
|
|
12709
|
+
const xTickAngle = bc?.xAxisTickAngle ?? 0;
|
|
12710
|
+
const xTickAnchor = bc?.xAxisTickAnchor ?? "end";
|
|
12711
|
+
const xAxisHeight = bc?.xAxisHeight ?? 50;
|
|
12712
|
+
const yFill = bc?.yAxisTickFill ?? DEFAULT_AXIS_TICK_FILL;
|
|
12713
|
+
const yWidth = bc?.yAxisWidth ?? 44;
|
|
12714
|
+
const cursorFill = bc?.cursorFill ?? "rgba(15, 23, 42, 0.04)";
|
|
12715
|
+
const defaultFmt = React25.useCallback(
|
|
12716
|
+
(v) => v >= 1e3 ? `${(v / 1e3).toFixed(v % 1e3 === 0 ? 0 : 1)}k` : `${v}`,
|
|
12717
|
+
[]
|
|
12718
|
+
);
|
|
12719
|
+
const tickFmt = yAxisTickFormatter ?? defaultFmt;
|
|
12720
|
+
const resolvedCategoryWidth = categoryWidthPx ?? 90;
|
|
12721
|
+
const innerMinWidth = chartMinWidth ?? resolvedCategoryWidth * Math.max(data.length, 1);
|
|
12722
|
+
const outerSx = enableHorizontalScroll ? {
|
|
12723
|
+
width: "100%",
|
|
12724
|
+
height,
|
|
12725
|
+
mt: 0.5,
|
|
12726
|
+
overflowX: "auto",
|
|
12727
|
+
overflowY: "hidden"
|
|
12728
|
+
} : { width: "100%", height, mt: 0.5 };
|
|
12729
|
+
const innerSx = enableHorizontalScroll ? { width: "100%", height: "100%", minWidth: innerMinWidth } : { width: "100%", height: "100%" };
|
|
12730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: outerSx, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: innerSx, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_recharts9.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12731
|
+
import_recharts9.BarChart,
|
|
12732
|
+
{
|
|
12733
|
+
data,
|
|
12734
|
+
margin: m,
|
|
12735
|
+
barCategoryGap,
|
|
12736
|
+
barGap,
|
|
12737
|
+
children: [
|
|
12738
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12739
|
+
import_recharts9.CartesianGrid,
|
|
12740
|
+
{
|
|
12741
|
+
strokeDasharray: dash,
|
|
12742
|
+
vertical: false,
|
|
12743
|
+
stroke: gridStroke
|
|
12744
|
+
}
|
|
12745
|
+
),
|
|
12746
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12747
|
+
import_recharts9.XAxis,
|
|
12748
|
+
{
|
|
12749
|
+
dataKey: "__name",
|
|
12750
|
+
tick: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12751
|
+
MultilineTick,
|
|
12752
|
+
{
|
|
12753
|
+
fill: xFill,
|
|
12754
|
+
fontSize: 12,
|
|
12755
|
+
rowsByName,
|
|
12756
|
+
angle: xTickAngle,
|
|
12757
|
+
textAnchor: xTickAnchor
|
|
12758
|
+
}
|
|
12759
|
+
),
|
|
12760
|
+
tickLine: false,
|
|
12761
|
+
axisLine: { stroke: gridStroke },
|
|
12762
|
+
interval: 0,
|
|
12763
|
+
height: xAxisHeight
|
|
12764
|
+
}
|
|
12765
|
+
),
|
|
12766
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12767
|
+
import_recharts9.YAxis,
|
|
12768
|
+
{
|
|
12769
|
+
domain: yAxisDomain,
|
|
12770
|
+
ticks: yAxisTicks,
|
|
12771
|
+
tick: { fill: yFill, fontSize: 11 },
|
|
12772
|
+
tickLine: false,
|
|
12773
|
+
axisLine: false,
|
|
12774
|
+
width: yWidth,
|
|
12775
|
+
tickFormatter: tickFmt
|
|
12776
|
+
}
|
|
12777
|
+
),
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12779
|
+
import_recharts9.Tooltip,
|
|
12780
|
+
{
|
|
12781
|
+
content: (tooltipProps) => {
|
|
12782
|
+
const label = tooltipProps.label;
|
|
12783
|
+
const labelStr = typeof label === "string" ? label : String(label ?? "");
|
|
12784
|
+
const row = rowsByName[labelStr] ?? null;
|
|
12785
|
+
if (renderTooltip) {
|
|
12786
|
+
const custom = renderTooltip({
|
|
12787
|
+
tooltipProps,
|
|
12788
|
+
row,
|
|
12789
|
+
buckets,
|
|
12790
|
+
bucketColors,
|
|
12791
|
+
comparisonColor
|
|
12792
|
+
});
|
|
12793
|
+
return custom == null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: custom });
|
|
12794
|
+
}
|
|
12795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12796
|
+
StackedComparisonBarChartTooltip,
|
|
12797
|
+
{
|
|
12798
|
+
...tooltipProps,
|
|
12799
|
+
row,
|
|
12800
|
+
buckets,
|
|
12801
|
+
bucketColors,
|
|
12802
|
+
comparisonColor,
|
|
12803
|
+
stackedTotalLabel,
|
|
12804
|
+
comparisonLabel
|
|
12805
|
+
}
|
|
12806
|
+
);
|
|
12807
|
+
},
|
|
12808
|
+
cursor: { fill: cursorFill },
|
|
12809
|
+
allowEscapeViewBox: { x: false, y: true }
|
|
12810
|
+
}
|
|
12811
|
+
),
|
|
12812
|
+
buckets.map((b, i) => {
|
|
12813
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
12814
|
+
const isTop = i === buckets.length - 1;
|
|
12815
|
+
const radius = isTop ? [barTopRadius, barTopRadius, 0, 0] : [0, 0, 0, 0];
|
|
12816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12817
|
+
import_recharts9.Bar,
|
|
12818
|
+
{
|
|
12819
|
+
dataKey: STACK_KEY(b.id),
|
|
12820
|
+
name: b.label,
|
|
12821
|
+
stackId: "stacked",
|
|
12822
|
+
fill: color,
|
|
12823
|
+
barSize: stackedSize,
|
|
12824
|
+
isAnimationActive: false,
|
|
12825
|
+
radius
|
|
12826
|
+
},
|
|
12827
|
+
b.id
|
|
12828
|
+
);
|
|
12829
|
+
}),
|
|
12830
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12831
|
+
import_recharts9.Bar,
|
|
12832
|
+
{
|
|
12833
|
+
dataKey: COMPARISON_KEY,
|
|
12834
|
+
name: comparisonLabel,
|
|
12835
|
+
stackId: "comparison",
|
|
12836
|
+
fill: comparisonColor,
|
|
12837
|
+
barSize: comparisonSize,
|
|
12838
|
+
isAnimationActive: false,
|
|
12839
|
+
radius: [barTopRadius, barTopRadius, 0, 0]
|
|
12840
|
+
}
|
|
12841
|
+
)
|
|
12842
|
+
]
|
|
12843
|
+
}
|
|
12844
|
+
) }) }) });
|
|
12845
|
+
}
|
|
12846
|
+
function StackedComparisonBarChart({
|
|
12847
|
+
subHeading,
|
|
12848
|
+
showSortToggle = true,
|
|
12849
|
+
onSortToggle,
|
|
12850
|
+
showSubHeadingDivider = true,
|
|
12851
|
+
showHeaderLegend = true,
|
|
12852
|
+
enableHorizontalScroll = false,
|
|
12853
|
+
chartMinWidth,
|
|
12854
|
+
categoryWidthPx,
|
|
12855
|
+
buckets,
|
|
12856
|
+
data,
|
|
12857
|
+
stackedLegendLabel = "Stacked",
|
|
12858
|
+
comparisonLegendLabel = "Comparison",
|
|
12859
|
+
stackedTotalLabel,
|
|
12860
|
+
yAxisDomain,
|
|
12861
|
+
yAxisTicks,
|
|
12862
|
+
yAxisTickFormatter,
|
|
12863
|
+
renderTooltip,
|
|
12864
|
+
emptyStatePlaceholderProps,
|
|
12865
|
+
customization
|
|
12866
|
+
}) {
|
|
12867
|
+
const bucketColors = customization?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
12868
|
+
const comparisonColor = customization?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
12869
|
+
const legendStackDot = customization?.header?.legendStackColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR;
|
|
12870
|
+
const legendComparisonDot = customization?.header?.legendComparisonColor ?? STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR;
|
|
12871
|
+
const legendDividerColor = customization?.header?.legendDividerColor ?? "#E5E7EB";
|
|
12872
|
+
const legendDotSize = customization?.header?.legendDotSizePx ?? 10;
|
|
12873
|
+
const frameBorder = customization?.frame?.borderColor ?? STACKED_COMPARISON_DEFAULT_FRAME_BORDER;
|
|
12874
|
+
const frameBg = customization?.frame?.backgroundColor ?? "#FFFFFF";
|
|
12875
|
+
const rowsByName = React25.useMemo(() => {
|
|
12876
|
+
const r = {};
|
|
12877
|
+
for (const row of data) r[row.name] = row;
|
|
12878
|
+
return r;
|
|
12879
|
+
}, [data]);
|
|
12880
|
+
const chartData = React25.useMemo(() => {
|
|
12881
|
+
return data.map((row) => {
|
|
12882
|
+
const d = {
|
|
12883
|
+
__key: row.name,
|
|
12884
|
+
__name: row.name,
|
|
12885
|
+
__subName: row.subName,
|
|
12886
|
+
__row: row,
|
|
12887
|
+
[COMPARISON_KEY]: row.comparison
|
|
12888
|
+
};
|
|
12889
|
+
for (const b of buckets) {
|
|
12890
|
+
d[STACK_KEY(b.id)] = row.stacked[b.id] ?? 0;
|
|
12891
|
+
}
|
|
12892
|
+
return d;
|
|
12893
|
+
});
|
|
12894
|
+
}, [data, buckets]);
|
|
12895
|
+
const subHeadingSx = mergeSx4(
|
|
12896
|
+
{
|
|
12897
|
+
fontWeight: 700,
|
|
12898
|
+
fontSize: "0.95rem",
|
|
12899
|
+
color: "#0f172a"
|
|
12900
|
+
},
|
|
12901
|
+
customization?.header?.subHeadingSx
|
|
12902
|
+
);
|
|
12903
|
+
const frameSx = mergeSx4(
|
|
12904
|
+
{
|
|
12905
|
+
bgcolor: frameBg,
|
|
12906
|
+
border: `1px solid ${frameBorder}`,
|
|
12907
|
+
borderRadius: 2,
|
|
12908
|
+
px: 2,
|
|
12909
|
+
pt: 2,
|
|
12910
|
+
pb: 1.5,
|
|
12911
|
+
width: "100%",
|
|
12912
|
+
boxSizing: "border-box"
|
|
12913
|
+
},
|
|
12914
|
+
customization?.frame?.sx
|
|
12915
|
+
);
|
|
12916
|
+
const subHeadingDividerColor = customization?.frame?.subHeadingDividerColor ?? "#C7C9D9";
|
|
12917
|
+
const subHeadingDividerSx = mergeSx4(
|
|
12918
|
+
{
|
|
12919
|
+
height: "1px",
|
|
12920
|
+
width: "100%",
|
|
12921
|
+
bgcolor: subHeadingDividerColor,
|
|
12922
|
+
mb: 1.5
|
|
12923
|
+
},
|
|
12924
|
+
customization?.frame?.subHeadingDividerSx
|
|
12925
|
+
);
|
|
12926
|
+
const legendSx = mergeSx4({ flexShrink: 0 }, customization?.header?.legendSx);
|
|
12927
|
+
const showSubHeadingRow = Boolean(subHeading) || showSortToggle || showHeaderLegend;
|
|
12928
|
+
const resolvedStackedTotal = stackedTotalLabel ?? `Total ${stackedLegendLabel}`;
|
|
12929
|
+
if (chartData.length === 0) {
|
|
12930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChartEmptyState, { minHeight: 360, ...emptyStatePlaceholderProps });
|
|
12931
|
+
}
|
|
12932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StackedComparisonBarChartCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Box20.default, { sx: frameSx, children: [
|
|
12933
|
+
showSubHeadingRow ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12934
|
+
import_Stack18.default,
|
|
12935
|
+
{
|
|
12936
|
+
direction: "row",
|
|
12937
|
+
alignItems: "center",
|
|
12938
|
+
justifyContent: "space-between",
|
|
12939
|
+
gap: 2,
|
|
12940
|
+
flexWrap: "wrap",
|
|
12941
|
+
sx: { mb: 1 },
|
|
12942
|
+
children: [
|
|
12943
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
12944
|
+
subHeading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography17.default, { sx: subHeadingSx, children: subHeading }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", {}),
|
|
12945
|
+
showSortToggle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12946
|
+
import_ButtonBase2.default,
|
|
12947
|
+
{
|
|
12948
|
+
onClick: onSortToggle,
|
|
12949
|
+
disableRipple: !onSortToggle,
|
|
12950
|
+
sx: mergeSx4(
|
|
12951
|
+
{
|
|
12952
|
+
width: 26,
|
|
12953
|
+
height: 26,
|
|
12954
|
+
borderRadius: 1,
|
|
12955
|
+
bgcolor: "#EEF2FF",
|
|
12956
|
+
color: "#5B6DEC",
|
|
12957
|
+
display: "inline-flex",
|
|
12958
|
+
alignItems: "center",
|
|
12959
|
+
justifyContent: "center",
|
|
12960
|
+
cursor: onSortToggle ? "pointer" : "default",
|
|
12961
|
+
"&:hover": onSortToggle ? { bgcolor: "#E0E7FF" } : void 0
|
|
12962
|
+
},
|
|
12963
|
+
customization?.header?.sortButtonSx
|
|
12964
|
+
),
|
|
12965
|
+
"aria-label": "Toggle sort order",
|
|
12966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SortIcon, { color: "#5B6DEC" })
|
|
12967
|
+
}
|
|
12968
|
+
) : null
|
|
12969
|
+
] }),
|
|
12970
|
+
showHeaderLegend ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12971
|
+
import_Stack18.default,
|
|
12972
|
+
{
|
|
12973
|
+
direction: "row",
|
|
12974
|
+
alignItems: "center",
|
|
12975
|
+
spacing: 1.5,
|
|
12976
|
+
sx: legendSx,
|
|
12977
|
+
children: [
|
|
12978
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
12979
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LegendDot, { color: legendStackDot, sizePx: legendDotSize }),
|
|
12980
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12981
|
+
import_Typography17.default,
|
|
12982
|
+
{
|
|
12983
|
+
sx: mergeSx4(
|
|
12984
|
+
{
|
|
12985
|
+
fontWeight: 700,
|
|
12986
|
+
fontSize: "0.85rem",
|
|
12987
|
+
color: legendStackDot
|
|
12988
|
+
},
|
|
12989
|
+
customization?.header?.legendLabelSx
|
|
12990
|
+
),
|
|
12991
|
+
children: stackedLegendLabel
|
|
12992
|
+
}
|
|
12993
|
+
)
|
|
12994
|
+
] }),
|
|
12995
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12996
|
+
import_Box20.default,
|
|
12997
|
+
{
|
|
12998
|
+
sx: {
|
|
12999
|
+
width: "1px",
|
|
13000
|
+
height: 18,
|
|
13001
|
+
bgcolor: legendDividerColor
|
|
13002
|
+
}
|
|
13003
|
+
}
|
|
13004
|
+
),
|
|
13005
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Stack18.default, { direction: "row", alignItems: "center", spacing: 0.75, children: [
|
|
13006
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13007
|
+
LegendDot,
|
|
13008
|
+
{
|
|
13009
|
+
color: legendComparisonDot,
|
|
13010
|
+
sizePx: legendDotSize
|
|
13011
|
+
}
|
|
13012
|
+
),
|
|
13013
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13014
|
+
import_Typography17.default,
|
|
13015
|
+
{
|
|
13016
|
+
sx: mergeSx4(
|
|
13017
|
+
{
|
|
13018
|
+
fontWeight: 700,
|
|
13019
|
+
fontSize: "0.85rem",
|
|
13020
|
+
color: legendComparisonDot
|
|
13021
|
+
},
|
|
13022
|
+
customization?.header?.legendLabelSx
|
|
13023
|
+
),
|
|
13024
|
+
children: comparisonLegendLabel
|
|
13025
|
+
}
|
|
13026
|
+
)
|
|
13027
|
+
] })
|
|
13028
|
+
]
|
|
13029
|
+
}
|
|
13030
|
+
) : null
|
|
13031
|
+
]
|
|
13032
|
+
}
|
|
13033
|
+
) : null,
|
|
13034
|
+
showSubHeadingDivider ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box20.default, { sx: subHeadingDividerSx }) : null,
|
|
13035
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
13036
|
+
BarPlot,
|
|
13037
|
+
{
|
|
13038
|
+
data: chartData,
|
|
13039
|
+
buckets,
|
|
13040
|
+
bucketColors,
|
|
13041
|
+
comparisonColor,
|
|
13042
|
+
rowsByName,
|
|
13043
|
+
yAxisDomain,
|
|
13044
|
+
yAxisTicks,
|
|
13045
|
+
yAxisTickFormatter,
|
|
13046
|
+
stackedTotalLabel: resolvedStackedTotal,
|
|
13047
|
+
comparisonLabel: comparisonLegendLabel,
|
|
13048
|
+
renderTooltip,
|
|
13049
|
+
enableHorizontalScroll,
|
|
13050
|
+
chartMinWidth,
|
|
13051
|
+
categoryWidthPx
|
|
13052
|
+
}
|
|
13053
|
+
)
|
|
13054
|
+
] }) });
|
|
13055
|
+
}
|
|
13056
|
+
|
|
13057
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.defaultInfoPopover.ts
|
|
13058
|
+
var DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER = {
|
|
13059
|
+
title: "Store Performance by Assist",
|
|
13060
|
+
description: "Per-store breakdown of attended customers split by attend-duration buckets, alongside the unattended count.",
|
|
13061
|
+
helpBullets: [
|
|
13062
|
+
"Compare attended vs unattended customer volume by store.",
|
|
13063
|
+
"Identify stores with high unattended counts that need staffing.",
|
|
13064
|
+
"See how attended customers split across 0-10 sec, 11-30 sec, 31-59 sec, and 1-2 min buckets."
|
|
13065
|
+
]
|
|
13066
|
+
};
|
|
13067
|
+
|
|
13068
|
+
// src/components/widgets/StorePerformanceByAssist/storePerformanceByAssist.mock.ts
|
|
13069
|
+
var STORE_PERFORMANCE_DEFAULT_BUCKETS = [
|
|
13070
|
+
{ id: "0-10", label: "0-10sec" },
|
|
13071
|
+
{ id: "11-30", label: "11-30sec" },
|
|
13072
|
+
{ id: "31-59", label: "31-59sec" },
|
|
13073
|
+
{ id: "1-2", label: "1-2min" }
|
|
13074
|
+
];
|
|
13075
|
+
var STORE_PERFORMANCE_DEFAULT_DATA = [
|
|
13076
|
+
{
|
|
13077
|
+
name: "Lake Mall",
|
|
13078
|
+
subName: "Kolkata",
|
|
13079
|
+
stacked: { "0-10": 1100, "11-30": 1100, "31-59": 1500, "1-2": 3e3 },
|
|
13080
|
+
comparison: 700
|
|
13081
|
+
},
|
|
13082
|
+
{
|
|
13083
|
+
name: "V3s",
|
|
13084
|
+
subName: "Delhi",
|
|
13085
|
+
stacked: { "0-10": 1e3, "11-30": 1100, "31-59": 1450, "1-2": 2900 },
|
|
13086
|
+
comparison: 620
|
|
13087
|
+
},
|
|
13088
|
+
{
|
|
13089
|
+
name: "Forum Mall",
|
|
13090
|
+
subName: "Bangalore",
|
|
13091
|
+
stacked: { "0-10": 750, "11-30": 800, "31-59": 1450, "1-2": 2050 },
|
|
13092
|
+
comparison: 520
|
|
13093
|
+
},
|
|
13094
|
+
{
|
|
13095
|
+
name: "Phoenix",
|
|
13096
|
+
subName: "Mumbai",
|
|
13097
|
+
stacked: { "0-10": 600, "11-30": 700, "31-59": 1450, "1-2": 1500 },
|
|
13098
|
+
comparison: 470
|
|
13099
|
+
},
|
|
13100
|
+
{
|
|
13101
|
+
name: "DB City",
|
|
13102
|
+
subName: "Bhopal",
|
|
13103
|
+
stacked: { "0-10": 400, "11-30": 600, "31-59": 950, "1-2": 1550 },
|
|
13104
|
+
comparison: 580
|
|
13105
|
+
},
|
|
13106
|
+
{
|
|
13107
|
+
name: "DLF",
|
|
13108
|
+
subName: "Gurgaon",
|
|
13109
|
+
stacked: { "0-10": 225, "11-30": 300, "31-59": 375, "1-2": 600 },
|
|
13110
|
+
comparison: 190
|
|
13111
|
+
},
|
|
13112
|
+
{
|
|
13113
|
+
name: "Highway",
|
|
13114
|
+
subName: "Chennai",
|
|
13115
|
+
stacked: { "0-10": 200, "11-30": 250, "31-59": 350, "1-2": 850 },
|
|
13116
|
+
comparison: 140
|
|
13117
|
+
},
|
|
13118
|
+
{
|
|
13119
|
+
name: "Elante",
|
|
13120
|
+
subName: "Chandigarh",
|
|
13121
|
+
stacked: { "0-10": 150, "11-30": 200, "31-59": 250, "1-2": 600 },
|
|
13122
|
+
comparison: 100
|
|
13123
|
+
}
|
|
13124
|
+
];
|
|
13125
|
+
|
|
13126
|
+
// src/components/widgets/StorePerformanceByAssist/StorePerformanceByAssist.tsx
|
|
13127
|
+
var import_Box21 = __toESM(require("@mui/material/Box"));
|
|
13128
|
+
var import_Card3 = __toESM(require("@mui/material/Card"));
|
|
13129
|
+
var import_CardContent3 = __toESM(require("@mui/material/CardContent"));
|
|
13130
|
+
var import_Stack19 = __toESM(require("@mui/material/Stack"));
|
|
13131
|
+
var import_Typography18 = __toESM(require("@mui/material/Typography"));
|
|
13132
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
13133
|
+
function LegendSquare({
|
|
13134
|
+
color,
|
|
13135
|
+
size = 12
|
|
13136
|
+
}) {
|
|
13137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13138
|
+
import_Box21.default,
|
|
13139
|
+
{
|
|
13140
|
+
sx: {
|
|
13141
|
+
width: size,
|
|
13142
|
+
height: size,
|
|
13143
|
+
borderRadius: 0.5,
|
|
13144
|
+
bgcolor: color,
|
|
13145
|
+
flexShrink: 0
|
|
13146
|
+
}
|
|
13147
|
+
}
|
|
13148
|
+
);
|
|
13149
|
+
}
|
|
13150
|
+
function StorePerformanceByAssist({
|
|
13151
|
+
title,
|
|
13152
|
+
width,
|
|
13153
|
+
maxWidth,
|
|
13154
|
+
minWidth,
|
|
13155
|
+
subHeading = "Stores (Top to Bottom)",
|
|
13156
|
+
showSortToggle = true,
|
|
13157
|
+
onSortToggle,
|
|
13158
|
+
showSubHeadingDivider = true,
|
|
13159
|
+
showHeaderLegend = true,
|
|
13160
|
+
enableHorizontalScroll = false,
|
|
13161
|
+
chartMinWidth,
|
|
13162
|
+
categoryWidthPx,
|
|
13163
|
+
buckets,
|
|
13164
|
+
data,
|
|
13165
|
+
attendedLegendLabel = "Attended",
|
|
13166
|
+
unattendedLegendLabel = "Unattended",
|
|
13167
|
+
unattendedBottomLegendLabel = "Unattended Customers",
|
|
13168
|
+
yAxisDomain,
|
|
13169
|
+
yAxisTicks,
|
|
13170
|
+
yAxisTickFormatter,
|
|
13171
|
+
infoPopover = null,
|
|
13172
|
+
renderTooltip,
|
|
13173
|
+
emptyStatePlaceholderProps,
|
|
13174
|
+
customization
|
|
13175
|
+
}) {
|
|
13176
|
+
const bucketColors = customization?.chart?.barChart?.stackColors ?? STACKED_COMPARISON_DEFAULT_STACK_COLORS;
|
|
13177
|
+
const comparisonColor = customization?.chart?.barChart?.comparisonColor ?? STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR;
|
|
13178
|
+
const bottomLegendColor = customization?.bottomLegend?.labelColor ?? "#6B7280";
|
|
13179
|
+
const bottomLegendFs = customization?.bottomLegend?.fontSizePx ?? 12;
|
|
13180
|
+
const bottomLegendDividerColor = customization?.bottomLegend?.dividerColor ?? "#E5E7EB";
|
|
13181
|
+
const bottomSwatch = customization?.bottomLegend?.swatchSizePx ?? 12;
|
|
13182
|
+
const resolvedInfo = infoPopover === void 0 ? DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER : infoPopover;
|
|
13183
|
+
const rootSx = mergeSx4(
|
|
13184
|
+
{
|
|
13185
|
+
bgcolor: "#FFFFFF",
|
|
13186
|
+
borderRadius: 2,
|
|
13187
|
+
boxShadow: "0 1px 3px rgba(15, 23, 42, 0.08)",
|
|
13188
|
+
...width !== void 0 ? { width } : null,
|
|
13189
|
+
...maxWidth !== void 0 ? { maxWidth } : null,
|
|
13190
|
+
...minWidth !== void 0 ? { minWidth } : null
|
|
13191
|
+
},
|
|
13192
|
+
customization?.rootCard?.sx
|
|
13193
|
+
);
|
|
13194
|
+
const titleSx = mergeSx4(
|
|
13195
|
+
{
|
|
13196
|
+
fontWeight: 700,
|
|
13197
|
+
fontSize: { xs: "1rem", sm: "1.05rem" },
|
|
13198
|
+
color: "#0f172a"
|
|
13199
|
+
},
|
|
13200
|
+
customization?.header?.titleSx
|
|
13201
|
+
);
|
|
13202
|
+
const bottomLegendSx = mergeSx4(
|
|
13203
|
+
{
|
|
13204
|
+
display: "flex",
|
|
13205
|
+
flexWrap: "wrap",
|
|
13206
|
+
alignItems: "center",
|
|
13207
|
+
rowGap: 1,
|
|
13208
|
+
mt: 1.5,
|
|
13209
|
+
px: 0.5
|
|
13210
|
+
},
|
|
13211
|
+
customization?.bottomLegend?.sx
|
|
13212
|
+
);
|
|
13213
|
+
const showOuterHeader = Boolean(title) || Boolean(resolvedInfo);
|
|
13214
|
+
const hasData = data.length > 0;
|
|
13215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Card3.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_CardContent3.default, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Stack19.default, { spacing: 1.5, sx: { width: "100%" }, children: [
|
|
13216
|
+
showOuterHeader ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13217
|
+
import_Stack19.default,
|
|
13218
|
+
{
|
|
13219
|
+
direction: "row",
|
|
13220
|
+
alignItems: "center",
|
|
13221
|
+
justifyContent: "space-between",
|
|
13222
|
+
gap: 2,
|
|
13223
|
+
flexWrap: "wrap",
|
|
13224
|
+
children: [
|
|
13225
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Typography18.default, { sx: titleSx, children: title }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", {}),
|
|
13226
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13227
|
+
import_Stack19.default,
|
|
13228
|
+
{
|
|
13229
|
+
direction: "row",
|
|
13230
|
+
alignItems: "center",
|
|
13231
|
+
spacing: 1.5,
|
|
13232
|
+
sx: { flexShrink: 0 },
|
|
13233
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
13234
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
13235
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13236
|
+
ChartWidgetInfoButton,
|
|
13237
|
+
{
|
|
13238
|
+
popover: resolvedInfo,
|
|
13239
|
+
ariaLabel: "Store performance by assist information"
|
|
13240
|
+
}
|
|
13241
|
+
)
|
|
13242
|
+
] }) : null
|
|
13243
|
+
}
|
|
13244
|
+
)
|
|
13245
|
+
]
|
|
13246
|
+
}
|
|
13247
|
+
) : null,
|
|
13248
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13249
|
+
StackedComparisonBarChart,
|
|
13250
|
+
{
|
|
13251
|
+
subHeading,
|
|
13252
|
+
showSortToggle,
|
|
13253
|
+
onSortToggle,
|
|
13254
|
+
showSubHeadingDivider,
|
|
13255
|
+
showHeaderLegend,
|
|
13256
|
+
enableHorizontalScroll,
|
|
13257
|
+
chartMinWidth,
|
|
13258
|
+
categoryWidthPx,
|
|
13259
|
+
buckets,
|
|
13260
|
+
data,
|
|
13261
|
+
stackedLegendLabel: attendedLegendLabel,
|
|
13262
|
+
comparisonLegendLabel: unattendedLegendLabel,
|
|
13263
|
+
yAxisDomain,
|
|
13264
|
+
yAxisTicks,
|
|
13265
|
+
yAxisTickFormatter,
|
|
13266
|
+
renderTooltip,
|
|
13267
|
+
emptyStatePlaceholderProps,
|
|
13268
|
+
customization: customization?.chart
|
|
13269
|
+
}
|
|
13270
|
+
),
|
|
13271
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Box21.default, { sx: bottomLegendSx, children: [
|
|
13272
|
+
buckets.map((b, i) => {
|
|
13273
|
+
const color = b.color ?? bucketColors[i] ?? "#94A3B8";
|
|
13274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13275
|
+
import_Stack19.default,
|
|
13276
|
+
{
|
|
13277
|
+
direction: "row",
|
|
13278
|
+
alignItems: "center",
|
|
13279
|
+
spacing: 0.75,
|
|
13280
|
+
sx: { mr: 2 },
|
|
13281
|
+
children: [
|
|
13282
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color, size: bottomSwatch }),
|
|
13283
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13284
|
+
import_Typography18.default,
|
|
13285
|
+
{
|
|
13286
|
+
sx: {
|
|
13287
|
+
fontSize: bottomLegendFs,
|
|
13288
|
+
color: bottomLegendColor,
|
|
13289
|
+
fontWeight: 500
|
|
13290
|
+
},
|
|
13291
|
+
children: b.label
|
|
13292
|
+
}
|
|
13293
|
+
)
|
|
13294
|
+
]
|
|
13295
|
+
},
|
|
13296
|
+
b.id
|
|
13297
|
+
);
|
|
13298
|
+
}),
|
|
13299
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13300
|
+
import_Box21.default,
|
|
13301
|
+
{
|
|
13302
|
+
sx: {
|
|
13303
|
+
width: "1px",
|
|
13304
|
+
height: 14,
|
|
13305
|
+
bgcolor: bottomLegendDividerColor,
|
|
13306
|
+
mx: 1
|
|
13307
|
+
}
|
|
13308
|
+
}
|
|
13309
|
+
),
|
|
13310
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13311
|
+
import_Stack19.default,
|
|
13312
|
+
{
|
|
13313
|
+
direction: "row",
|
|
13314
|
+
alignItems: "center",
|
|
13315
|
+
spacing: 0.75,
|
|
13316
|
+
sx: { mr: 2 },
|
|
13317
|
+
children: [
|
|
13318
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LegendSquare, { color: comparisonColor, size: bottomSwatch }),
|
|
13319
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13320
|
+
import_Typography18.default,
|
|
13321
|
+
{
|
|
13322
|
+
sx: {
|
|
13323
|
+
fontSize: bottomLegendFs,
|
|
13324
|
+
color: bottomLegendColor,
|
|
13325
|
+
fontWeight: 500
|
|
13326
|
+
},
|
|
13327
|
+
children: unattendedBottomLegendLabel
|
|
13328
|
+
}
|
|
13329
|
+
)
|
|
13330
|
+
]
|
|
13331
|
+
}
|
|
13332
|
+
)
|
|
13333
|
+
] }) : null
|
|
13334
|
+
] }) }) });
|
|
13335
|
+
}
|
|
13336
|
+
|
|
12369
13337
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12370
13338
|
var import_react21 = require("@iconify/react");
|
|
12371
13339
|
var import_material19 = require("@mui/material");
|
|
12372
|
-
var
|
|
13340
|
+
var React26 = __toESM(require("react"));
|
|
12373
13341
|
var import_react22 = require("react");
|
|
12374
|
-
var
|
|
13342
|
+
var import_recharts10 = require("recharts");
|
|
12375
13343
|
|
|
12376
13344
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
12377
13345
|
var DEFAULT_FOOTFALL_TILE_ICONS = {
|
|
@@ -12794,7 +13762,7 @@ function getNestedList(payload) {
|
|
|
12794
13762
|
}
|
|
12795
13763
|
|
|
12796
13764
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.tsx
|
|
12797
|
-
var
|
|
13765
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12798
13766
|
function toDisplayNumber(value) {
|
|
12799
13767
|
if (!Number.isFinite(value)) return "0";
|
|
12800
13768
|
return new Intl.NumberFormat("en-IN").format(value);
|
|
@@ -12813,7 +13781,7 @@ function InlineStatCard({
|
|
|
12813
13781
|
sx,
|
|
12814
13782
|
iconColor = "#1565C0"
|
|
12815
13783
|
}) {
|
|
12816
|
-
return /* @__PURE__ */ (0,
|
|
13784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12817
13785
|
import_material19.Paper,
|
|
12818
13786
|
{
|
|
12819
13787
|
elevation: 0,
|
|
@@ -12829,8 +13797,8 @@ function InlineStatCard({
|
|
|
12829
13797
|
},
|
|
12830
13798
|
...sx ? [sx] : []
|
|
12831
13799
|
],
|
|
12832
|
-
children: /* @__PURE__ */ (0,
|
|
12833
|
-
/* @__PURE__ */ (0,
|
|
13800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
13801
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12834
13802
|
import_react21.Icon,
|
|
12835
13803
|
{
|
|
12836
13804
|
icon,
|
|
@@ -12840,8 +13808,8 @@ function InlineStatCard({
|
|
|
12840
13808
|
style: { flexShrink: 0 }
|
|
12841
13809
|
}
|
|
12842
13810
|
),
|
|
12843
|
-
/* @__PURE__ */ (0,
|
|
12844
|
-
/* @__PURE__ */ (0,
|
|
13811
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.15, children: [
|
|
13812
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12845
13813
|
import_material19.Typography,
|
|
12846
13814
|
{
|
|
12847
13815
|
variant: "body2",
|
|
@@ -12849,7 +13817,7 @@ function InlineStatCard({
|
|
|
12849
13817
|
children: title
|
|
12850
13818
|
}
|
|
12851
13819
|
),
|
|
12852
|
-
/* @__PURE__ */ (0,
|
|
13820
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12853
13821
|
import_material19.Typography,
|
|
12854
13822
|
{
|
|
12855
13823
|
variant: "h6",
|
|
@@ -12879,8 +13847,8 @@ function InlineSegmentStrip({
|
|
|
12879
13847
|
const barHeight = presentation?.barHeight ?? 12;
|
|
12880
13848
|
const trackInsetPx = presentation?.trackInsetPx ?? 3;
|
|
12881
13849
|
const trackBg = presentation?.trackBackgroundColor ?? "#ECEFF3";
|
|
12882
|
-
return /* @__PURE__ */ (0,
|
|
12883
|
-
/* @__PURE__ */ (0,
|
|
13850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { spacing: 0.75, children: [
|
|
13851
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12884
13852
|
import_material19.Stack,
|
|
12885
13853
|
{
|
|
12886
13854
|
direction: "row",
|
|
@@ -12888,7 +13856,7 @@ function InlineSegmentStrip({
|
|
|
12888
13856
|
justifyContent: "space-between",
|
|
12889
13857
|
gap: 1,
|
|
12890
13858
|
children: [
|
|
12891
|
-
/* @__PURE__ */ (0,
|
|
13859
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12892
13860
|
import_material19.Typography,
|
|
12893
13861
|
{
|
|
12894
13862
|
variant: "subtitle2",
|
|
@@ -12899,7 +13867,7 @@ function InlineSegmentStrip({
|
|
|
12899
13867
|
children: item.label
|
|
12900
13868
|
}
|
|
12901
13869
|
),
|
|
12902
|
-
/* @__PURE__ */ (0,
|
|
13870
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12903
13871
|
import_material19.Typography,
|
|
12904
13872
|
{
|
|
12905
13873
|
variant: "body2",
|
|
@@ -12913,7 +13881,7 @@ function InlineSegmentStrip({
|
|
|
12913
13881
|
]
|
|
12914
13882
|
}
|
|
12915
13883
|
),
|
|
12916
|
-
/* @__PURE__ */ (0,
|
|
13884
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12917
13885
|
import_material19.Box,
|
|
12918
13886
|
{
|
|
12919
13887
|
sx: {
|
|
@@ -12931,7 +13899,7 @@ function InlineSegmentStrip({
|
|
|
12931
13899
|
const widthPercent = total > 0 ? segment.value / total * filledPercent : 0;
|
|
12932
13900
|
const isLast = idx === lastIdx;
|
|
12933
13901
|
const fill = resolveSegmentFill(presentation, idx, segment.color);
|
|
12934
|
-
return /* @__PURE__ */ (0,
|
|
13902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12935
13903
|
import_material19.Tooltip,
|
|
12936
13904
|
{
|
|
12937
13905
|
title: (() => {
|
|
@@ -12944,7 +13912,7 @@ function InlineSegmentStrip({
|
|
|
12944
13912
|
});
|
|
12945
13913
|
return custom == null ? "" : custom;
|
|
12946
13914
|
}
|
|
12947
|
-
return /* @__PURE__ */ (0,
|
|
13915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12948
13916
|
InlineSegmentTooltipCard,
|
|
12949
13917
|
{
|
|
12950
13918
|
segment,
|
|
@@ -12959,7 +13927,7 @@ function InlineSegmentStrip({
|
|
|
12959
13927
|
sx: inlineSegmentTooltipPopperSx
|
|
12960
13928
|
}
|
|
12961
13929
|
},
|
|
12962
|
-
children: /* @__PURE__ */ (0,
|
|
13930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12963
13931
|
import_material19.Box,
|
|
12964
13932
|
{
|
|
12965
13933
|
sx: {
|
|
@@ -13004,9 +13972,9 @@ function InlineSegmentTooltipCard({
|
|
|
13004
13972
|
cardSx
|
|
13005
13973
|
}) {
|
|
13006
13974
|
const tooltipSurfaceSx = cardSx ? [inlineSegmentTooltipCardSx, cardSx] : inlineSegmentTooltipCardSx;
|
|
13007
|
-
return /* @__PURE__ */ (0,
|
|
13008
|
-
/* @__PURE__ */ (0,
|
|
13009
|
-
/* @__PURE__ */ (0,
|
|
13975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Box, { sx: tooltipSurfaceSx, children: [
|
|
13976
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Box, { sx: { height: 3, bgcolor: "grey.200", width: "100%" } }),
|
|
13977
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13010
13978
|
import_material19.Box,
|
|
13011
13979
|
{
|
|
13012
13980
|
sx: {
|
|
@@ -13019,7 +13987,7 @@ function InlineSegmentTooltipCard({
|
|
|
13019
13987
|
py: 1.25
|
|
13020
13988
|
},
|
|
13021
13989
|
children: [
|
|
13022
|
-
/* @__PURE__ */ (0,
|
|
13990
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13023
13991
|
import_material19.Box,
|
|
13024
13992
|
{
|
|
13025
13993
|
component: "span",
|
|
@@ -13033,7 +14001,7 @@ function InlineSegmentTooltipCard({
|
|
|
13033
14001
|
}
|
|
13034
14002
|
}
|
|
13035
14003
|
),
|
|
13036
|
-
/* @__PURE__ */ (0,
|
|
14004
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13037
14005
|
import_material19.Typography,
|
|
13038
14006
|
{
|
|
13039
14007
|
component: "span",
|
|
@@ -13046,7 +14014,7 @@ function InlineSegmentTooltipCard({
|
|
|
13046
14014
|
children: segment.label
|
|
13047
14015
|
}
|
|
13048
14016
|
),
|
|
13049
|
-
/* @__PURE__ */ (0,
|
|
14017
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13050
14018
|
import_material19.Typography,
|
|
13051
14019
|
{
|
|
13052
14020
|
component: "span",
|
|
@@ -13059,7 +14027,7 @@ function InlineSegmentTooltipCard({
|
|
|
13059
14027
|
children: " : "
|
|
13060
14028
|
}
|
|
13061
14029
|
),
|
|
13062
|
-
/* @__PURE__ */ (0,
|
|
14030
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13063
14031
|
import_material19.Typography,
|
|
13064
14032
|
{
|
|
13065
14033
|
component: "span",
|
|
@@ -13090,7 +14058,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13090
14058
|
const statIcon = presentation?.statCardIconColor ?? "#1565C0";
|
|
13091
14059
|
const customSummary = presentation?.summaryCards?.(summaryKpis);
|
|
13092
14060
|
const useCustomSummary = customSummary !== void 0;
|
|
13093
|
-
return /* @__PURE__ */ (0,
|
|
14061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13094
14062
|
import_material19.Stack,
|
|
13095
14063
|
{
|
|
13096
14064
|
spacing: 2,
|
|
@@ -13100,7 +14068,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13100
14068
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
13101
14069
|
],
|
|
13102
14070
|
children: [
|
|
13103
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0,
|
|
14071
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13104
14072
|
import_material19.Stack,
|
|
13105
14073
|
{
|
|
13106
14074
|
direction: "row",
|
|
@@ -13108,7 +14076,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13108
14076
|
flexWrap: "wrap",
|
|
13109
14077
|
useFlexGap: true,
|
|
13110
14078
|
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
13111
|
-
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0,
|
|
14079
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13112
14080
|
InlineStatCard,
|
|
13113
14081
|
{
|
|
13114
14082
|
icon: card.icon ?? "mdi:chart-box-outline",
|
|
@@ -13121,7 +14089,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13121
14089
|
},
|
|
13122
14090
|
card.id
|
|
13123
14091
|
)) : [
|
|
13124
|
-
/* @__PURE__ */ (0,
|
|
14092
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13125
14093
|
InlineStatCard,
|
|
13126
14094
|
{
|
|
13127
14095
|
icon: "mdi:store-marker-outline",
|
|
@@ -13132,7 +14100,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13132
14100
|
},
|
|
13133
14101
|
"default-stores"
|
|
13134
14102
|
),
|
|
13135
|
-
/* @__PURE__ */ (0,
|
|
14103
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13136
14104
|
InlineStatCard,
|
|
13137
14105
|
{
|
|
13138
14106
|
icon: "fluent:people-community-16-filled",
|
|
@@ -13146,7 +14114,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13146
14114
|
]
|
|
13147
14115
|
}
|
|
13148
14116
|
),
|
|
13149
|
-
/* @__PURE__ */ (0,
|
|
14117
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13150
14118
|
import_material19.Stack,
|
|
13151
14119
|
{
|
|
13152
14120
|
spacing: 1.25,
|
|
@@ -13154,7 +14122,7 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
13154
14122
|
{ pt: 0.5, pb: 1 },
|
|
13155
14123
|
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
13156
14124
|
],
|
|
13157
|
-
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0,
|
|
14125
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13158
14126
|
InlineSegmentStrip,
|
|
13159
14127
|
{
|
|
13160
14128
|
item,
|
|
@@ -13474,7 +14442,7 @@ function FootFallHeatMapView({
|
|
|
13474
14442
|
);
|
|
13475
14443
|
const dwellIconColor = resolveIconColor(iconColorProp, tileColor, "dwell");
|
|
13476
14444
|
const p = inner;
|
|
13477
|
-
return /* @__PURE__ */ (0,
|
|
14445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13478
14446
|
"foreignObject",
|
|
13479
14447
|
{
|
|
13480
14448
|
x,
|
|
@@ -13482,7 +14450,7 @@ function FootFallHeatMapView({
|
|
|
13482
14450
|
width,
|
|
13483
14451
|
height,
|
|
13484
14452
|
style: { borderRadius: "12px", overflow: "hidden" },
|
|
13485
|
-
children: /* @__PURE__ */ (0,
|
|
14453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13486
14454
|
import_material19.Stack,
|
|
13487
14455
|
{
|
|
13488
14456
|
onClick: handleClick,
|
|
@@ -13513,7 +14481,7 @@ function FootFallHeatMapView({
|
|
|
13513
14481
|
}
|
|
13514
14482
|
},
|
|
13515
14483
|
children: [
|
|
13516
|
-
/* @__PURE__ */ (0,
|
|
14484
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13517
14485
|
import_material19.Stack,
|
|
13518
14486
|
{
|
|
13519
14487
|
direction: isSmall ? "row" : "column",
|
|
@@ -13525,7 +14493,7 @@ function FootFallHeatMapView({
|
|
|
13525
14493
|
mb: isSmall ? 0.5 : 1
|
|
13526
14494
|
},
|
|
13527
14495
|
children: [
|
|
13528
|
-
/* @__PURE__ */ (0,
|
|
14496
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13529
14497
|
import_material19.Typography,
|
|
13530
14498
|
{
|
|
13531
14499
|
sx: {
|
|
@@ -13548,7 +14516,7 @@ function FootFallHeatMapView({
|
|
|
13548
14516
|
children: name
|
|
13549
14517
|
}
|
|
13550
14518
|
),
|
|
13551
|
-
/* @__PURE__ */ (0,
|
|
14519
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13552
14520
|
import_material19.Typography,
|
|
13553
14521
|
{
|
|
13554
14522
|
sx: {
|
|
@@ -13563,7 +14531,7 @@ function FootFallHeatMapView({
|
|
|
13563
14531
|
]
|
|
13564
14532
|
}
|
|
13565
14533
|
),
|
|
13566
|
-
/* @__PURE__ */ (0,
|
|
14534
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13567
14535
|
import_material19.Stack,
|
|
13568
14536
|
{
|
|
13569
14537
|
direction: "row",
|
|
@@ -13577,7 +14545,7 @@ function FootFallHeatMapView({
|
|
|
13577
14545
|
...tileMetrics?.metricsRowStackSx != null ? [tileMetrics.metricsRowStackSx] : []
|
|
13578
14546
|
],
|
|
13579
14547
|
children: [
|
|
13580
|
-
/* @__PURE__ */ (0,
|
|
14548
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13581
14549
|
import_material19.Stack,
|
|
13582
14550
|
{
|
|
13583
14551
|
direction: "row",
|
|
@@ -13595,7 +14563,7 @@ function FootFallHeatMapView({
|
|
|
13595
14563
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13596
14564
|
],
|
|
13597
14565
|
children: [
|
|
13598
|
-
/* @__PURE__ */ (0,
|
|
14566
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13599
14567
|
import_material19.Box,
|
|
13600
14568
|
{
|
|
13601
14569
|
sx: [
|
|
@@ -13608,7 +14576,7 @@ function FootFallHeatMapView({
|
|
|
13608
14576
|
},
|
|
13609
14577
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13610
14578
|
],
|
|
13611
|
-
children: /* @__PURE__ */ (0,
|
|
14579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13612
14580
|
import_react21.Icon,
|
|
13613
14581
|
{
|
|
13614
14582
|
icon: icons.visitors,
|
|
@@ -13618,7 +14586,7 @@ function FootFallHeatMapView({
|
|
|
13618
14586
|
)
|
|
13619
14587
|
}
|
|
13620
14588
|
),
|
|
13621
|
-
/* @__PURE__ */ (0,
|
|
14589
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13622
14590
|
import_material19.Typography,
|
|
13623
14591
|
{
|
|
13624
14592
|
sx: [
|
|
@@ -13636,7 +14604,7 @@ function FootFallHeatMapView({
|
|
|
13636
14604
|
]
|
|
13637
14605
|
}
|
|
13638
14606
|
),
|
|
13639
|
-
/* @__PURE__ */ (0,
|
|
14607
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13640
14608
|
import_material19.Stack,
|
|
13641
14609
|
{
|
|
13642
14610
|
direction: "row",
|
|
@@ -13654,7 +14622,7 @@ function FootFallHeatMapView({
|
|
|
13654
14622
|
...tileMetrics?.metricPillStackSx != null ? [tileMetrics.metricPillStackSx] : []
|
|
13655
14623
|
],
|
|
13656
14624
|
children: [
|
|
13657
|
-
/* @__PURE__ */ (0,
|
|
14625
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13658
14626
|
import_material19.Box,
|
|
13659
14627
|
{
|
|
13660
14628
|
sx: [
|
|
@@ -13667,7 +14635,7 @@ function FootFallHeatMapView({
|
|
|
13667
14635
|
},
|
|
13668
14636
|
...tileMetrics?.metricPillIconBoxSx != null ? [tileMetrics.metricPillIconBoxSx] : []
|
|
13669
14637
|
],
|
|
13670
|
-
children: /* @__PURE__ */ (0,
|
|
14638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13671
14639
|
import_react21.Icon,
|
|
13672
14640
|
{
|
|
13673
14641
|
icon: icons.dwell,
|
|
@@ -13677,7 +14645,7 @@ function FootFallHeatMapView({
|
|
|
13677
14645
|
)
|
|
13678
14646
|
}
|
|
13679
14647
|
),
|
|
13680
|
-
/* @__PURE__ */ (0,
|
|
14648
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13681
14649
|
import_material19.Typography,
|
|
13682
14650
|
{
|
|
13683
14651
|
sx: [
|
|
@@ -13720,7 +14688,7 @@ function FootFallHeatMapView({
|
|
|
13720
14688
|
const LabelTag = ({ textColor = "#f0f0f0" }) => {
|
|
13721
14689
|
const pathSegments = trackingDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean);
|
|
13722
14690
|
const breadcrumbSegments = Array.from(new Set([...pathSegments].reverse()));
|
|
13723
|
-
return /* @__PURE__ */ (0,
|
|
14691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Stack, { direction: "row", alignItems: "baseline", flexWrap: "wrap", gap: 1.5, children: breadcrumbSegments.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13724
14692
|
import_material19.Typography,
|
|
13725
14693
|
{
|
|
13726
14694
|
component: "span",
|
|
@@ -13734,9 +14702,9 @@ function FootFallHeatMapView({
|
|
|
13734
14702
|
color: textColor,
|
|
13735
14703
|
children: brandLabel
|
|
13736
14704
|
}
|
|
13737
|
-
) : /* @__PURE__ */ (0,
|
|
13738
|
-
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0,
|
|
13739
|
-
i > 0 ? /* @__PURE__ */ (0,
|
|
14705
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14706
|
+
breadcrumbSegments.map((seg, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(React26.Fragment, { children: [
|
|
14707
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13740
14708
|
import_material19.Typography,
|
|
13741
14709
|
{
|
|
13742
14710
|
component: "span",
|
|
@@ -13747,7 +14715,7 @@ function FootFallHeatMapView({
|
|
|
13747
14715
|
children: "/"
|
|
13748
14716
|
}
|
|
13749
14717
|
) : null,
|
|
13750
|
-
/* @__PURE__ */ (0,
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13751
14719
|
import_material19.Typography,
|
|
13752
14720
|
{
|
|
13753
14721
|
component: "span",
|
|
@@ -13763,8 +14731,8 @@ function FootFallHeatMapView({
|
|
|
13763
14731
|
}
|
|
13764
14732
|
)
|
|
13765
14733
|
] }, `${seg}-${i}`)),
|
|
13766
|
-
brandLabel ? /* @__PURE__ */ (0,
|
|
13767
|
-
/* @__PURE__ */ (0,
|
|
14734
|
+
brandLabel ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14735
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13768
14736
|
import_material19.Typography,
|
|
13769
14737
|
{
|
|
13770
14738
|
component: "span",
|
|
@@ -13774,7 +14742,7 @@ function FootFallHeatMapView({
|
|
|
13774
14742
|
children: "/"
|
|
13775
14743
|
}
|
|
13776
14744
|
),
|
|
13777
|
-
/* @__PURE__ */ (0,
|
|
14745
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13778
14746
|
import_material19.Typography,
|
|
13779
14747
|
{
|
|
13780
14748
|
component: "span",
|
|
@@ -13794,10 +14762,10 @@ function FootFallHeatMapView({
|
|
|
13794
14762
|
};
|
|
13795
14763
|
const is500Error = error !== null && error !== void 0 && typeof error === "object" && "status" in error && error.status === 500;
|
|
13796
14764
|
if (is500Error) {
|
|
13797
|
-
return /* @__PURE__ */ (0,
|
|
14765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Box, { sx: { p: 4, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { color: "error", children: "Something went wrong (500). Try again later." }) });
|
|
13798
14766
|
}
|
|
13799
14767
|
if (isLoading || loading) {
|
|
13800
|
-
return /* @__PURE__ */ (0,
|
|
14768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13801
14769
|
import_material19.Skeleton,
|
|
13802
14770
|
{
|
|
13803
14771
|
variant: "rectangular",
|
|
@@ -13838,8 +14806,8 @@ function FootFallHeatMapView({
|
|
|
13838
14806
|
"#888888",
|
|
13839
14807
|
"header"
|
|
13840
14808
|
);
|
|
13841
|
-
return /* @__PURE__ */ (0,
|
|
13842
|
-
/* @__PURE__ */ (0,
|
|
14809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { width: "100%", children: [
|
|
14810
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13843
14811
|
import_material19.Box,
|
|
13844
14812
|
{
|
|
13845
14813
|
sx: {
|
|
@@ -13851,16 +14819,16 @@ function FootFallHeatMapView({
|
|
|
13851
14819
|
gap: 1
|
|
13852
14820
|
},
|
|
13853
14821
|
children: [
|
|
13854
|
-
/* @__PURE__ */ (0,
|
|
13855
|
-
/* @__PURE__ */ (0,
|
|
13856
|
-
isFetching ? /* @__PURE__ */ (0,
|
|
13857
|
-
/* @__PURE__ */ (0,
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "h6", fontWeight: 700, children: title }),
|
|
14823
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", gap: 1, children: [
|
|
14824
|
+
isFetching ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Typography, { variant: "caption", color: "text.secondary", children: "Updating\u2026" }) : null,
|
|
14825
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material19.Tooltip, { title: infoTooltip, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13858
14826
|
import_material19.IconButton,
|
|
13859
14827
|
{
|
|
13860
14828
|
size: "small",
|
|
13861
14829
|
"aria-label": "Zone performance info",
|
|
13862
14830
|
edge: "end",
|
|
13863
|
-
children: /* @__PURE__ */ (0,
|
|
14831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13864
14832
|
import_react21.Icon,
|
|
13865
14833
|
{
|
|
13866
14834
|
icon: icons.headerInfo,
|
|
@@ -13875,7 +14843,7 @@ function FootFallHeatMapView({
|
|
|
13875
14843
|
]
|
|
13876
14844
|
}
|
|
13877
14845
|
),
|
|
13878
|
-
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0,
|
|
14846
|
+
data?.previous?.length > 0 && headerData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13879
14847
|
import_material19.Stack,
|
|
13880
14848
|
{
|
|
13881
14849
|
direction: "row",
|
|
@@ -13890,13 +14858,13 @@ function FootFallHeatMapView({
|
|
|
13890
14858
|
backgroundColor: zoneBarColor
|
|
13891
14859
|
},
|
|
13892
14860
|
children: [
|
|
13893
|
-
/* @__PURE__ */ (0,
|
|
13894
|
-
/* @__PURE__ */ (0,
|
|
14861
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material19.Stack, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
14862
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13895
14863
|
import_material19.Button,
|
|
13896
14864
|
{
|
|
13897
14865
|
size: "small",
|
|
13898
14866
|
onClick: handleClose,
|
|
13899
|
-
startIcon: /* @__PURE__ */ (0,
|
|
14867
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13900
14868
|
import_react21.Icon,
|
|
13901
14869
|
{
|
|
13902
14870
|
icon: "mdi:chevron-left",
|
|
@@ -13916,9 +14884,9 @@ function FootFallHeatMapView({
|
|
|
13916
14884
|
children: "Back"
|
|
13917
14885
|
}
|
|
13918
14886
|
),
|
|
13919
|
-
/* @__PURE__ */ (0,
|
|
14887
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LabelTag, { textColor: zoneBarHeaderFg })
|
|
13920
14888
|
] }),
|
|
13921
|
-
/* @__PURE__ */ (0,
|
|
14889
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13922
14890
|
import_material19.Typography,
|
|
13923
14891
|
{
|
|
13924
14892
|
variant: "h6",
|
|
@@ -13933,7 +14901,7 @@ function FootFallHeatMapView({
|
|
|
13933
14901
|
]
|
|
13934
14902
|
}
|
|
13935
14903
|
) : null,
|
|
13936
|
-
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0,
|
|
14904
|
+
isDrilledIntoZone && showKpiStrip && derivedKpiStrip ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13937
14905
|
FootfallHeatMapKpiRankedBlock,
|
|
13938
14906
|
{
|
|
13939
14907
|
strip: derivedKpiStrip,
|
|
@@ -13950,7 +14918,7 @@ function FootFallHeatMapView({
|
|
|
13950
14918
|
}
|
|
13951
14919
|
}
|
|
13952
14920
|
) : null,
|
|
13953
|
-
showLeafDetailsBody ? /* @__PURE__ */ (0,
|
|
14921
|
+
showLeafDetailsBody ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13954
14922
|
import_material19.Box,
|
|
13955
14923
|
{
|
|
13956
14924
|
sx: [
|
|
@@ -13966,8 +14934,8 @@ function FootFallHeatMapView({
|
|
|
13966
14934
|
]
|
|
13967
14935
|
}
|
|
13968
14936
|
) : null,
|
|
13969
|
-
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0,
|
|
13970
|
-
|
|
14937
|
+
showLeaf ? null : showChart ? hideTreemapForTerminalCardWithKpi ? null : hasTreemapData ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_recharts10.ResponsiveContainer, { width: "100%", height: treemapHeight, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14938
|
+
import_recharts10.Treemap,
|
|
13971
14939
|
{
|
|
13972
14940
|
data: data?.current ?? [],
|
|
13973
14941
|
dataKey: "value",
|
|
@@ -13979,22 +14947,22 @@ function FootFallHeatMapView({
|
|
|
13979
14947
|
animationDuration: 0,
|
|
13980
14948
|
style: { borderRadius: "12px" }
|
|
13981
14949
|
}
|
|
13982
|
-
) }) : /* @__PURE__ */ (0,
|
|
14950
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13983
14951
|
ChartEmptyState,
|
|
13984
14952
|
{
|
|
13985
14953
|
minHeight: treemapHeight,
|
|
13986
14954
|
...emptyStatePlaceholderProps
|
|
13987
14955
|
}
|
|
13988
|
-
) : /* @__PURE__ */ (0,
|
|
14956
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChartEmptyState, { minHeight: 400, ...emptyStatePlaceholderProps })
|
|
13989
14957
|
] });
|
|
13990
14958
|
}
|
|
13991
14959
|
|
|
13992
14960
|
// src/components/widgets/FootFallHeatMap/ZoneWiseKpiCards.tsx
|
|
13993
14961
|
var import_Grid2 = __toESM(require("@mui/material/Grid"));
|
|
13994
14962
|
var import_Paper3 = __toESM(require("@mui/material/Paper"));
|
|
13995
|
-
var
|
|
13996
|
-
var
|
|
13997
|
-
var
|
|
14963
|
+
var import_Stack20 = __toESM(require("@mui/material/Stack"));
|
|
14964
|
+
var import_Typography19 = __toESM(require("@mui/material/Typography"));
|
|
14965
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13998
14966
|
function metricsToRows(metrics) {
|
|
13999
14967
|
return [
|
|
14000
14968
|
{ id: 1, title: "Overall Visits", value: metrics.overall_visits ?? 0 },
|
|
@@ -14032,7 +15000,7 @@ function metricsToRows(metrics) {
|
|
|
14032
15000
|
}
|
|
14033
15001
|
var ZoneWiseKpiCards = ({ metrics }) => {
|
|
14034
15002
|
const rows = metricsToRows(metrics);
|
|
14035
|
-
return /* @__PURE__ */ (0,
|
|
15003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Grid2.default, { container: true, spacing: 3, sx: { marginTop: "10px", paddingX: "6px" }, children: rows.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
14036
15004
|
import_Grid2.default,
|
|
14037
15005
|
{
|
|
14038
15006
|
size: {
|
|
@@ -14040,7 +15008,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14040
15008
|
sm: 6,
|
|
14041
15009
|
md: 3
|
|
14042
15010
|
},
|
|
14043
|
-
children: /* @__PURE__ */ (0,
|
|
15011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
14044
15012
|
import_Paper3.default,
|
|
14045
15013
|
{
|
|
14046
15014
|
elevation: 0,
|
|
@@ -14052,8 +15020,8 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14052
15020
|
height: "100%"
|
|
14053
15021
|
},
|
|
14054
15022
|
children: [
|
|
14055
|
-
/* @__PURE__ */ (0,
|
|
14056
|
-
|
|
15023
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
15024
|
+
import_Typography19.default,
|
|
14057
15025
|
{
|
|
14058
15026
|
variant: "caption",
|
|
14059
15027
|
color: "text.secondary",
|
|
@@ -14061,7 +15029,7 @@ var ZoneWiseKpiCards = ({ metrics }) => {
|
|
|
14061
15029
|
children: item.title
|
|
14062
15030
|
}
|
|
14063
15031
|
),
|
|
14064
|
-
/* @__PURE__ */ (0,
|
|
15032
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Stack20.default, { mt: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_Typography19.default, { variant: "h6", fontWeight: 700, children: item.value }) })
|
|
14065
15033
|
]
|
|
14066
15034
|
}
|
|
14067
15035
|
)
|
|
@@ -14120,32 +15088,32 @@ var peakBillingHoursMockSeriesByTabId = {
|
|
|
14120
15088
|
};
|
|
14121
15089
|
|
|
14122
15090
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14123
|
-
var
|
|
14124
|
-
var
|
|
14125
|
-
var
|
|
15091
|
+
var import_Box22 = __toESM(require("@mui/material/Box"));
|
|
15092
|
+
var import_Card4 = __toESM(require("@mui/material/Card"));
|
|
15093
|
+
var import_CardContent4 = __toESM(require("@mui/material/CardContent"));
|
|
14126
15094
|
var import_Skeleton7 = __toESM(require("@mui/material/Skeleton"));
|
|
14127
|
-
var
|
|
14128
|
-
var
|
|
14129
|
-
var
|
|
14130
|
-
var
|
|
15095
|
+
var import_Stack21 = __toESM(require("@mui/material/Stack"));
|
|
15096
|
+
var import_Typography20 = __toESM(require("@mui/material/Typography"));
|
|
15097
|
+
var React28 = __toESM(require("react"));
|
|
15098
|
+
var import_recharts11 = require("recharts");
|
|
14131
15099
|
|
|
14132
15100
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursCustomizationContext.tsx
|
|
14133
|
-
var
|
|
14134
|
-
var
|
|
14135
|
-
var PeakBillingHoursCustomizationContext =
|
|
15101
|
+
var React27 = __toESM(require("react"));
|
|
15102
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
15103
|
+
var PeakBillingHoursCustomizationContext = React27.createContext({});
|
|
14136
15104
|
function PeakBillingHoursCustomizationProvider({
|
|
14137
15105
|
value,
|
|
14138
15106
|
children
|
|
14139
15107
|
}) {
|
|
14140
|
-
const memo =
|
|
14141
|
-
return /* @__PURE__ */ (0,
|
|
15108
|
+
const memo = React27.useMemo(() => value, [value]);
|
|
15109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PeakBillingHoursCustomizationContext.Provider, { value: memo, children });
|
|
14142
15110
|
}
|
|
14143
15111
|
function usePeakBillingHoursCustomization() {
|
|
14144
|
-
return
|
|
15112
|
+
return React27.useContext(PeakBillingHoursCustomizationContext);
|
|
14145
15113
|
}
|
|
14146
15114
|
|
|
14147
15115
|
// src/components/widgets/PeakBillingHours/PeakBillingHoursTooltip.tsx
|
|
14148
|
-
var
|
|
15116
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14149
15117
|
function formatTooltipValue2(n) {
|
|
14150
15118
|
return new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }).format(
|
|
14151
15119
|
Math.round(n)
|
|
@@ -14192,7 +15160,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14192
15160
|
},
|
|
14193
15161
|
tt?.bodyStyle
|
|
14194
15162
|
);
|
|
14195
|
-
return /* @__PURE__ */ (0,
|
|
15163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14196
15164
|
"div",
|
|
14197
15165
|
{
|
|
14198
15166
|
style: {
|
|
@@ -14200,7 +15168,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14200
15168
|
minWidth: 160,
|
|
14201
15169
|
maxWidth: 280
|
|
14202
15170
|
},
|
|
14203
|
-
children: /* @__PURE__ */ (0,
|
|
15171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14204
15172
|
"div",
|
|
14205
15173
|
{
|
|
14206
15174
|
style: {
|
|
@@ -14211,7 +15179,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14211
15179
|
boxShadow: shadow
|
|
14212
15180
|
},
|
|
14213
15181
|
children: [
|
|
14214
|
-
/* @__PURE__ */ (0,
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14215
15183
|
"div",
|
|
14216
15184
|
{
|
|
14217
15185
|
style: {
|
|
@@ -14222,14 +15190,14 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14222
15190
|
"aria-hidden": true
|
|
14223
15191
|
}
|
|
14224
15192
|
),
|
|
14225
|
-
/* @__PURE__ */ (0,
|
|
14226
|
-
/* @__PURE__ */ (0,
|
|
14227
|
-
/* @__PURE__ */ (0,
|
|
14228
|
-
/* @__PURE__ */ (0,
|
|
15193
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: bodyStyle, children: [
|
|
15194
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: rowStyle, children: [
|
|
15195
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: dateP }),
|
|
15196
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: labelText })
|
|
14229
15197
|
] }),
|
|
14230
|
-
/* @__PURE__ */ (0,
|
|
14231
|
-
/* @__PURE__ */ (0,
|
|
14232
|
-
/* @__PURE__ */ (0,
|
|
15198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { ...rowStyle, marginTop: gap }, children: [
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: prefixCol, fontWeight: prefixFw }, children: totalP }),
|
|
15200
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { color: valueCol, fontWeight: valueFw }, children: formatTooltipValue2(num) })
|
|
14233
15201
|
] })
|
|
14234
15202
|
] })
|
|
14235
15203
|
]
|
|
@@ -14240,7 +15208,7 @@ function PeakBillingHoursTooltip(props) {
|
|
|
14240
15208
|
}
|
|
14241
15209
|
|
|
14242
15210
|
// src/components/widgets/PeakBillingHours/PeakBillingHours.tsx
|
|
14243
|
-
var
|
|
15211
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
14244
15212
|
var OLY_DEFAULT_COMPOSED_CHART_CHROME6 = {
|
|
14245
15213
|
cartesianGridStroke: "#D3D6DF",
|
|
14246
15214
|
xAxisLineStroke: "#7566FC",
|
|
@@ -14266,7 +15234,7 @@ function PeakBarTopLabel(props) {
|
|
|
14266
15234
|
const cx = nx + nw / 2;
|
|
14267
15235
|
const cy = ny - 6;
|
|
14268
15236
|
const isHorizontal = angle === 0;
|
|
14269
|
-
return /* @__PURE__ */ (0,
|
|
15237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14270
15238
|
"text",
|
|
14271
15239
|
{
|
|
14272
15240
|
x: cx,
|
|
@@ -14280,7 +15248,7 @@ function PeakBarTopLabel(props) {
|
|
|
14280
15248
|
}
|
|
14281
15249
|
);
|
|
14282
15250
|
}
|
|
14283
|
-
function
|
|
15251
|
+
function BarPlot2({
|
|
14284
15252
|
data,
|
|
14285
15253
|
yAxisDomain,
|
|
14286
15254
|
yAxisTicks,
|
|
@@ -14319,24 +15287,24 @@ function BarPlot({
|
|
|
14319
15287
|
barRadius,
|
|
14320
15288
|
barRadius
|
|
14321
15289
|
];
|
|
14322
|
-
return /* @__PURE__ */ (0,
|
|
14323
|
-
|
|
15290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Box22.default, { sx: { width: "100%", height, mt: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_recharts11.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
15291
|
+
import_recharts11.BarChart,
|
|
14324
15292
|
{
|
|
14325
15293
|
data,
|
|
14326
15294
|
margin: m,
|
|
14327
15295
|
barCategoryGap: categoryGap,
|
|
14328
15296
|
barGap,
|
|
14329
15297
|
children: [
|
|
14330
|
-
/* @__PURE__ */ (0,
|
|
14331
|
-
|
|
15298
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15299
|
+
import_recharts11.CartesianGrid,
|
|
14332
15300
|
{
|
|
14333
15301
|
strokeDasharray: dash,
|
|
14334
15302
|
vertical: false,
|
|
14335
15303
|
stroke: gridStroke
|
|
14336
15304
|
}
|
|
14337
15305
|
),
|
|
14338
|
-
/* @__PURE__ */ (0,
|
|
14339
|
-
|
|
15306
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15307
|
+
import_recharts11.XAxis,
|
|
14340
15308
|
{
|
|
14341
15309
|
dataKey: "label",
|
|
14342
15310
|
dx: xAxisTickDx,
|
|
@@ -14349,8 +15317,8 @@ function BarPlot({
|
|
|
14349
15317
|
height: 36
|
|
14350
15318
|
}
|
|
14351
15319
|
),
|
|
14352
|
-
/* @__PURE__ */ (0,
|
|
14353
|
-
|
|
15320
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15321
|
+
import_recharts11.YAxis,
|
|
14354
15322
|
{
|
|
14355
15323
|
domain: yAxisDomain,
|
|
14356
15324
|
ticks: yAxisTicks,
|
|
@@ -14361,8 +15329,8 @@ function BarPlot({
|
|
|
14361
15329
|
width: yWidth
|
|
14362
15330
|
}
|
|
14363
15331
|
),
|
|
14364
|
-
/* @__PURE__ */ (0,
|
|
14365
|
-
|
|
15332
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15333
|
+
import_recharts11.Tooltip,
|
|
14366
15334
|
{
|
|
14367
15335
|
content: (tooltipProps) => {
|
|
14368
15336
|
if (renderTooltip) {
|
|
@@ -14371,9 +15339,9 @@ function BarPlot({
|
|
|
14371
15339
|
data,
|
|
14372
15340
|
activeTabId
|
|
14373
15341
|
});
|
|
14374
|
-
return customTooltip == null ? null : /* @__PURE__ */ (0,
|
|
15342
|
+
return customTooltip == null ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, { children: customTooltip });
|
|
14375
15343
|
}
|
|
14376
|
-
return /* @__PURE__ */ (0,
|
|
15344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PeakBillingHoursTooltip, { ...tooltipProps });
|
|
14377
15345
|
},
|
|
14378
15346
|
cursor: {
|
|
14379
15347
|
fill: hoverBandFill,
|
|
@@ -14383,8 +15351,8 @@ function BarPlot({
|
|
|
14383
15351
|
allowEscapeViewBox: { x: false, y: true }
|
|
14384
15352
|
}
|
|
14385
15353
|
),
|
|
14386
|
-
/* @__PURE__ */ (0,
|
|
14387
|
-
|
|
15354
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15355
|
+
import_recharts11.Bar,
|
|
14388
15356
|
{
|
|
14389
15357
|
dataKey: "value",
|
|
14390
15358
|
name: "Visits",
|
|
@@ -14392,11 +15360,11 @@ function BarPlot({
|
|
|
14392
15360
|
radius: radiusTuple,
|
|
14393
15361
|
isAnimationActive: false,
|
|
14394
15362
|
maxBarSize: 48,
|
|
14395
|
-
children: /* @__PURE__ */ (0,
|
|
14396
|
-
|
|
15363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15364
|
+
import_recharts11.LabelList,
|
|
14397
15365
|
{
|
|
14398
15366
|
dataKey: "value",
|
|
14399
|
-
content: (props) => /* @__PURE__ */ (0,
|
|
15367
|
+
content: (props) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14400
15368
|
PeakBarTopLabel,
|
|
14401
15369
|
{
|
|
14402
15370
|
...props,
|
|
@@ -14436,7 +15404,7 @@ function PeakBillingHours({
|
|
|
14436
15404
|
emptyStatePlaceholderProps,
|
|
14437
15405
|
customization
|
|
14438
15406
|
}) {
|
|
14439
|
-
const chartData =
|
|
15407
|
+
const chartData = React28.useMemo(() => {
|
|
14440
15408
|
if (seriesByTabId) {
|
|
14441
15409
|
return seriesByTabId[activeTabId] ?? [];
|
|
14442
15410
|
}
|
|
@@ -14471,9 +15439,9 @@ function PeakBillingHours({
|
|
|
14471
15439
|
},
|
|
14472
15440
|
customization?.header?.subtitleSx
|
|
14473
15441
|
);
|
|
14474
|
-
return /* @__PURE__ */ (0,
|
|
14475
|
-
/* @__PURE__ */ (0,
|
|
14476
|
-
|
|
15442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PeakBillingHoursCustomizationProvider, { value: customization ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Card4.default, { elevation: customization?.rootCard?.elevation ?? 0, sx: rootSx, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_CardContent4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_Stack21.default, { spacing: 1.75, sx: { width: "100%" }, children: [
|
|
15443
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
15444
|
+
import_Stack21.default,
|
|
14477
15445
|
{
|
|
14478
15446
|
direction: "row",
|
|
14479
15447
|
alignItems: "flex-start",
|
|
@@ -14481,20 +15449,20 @@ function PeakBillingHours({
|
|
|
14481
15449
|
gap: 2,
|
|
14482
15450
|
flexWrap: "wrap",
|
|
14483
15451
|
children: [
|
|
14484
|
-
/* @__PURE__ */ (0,
|
|
14485
|
-
/* @__PURE__ */ (0,
|
|
14486
|
-
/* @__PURE__ */ (0,
|
|
15452
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_Box22.default, { component: "div", sx: { minWidth: 0 }, children: [
|
|
15453
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: titleSx, children: title }),
|
|
15454
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Typography20.default, { component: "span", sx: subtitleSx, children: subtitle })
|
|
14487
15455
|
] }),
|
|
14488
|
-
/* @__PURE__ */ (0,
|
|
14489
|
-
|
|
15456
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15457
|
+
import_Stack21.default,
|
|
14490
15458
|
{
|
|
14491
15459
|
direction: "row",
|
|
14492
15460
|
alignItems: "center",
|
|
14493
15461
|
spacing: 1.5,
|
|
14494
15462
|
sx: { flexShrink: 0 },
|
|
14495
|
-
children: resolvedInfo ? /* @__PURE__ */ (0,
|
|
14496
|
-
/* @__PURE__ */ (0,
|
|
14497
|
-
/* @__PURE__ */ (0,
|
|
15463
|
+
children: resolvedInfo ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
15464
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChartWidgetHeaderSeparator, {}),
|
|
15465
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14498
15466
|
ChartWidgetInfoButton,
|
|
14499
15467
|
{
|
|
14500
15468
|
popover: resolvedInfo,
|
|
@@ -14507,7 +15475,7 @@ function PeakBillingHours({
|
|
|
14507
15475
|
]
|
|
14508
15476
|
}
|
|
14509
15477
|
),
|
|
14510
|
-
/* @__PURE__ */ (0,
|
|
15478
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14511
15479
|
ChartWidgetSegmentedTabs,
|
|
14512
15480
|
{
|
|
14513
15481
|
tabs,
|
|
@@ -14527,8 +15495,8 @@ function PeakBillingHours({
|
|
|
14527
15495
|
inactiveTabFontWeight: st?.inactiveTabFontWeight ?? 600
|
|
14528
15496
|
}
|
|
14529
15497
|
),
|
|
14530
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
14531
|
-
|
|
15498
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Skeleton7.default, { variant: "rounded", width: "100%", height: 320 }) : chartData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15499
|
+
BarPlot2,
|
|
14532
15500
|
{
|
|
14533
15501
|
data: chartData,
|
|
14534
15502
|
yAxisDomain,
|
|
@@ -14542,7 +15510,7 @@ function PeakBillingHours({
|
|
|
14542
15510
|
xAxisTickStyle,
|
|
14543
15511
|
barValueLabelAngle
|
|
14544
15512
|
}
|
|
14545
|
-
) : /* @__PURE__ */ (0,
|
|
15513
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14546
15514
|
ChartEmptyState,
|
|
14547
15515
|
{
|
|
14548
15516
|
minHeight: 320,
|
|
@@ -14553,10 +15521,10 @@ function PeakBillingHours({
|
|
|
14553
15521
|
}
|
|
14554
15522
|
|
|
14555
15523
|
// src/components/widgets/CustomerJourneyAnalysis/CustomerJourneyAnalysis.tsx
|
|
14556
|
-
var
|
|
14557
|
-
var
|
|
14558
|
-
var
|
|
14559
|
-
var
|
|
15524
|
+
var import_Box23 = __toESM(require("@mui/material/Box"));
|
|
15525
|
+
var import_Stack22 = __toESM(require("@mui/material/Stack"));
|
|
15526
|
+
var import_Typography21 = __toESM(require("@mui/material/Typography"));
|
|
15527
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
14560
15528
|
var DEFAULT_WALK_INS_BG = "#5B8DEF";
|
|
14561
15529
|
var DEFAULT_TRIAL_VISITS_BG = "#F59E42";
|
|
14562
15530
|
var DEFAULT_BILLING_VISITS_BG = "#6EBE7A";
|
|
@@ -14604,7 +15572,7 @@ function resolveMetricConfig(shared, perCard, props) {
|
|
|
14604
15572
|
sx: perCard?.sx ?? shared?.sx
|
|
14605
15573
|
};
|
|
14606
15574
|
}
|
|
14607
|
-
function
|
|
15575
|
+
function mergeSx5(...items) {
|
|
14608
15576
|
return items.flatMap(
|
|
14609
15577
|
(item) => Array.isArray(item) ? item : item ? [item] : []
|
|
14610
15578
|
);
|
|
@@ -14811,17 +15779,17 @@ function CustomerJourneyAnalysis({
|
|
|
14811
15779
|
...Array.isArray(metricsSx) ? metricsSx : metricsSx ? [metricsSx] : []
|
|
14812
15780
|
];
|
|
14813
15781
|
const bodyDirection = { xs: "column", [bodyBreakpoint]: "row" };
|
|
14814
|
-
return /* @__PURE__ */ (0,
|
|
14815
|
-
!hideTitle && /* @__PURE__ */ (0,
|
|
14816
|
-
|
|
15782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: outerSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Stack22.default, { spacing: 2, children: [
|
|
15783
|
+
!hideTitle && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15784
|
+
import_Stack22.default,
|
|
14817
15785
|
{
|
|
14818
15786
|
direction: "row",
|
|
14819
15787
|
alignItems: "flex-start",
|
|
14820
15788
|
justifyContent: "space-between",
|
|
14821
15789
|
gap: 2,
|
|
14822
15790
|
children: [
|
|
14823
|
-
/* @__PURE__ */ (0,
|
|
14824
|
-
|
|
15791
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15792
|
+
import_Typography21.default,
|
|
14825
15793
|
{
|
|
14826
15794
|
component: "h2",
|
|
14827
15795
|
variant: "h6",
|
|
@@ -14834,8 +15802,8 @@ function CustomerJourneyAnalysis({
|
|
|
14834
15802
|
children: title
|
|
14835
15803
|
}
|
|
14836
15804
|
),
|
|
14837
|
-
headerActions != null ? /* @__PURE__ */ (0,
|
|
14838
|
-
|
|
15805
|
+
headerActions != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15806
|
+
import_Box23.default,
|
|
14839
15807
|
{
|
|
14840
15808
|
sx: {
|
|
14841
15809
|
flexShrink: 0,
|
|
@@ -14849,9 +15817,9 @@ function CustomerJourneyAnalysis({
|
|
|
14849
15817
|
]
|
|
14850
15818
|
}
|
|
14851
15819
|
),
|
|
14852
|
-
/* @__PURE__ */ (0,
|
|
14853
|
-
/* @__PURE__ */ (0,
|
|
14854
|
-
/* @__PURE__ */ (0,
|
|
15820
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Stack22.default, { direction: bodyDirection, spacing: bodyGap, alignItems: "stretch", children: [
|
|
15821
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: stripSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_Box23.default, { sx: statCardsRowSx, children: [
|
|
15822
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14855
15823
|
JourneyStatCard,
|
|
14856
15824
|
{
|
|
14857
15825
|
icon: wiConfig.icon,
|
|
@@ -14872,7 +15840,7 @@ function CustomerJourneyAnalysis({
|
|
|
14872
15840
|
borderRadius: wiConfig.borderRadius,
|
|
14873
15841
|
minHeight: wiConfig.minHeight,
|
|
14874
15842
|
isLoading,
|
|
14875
|
-
sx:
|
|
15843
|
+
sx: mergeSx5(
|
|
14876
15844
|
{
|
|
14877
15845
|
flex: statCardFlexes[0],
|
|
14878
15846
|
borderRadius: `${statStripInnerBorderRadius} 0 0 ${statStripInnerBorderRadius}`
|
|
@@ -14881,7 +15849,7 @@ function CustomerJourneyAnalysis({
|
|
|
14881
15849
|
)
|
|
14882
15850
|
}
|
|
14883
15851
|
),
|
|
14884
|
-
/* @__PURE__ */ (0,
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14885
15853
|
JourneyStatCard,
|
|
14886
15854
|
{
|
|
14887
15855
|
icon: tvConfig.icon,
|
|
@@ -14902,10 +15870,10 @@ function CustomerJourneyAnalysis({
|
|
|
14902
15870
|
borderRadius: tvConfig.borderRadius,
|
|
14903
15871
|
minHeight: tvConfig.minHeight,
|
|
14904
15872
|
isLoading,
|
|
14905
|
-
sx:
|
|
15873
|
+
sx: mergeSx5({ flex: statCardFlexes[1] }, tvConfig.sx)
|
|
14906
15874
|
}
|
|
14907
15875
|
),
|
|
14908
|
-
/* @__PURE__ */ (0,
|
|
15876
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14909
15877
|
JourneyStatCard,
|
|
14910
15878
|
{
|
|
14911
15879
|
icon: bvConfig.icon,
|
|
@@ -14926,7 +15894,7 @@ function CustomerJourneyAnalysis({
|
|
|
14926
15894
|
borderRadius: bvConfig.borderRadius,
|
|
14927
15895
|
minHeight: bvConfig.minHeight,
|
|
14928
15896
|
isLoading,
|
|
14929
|
-
sx:
|
|
15897
|
+
sx: mergeSx5(
|
|
14930
15898
|
{
|
|
14931
15899
|
flex: statCardFlexes[2],
|
|
14932
15900
|
borderRadius: `0 ${statStripInnerBorderRadius} ${statStripInnerBorderRadius} 0`
|
|
@@ -14936,8 +15904,8 @@ function CustomerJourneyAnalysis({
|
|
|
14936
15904
|
}
|
|
14937
15905
|
)
|
|
14938
15906
|
] }) }),
|
|
14939
|
-
/* @__PURE__ */ (0,
|
|
14940
|
-
|
|
15907
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box23.default, { sx: metricsBoxSx, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15908
|
+
import_Box23.default,
|
|
14941
15909
|
{
|
|
14942
15910
|
sx: {
|
|
14943
15911
|
display: "grid",
|
|
@@ -14970,8 +15938,8 @@ function CustomerJourneyAnalysis({
|
|
|
14970
15938
|
label: avgBillingPerTrialLabel,
|
|
14971
15939
|
value: formatAverage(avgBillingPerTrial)
|
|
14972
15940
|
}
|
|
14973
|
-
].map(({ cfg, label, value }) => /* @__PURE__ */ (0,
|
|
14974
|
-
|
|
15941
|
+
].map(({ cfg, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15942
|
+
import_Box23.default,
|
|
14975
15943
|
{
|
|
14976
15944
|
sx: {
|
|
14977
15945
|
bgcolor: metricsCardBg,
|
|
@@ -14980,7 +15948,7 @@ function CustomerJourneyAnalysis({
|
|
|
14980
15948
|
height: "100%",
|
|
14981
15949
|
minWidth: 0
|
|
14982
15950
|
},
|
|
14983
|
-
children: /* @__PURE__ */ (0,
|
|
15951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14984
15952
|
JourneyMetricCard,
|
|
14985
15953
|
{
|
|
14986
15954
|
label,
|
|
@@ -15011,7 +15979,7 @@ function CustomerJourneyAnalysis({
|
|
|
15011
15979
|
// src/components/FalconThemeProvider/FalconThemeProvider.tsx
|
|
15012
15980
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
15013
15981
|
var import_styles7 = require("@mui/material/styles");
|
|
15014
|
-
var
|
|
15982
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
15015
15983
|
var lightColor = "51, 48, 60";
|
|
15016
15984
|
var darkColor = "228, 230, 244";
|
|
15017
15985
|
var darkPaperBg = "#2F3349";
|
|
@@ -15091,8 +16059,8 @@ var FalconThemeProvider = ({
|
|
|
15091
16059
|
mixins: { toolbar: { minHeight: 64 } }
|
|
15092
16060
|
})
|
|
15093
16061
|
);
|
|
15094
|
-
return /* @__PURE__ */ (0,
|
|
15095
|
-
/* @__PURE__ */ (0,
|
|
16062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_styles7.ThemeProvider, { theme, children: [
|
|
16063
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_CssBaseline.default, {}),
|
|
15096
16064
|
children
|
|
15097
16065
|
] });
|
|
15098
16066
|
};
|
|
@@ -15116,6 +16084,7 @@ var FalconThemeProvider = ({
|
|
|
15116
16084
|
DEFAULT_FOOTFALL_TILE_ICONS,
|
|
15117
16085
|
DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER,
|
|
15118
16086
|
DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER,
|
|
16087
|
+
DEFAULT_STORE_PERFORMANCE_BY_ASSIST_INFO_POPOVER,
|
|
15119
16088
|
FalconAuditTimeline,
|
|
15120
16089
|
FalconButton,
|
|
15121
16090
|
FalconDIstrictFilter,
|
|
@@ -15154,6 +16123,17 @@ var FalconThemeProvider = ({
|
|
|
15154
16123
|
QueueTimeBreakdownStackedBar,
|
|
15155
16124
|
QueueTimePeriodFilter,
|
|
15156
16125
|
RankedBarList,
|
|
16126
|
+
STACKED_COMPARISON_DEFAULT_COMPARISON_COLOR,
|
|
16127
|
+
STACKED_COMPARISON_DEFAULT_FRAME_BORDER,
|
|
16128
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_COMPARISON_COLOR,
|
|
16129
|
+
STACKED_COMPARISON_DEFAULT_LEGEND_STACK_COLOR,
|
|
16130
|
+
STACKED_COMPARISON_DEFAULT_STACK_COLORS,
|
|
16131
|
+
STORE_PERFORMANCE_DEFAULT_BUCKETS,
|
|
16132
|
+
STORE_PERFORMANCE_DEFAULT_DATA,
|
|
16133
|
+
StackedComparisonBarChart,
|
|
16134
|
+
StackedComparisonBarChartCustomizationProvider,
|
|
16135
|
+
StackedComparisonBarChartTooltip,
|
|
16136
|
+
StorePerformanceByAssist,
|
|
15157
16137
|
TIME_PERIOD_FILTER_INFO_POPOVER,
|
|
15158
16138
|
TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN,
|
|
15159
16139
|
TimePeriodFilter,
|
|
@@ -15185,9 +16165,12 @@ var FalconThemeProvider = ({
|
|
|
15185
16165
|
peakBillingHoursVisitsMock,
|
|
15186
16166
|
preprocessData,
|
|
15187
16167
|
skipSingleBranchLevels,
|
|
16168
|
+
stackedComparisonMergeCss,
|
|
16169
|
+
stackedComparisonMergeSx,
|
|
15188
16170
|
toRechartsTreemapData,
|
|
15189
16171
|
useBillingCounterAnalyticsCustomization,
|
|
15190
16172
|
usePeakBillingHoursCustomization,
|
|
15191
|
-
useQueueTimeBreakdownCustomization
|
|
16173
|
+
useQueueTimeBreakdownCustomization,
|
|
16174
|
+
useStackedComparisonBarChartCustomization
|
|
15192
16175
|
});
|
|
15193
16176
|
//# sourceMappingURL=index.js.map
|