@campxdev/react-blueprint 1.5.8 → 1.5.9
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,4 +1,4 @@
|
|
|
1
|
-
import { Box, Divider,
|
|
1
|
+
import { Box, Divider, Stack, useTheme } from '@mui/material';
|
|
2
2
|
import { GridColDef } from '@mui/x-data-grid';
|
|
3
3
|
import { motion } from 'framer-motion';
|
|
4
4
|
import { ReactNode, useState } from 'react';
|
|
@@ -6,14 +6,9 @@ import {
|
|
|
6
6
|
DensitySelector,
|
|
7
7
|
Icons,
|
|
8
8
|
TableColumnsSelector,
|
|
9
|
-
TextField,
|
|
10
9
|
Typography,
|
|
11
10
|
} from '../../export';
|
|
12
|
-
import {
|
|
13
|
-
ColumnsAnchor,
|
|
14
|
-
FiltersAnchor,
|
|
15
|
-
SearchAnchor,
|
|
16
|
-
} from './components/Anchors';
|
|
11
|
+
import { ColumnsAnchor } from './components/Anchors';
|
|
17
12
|
|
|
18
13
|
interface PageHeaderProps {
|
|
19
14
|
uniqueId: string;
|
|
@@ -91,15 +86,15 @@ export const PageHeader = ({
|
|
|
91
86
|
justifyContent="space-between"
|
|
92
87
|
>
|
|
93
88
|
{columns ? <ViewTab title="Default View" /> : viewsSlot}
|
|
94
|
-
<Stack direction="row" alignItems="center"
|
|
95
|
-
{columns && (
|
|
89
|
+
<Stack direction="row" alignItems="center">
|
|
90
|
+
{/* {columns && (
|
|
96
91
|
<FiltersAnchor
|
|
97
92
|
handleClick={() => {
|
|
98
93
|
setExpanded(!expanded);
|
|
99
94
|
}}
|
|
100
95
|
showDot={false}
|
|
101
96
|
/>
|
|
102
|
-
)}
|
|
97
|
+
)} */}
|
|
103
98
|
{columns && (
|
|
104
99
|
<ColumnsAnchor
|
|
105
100
|
handleClick={() => {
|
|
@@ -108,7 +103,7 @@ export const PageHeader = ({
|
|
|
108
103
|
showDot={false}
|
|
109
104
|
/>
|
|
110
105
|
)}
|
|
111
|
-
<motion.div
|
|
106
|
+
{/* <motion.div
|
|
112
107
|
variants={motionTextFieldVariants}
|
|
113
108
|
animate={expandedSearch ? 'expanded' : 'collapsed'}
|
|
114
109
|
transition={{ duration: 0.3 }}
|
|
@@ -135,7 +130,7 @@ export const PageHeader = ({
|
|
|
135
130
|
autoFocus
|
|
136
131
|
/>
|
|
137
132
|
)}
|
|
138
|
-
</motion.div>
|
|
133
|
+
</motion.div> */}
|
|
139
134
|
{columns && <DensitySelector uniqueId={uniqueId} />}
|
|
140
135
|
{actions?.map((action, index) => action)}
|
|
141
136
|
</Stack>
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { GridColumnVisibilityModel, GridDensity } from '@mui/x-data-grid';
|
|
1
2
|
import { useRef } from 'react';
|
|
2
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
4
|
import { v4 } from 'uuid';
|
|
4
|
-
import {
|
|
5
|
-
PageHeaderState,
|
|
6
|
-
resetStateForUniqueId,
|
|
7
|
-
} from '../redux/slices/pageHeaderSlice';
|
|
5
|
+
import { resetStateForUniqueId } from '../redux/slices/pageHeaderSlice';
|
|
8
6
|
import { RootState } from '../redux/store';
|
|
9
7
|
|
|
10
8
|
export const usePageHeader = () => {
|
|
@@ -12,7 +10,11 @@ export const usePageHeader = () => {
|
|
|
12
10
|
const dispatch = useDispatch();
|
|
13
11
|
const filterState = useSelector(
|
|
14
12
|
(state: RootState) =>
|
|
15
|
-
state.pageHeaderSlice[uuidRef.current] ||
|
|
13
|
+
state.pageHeaderSlice[uuidRef.current] ||
|
|
14
|
+
({} as {
|
|
15
|
+
density: GridDensity;
|
|
16
|
+
columnVisibilityModel: GridColumnVisibilityModel;
|
|
17
|
+
}),
|
|
16
18
|
);
|
|
17
19
|
|
|
18
20
|
const resetState = () => {
|