@timardex/cluemart-shared 2.2.29 → 2.2.40
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/{ad-C4L_-r-4.d.ts → ad-CdehhMyb.d.ts} +2 -2
- package/dist/{ad-XtBAH4rD.d.mts → ad-Drhn_Azy.d.mts} +2 -2
- package/dist/{affiliate-CxZHVZb2.d.ts → affiliate-Cd78p2Fz.d.mts} +3 -3
- package/dist/{affiliate-D-L_UtL8.d.mts → affiliate-CdIL0r2o.d.ts} +3 -3
- package/dist/auth/index.cjs +10 -1
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +3 -3
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.mjs +2 -2
- package/dist/{chunk-IKRXLKJ3.mjs → chunk-5AAYX364.mjs} +1 -1
- package/dist/{chunk-IKRXLKJ3.mjs.map → chunk-5AAYX364.mjs.map} +1 -1
- package/dist/{chunk-NRNLARYC.mjs → chunk-BCMBTEGJ.mjs} +13 -4
- package/dist/chunk-BCMBTEGJ.mjs.map +1 -0
- package/dist/{chunk-LLP7OWX5.mjs → chunk-MKHXXZWF.mjs} +2 -2
- package/dist/{chunk-MQHX5BD6.mjs → chunk-NMJ2CR2F.mjs} +2 -2
- package/dist/{chunk-YFFCHTJS.mjs → chunk-T5ZOYS3L.mjs} +5 -23
- package/dist/{chunk-YFFCHTJS.mjs.map → chunk-T5ZOYS3L.mjs.map} +1 -1
- package/dist/{chunk-BR4XNXE7.mjs → chunk-TKSBCN3N.mjs} +11 -2
- package/dist/chunk-TKSBCN3N.mjs.map +1 -0
- package/dist/{chunk-J5N3IEGR.mjs → chunk-VL275KFW.mjs} +3 -3
- package/dist/{chunk-U3KUTQ43.mjs → chunk-XGGFB7HY.mjs} +11 -2
- package/dist/{chunk-U3KUTQ43.mjs.map → chunk-XGGFB7HY.mjs.map} +1 -1
- package/dist/{contactUs-CwHKoGEt.d.mts → contactUs-BJPQ5nKc.d.mts} +1 -1
- package/dist/{contactUs-CR-nghbk.d.ts → contactUs-ITiB1XV4.d.ts} +1 -1
- package/dist/enums/index.cjs +10 -0
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +8 -1
- package/dist/enums/index.d.ts +8 -1
- package/dist/enums/index.mjs +3 -1
- package/dist/formFields/index.cjs +4 -4
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +5 -5
- package/dist/{global-B4mmQo6R.d.ts → global-DlC7W4p7.d.ts} +9 -0
- package/dist/{global-D1r5ZuQO.d.mts → global-XUBcgjNc.d.mts} +9 -0
- package/dist/graphql/index.cjs +10 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +5 -5
- package/dist/graphql/index.d.ts +5 -5
- package/dist/graphql/index.mjs +3 -3
- package/dist/hooks/index.cjs +320 -285
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -5
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/index.mjs +314 -288
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +34 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +44 -22
- package/dist/index.d.ts +44 -22
- package/dist/index.mjs +32 -23
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/region/index.cjs.map +1 -1
- package/dist/region/index.d.mts +1 -1
- package/dist/region/index.d.ts +1 -1
- package/dist/region/index.mjs +1 -1
- package/dist/{resourceActivities-Uz9uavhK.d.ts → resourceActivities-C8eIfpKl.d.ts} +1 -1
- package/dist/{resourceActivities-DUReu_jD.d.mts → resourceActivities-Ci12UkJU.d.mts} +1 -1
- package/dist/sharing/index.cjs +4 -25
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +3 -22
- package/dist/sharing/index.d.ts +3 -22
- package/dist/sharing/index.mjs +3 -9
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.mjs +2 -2
- package/dist/{user-BpR-FTW2.d.mts → user-BSFExFvl.d.ts} +18 -4
- package/dist/{user-IR0bHKFb.d.ts → user-D31zAVuz.d.mts} +18 -4
- package/dist/utils/index.cjs +14 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +15 -4
- package/dist/utils/index.d.ts +15 -4
- package/dist/utils/index.mjs +6 -4
- package/package.json +1 -1
- package/dist/chunk-BR4XNXE7.mjs.map +0 -1
- package/dist/chunk-NRNLARYC.mjs.map +0 -1
- /package/dist/{chunk-LLP7OWX5.mjs.map → chunk-MKHXXZWF.mjs.map} +0 -0
- /package/dist/{chunk-MQHX5BD6.mjs.map → chunk-NMJ2CR2F.mjs.map} +0 -0
- /package/dist/{chunk-J5N3IEGR.mjs.map → chunk-VL275KFW.mjs.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ __export(index_exports, {
|
|
|
83
83
|
EnumOSPlatform: () => EnumOSPlatform,
|
|
84
84
|
EnumPartnerType: () => EnumPartnerType,
|
|
85
85
|
EnumPaymentMethod: () => EnumPaymentMethod,
|
|
86
|
+
EnumPointType: () => EnumPointType,
|
|
86
87
|
EnumPostContentType: () => EnumPostContentType,
|
|
87
88
|
EnumPostType: () => EnumPostType,
|
|
88
89
|
EnumRegions: () => EnumRegions,
|
|
@@ -192,12 +193,10 @@ __export(index_exports, {
|
|
|
192
193
|
billingCatalogDefinitionMatches: () => billingCatalogDefinitionMatches,
|
|
193
194
|
buildApplicationShareDescription: () => buildApplicationShareDescription,
|
|
194
195
|
buildCalendarSheetContentData: () => buildCalendarSheetContentData,
|
|
195
|
-
buildFacebookShareQuote: () => buildFacebookShareQuote,
|
|
196
196
|
buildInvitationShareDescription: () => buildInvitationShareDescription,
|
|
197
197
|
buildPublicEventShareDescription: () => buildPublicEventShareDescription,
|
|
198
198
|
buildPublicVendorShareDescription: () => buildPublicVendorShareDescription,
|
|
199
199
|
buildRelationEligibleEventSchedule: () => buildRelationEligibleEventSchedule,
|
|
200
|
-
buildShareMessageSections: () => buildShareMessageSections,
|
|
201
200
|
buildShareOgDescription: () => buildShareOgDescription,
|
|
202
201
|
buildShareOgDescriptionFromSections: () => buildShareOgDescriptionFromSections,
|
|
203
202
|
buildSharePagePath: () => buildSharePagePath,
|
|
@@ -354,7 +353,6 @@ __export(index_exports, {
|
|
|
354
353
|
resolveResourceImageActive: () => resolveResourceImageActive,
|
|
355
354
|
rewardNiceNames: () => rewardNiceNames,
|
|
356
355
|
seededShuffle: () => seededShuffle,
|
|
357
|
-
shareMessageFooterPlacementForType: () => shareMessageFooterPlacementForType,
|
|
358
356
|
shareSlugResourceId: () => shareSlugResourceId,
|
|
359
357
|
shouldShowEventActionsWithWeather: () => shouldShowEventActionsWithWeather,
|
|
360
358
|
socialMediaFields: () => socialMediaFields,
|
|
@@ -363,6 +361,7 @@ __export(index_exports, {
|
|
|
363
361
|
stallTypeOptions: () => stallTypeOptions,
|
|
364
362
|
statusOptions: () => statusOptions,
|
|
365
363
|
stripOverlaySubtitleSpecialChars: () => stripOverlaySubtitleSpecialChars,
|
|
364
|
+
sumUserOverallPoints: () => sumUserOverallPoints,
|
|
366
365
|
tagOptions: () => tagOptions,
|
|
367
366
|
timeFormat: () => timeFormat,
|
|
368
367
|
toCalendarIsoDate: () => toCalendarIsoDate,
|
|
@@ -815,6 +814,14 @@ var EnumReward = /* @__PURE__ */ ((EnumReward2) => {
|
|
|
815
814
|
EnumReward2["MYSTERY_DELUXE_BOX"] = "mystery_deluxe_box";
|
|
816
815
|
return EnumReward2;
|
|
817
816
|
})(EnumReward || {});
|
|
817
|
+
var EnumPointType = /* @__PURE__ */ ((EnumPointType2) => {
|
|
818
|
+
EnumPointType2["DAILY_CLUE_GAME"] = "daily_clue_game";
|
|
819
|
+
EnumPointType2["EVENT_CHECKIN"] = "event_checkin";
|
|
820
|
+
EnumPointType2["INITIAL"] = "initial";
|
|
821
|
+
EnumPointType2["MINI_QUIZ_GAME"] = "mini_quiz_game";
|
|
822
|
+
EnumPointType2["ODD_ONE_OUT_GAME"] = "odd_one_out_game";
|
|
823
|
+
return EnumPointType2;
|
|
824
|
+
})(EnumPointType || {});
|
|
818
825
|
|
|
819
826
|
// src/formFields/vendor/vendor.ts
|
|
820
827
|
var vendorBasicInfoFields = [
|
|
@@ -1599,14 +1606,14 @@ var POST_SHARE_RESOURCE_TYPES = [
|
|
|
1599
1606
|
var SHARE_RESOURCE_LABEL = {
|
|
1600
1607
|
[RELATION_SHARE_APPLICATION]: "Application",
|
|
1601
1608
|
[RELATION_SHARE_INVITATION]: "Invitation",
|
|
1609
|
+
affiliate: "Affiliate",
|
|
1602
1610
|
clue_bites: "Clue Bites",
|
|
1603
1611
|
market_faces: "Market Faces",
|
|
1604
|
-
play_and_win: "Play & Win",
|
|
1605
1612
|
market: "Market",
|
|
1606
1613
|
partner: "Partner",
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1614
|
+
play_and_win: "Play & Win",
|
|
1615
|
+
school: "School",
|
|
1616
|
+
stallholder: "Stallholder"
|
|
1610
1617
|
};
|
|
1611
1618
|
function isPostShareResourceType(resourceType) {
|
|
1612
1619
|
return POST_SHARE_RESOURCE_TYPES.includes(
|
|
@@ -1646,16 +1653,6 @@ function normalizeShareText(value) {
|
|
|
1646
1653
|
return leading + rest;
|
|
1647
1654
|
}).join("\n").replace(/\n{3,}/g, "\n\n");
|
|
1648
1655
|
}
|
|
1649
|
-
function shareMessageFooterPlacementForType(_shareType) {
|
|
1650
|
-
return "before-body";
|
|
1651
|
-
}
|
|
1652
|
-
function buildShareMessageSections(input) {
|
|
1653
|
-
const title = normalizeShareText(input.title);
|
|
1654
|
-
const description = normalizeShareText(input.description);
|
|
1655
|
-
return [SHARE_MORE_INFO_LINE, title, description].filter(
|
|
1656
|
-
(section) => section.length > 0
|
|
1657
|
-
);
|
|
1658
|
-
}
|
|
1659
1656
|
function splitShareDescriptionSections(value) {
|
|
1660
1657
|
const trimmed = normalizeShareText(value);
|
|
1661
1658
|
if (!trimmed) {
|
|
@@ -1672,11 +1669,6 @@ function splitShareDescriptionSections(value) {
|
|
|
1672
1669
|
function normalizeShareOgDescription(value) {
|
|
1673
1670
|
return joinShareOgDescriptionSections(splitShareDescriptionSections(value));
|
|
1674
1671
|
}
|
|
1675
|
-
function buildFacebookShareQuote(title, description, shareType) {
|
|
1676
|
-
const sections = buildShareMessageSections({ description, shareType, title });
|
|
1677
|
-
const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();
|
|
1678
|
-
return quote.length > 0 ? quote : void 0;
|
|
1679
|
-
}
|
|
1680
1672
|
function buildShareOgDescriptionFromSections(sections) {
|
|
1681
1673
|
return joinShareOgDescriptionSections(sections);
|
|
1682
1674
|
}
|
|
@@ -2005,6 +1997,14 @@ function isResourceImageActive(image) {
|
|
|
2005
1997
|
var SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
2006
1998
|
var SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
2007
1999
|
|
|
2000
|
+
// src/utils/userPoints.ts
|
|
2001
|
+
function sumUserOverallPoints(points) {
|
|
2002
|
+
return (points ?? []).reduce(
|
|
2003
|
+
(total, entry) => total + (entry?.points ?? 0),
|
|
2004
|
+
0
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
2008
|
// src/calendar/eventCalendar.ts
|
|
2009
2009
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
2010
2010
|
function toCalendarIsoDate(startDate) {
|
|
@@ -4530,7 +4530,7 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
|
|
|
4530
4530
|
...LocationFields
|
|
4531
4531
|
}
|
|
4532
4532
|
partner
|
|
4533
|
-
|
|
4533
|
+
totalOverallPoints
|
|
4534
4534
|
platform
|
|
4535
4535
|
preferredRegion
|
|
4536
4536
|
permissions
|
|
@@ -4560,6 +4560,15 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
|
|
|
4560
4560
|
${REDEEMED_REWARD_FIELDS_FRAGMENT}
|
|
4561
4561
|
${STRIPE_FIELDS_FRAGMENT}
|
|
4562
4562
|
`;
|
|
4563
|
+
var USER_OVERALL_POINTS_FIELDS_FRAGMENT = import_client.gql`
|
|
4564
|
+
fragment UserOverallPointsFields on UserType {
|
|
4565
|
+
overallPoints {
|
|
4566
|
+
createdAt
|
|
4567
|
+
pointType
|
|
4568
|
+
points
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4571
|
+
`;
|
|
4563
4572
|
var STALL_TYPE_FIELDS_FRAGMENT = import_client.gql`
|
|
4564
4573
|
fragment StallTypeFields on StallTypeType {
|
|
4565
4574
|
label
|
|
@@ -10348,6 +10357,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
10348
10357
|
EnumOSPlatform,
|
|
10349
10358
|
EnumPartnerType,
|
|
10350
10359
|
EnumPaymentMethod,
|
|
10360
|
+
EnumPointType,
|
|
10351
10361
|
EnumPostContentType,
|
|
10352
10362
|
EnumPostType,
|
|
10353
10363
|
EnumRegions,
|
|
@@ -10457,12 +10467,10 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
10457
10467
|
billingCatalogDefinitionMatches,
|
|
10458
10468
|
buildApplicationShareDescription,
|
|
10459
10469
|
buildCalendarSheetContentData,
|
|
10460
|
-
buildFacebookShareQuote,
|
|
10461
10470
|
buildInvitationShareDescription,
|
|
10462
10471
|
buildPublicEventShareDescription,
|
|
10463
10472
|
buildPublicVendorShareDescription,
|
|
10464
10473
|
buildRelationEligibleEventSchedule,
|
|
10465
|
-
buildShareMessageSections,
|
|
10466
10474
|
buildShareOgDescription,
|
|
10467
10475
|
buildShareOgDescriptionFromSections,
|
|
10468
10476
|
buildSharePagePath,
|
|
@@ -10619,7 +10627,6 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
10619
10627
|
resolveResourceImageActive,
|
|
10620
10628
|
rewardNiceNames,
|
|
10621
10629
|
seededShuffle,
|
|
10622
|
-
shareMessageFooterPlacementForType,
|
|
10623
10630
|
shareSlugResourceId,
|
|
10624
10631
|
shouldShowEventActionsWithWeather,
|
|
10625
10632
|
socialMediaFields,
|
|
@@ -10628,6 +10635,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
10628
10635
|
stallTypeOptions,
|
|
10629
10636
|
statusOptions,
|
|
10630
10637
|
stripOverlaySubtitleSpecialChars,
|
|
10638
|
+
sumUserOverallPoints,
|
|
10631
10639
|
tagOptions,
|
|
10632
10640
|
timeFormat,
|
|
10633
10641
|
toCalendarIsoDate,
|