@ikas/storefront 0.0.158 → 0.0.159
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/__generated__/global-types.d.ts +44 -0
- package/build/api/checkout/__generated__/listPaymentGateway.d.ts +9 -1
- package/build/api/country/__generated__/listCountry.d.ts +1 -0
- package/build/api/country/index.d.ts +1 -1
- package/build/api/customer/__generated__/customerLogin.d.ts +2 -1
- package/build/api/customer/__generated__/getLastViewedProducts.d.ts +15 -0
- package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +11 -0
- package/build/api/customer/index.d.ts +13 -1
- package/build/components/checkout/components/address-form/index.d.ts +3 -0
- package/build/components/checkout/components/address-form/model.d.ts +9 -0
- package/build/components/checkout/components/form-item/model.d.ts +7 -0
- package/build/components/checkout/model.d.ts +1 -0
- package/build/index.es.js +1615 -663
- package/build/index.js +1615 -662
- package/build/models/data/category/index.d.ts +5 -0
- package/build/models/data/checkout/index.d.ts +3 -0
- package/build/models/data/order/line-item/index.d.ts +1 -0
- package/build/models/data/payment-gateway/index.d.ts +25 -2
- package/build/models/data/product/attribute-value/index.d.ts +4 -0
- package/build/models/theme/component/prop/index.d.ts +5 -1
- package/build/models/theme/custom-data/index.d.ts +10 -0
- package/build/models/theme/page/component/prop-value/attribute-list.d.ts +7 -0
- package/build/models/ui/product-list/index.d.ts +8 -5
- package/build/store/base.d.ts +0 -1
- package/build/store/customer.d.ts +19 -6
- package/build/utils/helper.d.ts +1 -0
- package/build/utils/providers/page-data.d.ts +7 -1
- package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
- package/build/utils/providers/prop-value/boolean.d.ts +1 -1
- package/build/utils/providers/prop-value/custom.d.ts +4 -0
- package/package.json +1 -1
|
@@ -22,6 +22,11 @@ export declare class IkasFilterCategory {
|
|
|
22
22
|
name: string;
|
|
23
23
|
slug?: string | null;
|
|
24
24
|
resultCount?: number | null;
|
|
25
|
+
private _isSelected;
|
|
25
26
|
constructor(data: Partial<IkasFilterCategory>);
|
|
27
|
+
get isSelected(): boolean;
|
|
26
28
|
get href(): string;
|
|
29
|
+
toJSON(): this & {
|
|
30
|
+
isSelected: boolean;
|
|
31
|
+
};
|
|
27
32
|
}
|
|
@@ -2,6 +2,7 @@ import { IkasOrderAddress } from "../order/address/index";
|
|
|
2
2
|
import { IkasOrderShippingLine } from "../order/shipping-line/index";
|
|
3
3
|
import { IkasCart } from "../cart/index";
|
|
4
4
|
import { IkasOrderAdjustment } from "../order/index";
|
|
5
|
+
import { IkasPaymentGateway } from "../payment-gateway/index";
|
|
5
6
|
export declare class IkasCheckout {
|
|
6
7
|
id?: string | null;
|
|
7
8
|
createdAt?: string | null;
|
|
@@ -27,12 +28,14 @@ export declare class IkasCheckout {
|
|
|
27
28
|
adjustments?: IkasOrderAdjustment[] | null;
|
|
28
29
|
note: string | null;
|
|
29
30
|
appliedCouponCode?: string | null;
|
|
31
|
+
selectedPaymentGateway?: IkasPaymentGateway | null;
|
|
30
32
|
constructor(data?: Partial<IkasCheckout>);
|
|
31
33
|
get shippingTotal(): number;
|
|
32
34
|
get hasCustomer(): boolean;
|
|
33
35
|
get hasValidCustomer(): boolean;
|
|
34
36
|
get customerText(): string;
|
|
35
37
|
get dateStr(): string;
|
|
38
|
+
get $totalFinalPrice(): number;
|
|
36
39
|
}
|
|
37
40
|
export declare type IkasCheckoutCustomer = {
|
|
38
41
|
id?: string;
|
|
@@ -17,6 +17,7 @@ export declare class IkasOrderLineItem {
|
|
|
17
17
|
variant: IkasOrderLineVariant;
|
|
18
18
|
status: OrderLineItemStatusEnum;
|
|
19
19
|
constructor(data: Partial<IkasOrderLineItem>);
|
|
20
|
+
get priceWithQuantity(): number;
|
|
20
21
|
get finalPriceWithQuantity(): number;
|
|
21
22
|
get tax(): number;
|
|
22
23
|
get refundQuantity(): number | null | undefined;
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import { IkasOrderShippingLine } from "../order/shipping-line/index";
|
|
2
|
+
export declare class IkasPaymentGateway {
|
|
2
3
|
paymentMethods: IkasPaymentMethod[];
|
|
3
4
|
paymentMethodType: IkasPaymentMethodType;
|
|
4
5
|
id: string | null;
|
|
5
6
|
name: string;
|
|
6
7
|
testMode: boolean | null;
|
|
7
8
|
description: string | null;
|
|
8
|
-
|
|
9
|
+
additionalPrices: IkasPaymentGatewayAdditionalPrice[] | null;
|
|
10
|
+
constructor(data: Partial<IkasPaymentGateway>);
|
|
11
|
+
getCalculatedAdditionalPrices(totalFinalPrice: number, shippingLines: IkasOrderShippingLine[] | null): {
|
|
12
|
+
name: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
type: IkasPaymentMethodAdditionalPriceType;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
}
|
|
9
17
|
export declare type IkasPaymentMethod = {
|
|
10
18
|
name: string;
|
|
11
19
|
logoUrl: string | null;
|
|
12
20
|
};
|
|
21
|
+
export declare class IkasPaymentGatewayAdditionalPrice {
|
|
22
|
+
amount: number;
|
|
23
|
+
amountType: IkasPaymentGatewayAdditionalPriceAmountType;
|
|
24
|
+
name: string;
|
|
25
|
+
type: IkasPaymentMethodAdditionalPriceType;
|
|
26
|
+
constructor(data: Partial<IkasPaymentGatewayAdditionalPrice>);
|
|
27
|
+
}
|
|
13
28
|
export declare enum IkasPaymentMethodType {
|
|
14
29
|
BUY_ONLINE_PAY_AT_STORE = "BUY_ONLINE_PAY_AT_STORE",
|
|
15
30
|
CASH = "CASH",
|
|
@@ -19,3 +34,11 @@ export declare enum IkasPaymentMethodType {
|
|
|
19
34
|
MONEY_ORDER = "MONEY_ORDER",
|
|
20
35
|
OTHER = "OTHER"
|
|
21
36
|
}
|
|
37
|
+
export declare enum IkasPaymentMethodAdditionalPriceType {
|
|
38
|
+
DECREMENT = "DECREMENT",
|
|
39
|
+
INCREMENT = "INCREMENT"
|
|
40
|
+
}
|
|
41
|
+
export declare enum IkasPaymentGatewayAdditionalPriceAmountType {
|
|
42
|
+
AMOUNT = "AMOUNT",
|
|
43
|
+
RATIO = "RATIO"
|
|
44
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IkasProductAttributeType } from "../../../data/product-attribute/index";
|
|
1
2
|
export declare class IkasThemeComponentProp {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
@@ -5,6 +6,7 @@ export declare class IkasThemeComponentProp {
|
|
|
5
6
|
type: IkasThemeComponentPropType;
|
|
6
7
|
isRequired: boolean;
|
|
7
8
|
customDataId?: string | null;
|
|
9
|
+
attributeTypes?: IkasProductAttributeType[] | null;
|
|
8
10
|
constructor(data: Partial<IkasThemeComponentProp>);
|
|
9
11
|
}
|
|
10
12
|
export declare enum IkasThemeComponentPropType {
|
|
@@ -18,6 +20,7 @@ export declare enum IkasThemeComponentPropType {
|
|
|
18
20
|
PRODUCT_DETAIL = "PRODUCT_DETAIL",
|
|
19
21
|
PRODUCT_LIST = "PRODUCT_LIST",
|
|
20
22
|
PRODUCT_ATTRIBUTE = "PRODUCT_ATTRIBUTE",
|
|
23
|
+
PRODUCT_ATTRIBUTE_LIST = "PRODUCT_ATTRIBUTE_LIST",
|
|
21
24
|
BRAND = "BRAND",
|
|
22
25
|
BRAND_LIST = "BRAND_LIST",
|
|
23
26
|
CATEGORY = "CATEGORY",
|
|
@@ -30,5 +33,6 @@ export declare enum IkasThemeComponentPropType {
|
|
|
30
33
|
BLOG_LIST = "BLOG_LIST",
|
|
31
34
|
OBJECT = "OBJECT",
|
|
32
35
|
STATIC_LIST = "STATIC_LIST",
|
|
33
|
-
DYNAMIC_LIST = "DYNAMIC_LIST"
|
|
36
|
+
DYNAMIC_LIST = "DYNAMIC_LIST",
|
|
37
|
+
ENUM = "ENUM"
|
|
34
38
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IkasProductAttributeType } from "../../data/product-attribute/index";
|
|
1
2
|
import { IkasThemeComponentPropType } from "../component/prop/index";
|
|
2
3
|
export declare class IkasThemeCustomData {
|
|
3
4
|
id: string;
|
|
@@ -7,8 +8,17 @@ export declare class IkasThemeCustomData {
|
|
|
7
8
|
key?: string | null;
|
|
8
9
|
nestedData?: IkasThemeCustomData[] | null;
|
|
9
10
|
itemCount?: number | null;
|
|
11
|
+
attributeTypes?: IkasProductAttributeType[] | null;
|
|
12
|
+
enumOptions?: IkasThemeEnumOption[] | null;
|
|
13
|
+
customDataId?: string | null;
|
|
10
14
|
isRoot: boolean;
|
|
11
15
|
parent?: IkasThemeCustomData | null;
|
|
12
16
|
constructor(data?: Partial<IkasThemeCustomData>);
|
|
13
17
|
toJSON(): this;
|
|
14
18
|
}
|
|
19
|
+
export declare class IkasThemeEnumOption {
|
|
20
|
+
id: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
value: string;
|
|
23
|
+
constructor(data?: Partial<IkasThemeEnumOption>);
|
|
24
|
+
}
|
|
@@ -12,6 +12,7 @@ export declare class IkasProductList {
|
|
|
12
12
|
private _sort;
|
|
13
13
|
private _limit;
|
|
14
14
|
private _page;
|
|
15
|
+
private _infiniteScrollPage;
|
|
15
16
|
private _count;
|
|
16
17
|
private _searchKeyword;
|
|
17
18
|
private _initialized;
|
|
@@ -35,10 +36,11 @@ export declare class IkasProductList {
|
|
|
35
36
|
set searchKeyword(value: string);
|
|
36
37
|
get isInitialized(): boolean;
|
|
37
38
|
get isFilterable(): boolean;
|
|
38
|
-
get isFiltered(): boolean;
|
|
39
|
+
get isFiltered(): boolean | undefined;
|
|
39
40
|
get isStatic(): boolean;
|
|
40
41
|
get isDiscounted(): boolean;
|
|
41
42
|
get isRecommended(): boolean;
|
|
43
|
+
get isLastViewed(): boolean;
|
|
42
44
|
get isSearch(): boolean;
|
|
43
45
|
get hasPrev(): boolean;
|
|
44
46
|
get hasNext(): boolean;
|
|
@@ -59,7 +61,6 @@ export declare class IkasProductList {
|
|
|
59
61
|
getPage: (page: number) => Promise<void>;
|
|
60
62
|
setSortType(sortType: IkasProductListSortType): Promise<void>;
|
|
61
63
|
onFilterCategoryClick(filterCategory: IkasFilterCategory, disableRoute?: boolean): Promise<void>;
|
|
62
|
-
setVisibleInfiniteScrollPage(page: number): void;
|
|
63
64
|
toJSON(): {
|
|
64
65
|
data: IkasProductDetail[];
|
|
65
66
|
type: IkasProductListType;
|
|
@@ -78,10 +79,11 @@ export declare class IkasProductList {
|
|
|
78
79
|
recommendFor: string | null | undefined;
|
|
79
80
|
productListPropValue: IkasProductListPropValue;
|
|
80
81
|
};
|
|
81
|
-
|
|
82
|
-
private
|
|
82
|
+
setVisibleInfiniteScrollPage: (page: number) => void;
|
|
83
|
+
private restoreInfiniteScrollPage;
|
|
83
84
|
private getQueryParams;
|
|
84
85
|
private isBrowser;
|
|
86
|
+
private waitForCustomerStoreInit;
|
|
85
87
|
private searchDebouncer;
|
|
86
88
|
private analyticsDebouncer;
|
|
87
89
|
}
|
|
@@ -109,7 +111,8 @@ export declare enum IkasProductListType {
|
|
|
109
111
|
DISCOUNTED = "DISCOUNTED",
|
|
110
112
|
RECOMMENDED = "RECOMMENDED",
|
|
111
113
|
CATEGORY = "CATEGORY",
|
|
112
|
-
SEARCH = "SEARCH"
|
|
114
|
+
SEARCH = "SEARCH",
|
|
115
|
+
LAST_VIEWED = "LAST_VIEWED"
|
|
113
116
|
}
|
|
114
117
|
export declare enum IkasProductListSortType {
|
|
115
118
|
INCREASING_PRICE = "INCREASING_PRICE",
|
package/build/store/base.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare class IkasBaseStore {
|
|
|
10
10
|
showLocaleOptions: boolean;
|
|
11
11
|
private localeChecked;
|
|
12
12
|
private settingsSet;
|
|
13
|
-
private infiniteScrollPages;
|
|
14
13
|
constructor();
|
|
15
14
|
checkLocalization(): Promise<void>;
|
|
16
15
|
setLocalization(localeOption: IkasLocaleOption): void;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { IkasCustomer, IkasFavoriteProduct, IkasOrderTransaction, IkasProduct } from "../models/index";
|
|
2
2
|
import { IkasBaseStore } from "./base";
|
|
3
|
-
declare type SaveContactForm = {
|
|
4
|
-
firstName: string;
|
|
5
|
-
lastName: string;
|
|
6
|
-
email: string;
|
|
7
|
-
message: string;
|
|
8
|
-
};
|
|
9
3
|
export declare class IkasCustomerStore {
|
|
10
4
|
customer?: IkasCustomer | null;
|
|
11
5
|
token?: string | null;
|
|
@@ -13,9 +7,12 @@ export declare class IkasCustomerStore {
|
|
|
13
7
|
private baseStore?;
|
|
14
8
|
private _initialized;
|
|
15
9
|
private _visitorSubscribedEmail;
|
|
10
|
+
private _lastViewedProducts;
|
|
11
|
+
private _customerConsentGranted;
|
|
16
12
|
constructor(baseStore?: IkasBaseStore);
|
|
17
13
|
get initialized(): boolean;
|
|
18
14
|
get canCreateEmailSubscription(): boolean;
|
|
15
|
+
get customerConsentGranted(): boolean;
|
|
19
16
|
login: (email: string, password: string) => Promise<boolean>;
|
|
20
17
|
register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
|
|
21
18
|
saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
|
|
@@ -37,13 +34,29 @@ export declare class IkasCustomerStore {
|
|
|
37
34
|
removeItemFromFavorite: (productId: string) => Promise<boolean>;
|
|
38
35
|
isProductFavorite: (productId: string) => Promise<boolean>;
|
|
39
36
|
createEmailSubscription: (email: string) => Promise<boolean>;
|
|
37
|
+
onCustomerConsentGrant: () => void;
|
|
40
38
|
private init;
|
|
41
39
|
private getCustomer;
|
|
42
40
|
private refreshToken;
|
|
43
41
|
private setCustomer;
|
|
44
42
|
private loadCustomer;
|
|
43
|
+
private getLastViewedProducts;
|
|
44
|
+
private saveLastViewedProducts;
|
|
45
|
+
private loadLastViewedProducts;
|
|
46
|
+
private removeLastViewedProducts;
|
|
47
|
+
private onProductView;
|
|
48
|
+
private saveLocalLastViewedProducts;
|
|
49
|
+
private saveCustomerConsent;
|
|
50
|
+
private loadCustomerConsent;
|
|
51
|
+
private removeCustomerConsent;
|
|
45
52
|
private setToken;
|
|
46
53
|
private loadToken;
|
|
47
54
|
private clearLocalData;
|
|
48
55
|
}
|
|
56
|
+
declare type SaveContactForm = {
|
|
57
|
+
firstName: string;
|
|
58
|
+
lastName: string;
|
|
59
|
+
email: string;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
49
62
|
export {};
|
package/build/utils/helper.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare const stringToSlug: (str: string) => string;
|
|
|
2
2
|
export declare const validatePhoneNumber: (str: string) => boolean;
|
|
3
3
|
export declare const pascalCase: (str: string) => string;
|
|
4
4
|
export declare const decodeBase64: (base64: string) => string;
|
|
5
|
+
export declare function stringSorter(atitle: string, btitle: string): number;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { NextRouter } from "next/router";
|
|
2
|
-
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasProductDetail, IkasThemeComponentProp, IkasThemeComponent, IkasProductList, IkasBrandList, IkasBrandListParams, IkasThemePage, IkasImage, IkasCategoryList, IkasBrand, IkasCategory, IkasThemeCustomData, IkasMerchantSettings, IkasThemeSettings, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasProductAttributeValue } from "../../models/index";
|
|
2
|
+
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasProductDetail, IkasThemeComponentProp, IkasThemeComponent, IkasProductList, IkasBrandList, IkasBrandListParams, IkasThemePage, IkasImage, IkasCategoryList, IkasBrand, IkasCategory, IkasThemeCustomData, IkasMerchantSettings, IkasThemeSettings, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasProductAttributeValue, IkasProductAttribute } from "../../models/index";
|
|
3
3
|
import { IkasProductListParams } from "../../models/ui/product-list/index";
|
|
4
4
|
import { IkasNavigationLink } from "../../models/ui/navigation-link/index";
|
|
5
5
|
import { IkasCategoryListParams } from "../../models/ui/category-list/index";
|
|
6
6
|
import { CustomDataValue } from "./prop-value/custom";
|
|
7
7
|
import { IkasThemePageSpecification } from "../../models/theme/page/index";
|
|
8
8
|
import { IkasBlog } from "../../models/data/blog/index";
|
|
9
|
+
import { IkasProductAttributeMap } from "../../models/data/product/attribute-value/index";
|
|
9
10
|
export declare class IkasPageDataProvider {
|
|
10
11
|
theme: IkasTheme;
|
|
11
12
|
pageType?: IkasThemePageType | null;
|
|
@@ -63,6 +64,11 @@ export declare class IkasPageDataProvider {
|
|
|
63
64
|
static _initProductDetailPropValue(propValue: any, router: NextRouter, isBrowser?: boolean): IkasProductDetail;
|
|
64
65
|
static initAttributePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
65
66
|
static _initAttributePropValue(propValue: IkasProductAttributeValue[]): IkasProductAttributeValue[];
|
|
67
|
+
static initAttributeListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
68
|
+
static _initAttributeListPropValue(propValue: IkasProductAttributeMap[]): {
|
|
69
|
+
attribute: IkasProductAttribute;
|
|
70
|
+
values: IkasProductAttributeValue[];
|
|
71
|
+
}[];
|
|
66
72
|
static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
67
73
|
static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
|
|
68
74
|
static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import IkasPropValueProvider from "./index";
|
|
2
|
+
import { IkasAttributeListPropValue } from "../../../models/theme/page/component/prop-value/attribute-list";
|
|
3
|
+
import { IkasProductAttributeMap } from "../../../models/data/product/attribute-value/index";
|
|
4
|
+
export declare class IkasAttributeListPropValueProvider implements IkasPropValueProvider<IkasProductAttributeMap[]> {
|
|
5
|
+
private attributeListPropValue;
|
|
6
|
+
private pageSpecificData?;
|
|
7
|
+
constructor(prop: IkasAttributeListPropValue, pageSpecificData?: any);
|
|
8
|
+
getValue(): Promise<IkasProductAttributeMap[]>;
|
|
9
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import IkasPropValueProvider from "./index";
|
|
2
2
|
export declare class IkasBooleanPropValueProvider implements IkasPropValueProvider<boolean> {
|
|
3
3
|
private bool;
|
|
4
|
-
constructor(
|
|
4
|
+
constructor(boolPropValue: boolean);
|
|
5
5
|
getValue(): Promise<boolean>;
|
|
6
6
|
}
|
|
@@ -23,9 +23,13 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
|
|
|
23
23
|
private getLinkPropValue;
|
|
24
24
|
private getProductDetailPropValue;
|
|
25
25
|
private getProductListPropValue;
|
|
26
|
+
private getProductAttributePropValue;
|
|
27
|
+
private getProductAttributeListPropValue;
|
|
26
28
|
private getTextValue;
|
|
27
29
|
private getObjectValue;
|
|
28
30
|
private getArrayValue;
|
|
31
|
+
private getEnumValue;
|
|
32
|
+
private getCustomDataValue;
|
|
29
33
|
private getComponentListValue;
|
|
30
34
|
private getBlogValue;
|
|
31
35
|
private getBlogListValue;
|