@timardex/cluemart-shared 1.7.85 → 1.7.87
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/auth/index.cjs +8 -0
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.mjs +1 -1
- package/dist/{chunk-HPHI5IVL.mjs → chunk-5T4L7NCF.mjs} +13 -2
- package/dist/chunk-5T4L7NCF.mjs.map +1 -0
- package/dist/{chunk-MWLKYOBK.mjs → chunk-GA6E5NK3.mjs} +10 -1
- package/dist/chunk-GA6E5NK3.mjs.map +1 -0
- package/dist/{chunk-5RXL62LO.mjs → chunk-RCARDOVS.mjs} +4 -6
- package/dist/chunk-RCARDOVS.mjs.map +1 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +1 -1
- package/dist/graphql/index.cjs +21 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +10 -1
- package/dist/graphql/index.d.ts +10 -1
- package/dist/graphql/index.mjs +6 -2
- package/dist/hooks/index.cjs +8 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +3 -3
- package/dist/index.cjs +24 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.mjs +22 -5
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +3 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5RXL62LO.mjs.map +0 -1
- package/dist/chunk-HPHI5IVL.mjs.map +0 -1
- package/dist/chunk-MWLKYOBK.mjs.map +0 -1
package/dist/hooks/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SCHOOL_MIN_STUDENT_COUNT,
|
|
8
8
|
isValidIrdNumber,
|
|
9
9
|
normalizeUrl
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-RCARDOVS.mjs";
|
|
11
11
|
import {
|
|
12
12
|
dateFormat,
|
|
13
13
|
timeFormat
|
|
@@ -23,8 +23,8 @@ import {
|
|
|
23
23
|
} from "../chunk-364EX22V.mjs";
|
|
24
24
|
import "../chunk-RAYUJODN.mjs";
|
|
25
25
|
import "../chunk-DQ7ZHIXW.mjs";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-5T4L7NCF.mjs";
|
|
27
|
+
import "../chunk-GA6E5NK3.mjs";
|
|
28
28
|
import {
|
|
29
29
|
EnumEventDateStatus,
|
|
30
30
|
EnumEventType,
|
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ __export(index_exports, {
|
|
|
83
83
|
GET_EVENT: () => GET_EVENT,
|
|
84
84
|
GET_EVENT_BY_SLUG: () => GET_EVENT_BY_SLUG,
|
|
85
85
|
GET_EVENT_INFO: () => GET_EVENT_INFO,
|
|
86
|
+
GET_OWNED_EVENT: () => GET_OWNED_EVENT,
|
|
86
87
|
GET_PARTNER: () => GET_PARTNER,
|
|
87
88
|
GET_PARTNER_BY_SLUG: () => GET_PARTNER_BY_SLUG,
|
|
88
89
|
GET_POST: () => GET_POST,
|
|
@@ -390,6 +391,7 @@ __export(index_exports, {
|
|
|
390
391
|
useGetGames: () => useGetGames,
|
|
391
392
|
useGetNotificationCount: () => useGetNotificationCount,
|
|
392
393
|
useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
|
|
394
|
+
useGetOwnedEvent: () => useGetOwnedEvent,
|
|
393
395
|
useGetPartner: () => useGetPartner,
|
|
394
396
|
useGetPartners: () => useGetPartners,
|
|
395
397
|
useGetPartnersByRegion: () => useGetPartnersByRegion,
|
|
@@ -1743,11 +1745,9 @@ function getEventScheduleStatusLabel(dateTime, onlyShowKnownStatuses) {
|
|
|
1743
1745
|
return isKnownStatus ? status.replaceAll("_", " ").toLowerCase() : `Next event date: ${formatDate(dateTime.startDate, "date")}`;
|
|
1744
1746
|
}
|
|
1745
1747
|
function shouldShowEventActionsWithWeather(resourceType, dateTime, location) {
|
|
1746
|
-
return resourceType === "event" /* EVENT */ && Boolean(location) && Boolean(dateTime?.dateStatus) && ![
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
"Started" /* STARTED */
|
|
1750
|
-
].includes(dateTime.dateStatus);
|
|
1748
|
+
return resourceType === "event" /* EVENT */ && Boolean(location) && Boolean(dateTime?.dateStatus) && !["Ended" /* ENDED */, "Canceled" /* CANCELED */].includes(
|
|
1749
|
+
dateTime.dateStatus
|
|
1750
|
+
);
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
1753
|
// src/formFields/categories/clothingAndFashion.ts
|
|
@@ -4252,6 +4252,14 @@ var GET_EVENT = import_client2.gql`
|
|
|
4252
4252
|
}
|
|
4253
4253
|
${EVENT}
|
|
4254
4254
|
`;
|
|
4255
|
+
var GET_OWNED_EVENT = import_client2.gql`
|
|
4256
|
+
query getOwnedEvent($_id: ID!) {
|
|
4257
|
+
ownedEvent(_id: $_id) {
|
|
4258
|
+
...EventFields
|
|
4259
|
+
}
|
|
4260
|
+
}
|
|
4261
|
+
${EVENT}
|
|
4262
|
+
`;
|
|
4255
4263
|
var GET_EVENT_BY_PLACE_ID = import_client2.gql`
|
|
4256
4264
|
query getEventByPlaceId($googlePlaceId: String!) {
|
|
4257
4265
|
eventByPlaceId(googlePlaceId: $googlePlaceId) {
|
|
@@ -5976,6 +5984,15 @@ var useGetEvent = (_id) => {
|
|
|
5976
5984
|
const event = data?.event || null;
|
|
5977
5985
|
return { error, event, loading, refetch };
|
|
5978
5986
|
};
|
|
5987
|
+
var useGetOwnedEvent = (_id) => {
|
|
5988
|
+
const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_OWNED_EVENT, {
|
|
5989
|
+
fetchPolicy: "network-only",
|
|
5990
|
+
skip: !_id,
|
|
5991
|
+
variables: { _id }
|
|
5992
|
+
});
|
|
5993
|
+
const event = data?.ownedEvent || null;
|
|
5994
|
+
return { error, event, loading, refetch };
|
|
5995
|
+
};
|
|
5979
5996
|
var useGetEventByPlaceId = (googlePlaceId) => {
|
|
5980
5997
|
const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_EVENT_BY_PLACE_ID, {
|
|
5981
5998
|
fetchPolicy: "network-only",
|
|
@@ -9437,6 +9454,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9437
9454
|
GET_EVENT,
|
|
9438
9455
|
GET_EVENT_BY_SLUG,
|
|
9439
9456
|
GET_EVENT_INFO,
|
|
9457
|
+
GET_OWNED_EVENT,
|
|
9440
9458
|
GET_PARTNER,
|
|
9441
9459
|
GET_PARTNER_BY_SLUG,
|
|
9442
9460
|
GET_POST,
|
|
@@ -9744,6 +9762,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9744
9762
|
useGetGames,
|
|
9745
9763
|
useGetNotificationCount,
|
|
9746
9764
|
useGetNotificationCountSubscription,
|
|
9765
|
+
useGetOwnedEvent,
|
|
9747
9766
|
useGetPartner,
|
|
9748
9767
|
useGetPartners,
|
|
9749
9768
|
useGetPartnersByRegion,
|