@ikas/storefront 0.0.161 → 0.0.162-alpha.10
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 +13 -0
- package/build/api/brand/__generated__/listProductBrand.d.ts +2 -1
- package/build/api/category/__generated__/listCategory.d.ts +2 -1
- package/build/components/page-editor/model.d.ts +2 -0
- package/build/index.es.js +477 -214
- package/build/index.js +481 -215
- package/build/models/data/brand/index.d.ts +2 -0
- package/build/models/data/category/index.d.ts +11 -0
- package/build/models/ui/product-list/index.d.ts +9 -2
- package/build/pages/editor.d.ts +5 -4
- package/build/storefront/index.d.ts +2 -0
- package/build/utils/helper.d.ts +1 -0
- package/build/utils/i18n.d.ts +13 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/providers/page-data.d.ts +1 -0
- package/build/utils/settings.d.ts +18 -30
- package/package.json +1 -3
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { IkasImage } from "../image/index";
|
|
2
2
|
import { IkasHTMLMetaData } from "../html-meta-data/index";
|
|
3
|
+
import { ModelOrder } from "../category/index";
|
|
3
4
|
export declare class IkasBrand {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
6
7
|
metaData?: IkasHTMLMetaData | null;
|
|
7
8
|
image?: IkasImage | null;
|
|
9
|
+
orderType: ModelOrder | null;
|
|
8
10
|
constructor(data?: Partial<IkasBrand>);
|
|
9
11
|
get href(): string;
|
|
10
12
|
}
|
|
@@ -7,6 +7,7 @@ export declare class IkasCategory {
|
|
|
7
7
|
metaData?: IkasHTMLMetaData | null;
|
|
8
8
|
image?: IkasImage | null;
|
|
9
9
|
path: IkasCategoryPath[];
|
|
10
|
+
orderType: ModelOrder | null;
|
|
10
11
|
constructor(data?: Partial<IkasCategory>);
|
|
11
12
|
get href(): string;
|
|
12
13
|
}
|
|
@@ -30,3 +31,13 @@ export declare class IkasFilterCategory {
|
|
|
30
31
|
isSelected: boolean;
|
|
31
32
|
};
|
|
32
33
|
}
|
|
34
|
+
export declare enum ModelOrder {
|
|
35
|
+
BEST_SELLER = "BEST_SELLER",
|
|
36
|
+
HIGHEST_DISCOUNT_RATIO = "HIGHEST_DISCOUNT_RATIO",
|
|
37
|
+
HIGHEST_PRICE = "HIGHEST_PRICE",
|
|
38
|
+
LOWEST_DISCOUNT_RATIO = "LOWEST_DISCOUNT_RATIO",
|
|
39
|
+
LOWEST_PRICE = "LOWEST_PRICE",
|
|
40
|
+
MANUALLY = "MANUALLY",
|
|
41
|
+
NEWEST = "NEWEST",
|
|
42
|
+
OLDEST = "OLDEST"
|
|
43
|
+
}
|
|
@@ -2,7 +2,8 @@ import { IkasProductListPropValue, IkasThemePageType } from "../../theme/index";
|
|
|
2
2
|
import { IkasProductDetail } from "../product-detail/index";
|
|
3
3
|
import { IkasProductFilter } from "../../data/product-filter/index";
|
|
4
4
|
import { NextRouter } from "next/router";
|
|
5
|
-
import { IkasFilterCategory } from "../../data/category/index";
|
|
5
|
+
import { IkasCategory, IkasFilterCategory } from "../../data/category/index";
|
|
6
|
+
import { IkasBrand } from "../../data/index";
|
|
6
7
|
export declare class IkasProductList {
|
|
7
8
|
data: IkasProductDetail[];
|
|
8
9
|
filters?: IkasProductFilter[] | null;
|
|
@@ -20,6 +21,7 @@ export declare class IkasProductList {
|
|
|
20
21
|
private _productListPropValue;
|
|
21
22
|
private _filterBrandId?;
|
|
22
23
|
private _filterCategoryId?;
|
|
24
|
+
private pageSpecificData?;
|
|
23
25
|
private _recommendFor?;
|
|
24
26
|
private _isLoading;
|
|
25
27
|
private _fetchRequestTime;
|
|
@@ -48,6 +50,8 @@ export declare class IkasProductList {
|
|
|
48
50
|
get filterQueryParams(): string;
|
|
49
51
|
get filterCategories(): IkasFilterCategory[] | undefined;
|
|
50
52
|
get hasAppliedfilter(): boolean | undefined;
|
|
53
|
+
get isFeaturedSortEnabled(): boolean;
|
|
54
|
+
private setPageSpecificSort;
|
|
51
55
|
private getSortParams;
|
|
52
56
|
private searchProducts;
|
|
53
57
|
private getFilters;
|
|
@@ -78,6 +82,7 @@ export declare class IkasProductList {
|
|
|
78
82
|
filters: IkasProductFilter[] | null | undefined;
|
|
79
83
|
recommendFor: string | null | undefined;
|
|
80
84
|
productListPropValue: IkasProductListPropValue;
|
|
85
|
+
pageSpecificData: IkasCategory | IkasBrand | null | undefined;
|
|
81
86
|
};
|
|
82
87
|
setVisibleInfiniteScrollPage: (page: number) => void;
|
|
83
88
|
private restoreInfiniteScrollPage;
|
|
@@ -104,6 +109,7 @@ export declare type IkasProductListParams = {
|
|
|
104
109
|
filterCategories?: IkasFilterCategory[];
|
|
105
110
|
recommendFor?: string;
|
|
106
111
|
productListPropValue: IkasProductListPropValue;
|
|
112
|
+
pageSpecificData?: IkasCategory | IkasBrand | null;
|
|
107
113
|
};
|
|
108
114
|
export declare enum IkasProductListType {
|
|
109
115
|
ALL = "ALL",
|
|
@@ -120,5 +126,6 @@ export declare enum IkasProductListSortType {
|
|
|
120
126
|
LAST_ADDED = "LAST_ADDED",
|
|
121
127
|
FIRST_ADDED = "FIRST_ADDED",
|
|
122
128
|
INCREASING_DISCOUNT = "INCREASING_DISCOUNT",
|
|
123
|
-
DECRASING_DISCOUNT = "DECRASING_DISCOUNT"
|
|
129
|
+
DECRASING_DISCOUNT = "DECRASING_DISCOUNT",
|
|
130
|
+
FEATURED = "FEATURED"
|
|
124
131
|
}
|
package/build/pages/editor.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { GetStaticProps } from "next";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
displayName: string;
|
|
3
|
+
declare type Props = {
|
|
4
|
+
configJson: Record<string, any>;
|
|
6
5
|
};
|
|
6
|
+
export declare const getStaticProps: GetStaticProps;
|
|
7
|
+
declare const _default: React.FunctionComponent<Props>;
|
|
7
8
|
export default _default;
|
|
@@ -20,6 +20,7 @@ export declare class IkasStorefrontConfig {
|
|
|
20
20
|
static fbpId?: string;
|
|
21
21
|
static favicon: IkasThemeFavicon;
|
|
22
22
|
static stockPreference: IkasThemeStockPreference;
|
|
23
|
+
static translations: Record<string, any>;
|
|
23
24
|
static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
|
|
24
25
|
static initWithJson(json: Record<string, any>): void;
|
|
25
26
|
static getJson(): {
|
|
@@ -35,5 +36,6 @@ export declare class IkasStorefrontConfig {
|
|
|
35
36
|
fbpId: string | null;
|
|
36
37
|
favicon: any;
|
|
37
38
|
stockPreference: IkasThemeStockPreference;
|
|
39
|
+
translations: Record<string, any>;
|
|
38
40
|
};
|
|
39
41
|
}
|
package/build/utils/helper.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ 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
5
|
export declare function stringSorter(atitle: string, btitle: string): number;
|
|
6
|
+
export declare function findAllIndexes(str: string, pattern: string): number[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class I18NFileReader {
|
|
2
|
+
locale: string;
|
|
3
|
+
namespaces: string[];
|
|
4
|
+
localePath?: string;
|
|
5
|
+
constructor(locale: string, namespaces: string[], localePath?: string);
|
|
6
|
+
read(): Promise<Record<string, any>>;
|
|
7
|
+
private readLocaleFile;
|
|
8
|
+
}
|
|
9
|
+
declare function t(pathString: string, params?: Record<string, any>): any;
|
|
10
|
+
export declare function useTranslation(namespace?: string | string[]): {
|
|
11
|
+
t: typeof t;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
package/build/utils/index.d.ts
CHANGED
|
@@ -36,11 +36,7 @@ export declare class SettingsHelper {
|
|
|
36
36
|
fbpId: string | null;
|
|
37
37
|
favicon: any;
|
|
38
38
|
stockPreference: IkasThemeStockPreference;
|
|
39
|
-
|
|
40
|
-
_nextI18Next: {
|
|
41
|
-
initialI18nStore: any;
|
|
42
|
-
initialLocale: string;
|
|
43
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
39
|
+
translations: Record<string, any>;
|
|
44
40
|
};
|
|
45
41
|
};
|
|
46
42
|
notFound?: undefined;
|
|
@@ -65,15 +61,15 @@ export declare class SettingsHelper {
|
|
|
65
61
|
fbpId: string | null;
|
|
66
62
|
favicon: any;
|
|
67
63
|
stockPreference: IkasThemeStockPreference;
|
|
68
|
-
|
|
69
|
-
_nextI18Next: {
|
|
70
|
-
initialI18nStore: any;
|
|
71
|
-
initialLocale: string;
|
|
72
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
64
|
+
translations: Record<string, any>;
|
|
73
65
|
};
|
|
74
66
|
};
|
|
75
67
|
revalidate: number;
|
|
76
68
|
notFound?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
props: {};
|
|
71
|
+
notFound?: undefined;
|
|
72
|
+
revalidate?: undefined;
|
|
77
73
|
}>;
|
|
78
74
|
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
|
|
79
75
|
props: {};
|
|
@@ -99,11 +95,7 @@ export declare class SettingsHelper {
|
|
|
99
95
|
fbpId: string | null;
|
|
100
96
|
favicon: any;
|
|
101
97
|
stockPreference: IkasThemeStockPreference;
|
|
102
|
-
|
|
103
|
-
_nextI18Next: {
|
|
104
|
-
initialI18nStore: any;
|
|
105
|
-
initialLocale: string;
|
|
106
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
98
|
+
translations: Record<string, any>;
|
|
107
99
|
};
|
|
108
100
|
};
|
|
109
101
|
notFound?: undefined;
|
|
@@ -128,15 +120,15 @@ export declare class SettingsHelper {
|
|
|
128
120
|
fbpId: string | null;
|
|
129
121
|
favicon: any;
|
|
130
122
|
stockPreference: IkasThemeStockPreference;
|
|
131
|
-
|
|
132
|
-
_nextI18Next: {
|
|
133
|
-
initialI18nStore: any;
|
|
134
|
-
initialLocale: string;
|
|
135
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
123
|
+
translations: Record<string, any>;
|
|
136
124
|
};
|
|
137
125
|
};
|
|
138
126
|
revalidate: number;
|
|
139
127
|
notFound?: undefined;
|
|
128
|
+
} | {
|
|
129
|
+
props: {};
|
|
130
|
+
notFound?: undefined;
|
|
131
|
+
revalidate?: undefined;
|
|
140
132
|
}>;
|
|
141
133
|
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemePageType): Promise<{
|
|
142
134
|
props: {};
|
|
@@ -162,11 +154,7 @@ export declare class SettingsHelper {
|
|
|
162
154
|
fbpId: string | null;
|
|
163
155
|
favicon: any;
|
|
164
156
|
stockPreference: IkasThemeStockPreference;
|
|
165
|
-
|
|
166
|
-
_nextI18Next: {
|
|
167
|
-
initialI18nStore: any;
|
|
168
|
-
initialLocale: string;
|
|
169
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
157
|
+
translations: Record<string, any>;
|
|
170
158
|
};
|
|
171
159
|
};
|
|
172
160
|
notFound?: undefined;
|
|
@@ -191,15 +179,15 @@ export declare class SettingsHelper {
|
|
|
191
179
|
fbpId: string | null;
|
|
192
180
|
favicon: any;
|
|
193
181
|
stockPreference: IkasThemeStockPreference;
|
|
194
|
-
|
|
195
|
-
_nextI18Next: {
|
|
196
|
-
initialI18nStore: any;
|
|
197
|
-
initialLocale: string;
|
|
198
|
-
userConfig: import("next-i18next").UserConfig | null;
|
|
182
|
+
translations: Record<string, any>;
|
|
199
183
|
};
|
|
200
184
|
};
|
|
201
185
|
revalidate: number;
|
|
202
186
|
notFound?: undefined;
|
|
187
|
+
} | {
|
|
188
|
+
props: {};
|
|
189
|
+
notFound?: undefined;
|
|
190
|
+
revalidate?: undefined;
|
|
203
191
|
}>;
|
|
204
192
|
}
|
|
205
193
|
export declare type SettingsData = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.162-alpha.10",
|
|
4
4
|
"main": "./build/index.js",
|
|
5
5
|
"module": "./build/index.es.js",
|
|
6
6
|
"author": "Umut Ozan Yıldırım",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"mobx": "^6.1.3",
|
|
20
20
|
"mobx-react-lite": "^3.1.5",
|
|
21
21
|
"next": "10.0.6",
|
|
22
|
-
"next-i18next": "^8.5.5",
|
|
23
22
|
"react": "17.0.1",
|
|
24
23
|
"react-dom": "17.0.1"
|
|
25
24
|
},
|
|
@@ -71,7 +70,6 @@
|
|
|
71
70
|
"mobx": "^6.1.3",
|
|
72
71
|
"mobx-react-lite": "^3.1.5",
|
|
73
72
|
"next": "10.0.6",
|
|
74
|
-
"next-i18next": "^8.5.5",
|
|
75
73
|
"node-sass": "^5.0.0",
|
|
76
74
|
"postcss": "^8.2.4",
|
|
77
75
|
"prettier": "^2.2.1",
|