@campxdev/react-blueprint 1.6.3 → 1.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -63,4 +63,6 @@ export const CellContainer = styled(Stack)(({ theme }) => ({
63
63
  alignItems: 'center',
64
64
  height: '100%',
65
65
  flexDirection: 'row',
66
+ justifyContent: 'flex-start',
67
+ gap: '12px',
66
68
  }));
@@ -2,7 +2,8 @@ import { MenuListProps, MenuProps, Stack, useTheme } from '@mui/material';
2
2
  import { GridDensity } from '@mui/x-data-grid';
3
3
  import { capitalize } from 'lodash';
4
4
  import { useDispatch, useSelector } from 'react-redux';
5
- import { RootState, setDensity } from '../../../../../redux/export';
5
+ import { setDensity } from '../../../../../redux/slices/pageHeaderSlice';
6
+ import { RootState } from '../../../../../redux/store';
6
7
  import { Button, DropdownMenu, Icons, Typography } from '../../../../export';
7
8
  import { DensityAnchor } from '../Anchors';
8
9
 
@@ -18,8 +19,7 @@ export const DensitySelector = ({
18
19
  }: DensitySelectorProps) => {
19
20
  const dispatch = useDispatch();
20
21
  const density = useSelector(
21
- (state: RootState) =>
22
- state.pageHeaderSlice[uniqueId]?.density || 'standard',
22
+ (state: RootState) => state.pageHeader[uniqueId]?.density || 'standard',
23
23
  );
24
24
  const gridDensity: GridDensity[] = ['compact', 'standard', 'comfortable'];
25
25
 
@@ -3,10 +3,8 @@ import { MenuListProps, MenuProps, Typography, useTheme } from '@mui/material';
3
3
  import { GridColDef, GridColumnVisibilityModel } from '@mui/x-data-grid';
4
4
  import { useState } from 'react';
5
5
  import { useDispatch, useSelector } from 'react-redux';
6
- import {
7
- RootState,
8
- setColumnVisibilityModel,
9
- } from '../../../../../redux/export';
6
+ import { setColumnVisibilityModel } from '../../../../../redux/slices/pageHeaderSlice';
7
+ import { RootState } from '../../../../../redux/store';
10
8
  import { Button, Icons, SearchBar, SingleCheckBox } from '../../../../export';
11
9
  import { DropdownMenu } from '../../../../Navigation/export';
12
10
 
@@ -26,7 +24,7 @@ export const TableColumnsSelector = ({
26
24
 
27
25
  const columnVisibilityModel = useSelector(
28
26
  (state: RootState) =>
29
- state.pageHeaderSlice[uniqueId]?.columnVisibilityModel ||
27
+ state.pageHeader[uniqueId]?.columnVisibilityModel ||
30
28
  columns.reduce((acc, column) => {
31
29
  acc[column.field] = true;
32
30
  return acc;
@@ -10,7 +10,7 @@ export const usePageHeader = () => {
10
10
  const dispatch = useDispatch();
11
11
  const filterState = useSelector(
12
12
  (state: RootState) =>
13
- state.pageHeaderSlice[uuidRef.current] ||
13
+ state.pageHeader[uuidRef.current] ||
14
14
  ({} as {
15
15
  density: GridDensity;
16
16
  columnVisibilityModel: GridColumnVisibilityModel;
@@ -1,2 +1 @@
1
- export * from './slices/pageHeaderSlice';
2
- export * from './store';
1
+ export * from './reducers';
@@ -0,0 +1,5 @@
1
+ import { pageHeaderSlice } from './slices/pageHeaderSlice';
2
+
3
+ export const reactBlueprintReducers = {
4
+ pageHeader: pageHeaderSlice.reducer,
5
+ };
@@ -10,7 +10,7 @@ export type PageHeaderState = {
10
10
 
11
11
  const initialState: PageHeaderState = {};
12
12
 
13
- const pageHeaderSlice = createSlice({
13
+ export const pageHeaderSlice = createSlice({
14
14
  name: 'pageHeader',
15
15
  initialState,
16
16
  reducers: {
@@ -31,5 +31,3 @@ const pageHeaderSlice = createSlice({
31
31
 
32
32
  export const { setColumnVisibilityModel, setDensity, resetStateForUniqueId } =
33
33
  pageHeaderSlice.actions;
34
-
35
- export default pageHeaderSlice.reducer;
@@ -1,10 +1,8 @@
1
- import { configureStore } from '@reduxjs/toolkit';
2
- import pageHeaderSlice from './slices/pageHeaderSlice';
1
+ import { combineReducers, configureStore } from '@reduxjs/toolkit';
2
+ import { reactBlueprintReducers } from './reducers';
3
3
 
4
4
  export const store = configureStore({
5
- reducer: {
6
- pageHeaderSlice,
7
- },
5
+ reducer: combineReducers(reactBlueprintReducers),
8
6
  });
9
7
 
10
8
  export type RootState = ReturnType<typeof store.getState>;