@timardex/cluemart-shared 2.2.40 → 2.3.0

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 (38) hide show
  1. package/dist/{chunk-BCMBTEGJ.mjs → chunk-DV3K3JDE.mjs} +26 -33
  2. package/dist/{chunk-BCMBTEGJ.mjs.map → chunk-DV3K3JDE.mjs.map} +1 -1
  3. package/dist/{chunk-T5ZOYS3L.mjs → chunk-HKTBJOB7.mjs} +40 -11
  4. package/dist/chunk-HKTBJOB7.mjs.map +1 -0
  5. package/dist/{chunk-NMJ2CR2F.mjs → chunk-KMS64DE2.mjs} +2 -2
  6. package/dist/{chunk-VL275KFW.mjs → chunk-PBW5K54C.mjs} +2 -2
  7. package/dist/{chunk-MKHXXZWF.mjs → chunk-YTRRTC2S.mjs} +11 -6
  8. package/dist/chunk-YTRRTC2S.mjs.map +1 -0
  9. package/dist/formFields/index.cjs +10 -0
  10. package/dist/formFields/index.cjs.map +1 -1
  11. package/dist/formFields/index.mjs +3 -3
  12. package/dist/graphql/index.cjs +10 -5
  13. package/dist/graphql/index.cjs.map +1 -1
  14. package/dist/graphql/index.d.mts +3 -1
  15. package/dist/graphql/index.d.ts +3 -1
  16. package/dist/graphql/index.mjs +1 -1
  17. package/dist/hooks/index.cjs +8 -2
  18. package/dist/hooks/index.cjs.map +1 -1
  19. package/dist/hooks/index.mjs +5 -5
  20. package/dist/index.cjs +76 -47
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.mts +33 -5
  23. package/dist/index.d.ts +33 -5
  24. package/dist/index.mjs +72 -45
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/sharing/index.cjs +6 -0
  27. package/dist/sharing/index.cjs.map +1 -1
  28. package/dist/sharing/index.mjs +2 -2
  29. package/dist/utils/index.cjs +66 -42
  30. package/dist/utils/index.cjs.map +1 -1
  31. package/dist/utils/index.d.mts +30 -4
  32. package/dist/utils/index.d.ts +30 -4
  33. package/dist/utils/index.mjs +10 -6
  34. package/package.json +1 -1
  35. package/dist/chunk-MKHXXZWF.mjs.map +0 -1
  36. package/dist/chunk-T5ZOYS3L.mjs.map +0 -1
  37. /package/dist/{chunk-NMJ2CR2F.mjs.map → chunk-KMS64DE2.mjs.map} +0 -0
  38. /package/dist/{chunk-VL275KFW.mjs.map → chunk-PBW5K54C.mjs.map} +0 -0
@@ -42,13 +42,13 @@ import {
42
42
  vendorStallSize,
43
43
  vendorStartDateFields,
44
44
  vendorTable
45
- } from "../chunk-VL275KFW.mjs";
45
+ } from "../chunk-PBW5K54C.mjs";
46
46
  import {
47
47
  availableCategories,
48
48
  categoryColors
49
- } from "../chunk-BCMBTEGJ.mjs";
49
+ } from "../chunk-DV3K3JDE.mjs";
50
50
  import "../chunk-RE4NZPYY.mjs";
51
- import "../chunk-T5ZOYS3L.mjs";
51
+ import "../chunk-HKTBJOB7.mjs";
52
52
  import "../chunk-5AAYX364.mjs";
53
53
  import "../chunk-RAYUJODN.mjs";
54
54
  import "../chunk-DQ7ZHIXW.mjs";
@@ -1613,8 +1613,8 @@ var RELATION_FIELDS_FRAGMENT = import_client11.gql`
1613
1613
  ${RELATION_DATES_FRAGMENT}
1614
1614
  `;
1615
1615
  var GET_RELATION = import_client11.gql`
1616
- query getRelation($_id: ID!) {
1617
- relation(_id: $_id) {
1616
+ query getRelation($_id: ID!, $futureOnly: Boolean = false) {
1617
+ relation(_id: $_id, futureOnly: $futureOnly) {
1618
1618
  ...RelationFields
1619
1619
  }
1620
1620
  }
@@ -2989,11 +2989,16 @@ var useDeleteRelation = () => {
2989
2989
 
2990
2990
  // src/graphql/hooks/relation/hooksQuery.ts
2991
2991
  var import_client38 = require("@apollo/client");
2992
- var useGetRelation = (_id) => {
2992
+ var useGetRelation = (_id, options) => {
2993
2993
  const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_RELATION, {
2994
- fetchPolicy: "network-only",
2994
+ // `relation(futureOnly)` is a projection-specific view of RelationType.
2995
+ // If this writes into the normalized RelationType cache, a full-history
2996
+ // read (e.g. the statistics screen's `futureOnly: false`) and this one can
2997
+ // overwrite each other's `relationDates` for the same entity id. Keep it
2998
+ // uncached.
2999
+ fetchPolicy: "no-cache",
2995
3000
  skip: !_id,
2996
- variables: _id ? { _id } : void 0
3001
+ variables: _id ? { _id, futureOnly: options?.futureOnly ?? false } : void 0
2997
3002
  });
2998
3003
  const relation = data?.relation;
2999
3004
  return { error, loading, refetch, relation };