@gomusdev/web-components 1.33.0 → 1.34.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/components/forms/ui/generic/FormDetails.svelte.d.ts +14 -1
- package/dist-js/components/profile/details/Details.spec.d.ts +1 -0
- package/dist-js/components/profile/details/Details.svelte.d.ts +1 -0
- package/dist-js/components/profile/entry.d.ts +0 -0
- package/dist-js/components/profile/overview/Overview.spec.d.ts +1 -0
- package/dist-js/components/profile/overview/Overview.svelte.d.ts +1 -0
- package/dist-js/components/profile/password/Password.spec.d.ts +1 -0
- package/dist-js/components/profile/password/Password.svelte.d.ts +1 -0
- package/dist-js/components/ticketSelection/TicketSelectionDetails.svelte.d.ts +4 -4
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/{TicketSegmentDetails.svelte.d.ts → SegmentDetails.svelte.d.ts} +10 -5
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/TicketSegmentEmpty.svelte.d.ts +1 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/annualTickets.svelte.d.ts +2 -2
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/dayTickets.svelte.d.ts +2 -2
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.spec.d.ts +1 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.svelte.d.ts +2 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.d.ts +2 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.spec.d.ts +1 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.spec.d.ts +1 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.svelte.d.ts +2 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/timeslotTickets.svelte.d.ts +2 -2
- package/dist-js/factories/DateFactories.d.ts +161 -0
- package/dist-js/factories/ScalingPriceFactories.d.ts +11 -0
- package/dist-js/gomus-webcomponents.css +25 -36
- package/dist-js/gomus-webcomponents.iife.js +563 -199
- package/dist-js/gomus-webcomponents.js +563 -199
- package/dist-js/lib/helpers/shopCart.d.ts +2 -2
- package/dist-js/lib/models/scalePrice/UIScaledPrice.svelte.d.ts +5 -5
- package/dist-js/lib/stores/auth.svelte.d.ts +1 -1
- package/dist-js/lib/stores/shop.svelte.d.ts +76 -2
- package/dist-js/mocks/MSWMocks.d.ts +1 -0
- package/package.json +1 -1
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventScaledPriceTickets.svelte.d.ts +0 -2
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventTickets.svelte.d.ts +0 -2
- /package/dist-js/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventScaledPriceTickets.spec.d.ts → forms/ui/specs/fill.spec.d.ts} +0 -0
- /package/dist-js/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventTickets.svelte.spec.d.ts → forms/ui/specs/onsubmit.spec.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalStorageCartItem } from '@gomus/types';
|
|
2
2
|
export type CartItem = {
|
|
3
3
|
name: string;
|
|
4
4
|
quantity: number;
|
|
@@ -9,7 +9,7 @@ export type CartItem = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function getCartItems(currency?: string): CartItem[];
|
|
11
11
|
export declare function total(): number;
|
|
12
|
-
export declare function parsedItems():
|
|
12
|
+
export declare function parsedItems(): LocalStorageCartItem[];
|
|
13
13
|
export declare function sampleCard(): {
|
|
14
14
|
type: string;
|
|
15
15
|
attributes: {
|
|
@@ -6,11 +6,11 @@ interface Options {
|
|
|
6
6
|
quantity?: number;
|
|
7
7
|
event_title: string;
|
|
8
8
|
}
|
|
9
|
-
type
|
|
10
|
-
export declare function
|
|
11
|
-
export type
|
|
12
|
-
export declare function
|
|
13
|
-
type:
|
|
9
|
+
type UIScaledPricesTicketTypes = 'scale';
|
|
10
|
+
export declare function isUIScaledPricesTicket(x: Product): x is UIScaledPricesTicket;
|
|
11
|
+
export type UIScaledPricesTicket = ReturnType<typeof createUIScaledPricesTicket>;
|
|
12
|
+
export declare function createUIScaledPricesTicket(apiTicket: EventScalePriceTicket, dateId: number, options?: Options): {
|
|
13
|
+
type: UIScaledPricesTicketTypes;
|
|
14
14
|
minAvailableCapacity: number;
|
|
15
15
|
selectedTime: string;
|
|
16
16
|
quantity: number;
|
|
@@ -6,7 +6,7 @@ import { Auth } from './auth.svelte.ts';
|
|
|
6
6
|
import { User } from './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, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
|
|
9
|
+
import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, PasswordUpdateResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour, ValidateTokenResponse } from '@gomus/types';
|
|
10
10
|
export type ShopKind = 'angular' | 'jmb';
|
|
11
11
|
export declare class Shop {
|
|
12
12
|
#private;
|
|
@@ -242,6 +242,7 @@ export declare class Shop {
|
|
|
242
242
|
auth?: Auth;
|
|
243
243
|
capacityManager?: CapacityManager;
|
|
244
244
|
};
|
|
245
|
+
validateToken(): ValidateTokenResponse;
|
|
245
246
|
ticketsCalendar(params: TicketsCalendarParams): CalendarDatesDepthAvailabilityStatus;
|
|
246
247
|
calendar(params: TicketsCalendarParams): CalendarDates;
|
|
247
248
|
ticketsAndQuotas(params: TicketsAndQuotasParams): {
|
|
@@ -300,6 +301,63 @@ export declare class Shop {
|
|
|
300
301
|
}[];
|
|
301
302
|
signIn(params: SignInParams): Promise<SignInResponse>;
|
|
302
303
|
signUp(params: SignUpParams, asGuest?: boolean): Promise<SignUpResponse>;
|
|
304
|
+
getDates(query: {
|
|
305
|
+
q?: string;
|
|
306
|
+
by_bookable?: boolean;
|
|
307
|
+
by_museum_ids?: number[];
|
|
308
|
+
by_exhibition_ids?: number[];
|
|
309
|
+
by_event_ids?: number[];
|
|
310
|
+
by_language_ids?: number[];
|
|
311
|
+
by_category_ids?: number[];
|
|
312
|
+
by_catch_word_ids?: number[];
|
|
313
|
+
start_at?: string;
|
|
314
|
+
end_at?: string;
|
|
315
|
+
per_page?: number;
|
|
316
|
+
page?: number;
|
|
317
|
+
}): {
|
|
318
|
+
id?: number;
|
|
319
|
+
event_id?: number;
|
|
320
|
+
exhibition_id?: number | null;
|
|
321
|
+
museum_id?: number | null;
|
|
322
|
+
foreign_id?: number | null;
|
|
323
|
+
category?: import('@gomus/types').components["schemas"]["category"];
|
|
324
|
+
bookable?: boolean;
|
|
325
|
+
registerable?: boolean;
|
|
326
|
+
entry_fee?: number;
|
|
327
|
+
title?: string | null;
|
|
328
|
+
sub_title?: string | null;
|
|
329
|
+
description?: string | null;
|
|
330
|
+
meeting_point?: string | null;
|
|
331
|
+
event_title?: string;
|
|
332
|
+
event_sub_title?: string | null;
|
|
333
|
+
start_time?: string;
|
|
334
|
+
duration?: number;
|
|
335
|
+
vat_pct?: number;
|
|
336
|
+
seats?: {
|
|
337
|
+
min?: number;
|
|
338
|
+
max?: number;
|
|
339
|
+
booked?: number;
|
|
340
|
+
available?: number;
|
|
341
|
+
max_per_registration?: number | null;
|
|
342
|
+
overbook?: boolean;
|
|
343
|
+
};
|
|
344
|
+
created_at?: string;
|
|
345
|
+
updated_at?: string;
|
|
346
|
+
language?: import('@gomus/types').components["schemas"]["language"];
|
|
347
|
+
location?: import('@gomus/types').components["schemas"]["location"];
|
|
348
|
+
prices?: import('@gomus/types').components["schemas"]["price"][];
|
|
349
|
+
status?: "booked" | "cancelled";
|
|
350
|
+
discount?: number;
|
|
351
|
+
tax_included?: boolean;
|
|
352
|
+
seatings?: Record<string, never>[];
|
|
353
|
+
comment?: string | null;
|
|
354
|
+
guides?: Record<string, never>[] | null;
|
|
355
|
+
}[];
|
|
356
|
+
updatePassword(params: {
|
|
357
|
+
password: string;
|
|
358
|
+
password_confirmation: string;
|
|
359
|
+
current_password: string;
|
|
360
|
+
}): Promise<PasswordUpdateResponse>;
|
|
303
361
|
passwordReset(params: {
|
|
304
362
|
email: string;
|
|
305
363
|
}): Promise<PasswordResetResponse>;
|
|
@@ -650,12 +708,28 @@ export declare class Shop {
|
|
|
650
708
|
params?: Record<string, unknown>;
|
|
651
709
|
requiredFields?: string[];
|
|
652
710
|
}): Promise<T>;
|
|
711
|
+
apiPut<T>(path: string, options: {
|
|
712
|
+
body: Record<string, any>;
|
|
713
|
+
params?: Record<string, unknown>;
|
|
714
|
+
requiredFields?: string[];
|
|
715
|
+
}): Promise<T>;
|
|
716
|
+
apiDELETE<T>(path: string, options: {
|
|
717
|
+
body: Record<string, any>;
|
|
718
|
+
params?: Record<string, unknown>;
|
|
719
|
+
requiredFields?: string[];
|
|
720
|
+
}): Promise<T>;
|
|
721
|
+
apiCall<T>(path: string, options: {
|
|
722
|
+
method: 'POST' | 'PUT' | 'DELETE';
|
|
723
|
+
body: Record<string, any>;
|
|
724
|
+
params?: Record<string, unknown>;
|
|
725
|
+
requiredFields?: string[];
|
|
726
|
+
}): Promise<T>;
|
|
653
727
|
/**
|
|
654
728
|
* Executes the provided method asynchronously, waits for all dependent fetch operations to complete,
|
|
655
729
|
* and returns the result of the method execution.
|
|
656
730
|
*/
|
|
657
731
|
asyncFetch<T>(method: () => T): Promise<T>;
|
|
658
732
|
waitForAllFetches(...variables: unknown[]): Promise<void>;
|
|
659
|
-
apiGet(path: `/api${string}`, query?: Record<string, unknown>, pathOptions?: Record<string, unknown>): Promise<
|
|
733
|
+
apiGet(path: `/api${string}`, query?: Record<string, unknown>, pathOptions?: Record<string, unknown>): Promise<{}>;
|
|
660
734
|
}
|
|
661
735
|
export declare const shop: Shop;
|
package/package.json
CHANGED
|
File without changes
|