@ikas/storefront 0.0.43 → 0.0.45
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/index.es.js +569 -19
- package/build/index.js +568 -18
- package/build/models/theme/component/prop/index.d.ts +3 -1
- package/build/models/theme/custom-data/index.d.ts +32 -0
- package/build/models/theme/index.d.ts +1 -0
- package/build/models/theme/theme.d.ts +2 -0
- package/build/utils/providers/page-data.d.ts +16 -1
- package/build/utils/providers/prop-value/custom.d.ts +30 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ export declare class IkasThemeComponentProp {
|
|
|
4
4
|
displayName: string;
|
|
5
5
|
type: IkasThemeComponentPropType;
|
|
6
6
|
isRequired: boolean;
|
|
7
|
+
customDataId?: string | null;
|
|
7
8
|
constructor(data: Partial<IkasThemeComponentProp>);
|
|
8
9
|
}
|
|
9
10
|
export declare enum IkasThemeComponentPropType {
|
|
@@ -19,5 +20,6 @@ export declare enum IkasThemeComponentPropType {
|
|
|
19
20
|
BRAND_LIST = "BRAND_LIST",
|
|
20
21
|
CATEGORY = "CATEGORY",
|
|
21
22
|
CATEGORY_LIST = "CATEGORY_LIST",
|
|
22
|
-
COLOR = "COLOR"
|
|
23
|
+
COLOR = "COLOR",
|
|
24
|
+
CUSTOM = "CUSTOM"
|
|
23
25
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare class IkasThemeCustomData {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string | null;
|
|
4
|
+
type: IkasThemeCustomDataType;
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
key?: string | null;
|
|
7
|
+
nestedData?: IkasThemeCustomData[] | null;
|
|
8
|
+
itemCount?: number | null;
|
|
9
|
+
isRoot: boolean;
|
|
10
|
+
parent?: IkasThemeCustomData | null;
|
|
11
|
+
constructor(data?: Partial<IkasThemeCustomData>);
|
|
12
|
+
toJSON(): this;
|
|
13
|
+
}
|
|
14
|
+
export declare enum IkasThemeCustomDataType {
|
|
15
|
+
TEXT = "TEXT",
|
|
16
|
+
NUMBER = "NUMBER",
|
|
17
|
+
BOOLEAN = "BOOLEAN",
|
|
18
|
+
IMAGE = "IMAGE",
|
|
19
|
+
IMAGE_LIST = "IMAGE_LIST",
|
|
20
|
+
LINK = "LINK",
|
|
21
|
+
LIST_OF_LINK = "LIST_OF_LINK",
|
|
22
|
+
PRODUCT_DETAIL = "PRODUCT_DETAIL",
|
|
23
|
+
PRODUCT_LIST = "PRODUCT_LIST",
|
|
24
|
+
BRAND = "BRAND",
|
|
25
|
+
BRAND_LIST = "BRAND_LIST",
|
|
26
|
+
CATEGORY = "CATEGORY",
|
|
27
|
+
CATEGORY_LIST = "CATEGORY_LIST",
|
|
28
|
+
COLOR = "COLOR",
|
|
29
|
+
OBJECT = "OBJECT",
|
|
30
|
+
STATIC_LIST = "STATIC_LIST",
|
|
31
|
+
DYNAMIC_LIST = "DYNAMIC_LIST"
|
|
32
|
+
}
|
|
@@ -11,3 +11,4 @@ export { IkasProductDetailPropValue } from "./page/component/prop-value/product-
|
|
|
11
11
|
export { IkasCategoryPropValue } from "./page/component/prop-value/category";
|
|
12
12
|
export { IkasCategoryListPropValue } from "./page/component/prop-value/category-list";
|
|
13
13
|
export { IkasThemeSettings } from "./settings/index";
|
|
14
|
+
export { IkasThemeCustomData, IkasThemeCustomDataType } from "./custom-data/index";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IkasThemeComponent } from "./component/index";
|
|
2
|
+
import { IkasThemeCustomData } from "./custom-data/index";
|
|
2
3
|
import { IkasThemePage } from "./page/index";
|
|
3
4
|
import { IkasThemeSettings } from "./settings/index";
|
|
4
5
|
export declare class IkasTheme {
|
|
@@ -6,6 +7,7 @@ export declare class IkasTheme {
|
|
|
6
7
|
components: IkasThemeComponent[];
|
|
7
8
|
pages: IkasThemePage[];
|
|
8
9
|
settings: IkasThemeSettings;
|
|
10
|
+
customData: IkasThemeCustomData[];
|
|
9
11
|
constructor(data?: Partial<IkasTheme>);
|
|
10
12
|
get headerComponent(): IkasThemeComponent | undefined;
|
|
11
13
|
get footerComponent(): IkasThemeComponent | undefined;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { NextRouter } from "next/router";
|
|
2
|
-
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasThemeComponentProp, IkasThemeComponent, IkasThemePage } from "../../models/index";
|
|
2
|
+
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasProductDetail, IkasThemeComponentProp, IkasThemeComponent, IkasProductList, IkasBrandList, IkasBrandListParams, IkasThemePage, IkasImage, IkasCategoryList, IkasBrand, IkasCategory, IkasThemeCustomData } from "../../models/index";
|
|
3
|
+
import { IkasProductListParams } from "../../models/ui/product-list/index";
|
|
4
|
+
import { IkasNavigationLink } from "../../models/ui/navigation-link/index";
|
|
5
|
+
import { IkasCategoryListParams } from "../../models/ui/category-list/index";
|
|
6
|
+
import { CustomDataValue } from "./prop-value/custom";
|
|
3
7
|
export declare class IkasPageDataProvider {
|
|
4
8
|
theme: IkasTheme;
|
|
5
9
|
pageType?: IkasThemePageType | null;
|
|
@@ -25,14 +29,25 @@ export declare class IkasPageDataProvider {
|
|
|
25
29
|
static isServer(): boolean;
|
|
26
30
|
static initPropValues(propValuesStr: string, router: NextRouter, isBrowser?: boolean): IkasPageComponentPropValue[];
|
|
27
31
|
static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
32
|
+
static _initBrandPropValue(propValue: IkasBrand): IkasBrand;
|
|
28
33
|
static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
34
|
+
static _initBrandListPropValue(propValue: IkasBrandListParams): IkasBrandList;
|
|
29
35
|
static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
36
|
+
static _initCategoryPropValue(propValue: IkasCategory): IkasCategory;
|
|
30
37
|
static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
38
|
+
static _initCategoryListPropValue(propValue: IkasCategoryListParams): IkasCategoryList;
|
|
31
39
|
static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
40
|
+
static _initProductListPropValue(propValue: IkasProductListParams): IkasProductList;
|
|
32
41
|
static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
|
|
42
|
+
static _initProductDetailPropValue(propValue: any, router: NextRouter, isBrowser?: boolean): IkasProductDetail;
|
|
33
43
|
static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
44
|
+
static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
|
|
34
45
|
static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
46
|
+
static _initImagePropValue(propValue: any): IkasImage;
|
|
35
47
|
static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
48
|
+
static _initImageListPropValue(propValue: any): IkasImage[];
|
|
49
|
+
static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
|
|
50
|
+
static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, isBrowser?: boolean): any;
|
|
36
51
|
}
|
|
37
52
|
export declare class IkasPageComponentPropValue {
|
|
38
53
|
pageComponent: IkasThemePageComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IkasTheme, IkasThemeCustomData, IkasThemePageType } from "../../../models/index";
|
|
2
|
+
import IkasPropValueProvider from "./index";
|
|
3
|
+
export declare class IkasCustomPropValueProvider implements IkasPropValueProvider<CustomDataValue | undefined> {
|
|
4
|
+
private value;
|
|
5
|
+
private customData;
|
|
6
|
+
private theme;
|
|
7
|
+
private pageType;
|
|
8
|
+
private pageSpecificData?;
|
|
9
|
+
private pageParams?;
|
|
10
|
+
constructor(value: any, customData: IkasThemeCustomData, theme: IkasTheme, pageType: IkasThemePageType, pageSpecificData?: any, pageParams?: Record<string, any>);
|
|
11
|
+
getValue(): Promise<CustomDataValue | undefined>;
|
|
12
|
+
private getBooleanValue;
|
|
13
|
+
private getBrandListPropValue;
|
|
14
|
+
private getBrandPropValue;
|
|
15
|
+
private getCategoryListPropValue;
|
|
16
|
+
private getCategoryPropValue;
|
|
17
|
+
private getColorPropValue;
|
|
18
|
+
private getImageListPropValue;
|
|
19
|
+
private getImagePropValue;
|
|
20
|
+
private getLinkPropValue;
|
|
21
|
+
private getProductDetailPropValue;
|
|
22
|
+
private getProductListPropValue;
|
|
23
|
+
private getTextValue;
|
|
24
|
+
private getObjectValue;
|
|
25
|
+
private getArrayValue;
|
|
26
|
+
}
|
|
27
|
+
export declare type CustomDataValue = {
|
|
28
|
+
value: any;
|
|
29
|
+
customData: IkasThemeCustomData;
|
|
30
|
+
};
|