@carlonicora/nextjs-jsonapi 4.2.1 → 4.2.2
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/{BlockNoteEditor-HXAHDJA7.mjs → BlockNoteEditor-FROUKBVK.mjs} +2 -2
- package/dist/{BlockNoteEditor-LLCZDFLZ.js → BlockNoteEditor-SWO3X5CC.js} +9 -9
- package/dist/{BlockNoteEditor-LLCZDFLZ.js.map → BlockNoteEditor-SWO3X5CC.js.map} +1 -1
- package/dist/billing/index.js +371 -371
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-2VXDZRYY.mjs → chunk-AICMLKWN.mjs} +21 -8
- package/dist/chunk-AICMLKWN.mjs.map +1 -0
- package/dist/{chunk-VDVIUDY5.js → chunk-GYW7LLBQ.js} +369 -356
- package/dist/chunk-GYW7LLBQ.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/analytics/index.js +88 -88
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/hooks/__tests__/useDataListRetriever.spec.ts +57 -0
- package/src/hooks/useDataListRetriever.ts +38 -9
- package/dist/chunk-2VXDZRYY.mjs.map +0 -1
- package/dist/chunk-VDVIUDY5.js.map +0 -1
- /package/dist/{BlockNoteEditor-HXAHDJA7.mjs.map → BlockNoteEditor-FROUKBVK.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -6921,17 +6921,17 @@ function useDataListRetriever(params) {
|
|
|
6921
6921
|
return;
|
|
6922
6922
|
}
|
|
6923
6923
|
if (isFetchingRef.current && !fetchParams?.callNext && !fetchParams?.callPrevious) return;
|
|
6924
|
-
if (fetchParams?.callNext || fetchParams?.callPrevious) {
|
|
6925
|
-
isPaginatingRef.current = true;
|
|
6926
|
-
}
|
|
6927
|
-
const thisRequestId = ++requestIdRef.current;
|
|
6928
|
-
isFetchingRef.current = true;
|
|
6929
6924
|
if (stableParams.requiresSearch === true && fetchParams?.isRefine !== true && fetchParams?.isRefresh !== true) {
|
|
6930
6925
|
return;
|
|
6931
6926
|
}
|
|
6932
|
-
if (!nextPage && !previousPage && isLoaded && fetchParams?.callNext !== true && fetchParams?.callPrevious !== true && params.search === searchTermRef.current) {
|
|
6927
|
+
if (fetchParams?.force !== true && !nextPage && !previousPage && isLoaded && fetchParams?.callNext !== true && fetchParams?.callPrevious !== true && params.search === searchTermRef.current) {
|
|
6933
6928
|
return;
|
|
6934
6929
|
}
|
|
6930
|
+
if (fetchParams?.callNext || fetchParams?.callPrevious) {
|
|
6931
|
+
isPaginatingRef.current = true;
|
|
6932
|
+
}
|
|
6933
|
+
const thisRequestId = ++requestIdRef.current;
|
|
6934
|
+
isFetchingRef.current = true;
|
|
6935
6935
|
const currentSearchTerm = searchTermRef.current;
|
|
6936
6936
|
setIsLoaded(false);
|
|
6937
6937
|
try {
|
|
@@ -7035,6 +7035,19 @@ function useDataListRetriever(params) {
|
|
|
7035
7035
|
fetchData({ isRefresh: true });
|
|
7036
7036
|
}
|
|
7037
7037
|
}, [ready, fetchData]);
|
|
7038
|
+
const fetchDataRef = useRef8(fetchData);
|
|
7039
|
+
const isLoadedRef = useRef8(isLoaded);
|
|
7040
|
+
useEffect6(() => {
|
|
7041
|
+
fetchDataRef.current = fetchData;
|
|
7042
|
+
isLoadedRef.current = isLoaded;
|
|
7043
|
+
});
|
|
7044
|
+
const wasHiddenRef = useRef8(false);
|
|
7045
|
+
useEffect6(() => {
|
|
7046
|
+
if (wasHiddenRef.current && isLoadedRef.current) fetchDataRef.current({ isRefresh: true, force: true });
|
|
7047
|
+
return () => {
|
|
7048
|
+
wasHiddenRef.current = true;
|
|
7049
|
+
};
|
|
7050
|
+
}, []);
|
|
7038
7051
|
const loadNext = useCallback9(
|
|
7039
7052
|
async (onlyNewRecords) => {
|
|
7040
7053
|
if (nextPage) {
|
|
@@ -10671,7 +10684,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10671
10684
|
import dynamic from "next/dynamic";
|
|
10672
10685
|
import React18 from "react";
|
|
10673
10686
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10674
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10687
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-FROUKBVK.mjs"), {
|
|
10675
10688
|
ssr: false
|
|
10676
10689
|
});
|
|
10677
10690
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -28269,4 +28282,4 @@ export {
|
|
|
28269
28282
|
useOAuthClients,
|
|
28270
28283
|
useOAuthClient
|
|
28271
28284
|
};
|
|
28272
|
-
//# sourceMappingURL=chunk-
|
|
28285
|
+
//# sourceMappingURL=chunk-AICMLKWN.mjs.map
|