UNPKG

@matthew.ngo/react-filter-pilot

Version:

Powerful filtering, pagination, and sorting for React with TanStack Query integration

3 lines 1 kB
import {a as a$1}from'../chunk-KDVV4H2M.js';/* @matthew.ngo/react-filter-pilot - MIT License */ function o(n){const e={...n};return e.gcTime===void 0&&e.cacheTime!==void 0&&(e.gcTime=e.cacheTime),e.cacheTime===void 0&&e.gcTime!==void 0&&(e.cacheTime=e.gcTime),e}a$1(o,"normalizeQueryOptions");function c(){try{const{QueryClient:n}=require("@tanstack/react-query");return "gcTime"in(new n().getDefaultOptions().queries||{})?"5":"4"}catch{return "unknown"}}a$1(c,"detectTanStackQueryVersion");function a(n,e=c()){const t=o(n);if(e==="5"){const{cacheTime:u,...r}=t;return r}else if(e==="4"){const{gcTime:u,...r}=t;return r}return t}a$1(a,"createQueryOptions");function m(n,e=c()){const t=a(n,e);return e==="5"?{...t,initialPageParam:n.initialPageParam??null}:t}a$1(m,"createInfiniteQueryOptions");export{m as createInfiniteQueryOptions,a as createQueryOptions,c as detectTanStackQueryVersion,o as normalizeQueryOptions};//# sourceMappingURL=tanstack-query.js.map //# sourceMappingURL=tanstack-query.js.map