@timardex/cluemart-shared 1.5.509 → 1.5.511

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 (41) hide show
  1. package/dist/{chunk-RQDZX76B.mjs → chunk-2GSMGPKT.mjs} +19 -8
  2. package/dist/{chunk-RQDZX76B.mjs.map → chunk-2GSMGPKT.mjs.map} +1 -1
  3. package/dist/{chunk-UOPC7KMU.mjs → chunk-FTEZFZZW.mjs} +10 -19
  4. package/dist/chunk-FTEZFZZW.mjs.map +1 -0
  5. package/dist/{chunk-7GWVTPXL.mjs → chunk-LJJCZVW4.mjs} +3 -2
  6. package/dist/{chunk-7GWVTPXL.mjs.map → chunk-LJJCZVW4.mjs.map} +1 -1
  7. package/dist/{chunk-EFNSI75F.mjs → chunk-OMXMDHJ3.mjs} +2 -2
  8. package/dist/formFields/index.mjs +3 -3
  9. package/dist/{game-CoVv7iyf.d.mts → game-65XFYqKi.d.mts} +18 -10
  10. package/dist/{game-BzOJ4f7U.d.ts → game-PMt_jT_7.d.ts} +18 -10
  11. package/dist/graphql/index.cjs +18 -7
  12. package/dist/graphql/index.cjs.map +1 -1
  13. package/dist/graphql/index.d.mts +2 -2
  14. package/dist/graphql/index.d.ts +2 -2
  15. package/dist/graphql/index.mjs +1 -1
  16. package/dist/hooks/index.cjs +18 -7
  17. package/dist/hooks/index.cjs.map +1 -1
  18. package/dist/hooks/index.d.mts +2 -2
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.mjs +4 -4
  21. package/dist/index.cjs +32 -29
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.mts +18 -11
  24. package/dist/index.d.ts +18 -11
  25. package/dist/index.mjs +32 -29
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{post-CcJowEi5.d.mts → post-BJHPePwy.d.mts} +1 -1
  28. package/dist/{post-D9_1FbFI.d.ts → post-fnGzMU9c.d.ts} +1 -1
  29. package/dist/types/index.cjs +2 -1
  30. package/dist/types/index.cjs.map +1 -1
  31. package/dist/types/index.d.mts +2 -2
  32. package/dist/types/index.d.ts +2 -2
  33. package/dist/types/index.mjs +1 -1
  34. package/dist/utils/index.cjs +8 -17
  35. package/dist/utils/index.cjs.map +1 -1
  36. package/dist/utils/index.d.mts +1 -2
  37. package/dist/utils/index.d.ts +1 -2
  38. package/dist/utils/index.mjs +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-UOPC7KMU.mjs.map +0 -1
  41. /package/dist/{chunk-EFNSI75F.mjs.map → chunk-OMXMDHJ3.mjs.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-MMBYi34A.mjs';
2
- import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-CcJowEi5.mjs';
2
+ import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-BJHPePwy.mjs';
3
3
  import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-DtPfNKc4.mjs';
4
4
  import 'react-hook-form';
5
5
  import '../enums/index.mjs';
6
- import '../game-CoVv7iyf.mjs';
6
+ import '../game-65XFYqKi.mjs';
7
7
 
8
8
  interface PlacePrediction {
9
9
  place_id: string;
@@ -1,9 +1,9 @@
1
1
  import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-B0WdAD-8.js';
2
- import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-D9_1FbFI.js';
2
+ import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-fnGzMU9c.js';
3
3
  import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-B5tprOIL.js';
4
4
  import 'react-hook-form';
5
5
  import '../enums/index.js';
6
- import '../game-BzOJ4f7U.js';
6
+ import '../game-PMt_jT_7.js';
7
7
 
8
8
  interface PlacePrediction {
9
9
  place_id: string;
@@ -1,5 +1,5 @@
1
- import "../chunk-EFNSI75F.mjs";
2
- import "../chunk-RQDZX76B.mjs";
1
+ import "../chunk-OMXMDHJ3.mjs";
2
+ import "../chunk-2GSMGPKT.mjs";
3
3
  import "../chunk-DWO35OY4.mjs";
4
4
  import "../chunk-I7WE3EBR.mjs";
5
5
  import {
@@ -14,7 +14,7 @@ import {
14
14
  dateFormat,
15
15
  normalizeUrl,
16
16
  timeFormat
17
- } from "../chunk-UOPC7KMU.mjs";
17
+ } from "../chunk-FTEZFZZW.mjs";
18
18
  import {
19
19
  EnumEventDateStatus,
20
20
  EnumEventType,
@@ -27,7 +27,7 @@ import {
27
27
  EnumUserRole,
28
28
  EnumVendorType
29
29
  } from "../chunk-534WN2SR.mjs";
30
- import "../chunk-7GWVTPXL.mjs";
30
+ import "../chunk-LJJCZVW4.mjs";
31
31
 
32
32
  // src/hooks/useLocationSearch.ts
33
33
  var handleApiError = (error, message) => {
package/dist/index.cjs CHANGED
@@ -835,11 +835,12 @@ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
835
835
  var gameTypeToDisplayName = {
836
836
  ["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
837
837
  };
838
- var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
839
- EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
840
- EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
841
- EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
842
- return EnumGameStatus2;
838
+ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
839
+ EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
840
+ EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
841
+ EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
842
+ EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
843
+ return EnumGameStatus3;
843
844
  })(EnumGameStatus || {});
844
845
 
845
846
  // src/utils/date.ts
@@ -963,12 +964,6 @@ function computeDailyClueState(dailyClue) {
963
964
  }
964
965
  if (today.isAfter(end)) {
965
966
  return {
966
- gameHistory: {
967
- gameDate: dailyClue.gameFields.gameDate,
968
- gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
969
- gameType: dailyClue.gameFields.gameType,
970
- pointsEarned: dailyClue.points
971
- },
972
967
  todaysClue: null,
973
968
  todaysLetter: null,
974
969
  todaysPlacement: null
@@ -976,31 +971,28 @@ function computeDailyClueState(dailyClue) {
976
971
  }
977
972
  const index = getDayIndex(start, today);
978
973
  console.log("DEBUG", {
974
+ collected,
979
975
  end: end.format(),
980
976
  index,
981
- letterToday: shuffled[index],
982
- shuffledLength: shuffled.length,
977
+ shuffled,
978
+ shuffledPlacements,
983
979
  start: start.format(),
984
980
  today: today.format()
985
981
  });
986
982
  if (index < 0 || index >= shuffled.length) return null;
987
- const letterToday = shuffled[index]?.trim().toLowerCase();
988
- if (!letterToday) return null;
989
- const alreadyHaveTodaysSlot = (collected ?? []).some(
990
- (l) => l.trim().toLowerCase() === letterToday
991
- );
992
- if (alreadyHaveTodaysSlot) {
983
+ const collectedCount = (collected ?? []).length;
984
+ if (collectedCount > index) {
993
985
  return {
994
- gameHistory: null,
995
986
  todaysClue: null,
996
987
  todaysLetter: null,
997
988
  todaysPlacement: null
998
989
  };
999
990
  }
991
+ const letterToday = shuffled[index];
992
+ if (!letterToday) return null;
1000
993
  return {
1001
- gameHistory: null,
1002
994
  todaysClue: shuffledPlacements[index].clue,
1003
- todaysLetter: shuffled[index],
995
+ todaysLetter: letterToday,
1004
996
  todaysPlacement: shuffledPlacements[index].id
1005
997
  };
1006
998
  }
@@ -6025,12 +6017,10 @@ var GAME_HISTORY_FIELDS_FRAGMENT = import_client55.gql`
6025
6017
  }
6026
6018
  ${GAME_DATE_FIELDS_FRAGMENT}
6027
6019
  `;
6028
- var GAME_FIELDS_FRAGMENT = import_client55.gql`
6029
- fragment GameFields on GameType {
6030
- _id
6020
+ var GAME_DATA_FIELDS_FRAGMENT = import_client55.gql`
6021
+ fragment GameDataFields on GameDataType {
6031
6022
  active
6032
6023
  createdAt
6033
- deletedAt
6034
6024
  gameData {
6035
6025
  dailyClue {
6036
6026
  ...DailyClueGameDataFields
@@ -6039,16 +6029,29 @@ var GAME_FIELDS_FRAGMENT = import_client55.gql`
6039
6029
  gameHistory {
6040
6030
  ...GameHistoryFields
6041
6031
  }
6032
+ gameType
6042
6033
  updatedAt
6034
+ }
6035
+ ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
6036
+ ${GAME_HISTORY_FIELDS_FRAGMENT}
6037
+ `;
6038
+ var GAME_FIELDS_FRAGMENT = import_client55.gql`
6039
+ fragment GameFields on GameType {
6040
+ _id
6041
+ active
6042
+ createdAt
6043
+ deletedAt
6044
+ game {
6045
+ ...GameDataFields
6046
+ }
6043
6047
  owner {
6044
6048
  ...OwnerFields
6045
6049
  }
6046
6050
  points
6051
+ updatedAt
6047
6052
  }
6048
- ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
6049
6053
  ${OWNER_FIELDS_FRAGMENT}
6050
- ${GAME_DATE_FIELDS_FRAGMENT}
6051
- ${GAME_HISTORY_FIELDS_FRAGMENT}
6054
+ ${GAME_DATA_FIELDS_FRAGMENT}
6052
6055
  `;
6053
6056
  var GET_GAMES = import_client55.gql`
6054
6057
  query getGames {