@gomusdev/web-components 1.51.1 → 1.53.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/cart/components/lib.d.ts +14 -0
- package/dist-js/components/cart/components/lib.spec.d.ts +1 -0
- package/dist-js/components/cart/components/utils.d.ts +2 -0
- package/dist-js/components/couponRedemption/lib.d.ts +7 -2
- package/dist-js/components/couponRedemption/lib.spec.d.ts +1 -0
- package/dist-js/components/forms/lib/Field.svelte.d.ts +1 -1
- package/dist-js/components/forms/ui/generic/FormDetails.svelte.d.ts +1 -0
- package/dist-js/components/forms/ui/generic/PaymentModeField.spec.d.ts +1 -0
- package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +4 -3
- package/dist-js/gomus-webcomponents.css +942 -926
- package/dist-js/gomus-webcomponents.iife.js +558 -206
- package/dist-js/gomus-webcomponents.js +558 -206
- package/dist-js/lib/models/cart/CartItem.d.ts +15 -5
- package/dist-js/lib/models/cart/cart.svelte.d.ts +8 -6
- package/dist-js/lib/models/cart/localStorage.svelte.d.ts +0 -1
- package/dist-js/lib/stores/shop.svelte.d.ts +11 -11
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Cart } from '../../../lib/models/cart/cart.svelte.ts';
|
|
2
|
+
import { CartItem } from '../../../lib/models/cart/types.ts';
|
|
3
|
+
import { PostCartResponse } from '@gomus/types';
|
|
4
|
+
type PostCartData = Exclude<PostCartResponse['data'], never>;
|
|
5
|
+
export type ApiItem = PostCartData['items'][number];
|
|
6
|
+
export type DisplayItem = CartItem & {
|
|
7
|
+
display: NonNullable<CartItem['display']>;
|
|
8
|
+
};
|
|
9
|
+
export type DisplayCartResult = {
|
|
10
|
+
cart: Cart;
|
|
11
|
+
appliedCoupons: Set<string>;
|
|
12
|
+
};
|
|
13
|
+
export declare function createDisplayCart(baseCart: Cart, apiItems: ApiItem[]): DisplayCartResult;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type RedeemResult = {
|
|
2
|
+
success: true;
|
|
3
|
+
} | {
|
|
4
|
+
success: false;
|
|
5
|
+
errors: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function redeem(token: string): Promise<RedeemResult>;
|
|
@@ -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';
|
|
3
|
+
export type FieldType = 'input' | 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'checkbox' | 'select' | 'radio' | 'textarea' | 'date' | 'paymentMode';
|
|
4
4
|
export interface Field {
|
|
5
5
|
key: string;
|
|
6
6
|
apiKey?: string;
|
|
@@ -9,6 +9,7 @@ export declare class FormDetails {
|
|
|
9
9
|
*/
|
|
10
10
|
successMessage: string | undefined;
|
|
11
11
|
get formData(): any;
|
|
12
|
+
fieldValue(key: string): string | boolean | undefined;
|
|
12
13
|
get apiErrors(): string[] | Record<string, string[]>;
|
|
13
14
|
/**
|
|
14
15
|
* Sets API errors for the current instance.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,7 @@ export declare class SegmentDetails {
|
|
|
7
7
|
coupons: string[];
|
|
8
8
|
contingent: number;
|
|
9
9
|
uid: string;
|
|
10
|
+
paymentModeId: string | undefined;
|
|
10
11
|
readonly nonEmptyItems: import('../../../../../../lib/models/cart/types').CartItem[];
|
|
11
12
|
readonly totalPriceCents: number;
|
|
12
13
|
readonly totalQuantity: number;
|
|
@@ -18,14 +19,14 @@ export declare class SegmentDetails {
|
|
|
18
19
|
shipped_with_merchandise_id: null;
|
|
19
20
|
shipping_mode: string;
|
|
20
21
|
id: number;
|
|
21
|
-
time: string;
|
|
22
|
-
quantity: number;
|
|
22
|
+
time: string | undefined;
|
|
23
|
+
quantity: number | undefined;
|
|
23
24
|
} | {
|
|
24
25
|
shipped_with_merchandise_id: null;
|
|
25
26
|
shipping_mode: string;
|
|
26
27
|
id: number;
|
|
27
28
|
quantities: {
|
|
28
|
-
[x: number]: number;
|
|
29
|
+
[x: number]: number | undefined;
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
32
|
}[];
|