@gomusdev/web-components 1.56.1 → 1.57.1
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 +323 -146
- package/dist-js/gomus-webcomponents.js +323 -146
- package/dist-js/src/components/annualTicketPersonalization/specs/AnnualTicketPersonalizationFormPhoto.spec.d.ts +1 -0
- package/dist-js/src/components/forms/lib/Field.svelte.d.ts +2 -2
- package/dist-js/src/components/forms/ui/generic/FileField.spec.d.ts +1 -0
- package/dist-js/src/components/forms/ui/generic/FormDetails.svelte.d.ts +1 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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.
|
|
@@ -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: {
|