@timardex/cluemart-shared 1.5.497 → 1.5.499
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.
- package/dist/{chunk-D3WH67C5.mjs → chunk-6WV7CECU.mjs} +2 -2
- package/dist/{chunk-WHHVPICK.mjs → chunk-EJSVR77W.mjs} +11 -9
- package/dist/chunk-EJSVR77W.mjs.map +1 -0
- package/dist/{chunk-O4ILKWFI.mjs → chunk-RO2IWCW2.mjs} +30 -20
- package/dist/chunk-RO2IWCW2.mjs.map +1 -0
- package/dist/formFields/index.cjs +96 -2
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/{game-C6zLvmHU.d.mts → game-BR9xpQkt.d.mts} +19 -19
- package/dist/{game-B-YC4Am7.d.ts → game-Dn5SH8_0.d.ts} +19 -19
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/hooks/index.cjs +96 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +3 -3
- package/dist/index.cjs +38 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/index.mjs +38 -26
- package/dist/index.mjs.map +1 -1
- package/dist/{post-DFTmI0uz.d.mts → post-BBYcN5xv.d.mts} +1 -1
- package/dist/{post-CNm_rxZm.d.ts → post-CWZFxlP7.d.ts} +1 -1
- package/dist/types/index.cjs +29 -19
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +38 -26
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-O4ILKWFI.mjs.map +0 -1
- package/dist/chunk-WHHVPICK.mjs.map +0 -1
- /package/dist/{chunk-D3WH67C5.mjs.map → chunk-6WV7CECU.mjs.map} +0 -0
package/dist/hooks/index.d.mts
CHANGED
|
@@ -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-
|
|
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-BBYcN5xv.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-
|
|
6
|
+
import '../game-BR9xpQkt.mjs';
|
|
7
7
|
|
|
8
8
|
interface PlacePrediction {
|
|
9
9
|
place_id: string;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -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-
|
|
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-CWZFxlP7.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-
|
|
6
|
+
import '../game-Dn5SH8_0.js';
|
|
7
7
|
|
|
8
8
|
interface PlacePrediction {
|
|
9
9
|
place_id: string;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-6WV7CECU.mjs";
|
|
2
2
|
import "../chunk-RQDZX76B.mjs";
|
|
3
3
|
import "../chunk-DWO35OY4.mjs";
|
|
4
4
|
import "../chunk-I7WE3EBR.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
dateFormat,
|
|
15
15
|
normalizeUrl,
|
|
16
16
|
timeFormat
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-EJSVR77W.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-
|
|
30
|
+
import "../chunk-RO2IWCW2.mjs";
|
|
31
31
|
|
|
32
32
|
// src/hooks/useLocationSearch.ts
|
|
33
33
|
var handleApiError = (error, message) => {
|
package/dist/index.cjs
CHANGED
|
@@ -730,84 +730,95 @@ var priceUnits = [
|
|
|
730
730
|
|
|
731
731
|
// src/utils/dailyClueGame.ts
|
|
732
732
|
var import_dayjs = __toESM(require("dayjs"));
|
|
733
|
+
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
733
734
|
|
|
734
735
|
// src/types/game.ts
|
|
736
|
+
var createRouteMatcher = (base, type) => {
|
|
737
|
+
switch (type) {
|
|
738
|
+
case "mongoId":
|
|
739
|
+
return new RegExp(`^\\/${base}\\/([a-f0-9]{24})$`);
|
|
740
|
+
case "slug":
|
|
741
|
+
return new RegExp(`^\\/${base}\\/[^/]+$`);
|
|
742
|
+
default:
|
|
743
|
+
return new RegExp(`^\\/${base}$`);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
735
746
|
var gameScreenIdentifierList = [
|
|
736
747
|
{
|
|
737
748
|
clue: "Where your actions turn into a timeline.",
|
|
738
|
-
id: "activities"
|
|
749
|
+
id: "/profile/activities"
|
|
739
750
|
},
|
|
740
751
|
{
|
|
741
752
|
clue: "Where conversations happen without speaking.",
|
|
742
|
-
id: "chat"
|
|
753
|
+
id: "/profile/chat"
|
|
743
754
|
},
|
|
744
755
|
{
|
|
745
756
|
clue: "The place to redefine who you are.",
|
|
746
|
-
id: "edit-profile"
|
|
757
|
+
id: "/profile/edit-profile"
|
|
747
758
|
},
|
|
748
759
|
{
|
|
749
760
|
clue: "A single moment worth showing up for.",
|
|
750
|
-
id: "
|
|
761
|
+
id: createRouteMatcher("events", "mongoId")
|
|
751
762
|
},
|
|
752
763
|
{
|
|
753
764
|
clue: "What\u2019s happening around you, right now.",
|
|
754
|
-
id: "events-near-me"
|
|
765
|
+
id: "/events/events-near-me"
|
|
755
766
|
},
|
|
756
767
|
{
|
|
757
768
|
clue: "A collection of things worth attending.",
|
|
758
|
-
id: "events"
|
|
769
|
+
id: "/events"
|
|
759
770
|
},
|
|
760
771
|
{
|
|
761
772
|
clue: "What\u2019s happening in a wider area\u2014not just nearby.",
|
|
762
|
-
id: "events/region"
|
|
773
|
+
id: createRouteMatcher("events/region", "slug")
|
|
763
774
|
},
|
|
764
775
|
{
|
|
765
776
|
clue: "Where you go to find something specific.",
|
|
766
|
-
id: "events/search"
|
|
777
|
+
id: "/events/search"
|
|
767
778
|
},
|
|
768
779
|
{
|
|
769
780
|
clue: "Where fun becomes a challenge.",
|
|
770
|
-
id: "games"
|
|
781
|
+
id: "/games"
|
|
771
782
|
},
|
|
772
783
|
{
|
|
773
784
|
clue: "Your starting point for everything.",
|
|
774
|
-
id: "
|
|
785
|
+
id: "/"
|
|
775
786
|
},
|
|
776
787
|
{
|
|
777
788
|
clue: "Where the app taps you on the shoulder.",
|
|
778
|
-
id: "notifications"
|
|
789
|
+
id: "/notifications"
|
|
779
790
|
},
|
|
780
791
|
{
|
|
781
792
|
clue: "Where you fine-tune your experience.",
|
|
782
|
-
id: "options"
|
|
793
|
+
id: "/options"
|
|
783
794
|
},
|
|
784
795
|
{
|
|
785
796
|
clue: "A single collaborator in the ecosystem.",
|
|
786
|
-
id: "
|
|
797
|
+
id: createRouteMatcher("partners", "mongoId")
|
|
787
798
|
},
|
|
788
799
|
{
|
|
789
800
|
clue: "The network behind the scenes.",
|
|
790
|
-
id: "partners"
|
|
801
|
+
id: "/partners"
|
|
791
802
|
},
|
|
792
803
|
{
|
|
793
804
|
clue: "Where you share something with everyone.",
|
|
794
|
-
id: "
|
|
805
|
+
id: createRouteMatcher("visitors/posts", "mongoId")
|
|
795
806
|
},
|
|
796
807
|
{
|
|
797
808
|
clue: "Your identity, on display.",
|
|
798
|
-
id: "profile"
|
|
809
|
+
id: "/profile"
|
|
799
810
|
},
|
|
800
811
|
{
|
|
801
812
|
clue: "One provider offering something valuable.",
|
|
802
|
-
id: "
|
|
813
|
+
id: createRouteMatcher("vendors", "mongoId")
|
|
803
814
|
},
|
|
804
815
|
{
|
|
805
816
|
clue: "A marketplace of providers.",
|
|
806
|
-
id: "vendors"
|
|
817
|
+
id: "/vendors"
|
|
807
818
|
},
|
|
808
819
|
{
|
|
809
820
|
clue: "People who stopped by to see you.",
|
|
810
|
-
id: "visitors"
|
|
821
|
+
id: "/visitors"
|
|
811
822
|
}
|
|
812
823
|
];
|
|
813
824
|
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
@@ -825,6 +836,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
825
836
|
})(EnumGameStatus || {});
|
|
826
837
|
|
|
827
838
|
// src/utils/dailyClueGame.ts
|
|
839
|
+
import_dayjs.default.extend(import_utc.default);
|
|
828
840
|
function createSeededRng(seed) {
|
|
829
841
|
let t = seed >>> 0;
|
|
830
842
|
return function random() {
|
|
@@ -853,18 +865,18 @@ function seededShuffle(array6, seed) {
|
|
|
853
865
|
return result;
|
|
854
866
|
}
|
|
855
867
|
function getDayIndex(startDate) {
|
|
856
|
-
return (0, import_dayjs.default)().startOf("day").diff((0, import_dayjs.default)(startDate).startOf("day"), "day");
|
|
868
|
+
return (0, import_dayjs.default)().utc().startOf("day").diff((0, import_dayjs.default)(startDate).utc().startOf("day"), "day");
|
|
857
869
|
}
|
|
858
870
|
function computeDailyClueState(dailyClue) {
|
|
859
871
|
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
860
872
|
const { shuffled, collected } = dailyClue.letterInfo;
|
|
873
|
+
const today = (0, import_dayjs.default)().utc().startOf("day");
|
|
874
|
+
const start = (0, import_dayjs.default)(startDate).utc().startOf("day");
|
|
875
|
+
const end = (0, import_dayjs.default)(endDate).utc().startOf("day");
|
|
861
876
|
const shuffledPlacements = seededShuffle(
|
|
862
877
|
gameScreenIdentifierList,
|
|
863
|
-
|
|
878
|
+
start.toISOString()
|
|
864
879
|
);
|
|
865
|
-
const today = (0, import_dayjs.default)().startOf("day");
|
|
866
|
-
const start = (0, import_dayjs.default)(startDate).startOf("day");
|
|
867
|
-
const end = (0, import_dayjs.default)(endDate).startOf("day");
|
|
868
880
|
if (today.isBefore(start)) {
|
|
869
881
|
return null;
|
|
870
882
|
}
|
|
@@ -902,11 +914,11 @@ var import_dayjs2 = __toESM(require("dayjs"));
|
|
|
902
914
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
903
915
|
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
904
916
|
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
|
905
|
-
var
|
|
917
|
+
var import_utc2 = __toESM(require("dayjs/plugin/utc.js"));
|
|
906
918
|
var dateFormat = "DD-MM-YYYY";
|
|
907
919
|
var timeFormat = "HH:mm";
|
|
908
920
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
909
|
-
import_dayjs2.default.extend(
|
|
921
|
+
import_dayjs2.default.extend(import_utc2.default);
|
|
910
922
|
import_dayjs2.default.extend(import_timezone.default);
|
|
911
923
|
import_dayjs2.default.extend(import_isSameOrAfter.default);
|
|
912
924
|
var NZ_TZ = "Pacific/Auckland";
|