@timardex/cluemart-shared 1.0.25 → 1.0.27

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/index.d.mts CHANGED
@@ -221,6 +221,11 @@ interface RelationType {
221
221
  interface DateTimeWithPriceType extends DateTimeType {
222
222
  marketPrice: number;
223
223
  }
224
+ type PaymentTargetType = {
225
+ accountHolderName?: string;
226
+ accountNumber?: string;
227
+ link?: string;
228
+ };
224
229
  interface MarketInfoFormData {
225
230
  _id?: string;
226
231
  applicationDeadlineHours: number;
@@ -228,11 +233,7 @@ interface MarketInfoFormData {
228
233
  marketId: string;
229
234
  paymentDueHours: number;
230
235
  paymentMethod: EnumPaymentMethod;
231
- paymentTarget: {
232
- accountHolderName?: string;
233
- accountNumber?: string;
234
- link?: string;
235
- };
236
+ paymentTarget: PaymentTargetType[];
236
237
  rejectionPolicy: EnumRejectionPolicy;
237
238
  stallCapacity: number;
238
239
  }
@@ -1002,7 +1003,10 @@ declare const producedIngOptions: OptionItem[];
1002
1003
  declare const marketBasicInfoFields: FormField[];
1003
1004
  declare const marketStartDateFields: FormDateField[];
1004
1005
  declare const marketEndDateFields: FormDateField[];
1005
- declare const availableTagTypes: string[];
1006
+ declare const availableTagTypes: {
1007
+ icon: string;
1008
+ label: string;
1009
+ }[];
1006
1010
  declare const tagOptions: OptionItem[];
1007
1011
 
1008
1012
  declare const marketInfo: FormField[];
@@ -1023,4 +1027,4 @@ declare const categoryColors: Record<string, string>;
1023
1027
 
1024
1028
  declare const socialMediaFields: FormField[];
1025
1029
 
1026
- 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 CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, 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 PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, 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, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1030
+ 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 CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, 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 ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, 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, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
package/dist/index.d.ts CHANGED
@@ -221,6 +221,11 @@ interface RelationType {
221
221
  interface DateTimeWithPriceType extends DateTimeType {
222
222
  marketPrice: number;
223
223
  }
224
+ type PaymentTargetType = {
225
+ accountHolderName?: string;
226
+ accountNumber?: string;
227
+ link?: string;
228
+ };
224
229
  interface MarketInfoFormData {
225
230
  _id?: string;
226
231
  applicationDeadlineHours: number;
@@ -228,11 +233,7 @@ interface MarketInfoFormData {
228
233
  marketId: string;
229
234
  paymentDueHours: number;
230
235
  paymentMethod: EnumPaymentMethod;
231
- paymentTarget: {
232
- accountHolderName?: string;
233
- accountNumber?: string;
234
- link?: string;
235
- };
236
+ paymentTarget: PaymentTargetType[];
236
237
  rejectionPolicy: EnumRejectionPolicy;
237
238
  stallCapacity: number;
238
239
  }
@@ -1002,7 +1003,10 @@ declare const producedIngOptions: OptionItem[];
1002
1003
  declare const marketBasicInfoFields: FormField[];
1003
1004
  declare const marketStartDateFields: FormDateField[];
1004
1005
  declare const marketEndDateFields: FormDateField[];
1005
- declare const availableTagTypes: string[];
1006
+ declare const availableTagTypes: {
1007
+ icon: string;
1008
+ label: string;
1009
+ }[];
1006
1010
  declare const tagOptions: OptionItem[];
1007
1011
 
1008
1012
  declare const marketInfo: FormField[];
@@ -1023,4 +1027,4 @@ declare const categoryColors: Record<string, string>;
1023
1027
 
1024
1028
  declare const socialMediaFields: FormField[];
1025
1029
 
1026
- 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 CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, 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 PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, 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, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1030
+ 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 CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, 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 ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, 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, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
package/dist/index.mjs CHANGED
@@ -403,43 +403,44 @@ var marketSchema = globalResourceSchema.shape({
403
403
  provider: yup2.string().trim().min(3).required("Provider is required"),
404
404
  tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
405
405
  });
406
+ var paymentTargetSchema = yup2.object().when("paymentMethod", (paymentMethod, schema) => {
407
+ const isBankTransfer = paymentMethod.includes(
408
+ "bank_transfer" /* BANK_TRANSFER */
409
+ );
410
+ if (!isBankTransfer) {
411
+ return schema.shape({
412
+ accountHolderName: yup2.string().notRequired(),
413
+ accountNumber: yup2.string().notRequired(),
414
+ link: yup2.string().trim().url("Link must be a valid URL").transform(
415
+ (value) => typeof value === "string" ? value.toLowerCase() : value
416
+ ).required("Link is required for PayPal/Stripe")
417
+ });
418
+ } else if (isBankTransfer) {
419
+ return schema.shape({
420
+ accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
421
+ accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
422
+ nzBankAccountRegex,
423
+ "Account number must be in format: XX-XXXX-XXXXXXX-XX"
424
+ ),
425
+ link: yup2.string().transform(
426
+ (value) => typeof value === "string" ? value.toLowerCase() : value
427
+ ).notRequired()
428
+ });
429
+ } else {
430
+ return schema.shape({
431
+ accountHolderName: yup2.string().notRequired(),
432
+ accountNumber: yup2.string().notRequired(),
433
+ link: yup2.string().notRequired()
434
+ });
435
+ }
436
+ });
406
437
  var marketInfoSchema = yup2.object().shape({
407
438
  applicationDeadlineHours: yup2.number().typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
408
439
  dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
409
440
  marketId: yup2.string().trim().required("Market ID is required"),
410
441
  paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
411
442
  paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
412
- paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
413
- const isBankTransfer = paymentMethod.includes(
414
- "bank_transfer" /* BANK_TRANSFER */
415
- );
416
- if (!isBankTransfer) {
417
- return schema.shape({
418
- accountHolderName: yup2.string().notRequired(),
419
- accountNumber: yup2.string().notRequired(),
420
- link: yup2.string().trim().url("Link must be a valid URL").transform(
421
- (value) => typeof value === "string" ? value.toLowerCase() : value
422
- ).required("Link is required for PayPal/Stripe")
423
- });
424
- } else if (isBankTransfer) {
425
- return schema.shape({
426
- accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
427
- accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
428
- nzBankAccountRegex,
429
- "Account number must be in format: XX-XXXX-XXXXXXX-XX"
430
- ),
431
- link: yup2.string().transform(
432
- (value) => typeof value === "string" ? value.toLowerCase() : value
433
- ).notRequired()
434
- });
435
- } else {
436
- return schema.shape({
437
- accountHolderName: yup2.string().notRequired(),
438
- accountNumber: yup2.string().notRequired(),
439
- link: yup2.string().notRequired()
440
- });
441
- }
442
- }),
443
+ paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required"),
443
444
  rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
444
445
  stallCapacity: yup2.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
445
446
  });
@@ -620,11 +621,13 @@ var defaultMarketInfoFormValues = {
620
621
  marketId: "",
621
622
  paymentDueHours: 0,
622
623
  paymentMethod: "",
623
- paymentTarget: {
624
- accountHolderName: "",
625
- accountNumber: "",
626
- link: ""
627
- },
624
+ paymentTarget: [
625
+ {
626
+ accountHolderName: "",
627
+ accountNumber: "",
628
+ link: ""
629
+ }
630
+ ],
628
631
  rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
629
632
  stallCapacity: 0
630
633
  };
@@ -3060,26 +3063,26 @@ var marketEndDateFields = [
3060
3063
  }
3061
3064
  ];
3062
3065
  var availableTagTypes = [
3063
- "All Ages",
3064
- "Day Market",
3065
- "Family Friendly",
3066
- "Free Entry",
3067
- "Indoor Market",
3068
- "Live Music",
3069
- "Night Market",
3070
- "Outdoor Market",
3071
- "Pet Friendly",
3072
- "Near Bustop",
3073
- "Near Train Station",
3074
- "Parking Available",
3075
- "Toilet Available",
3076
- "Wheelchair Accessible",
3077
- "Near Playground",
3078
- "Port Nearby"
3066
+ { icon: "human-male-female-child", label: "All Ages" },
3067
+ { icon: "weather-sunny", label: "Day Market" },
3068
+ { icon: "account-child", label: "Family Friendly" },
3069
+ { icon: "ticket-percent", label: "Free Entry" },
3070
+ { icon: "home-city", label: "Indoor Market" },
3071
+ { icon: "music", label: "Live Music" },
3072
+ { icon: "bus", label: "Near Bustop" },
3073
+ { icon: "slide", label: "Near Playground" },
3074
+ { icon: "train", label: "Near Train Station" },
3075
+ { icon: "weather-night", label: "Night Market" },
3076
+ { icon: "tree", label: "Outdoor Market" },
3077
+ { icon: "car", label: "Parking Available" },
3078
+ { icon: "dog", label: "Pet Friendly" },
3079
+ { icon: "ship-wheel", label: "Port Nearby" },
3080
+ { icon: "toilet", label: "Toilet Available" },
3081
+ { icon: "wheelchair-accessibility", label: "Wheelchair Accessible" }
3079
3082
  ];
3080
3083
  var tagOptions = availableTagTypes.map((tag) => ({
3081
- label: tag,
3082
- value: tag
3084
+ label: tag.label,
3085
+ value: tag.label
3083
3086
  }));
3084
3087
 
3085
3088
  // src/formFields/market/marketInfo.ts
@@ -3106,18 +3109,18 @@ var marketInfo = [
3106
3109
  var marketInfoPaymentTarget = [
3107
3110
  {
3108
3111
  helperText: "Account holder name *",
3109
- name: "paymentTarget.accountHolderName",
3112
+ name: "accountHolderName",
3110
3113
  placeholder: "Account holder name"
3111
3114
  },
3112
3115
  {
3113
3116
  helperText: "Account number *",
3114
- name: "paymentTarget.accountNumber",
3117
+ name: "accountNumber",
3115
3118
  placeholder: "Account number"
3116
3119
  },
3117
3120
  {
3118
3121
  helperText: "Link to payment target *",
3119
3122
  keyboardType: "url",
3120
- name: "paymentTarget.link",
3123
+ name: "link",
3121
3124
  placeholder: "Link to payment target"
3122
3125
  }
3123
3126
  ];