@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.js
CHANGED
|
@@ -1238,7 +1238,10 @@ var WidgetHeaderFilter = ({
|
|
|
1238
1238
|
applyColor = "#FFFFFF",
|
|
1239
1239
|
cancelBg = "transparent",
|
|
1240
1240
|
cancelColor = "#374151",
|
|
1241
|
-
cancelBorderColor = "#9CA3AF"
|
|
1241
|
+
cancelBorderColor = "#9CA3AF",
|
|
1242
|
+
triggerLabelSx,
|
|
1243
|
+
triggerValueSx,
|
|
1244
|
+
listItemSx
|
|
1242
1245
|
}) => {
|
|
1243
1246
|
const theme = (0, import_styles3.useTheme)();
|
|
1244
1247
|
const isDark = theme.palette.mode === "dark";
|
|
@@ -1316,11 +1319,14 @@ var WidgetHeaderFilter = ({
|
|
|
1316
1319
|
import_Typography3.default,
|
|
1317
1320
|
{
|
|
1318
1321
|
variant: "body2",
|
|
1319
|
-
sx:
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1322
|
+
sx: [
|
|
1323
|
+
{
|
|
1324
|
+
fontWeight: 700,
|
|
1325
|
+
fontSize: multiSelect ? 12 : 13,
|
|
1326
|
+
lineHeight: 1.2
|
|
1327
|
+
},
|
|
1328
|
+
...triggerLabelSx ? [triggerLabelSx] : []
|
|
1329
|
+
],
|
|
1324
1330
|
children: label
|
|
1325
1331
|
}
|
|
1326
1332
|
),
|
|
@@ -1328,11 +1334,14 @@ var WidgetHeaderFilter = ({
|
|
|
1328
1334
|
import_Typography3.default,
|
|
1329
1335
|
{
|
|
1330
1336
|
variant: "body2",
|
|
1331
|
-
sx:
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1337
|
+
sx: [
|
|
1338
|
+
{
|
|
1339
|
+
fontWeight: 500,
|
|
1340
|
+
fontSize: multiSelect ? 13 : 14,
|
|
1341
|
+
lineHeight: 1.2
|
|
1342
|
+
},
|
|
1343
|
+
...triggerValueSx ? [triggerValueSx] : []
|
|
1344
|
+
],
|
|
1336
1345
|
children: valueLine
|
|
1337
1346
|
}
|
|
1338
1347
|
)
|
|
@@ -1437,14 +1446,21 @@ var WidgetHeaderFilter = ({
|
|
|
1437
1446
|
{
|
|
1438
1447
|
onClick: () => toggleOption(option),
|
|
1439
1448
|
dense: true,
|
|
1440
|
-
sx:
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1449
|
+
sx: [
|
|
1450
|
+
{
|
|
1451
|
+
py: 0.45,
|
|
1452
|
+
px: 1.25,
|
|
1453
|
+
minHeight: 36,
|
|
1454
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1455
|
+
"&:last-of-type": {
|
|
1456
|
+
borderBottom: "none"
|
|
1457
|
+
},
|
|
1458
|
+
"&:hover": {
|
|
1459
|
+
bgcolor: "rgba(0,0,0,0.03)"
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
...listItemSx ? [listItemSx] : []
|
|
1463
|
+
],
|
|
1448
1464
|
children: [
|
|
1449
1465
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1450
1466
|
import_Checkbox2.default,
|
|
@@ -1489,14 +1505,17 @@ var WidgetHeaderFilter = ({
|
|
|
1489
1505
|
{
|
|
1490
1506
|
onClick: () => toggleOption(option),
|
|
1491
1507
|
dense: true,
|
|
1492
|
-
sx:
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1508
|
+
sx: [
|
|
1509
|
+
{
|
|
1510
|
+
py: 0.45,
|
|
1511
|
+
px: 1.25,
|
|
1512
|
+
minHeight: 36,
|
|
1513
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1514
|
+
"&:last-of-type": { borderBottom: "none" },
|
|
1515
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.03)" }
|
|
1516
|
+
},
|
|
1517
|
+
...listItemSx ? [listItemSx] : []
|
|
1518
|
+
],
|
|
1500
1519
|
children: [
|
|
1501
1520
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1502
1521
|
import_Checkbox2.default,
|
|
@@ -1587,14 +1606,17 @@ var WidgetHeaderFilter = ({
|
|
|
1587
1606
|
{
|
|
1588
1607
|
onClick: () => handleSelect(option),
|
|
1589
1608
|
dense: true,
|
|
1590
|
-
sx:
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1609
|
+
sx: [
|
|
1610
|
+
{
|
|
1611
|
+
py: 0.75,
|
|
1612
|
+
px: 2,
|
|
1613
|
+
minHeight: 36,
|
|
1614
|
+
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
1615
|
+
"&:last-of-type": { borderBottom: "none" },
|
|
1616
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.03)" }
|
|
1617
|
+
},
|
|
1618
|
+
...listItemSx ? [listItemSx] : []
|
|
1619
|
+
],
|
|
1598
1620
|
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1599
1621
|
import_ListItemText.default,
|
|
1600
1622
|
{
|
|
@@ -3281,6 +3303,12 @@ var defaultMonths = [
|
|
|
3281
3303
|
{ label: "Nov", count: 2 },
|
|
3282
3304
|
{ label: "Dec", count: 2 }
|
|
3283
3305
|
];
|
|
3306
|
+
var getMonthKey = (m) => m.year !== void 0 ? `${m.label}-${m.year}` : m.label;
|
|
3307
|
+
var getOrdinalStr = (n) => {
|
|
3308
|
+
const s = ["th", "st", "nd", "rd"];
|
|
3309
|
+
const v = n % 100;
|
|
3310
|
+
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
3311
|
+
};
|
|
3284
3312
|
var RenderIcon = ({
|
|
3285
3313
|
icon,
|
|
3286
3314
|
defaultIcon,
|
|
@@ -3305,7 +3333,7 @@ var MonthButton = ({
|
|
|
3305
3333
|
{
|
|
3306
3334
|
onClick,
|
|
3307
3335
|
sx: {
|
|
3308
|
-
|
|
3336
|
+
minWidth: "89px !important",
|
|
3309
3337
|
height: "29.5px !important",
|
|
3310
3338
|
display: "flex !important",
|
|
3311
3339
|
alignItems: "center !important",
|
|
@@ -3341,7 +3369,8 @@ var MonthButton = ({
|
|
|
3341
3369
|
fontSize: `${monthFontSize} !important`,
|
|
3342
3370
|
lineHeight: "16.5px !important",
|
|
3343
3371
|
letterSpacing: "0.06px !important",
|
|
3344
|
-
color: isSelected ? "#FFFFFF !important" : "#6B7280 !important"
|
|
3372
|
+
color: isSelected ? "#FFFFFF !important" : "#6B7280 !important",
|
|
3373
|
+
whiteSpace: "nowrap"
|
|
3345
3374
|
},
|
|
3346
3375
|
children: month.label
|
|
3347
3376
|
}
|
|
@@ -3562,7 +3591,9 @@ var TimelineEventCard = ({
|
|
|
3562
3591
|
var FalconAuditTimeline = ({
|
|
3563
3592
|
title = "Audit Timeline",
|
|
3564
3593
|
months = defaultMonths,
|
|
3594
|
+
auditRuns,
|
|
3565
3595
|
initialSelectedMonth = "Mar",
|
|
3596
|
+
initialSelectedYear,
|
|
3566
3597
|
onMonthChange,
|
|
3567
3598
|
year = 2026,
|
|
3568
3599
|
onPrevYearClick,
|
|
@@ -3594,21 +3625,199 @@ var FalconAuditTimeline = ({
|
|
|
3594
3625
|
calendarIcon,
|
|
3595
3626
|
chevronLeftIcon,
|
|
3596
3627
|
chevronRightIcon,
|
|
3597
|
-
exportIcon
|
|
3628
|
+
exportIcon,
|
|
3629
|
+
timeControlsRowSx
|
|
3598
3630
|
}) => {
|
|
3599
|
-
const
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3631
|
+
const getInitialKey = () => {
|
|
3632
|
+
if (initialSelectedYear !== void 0) {
|
|
3633
|
+
const match2 = months.find(
|
|
3634
|
+
(m) => m.label === initialSelectedMonth && m.year === initialSelectedYear
|
|
3635
|
+
);
|
|
3636
|
+
if (match2) return getMonthKey(match2);
|
|
3637
|
+
}
|
|
3638
|
+
const match = months.find((m) => m.label === initialSelectedMonth);
|
|
3639
|
+
return match ? getMonthKey(match) : getMonthKey(months[0] ?? { label: initialSelectedMonth, count: 0 });
|
|
3640
|
+
};
|
|
3641
|
+
const [selectedKey, setSelectedKey] = (0, import_react11.useState)(getInitialKey);
|
|
3642
|
+
const activeMonth = months.find((m) => getMonthKey(m) === selectedKey);
|
|
3643
|
+
const handleMonthChange = (m) => {
|
|
3644
|
+
const key = getMonthKey(m);
|
|
3645
|
+
setSelectedKey(key);
|
|
3604
3646
|
if (onMonthChange) {
|
|
3605
|
-
onMonthChange(
|
|
3647
|
+
onMonthChange(m.label, m.year);
|
|
3606
3648
|
}
|
|
3607
3649
|
};
|
|
3608
|
-
const
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
return
|
|
3650
|
+
const displayYear = activeMonth?.year ?? year;
|
|
3651
|
+
const activeRuns = (0, import_react11.useMemo)(() => {
|
|
3652
|
+
if (!auditRuns || !activeMonth) return [];
|
|
3653
|
+
return auditRuns.filter(
|
|
3654
|
+
(r) => r.month === activeMonth.label && (activeMonth.year === void 0 || r.year === void 0 || r.year === activeMonth.year)
|
|
3655
|
+
);
|
|
3656
|
+
}, [auditRuns, activeMonth]);
|
|
3657
|
+
const isZeroCount = activeMonth && activeMonth.count === 0;
|
|
3658
|
+
const renderEventCards = () => {
|
|
3659
|
+
if (!activeMonth || activeMonth.count === 0) {
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3661
|
+
import_material6.Box,
|
|
3662
|
+
{
|
|
3663
|
+
sx: {
|
|
3664
|
+
width: "100% !important",
|
|
3665
|
+
maxWidth: "1292px !important",
|
|
3666
|
+
height: "49px !important",
|
|
3667
|
+
borderRadius: "10px !important",
|
|
3668
|
+
border: "1px solid #E5E7EB !important",
|
|
3669
|
+
background: `${eventCardBg} !important`,
|
|
3670
|
+
display: "flex !important",
|
|
3671
|
+
alignItems: "center !important",
|
|
3672
|
+
justifyContent: "center !important",
|
|
3673
|
+
padding: "8px 14px !important",
|
|
3674
|
+
gap: "6px !important",
|
|
3675
|
+
boxSizing: "border-box !important"
|
|
3676
|
+
},
|
|
3677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3678
|
+
import_material6.Typography,
|
|
3679
|
+
{
|
|
3680
|
+
sx: {
|
|
3681
|
+
fontFamily: `${brandFont} !important`,
|
|
3682
|
+
fontWeight: "600 !important",
|
|
3683
|
+
fontSize: "11px !important",
|
|
3684
|
+
lineHeight: "13.5px !important",
|
|
3685
|
+
letterSpacing: "0.17px !important",
|
|
3686
|
+
color: "#6B7280 !important"
|
|
3687
|
+
},
|
|
3688
|
+
children: emptyStateMessage
|
|
3689
|
+
}
|
|
3690
|
+
)
|
|
3691
|
+
}
|
|
3692
|
+
);
|
|
3693
|
+
}
|
|
3694
|
+
if (auditRuns) {
|
|
3695
|
+
if (activeRuns.length === 0) {
|
|
3696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3697
|
+
import_material6.Box,
|
|
3698
|
+
{
|
|
3699
|
+
sx: {
|
|
3700
|
+
width: "100% !important",
|
|
3701
|
+
maxWidth: "1292px !important",
|
|
3702
|
+
height: "49px !important",
|
|
3703
|
+
borderRadius: "10px !important",
|
|
3704
|
+
border: "1px solid #E5E7EB !important",
|
|
3705
|
+
background: `${eventCardBg} !important`,
|
|
3706
|
+
display: "flex !important",
|
|
3707
|
+
alignItems: "center !important",
|
|
3708
|
+
justifyContent: "center !important",
|
|
3709
|
+
padding: "8px 14px !important",
|
|
3710
|
+
boxSizing: "border-box !important"
|
|
3711
|
+
},
|
|
3712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3713
|
+
import_material6.Typography,
|
|
3714
|
+
{
|
|
3715
|
+
sx: {
|
|
3716
|
+
fontFamily: `${brandFont} !important`,
|
|
3717
|
+
fontWeight: "600 !important",
|
|
3718
|
+
fontSize: "11px !important",
|
|
3719
|
+
lineHeight: "13.5px !important",
|
|
3720
|
+
letterSpacing: "0.17px !important",
|
|
3721
|
+
color: "#6B7280 !important"
|
|
3722
|
+
},
|
|
3723
|
+
children: emptyStateMessage
|
|
3724
|
+
}
|
|
3725
|
+
)
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
}
|
|
3729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3730
|
+
import_material6.Box,
|
|
3731
|
+
{
|
|
3732
|
+
sx: {
|
|
3733
|
+
display: "flex !important",
|
|
3734
|
+
alignItems: "center !important",
|
|
3735
|
+
gap: "8px !important",
|
|
3736
|
+
width: "100% !important",
|
|
3737
|
+
flexWrap: "wrap"
|
|
3738
|
+
},
|
|
3739
|
+
children: activeRuns.map((run, idx) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3740
|
+
TimelineEventCard,
|
|
3741
|
+
{
|
|
3742
|
+
date: run.date,
|
|
3743
|
+
ordinal: run.label ?? getOrdinalStr(idx + 1),
|
|
3744
|
+
status: run.status === "done" ? "completed" : "upcoming",
|
|
3745
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, run.date) : void 0,
|
|
3746
|
+
brandFont,
|
|
3747
|
+
interFont,
|
|
3748
|
+
completedColor,
|
|
3749
|
+
upcomingColor,
|
|
3750
|
+
eventCardBg,
|
|
3751
|
+
eventDateSize,
|
|
3752
|
+
eventDateWeight,
|
|
3753
|
+
ordinalSize: "9px",
|
|
3754
|
+
ordinalWeight: "500",
|
|
3755
|
+
exportIcon,
|
|
3756
|
+
exportButtonText,
|
|
3757
|
+
upcomingButtonText
|
|
3758
|
+
},
|
|
3759
|
+
run.run_number
|
|
3760
|
+
))
|
|
3761
|
+
}
|
|
3762
|
+
);
|
|
3763
|
+
}
|
|
3764
|
+
const monthIndex = months.findIndex((m) => getMonthKey(m) === selectedKey);
|
|
3765
|
+
const precedingEvents = Math.max(0, monthIndex - 2) * 2;
|
|
3766
|
+
const isFirstActiveMonth = monthIndex === months.findIndex((m) => m.count > 0);
|
|
3767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3768
|
+
import_material6.Box,
|
|
3769
|
+
{
|
|
3770
|
+
sx: {
|
|
3771
|
+
display: "flex !important",
|
|
3772
|
+
alignItems: "center !important",
|
|
3773
|
+
gap: "8px !important",
|
|
3774
|
+
width: "100% !important"
|
|
3775
|
+
},
|
|
3776
|
+
children: [
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3778
|
+
TimelineEventCard,
|
|
3779
|
+
{
|
|
3780
|
+
date: `${activeMonth.label} 5`,
|
|
3781
|
+
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
3782
|
+
status: isFirstActiveMonth ? "completed" : "upcoming",
|
|
3783
|
+
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, `${activeMonth.label} 5`) : void 0,
|
|
3784
|
+
brandFont,
|
|
3785
|
+
interFont,
|
|
3786
|
+
completedColor,
|
|
3787
|
+
upcomingColor,
|
|
3788
|
+
eventCardBg,
|
|
3789
|
+
eventDateSize,
|
|
3790
|
+
eventDateWeight,
|
|
3791
|
+
ordinalSize: "9px",
|
|
3792
|
+
ordinalWeight: "500",
|
|
3793
|
+
exportIcon,
|
|
3794
|
+
exportButtonText,
|
|
3795
|
+
upcomingButtonText
|
|
3796
|
+
}
|
|
3797
|
+
),
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3799
|
+
TimelineEventCard,
|
|
3800
|
+
{
|
|
3801
|
+
date: `${activeMonth.label} 20`,
|
|
3802
|
+
ordinal: getOrdinalStr(precedingEvents + 2),
|
|
3803
|
+
status: "upcoming",
|
|
3804
|
+
brandFont,
|
|
3805
|
+
interFont,
|
|
3806
|
+
completedColor,
|
|
3807
|
+
upcomingColor,
|
|
3808
|
+
eventCardBg,
|
|
3809
|
+
eventDateSize,
|
|
3810
|
+
eventDateWeight,
|
|
3811
|
+
ordinalSize: "9px",
|
|
3812
|
+
ordinalWeight: "500",
|
|
3813
|
+
exportIcon,
|
|
3814
|
+
exportButtonText,
|
|
3815
|
+
upcomingButtonText
|
|
3816
|
+
}
|
|
3817
|
+
)
|
|
3818
|
+
]
|
|
3819
|
+
}
|
|
3820
|
+
);
|
|
3612
3821
|
};
|
|
3613
3822
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3614
3823
|
import_material6.Card,
|
|
@@ -3645,18 +3854,21 @@ var FalconAuditTimeline = ({
|
|
|
3645
3854
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3646
3855
|
import_material6.Box,
|
|
3647
3856
|
{
|
|
3648
|
-
sx:
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3857
|
+
sx: [
|
|
3858
|
+
{
|
|
3859
|
+
display: "flex !important",
|
|
3860
|
+
alignItems: "center !important",
|
|
3861
|
+
gap: "8px !important",
|
|
3862
|
+
overflow: "hidden !important"
|
|
3863
|
+
},
|
|
3864
|
+
...timeControlsRowSx ? [timeControlsRowSx] : []
|
|
3865
|
+
],
|
|
3654
3866
|
children: [
|
|
3655
3867
|
showYearSelector && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3656
3868
|
import_material6.Box,
|
|
3657
3869
|
{
|
|
3658
3870
|
sx: {
|
|
3659
|
-
|
|
3871
|
+
minWidth: "124px !important",
|
|
3660
3872
|
height: "29px !important",
|
|
3661
3873
|
display: "flex !important",
|
|
3662
3874
|
alignItems: "center !important",
|
|
@@ -3693,11 +3905,12 @@ var FalconAuditTimeline = ({
|
|
|
3693
3905
|
fontSize: "11px !important",
|
|
3694
3906
|
lineHeight: "16.5px !important",
|
|
3695
3907
|
letterSpacing: "0.06px !important",
|
|
3696
|
-
color: "#0A0A0A !important"
|
|
3908
|
+
color: "#0A0A0A !important",
|
|
3909
|
+
whiteSpace: "nowrap"
|
|
3697
3910
|
},
|
|
3698
3911
|
children: [
|
|
3699
3912
|
"Year ",
|
|
3700
|
-
|
|
3913
|
+
displayYear
|
|
3701
3914
|
]
|
|
3702
3915
|
}
|
|
3703
3916
|
),
|
|
@@ -3724,8 +3937,8 @@ var FalconAuditTimeline = ({
|
|
|
3724
3937
|
MonthButton,
|
|
3725
3938
|
{
|
|
3726
3939
|
month,
|
|
3727
|
-
isSelected:
|
|
3728
|
-
onClick: () => handleMonthChange(month
|
|
3940
|
+
isSelected: getMonthKey(month) === selectedKey,
|
|
3941
|
+
onClick: () => handleMonthChange(month),
|
|
3729
3942
|
brandFont,
|
|
3730
3943
|
primaryColor,
|
|
3731
3944
|
inactiveMonthBg,
|
|
@@ -3733,106 +3946,12 @@ var FalconAuditTimeline = ({
|
|
|
3733
3946
|
monthFontWeight,
|
|
3734
3947
|
calendarIcon
|
|
3735
3948
|
},
|
|
3736
|
-
month
|
|
3949
|
+
getMonthKey(month)
|
|
3737
3950
|
))
|
|
3738
3951
|
]
|
|
3739
3952
|
}
|
|
3740
3953
|
),
|
|
3741
|
-
(
|
|
3742
|
-
const monthInfo = months.find((m) => m.label === selectedMonth);
|
|
3743
|
-
if (!monthInfo || monthInfo.count === 0) {
|
|
3744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3745
|
-
import_material6.Box,
|
|
3746
|
-
{
|
|
3747
|
-
sx: {
|
|
3748
|
-
width: "100% !important",
|
|
3749
|
-
maxWidth: "1292px !important",
|
|
3750
|
-
height: "49px !important",
|
|
3751
|
-
borderRadius: "10px !important",
|
|
3752
|
-
border: "1px solid #E5E7EB !important",
|
|
3753
|
-
background: `${eventCardBg} !important`,
|
|
3754
|
-
display: "flex !important",
|
|
3755
|
-
alignItems: "center !important",
|
|
3756
|
-
justifyContent: "center !important",
|
|
3757
|
-
padding: "8px 14px !important",
|
|
3758
|
-
gap: "6px !important",
|
|
3759
|
-
boxSizing: "border-box !important"
|
|
3760
|
-
},
|
|
3761
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3762
|
-
import_material6.Typography,
|
|
3763
|
-
{
|
|
3764
|
-
sx: {
|
|
3765
|
-
fontFamily: `${brandFont} !important`,
|
|
3766
|
-
fontWeight: "600 !important",
|
|
3767
|
-
fontSize: "11px !important",
|
|
3768
|
-
lineHeight: "13.5px !important",
|
|
3769
|
-
letterSpacing: "0.17px !important",
|
|
3770
|
-
color: "#6B7280 !important"
|
|
3771
|
-
},
|
|
3772
|
-
children: emptyStateMessage
|
|
3773
|
-
}
|
|
3774
|
-
)
|
|
3775
|
-
}
|
|
3776
|
-
);
|
|
3777
|
-
}
|
|
3778
|
-
const monthIndex = months.findIndex((m) => m.label === selectedMonth);
|
|
3779
|
-
const precedingEvents = (monthIndex - 2) * 2;
|
|
3780
|
-
const isMar = selectedMonth === "Mar";
|
|
3781
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3782
|
-
import_material6.Box,
|
|
3783
|
-
{
|
|
3784
|
-
sx: {
|
|
3785
|
-
display: "flex !important",
|
|
3786
|
-
alignItems: "center !important",
|
|
3787
|
-
gap: "8px !important",
|
|
3788
|
-
width: "100% !important"
|
|
3789
|
-
},
|
|
3790
|
-
children: [
|
|
3791
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3792
|
-
TimelineEventCard,
|
|
3793
|
-
{
|
|
3794
|
-
date: `${selectedMonth} 5`,
|
|
3795
|
-
ordinal: getOrdinalStr(precedingEvents + 1),
|
|
3796
|
-
status: isMar ? "completed" : "upcoming",
|
|
3797
|
-
onExportClick: onExportReportClick ? (e) => onExportReportClick(e, `${selectedMonth} 5`) : void 0,
|
|
3798
|
-
brandFont,
|
|
3799
|
-
interFont,
|
|
3800
|
-
completedColor,
|
|
3801
|
-
upcomingColor,
|
|
3802
|
-
eventCardBg,
|
|
3803
|
-
eventDateSize,
|
|
3804
|
-
eventDateWeight,
|
|
3805
|
-
ordinalSize: "9px",
|
|
3806
|
-
ordinalWeight: "500",
|
|
3807
|
-
exportIcon,
|
|
3808
|
-
exportButtonText,
|
|
3809
|
-
upcomingButtonText
|
|
3810
|
-
}
|
|
3811
|
-
),
|
|
3812
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3813
|
-
TimelineEventCard,
|
|
3814
|
-
{
|
|
3815
|
-
date: `${selectedMonth} 20`,
|
|
3816
|
-
ordinal: getOrdinalStr(precedingEvents + 2),
|
|
3817
|
-
status: "upcoming",
|
|
3818
|
-
brandFont,
|
|
3819
|
-
interFont,
|
|
3820
|
-
completedColor,
|
|
3821
|
-
upcomingColor,
|
|
3822
|
-
eventCardBg,
|
|
3823
|
-
eventDateSize,
|
|
3824
|
-
eventDateWeight,
|
|
3825
|
-
ordinalSize: "9px",
|
|
3826
|
-
ordinalWeight: "500",
|
|
3827
|
-
exportIcon,
|
|
3828
|
-
exportButtonText,
|
|
3829
|
-
upcomingButtonText
|
|
3830
|
-
}
|
|
3831
|
-
)
|
|
3832
|
-
]
|
|
3833
|
-
}
|
|
3834
|
-
);
|
|
3835
|
-
})()
|
|
3954
|
+
renderEventCards()
|
|
3836
3955
|
]
|
|
3837
3956
|
}
|
|
3838
3957
|
);
|
|
@@ -8891,21 +9010,33 @@ var WalkinAnalysis = ({
|
|
|
8891
9010
|
spacing: 3,
|
|
8892
9011
|
alignItems: "center",
|
|
8893
9012
|
justifyContent: "flex-start",
|
|
8894
|
-
sx:
|
|
9013
|
+
sx: [
|
|
9014
|
+
{ width: "100%" },
|
|
9015
|
+
...customization?.chartLegendRowSx != null ? [customization.chartLegendRowSx] : []
|
|
9016
|
+
],
|
|
8895
9017
|
children: [
|
|
8896
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8897
|
-
|
|
9018
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9019
|
+
import_Box12.default,
|
|
8898
9020
|
{
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
9021
|
+
sx: [
|
|
9022
|
+
{ flexShrink: 0, lineHeight: 0 },
|
|
9023
|
+
...customization?.pieChartBoxSx != null ? [customization.pieChartBoxSx] : []
|
|
9024
|
+
],
|
|
9025
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9026
|
+
WalkinPieChart,
|
|
9027
|
+
{
|
|
9028
|
+
slices,
|
|
9029
|
+
size: resolvedPieSize,
|
|
9030
|
+
typography,
|
|
9031
|
+
activeTabId,
|
|
9032
|
+
renderTooltip,
|
|
9033
|
+
emptyStatePlaceholderProps,
|
|
9034
|
+
isChartAnimationActive,
|
|
9035
|
+
chartAnimationDuration
|
|
9036
|
+
}
|
|
9037
|
+
)
|
|
8907
9038
|
}
|
|
8908
|
-
)
|
|
9039
|
+
),
|
|
8909
9040
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8910
9041
|
import_Stack10.default,
|
|
8911
9042
|
{
|
|
@@ -10333,6 +10464,17 @@ var QueueTimeBreakdownArea = ({
|
|
|
10333
10464
|
);
|
|
10334
10465
|
const gridStroke = ac?.gridStroke ?? theme.palette.divider;
|
|
10335
10466
|
const yLabel = ac?.yAxisLabel ?? "No of Visitors";
|
|
10467
|
+
const allZero = React20.useMemo(() => {
|
|
10468
|
+
if (chartData.length === 0) return true;
|
|
10469
|
+
return chartData.every(
|
|
10470
|
+
(row) => series.every((s) => {
|
|
10471
|
+
const val = row[s.name];
|
|
10472
|
+
return (typeof val === "number" ? val : Number(val)) === 0;
|
|
10473
|
+
})
|
|
10474
|
+
);
|
|
10475
|
+
}, [chartData, series]);
|
|
10476
|
+
const yDomain = allZero ? [0, 16e3] : [0, "auto"];
|
|
10477
|
+
const yTickCount = allZero ? 5 : void 0;
|
|
10336
10478
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material16.Stack, { justifyContent: "center", height: stackH, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_recharts7.ResponsiveContainer, { width: "100%", height: chartH, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_recharts7.AreaChart, { data: chartData, margin, children: [
|
|
10337
10479
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10338
10480
|
import_recharts7.CartesianGrid,
|
|
@@ -10354,6 +10496,8 @@ var QueueTimeBreakdownArea = ({
|
|
|
10354
10496
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10355
10497
|
import_recharts7.YAxis,
|
|
10356
10498
|
{
|
|
10499
|
+
domain: yDomain,
|
|
10500
|
+
tickCount: yTickCount,
|
|
10357
10501
|
tick: { fill: theme.palette.text.secondary, fontSize: 11 },
|
|
10358
10502
|
axisLine: false,
|
|
10359
10503
|
tickLine: false,
|
|
@@ -10834,6 +10978,12 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10834
10978
|
[rawValues, total]
|
|
10835
10979
|
);
|
|
10836
10980
|
const h = sb?.barThicknessPx ?? Math.max(14, QUEUE_STACKED_BAR_THICKNESS_PX);
|
|
10981
|
+
const isAllZero = rawValues.every((v) => v === 0);
|
|
10982
|
+
const emptySegments = legendRows.length > 0 ? legendRows : row.data.map((d, i) => ({
|
|
10983
|
+
label: d.name,
|
|
10984
|
+
percent: "0%",
|
|
10985
|
+
color: palette[i % palette.length]
|
|
10986
|
+
}));
|
|
10837
10987
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_Stack14.default, { spacing: 0, sx: { width: "100%", mb: 1.5 }, children: [
|
|
10838
10988
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10839
10989
|
import_Box16.default,
|
|
@@ -10842,9 +10992,19 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10842
10992
|
width: "100%",
|
|
10843
10993
|
height: h,
|
|
10844
10994
|
display: "flex",
|
|
10845
|
-
overflow: "hidden"
|
|
10995
|
+
overflow: "hidden",
|
|
10996
|
+
borderRadius: 0
|
|
10846
10997
|
},
|
|
10847
|
-
children:
|
|
10998
|
+
children: isAllZero ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10999
|
+
import_Box16.default,
|
|
11000
|
+
{
|
|
11001
|
+
sx: {
|
|
11002
|
+
width: "100%",
|
|
11003
|
+
height: "100%",
|
|
11004
|
+
bgcolor: "#E5E7EB"
|
|
11005
|
+
}
|
|
11006
|
+
}
|
|
11007
|
+
) : pcts.map((p, i) => {
|
|
10848
11008
|
if (p <= 0) return null;
|
|
10849
11009
|
const color = palette[i % palette.length];
|
|
10850
11010
|
const segName = legendRows[i]?.label ?? row.data[i]?.name ?? "";
|
|
@@ -10908,25 +11068,97 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10908
11068
|
},
|
|
10909
11069
|
sb?.labelRowContainerSx
|
|
10910
11070
|
),
|
|
10911
|
-
children:
|
|
10912
|
-
|
|
11071
|
+
children: isAllZero ? emptySegments.map((seg, i) => {
|
|
11072
|
+
const labelText = seg.label ?? row.data[i]?.name ?? "";
|
|
11073
|
+
const sharePct = 100 / emptySegments.length;
|
|
11074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
11075
|
+
import_Box16.default,
|
|
11076
|
+
{
|
|
11077
|
+
sx: mergeSx2(
|
|
11078
|
+
{
|
|
11079
|
+
flex: `0 0 ${sharePct}%`,
|
|
11080
|
+
minWidth: 0,
|
|
11081
|
+
maxWidth: `${sharePct}%`,
|
|
11082
|
+
px: 0.75,
|
|
11083
|
+
textAlign: "center",
|
|
11084
|
+
overflow: "hidden"
|
|
11085
|
+
},
|
|
11086
|
+
sb?.segmentBoxSx
|
|
11087
|
+
),
|
|
11088
|
+
children: [
|
|
11089
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11090
|
+
import_Typography13.default,
|
|
11091
|
+
{
|
|
11092
|
+
sx: mergeSx2(
|
|
11093
|
+
{
|
|
11094
|
+
fontSize: "clamp(13px, 1.2vw, 20px)",
|
|
11095
|
+
fontWeight: 700,
|
|
11096
|
+
color: "#7A7F87",
|
|
11097
|
+
lineHeight: 1.15,
|
|
11098
|
+
width: "100%",
|
|
11099
|
+
overflow: "hidden",
|
|
11100
|
+
textOverflow: "ellipsis",
|
|
11101
|
+
whiteSpace: "nowrap"
|
|
11102
|
+
},
|
|
11103
|
+
sb?.labelPercentSx
|
|
11104
|
+
),
|
|
11105
|
+
children: "0 (0%)"
|
|
11106
|
+
}
|
|
11107
|
+
),
|
|
11108
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11109
|
+
import_Typography13.default,
|
|
11110
|
+
{
|
|
11111
|
+
sx: mergeSx2(
|
|
11112
|
+
{
|
|
11113
|
+
fontSize: "clamp(9px, 0.9vw, 11px)",
|
|
11114
|
+
fontWeight: 600,
|
|
11115
|
+
color: "#7A7F87",
|
|
11116
|
+
lineHeight: 1.25,
|
|
11117
|
+
mt: 0.4,
|
|
11118
|
+
width: "100%",
|
|
11119
|
+
overflow: "hidden",
|
|
11120
|
+
textOverflow: "ellipsis",
|
|
11121
|
+
whiteSpace: "nowrap"
|
|
11122
|
+
},
|
|
11123
|
+
sb?.labelRangeSx
|
|
11124
|
+
),
|
|
11125
|
+
children: labelText
|
|
11126
|
+
}
|
|
11127
|
+
)
|
|
11128
|
+
]
|
|
11129
|
+
},
|
|
11130
|
+
`empty-lbl-${row.name}-${i}`
|
|
11131
|
+
);
|
|
11132
|
+
}) : pcts.map((p, i) => {
|
|
10913
11133
|
const leg = legendRows[i];
|
|
10914
|
-
const pctText = leg?.percent ?? `${Math.round(p)}%`;
|
|
10915
11134
|
const labelText = leg?.label ?? row.data[i]?.name ?? "";
|
|
10916
11135
|
const countValue = rawValues[i];
|
|
10917
|
-
const
|
|
11136
|
+
const sharePct = 100 / pcts.length;
|
|
11137
|
+
let displayText;
|
|
11138
|
+
if (countValue <= 0) {
|
|
11139
|
+
displayText = "0";
|
|
11140
|
+
} else {
|
|
11141
|
+
const pctText = leg?.percent ?? `${Math.round(p)}%`;
|
|
11142
|
+
const countText = new Intl.NumberFormat("en-US").format(
|
|
11143
|
+
countValue
|
|
11144
|
+
);
|
|
11145
|
+
displayText = `${countText} (${pctText})`;
|
|
11146
|
+
}
|
|
10918
11147
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
10919
11148
|
import_Box16.default,
|
|
10920
11149
|
{
|
|
10921
|
-
title: `${
|
|
10922
|
-
sx:
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
11150
|
+
title: `${displayText} ${labelText}`.trim(),
|
|
11151
|
+
sx: mergeSx2(
|
|
11152
|
+
{
|
|
11153
|
+
flex: `0 0 ${sharePct}%`,
|
|
11154
|
+
minWidth: 0,
|
|
11155
|
+
maxWidth: `${sharePct}%`,
|
|
11156
|
+
px: 0.75,
|
|
11157
|
+
textAlign: "center",
|
|
11158
|
+
overflow: "hidden"
|
|
11159
|
+
},
|
|
11160
|
+
sb?.segmentBoxSx
|
|
11161
|
+
),
|
|
10930
11162
|
children: [
|
|
10931
11163
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10932
11164
|
import_Typography13.default,
|
|
@@ -10944,7 +11176,7 @@ function QueueTimeBreakdownStackedBar({
|
|
|
10944
11176
|
},
|
|
10945
11177
|
sb?.labelPercentSx
|
|
10946
11178
|
),
|
|
10947
|
-
children:
|
|
11179
|
+
children: displayText
|
|
10948
11180
|
}
|
|
10949
11181
|
),
|
|
10950
11182
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -11034,6 +11266,10 @@ function QueueTimeBreakdown({
|
|
|
11034
11266
|
const values = [...Donut_data, ...yesterdayDonut];
|
|
11035
11267
|
return values.some((value) => Number.isFinite(value) && value > 0);
|
|
11036
11268
|
}, [Donut_data, yesterdayDonut]);
|
|
11269
|
+
const hasBarData = React23.useMemo(
|
|
11270
|
+
() => data.some((row) => row.data.some((seg) => (seg.data[0] ?? 0) > 0)),
|
|
11271
|
+
[data]
|
|
11272
|
+
);
|
|
11037
11273
|
const palette = customization?.chartPalette && customization.chartPalette.length > 0 ? customization.chartPalette : QUEUE_CHART_COLORS;
|
|
11038
11274
|
const legend = queueBucketLegend ?? defaultBucketLegendFromPalette(palette);
|
|
11039
11275
|
const resolvedHeaderImageSrc = headerImageSrc === void 0 ? QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC : headerImageSrc;
|
|
@@ -11265,14 +11501,14 @@ function QueueTimeBreakdown({
|
|
|
11265
11501
|
{ padding: "10px 8px" },
|
|
11266
11502
|
customization?.areaChart?.cardContentSx
|
|
11267
11503
|
),
|
|
11268
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
11504
|
+
children: hasBarData ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
11269
11505
|
QueueTimeBreakdownArea_default,
|
|
11270
11506
|
{
|
|
11271
11507
|
series: getQueueTimeBreakdownAreaSeriesData(filter),
|
|
11272
11508
|
xAxis: getQueueTimeBreakdownAreaXAxisData(filter),
|
|
11273
11509
|
renderTooltip: renderAreaTooltip
|
|
11274
11510
|
}
|
|
11275
|
-
)
|
|
11511
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChartEmptyState, { minHeight: 330 })
|
|
11276
11512
|
}
|
|
11277
11513
|
)
|
|
11278
11514
|
}
|
|
@@ -11976,51 +12212,71 @@ function FootfallHeatMapKpiRankedBlock({
|
|
|
11976
12212
|
...presentation?.kpiContainerSx ? [presentation.kpiContainerSx] : []
|
|
11977
12213
|
],
|
|
11978
12214
|
children: [
|
|
11979
|
-
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11980
|
-
|
|
12215
|
+
useCustomSummary && customSummary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12216
|
+
import_material17.Stack,
|
|
11981
12217
|
{
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
),
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12218
|
+
direction: "row",
|
|
12219
|
+
spacing: 1.5,
|
|
12220
|
+
flexWrap: "wrap",
|
|
12221
|
+
useFlexGap: true,
|
|
12222
|
+
sx: presentation?.summaryRowSx ? [presentation.summaryRowSx] : void 0,
|
|
12223
|
+
children: useCustomSummary ? customSummary.map((card) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12224
|
+
InlineStatCard,
|
|
12225
|
+
{
|
|
12226
|
+
icon: card.icon ?? "mdi:chart-box-outline",
|
|
12227
|
+
title: card.title,
|
|
12228
|
+
value: card.value,
|
|
12229
|
+
sx: [presentation?.statCardSx, card.sx].filter(
|
|
12230
|
+
Boolean
|
|
12231
|
+
),
|
|
12232
|
+
iconColor: card.iconColor ?? statIcon
|
|
12233
|
+
},
|
|
12234
|
+
card.id
|
|
12235
|
+
)) : [
|
|
12236
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12237
|
+
InlineStatCard,
|
|
12238
|
+
{
|
|
12239
|
+
icon: "mdi:store-marker-outline",
|
|
12240
|
+
title: "No. of Stores",
|
|
12241
|
+
value: summaryKpis.storeCount,
|
|
12242
|
+
sx: presentation?.statCardSx,
|
|
12243
|
+
iconColor: statIcon
|
|
12244
|
+
},
|
|
12245
|
+
"default-stores"
|
|
12246
|
+
),
|
|
12247
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12248
|
+
InlineStatCard,
|
|
12249
|
+
{
|
|
12250
|
+
icon: "fluent:people-community-16-filled",
|
|
12251
|
+
title: "Overall Visitors",
|
|
12252
|
+
value: summaryKpis.overallVisitors,
|
|
12253
|
+
sx: presentation?.statCardSx,
|
|
12254
|
+
iconColor: statIcon
|
|
12255
|
+
},
|
|
12256
|
+
"default-visitors"
|
|
12257
|
+
)
|
|
12258
|
+
]
|
|
12259
|
+
}
|
|
12260
|
+
),
|
|
12261
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12262
|
+
import_material17.Stack,
|
|
12017
12263
|
{
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12264
|
+
spacing: 1.25,
|
|
12265
|
+
sx: [
|
|
12266
|
+
{ pt: 0.5, pb: 1 },
|
|
12267
|
+
...presentation?.rankedListStackSx ? [presentation.rankedListStackSx] : []
|
|
12268
|
+
],
|
|
12269
|
+
children: rankedBarList.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
12270
|
+
InlineSegmentStrip,
|
|
12271
|
+
{
|
|
12272
|
+
item,
|
|
12273
|
+
scaleTotal,
|
|
12274
|
+
presentation
|
|
12275
|
+
},
|
|
12276
|
+
item.id
|
|
12277
|
+
))
|
|
12278
|
+
}
|
|
12279
|
+
)
|
|
12024
12280
|
]
|
|
12025
12281
|
}
|
|
12026
12282
|
);
|
|
@@ -12168,7 +12424,8 @@ function FootFallHeatMapView({
|
|
|
12168
12424
|
treemap: treemapProp,
|
|
12169
12425
|
tree: treeProp,
|
|
12170
12426
|
kpiStrip: kpiStripPresentation,
|
|
12171
|
-
emptyStatePlaceholderProps
|
|
12427
|
+
emptyStatePlaceholderProps,
|
|
12428
|
+
onPathChange
|
|
12172
12429
|
}) {
|
|
12173
12430
|
const sortBy = treeProp?.sortBy ?? "walkins";
|
|
12174
12431
|
const startFromLevel = treeProp?.startFromLevel ?? "Region";
|
|
@@ -12263,7 +12520,11 @@ function FootFallHeatMapView({
|
|
|
12263
12520
|
setTrackingDetails((pre) => {
|
|
12264
12521
|
const expectedDepth = data.previous.length;
|
|
12265
12522
|
const normalizedPath = pre.slice(0, expectedDepth);
|
|
12266
|
-
|
|
12523
|
+
const nextDetails = [...normalizedPath, p2];
|
|
12524
|
+
onPathChange?.(
|
|
12525
|
+
nextDetails.map((t) => String(t?.name ?? "").trim()).filter(Boolean)
|
|
12526
|
+
);
|
|
12527
|
+
return nextDetails;
|
|
12267
12528
|
});
|
|
12268
12529
|
const nested = getNestedList(p2);
|
|
12269
12530
|
const hasNestedChildren = Boolean(nested?.length);
|
|
@@ -12551,6 +12812,9 @@ function FootFallHeatMapView({
|
|
|
12551
12812
|
setShowLeaf(false);
|
|
12552
12813
|
const history = trackingDetails.slice(0, -1);
|
|
12553
12814
|
setTrackingDetails(history);
|
|
12815
|
+
onPathChange?.(
|
|
12816
|
+
history.map((t) => String(t?.name ?? "").trim()).filter(Boolean)
|
|
12817
|
+
);
|
|
12554
12818
|
const obj1 = {
|
|
12555
12819
|
current: data.previous[0] ?? [],
|
|
12556
12820
|
previous: data.previous.slice(1)
|