@panneau/data 4.0.50 → 4.0.55

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/dist/index.d.ts CHANGED
@@ -66,17 +66,23 @@ type UseItemsResponse<T> = {
66
66
  meta?: Pagination;
67
67
  } | T[];
68
68
  type UseItemsKey = [string, Record<string, unknown> | null, number | null, number | null];
69
+ type Query = {
70
+ page?: number | null;
71
+ count?: number | null;
72
+ [key: string]: unknown;
73
+ };
69
74
  type UseItemsOptions<T> = Omit<UseQueryOptions<UseItemsResponse<T>, Error, UseItemsResponse<T>, UseItemsKey>, 'queryKey' | 'queryFn'> & {
70
75
  url?: string | null;
71
76
  getItems?: ((query: Record<string, unknown> | null, page: number | null, count: number | null) => Promise<UseItemsResponse<T>>) | null;
72
77
  page?: number | null;
73
78
  count?: number | null;
74
- query?: Record<string, unknown> | null;
79
+ query?: Query | null;
75
80
  keepData?: boolean;
76
81
  };
77
82
  type UseItemsResult<T> = {
78
83
  items: T[];
79
84
  allItems: T[];
85
+ pages: Record<string, UseItemsResponse<T>>;
80
86
  pagination: {
81
87
  page: number;
82
88
  lastPage: number;
package/dist/index.js CHANGED
@@ -822,8 +822,6 @@ class Api extends Base {
822
822
  }
823
823
  }
824
824
 
825
- /* eslint-disable react/jsx-props-no-spreading */
826
-
827
825
  const ApiContext = /*#__PURE__*/createContext(null);
828
826
  function useApi() {
829
827
  return use(ApiContext);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/data",
3
- "version": "4.0.50",
3
+ "version": "4.0.55",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -62,7 +62,7 @@
62
62
  "@babel/runtime": "^7.28.6",
63
63
  "@folklore/fetch": "^0.1.21",
64
64
  "@folklore/routes": "^0.2.44",
65
- "@panneau/core": "^4.0.50",
65
+ "@panneau/core": "^4.0.55",
66
66
  "@tanstack/react-query": "^5.100.9",
67
67
  "lodash": "^4.17.21",
68
68
  "query-string": "^9.0.0"
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "c5d4004686dae5529035f8eac83571739e24340d"
73
+ "gitHead": "1c9183567fc5bf98ba10fa57c63cf2ed2ae4a054"
74
74
  }