@timardex/cluemart-shared 2.1.1 → 2.1.3

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 (71) hide show
  1. package/dist/{ad-sqc3JME-.d.mts → ad-D0xWGTAB.d.mts} +2 -2
  2. package/dist/{ad-CUckkB7I.d.ts → ad-rrCulESo.d.ts} +2 -2
  3. package/dist/{affiliate-7SDCo04C.d.mts → affiliate-C9eTAxEj.d.ts} +3 -3
  4. package/dist/{affiliate-C03r7ssL.d.ts → affiliate-CGe0hR-U.d.mts} +3 -3
  5. package/dist/auth/index.cjs +2 -2
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +3 -3
  8. package/dist/auth/index.d.ts +3 -3
  9. package/dist/auth/index.mjs +1 -1
  10. package/dist/{chunk-6ZH75TAT.mjs → chunk-B22YRNRF.mjs} +2 -2
  11. package/dist/{chunk-Z4FML4VL.mjs → chunk-BTZIWVSF.mjs} +2 -2
  12. package/dist/{chunk-UHZHNJHO.mjs → chunk-HFN6KXX2.mjs} +9 -35
  13. package/dist/chunk-HFN6KXX2.mjs.map +1 -0
  14. package/dist/{chunk-YMLEIEZD.mjs → chunk-MX3L6DSE.mjs} +4 -4
  15. package/dist/chunk-MX3L6DSE.mjs.map +1 -0
  16. package/dist/{chunk-ZSSVU6GY.mjs → chunk-OSSBKFNH.mjs} +3 -3
  17. package/dist/chunk-OSSBKFNH.mjs.map +1 -0
  18. package/dist/{chunk-7XIDMA4Z.mjs → chunk-T7A7ZG55.mjs} +54 -18
  19. package/dist/chunk-T7A7ZG55.mjs.map +1 -0
  20. package/dist/{contactUs-BG3sJ6gc.d.ts → contactUs-Be0zqd9Q.d.ts} +1 -1
  21. package/dist/{contactUs-CWFP59_0.d.mts → contactUs-CQXyz40A.d.mts} +1 -1
  22. package/dist/formFields/index.cjs +34 -42
  23. package/dist/formFields/index.cjs.map +1 -1
  24. package/dist/formFields/index.d.mts +1 -1
  25. package/dist/formFields/index.d.ts +1 -1
  26. package/dist/formFields/index.mjs +3 -3
  27. package/dist/{global-BqeTWrvk.d.ts → global-CAf04GRC.d.ts} +7 -9
  28. package/dist/{global-CWo-hWKZ.d.mts → global-d8RFwoYS.d.mts} +7 -9
  29. package/dist/graphql/index.cjs +4 -4
  30. package/dist/graphql/index.cjs.map +1 -1
  31. package/dist/graphql/index.d.mts +8 -6
  32. package/dist/graphql/index.d.ts +8 -6
  33. package/dist/graphql/index.mjs +2 -2
  34. package/dist/hooks/index.cjs +36 -30
  35. package/dist/hooks/index.cjs.map +1 -1
  36. package/dist/hooks/index.d.mts +5 -5
  37. package/dist/hooks/index.d.ts +5 -5
  38. package/dist/hooks/index.mjs +6 -6
  39. package/dist/index.cjs +62 -44
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.mts +30 -11
  42. package/dist/index.d.ts +30 -11
  43. package/dist/index.mjs +59 -44
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/map/index.d.mts +1 -1
  46. package/dist/map/index.d.ts +1 -1
  47. package/dist/region/index.d.mts +1 -1
  48. package/dist/region/index.d.ts +1 -1
  49. package/dist/{resourceActivities-BbhGFtZA.d.ts → resourceActivities-ByCZO0rJ.d.ts} +1 -1
  50. package/dist/{resourceActivities-D81u7Mu0.d.mts → resourceActivities-DO_PjmMN.d.mts} +1 -1
  51. package/dist/sharing/index.cjs +28 -28
  52. package/dist/sharing/index.cjs.map +1 -1
  53. package/dist/sharing/index.d.mts +1 -1
  54. package/dist/sharing/index.d.ts +1 -1
  55. package/dist/sharing/index.mjs +2 -2
  56. package/dist/types/index.d.mts +7 -7
  57. package/dist/types/index.d.ts +7 -7
  58. package/dist/{user-DKcyf8gn.d.mts → user-BHYl7drL.d.mts} +1 -1
  59. package/dist/{user-2peJoOeK.d.ts → user-DCqDbTLd.d.ts} +1 -1
  60. package/dist/utils/index.cjs +58 -54
  61. package/dist/utils/index.cjs.map +1 -1
  62. package/dist/utils/index.d.mts +25 -6
  63. package/dist/utils/index.d.ts +25 -6
  64. package/dist/utils/index.mjs +13 -7
  65. package/package.json +1 -1
  66. package/dist/chunk-7XIDMA4Z.mjs.map +0 -1
  67. package/dist/chunk-UHZHNJHO.mjs.map +0 -1
  68. package/dist/chunk-YMLEIEZD.mjs.map +0 -1
  69. package/dist/chunk-ZSSVU6GY.mjs.map +0 -1
  70. /package/dist/{chunk-6ZH75TAT.mjs.map → chunk-B22YRNRF.mjs.map} +0 -0
  71. /package/dist/{chunk-Z4FML4VL.mjs.map → chunk-BTZIWVSF.mjs.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode as DocumentNode$1, ApolloError } from '@apollo/client';
3
3
  import { DocumentNode } from 'graphql';
4
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-D81u7Mu0.mjs';
5
- import { M as MutationResponse, E as EventType, d as EventListItemType, e as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, f as RelationType, g as ResourceConnectionsType, V as VendorClaimTokenValidation, h as UnregisteredVendorType, i as VendorType, j as VendorInfoType, k as MyPendingVendorClaim, l as UserLicenceType, m as PostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-CWo-hWKZ.mjs';
6
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-DKcyf8gn.mjs';
7
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdPlatform, b as EnumAdShowOn, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-sqc3JME-.mjs';
4
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-DO_PjmMN.mjs';
5
+ import { M as MutationResponse, E as EventType, d as EventListItemType, e as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, f as RelationType, g as ResourceConnectionsType, V as VendorClaimTokenValidation, h as UnregisteredVendorType, i as VendorType, j as VendorInfoType, k as MyPendingVendorClaim, l as UserLicenceType, m as PostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-d8RFwoYS.mjs';
6
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-BHYl7drL.mjs';
7
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdPlatform, b as EnumAdShowOn, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-D0xWGTAB.mjs';
8
8
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
9
9
  import { B as BillingCatalogEntryType } from '../billingCatalog-DDAU9BWV.mjs';
10
- import { A as AffiliateType } from '../affiliate-7SDCo04C.mjs';
10
+ import { A as AffiliateType } from '../affiliate-CGe0hR-U.mjs';
11
11
  import 'react-hook-form';
12
12
  import '../images/index.mjs';
13
13
 
@@ -332,7 +332,9 @@ declare const useGetEvent: (_id: string) => {
332
332
  event: EventType | null;
333
333
  }>>;
334
334
  };
335
- declare const useGetOwnedEvent: (_id: string) => {
335
+ declare const useGetOwnedEvent: (_id: string, options?: {
336
+ futureOnly?: boolean;
337
+ }) => {
336
338
  error: _apollo_client.ApolloError | undefined;
337
339
  event: EventType | null;
338
340
  loading: boolean;
@@ -1,13 +1,13 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode as DocumentNode$1, ApolloError } from '@apollo/client';
3
3
  import { DocumentNode } from 'graphql';
4
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-BbhGFtZA.js';
5
- import { M as MutationResponse, E as EventType, d as EventListItemType, e as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, f as RelationType, g as ResourceConnectionsType, V as VendorClaimTokenValidation, h as UnregisteredVendorType, i as VendorType, j as VendorInfoType, k as MyPendingVendorClaim, l as UserLicenceType, m as PostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-BqeTWrvk.js';
6
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-2peJoOeK.js';
7
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdPlatform, b as EnumAdShowOn, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-CUckkB7I.js';
4
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-ByCZO0rJ.js';
5
+ import { M as MutationResponse, E as EventType, d as EventListItemType, e as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, f as RelationType, g as ResourceConnectionsType, V as VendorClaimTokenValidation, h as UnregisteredVendorType, i as VendorType, j as VendorInfoType, k as MyPendingVendorClaim, l as UserLicenceType, m as PostType, G as GameDocType, n as GameLeaderboard, o as CouponType, p as CouponTypeList } from '../global-CAf04GRC.js';
6
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, U as UsersByPromoCode, c as SubscriptionStatusData, d as SubscriptionPlansResponse } from '../user-DCqDbTLd.js';
7
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdPlatform, b as EnumAdShowOn, c as AppSettingsType, S as SchoolType, d as SchoolReturnType } from '../ad-rrCulESo.js';
8
8
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
9
9
  import { B as BillingCatalogEntryType } from '../billingCatalog-oWAfZX95.js';
10
- import { A as AffiliateType } from '../affiliate-C03r7ssL.js';
10
+ import { A as AffiliateType } from '../affiliate-C9eTAxEj.js';
11
11
  import 'react-hook-form';
12
12
  import '../images/index.js';
13
13
 
@@ -332,7 +332,9 @@ declare const useGetEvent: (_id: string) => {
332
332
  event: EventType | null;
333
333
  }>>;
334
334
  };
335
- declare const useGetOwnedEvent: (_id: string) => {
335
+ declare const useGetOwnedEvent: (_id: string, options?: {
336
+ futureOnly?: boolean;
337
+ }) => {
336
338
  error: _apollo_client.ApolloError | undefined;
337
339
  event: EventType | null;
338
340
  loading: boolean;
@@ -162,7 +162,7 @@ import {
162
162
  useUpdateUser,
163
163
  useUpdateVendor,
164
164
  useUpdateVendorInfo
165
- } from "../chunk-YMLEIEZD.mjs";
165
+ } from "../chunk-MX3L6DSE.mjs";
166
166
  import {
167
167
  GET_EVENT,
168
168
  GET_EVENTS,
@@ -189,7 +189,7 @@ import {
189
189
  useRequestPasswordReset,
190
190
  useResetPassword,
191
191
  useValidateVerificationToken
192
- } from "../chunk-ZSSVU6GY.mjs";
192
+ } from "../chunk-OSSBKFNH.mjs";
193
193
  import "../chunk-7DQBUZXY.mjs";
194
194
  import "../chunk-7TZDJXYL.mjs";
195
195
  export {
@@ -387,11 +387,29 @@ var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
387
387
  var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
388
388
  var import_utc = __toESM(require("dayjs/plugin/utc.js"));
389
389
 
390
- // src/utils/mapArrayToOptions.ts
391
- var mapArrayToOptions = (items) => items.map((item) => ({
392
- label: item,
393
- value: item
394
- }));
390
+ // src/utils/eventDateStatus.ts
391
+ var EVENT_DATE_STATUS_PERIOD_MAP = {
392
+ ["Today" /* TODAY */]: [
393
+ "Started" /* STARTED */,
394
+ "Starting_Soon" /* STARTING_SOON */,
395
+ "Today" /* TODAY */
396
+ ],
397
+ ["This_Week" /* THIS_WEEK */]: [
398
+ "Started" /* STARTED */,
399
+ "Starting_Soon" /* STARTING_SOON */,
400
+ "This_Week" /* THIS_WEEK */,
401
+ "Today" /* TODAY */,
402
+ "Tomorrow" /* TOMORROW */
403
+ ]
404
+ };
405
+ var FUTURE_EVENT_DATE_STATUSES = [
406
+ "Starting_Soon" /* STARTING_SOON */,
407
+ "Today" /* TODAY */,
408
+ "Tomorrow" /* TOMORROW */,
409
+ "This_Week" /* THIS_WEEK */,
410
+ "Next_Week" /* NEXT_WEEK */,
411
+ "Upcoming" /* UPCOMING */
412
+ ];
395
413
 
396
414
  // src/utils/date.ts
397
415
  var dateFormat = "DD-MM-YYYY";
@@ -400,13 +418,17 @@ import_dayjs.default.extend(import_customParseFormat.default);
400
418
  import_dayjs.default.extend(import_utc.default);
401
419
  import_dayjs.default.extend(import_timezone.default);
402
420
  import_dayjs.default.extend(import_isSameOrAfter.default);
403
- var futureTimePeriods = mapArrayToOptions(
404
- Object.values(EnumEventDateStatus)
405
- ).filter(
406
- (period) => period.value !== "Starting_Soon" /* STARTING_SOON */ && period.value !== "Canceled" /* CANCELED */ && period.value !== "Rescheduled" /* RE_SCHEDULED */ && period.value !== "Started" /* STARTED */ && period.value !== "Ended" /* ENDED */ && period.value !== "Invalid" /* INVALID */
407
- ).map((period) => ({
408
- label: period.value.replaceAll("_", " "),
409
- value: period.value
421
+ var futureTimePeriods = FUTURE_EVENT_DATE_STATUSES.filter(
422
+ (status) => status !== "Starting_Soon" /* STARTING_SOON */
423
+ ).map((status) => ({
424
+ label: status.replaceAll("_", " "),
425
+ value: status
426
+ }));
427
+
428
+ // src/utils/mapArrayToOptions.ts
429
+ var mapArrayToOptions = (items) => items.map((item) => ({
430
+ label: item,
431
+ value: item
410
432
  }));
411
433
 
412
434
  // src/sharing/relationShareTypes.ts
@@ -600,22 +622,6 @@ var CM_AFFILIATE_PROMO_CODE = `${PROMO_CODE_PREFIX}AFFILIATE`;
600
622
  // src/utils/school.ts
601
623
  var SCHOOL_MIN_STUDENT_COUNT = 300;
602
624
 
603
- // src/utils/eventDateStatus.ts
604
- var EVENT_DATE_STATUS_PERIOD_MAP = {
605
- ["Today" /* TODAY */]: [
606
- "Started" /* STARTED */,
607
- "Starting_Soon" /* STARTING_SOON */,
608
- "Today" /* TODAY */
609
- ],
610
- ["This_Week" /* THIS_WEEK */]: [
611
- "Started" /* STARTED */,
612
- "Starting_Soon" /* STARTING_SOON */,
613
- "This_Week" /* THIS_WEEK */,
614
- "Today" /* TODAY */,
615
- "Tomorrow" /* TOMORROW */
616
- ]
617
- };
618
-
619
625
  // src/calendar/eventCalendar.ts
620
626
  var import_dayjs2 = __toESM(require("dayjs"));
621
627
  var KNOWN_EVENT_SCHEDULE_STATUSES = /* @__PURE__ */ new Set([
@@ -3074,8 +3080,8 @@ var GET_EVENT = import_client2.gql`
3074
3080
  ${EVENT}
3075
3081
  `;
3076
3082
  var GET_OWNED_EVENT = import_client2.gql`
3077
- query getOwnedEvent($_id: ID!) {
3078
- ownedEvent(_id: $_id) {
3083
+ query getOwnedEvent($_id: ID!, $futureOnly: Boolean = false) {
3084
+ ownedEvent(_id: $_id, futureOnly: $futureOnly) {
3079
3085
  ...EventFields
3080
3086
  }
3081
3087
  }