@ainias42/tanstack-ids 0.0.4 → 0.0.6

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.
Files changed (37) hide show
  1. package/dist/QueryContext/QueriesContextProvider.js +2 -2
  2. package/dist/QueryContext/QueriesContextProvider.js.map +1 -1
  3. package/dist/QueryContext/SubQueriesContext.js +3 -3
  4. package/dist/QueryContext/SubQueriesContext.js.map +1 -1
  5. package/dist/QueryContext/useGenerateQueriesContextId.js +1 -1
  6. package/dist/QueryContext/useGenerateQueriesContextId.js.map +1 -1
  7. package/dist/QueryContext/useQueriesError.js +2 -2
  8. package/dist/QueryContext/useQueriesError.js.map +1 -1
  9. package/dist/QueryContext/useQueriesIsFetching.js +2 -2
  10. package/dist/QueryContext/useQueriesIsFetching.js.map +1 -1
  11. package/dist/QueryContext/useQueriesReload.js +2 -2
  12. package/dist/QueryContext/useQueriesReload.js.map +1 -1
  13. package/dist/QueryContext/useQuerySubscribeToReload.js +2 -2
  14. package/dist/QueryContext/useQuerySubscribeToReload.js.map +1 -1
  15. package/dist/QueryContext/useScopedQueriesIsFetching.js +2 -2
  16. package/dist/QueryContext/useScopedQueriesIsFetching.js.map +1 -1
  17. package/dist/generateIdsQuery.d.ts +7 -7
  18. package/dist/generateNestedIdQuery.d.ts +12 -12
  19. package/dist/hooks/useIndexedData.d.ts +1 -1
  20. package/dist/noop.js +1 -0
  21. package/dist/noop.js.map +1 -1
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +37 -38
  24. package/src/QueryContext/QueriesContextProvider.tsx +2 -2
  25. package/src/QueryContext/SubQueriesContext.tsx +3 -3
  26. package/src/QueryContext/useGenerateQueriesContextId.ts +1 -1
  27. package/src/QueryContext/useQueriesError.ts +2 -2
  28. package/src/QueryContext/useQueriesIsFetching.ts +2 -2
  29. package/src/QueryContext/useQueriesReload.ts +2 -2
  30. package/src/QueryContext/useQuerySubscribeToReload.ts +2 -2
  31. package/src/QueryContext/useScopedQueriesIsFetching.ts +2 -2
  32. package/src/generateIdsQuery.ts +5 -5
  33. package/src/generateNestedIdQuery.ts +3 -3
  34. package/src/generateQuery.ts +2 -2
  35. package/src/noop.ts +1 -0
  36. package/stylelint.config.mjs +4 -0
  37. package/tsconfig.json +8 -24
@@ -1,5 +1,5 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
2
- import { useGenerateQueriesContextId } from '../QueryContext/useGenerateQueriesContextId.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
+ import { useGenerateQueriesContextId } from './useGenerateQueriesContextId.js';
3
3
  import { withMemo } from '@ainias42/react-bootstrap-mobile';
4
4
  import React from 'react';
5
5
  export const QueriesContextProvider = withMemo(function QueriesContextProvider({ children, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"QueriesContextProvider.js","sourceRoot":"","sources":["../../src/QueryContext/QueriesContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,SAAS,sBAAsB,CAAC,EAC3E,QAAQ,GACkB;IAC1B,OAAO;IAEP,6BAA6B;IAC7B,MAAM,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAEzC,WAAW;IAEX,YAAY;IAEZ,UAAU;IAEV,QAAQ;IAER,kBAAkB;IAElB,OAAO,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAG,QAAQ,CAA2B,CAAC;AACpF,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"QueriesContextProvider.js","sourceRoot":"","sources":["../../src/QueryContext/QueriesContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,SAAS,sBAAsB,CAAC,EAC3E,QAAQ,GACkB;IAC1B,OAAO;IAEP,6BAA6B;IAC7B,MAAM,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAEzC,WAAW;IAEX,YAAY;IAEZ,UAAU;IAEV,QAAQ;IAER,kBAAkB;IAElB,OAAO,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAG,QAAQ,CAA2B,CAAC;AACpF,CAAC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useClientLayoutEffect, withMemo } from '@ainias42/react-bootstrap-mobile';
3
- import { useGenerateQueriesContextId } from '../QueryContext/useGenerateQueriesContextId.js';
4
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
3
+ import { useGenerateQueriesContextId } from './useGenerateQueriesContextId.js';
4
+ import { useQueriesStore } from './useQueriesStore.js';
5
5
  import React, { useContext } from 'react';
6
6
  export const SubQueriesContext = withMemo(function SubQueriesContext({ children, subContextId, }) {
7
7
  // Refs
@@ -1 +1 @@
1
- {"version":3,"file":"SubQueriesContext.js","sourceRoot":"","sources":["../../src/QueryContext/SubQueriesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC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Ae,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAI1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,iBAAiB,CAAC,EACjE,QAAQ,EACR,YAAY,GACS;IACrB,OAAO;IAEP,6BAA6B;IAC7B,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAExG,MAAM,EAAE,GAAG,2BAA2B,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;IAElC,WAAW;IAEX,YAAY;IAEZ,UAAU;IACV,qBAAqB,CAAC,GAAG,EAAE;QACvB,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAExD,QAAQ;IAER,kBAAkB;IAElB,OAAO,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA2B,CAAC;AACxF,CAAC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
2
+ import { useQueriesStore } from './useQueriesStore.js';
3
3
  export function useGenerateQueriesContextId() {
4
4
  const generateId = useQueriesStore((s) => s.generateContextId);
5
5
  return useMemo(() => generateId(), [generateId]);
@@ -1 +1 @@
1
- {"version":3,"file":"useGenerateQueriesContextId.js","sourceRoot":"","sources":["../../src/QueryContext/useGenerateQueriesContextId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,2BAA2B;IACvC,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC/D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACrD,CAAC"}
1
+ {"version":3,"file":"useGenerateQueriesContextId.js","sourceRoot":"","sources":["../../src/QueryContext/useGenerateQueriesContextId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,2BAA2B;IACvC,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC/D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
3
+ import { useQueriesStore } from './useQueriesStore.js';
4
4
  export function useQueriesError(contextId) {
5
5
  const context = useContext(QueriesContext);
6
6
  return useQueriesStore((s) => s.getError(contextId !== null && contextId !== void 0 ? contextId : context));
@@ -1 +1 @@
1
- {"version":3,"file":"useQueriesError.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,eAAe,CAAC,SAAkB;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
1
+ {"version":3,"file":"useQueriesError.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,eAAe,CAAC,SAAkB;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
3
+ import { useQueriesStore } from './useQueriesStore.js';
4
4
  export function useQueriesIsFetching(contextId) {
5
5
  const context = useContext(QueriesContext);
6
6
  return useQueriesStore((s) => s.isFetching(contextId !== null && contextId !== void 0 ? contextId : context));
@@ -1 +1 @@
1
- {"version":3,"file":"useQueriesIsFetching.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesIsFetching.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,oBAAoB,CAAC,SAAkB;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
1
+ {"version":3,"file":"useQueriesIsFetching.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesIsFetching.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,SAAkB;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useCallback, useContext } from 'react';
3
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
3
+ import { useQueriesStore } from './useQueriesStore.js';
4
4
  import { useQueryClient } from '@tanstack/react-query';
5
5
  export function useQueriesReload(contextId) {
6
6
  const context = useContext(QueriesContext);
@@ -1 +1 @@
1
- {"version":3,"file":"useQueriesReload.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesReload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,UAAU,gBAAgB,CAAC,SAAkB;IAC/C,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,OAAO,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1B,OAAO,aAAa,CAAC,WAAW,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC;IAC5D,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;AACzD,CAAC"}
1
+ {"version":3,"file":"useQueriesReload.js","sourceRoot":"","sources":["../../src/QueryContext/useQueriesReload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,UAAU,gBAAgB,CAAC,SAAkB;IAC/C,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,OAAO,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1B,OAAO,aAAa,CAAC,WAAW,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,CAAC,CAAC;IAC5D,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;AACzD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useClientLayoutEffect } from '@ainias42/react-bootstrap-mobile';
3
3
  import { useContext, useRef } from 'react';
4
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
4
+ import { useQueriesStore } from './useQueriesStore.js';
5
5
  export function useQueriesSubscribeToReload(keys, isFetching, error) {
6
6
  const contextId = useContext(QueriesContext);
7
7
  const setItem = useQueriesStore((s) => s.setItem);
@@ -1 +1 @@
1
- {"version":3,"file":"useQuerySubscribeToReload.js","sourceRoot":"","sources":["../../src/QueryContext/useQuerySubscribeToReload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,2BAA2B,CAAC,IAAc,EAAE,UAAmB,EAAE,KAAU;IACvF,MAAM,SAAS,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACxD,MAAM,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B,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE;YACxC,IAAI;YACJ,KAAK;YACL,UAAU;SACb,CAAC,CAAC;QACH,uDAAuD;IAC3D,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAErD,qBAAqB,CAAC,GAAG,EAAE;QACvB,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAChC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '../QueryContext/QueriesContext.js';
1
+ import { QueriesContext } from './QueriesContext.js';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '../QueryContext/useQueriesStore.js';
3
+ import { useQueriesStore } from './useQueriesStore.js';
4
4
  export function useScopedQueriesIsFetching(scope, contextId) {
5
5
  const context = useContext(QueriesContext);
6
6
  return useQueriesStore((s) => s.isFetchingByScope(contextId !== null && contextId !== void 0 ? contextId : context, scope));
@@ -1 +1 @@
1
- {"version":3,"file":"useScopedQueriesIsFetching.js","sourceRoot":"","sources":["../../src/QueryContext/useScopedQueriesIsFetching.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,0BAA0B,CAAC,KAAgD,EAAE,SAAkB;IAC3G,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC"}
1
+ {"version":3,"file":"useScopedQueriesIsFetching.js","sourceRoot":"","sources":["../../src/QueryContext/useScopedQueriesIsFetching.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,0BAA0B,CAAC,KAAgD,EAAE,SAAkB;IAC3G,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,OAAO,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC"}
@@ -9,7 +9,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
9
9
  }): {
10
10
  useMany: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((ids: IdType[], otherAdditionalQueryOptions?: Omit<UseQueryOptions<Type, unknown, Type, [string, [IdType]]>, "context" | "fetcher" | "queryKey"> & {
11
11
  reloadWithContext?: boolean;
12
- }) => URecord<IdType, UseQueryResult<Type, Error>>);
12
+ }) => Partial<Record<IdType, UseQueryResult<Type, Error> | undefined>>);
13
13
  useOne: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((identifier: IdType, otherAdditionalQueryOptions?: Omit<QueryHookOptions<Type, unknown, Type, [IdType]>, "context" | "fetcher" | "queryKey" | "variables"> & {
14
14
  reloadWithContext?: boolean;
15
15
  }) => import("react-query-kit").QueryHookResult<Type, Error>);
@@ -74,7 +74,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
74
74
  };
75
75
  }>]) => {
76
76
  data: {
77
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
77
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
78
78
  pageParams: PageParams[];
79
79
  } | undefined;
80
80
  error: Error;
@@ -124,7 +124,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
124
124
  }, PageParams>>;
125
125
  } | {
126
126
  data: {
127
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
127
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
128
128
  pageParams: PageParams[];
129
129
  } | undefined;
130
130
  error: null;
@@ -174,7 +174,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
174
174
  }, PageParams>>;
175
175
  } | {
176
176
  data: {
177
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
177
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
178
178
  pageParams: PageParams[];
179
179
  } | undefined;
180
180
  error: Error;
@@ -224,7 +224,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
224
224
  }, PageParams>>;
225
225
  } | {
226
226
  data: {
227
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
227
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
228
228
  pageParams: PageParams[];
229
229
  } | undefined;
230
230
  error: null;
@@ -274,7 +274,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
274
274
  }, PageParams>>;
275
275
  } | {
276
276
  data: {
277
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
277
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
278
278
  pageParams: PageParams[];
279
279
  } | undefined;
280
280
  error: null;
@@ -324,7 +324,7 @@ export declare function generateIdsQuery<IdType extends number | string | symbol
324
324
  }, PageParams>>;
325
325
  } | {
326
326
  data: {
327
- pages: Exclude<URecord<IdType, Type>[IdType], undefined>[][];
327
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
328
328
  pageParams: PageParams[];
329
329
  } | undefined;
330
330
  isError: false;
@@ -3,20 +3,20 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
3
3
  id: IdType;
4
4
  }, Args extends any[]>(key: string, fetcherFactory: (...args: Args) => (ids: IdType[]) => Promise<Type[]> | Type[]): {
5
5
  (...args: Args): {
6
- useMany: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((ids: IdType[], otherAdditionalQueryOptions?: Omit<import("@tanstack/react-query").UseQueryOptions<Type, unknown, Type, [string, [IdType]]>, "fetcher" | "queryKey" | "context"> & {
6
+ useMany: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((ids: IdType[], otherAdditionalQueryOptions?: Omit<import("@tanstack/react-query").UseQueryOptions<Type, unknown, Type, [string, [IdType]]>, "queryKey" | "fetcher" | "context"> & {
7
7
  reloadWithContext?: boolean;
8
- }) => import("@ainias42/js-helper").URecord<IdType, import("@tanstack/react-query").UseQueryResult<Type, Error>>);
9
- useOne: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((identifier: IdType, otherAdditionalQueryOptions?: Omit<import("react-query-kit").QueryHookOptions<Type, unknown, Type, [IdType]>, "fetcher" | "queryKey" | "variables" | "context"> & {
8
+ }) => Partial<Record<IdType, import("@tanstack/react-query").UseQueryResult<Type, Error> | undefined>>);
9
+ useOne: import("react-query-kit").ExposeMethods<Type, [IdType], Error> & ((identifier: IdType, otherAdditionalQueryOptions?: Omit<import("react-query-kit").QueryHookOptions<Type, unknown, Type, [IdType]>, "queryKey" | "fetcher" | "variables" | "context"> & {
10
10
  reloadWithContext?: boolean;
11
11
  }) => import("react-query-kit").QueryHookResult<Type, Error>);
12
- generateFilter: <Func extends (...args: any[]) => Type[] | Promise<Type[]>, FuncArguments extends Parameters<Func>["length"] extends 0 ? void : Parameters<Func> = Parameters<Func>["length"] extends 0 ? void : Parameters<Func>, ResultAsArray extends boolean = false>(filterFunc: Func, additionalOptions?: (Omit<import("react-query-kit").CreateQueryOptions<IdType[], [FuncArguments], Error>, "fetcher" | "queryKey"> & {
12
+ generateFilter: <Func extends (...args: any[]) => Type[] | Promise<Type[]>, FuncArguments extends Parameters<Func>["length"] extends 0 ? void : Parameters<Func> = Parameters<Func>["length"] extends 0 ? void : Parameters<Func>, ResultAsArray extends boolean = false>(filterFunc: Func, additionalOptions?: (Omit<import("react-query-kit").CreateQueryOptions<IdType[], [FuncArguments], Error>, "queryKey" | "fetcher"> & {
13
13
  resultAsArray?: ResultAsArray | undefined;
14
14
  subKey?: string;
15
- }) | undefined) => import("react-query-kit").ExposeMethods<IdType[], void | (void & [filter: FuncArguments]), Error> & (<Args_1 extends FuncArguments extends void ? [] : FuncArguments>(...args: Args_1) => ResultAsArray extends true ? import("@tanstack/react-query").UseQueryResult<Type, Error>[] : import("@ainias42/js-helper").URecord<IdType, import("@tanstack/react-query").UseQueryResult<Type, Error>>);
15
+ }) | undefined) => import("react-query-kit").ExposeMethods<IdType[], void | (void & [filter: FuncArguments]), Error> & (<Args_1 extends FuncArguments extends void ? [] : FuncArguments>(...args: Args_1) => ResultAsArray extends true ? import("@tanstack/react-query").UseQueryResult<Type, Error>[] : Partial<Record<IdType, import("@tanstack/react-query").UseQueryResult<Type, Error> | undefined>>);
16
16
  generateInfiniteQuery: <PageParams, Meta, FuncArguments extends any[] = []>({ queryFn, ...options }: Omit<import("react-query-kit").CreateInfiniteQueryOptions<{
17
17
  data: IdType[];
18
18
  meta: Meta;
19
- }, FuncArguments, Error, PageParams>, "fetcher" | "queryKey" | "getNextPageParam" | "getPreviousPageParam"> & {
19
+ }, FuncArguments, Error, PageParams>, "queryKey" | "fetcher" | "getNextPageParam" | "getPreviousPageParam"> & {
20
20
  queryFn: (pageParams: PageParams, args: FuncArguments, context: import("@tanstack/react-query").QueryFunctionContext<[string, FuncArguments], PageParams>) => import("@ainias42/js-helper").Awaitable<{
21
21
  data: Type[];
22
22
  meta: Meta;
@@ -70,7 +70,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
70
70
  } | undefined;
71
71
  }>]) => {
72
72
  data: {
73
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
73
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
74
74
  pageParams: PageParams[];
75
75
  } | undefined;
76
76
  error: Error;
@@ -120,7 +120,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
120
120
  }, PageParams>>;
121
121
  } | {
122
122
  data: {
123
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
123
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
124
124
  pageParams: PageParams[];
125
125
  } | undefined;
126
126
  error: null;
@@ -170,7 +170,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
170
170
  }, PageParams>>;
171
171
  } | {
172
172
  data: {
173
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
173
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
174
174
  pageParams: PageParams[];
175
175
  } | undefined;
176
176
  error: Error;
@@ -220,7 +220,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
220
220
  }, PageParams>>;
221
221
  } | {
222
222
  data: {
223
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
223
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
224
224
  pageParams: PageParams[];
225
225
  } | undefined;
226
226
  error: null;
@@ -270,7 +270,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
270
270
  }, PageParams>>;
271
271
  } | {
272
272
  data: {
273
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
273
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
274
274
  pageParams: PageParams[];
275
275
  } | undefined;
276
276
  error: null;
@@ -320,7 +320,7 @@ export declare function generateNestedIdQuery<IdType extends number | string | s
320
320
  }, PageParams>>;
321
321
  } | {
322
322
  data: {
323
- pages: Exclude<import("@ainias42/js-helper").URecord<IdType, Type>[IdType], undefined>[][];
323
+ pages: Exclude<Partial<Record<IdType, Type | undefined>>[IdType], undefined>[][];
324
324
  pageParams: PageParams[];
325
325
  } | undefined;
326
326
  isError: false;
@@ -1,4 +1,4 @@
1
1
  import type { URecord } from '@ainias42/js-helper';
2
2
  export declare function useIndexedData<DataType, IndexType extends number | string | symbol>(result: URecord<IndexType, {
3
3
  data: DataType | undefined;
4
- }>): URecord<IndexType, DataType>;
4
+ }>): Partial<Record<IndexType, DataType | undefined>>;
package/dist/noop.js CHANGED
@@ -1,2 +1,3 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1
2
  export function noop() { }
2
3
  //# sourceMappingURL=noop.js.map
package/dist/noop.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"noop.js","sourceRoot":"","sources":["../src/noop.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,KAAI,CAAC"}
1
+ {"version":3,"file":"noop.js","sourceRoot":"","sources":["../src/noop.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,UAAU,IAAI,KAAI,CAAC"}