@timardex/cluemart-shared 1.3.11 → 1.3.12
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/graphql/index.cjs +17 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +10 -2
- package/dist/graphql/index.d.ts +10 -2
- package/dist/graphql/index.mjs +16 -0
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{post-Df5kAhEE.d.ts → post-CL2oI3Yl.d.ts} +1 -1
- package/dist/{post-tVcpbEDX.d.mts → post-CifJA7KI.d.mts} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -176,6 +176,7 @@ __export(index_exports, {
|
|
|
176
176
|
useGetPartnersByRegion: () => useGetPartnersByRegion,
|
|
177
177
|
useGetPost: () => useGetPost,
|
|
178
178
|
useGetPosts: () => useGetPosts,
|
|
179
|
+
useGetPostsByType: () => useGetPostsByType,
|
|
179
180
|
useGetRelation: () => useGetRelation,
|
|
180
181
|
useGetRelationByEventAndVendor: () => useGetRelationByEventAndVendor,
|
|
181
182
|
useGetResourceActivities: () => useGetResourceActivities,
|
|
@@ -5370,6 +5371,14 @@ var GET_POST = import_client59.gql`
|
|
|
5370
5371
|
}
|
|
5371
5372
|
${POST_FIELDS_FRAGMENT}
|
|
5372
5373
|
`;
|
|
5374
|
+
var GET_POSTS_BY_TYPE = import_client59.gql`
|
|
5375
|
+
query getPostsByType($postType: PostTypeEnum!) {
|
|
5376
|
+
postsByType(postType: $postType) {
|
|
5377
|
+
...PostFields
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
${POST_FIELDS_FRAGMENT}
|
|
5381
|
+
`;
|
|
5373
5382
|
|
|
5374
5383
|
// src/graphql/mutations/post.ts
|
|
5375
5384
|
var CREATE_POST_MUTATION = import_client60.gql`
|
|
@@ -5430,6 +5439,13 @@ var useGetPost = (postId) => {
|
|
|
5430
5439
|
});
|
|
5431
5440
|
return { error, loading, post: data?.post || null, refetch };
|
|
5432
5441
|
};
|
|
5442
|
+
var useGetPostsByType = (postType) => {
|
|
5443
|
+
const { data, loading, error, refetch } = (0, import_client62.useQuery)(GET_POSTS_BY_TYPE, {
|
|
5444
|
+
skip: !postType,
|
|
5445
|
+
variables: { postType }
|
|
5446
|
+
});
|
|
5447
|
+
return { error, loading, postsByType: data?.postsByType || [], refetch };
|
|
5448
|
+
};
|
|
5433
5449
|
|
|
5434
5450
|
// src/hooks/useLocationSearch.ts
|
|
5435
5451
|
var handleApiError = (error, message) => {
|
|
@@ -6153,7 +6169,7 @@ var contentDataSchema = yup9.lazy((_, options) => {
|
|
|
6153
6169
|
}
|
|
6154
6170
|
});
|
|
6155
6171
|
var postContentSchema = yup9.object().shape({
|
|
6156
|
-
contentData: contentDataSchema
|
|
6172
|
+
contentData: contentDataSchema,
|
|
6157
6173
|
contentOrder: yup9.number().min(0).required(),
|
|
6158
6174
|
contentType: yup9.mixed().oneOf(Object.values(EnumPostContentType)).required()
|
|
6159
6175
|
});
|
|
@@ -7468,6 +7484,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
7468
7484
|
useGetPartnersByRegion,
|
|
7469
7485
|
useGetPost,
|
|
7470
7486
|
useGetPosts,
|
|
7487
|
+
useGetPostsByType,
|
|
7471
7488
|
useGetRelation,
|
|
7472
7489
|
useGetRelationByEventAndVendor,
|
|
7473
7490
|
useGetResourceActivities,
|