@gomusdev/web-components 1.26.2 → 1.26.3

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,15 +1,16 @@
1
1
  import { TicketSelectionDetails } from '../../../TicketSelectionDetails.svelte.ts';
2
- import { DateValue, CalendarDate } from '@internationalized/date';
2
+ import { CalendarDate, DateValue } from '@internationalized/date';
3
3
  export type CalendarDates = {
4
4
  [key: string]: boolean;
5
5
  };
6
+ export type CalendarDatesDepthAvailabilityStatus = {
7
+ [key: string]: 'unavailable' | 'available' | 'fully_booked';
8
+ };
6
9
  export declare class Calendar {
7
10
  details: TicketSelectionDetails | undefined;
8
11
  startAt: CalendarDate;
9
12
  selected: CalendarDate | undefined;
10
- get dates(): {
11
- [key: string]: boolean;
12
- } | undefined;
13
+ get dates(): CalendarDatesDepthAvailabilityStatus | undefined;
13
14
  isDateDisabled(date: DateValue): boolean;
14
15
  isDateUnavailable(date: DateValue): boolean;
15
16
  get apiFilters(): string[] | undefined;
@@ -40,13 +41,7 @@ export declare class StaticCalendar extends Calendar {
40
41
  params: {
41
42
  start_at: undefined;
42
43
  };
43
- constructor(dates?: {
44
- [key: string]: boolean;
45
- });
46
- get dates(): {
47
- [key: string]: boolean;
48
- };
49
- set dates(dates: {
50
- [key: string]: boolean;
51
- });
44
+ constructor(dates?: CalendarDatesDepthAvailabilityStatus);
45
+ get dates(): CalendarDatesDepthAvailabilityStatus;
46
+ set dates(dates: CalendarDatesDepthAvailabilityStatus);
52
47
  }
@@ -1,33 +1,3 @@
1
1
  export declare const datesMock: {
2
- '2025-07-01': boolean;
3
- '2025-07-02': boolean;
4
- '2025-07-03': boolean;
5
- '2025-07-04': boolean;
6
- '2025-07-05': boolean;
7
- '2025-07-06': boolean;
8
- '2025-07-07': boolean;
9
- '2025-07-08': boolean;
10
- '2025-07-09': boolean;
11
- '2025-07-10': boolean;
12
- '2025-07-11': boolean;
13
- '2025-07-12': boolean;
14
- '2025-07-13': boolean;
15
- '2025-07-14': boolean;
16
- '2025-07-15': boolean;
17
- '2025-07-16': boolean;
18
- '2025-07-17': boolean;
19
- '2025-07-18': boolean;
20
- '2025-07-19': boolean;
21
- '2025-07-20': boolean;
22
- '2025-07-21': boolean;
23
- '2025-07-22': boolean;
24
- '2025-07-23': boolean;
25
- '2025-07-24': boolean;
26
- '2025-07-25': boolean;
27
- '2025-07-26': boolean;
28
- '2025-07-27': boolean;
29
- '2025-07-28': boolean;
30
- '2025-07-29': boolean;
31
- '2025-07-30': boolean;
32
- '2025-07-31': boolean;
2
+ [key: string]: 'unavailable' | 'available' | 'fully_booked';
33
3
  };
@@ -32288,11 +32288,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
32288
32288
  }
32289
32289
  }
32290
32290
  isDateDisabled(date2) {
32291
- return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0;
32291
+ if (this.dates) {
32292
+ return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0 || this.dates[date2.toString()] == "unavailable";
32293
+ } else {
32294
+ return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0;
32295
+ }
32292
32296
  }
32293
32297
  isDateUnavailable(date2) {
32294
32298
  if (this.dates) {
32295
- return !this.dates[date2.toString()];
32299
+ return this.dates[date2.toString()] == "fully_booked";
32296
32300
  }
32297
32301
  return false;
32298
32302
  }
@@ -32319,10 +32323,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
32319
32323
  "by_museum_ids[]": this.details.museumIds,
32320
32324
  "by_exhibition_ids[]": this.details.exhibitionIds,
32321
32325
  "by_event_ids[]": this.details.eventIds,
32322
- // https://gitlab.giantmonkey.de/gomus/gomus/-/merge_requests/11544
32323
- // this helps us to differentiate sold-out days from not available days
32324
- // the api gives an error right now
32325
- // depth: 'availability_status',
32326
+ depth: "availability_status",
32326
32327
  // these logic are there to minimize fetches
32327
32328
  start_at: startAt.toString(),
32328
32329
  end_at: startAt.add({ months: 1 }).toString()
@@ -32288,11 +32288,15 @@ class Calendar {
32288
32288
  }
32289
32289
  }
32290
32290
  isDateDisabled(date2) {
32291
- return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0;
32291
+ if (this.dates) {
32292
+ return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0 || this.dates[date2.toString()] == "unavailable";
32293
+ } else {
32294
+ return date2.compare($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())) < 0;
32295
+ }
32292
32296
  }
32293
32297
  isDateUnavailable(date2) {
32294
32298
  if (this.dates) {
32295
- return !this.dates[date2.toString()];
32299
+ return this.dates[date2.toString()] == "fully_booked";
32296
32300
  }
32297
32301
  return false;
32298
32302
  }
@@ -32319,10 +32323,7 @@ class Calendar {
32319
32323
  "by_museum_ids[]": this.details.museumIds,
32320
32324
  "by_exhibition_ids[]": this.details.exhibitionIds,
32321
32325
  "by_event_ids[]": this.details.eventIds,
32322
- // https://gitlab.giantmonkey.de/gomus/gomus/-/merge_requests/11544
32323
- // this helps us to differentiate sold-out days from not available days
32324
- // the api gives an error right now
32325
- // depth: 'availability_status',
32326
+ depth: "availability_status",
32326
32327
  // these logic are there to minimize fetches
32327
32328
  start_at: startAt.toString(),
32328
32329
  end_at: startAt.add({ months: 1 }).toString()
@@ -1,4 +1,4 @@
1
- import { CalendarDates } from '../../components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.ts';
1
+ import { CalendarDates, CalendarDatesDepthAvailabilityStatus } from '../../components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.ts';
2
2
  import { ShopUrls } from '../helpers/urls';
3
3
  import { CapacityManager } from '../models/capacity/CapacityManager.ts';
4
4
  import { Cart } from '../models/cart/cart.svelte.ts';
@@ -242,7 +242,7 @@ export declare class Shop {
242
242
  auth?: Auth;
243
243
  capacityManager?: CapacityManager;
244
244
  };
245
- ticketsCalendar(params: TicketsCalendarParams): CalendarDates;
245
+ ticketsCalendar(params: TicketsCalendarParams): CalendarDatesDepthAvailabilityStatus;
246
246
  calendar(params: TicketsCalendarParams): CalendarDates;
247
247
  ticketsAndQuotas(params: TicketsAndQuotasParams): {
248
248
  tickets: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.26.2",
7
+ "version": "1.26.3",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",