@trackunit/react-graphql-hooks 1.7.19 → 1.7.21
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/index.cjs.js +3 -3
- package/index.esm.js +1 -1
- package/package.json +6 -6
- package/src/usePaginationQuery.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
|
|
|
5
5
|
var sharedUtils = require('@trackunit/shared-utils');
|
|
6
6
|
var ApolloClient = require('@apollo/client');
|
|
7
7
|
var react = require('react');
|
|
8
|
-
var
|
|
8
|
+
var reactComponents = require('@trackunit/react-components');
|
|
9
9
|
var esToolkit = require('es-toolkit');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
@@ -250,8 +250,8 @@ const usePaginationQuery = (document, { ...props }) => {
|
|
|
250
250
|
const onReset = react.useCallback(() => {
|
|
251
251
|
setResetTrigger(prev => prev + 1);
|
|
252
252
|
}, []);
|
|
253
|
-
const { table: { setIsLoading, isLoading, setPageInfo, pageInfo, reset, nextPage, previousPage }, variables: { first, after, last, before }, } =
|
|
254
|
-
pageSize: internalProps.pageSize || internalProps.variables?.first ||
|
|
253
|
+
const { table: { setIsLoading, isLoading, setPageInfo, pageInfo, reset, nextPage, previousPage }, variables: { first, after, last, before }, } = reactComponents.useRelayPagination({
|
|
254
|
+
pageSize: internalProps.pageSize || internalProps.variables?.first || reactComponents.defaultPageSize,
|
|
255
255
|
onReset,
|
|
256
256
|
});
|
|
257
257
|
const doFetchMore = react.useCallback((variables, prev) => {
|
package/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { registerTranslations } from '@trackunit/i18n-library-translation';
|
|
|
3
3
|
import { truthy, objectKeys } from '@trackunit/shared-utils';
|
|
4
4
|
import * as ApolloClient from '@apollo/client';
|
|
5
5
|
import { useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
6
|
-
import { useRelayPagination, defaultPageSize } from '@trackunit/react-
|
|
6
|
+
import { useRelayPagination, defaultPageSize } from '@trackunit/react-components';
|
|
7
7
|
import { isEqual } from 'es-toolkit';
|
|
8
8
|
|
|
9
9
|
var defaultTranslations = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-graphql-hooks",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.21",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@apollo/client": "3.13.8",
|
|
11
11
|
"react": "19.0.0",
|
|
12
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
13
|
-
"@trackunit/shared-utils": "1.9.
|
|
14
|
-
"@trackunit/react-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"@trackunit/i18n-library-translation": "1.7.16",
|
|
13
|
+
"@trackunit/shared-utils": "1.9.12",
|
|
14
|
+
"@trackunit/react-test-setup": "1.4.12",
|
|
15
|
+
"es-toolkit": "^1.39.10",
|
|
16
|
+
"@trackunit/react-components": "1.9.21"
|
|
17
17
|
},
|
|
18
18
|
"module": "./index.esm.js",
|
|
19
19
|
"main": "./index.cjs.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ApolloClient from "@apollo/client";
|
|
2
|
-
import { RelayPageInfo, RelayTableSupport } from "@trackunit/react-
|
|
2
|
+
import { RelayPageInfo, RelayTableSupport } from "@trackunit/react-components";
|
|
3
3
|
/**
|
|
4
4
|
* This type is used to return the data from the query, the pagination object and the last fetched data.
|
|
5
5
|
*/
|