@refinedev/core 5.0.9 → 5.0.11
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/CHANGELOG.md +18 -0
- package/dist/definitions/table/index.d.cts +6 -0
- package/dist/definitions/table/index.d.cts.map +1 -1
- package/dist/definitions/table/index.d.mts +6 -0
- package/dist/definitions/table/index.d.mts.map +6 -0
- package/dist/definitions/table/index.d.ts +6 -0
- package/dist/definitions/table/index.d.ts.map +1 -1
- package/dist/hooks/button/delete-button/index.d.cts.map +1 -1
- package/dist/hooks/button/delete-button/index.d.ts.map +1 -1
- package/dist/hooks/navigation/index.d.cts +1 -1
- package/dist/hooks/navigation/index.d.mts +1 -1
- package/dist/hooks/navigation/index.d.mts.map +1 -1
- package/dist/hooks/navigation/index.d.ts +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/definitions/table/index.ts +11 -0
- package/src/hooks/button/delete-button/index.tsx +1 -0
- package/src/hooks/navigation/index.ts +1 -1
- package/src/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinedev/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.",
|
|
6
6
|
"repository": {
|
|
@@ -10,9 +10,17 @@ import type {
|
|
|
10
10
|
SortOrder,
|
|
11
11
|
} from "../../contexts/data/types";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Depth limit for `qs.parse`. Deeply nested conditional filters
|
|
15
|
+
* (e.g. `or -> and -> { field, operator, value }`) require at least 7 levels.
|
|
16
|
+
* We use 10 to leave comfortable headroom.
|
|
17
|
+
*/
|
|
18
|
+
export const QS_PARSE_DEPTH = 10;
|
|
19
|
+
|
|
13
20
|
export const parseTableParams = (url: string) => {
|
|
14
21
|
const { currentPage, pageSize, sorters, sorter, filters } = qs.parse(
|
|
15
22
|
url.substring(1), // remove first ? character
|
|
23
|
+
{ depth: QS_PARSE_DEPTH },
|
|
16
24
|
);
|
|
17
25
|
|
|
18
26
|
return {
|
|
@@ -44,6 +52,9 @@ export const stringifyTableParams = (params: {
|
|
|
44
52
|
filters: CrudFilter[];
|
|
45
53
|
[key: string]: any;
|
|
46
54
|
}): string => {
|
|
55
|
+
// Note: qs.stringify has no depth limit by default, so it correctly
|
|
56
|
+
// serialises deeply nested filters without extra configuration.
|
|
57
|
+
// The matching qs.parse call uses QS_PARSE_DEPTH to deserialise them.
|
|
47
58
|
const options: IStringifyOptions = {
|
|
48
59
|
skipNulls: true,
|
|
49
60
|
arrayFormat: "indices",
|
|
@@ -11,7 +11,7 @@ import type { IResourceItem } from "../../contexts/resource/types";
|
|
|
11
11
|
export type HistoryType = "push" | "replace";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* `refine` uses {@link https://reactrouter.com/
|
|
14
|
+
* `refine` uses {@link https://reactrouter.com/api/hooks/useNavigate `React Router`} and comes with all redirects out of the box.
|
|
15
15
|
* It allows you to manage your routing operations in refine.
|
|
16
16
|
* Using this hook, you can manage all the routing operations of your application very easily.
|
|
17
17
|
*
|