@timardex/cluemart-shared 1.0.46 → 1.0.48
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-lIxOaVRE.d.mts → contactUs-CQ9xTjlE.d.mts} +19 -1
- package/dist/{auth-lIxOaVRE.d.ts → contactUs-CQ9xTjlE.d.ts} +19 -1
- package/dist/formFields/index.cjs +31 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -1
- package/dist/formFields/index.d.ts +3 -1
- package/dist/formFields/index.mjs +30 -0
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/graphql/index.cjs +21 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +7 -1
- package/dist/graphql/index.d.ts +7 -1
- package/dist/graphql/index.mjs +20 -0
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +70 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +4 -2
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/index.mjs +69 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +122 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.mjs +119 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +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.d.mts
CHANGED
|
@@ -558,6 +558,24 @@ type TesterType = {
|
|
|
558
558
|
updatedAt: string;
|
|
559
559
|
};
|
|
560
560
|
|
|
561
|
+
type ContactUsFormData = {
|
|
562
|
+
email: string;
|
|
563
|
+
firstName: string;
|
|
564
|
+
lastName: string;
|
|
565
|
+
message: string;
|
|
566
|
+
};
|
|
567
|
+
interface CreateContactUsFormData {
|
|
568
|
+
control: Control<ContactUsFormData, any>;
|
|
569
|
+
fields: ContactUsFormData;
|
|
570
|
+
formState: {
|
|
571
|
+
errors: FieldErrors<ContactUsFormData>;
|
|
572
|
+
};
|
|
573
|
+
handleSubmit: UseFormHandleSubmit<ContactUsFormData, any>;
|
|
574
|
+
reset: UseFormReset<ContactUsFormData>;
|
|
575
|
+
setValue: UseFormSetValue<ContactUsFormData>;
|
|
576
|
+
watch: UseFormWatch<ContactUsFormData>;
|
|
577
|
+
}
|
|
578
|
+
|
|
561
579
|
declare const dateFormat = "DD-MM-YYYY";
|
|
562
580
|
declare const timeFormat = "HH:mm";
|
|
563
581
|
type DateFormat = "date" | "time" | "datetime";
|
|
@@ -704,6 +722,8 @@ declare function mapBaseResourceTypeToFormData(data: MarketFormData | Stallholde
|
|
|
704
722
|
|
|
705
723
|
declare function useTestersForm(data?: TestersFormData): CreateTestersFormData;
|
|
706
724
|
|
|
725
|
+
declare function useContactUsForm(data?: ContactUsFormData): CreateContactUsFormData;
|
|
726
|
+
|
|
707
727
|
declare const useRegister: () => {
|
|
708
728
|
error: _apollo_client.ApolloError | undefined;
|
|
709
729
|
loading: boolean;
|
|
@@ -1059,6 +1079,12 @@ declare const useGetTester: (_id: string) => {
|
|
|
1059
1079
|
tester: TesterType;
|
|
1060
1080
|
};
|
|
1061
1081
|
|
|
1082
|
+
declare const useContactUs: () => {
|
|
1083
|
+
contactUs: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1084
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1085
|
+
loading: boolean;
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1062
1088
|
declare const stallholderBasicInfoFields: FormField[];
|
|
1063
1089
|
declare const stallholderMultiLocation: FormField;
|
|
1064
1090
|
declare const stallholderFullAddress: FormField;
|
|
@@ -1123,10 +1149,12 @@ declare const socialMediaFields: FormField[];
|
|
|
1123
1149
|
|
|
1124
1150
|
declare const testersFields: FormField[];
|
|
1125
1151
|
|
|
1152
|
+
declare const contactUsFields: FormField[];
|
|
1153
|
+
|
|
1126
1154
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1127
1155
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
1128
1156
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
1129
1157
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1130
1158
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1131
1159
|
|
|
1132
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
|
1160
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useContactUs, useContactUsForm, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -558,6 +558,24 @@ type TesterType = {
|
|
|
558
558
|
updatedAt: string;
|
|
559
559
|
};
|
|
560
560
|
|
|
561
|
+
type ContactUsFormData = {
|
|
562
|
+
email: string;
|
|
563
|
+
firstName: string;
|
|
564
|
+
lastName: string;
|
|
565
|
+
message: string;
|
|
566
|
+
};
|
|
567
|
+
interface CreateContactUsFormData {
|
|
568
|
+
control: Control<ContactUsFormData, any>;
|
|
569
|
+
fields: ContactUsFormData;
|
|
570
|
+
formState: {
|
|
571
|
+
errors: FieldErrors<ContactUsFormData>;
|
|
572
|
+
};
|
|
573
|
+
handleSubmit: UseFormHandleSubmit<ContactUsFormData, any>;
|
|
574
|
+
reset: UseFormReset<ContactUsFormData>;
|
|
575
|
+
setValue: UseFormSetValue<ContactUsFormData>;
|
|
576
|
+
watch: UseFormWatch<ContactUsFormData>;
|
|
577
|
+
}
|
|
578
|
+
|
|
561
579
|
declare const dateFormat = "DD-MM-YYYY";
|
|
562
580
|
declare const timeFormat = "HH:mm";
|
|
563
581
|
type DateFormat = "date" | "time" | "datetime";
|
|
@@ -704,6 +722,8 @@ declare function mapBaseResourceTypeToFormData(data: MarketFormData | Stallholde
|
|
|
704
722
|
|
|
705
723
|
declare function useTestersForm(data?: TestersFormData): CreateTestersFormData;
|
|
706
724
|
|
|
725
|
+
declare function useContactUsForm(data?: ContactUsFormData): CreateContactUsFormData;
|
|
726
|
+
|
|
707
727
|
declare const useRegister: () => {
|
|
708
728
|
error: _apollo_client.ApolloError | undefined;
|
|
709
729
|
loading: boolean;
|
|
@@ -1059,6 +1079,12 @@ declare const useGetTester: (_id: string) => {
|
|
|
1059
1079
|
tester: TesterType;
|
|
1060
1080
|
};
|
|
1061
1081
|
|
|
1082
|
+
declare const useContactUs: () => {
|
|
1083
|
+
contactUs: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
1084
|
+
error: _apollo_client.ApolloError | undefined;
|
|
1085
|
+
loading: boolean;
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1062
1088
|
declare const stallholderBasicInfoFields: FormField[];
|
|
1063
1089
|
declare const stallholderMultiLocation: FormField;
|
|
1064
1090
|
declare const stallholderFullAddress: FormField;
|
|
@@ -1123,10 +1149,12 @@ declare const socialMediaFields: FormField[];
|
|
|
1123
1149
|
|
|
1124
1150
|
declare const testersFields: FormField[];
|
|
1125
1151
|
|
|
1152
|
+
declare const contactUsFields: FormField[];
|
|
1153
|
+
|
|
1126
1154
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1127
1155
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
1128
1156
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
1129
1157
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1130
1158
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1131
1159
|
|
|
1132
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
|
1160
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentTargetType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SiteType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, siteTypeOptions, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useContactUs, useContactUsForm, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|
package/dist/index.mjs
CHANGED
|
@@ -577,8 +577,11 @@ var testersSchema = yup6.object().shape({
|
|
|
577
577
|
email: emailSchema,
|
|
578
578
|
firstName: yup6.string().required("First name is required"),
|
|
579
579
|
lastName: yup6.string().required("Last name is required"),
|
|
580
|
-
osType: yup6.mixed().oneOf(Object.values(EnumOSType)).required("OS Type is required"),
|
|
581
|
-
resourceType: yup6.mixed().oneOf(
|
|
580
|
+
osType: yup6.mixed().oneOf(Object.values(EnumOSType), "Please select a Android or iOS device").required("OS Type is required"),
|
|
581
|
+
resourceType: yup6.mixed().oneOf(
|
|
582
|
+
Object.values(EnumResourceType),
|
|
583
|
+
"Please select a Market or Stallholder"
|
|
584
|
+
).required("Resource Type is required")
|
|
582
585
|
});
|
|
583
586
|
|
|
584
587
|
// src/hooks/utils.ts
|
|
@@ -1322,6 +1325,69 @@ function useTestersForm(data) {
|
|
|
1322
1325
|
};
|
|
1323
1326
|
}
|
|
1324
1327
|
|
|
1328
|
+
// src/hooks/useContactUsForm.ts
|
|
1329
|
+
import { yupResolver as yupResolver12 } from "@hookform/resolvers/yup";
|
|
1330
|
+
import React7 from "react";
|
|
1331
|
+
import { useForm as useForm12 } from "react-hook-form";
|
|
1332
|
+
|
|
1333
|
+
// src/yupSchema/contactUs.ts
|
|
1334
|
+
import * as yup7 from "yup";
|
|
1335
|
+
var contactUsSchema = yup7.object().shape({
|
|
1336
|
+
email: emailSchema,
|
|
1337
|
+
firstName: yup7.string().required("First name is required"),
|
|
1338
|
+
lastName: yup7.string().required("Last name is required"),
|
|
1339
|
+
message: yup7.string().required("Message is required")
|
|
1340
|
+
});
|
|
1341
|
+
|
|
1342
|
+
// src/hooks/useContactUsForm.ts
|
|
1343
|
+
var defaultValues8 = {
|
|
1344
|
+
email: "",
|
|
1345
|
+
firstName: "",
|
|
1346
|
+
lastName: "",
|
|
1347
|
+
message: ""
|
|
1348
|
+
};
|
|
1349
|
+
function useContactUsForm(data) {
|
|
1350
|
+
const {
|
|
1351
|
+
control,
|
|
1352
|
+
formState: { errors },
|
|
1353
|
+
getValues,
|
|
1354
|
+
handleSubmit,
|
|
1355
|
+
reset,
|
|
1356
|
+
setValue,
|
|
1357
|
+
watch
|
|
1358
|
+
} = useForm12({
|
|
1359
|
+
defaultValues: defaultValues8,
|
|
1360
|
+
resolver: yupResolver12(contactUsSchema)
|
|
1361
|
+
});
|
|
1362
|
+
React7.useEffect(() => {
|
|
1363
|
+
if (data) {
|
|
1364
|
+
reset({
|
|
1365
|
+
email: data.email,
|
|
1366
|
+
firstName: data.firstName,
|
|
1367
|
+
lastName: data.lastName,
|
|
1368
|
+
message: data.message
|
|
1369
|
+
});
|
|
1370
|
+
} else {
|
|
1371
|
+
reset(defaultValues8);
|
|
1372
|
+
}
|
|
1373
|
+
}, [data]);
|
|
1374
|
+
const { email, firstName, lastName, message } = getValues();
|
|
1375
|
+
return {
|
|
1376
|
+
control,
|
|
1377
|
+
fields: {
|
|
1378
|
+
email,
|
|
1379
|
+
firstName,
|
|
1380
|
+
lastName,
|
|
1381
|
+
message
|
|
1382
|
+
},
|
|
1383
|
+
formState: { errors },
|
|
1384
|
+
handleSubmit,
|
|
1385
|
+
reset,
|
|
1386
|
+
setValue,
|
|
1387
|
+
watch
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1325
1391
|
// src/graphql/hooks/auth.ts
|
|
1326
1392
|
import { useMutation } from "@apollo/client";
|
|
1327
1393
|
|
|
@@ -3105,6 +3171,25 @@ var useGetTester = (_id) => {
|
|
|
3105
3171
|
return { error, loading, refetch, tester };
|
|
3106
3172
|
};
|
|
3107
3173
|
|
|
3174
|
+
// src/graphql/hooks/contactUs.ts
|
|
3175
|
+
import { useMutation as useMutation9 } from "@apollo/client";
|
|
3176
|
+
|
|
3177
|
+
// src/graphql/mutations/contactUs.ts
|
|
3178
|
+
import { gql as gql18 } from "@apollo/client";
|
|
3179
|
+
var CONTACT_US_MUTATION = gql18`
|
|
3180
|
+
mutation contactUs($input: ContactUsInputType!) {
|
|
3181
|
+
contactUs(input: $input) {
|
|
3182
|
+
message
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
`;
|
|
3186
|
+
|
|
3187
|
+
// src/graphql/hooks/contactUs.ts
|
|
3188
|
+
var useContactUs = () => {
|
|
3189
|
+
const [contactUs, { loading, error }] = useMutation9(CONTACT_US_MUTATION);
|
|
3190
|
+
return { contactUs, error, loading };
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3108
3193
|
// src/formFields/stallholder/stallholder.ts
|
|
3109
3194
|
var stallholderBasicInfoFields = [
|
|
3110
3195
|
{
|
|
@@ -4097,6 +4182,35 @@ var testersFields = [
|
|
|
4097
4182
|
}
|
|
4098
4183
|
];
|
|
4099
4184
|
|
|
4185
|
+
// src/formFields/contactUs.ts
|
|
4186
|
+
var contactUsFields = [
|
|
4187
|
+
{
|
|
4188
|
+
helperText: "Enter your first name",
|
|
4189
|
+
keyboardType: "default",
|
|
4190
|
+
name: "firstName",
|
|
4191
|
+
placeholder: "First Name"
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
helperText: "Enter your last name",
|
|
4195
|
+
keyboardType: "default",
|
|
4196
|
+
name: "lastName",
|
|
4197
|
+
placeholder: "Last Name"
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
helperText: "Enter your email address",
|
|
4201
|
+
keyboardType: "email-address",
|
|
4202
|
+
name: "email",
|
|
4203
|
+
placeholder: "Email"
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
helperText: "Enter your message",
|
|
4207
|
+
isTextArea: true,
|
|
4208
|
+
keyboardType: "default",
|
|
4209
|
+
name: "message",
|
|
4210
|
+
placeholder: "Message"
|
|
4211
|
+
}
|
|
4212
|
+
];
|
|
4213
|
+
|
|
4100
4214
|
// src/storage/index.ts
|
|
4101
4215
|
var SAVED_PASSWORD_KEY = "savedPassword";
|
|
4102
4216
|
var SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -4128,6 +4242,7 @@ export {
|
|
|
4128
4242
|
availableTagTypes,
|
|
4129
4243
|
capitalizeFirstLetter,
|
|
4130
4244
|
categoryColors,
|
|
4245
|
+
contactUsFields,
|
|
4131
4246
|
dateFormat,
|
|
4132
4247
|
defaultMarketFormValues,
|
|
4133
4248
|
defaultMarketInfoFormValues,
|
|
@@ -4182,6 +4297,8 @@ export {
|
|
|
4182
4297
|
truncateText,
|
|
4183
4298
|
useAddParticipantToChat,
|
|
4184
4299
|
useAddUserFavouriteResource,
|
|
4300
|
+
useContactUs,
|
|
4301
|
+
useContactUsForm,
|
|
4185
4302
|
useCreateChat,
|
|
4186
4303
|
useCreateMarket,
|
|
4187
4304
|
useCreateMarketInfo,
|