trithuc-mvc-react 3.1.2 → 3.1.3

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.
@@ -1,5 +1,5 @@
1
1
  import { Box, useMediaQuery, useTheme } from "@mui/material";
2
- import Grid from "@mui/material/Unstable_Grid2";
2
+ import { Grid } from "@mui/material";
3
3
  import PropTypes from "prop-types";
4
4
  import { FormProvider, useForm } from "react-hook-form";
5
5
 
@@ -185,7 +185,7 @@ function EditorForm({ fields, submitRef }) {
185
185
  ...rest
186
186
  }) => {
187
187
  return (
188
- <Grid item md={size?.md} xs={size?.xs} sm={size?.sm} key={field}>
188
+ <Grid md={size?.md} xs={size?.xs} sm={size?.sm} key={field}>
189
189
  <FormField
190
190
  type={type}
191
191
  label={label}
@@ -1,5 +1,5 @@
1
1
  import { Accordion, AccordionSummary, Box, IconButton, Slider, Typography } from "@mui/material";
2
- import Grid from "@mui/material/Unstable_Grid2";
2
+ import { Grid } from "@mui/material";
3
3
  import { useFormContext } from "react-hook-form";
4
4
  import { FilterElement } from "./FilterElement";
5
5
  import { useDataTable } from "./hooks";
@@ -36,16 +36,22 @@ export const FilterGod = ({ tableName, filters, elementSize = "small", setPage =
36
36
  <AccordionSummary
37
37
  sx={{
38
38
  minHeight: 40,
39
+ "&.Mui-expanded": {
40
+ minHeight: 40
41
+ },
39
42
  "& .MuiAccordionSummary-content": {
40
- my: 1
43
+ my: 0.5
41
44
  }
42
45
  }}
43
- expandIcon={<ExpandMoreIcon />}
46
+ expandIcon={<ExpandMoreIcon sx={{ fontSize: "0.95rem", minHeight: "40px" }} />}
44
47
  aria-controls="panel1a-content"
45
48
  id="panel1a-header"
46
49
  >
47
- <Typography variant="h6">Tìm kiếm</Typography>
50
+ <Typography variant="h6" sx={{ fontSize: "0.75rem" }}>
51
+ Tìm kiếm
52
+ </Typography>
48
53
  </AccordionSummary>
54
+
49
55
  <AccordionDetails>
50
56
  <Grid container spacing={1}>
51
57
  {filters.map(({ field, size, ...rest }) => {
@@ -147,20 +153,16 @@ export const FilterGod = ({ tableName, filters, elementSize = "small", setPage =
147
153
  );
148
154
 
149
155
  return (
150
- <Grid container key={field.toString()} md={size?.md} xs={size?.xs} sm={size?.sm}>
151
- <Grid item xs={6}>
152
- {renderDatePicker(field[0], label1, field[1], "max")}
153
- </Grid>
154
- <Grid item xs={6}>
155
- {renderDatePicker(field[1], label2, field[0], "min")}
156
- </Grid>
156
+ <Grid container key={field.toString()} size={{ ...size }}>
157
+ <Grid size={{ xs: 12, md: 6 }}>{renderDatePicker(field[0], label1, field[1], "max")}</Grid>
158
+ <Grid size={{ xs: 12, md: 6 }}>{renderDatePicker(field[1], label2, field[0], "min")}</Grid>
157
159
  </Grid>
158
160
  );
159
161
  }
160
162
 
161
163
  if (rest.type === "slider-range") {
162
164
  return (
163
- <Grid key={field.toString()} md={size?.md} xs={size?.xs} sm={size?.sm}>
165
+ <Grid key={field.toString()} size={{ ...size }}>
164
166
  <Slider
165
167
  onChange={(e, value) => {
166
168
  setDataSearch({
@@ -181,7 +183,7 @@ export const FilterGod = ({ tableName, filters, elementSize = "small", setPage =
181
183
  );
182
184
  }
183
185
  return (
184
- <Grid key={field.toString()} md={size?.md} xs={size?.xs} sm={size?.sm}>
186
+ <Grid key={field.toString()} size={{ ...size }}>
185
187
  <FilterElement name={field.toString()} {...rest} setPage={setPage} />
186
188
  </Grid>
187
189
  );
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { uploadFile } from "@/apis/index";
3
3
  import { URL_APPLICATION } from "@/constants";
4
4
  import UploadAvatar from "./UploadAvatar";
5
- import { FormHelperText, Typography } from "@mui/material/index";
5
+ import { FormHelperText, Typography } from "@mui/material";
6
6
  import bytesToSize from "@/utils/bytesToSize";
7
7
  import { Controller, useFormContext } from "react-hook-form";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trithuc-mvc-react",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -13,40 +13,40 @@
13
13
  },
14
14
  "description": "",
15
15
  "dependencies": {
16
- "@emotion/react": "^11.13.5",
17
- "@emotion/styled": "^11.13.5",
18
- "@hookform/resolvers": "^3.9.1",
19
- "@iconify/react": "^5.0.2",
20
- "axios": "^1.7.7",
21
- "date-fns": "^3.6.0",
16
+ "@emotion/react": "^11.14.0",
17
+ "@emotion/styled": "^11.14.0",
18
+ "@hookform/resolvers": "^5.0.1",
19
+ "@iconify/react": "^5.2.1",
20
+ "axios": "^1.8.4",
21
+ "date-fns": "^4.1.0",
22
22
  "lodash": "^4.17.21",
23
23
  "moment": "^2.30.1",
24
24
  "prop-types": "^15.8.1",
25
- "yup": "^1.4.0"
25
+ "yup": "^1.6.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/react": "^18.3.12",
29
- "@types/react-dom": "^18.3.1",
30
- "eslint": "^9.15.0",
31
- "eslint-plugin-react": "^7.37.2",
32
- "eslint-plugin-react-hooks": "^5.0.0",
33
- "eslint-plugin-react-refresh": "^0.4.14",
28
+ "@types/react": "^19.1.2",
29
+ "@types/react-dom": "^19.1.2",
30
+ "eslint": "^9.24.0",
31
+ "eslint-plugin-react": "^7.37.5",
32
+ "eslint-plugin-react-hooks": "^5.2.0",
33
+ "eslint-plugin-react-refresh": "^0.4.19",
34
34
  "react": "^18.3.1",
35
35
  "react-dom": "^18.3.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@mui/lab": "^5.0.0-alpha.142",
39
- "@mui/material": "^5.15.12",
40
- "@mui/system": "^5.15.12",
41
- "@mui/icons-material": "^5.15.12",
42
- "@mui/x-tree-view": "^7.22.1",
43
- "@mui/x-date-pickers": "^6.19.6",
44
- "material-ui-confirm": "^3.0.16",
38
+ "@mui/lab": "^7.0.0-beta.11",
39
+ "@mui/material": "^7.0.2",
40
+ "@mui/system": "^7.0.2",
41
+ "@mui/icons-material": "^7.0.2",
42
+ "@mui/x-tree-view": "^7.28.1",
43
+ "@mui/x-date-pickers": "^7.28.3",
44
+ "material-ui-confirm": "^4.0.0",
45
45
  "react": ">=16",
46
46
  "react-dom": ">=16",
47
- "react-hook-form": "^7.53.2",
47
+ "react-hook-form": "^7.55.0",
48
48
  "react-query": "^3.39.3",
49
- "react-toastify": "^11.0.2",
49
+ "react-toastify": "^11.0.5",
50
50
  "dayjs": "^1.11.13"
51
51
  }
52
52
  }