@timardex/cluemart-shared 1.5.492 → 1.5.494

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 (51) hide show
  1. package/dist/{chunk-USQKKCIA.mjs → chunk-534WN2SR.mjs} +7 -3
  2. package/dist/chunk-534WN2SR.mjs.map +1 -0
  3. package/dist/{chunk-4LT5GOOP.mjs → chunk-DXNREXCC.mjs} +3 -3
  4. package/dist/{chunk-BLABDHO5.mjs → chunk-KPO6ZYQ4.mjs} +2 -94
  5. package/dist/chunk-KPO6ZYQ4.mjs.map +1 -0
  6. package/dist/chunk-QG5DPPZI.mjs +96 -0
  7. package/dist/chunk-QG5DPPZI.mjs.map +1 -0
  8. package/dist/{chunk-KYDS4REE.mjs → chunk-YTEETYG7.mjs} +95 -17
  9. package/dist/chunk-YTEETYG7.mjs.map +1 -0
  10. package/dist/enums/index.cjs +6 -2
  11. package/dist/enums/index.cjs.map +1 -1
  12. package/dist/enums/index.d.mts +7 -3
  13. package/dist/enums/index.d.ts +7 -3
  14. package/dist/enums/index.mjs +1 -1
  15. package/dist/formFields/index.cjs +8 -5
  16. package/dist/formFields/index.cjs.map +1 -1
  17. package/dist/formFields/index.mjs +4 -3
  18. package/dist/game-DTrJRy_s.d.mts +120 -0
  19. package/dist/game-lvz2AUuu.d.ts +120 -0
  20. package/dist/graphql/index.d.mts +2 -1
  21. package/dist/graphql/index.d.ts +2 -1
  22. package/dist/graphql/index.mjs +1 -1
  23. package/dist/hooks/index.cjs +21 -18
  24. package/dist/hooks/index.cjs.map +1 -1
  25. package/dist/hooks/index.d.mts +2 -1
  26. package/dist/hooks/index.d.ts +2 -1
  27. package/dist/hooks/index.mjs +5 -4
  28. package/dist/hooks/index.mjs.map +1 -1
  29. package/dist/index.cjs +202 -118
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.mts +19 -5
  32. package/dist/index.d.ts +19 -5
  33. package/dist/index.mjs +200 -118
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/{post-C1KIeGaH.d.ts → post-DXOToXeT.d.ts} +3 -118
  36. package/dist/{post-DbomV5bK.d.mts → post-wptsHKVN.d.mts} +3 -118
  37. package/dist/types/index.cjs +1 -0
  38. package/dist/types/index.cjs.map +1 -1
  39. package/dist/types/index.d.mts +2 -1
  40. package/dist/types/index.d.ts +2 -1
  41. package/dist/types/index.mjs +6 -4
  42. package/dist/utils/index.cjs +171 -14
  43. package/dist/utils/index.cjs.map +1 -1
  44. package/dist/utils/index.d.mts +11 -1
  45. package/dist/utils/index.d.ts +11 -1
  46. package/dist/utils/index.mjs +7 -2
  47. package/package.json +1 -1
  48. package/dist/chunk-BLABDHO5.mjs.map +0 -1
  49. package/dist/chunk-KYDS4REE.mjs.map +0 -1
  50. package/dist/chunk-USQKKCIA.mjs.map +0 -1
  51. /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-DXNREXCC.mjs.map} +0 -0
@@ -43,9 +43,10 @@ import {
43
43
  vendorStallSize,
44
44
  vendorStartDateFields,
45
45
  vendorTable
46
- } from "../chunk-4LT5GOOP.mjs";
47
- import "../chunk-KYDS4REE.mjs";
48
- import "../chunk-USQKKCIA.mjs";
46
+ } from "../chunk-DXNREXCC.mjs";
47
+ import "../chunk-YTEETYG7.mjs";
48
+ import "../chunk-534WN2SR.mjs";
49
+ import "../chunk-QG5DPPZI.mjs";
49
50
  export {
50
51
  availableCategories,
51
52
  availableTagTypes,
@@ -0,0 +1,120 @@
1
+ import { y as OwnerType } from './global-MMBYi34A.mjs';
2
+
3
+ declare const gameScreenIdentifierList: readonly [{
4
+ readonly clue: "Where your actions turn into a timeline.";
5
+ readonly id: "activities";
6
+ }, {
7
+ readonly clue: "Where conversations happen without speaking.";
8
+ readonly id: "chat";
9
+ }, {
10
+ readonly clue: "The place to redefine who you are.";
11
+ readonly id: "edit-profile";
12
+ }, {
13
+ readonly clue: "A single moment worth showing up for.";
14
+ readonly id: "event";
15
+ }, {
16
+ readonly clue: "What’s happening around you, right now.";
17
+ readonly id: "events-near-me";
18
+ }, {
19
+ readonly clue: "A collection of things worth attending.";
20
+ readonly id: "events";
21
+ }, {
22
+ readonly clue: "What’s happening in a wider area—not just nearby.";
23
+ readonly id: "events/region";
24
+ }, {
25
+ readonly clue: "Where fun becomes a challenge.";
26
+ readonly id: "games";
27
+ }, {
28
+ readonly clue: "Your starting point for everything.";
29
+ readonly id: "home";
30
+ }, {
31
+ readonly clue: "Where the app taps you on the shoulder.";
32
+ readonly id: "notifications";
33
+ }, {
34
+ readonly clue: "Where you fine-tune your experience.";
35
+ readonly id: "options";
36
+ }, {
37
+ readonly clue: "A single collaborator in the ecosystem.";
38
+ readonly id: "partner";
39
+ }, {
40
+ readonly clue: "The network behind the scenes.";
41
+ readonly id: "partners";
42
+ }, {
43
+ readonly clue: "Where you share something with everyone.";
44
+ readonly id: "post";
45
+ }, {
46
+ readonly clue: "Your identity, on display.";
47
+ readonly id: "profile";
48
+ }, {
49
+ readonly clue: "One provider offering something valuable.";
50
+ readonly id: "vendor";
51
+ }, {
52
+ readonly clue: "A marketplace of providers.";
53
+ readonly id: "vendors";
54
+ }, {
55
+ readonly clue: "People who stopped by to see you.";
56
+ readonly id: "visitors";
57
+ }];
58
+ type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
59
+ type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
60
+ declare enum EnumGameType {
61
+ DAILY_CLUE = "dailyClue"
62
+ }
63
+ declare const gameTypeToDisplayName: Record<EnumGameType, string>;
64
+ type GameDate = {
65
+ startDate: Date;
66
+ endDate: Date;
67
+ };
68
+ type BaseGame = {
69
+ gameDate: GameDate;
70
+ gameSolution: string;
71
+ gameType: EnumGameType;
72
+ };
73
+ type DailyClueGameData = {
74
+ gameFields: BaseGame;
75
+ lastFoundDate: Date | null;
76
+ points: number;
77
+ letterInfo: {
78
+ collected: string[] | null;
79
+ shuffled: string[];
80
+ todaysLetter: string | null;
81
+ todaysClue: GamePlacementClue | null;
82
+ todaysPlacement: GamePlacement | null;
83
+ };
84
+ streak: number;
85
+ };
86
+ type GameDataMap = {
87
+ [EnumGameType.DAILY_CLUE]: DailyClueGameData;
88
+ };
89
+ type GameData = {
90
+ [K in keyof GameDataMap]?: GameDataMap[K] | null;
91
+ };
92
+ declare enum EnumGameStatus {
93
+ GAME_COMPLETED = "GAME_COMPLETED",
94
+ GAME_LEFT = "GAME_LEFT",
95
+ GAME_IN_PROGRESS = "GAME_IN_PROGRESS"
96
+ }
97
+ type GameHistory = {
98
+ gameDate: GameDate;
99
+ gameStatus: EnumGameStatus;
100
+ gameType: EnumGameType;
101
+ pointsEarned: number;
102
+ };
103
+ type GameType = {
104
+ _id: string;
105
+ active: boolean;
106
+ createdAt: Date;
107
+ deletedAt: Date | null;
108
+ gameData: GameData | null;
109
+ gameHistory: GameHistory[] | null;
110
+ owner: OwnerType;
111
+ points: number;
112
+ updatedAt: Date | null;
113
+ };
114
+ type GameLeaderboard = {
115
+ gameHistory: GameHistory[] | null;
116
+ overallPoints: number;
117
+ owner: OwnerType;
118
+ };
119
+
120
+ export { type BaseGame as B, type DailyClueGameData as D, EnumGameStatus as E, type GameType as G, type GameLeaderboard as a, EnumGameType as b, type GameData as c, type GameDate as d, type GameHistory as e, type GamePlacement as f, type GamePlacementClue as g, gameScreenIdentifierList as h, gameTypeToDisplayName as i };
@@ -0,0 +1,120 @@
1
+ import { y as OwnerType } from './global-B0WdAD-8.js';
2
+
3
+ declare const gameScreenIdentifierList: readonly [{
4
+ readonly clue: "Where your actions turn into a timeline.";
5
+ readonly id: "activities";
6
+ }, {
7
+ readonly clue: "Where conversations happen without speaking.";
8
+ readonly id: "chat";
9
+ }, {
10
+ readonly clue: "The place to redefine who you are.";
11
+ readonly id: "edit-profile";
12
+ }, {
13
+ readonly clue: "A single moment worth showing up for.";
14
+ readonly id: "event";
15
+ }, {
16
+ readonly clue: "What’s happening around you, right now.";
17
+ readonly id: "events-near-me";
18
+ }, {
19
+ readonly clue: "A collection of things worth attending.";
20
+ readonly id: "events";
21
+ }, {
22
+ readonly clue: "What’s happening in a wider area—not just nearby.";
23
+ readonly id: "events/region";
24
+ }, {
25
+ readonly clue: "Where fun becomes a challenge.";
26
+ readonly id: "games";
27
+ }, {
28
+ readonly clue: "Your starting point for everything.";
29
+ readonly id: "home";
30
+ }, {
31
+ readonly clue: "Where the app taps you on the shoulder.";
32
+ readonly id: "notifications";
33
+ }, {
34
+ readonly clue: "Where you fine-tune your experience.";
35
+ readonly id: "options";
36
+ }, {
37
+ readonly clue: "A single collaborator in the ecosystem.";
38
+ readonly id: "partner";
39
+ }, {
40
+ readonly clue: "The network behind the scenes.";
41
+ readonly id: "partners";
42
+ }, {
43
+ readonly clue: "Where you share something with everyone.";
44
+ readonly id: "post";
45
+ }, {
46
+ readonly clue: "Your identity, on display.";
47
+ readonly id: "profile";
48
+ }, {
49
+ readonly clue: "One provider offering something valuable.";
50
+ readonly id: "vendor";
51
+ }, {
52
+ readonly clue: "A marketplace of providers.";
53
+ readonly id: "vendors";
54
+ }, {
55
+ readonly clue: "People who stopped by to see you.";
56
+ readonly id: "visitors";
57
+ }];
58
+ type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
59
+ type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
60
+ declare enum EnumGameType {
61
+ DAILY_CLUE = "dailyClue"
62
+ }
63
+ declare const gameTypeToDisplayName: Record<EnumGameType, string>;
64
+ type GameDate = {
65
+ startDate: Date;
66
+ endDate: Date;
67
+ };
68
+ type BaseGame = {
69
+ gameDate: GameDate;
70
+ gameSolution: string;
71
+ gameType: EnumGameType;
72
+ };
73
+ type DailyClueGameData = {
74
+ gameFields: BaseGame;
75
+ lastFoundDate: Date | null;
76
+ points: number;
77
+ letterInfo: {
78
+ collected: string[] | null;
79
+ shuffled: string[];
80
+ todaysLetter: string | null;
81
+ todaysClue: GamePlacementClue | null;
82
+ todaysPlacement: GamePlacement | null;
83
+ };
84
+ streak: number;
85
+ };
86
+ type GameDataMap = {
87
+ [EnumGameType.DAILY_CLUE]: DailyClueGameData;
88
+ };
89
+ type GameData = {
90
+ [K in keyof GameDataMap]?: GameDataMap[K] | null;
91
+ };
92
+ declare enum EnumGameStatus {
93
+ GAME_COMPLETED = "GAME_COMPLETED",
94
+ GAME_LEFT = "GAME_LEFT",
95
+ GAME_IN_PROGRESS = "GAME_IN_PROGRESS"
96
+ }
97
+ type GameHistory = {
98
+ gameDate: GameDate;
99
+ gameStatus: EnumGameStatus;
100
+ gameType: EnumGameType;
101
+ pointsEarned: number;
102
+ };
103
+ type GameType = {
104
+ _id: string;
105
+ active: boolean;
106
+ createdAt: Date;
107
+ deletedAt: Date | null;
108
+ gameData: GameData | null;
109
+ gameHistory: GameHistory[] | null;
110
+ owner: OwnerType;
111
+ points: number;
112
+ updatedAt: Date | null;
113
+ };
114
+ type GameLeaderboard = {
115
+ gameHistory: GameHistory[] | null;
116
+ overallPoints: number;
117
+ owner: OwnerType;
118
+ };
119
+
120
+ export { type BaseGame as B, type DailyClueGameData as D, EnumGameStatus as E, type GameType as G, type GameLeaderboard as a, EnumGameType as b, type GameData as c, type GameDate as d, type GameHistory as e, type GamePlacement as f, type GamePlacementClue as g, gameScreenIdentifierList as h, gameTypeToDisplayName as i };
@@ -2,7 +2,8 @@ import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.mjs';
3
3
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CqrscA5x.mjs';
4
4
  import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-MMBYi34A.mjs';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, G as GameType, e as GameLeaderboard } from '../post-DbomV5bK.mjs';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-wptsHKVN.mjs';
6
+ import { G as GameType, a as GameLeaderboard } from '../game-DTrJRy_s.mjs';
6
7
  import 'react-hook-form';
7
8
 
8
9
  declare const useAdminUpdateResourceType: () => {
@@ -2,7 +2,8 @@ import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.js';
3
3
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-2FaGRW-i.js';
4
4
  import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-B0WdAD-8.js';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, G as GameType, e as GameLeaderboard } from '../post-C1KIeGaH.js';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-DXOToXeT.js';
6
+ import { G as GameType, a as GameLeaderboard } from '../game-lvz2AUuu.js';
6
7
  import 'react-hook-form';
7
8
 
8
9
  declare const useAdminUpdateResourceType: () => {
@@ -127,7 +127,7 @@ import {
127
127
  useUpdateVendorInfo,
128
128
  useValidateVerificationToken
129
129
  } from "../chunk-RQDZX76B.mjs";
130
- import "../chunk-USQKKCIA.mjs";
130
+ import "../chunk-534WN2SR.mjs";
131
131
  export {
132
132
  useAddParticipantToChat,
133
133
  useAddUserFavouriteResource,
@@ -163,7 +163,7 @@ var React = __toESM(require("react"));
163
163
  var import_react_hook_form = require("react-hook-form");
164
164
 
165
165
  // src/yupSchema/global.ts
166
- var import_dayjs2 = __toESM(require("dayjs"));
166
+ var import_dayjs3 = __toESM(require("dayjs"));
167
167
  var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"));
168
168
  var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
169
169
  var yup = __toESM(require("yup"));
@@ -276,18 +276,21 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
276
276
  return EnumEventDateStatus2;
277
277
  })(EnumEventDateStatus || {});
278
278
 
279
- // src/utils/index.ts
279
+ // src/utils/dailyClueGame.ts
280
280
  var import_dayjs = __toESM(require("dayjs"));
281
+
282
+ // src/utils/index.ts
283
+ var import_dayjs2 = __toESM(require("dayjs"));
281
284
  var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
282
285
  var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
283
286
  var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
284
287
  var import_utc = __toESM(require("dayjs/plugin/utc.js"));
285
288
  var dateFormat = "DD-MM-YYYY";
286
289
  var timeFormat = "HH:mm";
287
- import_dayjs.default.extend(import_customParseFormat.default);
288
- import_dayjs.default.extend(import_utc.default);
289
- import_dayjs.default.extend(import_timezone.default);
290
- import_dayjs.default.extend(import_isSameOrAfter.default);
290
+ import_dayjs2.default.extend(import_customParseFormat.default);
291
+ import_dayjs2.default.extend(import_utc.default);
292
+ import_dayjs2.default.extend(import_timezone.default);
293
+ import_dayjs2.default.extend(import_isSameOrAfter.default);
291
294
  var mapArrayToOptions = (items) => items.map((item) => ({
292
295
  label: item,
293
296
  value: item
@@ -364,8 +367,8 @@ var noLeadingZeros = (fieldName, options = {}) => {
364
367
  return true;
365
368
  };
366
369
  };
367
- import_dayjs2.default.extend(import_isSameOrAfter2.default);
368
- import_dayjs2.default.extend(import_customParseFormat2.default);
370
+ import_dayjs3.default.extend(import_isSameOrAfter2.default);
371
+ import_dayjs3.default.extend(import_customParseFormat2.default);
369
372
  var emailRequiredSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
370
373
  (value) => typeof value === "string" ? value.trim().toLowerCase() : value
371
374
  );
@@ -396,12 +399,12 @@ var contactDetailsSchema = yup.object({
396
399
  landlinePhone: landlinePhoneSchema
397
400
  }).nullable().default(void 0);
398
401
  var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
399
- const now = (0, import_dayjs2.default)();
400
- return value ? (0, import_dayjs2.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
402
+ const now = (0, import_dayjs3.default)();
403
+ return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
401
404
  });
402
405
  var startDateNotInPastTest = yup.string().test("not-in-past", "Start date cannot be in the past", (value) => {
403
- const now = (0, import_dayjs2.default)();
404
- return value ? (0, import_dayjs2.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
406
+ const now = (0, import_dayjs3.default)();
407
+ return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
405
408
  });
406
409
  var endDateAfterStartDateTest = yup.string().test(
407
410
  "end-after-start",
@@ -409,8 +412,8 @@ var endDateAfterStartDateTest = yup.string().test(
409
412
  function(value) {
410
413
  const { startDate } = this.parent;
411
414
  if (!startDate || !value) return false;
412
- return (0, import_dayjs2.default)(value, dateFormat, true).isSameOrAfter(
413
- (0, import_dayjs2.default)(startDate, dateFormat, true),
415
+ return (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(
416
+ (0, import_dayjs3.default)(startDate, dateFormat, true),
414
417
  "day"
415
418
  );
416
419
  }
@@ -421,12 +424,12 @@ var endTimeMustBeAfterStartTimeTest = yup.string().test(
421
424
  function(value) {
422
425
  const { startDate, endDate, startTime } = this.parent;
423
426
  if (!startDate || !endDate || !startTime || !value) return false;
424
- const startDateTime = (0, import_dayjs2.default)(
427
+ const startDateTime = (0, import_dayjs3.default)(
425
428
  `${startDate} ${startTime}`,
426
429
  `${dateFormat} ${timeFormat}`,
427
430
  true
428
431
  );
429
- const endDateTime = (0, import_dayjs2.default)(
432
+ const endDateTime = (0, import_dayjs3.default)(
430
433
  `${endDate} ${value}`,
431
434
  `${dateFormat} ${timeFormat}`,
432
435
  true
@@ -438,10 +441,10 @@ var startTimeCannotBeInPastTest = yup.string().test(
438
441
  "valid-start-time",
439
442
  "Start time cannot be in the past",
440
443
  function(value) {
441
- const now = (0, import_dayjs2.default)();
444
+ const now = (0, import_dayjs3.default)();
442
445
  const { startDate } = this.parent;
443
446
  if (!startDate || !value) return false;
444
- const startDateTime = (0, import_dayjs2.default)(
447
+ const startDateTime = (0, import_dayjs3.default)(
445
448
  `${startDate} ${value}`,
446
449
  `${dateFormat} ${timeFormat}`,
447
450
  true