@dexteel/mesf-core 7.15.3 → 7.17.2
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/.github/workflows/publish-to-npm.yaml +17 -6
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +51 -0
- package/CLAUDE.md +27 -15
- package/README.md +69 -12
- package/dist/MESFMain.d.ts +2 -1
- package/dist/components/navigation/NavbarMenuBar.d.ts +25 -0
- package/dist/globalContext.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +241 -34
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
|
|
2
2
|
export * from '@microsoft/signalr';
|
|
3
3
|
export { LicenseManager } from 'ag-grid-enterprise';
|
|
4
|
-
import { styled, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Grid2, Button, Box, MenuItem, ListItemIcon, createTheme, TextField, Alert as Alert$2, useTheme, InputAdornment, Popover, MenuList, ListItemText, alpha, Dialog as Dialog$1, Paper, List, ListItem, Chip, SvgIcon, Typography as Typography$1, Checkbox, IconButton as IconButton$1, CircularProgress, FormControl, FormHelperText, FormControlLabel, Snackbar, DialogContentText, Badge, InputLabel, Select, Input, Divider, Card, CardContent, CardActions, Collapse, Tooltip, CssBaseline, AppBar, Toolbar, Container, Menu, Switch, Autocomplete,
|
|
4
|
+
import { styled, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Grid2, Button, Box, MenuItem, ListItemIcon, createTheme, TextField, Alert as Alert$2, useTheme, InputAdornment, Popover, MenuList, ListItemText, alpha, Dialog as Dialog$1, Paper, List, ListItem, Chip, SvgIcon, Typography as Typography$1, Checkbox, IconButton as IconButton$1, CircularProgress, FormControl, FormHelperText, FormControlLabel, Snackbar, DialogContentText, Badge, InputLabel, Select, Input, Divider, Card, CardContent, CardActions, Collapse, Tooltip, CssBaseline, AppBar, Toolbar, Container, Menu, Switch, Autocomplete, useMediaQuery, Drawer, Grid, Accordion, AccordionSummary, AccordionDetails, Tabs, Tab, ListSubheader, ListItemButton, StyledEngineProvider, ThemeProvider, ListItemSecondaryAction } from '@mui/material';
|
|
5
5
|
import { useMutation, useQuery, useQueryClient, QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { createContext, useContext, useRef, useState, useEffect, useCallback, useMemo, Component, lazy, Suspense } from 'react';
|
|
@@ -25,7 +25,7 @@ import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
25
25
|
import EditIcon from '@mui/icons-material/Edit';
|
|
26
26
|
import FindInPageIcon from '@mui/icons-material/FindInPage';
|
|
27
27
|
import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
|
|
28
|
-
import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, Cloud, Square as Square$1, Timeline, Send, Menu as Menu$1, People, Storage, Group, Assignment, Chat, ViewList, Build, Settings as Settings$2, Code as Code$1, FastRewind, FastForward, ZoomIn, Restore, Lock, Create, Delete, Folder, InsertChart, Search, PlaylistAdd, DragIndicator, Save, AttachFile, CloudUpload, GetApp } from '@mui/icons-material';
|
|
28
|
+
import { ArrowRight, ArrowBackRounded, ArrowForwardRounded, SkipNext, ChevronLeft, ChevronRight, Cloud, ExpandLess, ExpandMore, Square as Square$1, Timeline, Send, Menu as Menu$1, People, Storage, Group, Assignment, Chat, ViewList, Build, Settings as Settings$2, Code as Code$1, FastRewind, FastForward, ZoomIn, Restore, Lock, Create, Delete, Folder, InsertChart, Search, PlaylistAdd, DragIndicator, Save, AttachFile, CloudUpload, GetApp } from '@mui/icons-material';
|
|
29
29
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
30
30
|
import FormatListBulletedSharpIcon from '@mui/icons-material/FormatListBulletedSharp';
|
|
31
31
|
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
|
|
@@ -2207,9 +2207,15 @@ const ModalTreeFilterControl = (props) => {
|
|
|
2207
2207
|
} },
|
|
2208
2208
|
allowSearch && (React__default.createElement(Grid2, { ref: searchContainerRef, style: {
|
|
2209
2209
|
position: "sticky",
|
|
2210
|
-
top:
|
|
2210
|
+
top: -16,
|
|
2211
2211
|
zIndex: 1000,
|
|
2212
2212
|
backgroundColor: "#fff",
|
|
2213
|
+
paddingTop: 5,
|
|
2214
|
+
paddingBottom: 5,
|
|
2215
|
+
marginLeft: -24,
|
|
2216
|
+
marginRight: -24,
|
|
2217
|
+
paddingLeft: 24,
|
|
2218
|
+
paddingRight: 24,
|
|
2213
2219
|
} },
|
|
2214
2220
|
React__default.createElement(TextField, { sx: {
|
|
2215
2221
|
marginBottom: 1,
|
|
@@ -6687,6 +6693,175 @@ function Logout() {
|
|
|
6687
6693
|
React__default.createElement(Typography$1, { variant: "h6" }, "Logging out..."))));
|
|
6688
6694
|
}
|
|
6689
6695
|
|
|
6696
|
+
function NavbarMenuBar({ menus, isMobile = false, closeDrawer, hoverSwitchDelayMs = 10, }) {
|
|
6697
|
+
const hasPermissionTo = useHasPermission();
|
|
6698
|
+
const [openMenuId, setOpenMenuId] = useState(null);
|
|
6699
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState(null);
|
|
6700
|
+
const triggerRefs = useRef({});
|
|
6701
|
+
const hoverTimeoutRef = useRef(null);
|
|
6702
|
+
const visibleMenus = useMemo(() => {
|
|
6703
|
+
return menus
|
|
6704
|
+
.filter((menu) => !menu.permission || hasPermissionTo(menu.permission))
|
|
6705
|
+
.map((menu) => (Object.assign(Object.assign({}, menu), { items: menu.items.filter((item) => !item.permission || hasPermissionTo(item.permission)) })))
|
|
6706
|
+
.filter((menu) => menu.items.length > 0 || Boolean(menu.to));
|
|
6707
|
+
}, [hasPermissionTo, menus]);
|
|
6708
|
+
const clearHoverTimeout = () => {
|
|
6709
|
+
if (hoverTimeoutRef.current !== null) {
|
|
6710
|
+
window.clearTimeout(hoverTimeoutRef.current);
|
|
6711
|
+
hoverTimeoutRef.current = null;
|
|
6712
|
+
}
|
|
6713
|
+
};
|
|
6714
|
+
const focusTrigger = (menuId) => {
|
|
6715
|
+
var _a;
|
|
6716
|
+
(_a = triggerRefs.current[menuId]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
6717
|
+
};
|
|
6718
|
+
const getAdjacentMenu = (menuId, direction) => {
|
|
6719
|
+
var _a;
|
|
6720
|
+
const currentIndex = visibleMenus.findIndex((menu) => menu.id === menuId);
|
|
6721
|
+
if (currentIndex === -1) {
|
|
6722
|
+
return null;
|
|
6723
|
+
}
|
|
6724
|
+
const nextIndex = (currentIndex + direction + visibleMenus.length) % visibleMenus.length;
|
|
6725
|
+
return (_a = visibleMenus[nextIndex]) !== null && _a !== void 0 ? _a : null;
|
|
6726
|
+
};
|
|
6727
|
+
const openMenu = (menuId, anchorEl) => {
|
|
6728
|
+
var _a;
|
|
6729
|
+
clearHoverTimeout();
|
|
6730
|
+
setOpenMenuId(menuId);
|
|
6731
|
+
setMenuAnchorEl((_a = anchorEl !== null && anchorEl !== void 0 ? anchorEl : triggerRefs.current[menuId]) !== null && _a !== void 0 ? _a : null);
|
|
6732
|
+
};
|
|
6733
|
+
const closeMenu = () => {
|
|
6734
|
+
clearHoverTimeout();
|
|
6735
|
+
setOpenMenuId(null);
|
|
6736
|
+
setMenuAnchorEl(null);
|
|
6737
|
+
};
|
|
6738
|
+
useEffect(() => () => clearHoverTimeout(), []);
|
|
6739
|
+
useEffect(() => {
|
|
6740
|
+
if (!openMenuId) {
|
|
6741
|
+
return;
|
|
6742
|
+
}
|
|
6743
|
+
const handlePointerDown = (event) => {
|
|
6744
|
+
const target = event.target;
|
|
6745
|
+
const trigger = triggerRefs.current[openMenuId];
|
|
6746
|
+
const menuPaper = document.querySelector(`#${openMenuId}-menu .MuiPaper-root`);
|
|
6747
|
+
if (target &&
|
|
6748
|
+
((trigger && trigger.contains(target)) ||
|
|
6749
|
+
(menuPaper && menuPaper.contains(target)))) {
|
|
6750
|
+
return;
|
|
6751
|
+
}
|
|
6752
|
+
closeMenu();
|
|
6753
|
+
};
|
|
6754
|
+
document.addEventListener("mousedown", handlePointerDown, true);
|
|
6755
|
+
document.addEventListener("touchstart", handlePointerDown, true);
|
|
6756
|
+
return () => {
|
|
6757
|
+
document.removeEventListener("mousedown", handlePointerDown, true);
|
|
6758
|
+
document.removeEventListener("touchstart", handlePointerDown, true);
|
|
6759
|
+
};
|
|
6760
|
+
}, [openMenuId]);
|
|
6761
|
+
const handleMenuOpen = (event, menuId) => {
|
|
6762
|
+
if (openMenuId === menuId) {
|
|
6763
|
+
closeMenu();
|
|
6764
|
+
return;
|
|
6765
|
+
}
|
|
6766
|
+
openMenu(menuId, event.currentTarget);
|
|
6767
|
+
};
|
|
6768
|
+
const handleMenuHover = (event, menuId) => {
|
|
6769
|
+
if (isMobile || !openMenuId || openMenuId === menuId) {
|
|
6770
|
+
return;
|
|
6771
|
+
}
|
|
6772
|
+
clearHoverTimeout();
|
|
6773
|
+
hoverTimeoutRef.current = window.setTimeout(() => {
|
|
6774
|
+
openMenu(menuId, event.currentTarget);
|
|
6775
|
+
}, hoverSwitchDelayMs);
|
|
6776
|
+
};
|
|
6777
|
+
const handleMenuKeyDown = (event, menu) => {
|
|
6778
|
+
switch (event.key) {
|
|
6779
|
+
case "Enter":
|
|
6780
|
+
case " ":
|
|
6781
|
+
case "ArrowDown": {
|
|
6782
|
+
if (!menu.items.length) {
|
|
6783
|
+
return;
|
|
6784
|
+
}
|
|
6785
|
+
event.preventDefault();
|
|
6786
|
+
openMenu(menu.id, event.currentTarget);
|
|
6787
|
+
break;
|
|
6788
|
+
}
|
|
6789
|
+
case "ArrowRight":
|
|
6790
|
+
case "ArrowLeft": {
|
|
6791
|
+
event.preventDefault();
|
|
6792
|
+
const adjacentMenu = getAdjacentMenu(menu.id, event.key === "ArrowRight" ? 1 : -1);
|
|
6793
|
+
if (!adjacentMenu) {
|
|
6794
|
+
return;
|
|
6795
|
+
}
|
|
6796
|
+
focusTrigger(adjacentMenu.id);
|
|
6797
|
+
if (openMenuId && adjacentMenu.items.length) {
|
|
6798
|
+
openMenu(adjacentMenu.id);
|
|
6799
|
+
}
|
|
6800
|
+
break;
|
|
6801
|
+
}
|
|
6802
|
+
case "Escape": {
|
|
6803
|
+
if (!openMenuId) {
|
|
6804
|
+
return;
|
|
6805
|
+
}
|
|
6806
|
+
event.preventDefault();
|
|
6807
|
+
closeMenu();
|
|
6808
|
+
focusTrigger(menu.id);
|
|
6809
|
+
break;
|
|
6810
|
+
}
|
|
6811
|
+
}
|
|
6812
|
+
};
|
|
6813
|
+
return (React__default.createElement(React__default.Fragment, null, visibleMenus.map((menu) => {
|
|
6814
|
+
var _a;
|
|
6815
|
+
const isMenuOpen = openMenuId === menu.id;
|
|
6816
|
+
const buttonId = `${menu.id}-trigger`;
|
|
6817
|
+
return menu.items.length > 0 ? (React__default.createElement(React__default.Fragment, { key: menu.id },
|
|
6818
|
+
React__default.createElement(Button, { ref: (node) => {
|
|
6819
|
+
triggerRefs.current[menu.id] = node;
|
|
6820
|
+
}, id: buttonId, "aria-controls": `${menu.id}-menu`, "aria-haspopup": "true", "aria-expanded": isMenuOpen ? "true" : undefined, onClick: (event) => handleMenuOpen(event, menu.id), onMouseEnter: (event) => handleMenuHover(event, menu.id), onMouseLeave: clearHoverTimeout, onKeyDown: (event) => handleMenuKeyDown(event, menu), sx: {
|
|
6821
|
+
marginRight: (theme) => theme.spacing(2),
|
|
6822
|
+
color: "white",
|
|
6823
|
+
display: "flex",
|
|
6824
|
+
alignItems: "center",
|
|
6825
|
+
whiteSpace: "nowrap",
|
|
6826
|
+
} },
|
|
6827
|
+
menu.label,
|
|
6828
|
+
isMenuOpen ? (React__default.createElement(ExpandLess, { sx: { marginLeft: (theme) => theme.spacing(0.5) } })) : (React__default.createElement(ExpandMore, { sx: { marginLeft: (theme) => theme.spacing(0.5) } }))),
|
|
6829
|
+
React__default.createElement(Menu, { id: `${menu.id}-menu`, anchorEl: isMenuOpen ? menuAnchorEl : null, hideBackdrop: true, disableScrollLock: true, keepMounted: true, open: isMenuOpen, onClose: closeMenu, sx: {
|
|
6830
|
+
pointerEvents: "none",
|
|
6831
|
+
"& .MuiPaper-root": {
|
|
6832
|
+
pointerEvents: "auto",
|
|
6833
|
+
},
|
|
6834
|
+
}, MenuListProps: {
|
|
6835
|
+
"aria-labelledby": buttonId,
|
|
6836
|
+
autoFocusItem: isMenuOpen,
|
|
6837
|
+
}, anchorOrigin: {
|
|
6838
|
+
vertical: "bottom",
|
|
6839
|
+
horizontal: "center",
|
|
6840
|
+
}, transformOrigin: {
|
|
6841
|
+
vertical: "top",
|
|
6842
|
+
horizontal: "center",
|
|
6843
|
+
} }, menu.items.map((item, index) => (React__default.createElement(MenuItem, { key: `${menu.id}-item-${item.label}-${index}`, component: Link, to: item.to, onClick: () => {
|
|
6844
|
+
closeMenu();
|
|
6845
|
+
closeDrawer === null || closeDrawer === void 0 ? void 0 : closeDrawer();
|
|
6846
|
+
}, sx: {
|
|
6847
|
+
textDecoration: "none",
|
|
6848
|
+
color: "inherit",
|
|
6849
|
+
} },
|
|
6850
|
+
React__default.createElement(Typography$1, null, item.label))))))) : (React__default.createElement(Button, { key: menu.id, ref: (node) => {
|
|
6851
|
+
triggerRefs.current[menu.id] = node;
|
|
6852
|
+
}, id: buttonId, component: Link, to: (_a = menu.to) !== null && _a !== void 0 ? _a : "#", onClick: () => {
|
|
6853
|
+
closeMenu();
|
|
6854
|
+
closeDrawer === null || closeDrawer === void 0 ? void 0 : closeDrawer();
|
|
6855
|
+
}, onKeyDown: (event) => handleMenuKeyDown(event, menu), sx: {
|
|
6856
|
+
marginRight: (theme) => theme.spacing(2),
|
|
6857
|
+
color: "white",
|
|
6858
|
+
display: "flex",
|
|
6859
|
+
alignItems: "center",
|
|
6860
|
+
whiteSpace: "nowrap",
|
|
6861
|
+
} }, menu.label));
|
|
6862
|
+
})));
|
|
6863
|
+
}
|
|
6864
|
+
|
|
6690
6865
|
const TimeAndUserMenu = () => {
|
|
6691
6866
|
const { getUserName } = useToken();
|
|
6692
6867
|
const [userName, setUserName] = useState(getUserName());
|
|
@@ -9667,7 +9842,7 @@ const ConfigurationContext = createContext([
|
|
|
9667
9842
|
[],
|
|
9668
9843
|
() => React__default.createElement(React__default.Fragment, null),
|
|
9669
9844
|
]);
|
|
9670
|
-
const NavbarContext = createContext(() => React__default.createElement(React__default.Fragment, null));
|
|
9845
|
+
const NavbarContext = createContext(() => (React__default.createElement(React__default.Fragment, null)));
|
|
9671
9846
|
|
|
9672
9847
|
const AreaSelector$1 = lazy(() => Promise.resolve().then(function () { return areaSelector; }).then((mod) => ({
|
|
9673
9848
|
default: mod.AreaSelector,
|
|
@@ -9677,10 +9852,26 @@ function Header({ showAreaSelector = false, showTrendingsV2Icon = true, navbarTi
|
|
|
9677
9852
|
const CustomNavbar = useContext(NavbarContext);
|
|
9678
9853
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
9679
9854
|
const hasPermissionTo = useHasPermission();
|
|
9680
|
-
|
|
9855
|
+
const theme = useTheme();
|
|
9856
|
+
const navContainerRef = useRef(null);
|
|
9857
|
+
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
9858
|
+
const isMobileBreakpoint = useMediaQuery(theme.breakpoints.down("lg"));
|
|
9681
9859
|
const handleDrawerToggle = () => {
|
|
9682
9860
|
setDrawerOpen(!drawerOpen);
|
|
9683
9861
|
};
|
|
9862
|
+
const closeDrawer = () => {
|
|
9863
|
+
setDrawerOpen(false);
|
|
9864
|
+
};
|
|
9865
|
+
useEffect(() => {
|
|
9866
|
+
const container = navContainerRef.current;
|
|
9867
|
+
if (!container)
|
|
9868
|
+
return;
|
|
9869
|
+
const observer = new ResizeObserver(() => {
|
|
9870
|
+
setIsOverflowing(container.scrollWidth > container.offsetWidth);
|
|
9871
|
+
});
|
|
9872
|
+
observer.observe(container);
|
|
9873
|
+
return () => observer.disconnect();
|
|
9874
|
+
}, []);
|
|
9684
9875
|
useEffect(() => {
|
|
9685
9876
|
const handleMenuItemClick = (event) => {
|
|
9686
9877
|
const target = event.target;
|
|
@@ -9698,40 +9889,52 @@ function Header({ showAreaSelector = false, showTrendingsV2Icon = true, navbarTi
|
|
|
9698
9889
|
};
|
|
9699
9890
|
}, []);
|
|
9700
9891
|
const canShowSettings = hasPermissionTo("ui.navbar.settings");
|
|
9892
|
+
const isCompactNavigation = isMobileBreakpoint || isOverflowing;
|
|
9701
9893
|
return (React__default.createElement(React__default.Fragment, null,
|
|
9702
9894
|
React__default.createElement(AppBar, { position: "static", sx: {
|
|
9703
9895
|
backgroundColor: (theme) => theme.palette.primary.main,
|
|
9896
|
+
zIndex: (theme) => theme.zIndex.modal + 1,
|
|
9704
9897
|
} },
|
|
9705
|
-
React__default.createElement(Toolbar, { sx: {
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9898
|
+
React__default.createElement(Toolbar, { sx: {
|
|
9899
|
+
backgroundColor: (theme) => theme.palette.primary.main,
|
|
9900
|
+
minWidth: 0,
|
|
9901
|
+
overflowX: "hidden",
|
|
9902
|
+
} },
|
|
9903
|
+
isCompactNavigation && (React__default.createElement(IconButton$1, { edge: "start", sx: {
|
|
9904
|
+
flexShrink: 0,
|
|
9905
|
+
marginRight: (theme) => theme.spacing(2),
|
|
9906
|
+
textDecoration: "none",
|
|
9907
|
+
color: "white",
|
|
9908
|
+
textWrap: "nowrap",
|
|
9909
|
+
}, color: "inherit", "aria-label": "menu", onClick: handleDrawerToggle },
|
|
9910
|
+
React__default.createElement(MenuIcon, null))),
|
|
9715
9911
|
React__default.createElement(Typography$1, { variant: "h6", component: Link, to: "/home", sx: {
|
|
9716
|
-
|
|
9912
|
+
flexShrink: 0,
|
|
9717
9913
|
marginRight: (theme) => theme.spacing(2),
|
|
9718
9914
|
textDecoration: "none",
|
|
9719
9915
|
color: "white",
|
|
9720
9916
|
textWrap: "nowrap",
|
|
9721
9917
|
} }, navbarTitle),
|
|
9722
|
-
React__default.createElement(Box, { sx: {
|
|
9918
|
+
React__default.createElement(Box, { ref: navContainerRef, sx: {
|
|
9723
9919
|
display: "flex",
|
|
9724
9920
|
flexGrow: 1,
|
|
9921
|
+
minWidth: 0,
|
|
9922
|
+
overflow: "hidden",
|
|
9923
|
+
visibility: isCompactNavigation ? "hidden" : "visible",
|
|
9924
|
+
pointerEvents: isCompactNavigation ? "none" : "auto",
|
|
9725
9925
|
"& a": {
|
|
9726
9926
|
color: "white",
|
|
9727
9927
|
},
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9928
|
+
"& > *": {
|
|
9929
|
+
flexShrink: 0,
|
|
9930
|
+
},
|
|
9931
|
+
}, "aria-hidden": isCompactNavigation },
|
|
9932
|
+
React__default.createElement(CustomNavbar, { closeDrawer: closeDrawer })),
|
|
9731
9933
|
React__default.createElement(Box, { sx: {
|
|
9732
9934
|
display: "flex",
|
|
9733
9935
|
alignItems: "center",
|
|
9734
9936
|
color: "white",
|
|
9937
|
+
flexShrink: 0,
|
|
9735
9938
|
} },
|
|
9736
9939
|
showTrendingsV2Icon && (React__default.createElement(Tooltip, { title: "Trendings V2 (ECharts)", placement: "bottom", arrow: true, enterDelay: 1500 },
|
|
9737
9940
|
React__default.createElement(IconButton$1, { color: "inherit", component: Link, to: "/trendings-v2" },
|
|
@@ -9746,8 +9949,11 @@ function Header({ showAreaSelector = false, showTrendingsV2Icon = true, navbarTi
|
|
|
9746
9949
|
width: 250,
|
|
9747
9950
|
"& .MuiDrawer-paper": {
|
|
9748
9951
|
width: 250,
|
|
9749
|
-
|
|
9750
|
-
height:
|
|
9952
|
+
top: { xs: 56, sm: 64 },
|
|
9953
|
+
height: {
|
|
9954
|
+
xs: "calc(100% - 56px)",
|
|
9955
|
+
sm: "calc(100% - 64px)",
|
|
9956
|
+
},
|
|
9751
9957
|
backgroundColor: (theme) => theme.palette.grey[100], // Light grey background
|
|
9752
9958
|
// Alternatively, you can use a specific color:
|
|
9753
9959
|
// backgroundColor: '#f5f5f5',
|
|
@@ -9766,7 +9972,7 @@ function Header({ showAreaSelector = false, showTrendingsV2Icon = true, navbarTi
|
|
|
9766
9972
|
color: (theme) => theme.palette.text.primary,
|
|
9767
9973
|
},
|
|
9768
9974
|
} },
|
|
9769
|
-
React__default.createElement(CustomNavbar, { isMobile: true }))),
|
|
9975
|
+
React__default.createElement(CustomNavbar, { isMobile: true, closeDrawer: closeDrawer }))),
|
|
9770
9976
|
React__default.createElement(ErrorModal, { error: error, onHide: () => setError("") })));
|
|
9771
9977
|
}
|
|
9772
9978
|
|
|
@@ -15547,7 +15753,7 @@ const getEntries$1 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ shiftI
|
|
|
15547
15753
|
const parameters = [
|
|
15548
15754
|
{ name: "ShiftId", value: shiftId },
|
|
15549
15755
|
];
|
|
15550
|
-
if (assetId) {
|
|
15756
|
+
if (assetId != null) {
|
|
15551
15757
|
parameters.push({ name: "AssetId", value: assetId });
|
|
15552
15758
|
}
|
|
15553
15759
|
const resp = yield apiService.callV2("[LB].[GetEntries]", parameters, signal);
|
|
@@ -15710,6 +15916,7 @@ const useEntries$1 = ({ shiftId, assetId }) => {
|
|
|
15710
15916
|
return useQuery({
|
|
15711
15917
|
queryKey: ["entries", shiftId, assetId],
|
|
15712
15918
|
queryFn: ({ signal }) => getEntries$1({ shiftId, assetId, signal }),
|
|
15919
|
+
enabled: shiftId != null,
|
|
15713
15920
|
});
|
|
15714
15921
|
};
|
|
15715
15922
|
const routeLogbookEntry$1 = "/logbook/entry";
|
|
@@ -15966,7 +16173,7 @@ const AssetsFilter = ({ label = "Asset", value, onChange, filterAreaAssets = fal
|
|
|
15966
16173
|
];
|
|
15967
16174
|
const selectedOption = options.find((option) => option.value === (value || null)) || options[0];
|
|
15968
16175
|
return (React__default.createElement(React__default.Fragment, null,
|
|
15969
|
-
React__default.createElement(Autocomplete, { options: filterAreaAssets ? options.filter((o) => o.isAreaAsset) : options, value: selectedOption, onChange: (event, newValue) => {
|
|
16176
|
+
React__default.createElement(Autocomplete, { size: "small", options: filterAreaAssets ? options.filter((o) => o.isAreaAsset) : options, value: selectedOption, onChange: (event, newValue) => {
|
|
15970
16177
|
var _a;
|
|
15971
16178
|
if (newValue) {
|
|
15972
16179
|
onChange((_a = newValue.value) !== null && _a !== void 0 ? _a : null);
|
|
@@ -17249,7 +17456,7 @@ const getEntriesReport$1 = (params, signal) => __awaiter(void 0, void 0, void 0,
|
|
|
17249
17456
|
{ name: "StartShiftId", value: params.startShiftId },
|
|
17250
17457
|
{ name: "EndShiftId", value: params.endShiftId },
|
|
17251
17458
|
];
|
|
17252
|
-
if (params.assetId) {
|
|
17459
|
+
if (params.assetId != null) {
|
|
17253
17460
|
parameters.push({ name: "AssetId", value: params.assetId });
|
|
17254
17461
|
}
|
|
17255
17462
|
const resp = yield apiService.callV2("[LB].[GetEntries]", parameters);
|
|
@@ -17271,7 +17478,7 @@ const useEntriesReport$1 = ({ startShiftId, endShiftId, assetId, }) => {
|
|
|
17271
17478
|
return useQuery({
|
|
17272
17479
|
queryKey: ["entriesReport", startShiftId, endShiftId, assetId],
|
|
17273
17480
|
queryFn: ({ signal }) => getEntriesReport$1({ startShiftId, endShiftId, assetId }),
|
|
17274
|
-
enabled: !!startShiftId && !!endShiftId &&
|
|
17481
|
+
enabled: !!startShiftId && !!endShiftId && assetId != null,
|
|
17275
17482
|
});
|
|
17276
17483
|
};
|
|
17277
17484
|
const routeLogbookReport = "/logbook/report";
|
|
@@ -17486,12 +17693,13 @@ const Filters$2 = ({ withAssetFilter, filterAssets, quickFilter, onQuickFilterCh
|
|
|
17486
17693
|
React__default.createElement(Grid2, { size: { xs: 12 }, alignItems: "center", justifyContent: "center" },
|
|
17487
17694
|
React__default.createElement(ShiftPeriodNavigatorControl, { onChange: handleShiftPeriodChange, value: shiftPeriod, actualPeriod: actualPeriod, showShiftAndCrews: false, dateFormat: "MM/DD/YYYY", periodOptions: customPeriodOptions$1 })),
|
|
17488
17695
|
React__default.createElement(Grid2, { size: { xs: 12, md: withAssetFilter ? 6 : 12 } },
|
|
17489
|
-
React__default.createElement(TextField, { fullWidth: true, label: "Search", variant: "outlined", size: "small",
|
|
17696
|
+
React__default.createElement(TextField, { fullWidth: true, label: "Search", variant: "outlined", size: "small", value: quickFilter, onChange: (event) => {
|
|
17490
17697
|
onQuickFilterChange(event === null || event === void 0 ? void 0 : event.target.value);
|
|
17491
|
-
},
|
|
17492
|
-
|
|
17493
|
-
React__default.createElement(
|
|
17494
|
-
React__default.createElement(SearchIcon,
|
|
17698
|
+
}, slotProps: {
|
|
17699
|
+
input: {
|
|
17700
|
+
startAdornment: (React__default.createElement(InputAdornment, { position: "start" },
|
|
17701
|
+
React__default.createElement(SearchIcon, { fontSize: "small" }))),
|
|
17702
|
+
},
|
|
17495
17703
|
} })),
|
|
17496
17704
|
withAssetFilter === "tree" && assets && (React__default.createElement(Grid2, { size: { xs: 12, md: 6 }, style: {
|
|
17497
17705
|
alignItems: "center",
|
|
@@ -17501,7 +17709,6 @@ const Filters$2 = ({ withAssetFilter, filterAssets, quickFilter, onQuickFilterCh
|
|
|
17501
17709
|
withAssetFilter === "selector" && (React__default.createElement(Grid2, { size: { xs: 12, md: 6 }, style: {
|
|
17502
17710
|
alignItems: "center",
|
|
17503
17711
|
justifyContent: "center",
|
|
17504
|
-
marginTop: 6,
|
|
17505
17712
|
} },
|
|
17506
17713
|
React__default.createElement(AssetsFilter, { value: assetId !== null && assetId !== void 0 ? assetId : null, onChange: (newValue) => {
|
|
17507
17714
|
setAssetId(newValue !== null && newValue !== void 0 ? newValue : null);
|
|
@@ -20267,5 +20474,5 @@ var areaSelector = /*#__PURE__*/Object.freeze({
|
|
|
20267
20474
|
AreaSelector: AreaSelector
|
|
20268
20475
|
});
|
|
20269
20476
|
|
|
20270
|
-
export { Account, AssetProvider, AssetTreePicker, AuthContext, AuthProvider, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CreateNewAssetDialog, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ENTRY_INITIAL_VALUES$1 as ENTRY_INITIAL_VALUES, EditAssetDialog, ErrorModal, ExcelIcon, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, LogbookSettingsInitialState, LogbookSettingsProvider, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry$1 as MESFLogbookEntry, MESFLogbookReport$1 as MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, RemoveAssetDialog, SPExecutorPage, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getEntries$1 as getEntries, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, logbookNavbar, logbookRoutesMESF, renewToken, routeLogbookEntry$1 as routeLogbookEntry, routeLogbookReport, useSearchAssets as searchAssets, sectionLogbookNavbar, sectionLogbookRoutesMESF, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useEntries$1 as useEntries, useFrontendVersionCheck, useHasPermission, useHasProfile, useLogbookSettings, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useToken, useUTLSettingsContext, useUserContext };
|
|
20477
|
+
export { Account, AssetProvider, AssetTreePicker, AuthContext, AuthProvider, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CreateNewAssetDialog, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ENTRY_INITIAL_VALUES$1 as ENTRY_INITIAL_VALUES, EditAssetDialog, ErrorModal, ExcelIcon, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, LogbookSettingsInitialState, LogbookSettingsProvider, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry$1 as MESFLogbookEntry, MESFLogbookReport$1 as MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NavbarMenuBar, NumberFormatter, RemoveAssetDialog, SPExecutorPage, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getEntries$1 as getEntries, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, logbookNavbar, logbookRoutesMESF, renewToken, routeLogbookEntry$1 as routeLogbookEntry, routeLogbookReport, useSearchAssets as searchAssets, sectionLogbookNavbar, sectionLogbookRoutesMESF, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useEntries$1 as useEntries, useFrontendVersionCheck, useHasPermission, useHasProfile, useLogbookSettings, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useToken, useUTLSettingsContext, useUserContext };
|
|
20271
20478
|
//# sourceMappingURL=index.esm.js.map
|