@gomusdev/web-components 3.8.2 → 3.9.0

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.
@@ -3,6 +3,7 @@ export declare function createMockUITicket(): {
3
3
  type: "Ticket";
4
4
  subtype: import('../../../lib/models/ticket/UITicket.svelte').UITicketType;
5
5
  shop_order: number;
6
+ content: import('@gomus/types').TicketContent | undefined;
6
7
  id: number;
7
8
  title: string;
8
9
  ticket_type: "time_slot" | "annual" | "normal";
@@ -67,6 +68,7 @@ export declare function createMockUITicket(): {
67
68
  type: "Ticket";
68
69
  subtype: import('../../../lib/models/ticket/UITicket.svelte').UITicketType;
69
70
  shop_order: number;
71
+ content: import('@gomus/types').TicketContent | undefined;
70
72
  id: number;
71
73
  title: string;
72
74
  ticket_type: "time_slot" | "annual" | "normal";
@@ -123,6 +125,7 @@ export declare function createMockUITicket(): {
123
125
  type: "Ticket";
124
126
  subtype: import('../../../lib/models/ticket/UITicket.svelte').UITicketType;
125
127
  shop_order: number;
128
+ content: import('@gomus/types').TicketContent | undefined;
126
129
  id: number;
127
130
  title: string;
128
131
  ticket_type: "time_slot" | "annual" | "normal";
@@ -1,5 +1,21 @@
1
+ import { SegmentDetails } from '../../../../components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.ts';
1
2
  import { TicketSelectionDetails } from '../../../../components/ticketSelection/TicketSelectionDetails.svelte.ts';
3
+ import { UITicket } from '../../../../lib/models/ticket/UITicket.svelte.ts';
2
4
  import { DateDetails, Quotas } from '@gomus/types';
5
+ /**
6
+ * When a segment opts into content attributes (with-content), batch-fetch
7
+ * tickets/content for the given tickets and merge each entry's `content` onto
8
+ * the matching ticket by id (mirrors the legacy `ticket.content = item.content`).
9
+ * Mutates the tickets in place; call before adding them to the preCart so the
10
+ * content is present on first render. No-op — and no request — when the segment
11
+ * hasn't enabled the feature or there are no tickets to enrich.
12
+ *
13
+ * Best-effort: the content is an optional, additive sidecar, so a failed or
14
+ * absent fetch degrades to "no info buttons" and must never empty the ticket
15
+ * list (see audit finding IB-01). Note this does NOT cover a hung request — a
16
+ * never-settling fetch is a separate core-infra concern (IB-05).
17
+ */
18
+ export declare function enrichTicketsWithContent(segment: SegmentDetails, tickets: UITicket[]): Promise<void>;
3
19
  /**
4
20
  * Load quotas fetched by a filter's loadTimeslots into the shared quota store and
5
21
  * record which ticket ids this selection loaded for its picker. timeslotsOn() reads
@@ -140,6 +140,7 @@ export declare class SegmentDetails {
140
140
  languageIds: number[] | undefined;
141
141
  catchWordIds: number[] | undefined;
142
142
  museumIds: number[] | undefined;
143
+ withContent: boolean;
143
144
  constructor(filters: TicketSegmentFilter | TicketSegmentFilter[] | undefined, tsdWrapper: DetailsWrapper<TicketSelectionDetails>);
144
145
  get effectiveFilters(): TicketSegmentFilter[];
145
146
  clear(): void;
@@ -532,6 +532,7 @@ export declare const translations: {
532
532
  'ticket.annual.personalization.detail.newUser': string;
533
533
  'ticket.annual.personalization.list.notPersonalizable.title': string;
534
534
  'ticket.annual.personalization.list.personalize.empty': string;
535
+ 'ticket.list.additionalInfo': string;
535
536
  'ticket.list.filters.exhibition': string;
536
537
  'ticket.list.filters.museum': string;
537
538
  'ticket.list.special': string;
@@ -1,5 +1,5 @@
1
1
  import { BaseProduct } from '../../../../lib/models/cart/types.ts';
2
- import { AnnualTicket, NormalTickets, Ticket, Tickets } from '@gomus/types';
2
+ import { AnnualTicket, NormalTickets, Ticket, TicketContent, Tickets } from '@gomus/types';
3
3
  interface Options {
4
4
  selectedTime?: string;
5
5
  }
@@ -11,6 +11,7 @@ export declare function createUITicket(apiTicket: Ticket | AnnualTicket | Normal
11
11
  type: "Ticket";
12
12
  subtype: UITicketType;
13
13
  shop_order: number;
14
+ content: TicketContent | undefined;
14
15
  id: number;
15
16
  title: string;
16
17
  ticket_type: "time_slot" | "annual" | "normal";
@@ -75,6 +76,7 @@ export declare function createUITicket(apiTicket: Ticket | AnnualTicket | Normal
75
76
  type: "Ticket";
76
77
  subtype: UITicketType;
77
78
  shop_order: number;
79
+ content: TicketContent | undefined;
78
80
  id: number;
79
81
  title: string;
80
82
  ticket_type: "time_slot" | "annual" | "normal";
@@ -131,6 +133,7 @@ export declare function createUITicket(apiTicket: Ticket | AnnualTicket | Normal
131
133
  type: "Ticket";
132
134
  subtype: UITicketType;
133
135
  shop_order: number;
136
+ content: TicketContent | undefined;
134
137
  id: number;
135
138
  title: string;
136
139
  ticket_type: "time_slot" | "annual" | "normal";
@@ -6,7 +6,7 @@ import { Auth } from '../../../lib/stores/auth.svelte.ts';
6
6
  import { User } from '../../../lib/stores/user.svelte.ts';
7
7
  import { OpenApiClient } from '@gomus/api';
8
8
  import { TicketsAndQuotasParams, TicketsCalendarParams, TicketsParams } from '@gomus/api/lib/types.ts';
9
- import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour, UploadPersonalizationPhotoResponse, ValidateTokenResponse, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
9
+ import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, TicketContentEntry, Tour, UploadPersonalizationPhotoResponse, ValidateTokenResponse, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
10
10
  export type ShopKind = 'angular' | 'jmb';
11
11
  type ParseAs = 'json' | 'text' | 'blob' | 'arrayBuffer' | 'stream';
12
12
  export declare class Shop {
@@ -379,6 +379,7 @@ export declare class Shop {
379
379
  [key: string]: number;
380
380
  } | null;
381
381
  }[];
382
+ ticketsContent(ticketIds: number[]): TicketContentEntry[];
382
383
  signIn(params: SignInParams): Promise<SignInResponse>;
383
384
  signUp(params: SignUpParams, asGuest?: boolean): Promise<SignUpResponse>;
384
385
  withdrawal(params: WithdrawalParams): Promise<WithdrawalResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "3.8.2",
7
+ "version": "3.9.0",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",