@timardex/cluemart-shared 1.5.721 → 1.5.723

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 (44) hide show
  1. package/dist/{chunk-KFTS32TG.mjs → chunk-3AI2ROPT.mjs} +43 -14
  2. package/dist/chunk-3AI2ROPT.mjs.map +1 -0
  3. package/dist/{chunk-6B75Q67V.mjs → chunk-4SNW63TJ.mjs} +2 -1
  4. package/dist/{chunk-6B75Q67V.mjs.map → chunk-4SNW63TJ.mjs.map} +1 -1
  5. package/dist/{chunk-JZY6HGS7.mjs → chunk-6IEQBYEB.mjs} +3 -3
  6. package/dist/{chunk-PWJWWXIP.mjs → chunk-HGS6TJTA.mjs} +35 -3
  7. package/dist/chunk-HGS6TJTA.mjs.map +1 -0
  8. package/dist/{chunk-PRAR43V7.mjs → chunk-SG3S3VQ2.mjs} +2 -2
  9. package/dist/enums/index.cjs +1 -0
  10. package/dist/enums/index.cjs.map +1 -1
  11. package/dist/enums/index.d.mts +2 -1
  12. package/dist/enums/index.d.ts +2 -1
  13. package/dist/enums/index.mjs +1 -1
  14. package/dist/formFields/index.cjs +16 -0
  15. package/dist/formFields/index.cjs.map +1 -1
  16. package/dist/formFields/index.mjs +3 -3
  17. package/dist/graphql/index.cjs +42 -13
  18. package/dist/graphql/index.cjs.map +1 -1
  19. package/dist/graphql/index.d.mts +5 -5
  20. package/dist/graphql/index.d.ts +5 -5
  21. package/dist/graphql/index.mjs +2 -2
  22. package/dist/hooks/index.cjs +49 -7
  23. package/dist/hooks/index.cjs.map +1 -1
  24. package/dist/hooks/index.mjs +5 -5
  25. package/dist/index.cjs +79 -13
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +14 -6
  28. package/dist/index.d.ts +14 -6
  29. package/dist/index.mjs +75 -13
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/sharing/index.cjs +16 -0
  32. package/dist/sharing/index.cjs.map +1 -1
  33. package/dist/sharing/index.mjs +3 -3
  34. package/dist/types/index.mjs +1 -1
  35. package/dist/utils/index.cjs +36 -0
  36. package/dist/utils/index.cjs.map +1 -1
  37. package/dist/utils/index.d.mts +10 -3
  38. package/dist/utils/index.d.ts +10 -3
  39. package/dist/utils/index.mjs +10 -2
  40. package/package.json +1 -1
  41. package/dist/chunk-KFTS32TG.mjs.map +0 -1
  42. package/dist/chunk-PWJWWXIP.mjs.map +0 -1
  43. /package/dist/{chunk-JZY6HGS7.mjs.map → chunk-6IEQBYEB.mjs.map} +0 -0
  44. /package/dist/{chunk-PRAR43V7.mjs.map → chunk-SG3S3VQ2.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
- import { EnumResourceType } from '../enums/index.mjs';
2
+ import { EnumResourceType, EnumEventDateStatus } from '../enums/index.mjs';
3
3
  import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as PostType, g as EnumPostType, h as AppSettingsType, G as GameDocType, i as GameLeaderboard, j as SchoolReturnType, k as SchoolType } from '../post-C3-IUdTA.mjs';
4
4
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CZqXBve8.mjs';
5
5
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-BEUzBSyY.mjs';
@@ -266,7 +266,7 @@ declare const useUpdateEventInfo: () => {
266
266
  }>>;
267
267
  };
268
268
 
269
- declare const useGetEvents: () => {
269
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
270
270
  error: _apollo_client.ApolloError | undefined;
271
271
  events: EventListItemType[];
272
272
  loading: boolean;
@@ -290,7 +290,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
290
290
  eventByPlaceId: EventListItemType | null;
291
291
  }>>;
292
292
  };
293
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
293
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
294
294
  error: _apollo_client.ApolloError | undefined;
295
295
  eventsByRegion: EventListItemType[];
296
296
  fetchMore: <TFetchData = {
@@ -310,7 +310,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
310
310
  eventsByRegion: EventListItemType[];
311
311
  }>>;
312
312
  };
313
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
313
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
314
314
  error: _apollo_client.ApolloError | undefined;
315
315
  eventsSearch: EventListItemType[];
316
316
  loading: boolean;
@@ -322,7 +322,7 @@ declare const useGetEventsNearMe: (location: {
322
322
  latitude: number;
323
323
  longitude: number;
324
324
  radius?: number;
325
- }) => {
325
+ }, dateStatus?: EnumEventDateStatus) => {
326
326
  error: _apollo_client.ApolloError | undefined;
327
327
  eventsNearMe: EventListItemType[];
328
328
  loading: boolean;
@@ -1,5 +1,5 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
- import { EnumResourceType } from '../enums/index.js';
2
+ import { EnumResourceType, EnumEventDateStatus } from '../enums/index.js';
3
3
  import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as PostType, g as EnumPostType, h as AppSettingsType, G as GameDocType, i as GameLeaderboard, j as SchoolReturnType, k as SchoolType } from '../post-DmsQS24-.js';
4
4
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CjJdhVR7.js';
5
5
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-585slmSH.js';
@@ -266,7 +266,7 @@ declare const useUpdateEventInfo: () => {
266
266
  }>>;
267
267
  };
268
268
 
269
- declare const useGetEvents: () => {
269
+ declare const useGetEvents: (dateStatus?: EnumEventDateStatus) => {
270
270
  error: _apollo_client.ApolloError | undefined;
271
271
  events: EventListItemType[];
272
272
  loading: boolean;
@@ -290,7 +290,7 @@ declare const useGetEventByPlaceId: (googlePlaceId: string) => {
290
290
  eventByPlaceId: EventListItemType | null;
291
291
  }>>;
292
292
  };
293
- declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
293
+ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesByRegionOptions, dateStatus?: EnumEventDateStatus) => {
294
294
  error: _apollo_client.ApolloError | undefined;
295
295
  eventsByRegion: EventListItemType[];
296
296
  fetchMore: <TFetchData = {
@@ -310,7 +310,7 @@ declare const useGetEventsByRegion: (region: string, options?: UseGetResourcesBy
310
310
  eventsByRegion: EventListItemType[];
311
311
  }>>;
312
312
  };
313
- declare const useSearchEvents: (region: string, search?: string, tags?: string[]) => {
313
+ declare const useSearchEvents: (region: string, searchQuery?: string, tags?: string[], dateStatus?: EnumEventDateStatus) => {
314
314
  error: _apollo_client.ApolloError | undefined;
315
315
  eventsSearch: EventListItemType[];
316
316
  loading: boolean;
@@ -322,7 +322,7 @@ declare const useGetEventsNearMe: (location: {
322
322
  latitude: number;
323
323
  longitude: number;
324
324
  radius?: number;
325
- }) => {
325
+ }, dateStatus?: EnumEventDateStatus) => {
326
326
  error: _apollo_client.ApolloError | undefined;
327
327
  eventsNearMe: EventListItemType[];
328
328
  loading: boolean;
@@ -136,8 +136,8 @@ import {
136
136
  useUpdateVendor,
137
137
  useUpdateVendorInfo,
138
138
  useValidateVerificationToken
139
- } from "../chunk-KFTS32TG.mjs";
140
- import "../chunk-6B75Q67V.mjs";
139
+ } from "../chunk-3AI2ROPT.mjs";
140
+ import "../chunk-4SNW63TJ.mjs";
141
141
  export {
142
142
  useAddParticipantToChat,
143
143
  useAddUserFavouriteResource,
@@ -276,6 +276,7 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
276
276
  EnumEventDateStatus2["ENDED"] = "Ended";
277
277
  EnumEventDateStatus2["RE_SCHEDULED"] = "Rescheduled";
278
278
  EnumEventDateStatus2["CANCELED"] = "Canceled";
279
+ EnumEventDateStatus2["INVALID"] = "Invalid";
279
280
  return EnumEventDateStatus2;
280
281
  })(EnumEventDateStatus || {});
281
282
 
@@ -462,6 +463,22 @@ var rewardNiceNames = {
462
463
  // src/utils/school.ts
463
464
  var SCHOOL_MIN_STUDENT_COUNT = 300;
464
465
 
466
+ // src/utils/eventDateStatus.ts
467
+ var EVENT_DATE_STATUS_PERIOD_MAP = {
468
+ ["Today" /* TODAY */]: [
469
+ "Started" /* STARTED */,
470
+ "Starting_Soon" /* STARTING_SOON */,
471
+ "Today" /* TODAY */
472
+ ],
473
+ ["This_Week" /* THIS_WEEK */]: [
474
+ "Started" /* STARTED */,
475
+ "Starting_Soon" /* STARTING_SOON */,
476
+ "This_Week" /* THIS_WEEK */,
477
+ "Today" /* TODAY */,
478
+ "Tomorrow" /* TOMORROW */
479
+ ]
480
+ };
481
+
465
482
  // src/yupSchema/global.ts
466
483
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
467
484
  var nzbnRegex = /^94\d{11}$/;
@@ -2693,8 +2710,8 @@ var EVENT = import_client3.gql`
2693
2710
  ${RELATION_DATES_FRAGMENT}
2694
2711
  `;
2695
2712
  var GET_EVENTS = import_client3.gql`
2696
- query getEvents {
2697
- events {
2713
+ query getEvents($dateStatus: EventDateStatusEnumType) {
2714
+ events(dateStatus: $dateStatus) {
2698
2715
  ...EventListItemFields
2699
2716
  }
2700
2717
  }
@@ -2720,24 +2737,49 @@ var GET_EVENTS_BY_REGION = import_client3.gql`
2720
2737
  query getEventsByRegion(
2721
2738
  $region: String!
2722
2739
  $options: ResourcesByRegionOptions
2740
+ $dateStatus: EventDateStatusEnumType
2723
2741
  ) {
2724
- eventsByRegion(region: $region, options: $options) {
2742
+ eventsByRegion(
2743
+ region: $region
2744
+ options: $options
2745
+ dateStatus: $dateStatus
2746
+ ) {
2725
2747
  ...EventListItemFields
2726
2748
  }
2727
2749
  }
2728
2750
  ${EVENT_LIST_ITEM}
2729
2751
  `;
2730
2752
  var SEARCH_EVENTS = import_client3.gql`
2731
- query searchEvents($region: String, $search: String, $tags: [String]) {
2732
- eventsSearch(region: $region, search: $search, tags: $tags) {
2753
+ query searchEvents(
2754
+ $region: String
2755
+ $search: String
2756
+ $tags: [String]
2757
+ $dateStatus: EventDateStatusEnumType
2758
+ ) {
2759
+ eventsSearch(
2760
+ region: $region
2761
+ search: $search
2762
+ tags: $tags
2763
+ dateStatus: $dateStatus
2764
+ ) {
2733
2765
  ...EventListItemFields
2734
2766
  }
2735
2767
  }
2736
2768
  ${EVENT_LIST_ITEM}
2737
2769
  `;
2738
2770
  var GET_EVENTS_NEAR_ME = import_client3.gql`
2739
- query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
2740
- eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
2771
+ query getEventsNearMe(
2772
+ $latitude: Float!
2773
+ $longitude: Float!
2774
+ $radius: Int
2775
+ $dateStatus: EventDateStatusEnumType
2776
+ ) {
2777
+ eventsNearMe(
2778
+ latitude: $latitude
2779
+ longitude: $longitude
2780
+ radius: $radius
2781
+ dateStatus: $dateStatus
2782
+ ) {
2741
2783
  ...EventListItemFields
2742
2784
  }
2743
2785
  }