grep-components 1.20.0-grepf-1803.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.
@@ -36,7 +36,6 @@ export interface GrepTableProps<T> extends Pick<TableProps, 'size' | 'stickyHead
36
36
  onContextIdChanged?: (row: T) => void;
37
37
  onSortBy?: (col: TableColumn<T>) => any;
38
38
  caption?: React.ReactNode;
39
- menuButtonLabel?: string;
40
39
  /**
41
40
  * @deprecated No longer in use.
42
41
  */
@@ -65,6 +64,6 @@ export declare const useStyles: (params: StyleProps, styleOverrides?: {
65
64
  * @todo enhance page handling
66
65
  *
67
66
  */
68
- export declare const GrepTable: <T>({ placeholderText, dropdownItems, isRowDisabled, pagination, outlined, columns, header, data, onSelectedRowChange, sortBy, sortDirection, onSortBy, onRowClick, size, caption, stickyHeader, padding, disableSelectOnClick, menuButtonLabel, ...props }: GrepTableProps<T>) => JSX.Element;
67
+ export declare const GrepTable: <T>({ placeholderText, dropdownItems, isRowDisabled, pagination, outlined, columns, header, data, onSelectedRowChange, sortBy, sortDirection, onSortBy, onRowClick, size, caption, stickyHeader, padding, disableSelectOnClick, ...props }: GrepTableProps<T>) => JSX.Element;
69
68
  export { GrepTableRow };
70
69
  export default GrepTable;
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, { button: true, divider: true, key: page.id, onClick: function () { return props.onPageClick(page); } },
3332
- page.linkIcon && React.createElement(ListItemIcon$1, null, page.linkIcon),
3333
- React.createElement(ListItemText, { primary: page.label }))); }))));
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) {
@@ -3546,7 +3547,7 @@ var getElementIndex = function (el) {
3546
3547
  *
3547
3548
  */
3548
3549
  var GrepTable = function (_a) {
3549
- var placeholderText = _a.placeholderText, dropdownItems = _a.dropdownItems, isRowDisabled = _a.isRowDisabled, pagination = _a.pagination, outlined = _a.outlined, columns = _a.columns, header = _a.header, data = _a.data, onSelectedRowChange = _a.onSelectedRowChange, sortBy = _a.sortBy, sortDirection = _a.sortDirection, onSortBy = _a.onSortBy, onRowClick = _a.onRowClick, size = _a.size, caption = _a.caption, stickyHeader = _a.stickyHeader, padding = _a.padding, _b = _a.disableSelectOnClick, disableSelectOnClick = _b === void 0 ? false : _b, menuButtonLabel = _a.menuButtonLabel, props = __rest$1(_a, ["placeholderText", "dropdownItems", "isRowDisabled", "pagination", "outlined", "columns", "header", "data", "onSelectedRowChange", "sortBy", "sortDirection", "onSortBy", "onRowClick", "size", "caption", "stickyHeader", "padding", "disableSelectOnClick", "menuButtonLabel"]);
3550
+ var placeholderText = _a.placeholderText, dropdownItems = _a.dropdownItems, isRowDisabled = _a.isRowDisabled, pagination = _a.pagination, outlined = _a.outlined, columns = _a.columns, header = _a.header, data = _a.data, onSelectedRowChange = _a.onSelectedRowChange, sortBy = _a.sortBy, sortDirection = _a.sortDirection, onSortBy = _a.onSortBy, onRowClick = _a.onRowClick, size = _a.size, caption = _a.caption, stickyHeader = _a.stickyHeader, padding = _a.padding, _b = _a.disableSelectOnClick, disableSelectOnClick = _b === void 0 ? false : _b, props = __rest$1(_a, ["placeholderText", "dropdownItems", "isRowDisabled", "pagination", "outlined", "columns", "header", "data", "onSelectedRowChange", "sortBy", "sortDirection", "onSortBy", "onRowClick", "size", "caption", "stickyHeader", "padding", "disableSelectOnClick"]);
3550
3551
  var _c = __read(React__default.useState(props.rowsPerPage || 10), 2), rowsPerPage = _c[0], setRowsPerPage = _c[1];
3551
3552
  var _d = __read(React__default.useState(null), 2), menuAnchor = _d[0], setMenuAnchor = _d[1];
3552
3553
  var _e = __read(React__default.useState(0), 2), currentPage = _e[0], _setCurrentPage = _e[1];
@@ -3625,7 +3626,7 @@ var GrepTable = function (_a) {
3625
3626
  e.preventDefault();
3626
3627
  break;
3627
3628
  }
3628
- }, tabIndex: 0, size: "large", "aria-label": menuButtonLabel !== null && menuButtonLabel !== void 0 ? menuButtonLabel : 'Åpne meny' },
3629
+ }, tabIndex: 0, size: "large" },
3629
3630
  React__default.createElement(MoreVert, null)))));
3630
3631
  };
3631
3632
  var _renderRow = function (row, index) {