cloudmr-ux 3.0.4 → 3.0.6

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.
@@ -11,7 +11,8 @@ interface HeaderProps {
11
11
  menuList: MenuItem[];
12
12
  siteLogo: string;
13
13
  dropdownMenuItems?: DropdownMenuItem[];
14
+ headerColor?: string;
14
15
  }
15
- declare const Header: ({ menuList, siteLogo, dropdownMenuItems }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const Header: ({ menuList, siteLogo, dropdownMenuItems, headerColor }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
16
17
  export default Header;
17
18
  export type { MenuItem, DropdownMenuItem };
@@ -18,13 +18,13 @@ import { Container, Toolbar } from "@mui/material";
18
18
  import { useAppDispatch, useAppSelector } from "../../core/store/hooks";
19
19
  import { signOut } from "../../core/features/authenticate/authenticateActionCreation";
20
20
  var Header = function (_a) {
21
- var menuList = _a.menuList, siteLogo = _a.siteLogo, _b = _a.dropdownMenuItems, dropdownMenuItems = _b === void 0 ? [] : _b;
21
+ var menuList = _a.menuList, siteLogo = _a.siteLogo, _b = _a.dropdownMenuItems, dropdownMenuItems = _b === void 0 ? [] : _b, _c = _a.headerColor, headerColor = _c === void 0 ? "#390063" : _c;
22
22
  var config = getAppConfig();
23
23
  var navigate = useNavigate();
24
24
  var dispatch = useAppDispatch();
25
25
  var authentication = useAppSelector(function (state) { return state.authenticate; });
26
26
  var currPath = navigate.name;
27
- var _c = useState(config.APP_NAME), menuSelect = _c[0], setMenuSelect = _c[1];
27
+ var _d = useState(config.APP_NAME), menuSelect = _d[0], setMenuSelect = _d[1];
28
28
  var email = authentication.email;
29
29
  var handleLogout = function () {
30
30
  dispatch(signOut());
@@ -52,7 +52,7 @@ var Header = function (_a) {
52
52
  return false;
53
53
  };
54
54
  return (_jsx("nav", __assign({ className: "navbar navbar-expand-md navbar-dark bg-dark shadow-sm", style: {
55
- background: "#390063",
55
+ background: headerColor,
56
56
  paddingTop: "10px",
57
57
  paddingBottom: "10px"
58
58
  } }, { children: _jsx(Container, __assign({ maxWidth: "lg" }, { children: _jsxs(Toolbar, __assign({ sx: {
@@ -8,6 +8,9 @@ export interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
8
8
  name?: string;
9
9
  style?: CSSProperties;
10
10
  showCheckbox?: boolean;
11
+ headerBgColor?: string;
12
+ headerTextColor?: string;
13
+ headerIconColor?: string;
11
14
  }
12
15
  declare const CmrTable: React.FC<CmrTableProps>;
13
16
  export default CmrTable;
@@ -24,7 +24,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import './CmrTable.css';
25
25
  import { DataGrid } from '@mui/x-data-grid';
26
26
  var CmrTable = function (props) {
27
- var dataSource = props.dataSource, columns = props.columns, idAlias = props.idAlias, className = props.className, onRowSelectionModelChange = props.onRowSelectionModelChange, style = props.style, _a = props.showCheckbox, showCheckbox = _a === void 0 ? true : _a, rest = __rest(props, ["dataSource", "columns", "idAlias", "className", "onRowSelectionModelChange", "style", "showCheckbox"]);
27
+ var dataSource = props.dataSource, columns = props.columns, idAlias = props.idAlias, className = props.className, onRowSelectionModelChange = props.onRowSelectionModelChange, style = props.style, _a = props.showCheckbox, showCheckbox = _a === void 0 ? true : _a, _b = props.headerBgColor, headerBgColor = _b === void 0 ? '#F3E5F5' : _b, _c = props.headerTextColor, headerTextColor = _c === void 0 ? '#333' : _c, _d = props.headerIconColor, headerIconColor = _d === void 0 ? '#580f8b' : _d, rest = __rest(props, ["dataSource", "columns", "idAlias", "className", "onRowSelectionModelChange", "style", "showCheckbox", "headerBgColor", "headerTextColor", "headerIconColor"]);
28
28
  return (_jsx("div", __assign({ style: style !== null && style !== void 0 ? style : { height: '400px', width: '100%' }, className: className !== null && className !== void 0 ? className : '' }, { children: _jsx(DataGrid, __assign({ rows: dataSource
29
29
  ? dataSource.map(function (row) { return (__assign({ id: idAlias ? row[idAlias] : row['id'] }, row)); })
30
30
  : [], columns: columns, checkboxSelection: showCheckbox, onRowSelectionModelChange: onRowSelectionModelChange, initialState: {
@@ -33,11 +33,11 @@ var CmrTable = function (props) {
33
33
  }
34
34
  }, sx: {
35
35
  '& .MuiDataGrid-columnHeaders': {
36
- backgroundColor: '#F3E5F5',
37
- color: '#333'
36
+ backgroundColor: headerBgColor,
37
+ color: headerTextColor
38
38
  },
39
39
  '& .MuiDataGrid-columnHeaders .MuiSvgIcon-root': {
40
- color: '#580f8b'
40
+ color: headerIconColor
41
41
  },
42
42
  '& .MuiDataGrid-columnHeaderTitle': {
43
43
  fontWeight: 'bold'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",