@timardex/cluemart-shared 1.1.7 → 1.1.8
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 +19 -18
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +19 -18
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +11 -3
- 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 +11 -3
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +30 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +30 -21
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{user-EVBTZHAn.d.ts → user-BCLfvpJk.d.ts} +3 -1
- package/dist/{user-BfsmFPGZ.d.mts → user-Ux3ldB-7.d.mts} +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -547,6 +547,7 @@ type TestersFormData = {
|
|
|
547
547
|
lastName: string;
|
|
548
548
|
osType: EnumOSPlatform;
|
|
549
549
|
resourceType: EnumResourceType;
|
|
550
|
+
categories: Category[] | null;
|
|
550
551
|
};
|
|
551
552
|
interface CreateTestersFormData {
|
|
552
553
|
control: Control<TestersFormData, any>;
|
|
@@ -562,6 +563,7 @@ interface CreateTestersFormData {
|
|
|
562
563
|
type TesterType = {
|
|
563
564
|
_id: string;
|
|
564
565
|
active: boolean;
|
|
566
|
+
categories: Category[] | null;
|
|
565
567
|
createdAt: string;
|
|
566
568
|
email: string;
|
|
567
569
|
firstName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -547,6 +547,7 @@ type TestersFormData = {
|
|
|
547
547
|
lastName: string;
|
|
548
548
|
osType: EnumOSPlatform;
|
|
549
549
|
resourceType: EnumResourceType;
|
|
550
|
+
categories: Category[] | null;
|
|
550
551
|
};
|
|
551
552
|
interface CreateTestersFormData {
|
|
552
553
|
control: Control<TestersFormData, any>;
|
|
@@ -562,6 +563,7 @@ interface CreateTestersFormData {
|
|
|
562
563
|
type TesterType = {
|
|
563
564
|
_id: string;
|
|
564
565
|
active: boolean;
|
|
566
|
+
categories: Category[] | null;
|
|
565
567
|
createdAt: string;
|
|
566
568
|
email: string;
|
|
567
569
|
firstName: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2816,43 +2816,40 @@ var useCreateBulkNotifications = () => {
|
|
|
2816
2816
|
};
|
|
2817
2817
|
var useMarkNotificationRead = () => {
|
|
2818
2818
|
const [markNotificationRead, { loading, error }] = useMutation6(
|
|
2819
|
-
MARK_NOTIFICATION_READ
|
|
2820
|
-
{
|
|
2819
|
+
MARK_NOTIFICATION_READ
|
|
2820
|
+
/* {
|
|
2821
2821
|
awaitRefetchQueries: true,
|
|
2822
|
-
fetchPolicy: "no-cache",
|
|
2823
2822
|
refetchQueries: [
|
|
2824
2823
|
{ query: GET_USER_NOTIFICATIONS },
|
|
2825
|
-
{ query: GET_NOTIFICATION_COUNT }
|
|
2826
|
-
]
|
|
2827
|
-
}
|
|
2824
|
+
{ query: GET_NOTIFICATION_COUNT },
|
|
2825
|
+
],
|
|
2826
|
+
}, */
|
|
2828
2827
|
);
|
|
2829
2828
|
return { error, loading, markNotificationRead };
|
|
2830
2829
|
};
|
|
2831
2830
|
var useMarkAllNotificationsRead = () => {
|
|
2832
2831
|
const [markAllNotificationsRead, { loading, error }] = useMutation6(
|
|
2833
|
-
MARK_ALL_NOTIFICATIONS_READ
|
|
2834
|
-
{
|
|
2832
|
+
MARK_ALL_NOTIFICATIONS_READ
|
|
2833
|
+
/* {
|
|
2835
2834
|
awaitRefetchQueries: true,
|
|
2836
|
-
fetchPolicy: "no-cache",
|
|
2837
2835
|
refetchQueries: [
|
|
2838
2836
|
{ query: GET_USER_NOTIFICATIONS },
|
|
2839
|
-
{ query: GET_NOTIFICATION_COUNT }
|
|
2840
|
-
]
|
|
2841
|
-
}
|
|
2837
|
+
{ query: GET_NOTIFICATION_COUNT },
|
|
2838
|
+
],
|
|
2839
|
+
}, */
|
|
2842
2840
|
);
|
|
2843
2841
|
return { error, loading, markAllNotificationsRead };
|
|
2844
2842
|
};
|
|
2845
2843
|
var useDeleteNotification = () => {
|
|
2846
2844
|
const [deleteNotification, { loading, error }] = useMutation6(
|
|
2847
|
-
DELETE_NOTIFICATION
|
|
2848
|
-
{
|
|
2845
|
+
DELETE_NOTIFICATION
|
|
2846
|
+
/* {
|
|
2849
2847
|
awaitRefetchQueries: true,
|
|
2850
|
-
fetchPolicy: "no-cache",
|
|
2851
2848
|
refetchQueries: [
|
|
2852
2849
|
{ query: GET_USER_NOTIFICATIONS },
|
|
2853
|
-
{ query: GET_NOTIFICATION_COUNT }
|
|
2854
|
-
]
|
|
2855
|
-
}
|
|
2850
|
+
{ query: GET_NOTIFICATION_COUNT },
|
|
2851
|
+
],
|
|
2852
|
+
}, */
|
|
2856
2853
|
);
|
|
2857
2854
|
return { deleteNotification, error, loading };
|
|
2858
2855
|
};
|
|
@@ -3582,6 +3579,9 @@ import { gql as gql19 } from "@apollo/client";
|
|
|
3582
3579
|
var TESTER_FIELDS_FRAGMENT = gql19`
|
|
3583
3580
|
fragment TesterFields on TesterType {
|
|
3584
3581
|
_id
|
|
3582
|
+
categories {
|
|
3583
|
+
...CategoryFields
|
|
3584
|
+
}
|
|
3585
3585
|
active
|
|
3586
3586
|
createdAt
|
|
3587
3587
|
email
|
|
@@ -3591,6 +3591,7 @@ var TESTER_FIELDS_FRAGMENT = gql19`
|
|
|
3591
3591
|
resourceType
|
|
3592
3592
|
updatedAt
|
|
3593
3593
|
}
|
|
3594
|
+
${CATEGORY_FIELDS_FRAGMENT}
|
|
3594
3595
|
`;
|
|
3595
3596
|
var GET_TESTERS = gql19`
|
|
3596
3597
|
query getTesters {
|
|
@@ -4053,7 +4054,7 @@ var categorySchema = yup.array().of(
|
|
|
4053
4054
|
})
|
|
4054
4055
|
).min(1, "At least one subcategory is required").required("Subcategories are required")
|
|
4055
4056
|
})
|
|
4056
|
-
)
|
|
4057
|
+
);
|
|
4057
4058
|
|
|
4058
4059
|
// src/yupSchema/market.ts
|
|
4059
4060
|
import * as yup2 from "yup";
|
|
@@ -4113,7 +4114,7 @@ var marketInfoSchema = yup2.object().shape({
|
|
|
4113
4114
|
// src/yupSchema/stallholder.ts
|
|
4114
4115
|
import * as yup3 from "yup";
|
|
4115
4116
|
var stallHolderSchema = globalResourceSchema.shape({
|
|
4116
|
-
categories: categorySchema,
|
|
4117
|
+
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
4117
4118
|
multiLocation: yup3.boolean().required("Multi location is required"),
|
|
4118
4119
|
products: yup3.array().of(yup3.string().defined()).min(1, "Product list must contain at least one item").required("Products are required")
|
|
4119
4120
|
});
|
|
@@ -4203,6 +4204,11 @@ var validateVerificationTokenSchema = yup5.object().shape({
|
|
|
4203
4204
|
// src/yupSchema/testers.ts
|
|
4204
4205
|
import * as yup6 from "yup";
|
|
4205
4206
|
var testersSchema = yup6.object().shape({
|
|
4207
|
+
categories: yup6.array().nullable().when("resourceType", {
|
|
4208
|
+
is: "stallholder" /* STALLHOLDER */,
|
|
4209
|
+
then: () => categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
4210
|
+
otherwise: () => yup6.array().nullable().notRequired()
|
|
4211
|
+
}),
|
|
4206
4212
|
email: emailSchema,
|
|
4207
4213
|
firstName: yup6.string().required("First name is required"),
|
|
4208
4214
|
lastName: yup6.string().required("Last name is required"),
|
|
@@ -4893,6 +4899,7 @@ import { yupResolver as yupResolver11 } from "@hookform/resolvers/yup";
|
|
|
4893
4899
|
import React6 from "react";
|
|
4894
4900
|
import { useForm as useForm11 } from "react-hook-form";
|
|
4895
4901
|
var defaultValues7 = {
|
|
4902
|
+
categories: null,
|
|
4896
4903
|
email: "",
|
|
4897
4904
|
firstName: "",
|
|
4898
4905
|
lastName: "",
|
|
@@ -4915,6 +4922,7 @@ function useTestersForm(data) {
|
|
|
4915
4922
|
React6.useEffect(() => {
|
|
4916
4923
|
if (data) {
|
|
4917
4924
|
reset({
|
|
4925
|
+
categories: data.categories,
|
|
4918
4926
|
email: data.email,
|
|
4919
4927
|
firstName: data.firstName,
|
|
4920
4928
|
lastName: data.lastName,
|
|
@@ -4925,10 +4933,11 @@ function useTestersForm(data) {
|
|
|
4925
4933
|
reset(defaultValues7);
|
|
4926
4934
|
}
|
|
4927
4935
|
}, [data]);
|
|
4928
|
-
const { email, firstName, lastName, osType, resourceType } = getValues();
|
|
4936
|
+
const { categories, email, firstName, lastName, osType, resourceType } = getValues();
|
|
4929
4937
|
return {
|
|
4930
4938
|
control,
|
|
4931
4939
|
fields: {
|
|
4940
|
+
categories,
|
|
4932
4941
|
email,
|
|
4933
4942
|
firstName,
|
|
4934
4943
|
lastName,
|