@timardex/cluemart-shared 1.0.72 → 1.0.74

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
@@ -384,7 +384,8 @@ interface Subcategory {
384
384
  items?: SubcategoryItems[] | null;
385
385
  }
386
386
  interface Category {
387
- description?: string;
387
+ color?: string | null;
388
+ description?: string | null;
388
389
  id: string;
389
390
  name: string;
390
391
  subcategories: Subcategory[];
@@ -632,8 +633,8 @@ declare const validateVerificationTokenFields: FormField[];
632
633
 
633
634
  declare const profileFields: FormField[];
634
635
 
635
- declare const availableCategories: Category[];
636
636
  declare const categoryColors: Record<string, string>;
637
+ declare const availableCategories: Category[];
637
638
 
638
639
  declare const socialMediaFields: FormField[];
639
640
 
package/dist/index.d.ts CHANGED
@@ -384,7 +384,8 @@ interface Subcategory {
384
384
  items?: SubcategoryItems[] | null;
385
385
  }
386
386
  interface Category {
387
- description?: string;
387
+ color?: string | null;
388
+ description?: string | null;
388
389
  id: string;
389
390
  name: string;
390
391
  subcategories: Subcategory[];
@@ -632,8 +633,8 @@ declare const validateVerificationTokenFields: FormField[];
632
633
 
633
634
  declare const profileFields: FormField[];
634
635
 
635
- declare const availableCategories: Category[];
636
636
  declare const categoryColors: Record<string, string>;
637
+ declare const availableCategories: Category[];
637
638
 
638
639
  declare const socialMediaFields: FormField[];
639
640
 
package/dist/index.mjs CHANGED
@@ -451,19 +451,19 @@ var tagOptions = availableTagTypes.map((tag) => ({
451
451
  // src/formFields/market/marketInfo.ts
452
452
  var marketInfo = [
453
453
  {
454
- helperText: "Application Deadline *",
454
+ helperText: "Application Deadline (hours before market start) \u2013 Stallholders cannot apply after this time. *",
455
455
  keyboardType: "number-pad",
456
456
  name: "applicationDeadlineHours",
457
457
  placeholder: "Application Deadline (in hours)"
458
458
  },
459
459
  {
460
- helperText: "Payment Due Hours *",
460
+ helperText: "Payment Due (hours after application or invitation acceptance) \u2013 Stallholders must complete payment before this time. *",
461
461
  keyboardType: "number-pad",
462
462
  name: "paymentDueHours",
463
463
  placeholder: "Payment Due (in hours)"
464
464
  },
465
465
  {
466
- helperText: "Pack In Time *",
466
+ helperText: "Pack-In Time (hours before market start) \u2013 Stallholders can set up before the market begins. *",
467
467
  keyboardType: "number-pad",
468
468
  name: "packInTime",
469
469
  placeholder: "Pack In Time (in hours)"
@@ -482,10 +482,10 @@ var marketInfoPaymentInfo = [
482
482
  placeholder: "Account number"
483
483
  },
484
484
  {
485
- helperText: "Link to payment target *",
485
+ helperText: "Payment link, where stallholders can pay *",
486
486
  keyboardType: "url",
487
487
  name: "link",
488
- placeholder: "Link to payment target"
488
+ placeholder: "Payment link"
489
489
  }
490
490
  ];
491
491
  var requirementsOptions = [
@@ -779,7 +779,7 @@ var validateVerificationTokenFields = [
779
779
  placeholder: "Email"
780
780
  },
781
781
  {
782
- helperText: "Enter the Verification code sent to your email",
782
+ helperText: "Enter the Verification code sent to you by email",
783
783
  keyboardType: "number-pad",
784
784
  name: "verificationToken",
785
785
  placeholder: "Verification code"
@@ -824,6 +824,25 @@ var profileFields = [
824
824
  ];
825
825
 
826
826
  // src/formFields/categories.ts
827
+ var categoryColors = {
828
+ "antiques-collectibles": "#8D6748",
829
+ "clothing-fashion": "#9D4EDD",
830
+ "electronics-technology": "#3AF3FF",
831
+ "food-beverages": "#FF0D1F",
832
+ "handmade-local-products": "#EE7E54",
833
+ "health-wellness": "#E23794",
834
+ "home-garden-household-goods": "#067325",
835
+ "pet-products-animal-goods": "#68E788",
836
+ "services-experiences": "#2E16A5",
837
+ "toys-childrens-items": "#FFF966"
838
+ };
839
+ var assignColorToCategories = (categories) => {
840
+ const result = categories.map((category) => ({
841
+ ...category,
842
+ color: categoryColors[category.id]
843
+ }));
844
+ return result;
845
+ };
827
846
  var foodAndBeverages = [
828
847
  {
829
848
  id: "food-beverages",
@@ -1673,7 +1692,7 @@ var serviceAndExperience = [
1673
1692
  ]
1674
1693
  }
1675
1694
  ];
1676
- var availableCategories = [
1695
+ var availableCategories = assignColorToCategories([
1677
1696
  ...foodAndBeverages,
1678
1697
  ...handmadeAndLocalProducts,
1679
1698
  ...clothingAndFashion,
@@ -1684,19 +1703,7 @@ var availableCategories = [
1684
1703
  ...antiquesAndCollectibles,
1685
1704
  ...petProductsAndAnimalGoods,
1686
1705
  ...serviceAndExperience
1687
- ];
1688
- var categoryColors = {
1689
- "antiques-collectibles": "#8D6748",
1690
- "clothing-fashion": "#9D4EDD",
1691
- "electronics-technology": "#3AF3FF",
1692
- "food-beverages": "#FF0D1F",
1693
- "handmade-local-products": "#EE7E54",
1694
- "health-wellness": "#E23794",
1695
- "home-garden-household-goods": "#067325",
1696
- "pet-products-animal-goods": "#68E788",
1697
- "services-experiences": "#2E16A5",
1698
- "toys-childrens-items": "#FFF966"
1699
- };
1706
+ ]);
1700
1707
 
1701
1708
  // src/formFields/socialMedia.ts
1702
1709
  var socialMedia = [
@@ -2696,7 +2703,7 @@ var useGetMarket = (_id) => {
2696
2703
  };
2697
2704
  var useGetMarketsByRegion = (region) => {
2698
2705
  const { loading, error, data, refetch } = useQuery2(GET_MARKETS_BY_REGION, {
2699
- fetchPolicy: "network-only",
2706
+ fetchPolicy: "no-cache",
2700
2707
  skip: !region,
2701
2708
  variables: { region }
2702
2709
  });
@@ -2960,7 +2967,7 @@ var DELETE_RELATION_MUTATION = gql13`
2960
2967
  `;
2961
2968
 
2962
2969
  // src/graphql/hooks/relation/hooksMutation.ts
2963
- var fetchPolicy = "network-only";
2970
+ var fetchPolicy = "no-cache";
2964
2971
  var useCreateRelation = () => {
2965
2972
  const [createRelation, { loading, error }] = useMutation7(
2966
2973
  CREATE_RELATION_MUTATION,
@@ -3886,6 +3893,24 @@ var globalResourceSchema = yup.object().shape({
3886
3893
  region: yup.string().label("Region").required("Region is required"),
3887
3894
  socialMedia: yup.array().of(socialMediaSchema).nullable().optional()
3888
3895
  });
3896
+ var categorySchema = yup.array().of(
3897
+ yup.object().shape({
3898
+ id: yup.string().required("Category id is required"),
3899
+ name: yup.string().required("Category name is required"),
3900
+ subcategories: yup.array().of(
3901
+ yup.object().shape({
3902
+ id: yup.string().defined(),
3903
+ items: yup.array().of(
3904
+ yup.object().shape({
3905
+ id: yup.string().defined(),
3906
+ name: yup.string().defined()
3907
+ })
3908
+ ).nullable(),
3909
+ name: yup.string().defined()
3910
+ })
3911
+ ).min(1, "At least one subcategory is required").required("Subcategories are required")
3912
+ })
3913
+ ).min(1, "Category list must contain at least one item").required("Categories are required");
3889
3914
 
3890
3915
  // src/yupSchema/market.ts
3891
3916
  import * as yup2 from "yup";
@@ -3945,24 +3970,7 @@ var marketInfoSchema = yup2.object().shape({
3945
3970
  // src/yupSchema/stallholder.ts
3946
3971
  import * as yup3 from "yup";
3947
3972
  var stallHolderSchema = globalResourceSchema.shape({
3948
- categories: yup3.array().of(
3949
- yup3.object().shape({
3950
- id: yup3.string().required("Category id is required"),
3951
- name: yup3.string().required("Category name is required"),
3952
- subcategories: yup3.array().of(
3953
- yup3.object().shape({
3954
- id: yup3.string().defined(),
3955
- items: yup3.array().of(
3956
- yup3.object().shape({
3957
- id: yup3.string().defined(),
3958
- name: yup3.string().defined()
3959
- })
3960
- ).nullable(),
3961
- name: yup3.string().defined()
3962
- })
3963
- ).min(1, "At least one subcategory is required").required("Subcategories are required")
3964
- })
3965
- ).min(1, "Category list must contain at least one item").required("Categories are required"),
3973
+ categories: categorySchema,
3966
3974
  multiLocation: yup3.boolean().required("Multi location is required"),
3967
3975
  products: yup3.array().of(yup3.string().defined()).min(1, "Product list must contain at least one item").required("Products are required")
3968
3976
  });
@@ -4087,15 +4095,15 @@ var defaultMarketFormValues = {
4087
4095
  ...globalDefaultValues,
4088
4096
  dateTime: [
4089
4097
  {
4090
- endDate: "04-07-2025",
4098
+ endDate: "04-09-2025",
4091
4099
  endTime: "15:00",
4092
- startDate: "04-07-2025",
4100
+ startDate: "04-09-2025",
4093
4101
  startTime: "09:00"
4094
4102
  },
4095
4103
  {
4096
- endDate: "05-07-2025",
4104
+ endDate: "05-09-2025",
4097
4105
  endTime: "15:00",
4098
- startDate: "05-07-2025",
4106
+ startDate: "05-09-2025",
4099
4107
  startTime: "09:00"
4100
4108
  }
4101
4109
  ],