@bpfdev/oly-ui 1.0.6 → 1.0.7
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 +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.js +494 -230
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +498 -234
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1129,7 +1129,10 @@ var WidgetHeaderFilter = ({
|
|
|
1129
1129
|
applyColor = "#FFFFFF",
|
|
1130
1130
|
cancelBg = "transparent",
|
|
1131
1131
|
cancelColor = "#374151",
|
|
1132
|
-
cancelBorderColor = "#9CA3AF"
|
|
1132
|
+
cancelBorderColor = "#9CA3AF",
|
|
1133
|
+
triggerLabelSx,
|
|
1134
|
+
triggerValueSx,
|
|
1135
|
+
listItemSx
|
|
1133
1136
|
}) => {
|
|
1134
1137
|
const theme = useTheme2();
|
|
1135
1138
|
const isDark = theme.palette.mode === "dark";
|
|
@@ -1207,11 +1210,14 @@ var WidgetHeaderFilter = ({
|
|
|
1207
1210
|
Typography6,
|
|
1208
1211
|
{
|
|
1209
1212
|
variant: "body2",
|
|
1210
|
-
sx:
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1213
|
+
sx: [
|
|
1214
|
+
{
|
|
1215
|
+
fontWeight: 700,
|
|
1216
|
+
fontSize: multiSelect ? 12 : 13,
|
|
1217
|
+
lineHeight: 1.2
|
|
1218
|
+
},
|
|
1219
|
+
...triggerLabelSx ? [triggerLabelSx] : []
|
|
1220
|
+
],
|
|
1215
1221
|
children: label
|
|
1216
1222
|
}
|
|
1217
1223
|
),
|
|
@@ -1219,11 +1225,14 @@ var WidgetHeaderFilter = ({
|
|
|
1219
1225
|
Typography6,
|
|
1220
1226
|
{
|
|
1221
1227
|
variant: "body2",
|
|
1222
|
-
sx:
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1228
|
+
sx: [
|
|
1229
|
+
{
|
|
1230
|
+
fontWeight: 500,
|
|
1231
|
+
fontSize: multiSelect ? 13 : 14,
|
|
1232
|
+
lineHeight: 1.2
|
|
1233
|
+
},
|
|
1234
|
+
...triggerValueSx ? [triggerValueSx] : []
|
|
1235
|
+
],
|
|
1227
1236
|
children: valueLine
|
|
1228
1237
|
}
|
|
1229
1238
|
)
|
|
@@ -1328,14 +1337,21 @@ var WidgetHeaderFilter = ({
|
|
|
1328
1337
|
{
|
|
1329
1338
|
onClick: () => toggleOption(option),
|
|
1330
1339
|
dense: true,
|
|
1331
|
-
sx:
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1340
|
+
sx: [
|
|
1341
|
+
{
|
|
1342
|
+
py: 0.45,
|
|
1343
|
+
px: 1.25,
|
|
1344
|
+
minHeight: 36,
|
|
1345
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1346
|
+
"&:last-of-type": {
|
|
1347
|
+
borderBottom: "none"
|
|
1348
|
+
},
|
|
1349
|
+
"&:hover": {
|
|
1350
|
+
bgcolor: "rgba(0,0,0,0.03)"
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
...listItemSx ? [listItemSx] : []
|
|
1354
|
+
],
|
|
1339
1355
|
children: [
|
|
1340
1356
|
/* @__PURE__ */ jsx8(
|
|
1341
1357
|
Checkbox2,
|
|
@@ -1380,14 +1396,17 @@ var WidgetHeaderFilter = ({
|
|
|
1380
1396
|
{
|
|
1381
1397
|
onClick: () => toggleOption(option),
|
|
1382
1398
|
dense: true,
|
|
1383
|
-
sx:
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1399
|
+
sx: [
|
|
1400
|
+
{
|
|
1401
|
+
py: 0.45,
|
|
1402
|
+
px: 1.25,
|
|
1403
|
+
minHeight: 36,
|
|
1404
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1405
|
+
"&:last-of-type": { borderBottom: "none" },
|
|
1406
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.03)" }
|
|
1407
|
+
},
|
|
1408
|
+
...listItemSx ? [listItemSx] : []
|
|
1409
|
+
],
|
|
1391
1410
|
children: [
|
|
1392
1411
|
/* @__PURE__ */ jsx8(
|
|
1393
1412
|
Checkbox2,
|
|
@@ -1478,14 +1497,17 @@ var WidgetHeaderFilter = ({
|
|
|
1478
1497
|
{
|
|
1479
1498
|
onClick: () => handleSelect(option),
|
|
1480
1499
|
dense: true,
|
|
1481
|
-
sx:
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1500
|
+
sx: [
|
|
1501
|
+
{
|
|
1502
|
+
py: 0.75,
|
|
1503
|
+
px: 2,
|
|
1504
|
+
minHeight: 36,
|
|
1505
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1506
|
+
"&:last-of-type": { borderBottom: "none" },
|
|
1507
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.03)" }
|
|
1508
|
+
},
|
|
1509
|
+
...listItemSx ? [listItemSx] : []
|
|
1510
|
+
],
|
|
1489
1511
|
children: /* @__PURE__ */ jsx8(
|
|
1490
1512
|
ListItemText,
|
|
1491
1513
|
{
|
|
@@ -3156,7 +3178,7 @@ var FalconButton = ({
|
|
|
3156
3178
|
// src/components/FalconAuditTimeline/FalconAuditTimeline.tsx
|
|
3157
3179
|
import { Icon as Icon7 } from "@iconify/react";
|
|
3158
3180
|
import { Box as Box11, Card, Typography as Typography9, IconButton as IconButton4 } from "@mui/material";
|
|
3159
|
-
import { useState as useState7 } from "react";
|
|
3181
|
+
import { useMemo as useMemo6, useState as useState7 } from "react";
|
|
3160
3182
|
import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3161
3183
|
var defaultMonths = [
|
|
3162
3184
|
{ label: "Jan", count: 0 },
|
|
@@ -3172,6 +3194,12 @@ var defaultMonths = [
|
|
|
3172
3194
|
{ label: "Nov", count: 2 },
|
|
3173
3195
|
{ label: "Dec", count: 2 }
|
|
3174
3196
|
];
|
|
3197
|
+
var getMonthKey = (m) => m.year !== void 0 ? `${m.label}-${m.year}` : m.label;
|
|
3198
|
+
var getOrdinalStr = (n) => {
|
|
3199
|
+
const s = ["th", "st", "nd", "rd"];
|
|
3200
|
+
const v = n % 100;
|
|
3201
|
+
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
3202
|
+
};
|
|
3175
3203
|
var RenderIcon = ({
|
|
3176
3204
|
icon,
|
|
3177
3205
|
defaultIcon,
|
|
@@ -3196,7 +3224,7 @@ var MonthButton = ({
|
|
|
3196
3224
|
{
|
|
3197
3225
|
onClick,
|
|
3198
3226
|
sx: {
|
|
3199
|
-
|
|
3227
|
+
minWidth: "89px !important",
|
|
3200
3228
|
height: "29.5px !important",
|
|
3201
3229
|
display: "flex !important",
|
|
3202
3230
|
alignItems: "center !important",
|
|
@@ -3232,7 +3260,8 @@ var MonthButton = ({
|
|
|
3232
3260
|
fontSize: `${monthFontSize} !important`,
|
|
3233
3261
|
lineHeight: "16.5px !important",
|
|
3234
3262
|
letterSpacing: "0.06px !important",
|
|
3235
|
-
color: isSelected ? "#FFFFFF !important" : "#6B7280 !important"
|
|
3263
|
+
color: isSelected ? "#FFFFFF !important" : "#6B7280 !important",
|
|
3264
|
+
whiteSpace: "nowrap"
|
|
3236
3265
|
},
|
|
3237
3266
|
children: month.label
|
|
3238
3267
|
}
|
|
@@ -3453,7 +3482,9 @@ var TimelineEventCard = ({
|
|
|
3453
3482
|
var FalconAuditTimeline = ({
|
|
3454
3483
|
title = "Audit Timeline",
|
|
3455
3484
|
months = defaultMonths,
|
|
3485
|
+
auditRuns,
|
|
3456
3486
|
initialSelectedMonth = "Mar",
|
|
3487
|
+
initialSelectedYear,
|
|
3457
3488
|
onMonthChange,
|
|
3458
3489
|
year = 2026,
|
|
3459
3490
|
onPrevYearClick,
|
|
@@ -3485,21 +3516,199 @@ var FalconAuditTimeline = ({
|
|
|
3485
3516
|
calendarIcon,
|
|
3486
3517
|
chevronLeftIcon,
|
|
3487
3518
|
chevronRightIcon,
|
|
3488
|
-
exportIcon
|
|
3519
|
+
exportIcon,
|
|
3520
|
+
timeControlsRowSx
|
|
3489
3521
|
}) => {
|
|
3490
|
-
const
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3522
|
+
const getInitialKey = () => {
|
|
3523
|
+
if (initialSelectedYear !== void 0) {
|
|
3524
|
+
const match2 = months.find(
|
|
3525
|
+
(m) => m.label === initialSelectedMonth && m.year === initialSelectedYear
|
|
3526
|
+
);
|
|
3527
|
+
if (match2) return getMonthKey(match2);
|
|
3528
|
+
}
|
|
3529
|
+
const match = months.find((m) => m.label === initialSelectedMonth);
|
|
3530
|
+
return match ? getMonthKey(match) : getMonthKey(months[0] ?? { label: initialSelectedMonth, count: 0 });
|
|
3531
|
+
};
|
|
3532
|
+
const [selectedKey, setSelectedKey] = useState7(getInitialKey);
|
|
3533
|
+
const activeMonth = months.find((m) => getMonthKey(m) === selectedKey);
|
|
3534
|
+
const handleMonthChange = (m) => {
|
|
3535
|
+
const key = getMonthKey(m);
|
|
3536
|
+
setSelectedKey(key);
|
|
3495
3537
|
if (onMonthChange) {
|
|
3496
|
-
onMonthChange(
|
|
3538
|
+
onMonthChange(m.label, m.year);
|
|
3497
3539
|
}
|
|
3498
3540
|
};
|
|
3499
|
-
const
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
return
|
|
3541
|
+
const displayYear = activeMonth?.year ?? year;
|
|
3542
|
+
const activeRuns = useMemo6(() => {
|
|
3543
|
+
if (!auditRuns || !activeMonth) return [];
|
|
3544
|
+
return auditRuns.filter(
|
|
3545
|
+
(r) => r.month === activeMonth.label && (activeMonth.year === void 0 || r.year === void 0 || r.year === activeMonth.year)
|
|
3546
|
+
);
|
|
3547
|
+
}, [auditRuns, activeMonth]);
|
|
3548
|
+
const isZeroCount = activeMonth && activeMonth.count === 0;
|
|
3549
|
+
const renderEventCards = () => {
|
|
3550
|
+
if (!activeMonth || activeMonth.count === 0) {
|
|
3551
|
+
return /* @__PURE__ */ jsx15(
|
|
3552
|
+
Box11,
|
|
3553
|
+
{
|
|
3554
|
+
sx: {
|
|
3555
|
+
width: "100% !important",
|
|
3556
|
+
maxWidth: "1292px !important",
|
|
3557
|
+
height: "49px !important",
|
|
3558
|
+
borderRadius: "10px !important",
|
|
3559
|
+
border: "1px solid #E5E7EB !important",
|
|
3560
|
+
background: `${eventCardBg} !important`,
|
|
3561
|
+
display: "flex !important",
|
|
3562
|
+
alignItems: "center !important",
|
|
3563
|
+
justifyContent: "center !important",
|
|
3564
|
+
padding: "8px 14px !important",
|
|
3565
|
+
gap: "6px !important",
|
|
3566
|
+
boxSizing: "border-box !important"
|
|
3567
|
+
},
|
|
3568
|
+
children: /* @__PURE__ */ jsx15(
|
|
3569
|
+
Typography9,
|
|
3570
|
+
{
|
|
3571
|
+
sx: {
|
|
3572
|
+
fontFamily: `${brandFont} !important`,
|
|
3573
|
+
fontWeight: "600 !important",
|
|
3574
|
+
fontSize: "11px !important",
|
|
3575
|
+
lineHeight: "13.5px !important",
|
|
3576
|
+
letterSpacing: "0.17px !important",
|
|
3577
|
+
color: "#6B7280 !important"
|
|
3578
|
+
},
|
|
3579
|
+
children: emptyStateMessage
|
|
3580
|
+
}
|
|
3581
|
+
)
|
|
3582
|
+
}
|
|
3583
|
+
);
|
|
3584
|
+
}
|
|
3585
|
+
if (auditRuns) {
|
|
3586
|
+
if (activeRuns.length === 0) {
|
|
3587
|
+
return /* @__PURE__ */ jsx15(
|
|
3588
|
+
Box11,
|
|
3589
|
+
{
|
|
3590
|
+
sx: {
|
|
3591
|
+
width: "100% !important",
|
|
3592
|
+
maxWidth: "1292px !important",
|
|
3593
|
+
height: "49px !important",
|
|
3594
|
+
borderRadius: "10px !important",
|
|
3595
|
+
border: "1px solid #E5E7EB !important",
|
|
3596
|
+
background: `${eventCardBg} !important`,
|
|
3597
|
+
display: "flex !important",
|
|
3598
|
+
alignItems: "center !important",
|
|
3599
|
+
justifyContent: "center !important",
|
|
3600
|
+
padding: "8px 14px !important",
|
|
3601
|
+
boxSizing: "border-box !important"
|
|
3602
|
+
},
|
|
3603
|
+
children: /* @__PURE__ */ jsx15(
|
|
3604
|
+
Typography9,
|
|
3605
|
+
{
|
|
3606
|
+
sx: {
|
|
3607
|
+
fontFamily: `${brandFont} !important`,
|
|
3608
|
+
fontWeight: "600 !important",
|
|
3609
|
+
fontSize: "11px !important",
|
|
3610
|
+
lineHeight: "13.5px !important",
|
|
3611
|
+
letterSpacing: "0.17px !important",
|
|
3612
|
+
color: "#6B7280 !important"
|
|
3613
|
+
},
|
|
3614
|
+
children: emptyStateMessage
|
|
3615
|
+
}
|
|
3616
|
+
)
|
|
3617
|
+
}
|
|
3618
|
+
);
|
|
3619
|
+
}
|
|
3620
|
+
return /* @__PURE__ */ jsx15(
|
|
3621
|
+
Box11,
|
|
3622
|
+
{
|
|
3623
|
+
sx: {
|
|
3624
|
+
display: "flex !important",
|
|
3625
|
+
alignItems: "center !important",
|
|
3626
|
+
gap: "8px !important",
|
|
3627
|
+
width: "100% !important",
|
|
3628
|
+
flexWrap: "wrap"
|
|
3629
|
+
},
|
|
3630
|
+
children: activeRuns.map((run, idx) => /* @__PURE__ */ jsx15(
|
|
3631
|
+
TimelineEventCard,
|
|
3632
|
+
{
|
|
3633
|
+
date: run.date,
|
|
3634
|
+
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
3635
|
+
status: run.status === "done" ? "completed" : "upcoming",
|
|
3636
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
3637
|
+
brandFont,
|
|
3638
|
+
interFont,
|
|
3639
|
+
completedColor,
|
|
3640
|
+
upcomingColor,
|
|
3641
|
+
eventCardBg,
|
|
3642
|
+
eventDateSize,
|
|
3643
|
+
eventDateWeight,
|
|
3644
|
+
ordinalSize: "9px",
|
|
3645
|
+
ordinalWeight: "500",
|
|
3646
|
+
exportIcon,
|
|
3647
|
+
exportButtonText,
|
|
3648
|
+
upcomingButtonText
|
|
3649
|
+
},
|
|
3650
|
+
run.run_number
|
|
3651
|
+
))
|
|
3652
|
+
}
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3655
|
+
const monthIndex = months.findIndex((m) => getMonthKey(m) === selectedKey);
|
|
3656
|
+
const precedingEvents = Math.max(0, monthIndex - 2) * 2;
|
|
3657
|
+
const isFirstActiveMonth = monthIndex === months.findIndex((m) => m.count > 0);
|
|
3658
|
+
return /* @__PURE__ */ jsxs11(
|
|
3659
|
+
Box11,
|
|
3660
|
+
{
|
|
3661
|
+
sx: {
|
|
3662
|
+
display: "flex !important",
|
|
3663
|
+
alignItems: "center !important",
|
|
3664
|
+
gap: "8px !important",
|
|
3665
|
+
width: "100% !important"
|
|
3666
|
+
},
|
|
3667
|
+
children: [
|
|
3668
|
+
/* @__PURE__ */ jsx15(
|
|
3669
|
+
TimelineEventCard,
|
|
3670
|
+
{
|
|
3671
|
+
date: `${activeMonth.label} 5`,
|
|
3672
|
+
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
3673
|
+
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
3674
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, `${activeMonth.label} 5`) : void 0,
|
|
3675
|
+
brandFont,
|
|
3676
|
+
interFont,
|
|
3677
|
+
completedColor,
|
|
3678
|
+
upcomingColor,
|
|
3679
|
+
eventCardBg,
|
|
3680
|
+
eventDateSize,
|
|
3681
|
+
eventDateWeight,
|
|
3682
|
+
ordinalSize: "9px",
|
|
3683
|
+
ordinalWeight: "500",
|
|
3684
|
+
exportIcon,
|
|
3685
|
+
exportButtonText,
|
|
3686
|
+
upcomingButtonText
|
|
3687
|
+
}
|
|
3688
|
+
),
|
|
3689
|
+
/* @__PURE__ */ jsx15(
|
|
3690
|
+
TimelineEventCard,
|
|
3691
|
+
{
|
|
3692
|
+
date: `${activeMonth.label} 20`,
|
|
3693
|
+
ordinal: getOrdinalStr(precedingEvents + 2),
|
|
3694
|
+
status: "upcoming",
|
|
3695
|
+
brandFont,
|
|
3696
|
+
interFont,
|
|
3697
|
+
completedColor,
|
|
3698
|
+
upcomingColor,
|
|
3699
|
+
eventCardBg,
|
|
3700
|
+
eventDateSize,
|
|
3701
|
+
eventDateWeight,
|
|
3702
|
+
ordinalSize: "9px",
|
|
3703
|
+
ordinalWeight: "500",
|
|
3704
|
+
exportIcon,
|
|
3705
|
+
exportButtonText,
|
|
3706
|
+
upcomingButtonText
|
|
3707
|
+
}
|
|
3708
|
+
)
|
|
3709
|
+
]
|
|
3710
|
+
}
|
|
3711
|
+
);
|
|
3503
3712
|
};
|
|
3504
3713
|
return /* @__PURE__ */ jsxs11(
|
|
3505
3714
|
Card,
|
|
@@ -3536,18 +3745,21 @@ var FalconAuditTimeline = ({
|
|
|
3536
3745
|
/* @__PURE__ */ jsxs11(
|
|
3537
3746
|
Box11,
|
|
3538
3747
|
{
|
|
3539
|
-
sx:
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3748
|
+
sx: [
|
|
3749
|
+
{
|
|
3750
|
+
display: "flex !important",
|
|
3751
|
+
alignItems: "center !important",
|
|
3752
|
+
gap: "8px !important",
|
|
3753
|
+
overflow: "hidden !important"
|
|
3754
|
+
},
|
|
3755
|
+
...timeControlsRowSx ? [timeControlsRowSx] : []
|
|
3756
|
+
],
|
|
3545
3757
|
children: [
|
|
3546
3758
|
showYearSelector && /* @__PURE__ */ jsxs11(
|
|
3547
3759
|
Box11,
|
|
3548
3760
|
{
|
|
3549
3761
|
sx: {
|
|
3550
|
-
|
|
3762
|
+
minWidth: "124px !important",
|
|
3551
3763
|
height: "29px !important",
|
|
3552
3764
|
display: "flex !important",
|
|
3553
3765
|
alignItems: "center !important",
|
|
@@ -3584,11 +3796,12 @@ var FalconAuditTimeline = ({
|
|
|
3584
3796
|
fontSize: "11px !important",
|
|
3585
3797
|
lineHeight: "16.5px !important",
|
|
3586
3798
|
letterSpacing: "0.06px !important",
|
|
3587
|
-
color: "#0A0A0A !important"
|
|
3799
|
+
color: "#0A0A0A !important",
|
|
3800
|
+
whiteSpace: "nowrap"
|
|
3588
3801
|
},
|
|
3589
3802
|
children: [
|
|
3590
3803
|
"Year ",
|
|
3591
|
-
|
|
3804
|
+
displayYear
|
|
3592
3805
|
]
|
|
3593
3806
|
}
|
|
3594
3807
|
),
|
|
@@ -3615,8 +3828,8 @@ var FalconAuditTimeline = ({
|
|
|
3615
3828
|
MonthButton,
|
|
3616
3829
|
{
|
|
3617
3830
|
month,
|
|
3618
|
-
isSelected:
|
|
3619
|
-
onClick: () => handleMonthChange(month
|
|
3831
|
+
isSelected: getMonthKey(month) === selectedKey,
|
|
3832
|
+
onClick: () => handleMonthChange(month),
|
|
3620
3833
|
brandFont,
|
|
3621
3834
|
primaryColor,
|
|
3622
3835
|
inactiveMonthBg,
|
|
@@ -3624,106 +3837,12 @@ var FalconAuditTimeline = ({
|
|
|
3624
3837
|
monthFontWeight,
|
|
3625
3838
|
calendarIcon
|
|
3626
3839
|
},
|
|
3627
|
-
month
|
|
3840
|
+
getMonthKey(month)
|
|
3628
3841
|
))
|
|
3629
3842
|
]
|
|
3630
3843
|
}
|
|
3631
3844
|
),
|
|
3632
|
-
(
|
|
3633
|
-
const monthInfo = months.find((m) => m.label === selectedMonth);
|
|
3634
|
-
if (!monthInfo || monthInfo.count === 0) {
|
|
3635
|
-
return /* @__PURE__ */ jsx15(
|
|
3636
|
-
Box11,
|
|
3637
|
-
{
|
|
3638
|
-
sx: {
|
|
3639
|
-
width: "100% !important",
|
|
3640
|
-
maxWidth: "1292px !important",
|
|
3641
|
-
height: "49px !important",
|
|
3642
|
-
borderRadius: "10px !important",
|
|
3643
|
-
border: "1px solid #E5E7EB !important",
|
|
3644
|
-
background: `${eventCardBg} !important`,
|
|
3645
|
-
display: "flex !important",
|
|
3646
|
-
alignItems: "center !important",
|
|
3647
|
-
justifyContent: "center !important",
|
|
3648
|
-
padding: "8px 14px !important",
|
|
3649
|
-
gap: "6px !important",
|
|
3650
|
-
boxSizing: "border-box !important"
|
|
3651
|
-
},
|
|
3652
|
-
children: /* @__PURE__ */ jsx15(
|
|
3653
|
-
Typography9,
|
|
3654
|
-
{
|
|
3655
|
-
sx: {
|
|
3656
|
-
fontFamily: `${brandFont} !important`,
|
|
3657
|
-
fontWeight: "600 !important",
|
|
3658
|
-
fontSize: "11px !important",
|
|
3659
|
-
lineHeight: "13.5px !important",
|
|
3660
|
-
letterSpacing: "0.17px !important",
|
|
3661
|
-
color: "#6B7280 !important"
|
|
3662
|
-
},
|
|
3663
|
-
children: emptyStateMessage
|
|
3664
|
-
}
|
|
3665
|
-
)
|
|
3666
|
-
}
|
|
3667
|
-
);
|
|
3668
|
-
}
|
|
3669
|
-
const monthIndex = months.findIndex((m) => m.label === selectedMonth);
|
|
3670
|
-
const precedingEvents = (monthIndex - 2) * 2;
|
|
3671
|
-
const isMar = selectedMonth === "Mar";
|
|
3672
|
-
return /* @__PURE__ */ jsxs11(
|
|
3673
|
-
Box11,
|
|
3674
|
-
{
|
|
3675
|
-
sx: {
|
|
3676
|
-
display: "flex !important",
|
|
3677
|
-
alignItems: "center !important",
|
|
3678
|
-
gap: "8px !important",
|
|
3679
|
-
width: "100% !important"
|
|
3680
|
-
},
|
|
3681
|
-
children: [
|
|
3682
|
-
/* @__PURE__ */ jsx15(
|
|
3683
|
-
TimelineEventCard,
|
|
3684
|
-
{
|
|
3685
|
-
date: `${selectedMonth} 5`,
|
|
3686
|
-
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
3687
|
-
status: isMar ? "completed" : "upcoming",
|
|
3688
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, `${selectedMonth} 5`) : void 0,
|
|
3689
|
-
brandFont,
|
|
3690
|
-
interFont,
|
|
3691
|
-
completedColor,
|
|
3692
|
-
upcomingColor,
|
|
3693
|
-
eventCardBg,
|
|
3694
|
-
eventDateSize,
|
|
3695
|
-
eventDateWeight,
|
|
3696
|
-
ordinalSize: "9px",
|
|
3697
|
-
ordinalWeight: "500",
|
|
3698
|
-
exportIcon,
|
|
3699
|
-
exportButtonText,
|
|
3700
|
-
upcomingButtonText
|
|
3701
|
-
}
|
|
3702
|
-
),
|
|
3703
|
-
/* @__PURE__ */ jsx15(
|
|
3704
|
-
TimelineEventCard,
|
|
3705
|
-
{
|
|
3706
|
-
date: `${selectedMonth} 20`,
|
|
3707
|
-
ordinal: getOrdinalStr(precedingEvents + 2),
|
|
3708
|
-
status: "upcoming",
|
|
3709
|
-
brandFont,
|
|
3710
|
-
interFont,
|
|
3711
|
-
completedColor,
|
|
3712
|
-
upcomingColor,
|
|
3713
|
-
eventCardBg,
|
|
3714
|
-
eventDateSize,
|
|
3715
|
-
eventDateWeight,
|
|
3716
|
-
ordinalSize: "9px",
|
|
3717
|
-
ordinalWeight: "500",
|
|
3718
|
-
exportIcon,
|
|
3719
|
-
exportButtonText,
|
|
3720
|
-
upcomingButtonText
|
|
3721
|
-
}
|
|
3722
|
-
)
|
|
3723
|
-
]
|
|
3724
|
-
}
|
|
3725
|
-
);
|
|
3726
|
-
})()
|
|
3845
|
+
renderEventCards()
|
|
3727
3846
|
]
|
|
3728
3847
|
}
|
|
3729
3848
|
);
|
|
@@ -8836,21 +8955,33 @@ var WalkinAnalysis = ({
|
|
|
8836
8955
|
spacing: 3,
|
|
8837
8956
|
alignItems: "center",
|
|
8838
8957
|
justifyContent: "flex-start",
|
|
8839
|
-
sx:
|
|
8958
|
+
sx: [
|
|
8959
|
+
{ width: "100%" },
|
|
8960
|
+
...customization?.chartLegendRowSx != null ? [customization.chartLegendRowSx] : []
|
|
8961
|
+
],
|
|
8840
8962
|
children: [
|
|
8841
|
-
/* @__PURE__ */ jsx31(
|
|
8842
|
-
|
|
8963
|
+
/* @__PURE__ */ jsx31(
|
|
8964
|
+
Box21,
|
|
8843
8965
|
{
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8966
|
+
sx: [
|
|
8967
|
+
{ flexShrink: 0, lineHeight: 0 },
|
|
8968
|
+
...customization?.pieChartBoxSx != null ? [customization.pieChartBoxSx] : []
|
|
8969
|
+
],
|
|
8970
|
+
children: /* @__PURE__ */ jsx31(
|
|
8971
|
+
WalkinPieChart,
|
|
8972
|
+
{
|
|
8973
|
+
slices,
|
|
8974
|
+
size: resolvedPieSize,
|
|
8975
|
+
typography,
|
|
8976
|
+
activeTabId,
|
|
8977
|
+
renderTooltip,
|
|
8978
|
+
emptyStatePlaceholderProps,
|
|
8979
|
+
isChartAnimationActive,
|
|
8980
|
+
chartAnimationDuration
|
|
8981
|
+
}
|
|
8982
|
+
)
|
|
8852
8983
|
}
|
|
8853
|
-
)
|
|
8984
|
+
),
|
|
8854
8985
|
/* @__PURE__ */ jsx31(
|
|
8855
8986
|
Stack15,
|
|
8856
8987
|
{
|
|
@@ -10303,6 +10434,17 @@ var QueueTimeBreakdownArea = ({
|
|
|
10303
10434
|
);
|
|
10304
10435
|
const gridStroke = ac?.gridStroke ?? theme.palette.divider;
|
|
10305
10436
|
const yLabel = ac?.yAxisLabel ?? "No of Visitors";
|
|
10437
|
+
const allZero = React20.useMemo(() => {
|
|
10438
|
+
if (chartData.length === 0) return true;
|
|
10439
|
+
return chartData.every(
|
|
10440
|
+
(row) => series.every((s) => {
|
|
10441
|
+
const val = row[s.name];
|
|
10442
|
+
return (typeof val === "number" ? val : Number(val)) === 0;
|
|
10443
|
+
})
|
|
10444
|
+
);
|
|
10445
|
+
}, [chartData, series]);
|
|
10446
|
+
const yDomain = allZero ? [0, 16e3] : [0, "auto"];
|
|
10447
|
+
const yTickCount = allZero ? 5 : void 0;
|
|
10306
10448
|
return /* @__PURE__ */ jsx37(Stack18, { justifyContent: "center", height: stackH, children: /* @__PURE__ */ jsx37(ResponsiveContainer3, { width: "100%", height: chartH, children: /* @__PURE__ */ jsxs29(AreaChart, { data: chartData, margin, children: [
|
|
10307
10449
|
/* @__PURE__ */ jsx37(
|
|
10308
10450
|
CartesianGrid6,
|
|
@@ -10324,6 +10466,8 @@ var QueueTimeBreakdownArea = ({
|
|
|
10324
10466
|
/* @__PURE__ */ jsx37(
|
|
10325
10467
|
YAxis6,
|
|
10326
10468
|
{
|
|
10469
|
+
domain: yDomain,
|
|
10470
|
+
tickCount: yTickCount,
|
|
10327
10471
|
tick: { fill: theme.palette.text.secondary, fontSize: 11 },
|
|
10328
10472
|
axisLine: false,
|
|
10329
10473
|
tickLine: false,
|
|
@@ -10804,6 +10948,12 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10804
10948
|
[rawValues, total]
|
|
10805
10949
|
);
|
|
10806
10950
|
const h = sb?.barThicknessPx ?? Math.max(14, QUEUE_STACKED_BAR_THICKNESS_PX);
|
|
10951
|
+
const isAllZero = rawValues.every((v) => v === 0);
|
|
10952
|
+
const emptySegments = legendRows.length > 0 ? legendRows : row.data.map((d, i) => ({
|
|
10953
|
+
label: d.name,
|
|
10954
|
+
percent: "0%",
|
|
10955
|
+
color: palette[i % palette.length]
|
|
10956
|
+
}));
|
|
10807
10957
|
return /* @__PURE__ */ jsxs31(Stack20, { spacing: 0, sx: { width: "100%", mb: 1.5 }, children: [
|
|
10808
10958
|
/* @__PURE__ */ jsx39(
|
|
10809
10959
|
Box25,
|
|
@@ -10812,9 +10962,19 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10812
10962
|
width: "100%",
|
|
10813
10963
|
height: h,
|
|
10814
10964
|
display: "flex",
|
|
10815
|
-
overflow: "hidden"
|
|
10965
|
+
overflow: "hidden",
|
|
10966
|
+
borderRadius: 0
|
|
10816
10967
|
},
|
|
10817
|
-
children:
|
|
10968
|
+
children: isAllZero ? /* @__PURE__ */ jsx39(
|
|
10969
|
+
Box25,
|
|
10970
|
+
{
|
|
10971
|
+
sx: {
|
|
10972
|
+
width: "100%",
|
|
10973
|
+
height: "100%",
|
|
10974
|
+
bgcolor: "#E5E7EB"
|
|
10975
|
+
}
|
|
10976
|
+
}
|
|
10977
|
+
) : pcts.map((p, i) => {
|
|
10818
10978
|
if (p <= 0) return null;
|
|
10819
10979
|
const color = palette[i % palette.length];
|
|
10820
10980
|
const segName = legendRows[i]?.label ?? row.data[i]?.name ?? "";
|
|
@@ -10878,25 +11038,97 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10878
11038
|
},
|
|
10879
11039
|
sb?.labelRowContainerSx
|
|
10880
11040
|
),
|
|
10881
|
-
children:
|
|
10882
|
-
|
|
11041
|
+
children: isAllZero ? emptySegments.map((seg, i) => {
|
|
11042
|
+
const labelText = seg.label ?? row.data[i]?.name ?? "";
|
|
11043
|
+
const sharePct = 100 / emptySegments.length;
|
|
11044
|
+
return /* @__PURE__ */ jsxs31(
|
|
11045
|
+
Box25,
|
|
11046
|
+
{
|
|
11047
|
+
sx: mergeSx2(
|
|
11048
|
+
{
|
|
11049
|
+
flex: `0 0 ${sharePct}%`,
|
|
11050
|
+
minWidth: 0,
|
|
11051
|
+
maxWidth: `${sharePct}%`,
|
|
11052
|
+
px: 0.75,
|
|
11053
|
+
textAlign: "center",
|
|
11054
|
+
overflow: "hidden"
|
|
11055
|
+
},
|
|
11056
|
+
sb?.segmentBoxSx
|
|
11057
|
+
),
|
|
11058
|
+
children: [
|
|
11059
|
+
/* @__PURE__ */ jsx39(
|
|
11060
|
+
Typography21,
|
|
11061
|
+
{
|
|
11062
|
+
sx: mergeSx2(
|
|
11063
|
+
{
|
|
11064
|
+
fontSize: "clamp(13px, 1.2vw, 20px)",
|
|
11065
|
+
fontWeight: 700,
|
|
11066
|
+
color: "#7A7F87",
|
|
11067
|
+
lineHeight: 1.15,
|
|
11068
|
+
width: "100%",
|
|
11069
|
+
overflow: "hidden",
|
|
11070
|
+
textOverflow: "ellipsis",
|
|
11071
|
+
whiteSpace: "nowrap"
|
|
11072
|
+
},
|
|
11073
|
+
sb?.labelPercentSx
|
|
11074
|
+
),
|
|
11075
|
+
children: "0 (0%)"
|
|
11076
|
+
}
|
|
11077
|
+
),
|
|
11078
|
+
/* @__PURE__ */ jsx39(
|
|
11079
|
+
Typography21,
|
|
11080
|
+
{
|
|
11081
|
+
sx: mergeSx2(
|
|
11082
|
+
{
|
|
11083
|
+
fontSize: "clamp(9px, 0.9vw, 11px)",
|
|
11084
|
+
fontWeight: 600,
|
|
11085
|
+
color: "#7A7F87",
|
|
11086
|
+
lineHeight: 1.25,
|
|
11087
|
+
mt: 0.4,
|
|
11088
|
+
width: "100%",
|
|
11089
|
+
overflow: "hidden",
|
|
11090
|
+
textOverflow: "ellipsis",
|
|
11091
|
+
whiteSpace: "nowrap"
|
|
11092
|
+
},
|
|
11093
|
+
sb?.labelRangeSx
|
|
11094
|
+
),
|
|
11095
|
+
children: labelText
|
|
11096
|
+
}
|
|
11097
|
+
)
|
|
11098
|
+
]
|
|
11099
|
+
},
|
|
11100
|
+
`empty-lbl-${row.name}-${i}`
|
|
11101
|
+
);
|
|
11102
|
+
}) : pcts.map((p, i) => {
|
|
10883
11103
|
const leg = legendRows[i];
|
|
10884
|
-
const pctText = leg?.percent ?? `${Math.round(p)}%`;
|
|
10885
11104
|
const labelText = leg?.label ?? row.data[i]?.name ?? "";
|
|
10886
11105
|
const countValue = rawValues[i];
|
|
10887
|
-
const
|
|
11106
|
+
const sharePct = 100 / pcts.length;
|
|
11107
|
+
let displayText;
|
|
11108
|
+
if (countValue <= 0) {
|
|
11109
|
+
displayText = "0";
|
|
11110
|
+
} else {
|
|
11111
|
+
const pctText = leg?.percent ?? `${Math.round(p)}%`;
|
|
11112
|
+
const countText = new Intl.NumberFormat("en-US").format(
|
|
11113
|
+
countValue
|
|
11114
|
+
);
|
|
11115
|
+
displayText = `${countText} (${pctText})`;
|
|
11116
|
+
}
|
|
10888
11117
|
return /* @__PURE__ */ jsxs31(
|
|
10889
11118
|
Box25,
|
|
10890
11119
|
{
|
|
10891
|
-
title: `${
|
|
10892
|
-
sx:
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
11120
|
+
title: `${displayText} ${labelText}`.trim(),
|
|
11121
|
+
sx: mergeSx2(
|
|
11122
|
+
{
|
|
11123
|
+
flex: `0 0 ${sharePct}%`,
|
|
11124
|
+
minWidth: 0,
|
|
11125
|
+
maxWidth: `${sharePct}%`,
|
|
11126
|
+
px: 0.75,
|
|
11127
|
+
textAlign: "center",
|
|
11128
|
+
overflow: "hidden"
|
|
11129
|
+
},
|
|
11130
|
+
sb?.segmentBoxSx
|
|
11131
|
+
),
|
|
10900
11132
|
children: [
|
|
10901
11133
|
/* @__PURE__ */ jsx39(
|
|
10902
11134
|
Typography21,
|
|
@@ -10914,7 +11146,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10914
11146
|
},
|
|
10915
11147
|
sb?.labelPercentSx
|
|
10916
11148
|
),
|
|
10917
|
-
children:
|
|
11149
|
+
children: displayText
|
|
10918
11150
|
}
|
|
10919
11151
|
),
|
|
10920
11152
|
/* @__PURE__ */ jsx39(
|
|
@@ -11004,6 +11236,10 @@ function QueueTimeBreakdown({
|
|
|
11004
11236
|
const values = [...Donut_data, ...yesterdayDonut];
|
|
11005
11237
|
return values.some((value) => Number.isFinite(value) && value > 0);
|
|
11006
11238
|
}, [Donut_data, yesterdayDonut]);
|
|
11239
|
+
const hasBarData = React23.useMemo(
|
|
11240
|
+
() => data.some((row) => row.data.some((seg) => (seg.data[0] ?? 0) > 0)),
|
|
11241
|
+
[data]
|
|
11242
|
+
);
|
|
11007
11243
|
const palette = customization?.chartPalette && customization.chartPalette.length > 0 ? customization.chartPalette : QUEUE_CHART_COLORS;
|
|
11008
11244
|
const legend = queueBucketLegend ?? defaultBucketLegendFromPalette(palette);
|
|
11009
11245
|
const resolvedHeaderImageSrc = headerImageSrc === void 0 ? QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC : headerImageSrc;
|
|
@@ -11235,14 +11471,14 @@ function QueueTimeBreakdown({
|
|
|
11235
11471
|
{ padding: "10px 8px" },
|
|
11236
11472
|
customization?.areaChart?.cardContentSx
|
|
11237
11473
|
),
|
|
11238
|
-
children: /* @__PURE__ */ jsx40(
|
|
11474
|
+
children: hasBarData ? /* @__PURE__ */ jsx40(
|
|
11239
11475
|
QueueTimeBreakdownArea_default,
|
|
11240
11476
|
{
|
|
11241
11477
|
series: getQueueTimeBreakdownAreaSeriesData(filter),
|
|
11242
11478
|
xAxis: getQueueTimeBreakdownAreaXAxisData(filter),
|
|
11243
11479
|
renderTooltip: renderAreaTooltip
|
|
11244
11480
|
}
|
|
11245
|
-
)
|
|
11481
|
+
) : /* @__PURE__ */ jsx40(ChartEmptyState, { minHeight: 330 })
|
|
11246
11482
|
}
|
|
11247
11483
|
)
|
|
11248
11484
|
}
|
|
@@ -11264,7 +11500,7 @@ import {
|
|
|
11264
11500
|
Typography as Typography23
|
|
11265
11501
|
} from "@mui/material";
|
|
11266
11502
|
import * as React24 from "react";
|
|
11267
|
-
import { useEffect as useEffect3, useMemo as
|
|
11503
|
+
import { useEffect as useEffect3, useMemo as useMemo19, useState as useState17 } from "react";
|
|
11268
11504
|
import { ResponsiveContainer as ResponsiveContainer5, Treemap } from "recharts";
|
|
11269
11505
|
|
|
11270
11506
|
// src/components/widgets/FootFallHeatMap/FootFallHeatMapView.types.ts
|
|
@@ -11955,51 +12191,71 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
11955
12191
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
11956
12192
|
],
|
|
11957
12193
|
children: [
|
|
11958
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ jsx41(
|
|
11959
|
-
|
|
12194
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ jsx41(
|
|
12195
|
+
Stack22,
|
|
11960
12196
|
{
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
)
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
12197
|
+
direction: "row",
|
|
12198
|
+
spacing: 1.5,
|
|
12199
|
+
flexWrap: "wrap",
|
|
12200
|
+
useFlexGap: true,
|
|
12201
|
+
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
12202
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ jsx41(
|
|
12203
|
+
InlineStatCard,
|
|
12204
|
+
{
|
|
12205
|
+
icon: card.icon ?? "mdi:chart-box-outline",
|
|
12206
|
+
title: card.title,
|
|
12207
|
+
value: card.value,
|
|
12208
|
+
sx: [presentation?.statCardSx, card.sx].filter(
|
|
12209
|
+
Boolean
|
|
12210
|
+
),
|
|
12211
|
+
iconColor: card.iconColor ?? statIcon
|
|
12212
|
+
},
|
|
12213
|
+
card.id
|
|
12214
|
+
)) : [
|
|
12215
|
+
/* @__PURE__ */ jsx41(
|
|
12216
|
+
InlineStatCard,
|
|
12217
|
+
{
|
|
12218
|
+
icon: "mdi:store-marker-outline",
|
|
12219
|
+
title: "No. of Stores",
|
|
12220
|
+
value: summaryKpis.storeCount,
|
|
12221
|
+
sx: presentation?.statCardSx,
|
|
12222
|
+
iconColor: statIcon
|
|
12223
|
+
},
|
|
12224
|
+
"default-stores"
|
|
12225
|
+
),
|
|
12226
|
+
/* @__PURE__ */ jsx41(
|
|
12227
|
+
InlineStatCard,
|
|
12228
|
+
{
|
|
12229
|
+
icon: "fluent:people-community-16-filled",
|
|
12230
|
+
title: "Overall Visitors",
|
|
12231
|
+
value: summaryKpis.overallVisitors,
|
|
12232
|
+
sx: presentation?.statCardSx,
|
|
12233
|
+
iconColor: statIcon
|
|
12234
|
+
},
|
|
12235
|
+
"default-visitors"
|
|
12236
|
+
)
|
|
12237
|
+
]
|
|
12238
|
+
}
|
|
12239
|
+
),
|
|
12240
|
+
/* @__PURE__ */ jsx41(
|
|
12241
|
+
Stack22,
|
|
11996
12242
|
{
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12243
|
+
spacing: 1.25,
|
|
12244
|
+
sx: [
|
|
12245
|
+
{ pt: 0.5, pb: 1 },
|
|
12246
|
+
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
12247
|
+
],
|
|
12248
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ jsx41(
|
|
12249
|
+
InlineSegmentStrip,
|
|
12250
|
+
{
|
|
12251
|
+
item,
|
|
12252
|
+
scaleTotal,
|
|
12253
|
+
presentation
|
|
12254
|
+
},
|
|
12255
|
+
item.id
|
|
12256
|
+
))
|
|
12257
|
+
}
|
|
12258
|
+
)
|
|
12003
12259
|
]
|
|
12004
12260
|
}
|
|
12005
12261
|
);
|
|
@@ -12147,7 +12403,8 @@ function FootFallHeatMapView({
|
|
|
12147
12403
|
treemap: treemapProp,
|
|
12148
12404
|
tree: treeProp,
|
|
12149
12405
|
kpiStrip: kpiStripPresentation,
|
|
12150
|
-
emptyStatePlaceholderProps
|
|
12406
|
+
emptyStatePlaceholderProps,
|
|
12407
|
+
onPathChange
|
|
12151
12408
|
}) {
|
|
12152
12409
|
const sortBy = treeProp?.sortBy ?? "walkins";
|
|
12153
12410
|
const startFromLevel = treeProp?.startFromLevel ?? "Region";
|
|
@@ -12170,7 +12427,7 @@ function FootFallHeatMapView({
|
|
|
12170
12427
|
tileColors: treemapProp?.tileColors
|
|
12171
12428
|
};
|
|
12172
12429
|
const tileMetrics = treemapLayout.tileMetrics;
|
|
12173
|
-
const tileColorFromSeed =
|
|
12430
|
+
const tileColorFromSeed = useMemo19(
|
|
12174
12431
|
() => createTreemapTileColorResolver(treemapLayout.tileColors),
|
|
12175
12432
|
[treemapLayout.tileColors]
|
|
12176
12433
|
);
|
|
@@ -12212,7 +12469,7 @@ function FootFallHeatMapView({
|
|
|
12212
12469
|
startFromPathMode,
|
|
12213
12470
|
tileColorFromSeed
|
|
12214
12471
|
]);
|
|
12215
|
-
const derivedKpiStrip =
|
|
12472
|
+
const derivedKpiStrip = useMemo19(() => {
|
|
12216
12473
|
if (isLoading || loading || !initialData) return null;
|
|
12217
12474
|
const activeZoneForStrip = trackingDetails.length > 0 ? trackingDetails[trackingDetails.length - 1] : void 0;
|
|
12218
12475
|
return deriveFootfallHeatMapKpiStrip(
|
|
@@ -12242,7 +12499,11 @@ function FootFallHeatMapView({
|
|
|
12242
12499
|
setTrackingDetails((pre) => {
|
|
12243
12500
|
const expectedDepth = data.previous.length;
|
|
12244
12501
|
const normalizedPath = pre.slice(0, expectedDepth);
|
|
12245
|
-
|
|
12502
|
+
const nextDetails = [...normalizedPath, p2];
|
|
12503
|
+
onPathChange?.(
|
|
12504
|
+
nextDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean)
|
|
12505
|
+
);
|
|
12506
|
+
return nextDetails;
|
|
12246
12507
|
});
|
|
12247
12508
|
const nested = getNestedList(p2);
|
|
12248
12509
|
const hasNestedChildren = Boolean(nested?.length);
|
|
@@ -12530,6 +12791,9 @@ function FootFallHeatMapView({
|
|
|
12530
12791
|
setShowLeaf(false);
|
|
12531
12792
|
const history = trackingDetails.slice(0, -1);
|
|
12532
12793
|
setTrackingDetails(history);
|
|
12794
|
+
onPathChange?.(
|
|
12795
|
+
history.map((t) => String(t?.name ?? "").trim()).filter(Boolean)
|
|
12796
|
+
);
|
|
12533
12797
|
const obj1 = {
|
|
12534
12798
|
current: data.previous[0] ?? [],
|
|
12535
12799
|
previous: data.previous.slice(1)
|