@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.
@@ -2072,6 +2072,9 @@ function eventStartDatesSet(dateTime) {
2072
2072
  );
2073
2073
  }
2074
2074
  function hasMatchingEventDate(vendorStartDates, eventStartDates) {
2075
+ if (eventStartDates.size === 0) {
2076
+ return true;
2077
+ }
2075
2078
  return vendorStartDates.some((startDate) => eventStartDates.has(startDate));
2076
2079
  }
2077
2080
  function matchesSelectedDate(vendorStartDates, selectedDate) {
@@ -2225,8 +2228,8 @@ function getVendorEventRelationDateOptions(events) {
2225
2228
  value: startDate
2226
2229
  }));
2227
2230
  }
2228
- function getVendorEventsEmptyMessage() {
2229
- return "No events found.";
2231
+ function getVendorEventsEmptyMessage(hasAnyEventsForVendor = false, selectedDate = null) {
2232
+ return hasAnyEventsForVendor && selectedDate ? "No events found for this date." : "No events found.";
2230
2233
  }
2231
2234
 
2232
2235
  // src/utils/affiliate.ts
@@ -2540,7 +2543,10 @@ function getVendorEventsData({
2540
2543
  })
2541
2544
  );
2542
2545
  return {
2543
- emptyMessage: getVendorEventsEmptyMessage(),
2546
+ emptyMessage: getVendorEventsEmptyMessage(
2547
+ (events?.length ?? 0) > 0,
2548
+ selectedDate
2549
+ ),
2544
2550
  eventDateOptions,
2545
2551
  eventsByDate: filterVendorEventsBySelectedDate(events, selectedDate),
2546
2552
  hasDatePills: eventDateOptions.length > 0