@gomusdev/web-components 4.9.2 → 4.11.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/README.md +18 -0
- package/dist-js/gomus-webcomponents.iife.js +248 -198
- package/dist-js/gomus-webcomponents.js +248 -198
- package/dist-js/gomus-webcomponents.min.iife.js +44 -44
- package/dist-js/gomus-webcomponents.min.js +5054 -5026
- package/dist-js/src/components/order/components/subcomponents/breakdown/items/TicketSale.spec.d.ts +1 -0
- package/dist-js/src/factories/TicketFactories.d.ts +19 -0
- package/dist-js/src/lib/helpers/locale.d.ts +1 -0
- package/dist-js/src/lib/helpers/locale.spec.d.ts +1 -0
- package/dist-js/src/lib/helpers/utils.d.ts +1 -1
- package/dist-js/src/lib/helpers/utils.spec.d.ts +1 -0
- package/dist-js/src/lib/models/cart/cart.svelte.d.ts +0 -1
- package/dist-js/src/lib/models/ticket/UITicket.svelte.d.ts +1 -2
- package/dist-js/src/lib/stores/auth.svelte.d.ts +1 -1
- package/dist-js/src/lib/stores/shop.load.spec.d.ts +1 -0
- package/dist-js/src/lib/stores/shop.svelte.d.ts +4 -1
- package/package.json +1 -1
package/dist-js/src/components/order/components/subcomponents/breakdown/items/TicketSale.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { ProductType } from '../../lib/models/cart/types.ts';
|
|
2
|
+
import { OrderItem } from '@gomus/types';
|
|
3
|
+
type TicketOrderItem = Extract<OrderItem, {
|
|
4
|
+
type: 'Ticket';
|
|
5
|
+
}>;
|
|
2
6
|
export declare const TicketFactories: {
|
|
3
7
|
timeslot(options?: Partial<ReturnType<typeof defaultTicket>>): {
|
|
4
8
|
type: ProductType;
|
|
5
9
|
id: number;
|
|
6
10
|
ticket_type: "time_slot";
|
|
7
11
|
title: string;
|
|
12
|
+
sub_title: string | null;
|
|
8
13
|
description: string;
|
|
9
14
|
selectedTime: string;
|
|
10
15
|
museum_ids: never[];
|
|
@@ -29,6 +34,7 @@ export declare const TicketFactories: {
|
|
|
29
34
|
is_mantle: boolean;
|
|
30
35
|
sub_ticket_ids: never[];
|
|
31
36
|
sub_tickets: {};
|
|
37
|
+
optional_subordinates: never[];
|
|
32
38
|
is_sub_ticket: boolean;
|
|
33
39
|
created_at: string;
|
|
34
40
|
updated_at: string;
|
|
@@ -47,6 +53,7 @@ export declare const TicketFactories: {
|
|
|
47
53
|
id: number;
|
|
48
54
|
ticket_type: "time_slot" | "normal";
|
|
49
55
|
title: string;
|
|
56
|
+
sub_title: string | null;
|
|
50
57
|
description: string;
|
|
51
58
|
selectedTime: string;
|
|
52
59
|
museum_ids: never[];
|
|
@@ -71,6 +78,7 @@ export declare const TicketFactories: {
|
|
|
71
78
|
is_mantle: boolean;
|
|
72
79
|
sub_ticket_ids: never[];
|
|
73
80
|
sub_tickets: {};
|
|
81
|
+
optional_subordinates: never[];
|
|
74
82
|
is_sub_ticket: boolean;
|
|
75
83
|
created_at: string;
|
|
76
84
|
updated_at: string;
|
|
@@ -89,6 +97,7 @@ export declare const TicketFactories: {
|
|
|
89
97
|
id: number;
|
|
90
98
|
ticket_type: "time_slot";
|
|
91
99
|
title: string;
|
|
100
|
+
sub_title: string | null;
|
|
92
101
|
description: string;
|
|
93
102
|
selectedTime: string;
|
|
94
103
|
museum_ids: never[];
|
|
@@ -113,6 +122,7 @@ export declare const TicketFactories: {
|
|
|
113
122
|
is_mantle: boolean;
|
|
114
123
|
sub_ticket_ids: number[];
|
|
115
124
|
sub_tickets: {};
|
|
125
|
+
optional_subordinates: never[];
|
|
116
126
|
is_sub_ticket: boolean;
|
|
117
127
|
created_at: string;
|
|
118
128
|
updated_at: string;
|
|
@@ -126,12 +136,20 @@ export declare const TicketFactories: {
|
|
|
126
136
|
restricted_shop_account: boolean;
|
|
127
137
|
dynamic_prices: null;
|
|
128
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* A backend order-echo ticket item (the shape go-order-breakdown renders).
|
|
141
|
+
* `attributes` overrides shallow-merge onto the ticket_sale defaults.
|
|
142
|
+
*/
|
|
143
|
+
orderItem(overrides?: Partial<Omit<TicketOrderItem, "attributes">> & {
|
|
144
|
+
attributes?: Partial<TicketOrderItem["attributes"]>;
|
|
145
|
+
}): TicketOrderItem;
|
|
129
146
|
};
|
|
130
147
|
declare function defaultTicket(): {
|
|
131
148
|
type: ProductType;
|
|
132
149
|
id: number;
|
|
133
150
|
ticket_type: "time_slot";
|
|
134
151
|
title: string;
|
|
152
|
+
sub_title: string | null;
|
|
135
153
|
description: string;
|
|
136
154
|
selectedTime: string;
|
|
137
155
|
museum_ids: never[];
|
|
@@ -156,6 +174,7 @@ declare function defaultTicket(): {
|
|
|
156
174
|
is_mantle: boolean;
|
|
157
175
|
sub_ticket_ids: never[];
|
|
158
176
|
sub_tickets: {};
|
|
177
|
+
optional_subordinates: never[];
|
|
159
178
|
is_sub_ticket: boolean;
|
|
160
179
|
created_at: string;
|
|
161
180
|
updated_at: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function warnOnInvalidLocale(locale: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -175,7 +175,6 @@ export declare function createCart(products?: Product[], contingent?: number): {
|
|
|
175
175
|
removeCoupon(code: string): void;
|
|
176
176
|
clearCoupons(): void;
|
|
177
177
|
};
|
|
178
|
-
export declare function formatCurrency(priceCents: number): string;
|
|
179
178
|
export declare function createMainCart(): {
|
|
180
179
|
items: {
|
|
181
180
|
quantity: number;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { BaseProduct } from '../../../../lib/models/cart/types.ts';
|
|
2
1
|
import { AnnualTicket, NormalTickets, Ticket, TicketContent, Tickets } from '@gomus/types';
|
|
3
2
|
interface Options {
|
|
4
3
|
selectedTime?: string;
|
|
5
4
|
}
|
|
6
5
|
export type UITicketType = 'timeslot' | 'annual' | 'day' | 'event:ticket';
|
|
7
6
|
export type UITicket = ReturnType<typeof createUITicket>;
|
|
8
|
-
export declare function isUITicket(x:
|
|
7
|
+
export declare function isUITicket(x: unknown): x is UITicket;
|
|
9
8
|
/**
|
|
10
9
|
* A sub-ticket entry from a mantle's `sub_tickets` map, normalized for the UI:
|
|
11
10
|
* the map key is lifted to a numeric `id`, all-optional fields get defaults, and
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,8 +6,11 @@ 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, CustomerAddressesSuccess, CustomerMembershipsSuccess, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, MembershipActivationParams, MembershipActivationResponse, Merchandise, Museum, OrdersParams, OrdersSuccess, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, TicketContentEntry, Tour, UploadPersonalizationPhotoResponse, ValidateTokenSuccess, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
|
|
9
|
+
import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, CustomerAddressesSuccess, CustomerMembershipsSuccess, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, MembershipActivationParams, MembershipActivationResponse, Merchandise, Museum, OrdersParams, OrdersSuccess, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, TicketContentEntry, Tour, UploadPersonalizationPhotoResponse, ValidateTokenError, ValidateTokenSuccess, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
|
|
10
10
|
export type ShopKind = 'angular' | 'jmb';
|
|
11
|
+
export type NotSignedIn = {
|
|
12
|
+
error: ValidateTokenError;
|
|
13
|
+
};
|
|
11
14
|
export type ValidateTokenResult = ValidateTokenSuccess | NotSignedIn | undefined;
|
|
12
15
|
export type OrdersResult = OrdersSuccess | NotSignedIn | undefined;
|
|
13
16
|
export type CustomerAddressesResult = CustomerAddressesSuccess | NotSignedIn | undefined;
|