@timardex/cluemart-shared 1.3.89 → 1.3.91

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
@@ -1388,7 +1388,7 @@ declare const useGetEvent: (_id: string) => {
1388
1388
  event: EventType;
1389
1389
  }>>;
1390
1390
  };
1391
- declare const useGetEventsByRegion: (region: string) => {
1391
+ declare const useGetEventsByRegion: (region: string, onlyClaimed?: boolean) => {
1392
1392
  error: _apollo_client.ApolloError | undefined;
1393
1393
  eventsByRegion: EventListItemType[];
1394
1394
  loading: boolean;
package/dist/index.d.ts CHANGED
@@ -1388,7 +1388,7 @@ declare const useGetEvent: (_id: string) => {
1388
1388
  event: EventType;
1389
1389
  }>>;
1390
1390
  };
1391
- declare const useGetEventsByRegion: (region: string) => {
1391
+ declare const useGetEventsByRegion: (region: string, onlyClaimed?: boolean) => {
1392
1392
  error: _apollo_client.ApolloError | undefined;
1393
1393
  eventsByRegion: EventListItemType[];
1394
1394
  loading: boolean;
package/dist/index.mjs CHANGED
@@ -659,7 +659,7 @@ var producedIngOptions = mapArrayToOptions(producedIngTypes);
659
659
  var foodFlavourOptions = Object.values(
660
660
  EnumFoodFlavor
661
661
  ).map((flavour) => ({
662
- label: flavour,
662
+ label: flavour.replaceAll("_", " "),
663
663
  value: flavour
664
664
  }));
665
665
 
@@ -2621,8 +2621,8 @@ var GET_EVENT = gql3`
2621
2621
  ${EVENT}
2622
2622
  `;
2623
2623
  var GET_EVENTS_BY_REGION = gql3`
2624
- query getEventsByRegion($region: String!) {
2625
- eventsByRegion(region: $region) {
2624
+ query getEventsByRegion($region: String!, $onlyClaimed: Boolean) {
2625
+ eventsByRegion(region: $region, onlyClaimed: $onlyClaimed) {
2626
2626
  ...EventListItemFields
2627
2627
  }
2628
2628
  }
@@ -3678,11 +3678,11 @@ var useGetEvent = (_id) => {
3678
3678
  const event = data?.event;
3679
3679
  return { error, event, loading, refetch };
3680
3680
  };
3681
- var useGetEventsByRegion = (region) => {
3681
+ var useGetEventsByRegion = (region, onlyClaimed) => {
3682
3682
  const { loading, error, data, refetch } = useQuery2(GET_EVENTS_BY_REGION, {
3683
3683
  fetchPolicy: "no-cache",
3684
3684
  skip: !region,
3685
- variables: { region }
3685
+ variables: { onlyClaimed, region }
3686
3686
  });
3687
3687
  const eventsByRegion = data?.eventsByRegion || [];
3688
3688
  return { error, eventsByRegion, loading, refetch };
@@ -5975,13 +5975,15 @@ var vendroMenuSchema = yup3.object().shape({
5975
5975
  price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
5976
5976
  return value !== null && value !== void 0;
5977
5977
  }),
5978
- productGroups: yup3.array().of(yup3.string().defined()).nullable().defined().test(
5978
+ productGroups: yup3.array().of(yup3.string().defined()).transform(
5979
+ (value, originalValue) => originalValue === void 0 ? null : value
5980
+ ).nullable().test(
5979
5981
  "productGroups-required",
5980
5982
  "Product groups are required",
5981
5983
  function(value) {
5982
- return value !== null && value !== void 0 && Array.isArray(value) && value.length > 0;
5984
+ return value !== null && Array.isArray(value) && value.length > 0;
5983
5985
  }
5984
- )
5986
+ ).defined()
5985
5987
  });
5986
5988
  var vendorSchema = globalResourceSchema.shape({
5987
5989
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),