@timardex/cluemart-shared 1.0.46 → 1.0.47
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 +65 -0
- 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 +64 -0
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +117 -0
- 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 +114 -0
- 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
|
@@ -1322,6 +1322,69 @@ function useTestersForm(data) {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
1324
|
|
|
1325
|
+
// src/hooks/useContactUsForm.ts
|
|
1326
|
+
import { yupResolver as yupResolver12 } from "@hookform/resolvers/yup";
|
|
1327
|
+
import React7 from "react";
|
|
1328
|
+
import { useForm as useForm12 } from "react-hook-form";
|
|
1329
|
+
|
|
1330
|
+
// src/yupSchema/contactUs.ts
|
|
1331
|
+
import * as yup7 from "yup";
|
|
1332
|
+
var contactUsSchema = yup7.object().shape({
|
|
1333
|
+
email: emailSchema,
|
|
1334
|
+
firstName: yup7.string().required("First name is required"),
|
|
1335
|
+
lastName: yup7.string().required("Last name is required"),
|
|
1336
|
+
message: yup7.string().required("Message is required")
|
|
1337
|
+
});
|
|
1338
|
+
|
|
1339
|
+
// src/hooks/useContactUsForm.ts
|
|
1340
|
+
var defaultValues8 = {
|
|
1341
|
+
email: "",
|
|
1342
|
+
firstName: "",
|
|
1343
|
+
lastName: "",
|
|
1344
|
+
message: ""
|
|
1345
|
+
};
|
|
1346
|
+
function useContactUsForm(data) {
|
|
1347
|
+
const {
|
|
1348
|
+
control,
|
|
1349
|
+
formState: { errors },
|
|
1350
|
+
getValues,
|
|
1351
|
+
handleSubmit,
|
|
1352
|
+
reset,
|
|
1353
|
+
setValue,
|
|
1354
|
+
watch
|
|
1355
|
+
} = useForm12({
|
|
1356
|
+
defaultValues: defaultValues8,
|
|
1357
|
+
resolver: yupResolver12(contactUsSchema)
|
|
1358
|
+
});
|
|
1359
|
+
React7.useEffect(() => {
|
|
1360
|
+
if (data) {
|
|
1361
|
+
reset({
|
|
1362
|
+
email: data.email,
|
|
1363
|
+
firstName: data.firstName,
|
|
1364
|
+
lastName: data.lastName,
|
|
1365
|
+
message: data.message
|
|
1366
|
+
});
|
|
1367
|
+
} else {
|
|
1368
|
+
reset(defaultValues8);
|
|
1369
|
+
}
|
|
1370
|
+
}, [data]);
|
|
1371
|
+
const { email, firstName, lastName, message } = getValues();
|
|
1372
|
+
return {
|
|
1373
|
+
control,
|
|
1374
|
+
fields: {
|
|
1375
|
+
email,
|
|
1376
|
+
firstName,
|
|
1377
|
+
lastName,
|
|
1378
|
+
message
|
|
1379
|
+
},
|
|
1380
|
+
formState: { errors },
|
|
1381
|
+
handleSubmit,
|
|
1382
|
+
reset,
|
|
1383
|
+
setValue,
|
|
1384
|
+
watch
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1325
1388
|
// src/graphql/hooks/auth.ts
|
|
1326
1389
|
import { useMutation } from "@apollo/client";
|
|
1327
1390
|
|
|
@@ -3105,6 +3168,25 @@ var useGetTester = (_id) => {
|
|
|
3105
3168
|
return { error, loading, refetch, tester };
|
|
3106
3169
|
};
|
|
3107
3170
|
|
|
3171
|
+
// src/graphql/hooks/contactUs.ts
|
|
3172
|
+
import { useMutation as useMutation9 } from "@apollo/client";
|
|
3173
|
+
|
|
3174
|
+
// src/graphql/mutations/contactUs.ts
|
|
3175
|
+
import { gql as gql18 } from "@apollo/client";
|
|
3176
|
+
var CONTACT_US_MUTATION = gql18`
|
|
3177
|
+
mutation contactUs($input: ContactUsInputType!) {
|
|
3178
|
+
contactUs(input: $input) {
|
|
3179
|
+
message
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
`;
|
|
3183
|
+
|
|
3184
|
+
// src/graphql/hooks/contactUs.ts
|
|
3185
|
+
var useContactUs = () => {
|
|
3186
|
+
const [contactUs, { loading, error }] = useMutation9(CONTACT_US_MUTATION);
|
|
3187
|
+
return { contactUs, error, loading };
|
|
3188
|
+
};
|
|
3189
|
+
|
|
3108
3190
|
// src/formFields/stallholder/stallholder.ts
|
|
3109
3191
|
var stallholderBasicInfoFields = [
|
|
3110
3192
|
{
|
|
@@ -4097,6 +4179,35 @@ var testersFields = [
|
|
|
4097
4179
|
}
|
|
4098
4180
|
];
|
|
4099
4181
|
|
|
4182
|
+
// src/formFields/contactUs.ts
|
|
4183
|
+
var contactUsFields = [
|
|
4184
|
+
{
|
|
4185
|
+
helperText: "Enter your first name",
|
|
4186
|
+
keyboardType: "default",
|
|
4187
|
+
name: "firstName",
|
|
4188
|
+
placeholder: "First Name"
|
|
4189
|
+
},
|
|
4190
|
+
{
|
|
4191
|
+
helperText: "Enter your last name",
|
|
4192
|
+
keyboardType: "default",
|
|
4193
|
+
name: "lastName",
|
|
4194
|
+
placeholder: "Last Name"
|
|
4195
|
+
},
|
|
4196
|
+
{
|
|
4197
|
+
helperText: "Enter your email address",
|
|
4198
|
+
keyboardType: "email-address",
|
|
4199
|
+
name: "email",
|
|
4200
|
+
placeholder: "Email"
|
|
4201
|
+
},
|
|
4202
|
+
{
|
|
4203
|
+
helperText: "Enter your message",
|
|
4204
|
+
isTextArea: true,
|
|
4205
|
+
keyboardType: "default",
|
|
4206
|
+
name: "message",
|
|
4207
|
+
placeholder: "Message"
|
|
4208
|
+
}
|
|
4209
|
+
];
|
|
4210
|
+
|
|
4100
4211
|
// src/storage/index.ts
|
|
4101
4212
|
var SAVED_PASSWORD_KEY = "savedPassword";
|
|
4102
4213
|
var SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -4128,6 +4239,7 @@ export {
|
|
|
4128
4239
|
availableTagTypes,
|
|
4129
4240
|
capitalizeFirstLetter,
|
|
4130
4241
|
categoryColors,
|
|
4242
|
+
contactUsFields,
|
|
4131
4243
|
dateFormat,
|
|
4132
4244
|
defaultMarketFormValues,
|
|
4133
4245
|
defaultMarketInfoFormValues,
|
|
@@ -4182,6 +4294,8 @@ export {
|
|
|
4182
4294
|
truncateText,
|
|
4183
4295
|
useAddParticipantToChat,
|
|
4184
4296
|
useAddUserFavouriteResource,
|
|
4297
|
+
useContactUs,
|
|
4298
|
+
useContactUsForm,
|
|
4185
4299
|
useCreateChat,
|
|
4186
4300
|
useCreateMarket,
|
|
4187
4301
|
useCreateMarketInfo,
|