@refinedev/core 5.0.9 → 5.0.10

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @refinedev/core
2
2
 
3
+ ## 5.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7245](https://github.com/refinedev/refine/pull/7245) [`bf3cc65f73a6801a5fd1e42e6162efd2e89406d3`](https://github.com/refinedev/refine/commit/bf3cc65f73a6801a5fd1e42e6162efd2e89406d3) Thanks [@harsha-cpp](https://github.com/harsha-cpp)! - fix: correctly parse deeply nested conditional filters from URL with syncWithLocation
8
+
9
+ Increased `qs.parse` depth from default 5 to 10 to support deeply nested conditional filters (e.g., `or -> and -> {field, operator, value}`). Previously, nested filter properties were incorrectly parsed as bracket notation keys (`[field]`, `[operator]`, `[value]`) after page reload when using `syncWithLocation: true`.
10
+
3
11
  ## 5.0.9
4
12
 
5
13
  ### Patch Changes
@@ -1,4 +1,10 @@
1
1
  import type { CrudFilter, CrudOperators, CrudSort, SortOrder } from "../../contexts/data/types";
2
+ /**
3
+ * Depth limit for `qs.parse`. Deeply nested conditional filters
4
+ * (e.g. `or -> and -> { field, operator, value }`) require at least 7 levels.
5
+ * We use 10 to leave comfortable headroom.
6
+ */
7
+ export declare const QS_PARSE_DEPTH = 10;
2
8
  export declare const parseTableParams: (url: string) => {
3
9
  parsedCurrentPage: number | "" | undefined;
4
10
  parsedPageSize: number | "" | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/definitions/table/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACV,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM;;;;;CAW3C,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,QAAQ,GAAG;;;;;CASpD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eAAe,QAAQ,EAAE,KACxB,QAAQ,EAGV,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,MAAM,EAClB,SAAS,QAAQ,EAAE,KAClB,SAAS,GAAG,SAYd,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,YAAY,MAAM,EAClB,UAAU,UAAU,EAAE,EACtB,eAAc,aAAoB,KACjC,UAAU,CAAC,OAAO,CAAC,GAAG,SAkBxB,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import type { CrudFilter, CrudOperators, CrudSort, SortOrder } from "../../contexts/data/types";
2
+ /**
3
+ * Depth limit for `qs.parse`. Deeply nested conditional filters
4
+ * (e.g. `or -> and -> { field, operator, value }`) require at least 7 levels.
5
+ * We use 10 to leave comfortable headroom.
6
+ */
7
+ export declare const QS_PARSE_DEPTH = 10;
2
8
  export declare const parseTableParams: (url: string) => {
3
9
  parsedCurrentPage: number | "" | undefined;
4
10
  parsedPageSize: number | "" | undefined;
@@ -1,4 +1,10 @@
1
1
  import type { CrudFilter, CrudOperators, CrudSort, SortOrder } from "../../contexts/data/types";
2
+ /**
3
+ * Depth limit for `qs.parse`. Deeply nested conditional filters
4
+ * (e.g. `or -> and -> { field, operator, value }`) require at least 7 levels.
5
+ * We use 10 to leave comfortable headroom.
6
+ */
7
+ export declare const QS_PARSE_DEPTH = 10;
2
8
  export declare const parseTableParams: (url: string) => {
3
9
  parsedCurrentPage: number | "" | undefined;
4
10
  parsedPageSize: number | "" | undefined;
@@ -1,4 +1,10 @@
1
1
  import type { CrudFilter, CrudOperators, CrudSort, SortOrder } from "../../contexts/data/types";
2
+ /**
3
+ * Depth limit for `qs.parse`. Deeply nested conditional filters
4
+ * (e.g. `or -> and -> { field, operator, value }`) require at least 7 levels.
5
+ * We use 10 to leave comfortable headroom.
6
+ */
7
+ export declare const QS_PARSE_DEPTH = 10;
2
8
  export declare const parseTableParams: (url: string) => {
3
9
  parsedCurrentPage: number | "" | undefined;
4
10
  parsedPageSize: number | "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O,KAC7B,UAAU,EA0BZ,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,iBAAiB,QAAQ,EAAE,EAC3B,YAAY,QAAQ,EAAE,KACrB,QAAQ,EAGR,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAC5B,iBAAiB,UAAU,EAAE,EAC7B,eAAe,UAAU,EAAE,KAC1B,UAAU,EAGZ,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,iBAAiB,QAAQ,EAAE,EAC3B,eAAe,QAAQ,EAAE,KACxB,QAAQ,EAGV,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,MAAM,EAClB,SAAS,QAAQ,EAAE,KAClB,SAAS,GAAG,SAYd,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,YAAY,MAAM,EAClB,UAAU,UAAU,EAAE,EACtB,eAAc,aAAoB,KACjC,UAAU,CAAC,OAAO,CAAC,GAAG,SAkBxB,CAAC"}
@@ -2,7 +2,7 @@ import type { BaseKey, MetaQuery } from "../../contexts/data/types";
2
2
  import type { IResourceItem } from "../../contexts/resource/types";
3
3
  export type HistoryType = "push" | "replace";
4
4
  /**
5
- * `refine` uses {@link https://reactrouter.com/en/main/hooks/use-navigate#usenavigate `React Router`} and comes with all redirects out of the box.
5
+ * `refine` uses {@link https://reactrouter.com/api/hooks/useNavigate `React Router`} and comes with all redirects out of the box.
6
6
  * It allows you to manage your routing operations in refine.
7
7
  * Using this hook, you can manage all the routing operations of your application very easily.
8
8
  *
@@ -2,7 +2,7 @@ import type { BaseKey, MetaQuery } from "../../contexts/data/types";
2
2
  import type { IResourceItem } from "../../contexts/resource/types";
3
3
  export type HistoryType = "push" | "replace";
4
4
  /**
5
- * `refine` uses {@link https://reactrouter.com/en/main/hooks/use-navigate#usenavigate `React Router`} and comes with all redirects out of the box.
5
+ * `refine` uses {@link https://reactrouter.com/api/hooks/useNavigate `React Router`} and comes with all redirects out of the box.
6
6
  * It allows you to manage your routing operations in refine.
7
7
  * Using this hook, you can manage all the routing operations of your application very easily.
8
8
  *
@@ -2,7 +2,7 @@ import type { BaseKey, MetaQuery } from "../../contexts/data/types";
2
2
  import type { IResourceItem } from "../../contexts/resource/types";
3
3
  export type HistoryType = "push" | "replace";
4
4
  /**
5
- * `refine` uses {@link https://reactrouter.com/en/main/hooks/use-navigate#usenavigate `React Router`} and comes with all redirects out of the box.
5
+ * `refine` uses {@link https://reactrouter.com/api/hooks/useNavigate `React Router`} and comes with all redirects out of the box.
6
6
  * It allows you to manage your routing operations in refine.
7
7
  * Using this hook, you can manage all the routing operations of your application very easily.
8
8
  *
@@ -2,7 +2,7 @@ import type { BaseKey, MetaQuery } from "../../contexts/data/types";
2
2
  import type { IResourceItem } from "../../contexts/resource/types";
3
3
  export type HistoryType = "push" | "replace";
4
4
  /**
5
- * `refine` uses {@link https://reactrouter.com/en/main/hooks/use-navigate#usenavigate `React Router`} and comes with all redirects out of the box.
5
+ * `refine` uses {@link https://reactrouter.com/api/hooks/useNavigate `React Router`} and comes with all redirects out of the box.
6
6
  * It allows you to manage your routing operations in refine.
7
7
  * Using this hook, you can manage all the routing operations of your application very easily.
8
8
  *
package/dist/index.cjs CHANGED
@@ -43,6 +43,7 @@ __export(src_exports, {
43
43
  KeyBuilder: () => KeyBuilder,
44
44
  Link: () => Link,
45
45
  MetaContextProvider: () => MetaContextProvider,
46
+ QS_PARSE_DEPTH: () => QS_PARSE_DEPTH,
46
47
  Refine: () => Refine,
47
48
  ResourceContext: () => ResourceContext,
48
49
  RouteChangeHandler: () => RouteChangeHandler,
@@ -274,10 +275,12 @@ var import_differenceWith = __toESM(require("lodash/differenceWith"));
274
275
  var import_unionWith = __toESM(require("lodash/unionWith"));
275
276
  var import_qs = __toESM(require("qs"));
276
277
  var import_warn_once = __toESM(require("warn-once"));
278
+ var QS_PARSE_DEPTH = 10;
277
279
  var parseTableParams = /* @__PURE__ */ __name((url) => {
278
280
  const { currentPage, pageSize, sorters, sorter, filters } = import_qs.default.parse(
279
- url.substring(1)
281
+ url.substring(1),
280
282
  // remove first ? character
283
+ { depth: QS_PARSE_DEPTH }
281
284
  );
282
285
  return {
283
286
  parsedCurrentPage: currentPage && Number(currentPage),
@@ -8193,7 +8196,7 @@ var import_react74 = __toESM(require("react"));
8193
8196
 
8194
8197
  // src/hooks/useTelemetryData/index.ts
8195
8198
  var import_react73 = require("react");
8196
- var REFINE_VERSION = "5.0.9";
8199
+ var REFINE_VERSION = "5.0.10";
8197
8200
  var useTelemetryData = /* @__PURE__ */ __name(() => {
8198
8201
  var _a;
8199
8202
  const auth = useIsExistAuthentication();