@timardex/cluemart-shared 3.0.0 → 3.0.1

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mapArrayToOptions
3
- } from "./chunk-XXHTG4GJ.mjs";
3
+ } from "./chunk-JSUPW2TO.mjs";
4
4
  import {
5
5
  EnumFoodFlavor
6
6
  } from "./chunk-A52C6JDT.mjs";
@@ -987,4 +987,4 @@ export {
987
987
  contactUsFields,
988
988
  partnerBasicInfoFields
989
989
  };
990
- //# sourceMappingURL=chunk-FVUZ5SPE.mjs.map
990
+ //# sourceMappingURL=chunk-JEULYOPH.mjs.map
@@ -1380,6 +1380,9 @@ function eventStartDatesSet(dateTime) {
1380
1380
  );
1381
1381
  }
1382
1382
  function hasMatchingEventDate(vendorStartDates, eventStartDates) {
1383
+ if (eventStartDates.size === 0) {
1384
+ return true;
1385
+ }
1383
1386
  return vendorStartDates.some((startDate) => eventStartDates.has(startDate));
1384
1387
  }
1385
1388
  function matchesSelectedDate(vendorStartDates, selectedDate) {
@@ -1533,8 +1536,8 @@ function getVendorEventRelationDateOptions(events) {
1533
1536
  value: startDate
1534
1537
  }));
1535
1538
  }
1536
- function getVendorEventsEmptyMessage() {
1537
- return "No events found.";
1539
+ function getVendorEventsEmptyMessage(hasAnyEventsForVendor = false, selectedDate = null) {
1540
+ return hasAnyEventsForVendor && selectedDate ? "No events found for this date." : "No events found.";
1538
1541
  }
1539
1542
 
1540
1543
  // src/utils/affiliate.ts
@@ -1785,7 +1788,10 @@ function getVendorEventsData({
1785
1788
  })
1786
1789
  );
1787
1790
  return {
1788
- emptyMessage: getVendorEventsEmptyMessage(),
1791
+ emptyMessage: getVendorEventsEmptyMessage(
1792
+ (events?.length ?? 0) > 0,
1793
+ selectedDate
1794
+ ),
1789
1795
  eventDateOptions,
1790
1796
  eventsByDate: filterVendorEventsBySelectedDate(events, selectedDate),
1791
1797
  hasDatePills: eventDateOptions.length > 0
@@ -1929,4 +1935,4 @@ export {
1929
1935
  toUserFacingErrorMessage,
1930
1936
  getErrorMessage
1931
1937
  };
1932
- //# sourceMappingURL=chunk-XXHTG4GJ.mjs.map
1938
+ //# sourceMappingURL=chunk-JSUPW2TO.mjs.map