@gomusdev/web-components 1.56.1 → 2.0.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.
- package/dist-js/gomus-webcomponents.iife.js +865 -504
- package/dist-js/gomus-webcomponents.js +865 -504
- package/dist-js/src/components/forms/lib/Field.svelte.d.ts +2 -2
- package/dist-js/src/components/forms/ui/generic/FormDetails.svelte.d.ts +1 -1
- package/dist-js/src/components/ticketSelection/TicketSelectionDetails.svelte.d.ts +6 -6
- package/dist-js/src/components/ticketSelection/filters/_helpers.d.ts +4 -0
- package/dist-js/src/components/ticketSelection/filters/event/admission-day.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/event/admission-timeslot.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/event/admission.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/event/price.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/event/spec/admission.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/event/spec/price.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/events/admission-day.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/events/admission-timeslot.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/events/admission.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/events/price.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/events/spec/admission-day.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/events/spec/admission-timeslot.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/events/spec/admission.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/events/spec/price.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/registry.d.ts +4 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/annual.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/day.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/spec/annual.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/spec/day.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/spec/timeslot.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/filters/ticket/timeslot.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/types.d.ts +23 -0
- package/dist-js/src/components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.d.ts +2 -1
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +6 -4
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/spec/SegmentDetails.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/subcomponents/timeslots/lib/lib.svelte.d.ts +2 -1
- package/dist-js/src/lib/stores/shop.svelte.d.ts +6 -1
- package/dist-js/src/mocks/MSWMocks.d.ts +3 -0
- package/package.json +1 -1
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/annualTickets.svelte.d.ts +0 -2
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/dayTickets.svelte.d.ts +0 -2
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.svelte.d.ts +0 -2
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.d.ts +0 -2
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.svelte.d.ts +0 -2
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/timeslotTickets.svelte.d.ts +0 -2
- /package/dist-js/src/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/TicketSegment.spec.d.ts → annualTicketPersonalization/specs/AnnualTicketPersonalizationFormPhoto.spec.d.ts} +0 -0
- /package/dist-js/src/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.spec.d.ts → forms/ui/generic/FileField.spec.d.ts} +0 -0
- /package/dist-js/src/components/ticketSelection/{subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.spec.d.ts → filters/event/spec/admission-day.spec.d.ts} +0 -0
- /package/dist-js/src/components/ticketSelection/{subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.spec.d.ts → filters/event/spec/admission-timeslot.spec.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FullAutoFill } from 'svelte/elements';
|
|
2
2
|
import { ZodType } from 'zod';
|
|
3
|
-
export type FieldType = 'input' | 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'checkbox' | 'select' | 'radio' | 'textarea' | 'date' | 'paymentMode';
|
|
3
|
+
export type FieldType = 'input' | 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'checkbox' | 'select' | 'radio' | 'textarea' | 'date' | 'file' | 'paymentMode';
|
|
4
4
|
export interface Field {
|
|
5
5
|
key: string;
|
|
6
6
|
apiKey?: string;
|
|
@@ -11,7 +11,7 @@ export interface Field {
|
|
|
11
11
|
value: string | number;
|
|
12
12
|
label: string;
|
|
13
13
|
}[];
|
|
14
|
-
value: string | boolean;
|
|
14
|
+
value: string | boolean | File | null;
|
|
15
15
|
required: boolean;
|
|
16
16
|
description: string | undefined;
|
|
17
17
|
autocomplete: FullAutoFill;
|
|
@@ -9,7 +9,7 @@ export declare class FormDetails {
|
|
|
9
9
|
*/
|
|
10
10
|
successMessage: string | undefined;
|
|
11
11
|
get formData(): Record<string, string | number | boolean>;
|
|
12
|
-
fieldValue(key: string): string | boolean | undefined;
|
|
12
|
+
fieldValue(key: string): string | boolean | File | null | undefined;
|
|
13
13
|
get apiErrors(): string[] | Record<string, string[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Sets API errors for the current instance.
|
|
@@ -2,12 +2,12 @@ import { Cart } from '../../../lib/models/cart/cart.svelte.ts';
|
|
|
2
2
|
import { SegmentDetails } from '../../../components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.ts';
|
|
3
3
|
import { Details as TimeslotDetails } from '../../../components/ticketSelection/subcomponents/timeslots/lib/lib.svelte.ts';
|
|
4
4
|
import { CalendarDate } from '@internationalized/date';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
5
|
+
import { validFilterNames } from './filters/registry.ts';
|
|
6
|
+
import { FilterName } from './filters/types.ts';
|
|
7
|
+
export { validFilterNames as validTicketSelectionFilters };
|
|
8
|
+
export type TicketSelectionFilter = FilterName;
|
|
8
9
|
export declare class TicketSelectionDetails {
|
|
9
10
|
uid: number;
|
|
10
|
-
mode: TicketSelectionMode | undefined;
|
|
11
11
|
filters: TicketSelectionFilter[] | undefined;
|
|
12
12
|
eventIds: number[] | undefined;
|
|
13
13
|
museumIds: number[] | undefined;
|
|
@@ -21,9 +21,9 @@ export declare class TicketSelectionDetails {
|
|
|
21
21
|
preCarts: Cart[];
|
|
22
22
|
timeslotDetails: TimeslotDetails | undefined;
|
|
23
23
|
addTicketSegment(ticketGroup: SegmentDetails): void;
|
|
24
|
-
get isTimeslotsVisible(): boolean;
|
|
25
|
-
get isTicketsVisible(): boolean | undefined;
|
|
26
24
|
get isCalendarVisible(): boolean;
|
|
25
|
+
get isTimeslotsVisible(): boolean;
|
|
26
|
+
get isTicketsVisible(): boolean;
|
|
27
27
|
}
|
|
28
28
|
export declare const setTicketSelectionDetails: (host: HTMLElement, details: TicketSelectionDetails) => void;
|
|
29
29
|
export declare const getTicketSelectionDetails: (host: HTMLElement, options?: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TicketSelectionDetails } from '../../../../components/ticketSelection/TicketSelectionDetails.svelte.ts';
|
|
2
|
+
import { DateDetails } from '@gomus/types';
|
|
3
|
+
export declare function filterDatesInWindow(dates: ReadonlyArray<DateDetails>, selectedDate: string, selectedTime: string): DateDetails[];
|
|
4
|
+
export declare function loadEventsTimeslots(tsd: TicketSelectionDetails): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-js/src/components/ticketSelection/filters/events/spec/admission-timeslot.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FilterModule, FilterName } from './types.ts';
|
|
2
|
+
export declare function getFilter(name: FilterName): FilterModule;
|
|
3
|
+
export declare function allFilters(): FilterModule[];
|
|
4
|
+
export declare const validFilterNames: readonly ["ticket:timeslot", "ticket:day", "ticket:annual", "event:admission", "event:admission:day", "event:admission:timeslot", "event:price", "events:admission", "events:admission:day", "events:admission:timeslot", "events:price"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TicketSelectionDetails } from '../../../../components/ticketSelection/TicketSelectionDetails.svelte.ts';
|
|
2
|
+
import { SegmentDetails } from '../../../../components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.ts';
|
|
3
|
+
export declare const FILTER_NAMES: readonly ["ticket:timeslot", "ticket:day", "ticket:annual", "event:admission", "event:admission:day", "event:admission:timeslot", "event:price", "events:admission", "events:admission:day", "events:admission:timeslot", "events:price"];
|
|
4
|
+
export type FilterName = (typeof FILTER_NAMES)[number];
|
|
5
|
+
export type Required = {
|
|
6
|
+
kind: 'tsd';
|
|
7
|
+
field: keyof TicketSelectionDetails;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'segment';
|
|
10
|
+
field: keyof SegmentDetails;
|
|
11
|
+
};
|
|
12
|
+
export type CalendarEndpoint = 'tickets' | 'events' | null;
|
|
13
|
+
export interface FilterModule {
|
|
14
|
+
name: FilterName;
|
|
15
|
+
isCalendarVisible(tsd: TicketSelectionDetails): boolean;
|
|
16
|
+
isTimeslotsVisible(tsd: TicketSelectionDetails): boolean;
|
|
17
|
+
isTicketsVisible(tsd: TicketSelectionDetails): boolean;
|
|
18
|
+
loadProducts(segment: SegmentDetails): Promise<void>;
|
|
19
|
+
loadTimeslots(tsd: TicketSelectionDetails): Promise<void>;
|
|
20
|
+
calendarEndpoint: CalendarEndpoint;
|
|
21
|
+
apiToken?: string;
|
|
22
|
+
requires: ReadonlyArray<Required>;
|
|
23
|
+
}
|
package/dist-js/src/components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ export declare class Calendar {
|
|
|
10
10
|
details: TicketSelectionDetails | undefined;
|
|
11
11
|
startAt: CalendarDate;
|
|
12
12
|
selected: CalendarDate | undefined;
|
|
13
|
+
get endpoint(): 'tickets' | 'events' | null;
|
|
13
14
|
get dates(): CalendarDatesDepthAvailabilityStatus | undefined;
|
|
14
15
|
isDateDisabled(date: DateValue): boolean;
|
|
15
16
|
isDateUnavailable(date: DateValue): boolean;
|
|
16
|
-
get apiFilters(): string[] | undefined;
|
|
17
|
+
get apiFilters(): (string | undefined)[] | undefined;
|
|
17
18
|
params(startAt: CalendarDate): {
|
|
18
19
|
locale?: string;
|
|
19
20
|
by_bookable?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TicketSelectionDetails } from '../../../../../../../components/ticketSelection/TicketSelectionDetails.svelte.ts';
|
|
2
2
|
import { DetailsWrapper } from '../../../../../../../lib/helpers/context.svelte.js';
|
|
3
|
-
|
|
3
|
+
import { FilterName } from '../../../../../../../components/ticketSelection/filters/types.ts';
|
|
4
|
+
export type TicketSegmentFilter = FilterName | 'custom';
|
|
4
5
|
export declare class SegmentDetails {
|
|
5
6
|
preCart: {
|
|
6
7
|
items: {
|
|
@@ -128,7 +129,7 @@ export declare class SegmentDetails {
|
|
|
128
129
|
removeCoupon(token: string): void;
|
|
129
130
|
clearCoupons(): void;
|
|
130
131
|
};
|
|
131
|
-
filters: TicketSegmentFilter;
|
|
132
|
+
filters: TicketSegmentFilter[] | undefined;
|
|
132
133
|
ticketSelectionDetails: TicketSelectionDetails | undefined;
|
|
133
134
|
dateId: number | undefined;
|
|
134
135
|
limit: number | undefined;
|
|
@@ -137,10 +138,11 @@ export declare class SegmentDetails {
|
|
|
137
138
|
languageIds: number[] | undefined;
|
|
138
139
|
catchWordIds: number[] | undefined;
|
|
139
140
|
museumIds: number[] | undefined;
|
|
140
|
-
constructor(
|
|
141
|
+
constructor(filters: TicketSegmentFilter | TicketSegmentFilter[] | undefined, tsdWrapper: DetailsWrapper<TicketSelectionDetails>);
|
|
142
|
+
get effectiveFilters(): TicketSegmentFilter[];
|
|
141
143
|
clear(): void;
|
|
142
144
|
toString(): string;
|
|
143
|
-
loadTickets(): void
|
|
145
|
+
loadTickets(): Promise<void>;
|
|
144
146
|
}
|
|
145
147
|
export declare const setSegmentDetails: (host: HTMLElement, details: SegmentDetails) => void;
|
|
146
148
|
export declare const getSegmentDetails: (host: HTMLElement, options?: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,8 @@ import { DetailsWrapper } from '../../../../../../lib/helpers/context.svelte.ts'
|
|
|
3
3
|
import { TimeSlot } from '@gomus/types';
|
|
4
4
|
export declare class Details {
|
|
5
5
|
tsd: TicketSelectionDetails | undefined;
|
|
6
|
+
timeslots: TimeSlot[];
|
|
6
7
|
constructor(tsdWrapper?: DetailsWrapper<TicketSelectionDetails>);
|
|
7
8
|
get boockedOutCount(): number;
|
|
8
|
-
|
|
9
|
+
recalculateCapacities(): void;
|
|
9
10
|
}
|
|
@@ -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, ValidateTokenResponse } 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, Tour, UploadPersonalizationPhotoResponse, ValidateTokenResponse } from '@gomus/types';
|
|
10
10
|
export type ShopKind = 'angular' | 'jmb';
|
|
11
11
|
export declare class Shop {
|
|
12
12
|
#private;
|
|
@@ -489,6 +489,7 @@ export declare class Shop {
|
|
|
489
489
|
ticket_sales: import('@gomus/types').components["schemas"]["ticket_sale_personalization"][];
|
|
490
490
|
} | undefined;
|
|
491
491
|
finalizePersonalizations(token: string, params: FinalizePersonalizationParams): Promise<FinalizePersonalizationResponse>;
|
|
492
|
+
uploadPersonalizationPhoto(token: string, personalizationId: number, file: File): Promise<UploadPersonalizationPhotoResponse>;
|
|
492
493
|
/**
|
|
493
494
|
* Returns a reactive value that will contain the fetched data, no need to await.
|
|
494
495
|
*
|
|
@@ -802,6 +803,10 @@ export declare class Shop {
|
|
|
802
803
|
params?: Record<string, unknown>;
|
|
803
804
|
requiredFields?: string[];
|
|
804
805
|
}): Promise<T>;
|
|
806
|
+
apiUpload<T>(path: string, options: {
|
|
807
|
+
body: FormData;
|
|
808
|
+
params?: Record<string, unknown>;
|
|
809
|
+
}): Promise<T>;
|
|
805
810
|
apiCall<T>(path: string, options: {
|
|
806
811
|
method: 'POST' | 'PUT' | 'DELETE';
|
|
807
812
|
body: Record<string, any>;
|
|
@@ -10,6 +10,9 @@ export declare const MSWMocks: {
|
|
|
10
10
|
mockSalutations: () => void;
|
|
11
11
|
mockLocales: () => void;
|
|
12
12
|
mockAnnualOrder: () => void;
|
|
13
|
+
mockAnnualOrderWithRequiredPhoto: () => void;
|
|
14
|
+
mockPersonalizationPhotoUpload: () => void;
|
|
15
|
+
mockPersonalizationPhotoUploadFailure: () => void;
|
|
13
16
|
mockCountries: () => void;
|
|
14
17
|
mockPersonalizationFormSubmit: () => void;
|
|
15
18
|
tickets: {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|