@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.
@@ -328,6 +328,16 @@ type StallholderFilterOption = {
328
328
  declare function eventStartDatesSet(dateTime: Array<{
329
329
  startDate?: string | null;
330
330
  }> | undefined): Set<string>;
331
+ /**
332
+ * True when the vendor shares a start date with the event, **or** when
333
+ * `eventStartDates` is empty (no dates to scope against).
334
+ *
335
+ * An empty set means the event payload has no dates (all archived, or a response
336
+ * that has not been merged yet). The constraint is then skipped: the stallholder
337
+ * list is already event-scoped, and intersecting against an empty set would
338
+ * filter every vendor out and make the screen claim the event has no
339
+ * stallholders.
340
+ */
331
341
  declare function hasMatchingEventDate(vendorStartDates: string[], eventStartDates: Set<string>): boolean;
332
342
  declare function matchesSelectedDate(vendorStartDates: string[], selectedDate: string | null): boolean;
333
343
  declare function matchesCategory(categoryNames: string[], selectedCategory: string | null): boolean;
@@ -355,7 +365,7 @@ declare function filterVendorEventsBySelectedDate(events: EventListItemType[] |
355
365
  declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined): DateTimeType[];
356
366
  declare function getVendorEventRelationStartDates(events: EventListItemType[] | null | undefined): string[];
357
367
  declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
358
- declare function getVendorEventsEmptyMessage(): string;
368
+ declare function getVendorEventsEmptyMessage(hasAnyEventsForVendor?: boolean, selectedDate?: string | null): string;
359
369
 
360
370
  declare const AFFILIATE_PARTICIPANT_TYPE_LABELS: {
361
371
  readonly INDIVIDUAL: "Individual";
@@ -328,6 +328,16 @@ type StallholderFilterOption = {
328
328
  declare function eventStartDatesSet(dateTime: Array<{
329
329
  startDate?: string | null;
330
330
  }> | undefined): Set<string>;
331
+ /**
332
+ * True when the vendor shares a start date with the event, **or** when
333
+ * `eventStartDates` is empty (no dates to scope against).
334
+ *
335
+ * An empty set means the event payload has no dates (all archived, or a response
336
+ * that has not been merged yet). The constraint is then skipped: the stallholder
337
+ * list is already event-scoped, and intersecting against an empty set would
338
+ * filter every vendor out and make the screen claim the event has no
339
+ * stallholders.
340
+ */
331
341
  declare function hasMatchingEventDate(vendorStartDates: string[], eventStartDates: Set<string>): boolean;
332
342
  declare function matchesSelectedDate(vendorStartDates: string[], selectedDate: string | null): boolean;
333
343
  declare function matchesCategory(categoryNames: string[], selectedCategory: string | null): boolean;
@@ -355,7 +365,7 @@ declare function filterVendorEventsBySelectedDate(events: EventListItemType[] |
355
365
  declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined): DateTimeType[];
356
366
  declare function getVendorEventRelationStartDates(events: EventListItemType[] | null | undefined): string[];
357
367
  declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
358
- declare function getVendorEventsEmptyMessage(): string;
368
+ declare function getVendorEventsEmptyMessage(hasAnyEventsForVendor?: boolean, selectedDate?: string | null): string;
359
369
 
360
370
  declare const AFFILIATE_PARTICIPANT_TYPE_LABELS: {
361
371
  readonly INDIVIDUAL: "Individual";
@@ -85,7 +85,7 @@ import {
85
85
  toUserFacingErrorMessage,
86
86
  truncateText,
87
87
  vendorLicences
88
- } from "../chunk-XXHTG4GJ.mjs";
88
+ } from "../chunk-JSUPW2TO.mjs";
89
89
  import {
90
90
  formatDistance,
91
91
  getDistanceInKilometers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timardex/cluemart-shared",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",