@timardex/cluemart-shared 1.1.67 → 1.1.69

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
@@ -187,7 +187,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
187
187
  categories: Category[];
188
188
  locations?: StallholderLocation[] | null;
189
189
  multiLocation: boolean;
190
- products: string[];
190
+ products?: string[] | null;
191
191
  specialities?: string[] | null;
192
192
  }
193
193
  type CreateStallholderFormData = CreateFormData<StallholderFormData>;
package/dist/index.d.ts CHANGED
@@ -187,7 +187,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
187
187
  categories: Category[];
188
188
  locations?: StallholderLocation[] | null;
189
189
  multiLocation: boolean;
190
- products: string[];
190
+ products?: string[] | null;
191
191
  specialities?: string[] | null;
192
192
  }
193
193
  type CreateStallholderFormData = CreateFormData<StallholderFormData>;
package/dist/index.mjs CHANGED
@@ -4295,13 +4295,13 @@ var dateTimeSchema = yup.object().shape({
4295
4295
  startTime: yup.string().label("Start Time").concat(startTimeCannotBeInPastTest).required("Start time is required")
4296
4296
  });
4297
4297
  var stallTypesSchema = yup.object({
4298
- label: yup.string().trim().label("Stall Label").required("Stall label is required"),
4298
+ label: yup.string().trim().label("Stall Type").required("Stall type is required"),
4299
4299
  price: yup.number().label("Stall Price").min(0.1, "Stall price must be at least 0.1").required("Stall price is required").test(
4300
4300
  "no-leading-zeros",
4301
4301
  "",
4302
4302
  noLeadingZeros("Stall price", { allowDecimal: true })
4303
4303
  ),
4304
- stallCapacity: yup.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")),
4304
+ stallCapacity: yup.number().label("Stall Capacity").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")),
4305
4305
  electricity: yup.object({
4306
4306
  selected: yup.boolean().nullable().optional().label("Electricity Available"),
4307
4307
  price: yup.number().transform(
@@ -4374,20 +4374,20 @@ var categorySchema = yup.array().of(
4374
4374
  var mobileRegex = /^02\d{7,9}$/;
4375
4375
  var landlineRegex = /^(0(3|4|6|7|9)[0-9]{7})$/;
4376
4376
  var contactDetailsSchema = yup.object({
4377
- email: yup.string().nullable().notRequired().transform(
4377
+ email: yup.string().label("Email").nullable().notRequired().transform(
4378
4378
  (value) => typeof value === "string" ? value.trim().toLowerCase() : value
4379
4379
  ).test(
4380
4380
  "is-valid-email",
4381
4381
  "Invalid email address",
4382
4382
  (value) => !value || yup.string().email().isValidSync(value)
4383
4383
  ).label("Email"),
4384
- mobilePhone: yup.string().nullable().notRequired().test(
4384
+ mobilePhone: yup.string().label("Mobile Phone").nullable().notRequired().test(
4385
4385
  "mobile-phone",
4386
4386
  "Mobile must start with 02 and be 9\u201311 digits",
4387
4387
  (value) => !value || mobileRegex.test(value)
4388
4388
  // skip empty values
4389
4389
  ),
4390
- landlinePhone: yup.string().nullable().notRequired().test(
4390
+ landlinePhone: yup.string().label("Landline Phone").nullable().notRequired().test(
4391
4391
  "landline-phone",
4392
4392
  "Landline must start with 03, 04, 06, 07, or 09 (not 090) and have 7 digits after area code",
4393
4393
  (value) => !value || landlineRegex.test(value)
@@ -4444,11 +4444,11 @@ var paymentInfoSchema = yup2.object({
4444
4444
  });
4445
4445
  var marketInfoSchema = yup2.object().shape({
4446
4446
  contactDetails: contactDetailsSchema,
4447
- applicationDeadlineHours: yup2.number().nullable().transform((value, originalValue) => originalValue === "" ? null : value).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")),
4447
+ applicationDeadlineHours: yup2.number().label("Application Deadline Hours").nullable().transform((value, originalValue) => originalValue === "" ? null : value).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")),
4448
4448
  dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
4449
4449
  marketId: yup2.string().trim().required("Market ID is required"),
4450
- 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")),
4451
- 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")),
4450
+ packInTime: yup2.number().label("Pack In Time").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")),
4451
+ paymentDueHours: yup2.number().label("Payment Due Hours").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")),
4452
4452
  paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required")
4453
4453
  });
4454
4454
 
@@ -4456,8 +4456,7 @@ var marketInfoSchema = yup2.object().shape({
4456
4456
  import * as yup3 from "yup";
4457
4457
  var stallHolderSchema = globalResourceSchema.shape({
4458
4458
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
4459
- multiLocation: yup3.boolean().required("Multi location is required"),
4460
- products: yup3.array().of(yup3.string().defined()).min(1, "Product list must contain at least one item").required("Products are required")
4459
+ multiLocation: yup3.boolean().required("Multi location is required")
4461
4460
  });
4462
4461
  var stallholderInfoSchema = yup3.object().shape({
4463
4462
  contactDetails: contactDetailsSchema,
@@ -4506,10 +4505,10 @@ import * as yup4 from "yup";
4506
4505
  var userSchema = yup4.object().shape({
4507
4506
  active: yup4.boolean().required("Active is required"),
4508
4507
  email: emailRequiredSchema,
4509
- firstName: yup4.string().required("First name is required"),
4510
- lastName: yup4.string().required("Last name is required"),
4508
+ firstName: yup4.string().label("First Name").required("First name is required"),
4509
+ lastName: yup4.string().label("Last Name").required("Last name is required"),
4511
4510
  password: passwordSchema,
4512
- preferredRegion: yup4.string().required("Preferred region is required"),
4511
+ preferredRegion: yup4.string().label("Preferred Region").required("Preferred region is required"),
4513
4512
  // eslint-disable-next-line sort-keys
4514
4513
  confirmPassword: yup4.string().oneOf([yup4.ref("password")], "Passwords must match").required("Confirm Password is required"),
4515
4514
  role: yup4.mixed().oneOf(Object.values(EnumUserRole)).required("Role is required")
@@ -4713,7 +4712,7 @@ var defaultStallholderFormValues = {
4713
4712
  categories: [],
4714
4713
  locations: null,
4715
4714
  multiLocation: false,
4716
- products: [],
4715
+ products: null,
4717
4716
  specialities: null
4718
4717
  };
4719
4718
  var defaultStallholderInfoFormValues = {
@@ -5394,9 +5393,9 @@ import { useForm as useForm12 } from "react-hook-form";
5394
5393
  import * as yup8 from "yup";
5395
5394
  var contactUsSchema = yup8.object().shape({
5396
5395
  email: emailRequiredSchema,
5397
- firstName: yup8.string().required("First name is required"),
5398
- lastName: yup8.string().required("Last name is required"),
5399
- message: yup8.string().required("Message is required")
5396
+ firstName: yup8.string().label("First Name").required("First name is required"),
5397
+ lastName: yup8.string().label("Last Name").required("Last name is required"),
5398
+ message: yup8.string().label("Message").required("Message is required")
5400
5399
  });
5401
5400
 
5402
5401
  // src/hooks/useContactUsForm.ts