grep-components 1.20.0-grepf-1808.1 → 1.20.0-grepf-1818.1
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/components/AppBar/types.d.ts +0 -1
- package/dist/index.js +18 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as React from 'react';
|
|
|
7
7
|
import React__default, { useRef, useContext, createContext, createElement, Fragment, forwardRef, useMemo as useMemo$1, useState, useCallback as useCallback$1, useEffect, useLayoutEffect } from 'react';
|
|
8
8
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
9
9
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
10
|
-
import { Button, Box, Typography, IconButton, Menu, MenuItem, Tabs, Tab, Collapse, MenuList, Tooltip, Container, List, ListItem, ListItemText, ListItemIcon, Divider, styled, TableCell, TableRow, TableSortLabel, TableHead, TablePagination, TableContainer, Table, TableBody, TableFooter, CircularProgress, Link, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, Grid, ToggleButtonGroup, AppBar as AppBar$1, Toolbar as Toolbar$1, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
10
|
+
import { Button, Box, Typography, IconButton, Menu, MenuItem, Tabs, Tab, Collapse, MenuList, Tooltip, Container, List, ListItem, ListItemText, ListItemIcon, Divider, ListItemButton, styled, TableCell, TableRow, TableSortLabel, TableHead, TablePagination, TableContainer, Table, TableBody, TableFooter, CircularProgress, Link, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, Grid, ToggleButtonGroup, AppBar as AppBar$1, Toolbar as Toolbar$1, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
11
11
|
import { useTheme } from '@mui/material/styles';
|
|
12
12
|
import { useHistory, NavLink, Prompt } from 'react-router-dom';
|
|
13
13
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
@@ -3328,9 +3328,10 @@ var ContainedLinkList = function (props) {
|
|
|
3328
3328
|
var classes = useStyles$e().classes;
|
|
3329
3329
|
return (React.createElement(Box, { className: classes.container, style: props.style },
|
|
3330
3330
|
React.createElement(Typography, { className: classes.title }, props.title),
|
|
3331
|
-
React.createElement(List, { style: { padding: 0 } }, props.pages.map(function (page) { return (React.createElement(ListItem, {
|
|
3332
|
-
|
|
3333
|
-
|
|
3331
|
+
React.createElement(List, { style: { padding: 0 } }, props.pages.map(function (page) { return (React.createElement(ListItem, { divider: true, key: page.id, disablePadding: true },
|
|
3332
|
+
React.createElement(ListItemButton, { onClick: function () { return props.onPageClick(page); } },
|
|
3333
|
+
page.linkIcon && React.createElement(ListItemIcon$1, null, page.linkIcon),
|
|
3334
|
+
React.createElement(ListItemText, { primary: page.label })))); }))));
|
|
3334
3335
|
};
|
|
3335
3336
|
|
|
3336
3337
|
var OverflowTooltip = /** @class */ (function (_super) {
|
|
@@ -20872,6 +20873,7 @@ var AppBar = function (_a) {
|
|
|
20872
20873
|
var username = _a.username, currentPath = _a.currentPath, isProd = _a.isProd, appTitle = _a.appTitle, userMenuItems = _a.userMenuItems, menuItems = _a.menuItems, userRole = _a.userRole, colors = _a.colors;
|
|
20873
20874
|
var _b = __read(React.useState(null), 2), userMenuAnchor = _b[0], setUserMenuAnchor = _b[1];
|
|
20874
20875
|
var _handleIconButtonClick = function (event) {
|
|
20876
|
+
event.preventDefault();
|
|
20875
20877
|
setUserMenuAnchor(event.currentTarget);
|
|
20876
20878
|
};
|
|
20877
20879
|
var _handleCloseUserMenu = function () {
|
|
@@ -20883,24 +20885,6 @@ var AppBar = function (_a) {
|
|
|
20883
20885
|
: currentPath.includes(page.redirectUrl || '');
|
|
20884
20886
|
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0 }, page === null || page === void 0 ? void 0 : page.translatedTextRef));
|
|
20885
20887
|
};
|
|
20886
|
-
var renderMenuItems = function () {
|
|
20887
|
-
var newItemList = [];
|
|
20888
|
-
userMenuItems.forEach(function (item, index) {
|
|
20889
|
-
newItemList.push(item);
|
|
20890
|
-
if (userMenuItems.length > index + 1) {
|
|
20891
|
-
newItemList.push({ isDivider: true, id: '', label: '' });
|
|
20892
|
-
}
|
|
20893
|
-
});
|
|
20894
|
-
return newItemList.map(function (i, index) {
|
|
20895
|
-
return i.isDivider ? (React.createElement(Divider$1, { key: index })) : (React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
20896
|
-
setUserMenuAnchor(null);
|
|
20897
|
-
i.action && i.action();
|
|
20898
|
-
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
20899
|
-
textDecoration: 'inherit',
|
|
20900
|
-
color: 'inherit',
|
|
20901
|
-
}, tabIndex: -1, rel: "noreferrer", href: i.href, onClick: i.onClick }, i.label)) : (i.label)));
|
|
20902
|
-
});
|
|
20903
|
-
};
|
|
20904
20888
|
return (React.createElement(Toolbar, null,
|
|
20905
20889
|
React.createElement(ToolbarFixer, null,
|
|
20906
20890
|
React.createElement(ToolbarInner, { colors: colors, role: "banner" },
|
|
@@ -20909,7 +20893,7 @@ var AppBar = function (_a) {
|
|
|
20909
20893
|
appTitle,
|
|
20910
20894
|
!isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
|
|
20911
20895
|
React.createElement(ToolbarRight, null,
|
|
20912
|
-
React.createElement(Button$1, {
|
|
20896
|
+
React.createElement(Button$1, { onClick: _handleIconButtonClick },
|
|
20913
20897
|
React.createElement(AccountCircle, { color: "primary", fontSize: "large" }),
|
|
20914
20898
|
React.createElement(UserContainer, null,
|
|
20915
20899
|
React.createElement(AccountName, null, username),
|
|
@@ -20921,7 +20905,17 @@ var AppBar = function (_a) {
|
|
|
20921
20905
|
}, transformOrigin: {
|
|
20922
20906
|
vertical: 'top',
|
|
20923
20907
|
horizontal: 'center',
|
|
20924
|
-
} },
|
|
20908
|
+
} }, userMenuItems.map(function (i, index) {
|
|
20909
|
+
return (React.createElement(Box, { key: i.id },
|
|
20910
|
+
React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
20911
|
+
setUserMenuAnchor(null);
|
|
20912
|
+
i.action && i.action();
|
|
20913
|
+
} }, i.isAnchor ? (React.createElement("a", { style: {
|
|
20914
|
+
textDecoration: 'inherit',
|
|
20915
|
+
color: 'inherit',
|
|
20916
|
+
}, rel: "noreferrer", href: i.href, onClick: i.onClick }, i.label)) : (i.label)),
|
|
20917
|
+
userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
|
|
20918
|
+
})))),
|
|
20925
20919
|
React.createElement(ToolbarMenu, { role: "navigation" },
|
|
20926
20920
|
React.createElement(ToolbarMenuInner, null, menuItems.map(function (page) { return _renderToolbarMenuItem(page); }))),
|
|
20927
20921
|
React.createElement(MobileAppBar, { menuItems: menuItems, userMenuItems: userMenuItems, colors: colors }))));
|