@ikas/storefront 1.0.2 → 1.0.3-beta.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/build/api/cart/__generated__/getCart.d.ts +16 -1
- package/build/index.css +2 -0
- package/build/index.es.css +2 -0
- package/build/index.es.js +531 -246
- package/build/index.js +528 -243
- package/build/models/data/cart/index.d.ts +2 -0
- package/build/models/data/order/line-item/index.d.ts +2 -0
- package/build/models/data/order/line-item/options/index.d.ts +20 -0
- package/build/models/data/order/line-item/options/options-value/index.d.ts +6 -0
- package/build/models/data/order-transaction/index.d.ts +4 -4
- package/build/models/data/product/index.d.ts +1 -0
- package/build/models/data/product-cart-item-options/index.d.ts +6 -0
- package/build/models/data/product-option-set/index.d.ts +19 -4
- package/build/store/cart.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IkasOrderLineItem } from "../order/line-item/index";
|
|
2
|
+
import { IkasProductCartLineOption } from "../product-cart-item-options/index";
|
|
2
3
|
export declare class IkasCart {
|
|
3
4
|
id: string;
|
|
4
5
|
createdAt: string;
|
|
@@ -40,6 +41,7 @@ export declare type IkasSaveItemToCartInput = {
|
|
|
40
41
|
salesChannelId: string;
|
|
41
42
|
storefrontId: string;
|
|
42
43
|
storefrontRoutingId: string;
|
|
44
|
+
options: IkasProductCartLineOption[] | null;
|
|
43
45
|
storefrontThemeId: string;
|
|
44
46
|
};
|
|
45
47
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IkasOrderLineDiscount } from "./discount/index";
|
|
2
2
|
import { IkasOrderLineVariant } from "./variant/index";
|
|
3
|
+
import { IkasOrderLineOptions } from "./options/index";
|
|
3
4
|
export declare class IkasOrderLineItem {
|
|
4
5
|
id: string;
|
|
5
6
|
createdAt: string;
|
|
@@ -11,6 +12,7 @@ export declare class IkasOrderLineItem {
|
|
|
11
12
|
discount?: IkasOrderLineDiscount | null;
|
|
12
13
|
discountPrice?: number | null;
|
|
13
14
|
finalPrice: number;
|
|
15
|
+
options: IkasOrderLineOptions[] | null;
|
|
14
16
|
originalOrderLineItemId?: string | null;
|
|
15
17
|
price: number;
|
|
16
18
|
quantity: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IkasOrderLineOptionsValue } from "./options-value/index";
|
|
2
|
+
declare enum ProductOptionTypeEnum {
|
|
3
|
+
CHECKBOX = "CHECKBOX",
|
|
4
|
+
CHOICE = "CHOICE",
|
|
5
|
+
COLOR_PICKER = "COLOR_PICKER",
|
|
6
|
+
DATE_PICKER = "DATE_PICKER",
|
|
7
|
+
FILE = "FILE",
|
|
8
|
+
IMAGE = "IMAGE",
|
|
9
|
+
TEXT = "TEXT",
|
|
10
|
+
TEXT_AREA = "TEXT_AREA"
|
|
11
|
+
}
|
|
12
|
+
export declare class IkasOrderLineOptions {
|
|
13
|
+
name: string;
|
|
14
|
+
productOptionId: string;
|
|
15
|
+
productOptionsSetId: string;
|
|
16
|
+
type: ProductOptionTypeEnum;
|
|
17
|
+
values: IkasOrderLineOptionsValue[];
|
|
18
|
+
constructor(data: IkasOrderLineOptions);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -40,7 +40,7 @@ export declare type IkasTransactionPaymentMethodDetail = {
|
|
|
40
40
|
cardAssociation: IkasTransactionCardAssociationEnum;
|
|
41
41
|
cardFamily: string;
|
|
42
42
|
cardType: IkasTransactionCardTypeEnum;
|
|
43
|
-
installment: IkasTransactionInstallmentPrice;
|
|
43
|
+
installment: IkasTransactionInstallmentPrice | null;
|
|
44
44
|
lastFourDigits: string;
|
|
45
45
|
threeDSecure: boolean;
|
|
46
46
|
};
|
|
@@ -56,9 +56,9 @@ export declare enum IkasTransactionCardTypeEnum {
|
|
|
56
56
|
PREPAID = "PREPAID"
|
|
57
57
|
}
|
|
58
58
|
export declare type IkasTransactionInstallmentPrice = {
|
|
59
|
-
installmentCount: number;
|
|
60
|
-
installmentPrice: number;
|
|
61
|
-
totalPrice: number;
|
|
59
|
+
installmentCount: number | null;
|
|
60
|
+
installmentPrice: number | null;
|
|
61
|
+
totalPrice: number | null;
|
|
62
62
|
};
|
|
63
63
|
export declare enum IkasTransactionStatusEnum {
|
|
64
64
|
FAILED = "FAILED",
|
|
@@ -26,6 +26,7 @@ export declare class IkasProduct {
|
|
|
26
26
|
get hasStock(): boolean;
|
|
27
27
|
get mainVariantType(): import("../index").IkasVariantType | undefined;
|
|
28
28
|
get href(): string;
|
|
29
|
+
get canAddToCart(): boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare enum IkasProductType {
|
|
31
32
|
PHYSICAL = "PHYSICAL",
|
|
@@ -3,8 +3,6 @@ export declare enum IkasProductOptionType {
|
|
|
3
3
|
CHOICE = "CHOICE",
|
|
4
4
|
TEXT = "TEXT",
|
|
5
5
|
TEXT_AREA = "TEXT_AREA",
|
|
6
|
-
IMAGE = "IMAGE",
|
|
7
|
-
FILE = "FILE",
|
|
8
6
|
COLOR_PICKER = "COLOR_PICKER",
|
|
9
7
|
CHECKBOX = "CHECKBOX"
|
|
10
8
|
}
|
|
@@ -31,12 +29,13 @@ export declare class IkasProductOptionSetTranslations {
|
|
|
31
29
|
constructor(data: Partial<IkasProductOptionSetTranslations>);
|
|
32
30
|
}
|
|
33
31
|
export declare class IkasProductOptionSelectValue {
|
|
32
|
+
id: string;
|
|
34
33
|
order: number;
|
|
35
34
|
value: string;
|
|
36
35
|
price: number | null;
|
|
37
36
|
thumbnailImageId: string | null;
|
|
38
37
|
colorCode: string | null;
|
|
39
|
-
thumbnailImage
|
|
38
|
+
thumbnailImage: IkasImage | null;
|
|
40
39
|
constructor(data?: Partial<IkasProductOptionSelectValue>);
|
|
41
40
|
}
|
|
42
41
|
export declare class IkasProductOptionSelectSettings {
|
|
@@ -63,6 +62,8 @@ export declare class IkasProductOptionFileSettings {
|
|
|
63
62
|
constructor(data: Partial<IkasProductOptionFileSettings>);
|
|
64
63
|
}
|
|
65
64
|
export declare class IkasProductOption {
|
|
65
|
+
id: string;
|
|
66
|
+
productOptionSetId: string;
|
|
66
67
|
name: string;
|
|
67
68
|
order: number;
|
|
68
69
|
type: IkasProductOptionType;
|
|
@@ -71,15 +72,29 @@ export declare class IkasProductOption {
|
|
|
71
72
|
fileSettings: IkasProductOptionFileSettings | null;
|
|
72
73
|
dateSettings: IkasProductOptionDateSettings | null;
|
|
73
74
|
price: number | null;
|
|
74
|
-
isOptional: boolean
|
|
75
|
+
isOptional: boolean;
|
|
75
76
|
optionalText: string | null;
|
|
76
77
|
requiredOptionId: string | null;
|
|
77
78
|
requiredOptionValueIds: string[] | null;
|
|
79
|
+
private _values;
|
|
80
|
+
private childOptions;
|
|
78
81
|
constructor(data: Partial<IkasProductOption>);
|
|
82
|
+
get displayedChildOptions(): IkasProductOption[];
|
|
83
|
+
get hasValidValues(): boolean;
|
|
84
|
+
get values(): string[];
|
|
85
|
+
set values(values: string[]);
|
|
86
|
+
initValues: () => void;
|
|
87
|
+
private isValidTextOptionValue;
|
|
88
|
+
private isValidChoiceOptionValue;
|
|
79
89
|
}
|
|
80
90
|
export declare class IkasProductOptionSet {
|
|
91
|
+
id: string;
|
|
81
92
|
name: string;
|
|
82
93
|
options: IkasProductOption[];
|
|
83
94
|
translations: IkasProductOptionSetTranslations[] | null;
|
|
84
95
|
constructor(data: Partial<IkasProductOptionSet>);
|
|
96
|
+
get displayedOptions(): IkasProductOption[];
|
|
97
|
+
private setTranslations;
|
|
98
|
+
private setChildOptions;
|
|
99
|
+
initOptionValues: () => Promise<void>;
|
|
85
100
|
}
|
package/build/store/cart.d.ts
CHANGED
|
@@ -18,8 +18,10 @@ export declare class IkasCartStore {
|
|
|
18
18
|
private getCart;
|
|
19
19
|
private setCart;
|
|
20
20
|
private beforeCartOperationCheck;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
private findExistingItem;
|
|
22
|
+
private createCartLineOptions;
|
|
23
|
+
addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<boolean>;
|
|
24
|
+
changeItemQuantity: (item: IkasOrderLineItem, quantity: number) => Promise<boolean>;
|
|
23
25
|
removeItem: (item: IkasOrderLineItem) => Promise<void>;
|
|
24
26
|
removeCardIfEmpty: () => void;
|
|
25
27
|
removeCart: () => void;
|