@timardex/cluemart-shared 2.2.11 → 2.2.13

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 (36) hide show
  1. package/dist/{chunk-576YBZYO.mjs → chunk-4DFWOUOT.mjs} +2 -2
  2. package/dist/{chunk-UIG4A4U3.mjs → chunk-KGYLNZQW.mjs} +2 -2
  3. package/dist/{chunk-2DTCLBHT.mjs → chunk-MTBH5LMV.mjs} +95 -21
  4. package/dist/chunk-MTBH5LMV.mjs.map +1 -0
  5. package/dist/{chunk-GOWIY4NZ.mjs → chunk-QSBAN3V5.mjs} +9 -1
  6. package/dist/chunk-QSBAN3V5.mjs.map +1 -0
  7. package/dist/{chunk-VWGCXGEL.mjs → chunk-YKJAOTF7.mjs} +2 -2
  8. package/dist/formFields/index.cjs +16 -7
  9. package/dist/formFields/index.cjs.map +1 -1
  10. package/dist/formFields/index.mjs +3 -3
  11. package/dist/graphql/index.cjs +8 -0
  12. package/dist/graphql/index.cjs.map +1 -1
  13. package/dist/graphql/index.mjs +1 -1
  14. package/dist/hooks/index.cjs +36 -25
  15. package/dist/hooks/index.cjs.map +1 -1
  16. package/dist/hooks/index.mjs +5 -5
  17. package/dist/index.cjs +106 -22
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.mts +17 -1
  20. package/dist/index.d.ts +17 -1
  21. package/dist/index.mjs +104 -22
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/sharing/index.cjs +20 -9
  24. package/dist/sharing/index.cjs.map +1 -1
  25. package/dist/sharing/index.mjs +2 -2
  26. package/dist/utils/index.cjs +98 -22
  27. package/dist/utils/index.cjs.map +1 -1
  28. package/dist/utils/index.d.mts +17 -1
  29. package/dist/utils/index.d.ts +17 -1
  30. package/dist/utils/index.mjs +7 -3
  31. package/package.json +1 -1
  32. package/dist/chunk-2DTCLBHT.mjs.map +0 -1
  33. package/dist/chunk-GOWIY4NZ.mjs.map +0 -1
  34. /package/dist/{chunk-576YBZYO.mjs.map → chunk-4DFWOUOT.mjs.map} +0 -0
  35. /package/dist/{chunk-UIG4A4U3.mjs.map → chunk-KGYLNZQW.mjs.map} +0 -0
  36. /package/dist/{chunk-VWGCXGEL.mjs.map → chunk-YKJAOTF7.mjs.map} +0 -0
@@ -42,13 +42,13 @@ import {
42
42
  vendorStallSize,
43
43
  vendorStartDateFields,
44
44
  vendorTable
45
- } from "../chunk-576YBZYO.mjs";
45
+ } from "../chunk-4DFWOUOT.mjs";
46
46
  import {
47
47
  availableCategories,
48
48
  categoryColors
49
- } from "../chunk-UIG4A4U3.mjs";
49
+ } from "../chunk-KGYLNZQW.mjs";
50
50
  import "../chunk-RE4NZPYY.mjs";
51
- import "../chunk-2DTCLBHT.mjs";
51
+ import "../chunk-MTBH5LMV.mjs";
52
52
  import "../chunk-MRBTCICB.mjs";
53
53
  import "../chunk-RAYUJODN.mjs";
54
54
  import "../chunk-DQ7ZHIXW.mjs";
@@ -2300,14 +2300,22 @@ var UPDATE_EVENT_INFO_MUTATION = import_client23.gql`
2300
2300
  // src/graphql/hooks/event/hooksMutation.ts
2301
2301
  var useCreateEvent = () => {
2302
2302
  const [createEvent, { loading, error }] = (0, import_client24.useMutation)(CREATE_EVENT_MUTATION, {
2303
+ // The mutation response is a live-only view of EventType. Don't write it
2304
+ // into the normalized EventType cache, where it would overwrite the full
2305
+ // (live + archived) `dateTime` that `getEvent` fetches for the detail page.
2303
2306
  awaitRefetchQueries: true,
2307
+ fetchPolicy: "no-cache",
2304
2308
  refetchQueries: [{ query: GET_USER_EVENTS }]
2305
2309
  });
2306
2310
  return { createEvent, error, loading };
2307
2311
  };
2308
2312
  var useUpdateEvent = () => {
2309
2313
  const [updateEvent, { loading, error }] = (0, import_client24.useMutation)(UPDATE_EVENT_MUTATION, {
2314
+ // See useCreateEvent: the update response only carries the live schedule,
2315
+ // so keep it out of the normalized EventType cache to avoid clobbering the
2316
+ // archived dates merged by `getEvent`.
2310
2317
  awaitRefetchQueries: true,
2318
+ fetchPolicy: "no-cache",
2311
2319
  refetchQueries: (mutationResult) => {
2312
2320
  const eventId = mutationResult?.data?.updateEvent?.data?._id;
2313
2321
  if (!eventId) return [];