@timardex/cluemart-shared 1.0.29 → 1.0.30

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
@@ -226,7 +226,7 @@ type PaymentTargetType = {
226
226
  type Requirement = {
227
227
  category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
228
228
  label: string;
229
- value: string;
229
+ value: boolean;
230
230
  };
231
231
  interface MarketInfoFormData {
232
232
  _id?: string;
@@ -411,8 +411,8 @@ type ResourceImageType = {
411
411
  title: string;
412
412
  };
413
413
  type SocialMediaType = {
414
- name: EnumSocialMedia;
415
- link: string;
414
+ name?: EnumSocialMedia;
415
+ link?: string;
416
416
  };
417
417
  interface BaseResourceTypeFormData {
418
418
  _id?: string;
@@ -578,6 +578,7 @@ declare function sortDatesByProximity<T extends {
578
578
  declare const availableRegionTypes: EnumRegions[];
579
579
  declare const availableRegionOptions: OptionItem[];
580
580
  declare const paymentMethodOptions: OptionItem[];
581
+ declare function normalizeUrl(url: string): string;
581
582
 
582
583
  interface PlacePrediction {
583
584
  place_id: string;
@@ -1030,4 +1031,4 @@ declare const categoryColors: Record<string, string>;
1030
1031
 
1031
1032
  declare const socialMediaFields: FormField[];
1032
1033
 
1033
- 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, 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, 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, removeTypename, requestPasswordResetFields, requirementsOptions, 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 };
1034
+ 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, 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, 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, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, 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
@@ -226,7 +226,7 @@ type PaymentTargetType = {
226
226
  type Requirement = {
227
227
  category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
228
228
  label: string;
229
- value: string;
229
+ value: boolean;
230
230
  };
231
231
  interface MarketInfoFormData {
232
232
  _id?: string;
@@ -411,8 +411,8 @@ type ResourceImageType = {
411
411
  title: string;
412
412
  };
413
413
  type SocialMediaType = {
414
- name: EnumSocialMedia;
415
- link: string;
414
+ name?: EnumSocialMedia;
415
+ link?: string;
416
416
  };
417
417
  interface BaseResourceTypeFormData {
418
418
  _id?: string;
@@ -578,6 +578,7 @@ declare function sortDatesByProximity<T extends {
578
578
  declare const availableRegionTypes: EnumRegions[];
579
579
  declare const availableRegionOptions: OptionItem[];
580
580
  declare const paymentMethodOptions: OptionItem[];
581
+ declare function normalizeUrl(url: string): string;
581
582
 
582
583
  interface PlacePrediction {
583
584
  place_id: string;
@@ -1030,4 +1031,4 @@ declare const categoryColors: Record<string, string>;
1030
1031
 
1031
1032
  declare const socialMediaFields: FormField[];
1032
1033
 
1033
- 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, 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, 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, removeTypename, requestPasswordResetFields, requirementsOptions, 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 };
1034
+ 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, 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, 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, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, 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
@@ -197,6 +197,12 @@ var availableRegionOptions = mapArrayToOptions(availableRegionTypes);
197
197
  var paymentMethodOptions = mapArrayToOptions(
198
198
  Object.values(EnumPaymentMethod)
199
199
  );
200
+ function normalizeUrl(url) {
201
+ if (!url.startsWith("http://") && !url.startsWith("https://")) {
202
+ return `https://${url}`;
203
+ }
204
+ return url;
205
+ }
200
206
 
201
207
  // src/hooks/useLocationSearch.ts
202
208
  var handleApiError = (error, message) => {
@@ -282,6 +288,11 @@ import dayjs2, { extend as extend2 } from "dayjs";
282
288
  import customParseFormat2 from "dayjs/plugin/customParseFormat";
283
289
  import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter";
284
290
  import * as yup from "yup";
291
+ var normalizedUrlTransform = () => yup.string().trim().transform(
292
+ (value) => typeof value === "string" ? value.toLowerCase() : value
293
+ ).transform(
294
+ (value) => typeof value === "string" ? normalizeUrl(value) : value
295
+ );
285
296
  var noLeadingZeros = (fieldName, options = {}) => {
286
297
  return function(value, context) {
287
298
  const original = context.originalValue?.toString() ?? "";
@@ -378,6 +389,15 @@ var emailSchema = yup.string().email("Invalid email address").required("Email is
378
389
  (value) => typeof value === "string" ? value.toLowerCase() : value
379
390
  );
380
391
  var passwordSchema = yup.string().trim().min(8, "Password must be at least 8 characters long").required("Password is required");
392
+ var socialMediaSchema = yup.object({
393
+ name: yup.mixed().oneOf(Object.values(EnumSocialMedia)).optional(),
394
+ link: yup.string().when("name", {
395
+ is: (name) => !!name,
396
+ // If name has a value
397
+ then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL"),
398
+ otherwise: (schema) => schema.notRequired()
399
+ })
400
+ });
381
401
  var globalResourceSchema = yup.object().shape({
382
402
  active: yup.boolean().required("Active is required"),
383
403
  cover: yup.object({
@@ -386,7 +406,8 @@ var globalResourceSchema = yup.object().shape({
386
406
  }),
387
407
  description: yup.string().trim().min(3).required("Description is required"),
388
408
  name: yup.string().trim().min(3).required("Name is required"),
389
- region: yup.string().required("Region is required")
409
+ region: yup.string().required("Region is required"),
410
+ socialMedia: yup.array().of(socialMediaSchema).nullable().optional()
390
411
  });
391
412
 
392
413
  // src/yupSchema/market.ts
@@ -415,9 +436,7 @@ var paymentTargetSchema = yup2.object({
415
436
  }),
416
437
  link: yup2.string().when("paymentMethod", {
417
438
  is: (val) => val !== "bank_transfer" /* BANK_TRANSFER */,
418
- then: (schema) => schema.trim().url("Link must be a valid URL").required("Link is required for PayPal/Stripe").transform(
419
- (value) => typeof value === "string" ? value.toLowerCase() : value
420
- ),
439
+ then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
421
440
  otherwise: (schema) => schema.notRequired()
422
441
  })
423
442
  });
@@ -427,22 +446,6 @@ var marketInfoSchema = yup2.object().shape({
427
446
  marketId: yup2.string().trim().required("Market ID is required"),
428
447
  packInTime: yup2.number().typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
429
448
  packOutTime: yup2.number().typeError("Pack out time must be a number").min(1, "Pack out time must be at least 1").required("Pack out time is required").test("no-leading-zeros", "", noLeadingZeros("Pack out time")),
430
- /* requirements: yup
431
- .array()
432
- .of(
433
- yup.object({
434
- category: yup
435
- .mixed<
436
- "Food Safety" | "Environment" | "Operations" | "Legal & Safety"
437
- >()
438
- .oneOf(["Food Safety", "Environment", "Operations", "Legal & Safety"])
439
- .required("Category is required"),
440
- label: yup.string().trim().required("Label is required"),
441
- value: yup.string().trim().required("Value is required"),
442
- }),
443
- )
444
- .min(1, "At least one requirement is required")
445
- .required("Requirements are required"), */
446
449
  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")),
447
450
  paymentTarget: yup2.array().of(paymentTargetSchema).min(1, "At least one payment target is required").required("Payment target is required"),
448
451
  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"))
@@ -3154,80 +3157,160 @@ var marketPriceByDateFields = [
3154
3157
  }
3155
3158
  ];
3156
3159
  var requirementsOptions = [
3160
+ {
3161
+ category: "Environment",
3162
+ label: "All packaging must be eco-friendly or recyclable where possible.",
3163
+ value: false
3164
+ },
3165
+ {
3166
+ category: "Environment",
3167
+ label: "No single-use plastic bags are to be handed out.",
3168
+ value: false
3169
+ },
3170
+ {
3171
+ category: "Environment",
3172
+ label: "Stall area must be left clean with no trace of activity after pack-down.",
3173
+ value: false
3174
+ },
3175
+ {
3176
+ category: "Environment",
3177
+ label: "No disposal of oils, fats, or chemicals in public drains or on grassed areas.",
3178
+ value: false
3179
+ },
3180
+ {
3181
+ category: "Environment",
3182
+ label: "You must provide bins at your site for rubbish and recycling, and take away all bins including rubbish, to dispose of outside of the town centre.",
3183
+ value: false
3184
+ },
3185
+ {
3186
+ category: "Food Safety",
3187
+ label: "Food must be prepared and stored according to your food regulation.",
3188
+ value: false
3189
+ },
3190
+ {
3191
+ category: "Food Safety",
3192
+ label: "The stallholder must display a current food grade certificate.",
3193
+ value: false
3194
+ },
3195
+ {
3196
+ category: "Food Safety",
3197
+ label: "Only licensed food vendors may sell ready-to-eat food items.",
3198
+ value: false
3199
+ },
3200
+ {
3201
+ category: "Food Safety",
3202
+ label: "Handwashing facilities must be available at your stall if preparing food.",
3203
+ value: false
3204
+ },
3157
3205
  {
3158
3206
  category: "Food Safety",
3159
- label: "The stallholder must display a current food grade certificate",
3160
- value: "food_grade_certificate"
3207
+ label: "You must have a food safety plan in place for your stall.",
3208
+ value: false
3161
3209
  },
3162
3210
  {
3163
3211
  category: "Food Safety",
3164
- label: "Food must be prepared and stored according to your food regulation",
3165
- value: "food_preparation_regulations"
3212
+ label: "Allergens must be clearly listed on packaged and unpackaged food items.",
3213
+ value: false
3166
3214
  },
3167
3215
  {
3168
3216
  category: "Legal & Safety",
3169
- label: "All electrical equipment must be tested and tagged",
3170
- value: "electrical_safety"
3217
+ label: "All stallholders must comply with local council regulations.",
3218
+ value: false
3171
3219
  },
3172
3220
  {
3173
- category: "Operations",
3174
- label: "You must be self-sufficient in all operations",
3175
- value: "self_sufficient_operations"
3221
+ category: "Legal & Safety",
3222
+ label: "No unauthorised subletting of stall space to other vendors.",
3223
+ value: false
3176
3224
  },
3177
3225
  {
3178
- category: "Environment",
3179
- label: "You must provide bins at your site for rubbish and recycling, and take away all bins including rubbish, to dispose of outside of the town centre",
3180
- value: "rubbish_and_recycling_responsibility"
3226
+ category: "Legal & Safety",
3227
+ label: "Gas bottles and fuel containers must be secured and in good condition if applicable.",
3228
+ value: false
3181
3229
  },
3182
3230
  {
3183
3231
  category: "Legal & Safety",
3184
- label: "You must secure your gazebo and equipment to withstand wind or bad weather",
3185
- value: "stall_safety_and_weather_protection"
3232
+ label: "Fire extinguishers must be available for stalls using cooking or heating equipment.",
3233
+ value: false
3186
3234
  },
3187
3235
  {
3188
3236
  category: "Legal & Safety",
3189
- label: "You are responsible for the safety of your setup and any potential hazards",
3190
- value: "stallholder_safety_responsibility"
3237
+ label: "Stallholders must not sell items that are illegal or prohibited by law.",
3238
+ value: false
3191
3239
  },
3192
3240
  {
3193
- category: "Operations",
3194
- label: "Stallholders must arrive and be fully set up by the designated opening time",
3195
- value: "setup_on_time"
3241
+ category: "Legal & Safety",
3242
+ label: "All electrical equipment must be tested and tagged.",
3243
+ value: false
3196
3244
  },
3197
3245
  {
3198
- category: "Operations",
3199
- label: "You may not pack down your stall before the event officially ends",
3200
- value: "no_early_packdown"
3246
+ category: "Legal & Safety",
3247
+ label: "Noise levels must be kept to a minimum unless part of a permitted performance.",
3248
+ value: false
3201
3249
  },
3202
3250
  {
3203
- category: "Environment",
3204
- label: "All packaging must be eco-friendly or recyclable where possible",
3205
- value: "eco_friendly_packaging"
3251
+ category: "Legal & Safety",
3252
+ label: "Pets at the stall must be secured and well-behaved at all times.",
3253
+ value: false
3206
3254
  },
3207
3255
  {
3208
3256
  category: "Legal & Safety",
3209
- label: "Stallholders must hold valid liability insurance where required",
3210
- value: "liability_insurance_required"
3257
+ label: "Cables must be secured and not create tripping hazards.",
3258
+ value: false
3211
3259
  },
3212
3260
  {
3213
- category: "Environment",
3214
- label: "No single-use plastic bags are to be handed out",
3215
- value: "no_single_use_plastics"
3261
+ category: "Legal & Safety",
3262
+ label: "Stalls must not obstruct emergency access routes.",
3263
+ value: false
3216
3264
  },
3217
3265
  {
3218
3266
  category: "Legal & Safety",
3219
- label: "Noise levels must be kept to a minimum unless part of a permitted performance",
3220
- value: "noise_restrictions"
3267
+ label: "First aid kit must be available at the stall for minor injuries.",
3268
+ value: false
3221
3269
  },
3222
3270
  {
3223
- category: "Operations",
3224
- label: "Generators must be quiet and pre-approved by the event organiser",
3225
- value: "generator_policy"
3271
+ category: "Legal & Safety",
3272
+ label: "Stallholders must hold valid liability insurance where required.",
3273
+ value: false
3226
3274
  },
3227
3275
  {
3228
3276
  category: "Legal & Safety",
3229
- label: "Pets at the stall must be secured and well-behaved at all times",
3230
- value: "pets_policy"
3277
+ label: "You must secure your gazebo and equipment to withstand wind or bad weather.",
3278
+ value: false
3279
+ },
3280
+ {
3281
+ category: "Legal & Safety",
3282
+ label: "You are responsible for the safety of your setup and any potential hazards.",
3283
+ value: false
3284
+ },
3285
+ {
3286
+ category: "Operations",
3287
+ label: "Generators must be quiet and pre-approved by the event organiser.",
3288
+ value: false
3289
+ },
3290
+ {
3291
+ category: "Operations",
3292
+ label: "Only approved products or services may be sold \u2014 no last-minute changes.",
3293
+ value: false
3294
+ },
3295
+ {
3296
+ category: "Operations",
3297
+ label: "Stallholders must arrive and be fully set up by the designated opening time.",
3298
+ value: false
3299
+ },
3300
+ {
3301
+ category: "Operations",
3302
+ label: "You may not pack down your stall before the event officially ends.",
3303
+ value: false
3304
+ },
3305
+ {
3306
+ category: "Operations",
3307
+ label: "You must be self-sufficient in all operations.",
3308
+ value: false
3309
+ },
3310
+ {
3311
+ category: "Operations",
3312
+ label: "Stall layout must be kept within your allocated space.",
3313
+ value: false
3231
3314
  }
3232
3315
  ];
3233
3316
 
@@ -3731,6 +3814,7 @@ export {
3731
3814
  marketInfoPaymentTarget,
3732
3815
  marketPriceByDateFields,
3733
3816
  marketStartDateFields,
3817
+ normalizeUrl,
3734
3818
  packagingOptions,
3735
3819
  paymentMethodOptions,
3736
3820
  producedIngOptions,