@visns-studio/visns-components 3.2.0 → 3.2.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.
@@ -14,7 +14,6 @@ import numeral from 'numeral';
14
14
  import Popup from 'reactjs-popup';
15
15
  import parse from 'html-react-parser';
16
16
  import { saveAs } from 'file-saver';
17
- import pluralize from 'pluralize';
18
17
  import NumberFilter from '@inovua/reactdatagrid-community/NumberFilter';
19
18
  import SelectFilter from '@inovua/reactdatagrid-community/SelectFilter';
20
19
  import DateFilter from '@inovua/reactdatagrid-community/DateFilter';
@@ -721,7 +720,11 @@ const DataGrid = forwardRef(
721
720
  return (
722
721
  <div
723
722
  className="filterInput--alt"
724
- style={{ height: '58px' }}
723
+ style={{
724
+ height: style.data_grid_search_height
725
+ ? style.data_grid_search_height
726
+ : '58px',
727
+ }}
725
728
  ></div>
726
729
  );
727
730
  }
@@ -193,10 +193,21 @@ function Navigation({
193
193
  );
194
194
  };
195
195
 
196
+ const getFirstRolePermissions = () => {
197
+ if (
198
+ userProfile.roles &&
199
+ userProfile.roles.length > 0 &&
200
+ userProfile.roles[0].permissions.length > 0
201
+ ) {
202
+ return userProfile.roles[0].permissions.map(
203
+ (permission) => permission.name
204
+ );
205
+ }
206
+ return [];
207
+ };
208
+
196
209
  useEffect(() => {
197
- const permissions = userProfile.roles[0].permissions.map(
198
- (permission) => permission.name
199
- );
210
+ const permissions = getFirstRolePermissions();
200
211
 
201
212
  setNavData((prevNavData) => {
202
213
  const updatePermissions = (nav) => {
package/package.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "react-dom": "^17.0.1"
50
50
  },
51
51
  "name": "@visns-studio/visns-components",
52
- "version": "3.2.0",
52
+ "version": "3.2.2",
53
53
  "description": "Various packages to assist in the development of our Custom Applications.",
54
54
  "main": "index.js",
55
55
  "scripts": {