@timardex/cluemart-shared 1.5.721 → 1.5.722

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-6B75Q67V.mjs → chunk-4SNW63TJ.mjs} +2 -1
  2. package/dist/{chunk-6B75Q67V.mjs.map → chunk-4SNW63TJ.mjs.map} +1 -1
  3. package/dist/{chunk-KFTS32TG.mjs → chunk-HWLNH6G2.mjs} +43 -14
  4. package/dist/chunk-HWLNH6G2.mjs.map +1 -0
  5. package/dist/{chunk-PWJWWXIP.mjs → chunk-KL533AIU.mjs} +2 -2
  6. package/dist/{chunk-PRAR43V7.mjs → chunk-YAPBZ7DK.mjs} +2 -2
  7. package/dist/{chunk-JZY6HGS7.mjs → chunk-ZN5HT2J4.mjs} +3 -3
  8. package/dist/enums/index.cjs +1 -0
  9. package/dist/enums/index.cjs.map +1 -1
  10. package/dist/enums/index.d.mts +2 -1
  11. package/dist/enums/index.d.ts +2 -1
  12. package/dist/enums/index.mjs +1 -1
  13. package/dist/formFields/index.cjs.map +1 -1
  14. package/dist/formFields/index.mjs +3 -3
  15. package/dist/graphql/index.cjs +42 -13
  16. package/dist/graphql/index.cjs.map +1 -1
  17. package/dist/graphql/index.d.mts +5 -5
  18. package/dist/graphql/index.d.ts +5 -5
  19. package/dist/graphql/index.mjs +2 -2
  20. package/dist/hooks/index.cjs +33 -7
  21. package/dist/hooks/index.cjs.map +1 -1
  22. package/dist/hooks/index.mjs +5 -5
  23. package/dist/index.cjs +43 -13
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.mts +6 -5
  26. package/dist/index.d.ts +6 -5
  27. package/dist/index.mjs +43 -13
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/sharing/index.cjs.map +1 -1
  30. package/dist/sharing/index.mjs +3 -3
  31. package/dist/types/index.mjs +1 -1
  32. package/dist/utils/index.cjs.map +1 -1
  33. package/dist/utils/index.mjs +2 -2
  34. package/package.json +1 -1
  35. package/dist/chunk-KFTS32TG.mjs.map +0 -1
  36. /package/dist/{chunk-PWJWWXIP.mjs.map → chunk-KL533AIU.mjs.map} +0 -0
  37. /package/dist/{chunk-PRAR43V7.mjs.map → chunk-YAPBZ7DK.mjs.map} +0 -0
  38. /package/dist/{chunk-JZY6HGS7.mjs.map → chunk-ZN5HT2J4.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -201,7 +201,8 @@ declare enum EnumEventDateStatus {
201
201
  UPCOMING = "Upcoming",
202
202
  ENDED = "Ended",
203
203
  RE_SCHEDULED = "Rescheduled",
204
- CANCELED = "Canceled"
204
+ CANCELED = "Canceled",
205
+ INVALID = "Invalid"
205
206
  }
206
207
  declare enum EnumSubscriptionStatus {
207
208
  ACTIVE = "active",
@@ -1750,7 +1751,7 @@ declare const useUpdateEventInfo: () => {
1750
1751
  }>>;
1751
1752
  };
1752
1753
 
1753
- declare const useGetEvents: () => {
1754
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
1754
1755
  error: _apollo_client.ApolloError | undefined;
1755
1756
  events: EventListItemType[];
1756
1757
  loading: boolean;
@@ -1774,7 +1775,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
1774
1775
  eventByPlaceId: EventListItemType | null;
1775
1776
  }>>;
1776
1777
  };
1777
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
1778
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
1778
1779
  error: _apollo_client.ApolloError | undefined;
1779
1780
  eventsByRegion: EventListItemType[];
1780
1781
  fetchMore: <TFetchData = {
@@ -1794,7 +1795,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
1794
1795
  eventsByRegion: EventListItemType[];
1795
1796
  }>>;
1796
1797
  };
1797
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
1798
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
1798
1799
  error: _apollo_client.ApolloError | undefined;
1799
1800
  eventsSearch: EventListItemType[];
1800
1801
  loading: boolean;
@@ -1806,7 +1807,7 @@ declare const useGetEventsNearMe: (location: {
1806
1807
  latitude: number;
1807
1808
  longitude: number;
1808
1809
  radius?: number;
1809
- }) => {
1810
+ }, dateStatus?: EnumEventDateStatus) => {
1810
1811
  error: _apollo_client.ApolloError | undefined;
1811
1812
  eventsNearMe: EventListItemType[];
1812
1813
  loading: boolean;
package/dist/index.d.ts CHANGED
@@ -201,7 +201,8 @@ declare enum EnumEventDateStatus {
201
201
  UPCOMING = "Upcoming",
202
202
  ENDED = "Ended",
203
203
  RE_SCHEDULED = "Rescheduled",
204
- CANCELED = "Canceled"
204
+ CANCELED = "Canceled",
205
+ INVALID = "Invalid"
205
206
  }
206
207
  declare enum EnumSubscriptionStatus {
207
208
  ACTIVE = "active",
@@ -1750,7 +1751,7 @@ declare const useUpdateEventInfo: () => {
1750
1751
  }>>;
1751
1752
  };
1752
1753
 
1753
- declare const useGetEvents: () => {
1754
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
1754
1755
  error: _apollo_client.ApolloError | undefined;
1755
1756
  events: EventListItemType[];
1756
1757
  loading: boolean;
@@ -1774,7 +1775,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
1774
1775
  eventByPlaceId: EventListItemType | null;
1775
1776
  }>>;
1776
1777
  };
1777
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
1778
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
1778
1779
  error: _apollo_client.ApolloError | undefined;
1779
1780
  eventsByRegion: EventListItemType[];
1780
1781
  fetchMore: <TFetchData = {
@@ -1794,7 +1795,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
1794
1795
  eventsByRegion: EventListItemType[];
1795
1796
  }>>;
1796
1797
  };
1797
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
1798
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
1798
1799
  error: _apollo_client.ApolloError | undefined;
1799
1800
  eventsSearch: EventListItemType[];
1800
1801
  loading: boolean;
@@ -1806,7 +1807,7 @@ declare const useGetEventsNearMe: (location: {
1806
1807
  latitude: number;
1807
1808
  longitude: number;
1808
1809
  radius?: number;
1809
- }) => {
1810
+ }, dateStatus?: EnumEventDateStatus) => {
1810
1811
  error: _apollo_client.ApolloError | undefined;
1811
1812
  eventsNearMe: EventListItemType[];
1812
1813
  loading: boolean;
package/dist/index.mjs CHANGED
@@ -218,6 +218,7 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
218
218
  EnumEventDateStatus2["ENDED"] = "Ended";
219
219
  EnumEventDateStatus2["RE_SCHEDULED"] = "Rescheduled";
220
220
  EnumEventDateStatus2["CANCELED"] = "Canceled";
221
+ EnumEventDateStatus2["INVALID"] = "Invalid";
221
222
  return EnumEventDateStatus2;
222
223
  })(EnumEventDateStatus || {});
223
224
  var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus2) => {
@@ -2915,8 +2916,8 @@ var EVENT = gql3`
2915
2916
  ${RELATION_DATES_FRAGMENT}
2916
2917
  `;
2917
2918
  var GET_EVENTS = gql3`
2918
- query getEvents {
2919
- events {
2919
+ query getEvents($dateStatus: EnumEventDateStatus) {
2920
+ events(dateStatus: $dateStatus) {
2920
2921
  ...EventListItemFields
2921
2922
  }
2922
2923
  }
@@ -2942,24 +2943,49 @@ var GET_EVENTS_BY_REGION = gql3`
2942
2943
  query getEventsByRegion(
2943
2944
  $region: String!
2944
2945
  $options: ResourcesByRegionOptions
2946
+ $dateStatus: EnumEventDateStatus
2945
2947
  ) {
2946
- eventsByRegion(region: $region, options: $options) {
2948
+ eventsByRegion(
2949
+ region: $region
2950
+ options: $options
2951
+ dateStatus: $dateStatus
2952
+ ) {
2947
2953
  ...EventListItemFields
2948
2954
  }
2949
2955
  }
2950
2956
  ${EVENT_LIST_ITEM}
2951
2957
  `;
2952
2958
  var SEARCH_EVENTS = gql3`
2953
- query searchEvents($region: String, $search: String, $tags: [String]) {
2954
- eventsSearch(region: $region, search: $search, tags: $tags) {
2959
+ query searchEvents(
2960
+ $region: String
2961
+ $search: String
2962
+ $tags: [String]
2963
+ $dateStatus: EnumEventDateStatus
2964
+ ) {
2965
+ eventsSearch(
2966
+ region: $region
2967
+ search: $search
2968
+ tags: $tags
2969
+ dateStatus: $dateStatus
2970
+ ) {
2955
2971
  ...EventListItemFields
2956
2972
  }
2957
2973
  }
2958
2974
  ${EVENT_LIST_ITEM}
2959
2975
  `;
2960
2976
  var GET_EVENTS_NEAR_ME = gql3`
2961
- query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
2962
- eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
2977
+ query getEventsNearMe(
2978
+ $latitude: Float!
2979
+ $longitude: Float!
2980
+ $radius: Int
2981
+ $dateStatus: EnumEventDateStatus
2982
+ ) {
2983
+ eventsNearMe(
2984
+ latitude: $latitude
2985
+ longitude: $longitude
2986
+ radius: $radius
2987
+ dateStatus: $dateStatus
2988
+ ) {
2963
2989
  ...EventListItemFields
2964
2990
  }
2965
2991
  }
@@ -4047,9 +4073,10 @@ var useUpdateEventInfo = () => {
4047
4073
 
4048
4074
  // src/graphql/hooks/event/hooksQuery.ts
4049
4075
  import { useQuery as useQuery2 } from "@apollo/client";
4050
- var useGetEvents = () => {
4076
+ var useGetEvents = (dateStatus) => {
4051
4077
  const { loading, error, data, refetch } = useQuery2(GET_EVENTS, {
4052
- fetchPolicy: "network-only"
4078
+ fetchPolicy: "network-only",
4079
+ variables: { dateStatus }
4053
4080
  });
4054
4081
  const events = data?.events || [];
4055
4082
  return { error, events, loading, refetch };
@@ -4072,8 +4099,9 @@ var useGetEventByPlaceId = (googlePlaceId) => {
4072
4099
  const eventByPlaceId = data?.eventByPlaceId || null;
4073
4100
  return { error, eventByPlaceId, loading, refetch };
4074
4101
  };
4075
- var useGetEventsByRegion = (region, options) => {
4102
+ var useGetEventsByRegion = (region, options, dateStatus) => {
4076
4103
  const variables = {
4104
+ dateStatus,
4077
4105
  options,
4078
4106
  region
4079
4107
  };
@@ -4091,14 +4119,15 @@ var useGetEventsByRegion = (region, options) => {
4091
4119
  refetch
4092
4120
  };
4093
4121
  };
4094
- var useSearchEvents = (region, search, tags) => {
4095
- const normalizedSearch = search?.trim() ?? "";
4122
+ var useSearchEvents = (region, searchQuery, tags, dateStatus) => {
4123
+ const normalizedSearch = searchQuery?.trim() ?? "";
4096
4124
  const normalizedTags = (tags ?? []).filter(Boolean);
4097
4125
  const shouldRunQuery = Boolean(region?.trim()) && (normalizedSearch.length > 3 || normalizedTags.length > 0);
4098
4126
  const { loading, error, data, refetch } = useQuery2(SEARCH_EVENTS, {
4099
4127
  fetchPolicy: "network-only",
4100
4128
  skip: !shouldRunQuery,
4101
4129
  variables: {
4130
+ dateStatus,
4102
4131
  region,
4103
4132
  search: normalizedSearch,
4104
4133
  tags: normalizedTags
@@ -4111,11 +4140,12 @@ var useSearchEvents = (region, search, tags) => {
4111
4140
  refetch
4112
4141
  };
4113
4142
  };
4114
- var useGetEventsNearMe = (location) => {
4143
+ var useGetEventsNearMe = (location, dateStatus) => {
4115
4144
  const { loading, error, data, refetch } = useQuery2(GET_EVENTS_NEAR_ME, {
4116
4145
  fetchPolicy: "network-only",
4117
4146
  skip: !location.latitude || !location.longitude,
4118
4147
  variables: {
4148
+ dateStatus,
4119
4149
  latitude: location.latitude,
4120
4150
  longitude: location.longitude,
4121
4151
  radius: location.radius || 1e4