@ikas/storefront 0.0.16-0.alpha-1 → 0.0.17

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.
Files changed (196) hide show
  1. package/build/__generated__/global-types.d.ts +8 -214
  2. package/build/api/brand/__generated__/listProductBrand.d.ts +2 -3
  3. package/build/api/brand/index.d.ts +0 -1
  4. package/build/api/cart/__generated__/getCart.d.ts +3 -7
  5. package/build/api/cart/__generated__/saveItemToCart.d.ts +3 -6
  6. package/build/api/category/__generated__/listCategory.d.ts +2 -4
  7. package/build/api/category/index.d.ts +0 -3
  8. package/build/api/checkout/__generated__/checkStocks.d.ts +3 -3
  9. package/build/api/checkout/__generated__/getCheckoutByCartId.d.ts +1 -1
  10. package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -5
  11. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +2 -14
  12. package/build/api/checkout/__generated__/saveCheckout.d.ts +1 -1
  13. package/build/api/checkout/index.d.ts +3 -11
  14. package/build/api/city/__generated__/listCity.d.ts +1 -1
  15. package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +0 -3
  16. package/build/api/country/__generated__/listCountry.d.ts +1 -8
  17. package/build/api/country/index.d.ts +2 -3
  18. package/build/api/customer/__generated__/customerLogin.d.ts +3 -5
  19. package/build/api/customer/__generated__/getCustomerOrders.d.ts +4 -3
  20. package/build/api/customer/__generated__/getMyCustomer.d.ts +2 -3
  21. package/build/api/customer/__generated__/listOrderTransactions.d.ts +1 -1
  22. package/build/api/customer/__generated__/registerCustomer.d.ts +2 -2
  23. package/build/api/customer/__generated__/saveMyCustomer.d.ts +2 -3
  24. package/build/api/customer/index.d.ts +0 -15
  25. package/build/api/district/__generated__/listDistrict.d.ts +1 -1
  26. package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +1 -2
  27. package/build/api/html-meta-data/index.d.ts +1 -1
  28. package/build/api/index.d.ts +3 -4
  29. package/build/api/merchant/__generated__/listMerchantSettings.d.ts +1 -1
  30. package/build/api/product/__generated__/listProduct.d.ts +91 -0
  31. package/build/api/product/index.d.ts +15 -0
  32. package/build/api/product-attribute/__generated__/listProductAttribute.d.ts +2 -2
  33. package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +13 -0
  34. package/build/api/product-stock-location/index.d.ts +4 -0
  35. package/build/api/state/__generated__/listState.d.ts +1 -1
  36. package/build/api/stock-location/__generated__/listStockLocation.d.ts +1 -1
  37. package/build/api/storefront/__generated__/getStorefront.d.ts +12 -41
  38. package/build/api/storefront/index.d.ts +1 -1
  39. package/build/api/theme/index.d.ts +4 -0
  40. package/build/api/variant-type/__generated__/listVariantType.d.ts +2 -2
  41. package/build/components/checkout/components/address-form/index.d.ts +0 -3
  42. package/build/components/checkout/components/address-form/model.d.ts +0 -11
  43. package/build/components/checkout/components/button/index.d.ts +1 -4
  44. package/build/components/checkout/components/checkbox/index.d.ts +1 -2
  45. package/build/components/checkout/components/error-container/payment-error/index.d.ts +0 -2
  46. package/build/components/checkout/components/form-item/model.d.ts +2 -11
  47. package/build/components/checkout/index.d.ts +0 -5
  48. package/build/components/checkout/model.d.ts +5 -18
  49. package/build/components/gtm/functions.d.ts +164 -0
  50. package/build/components/gtm/index.d.ts +7 -0
  51. package/build/components/hoc/ThemeComponent.d.ts +2 -2
  52. package/build/components/index.d.ts +2 -1
  53. package/build/components/page/head.d.ts +0 -5
  54. package/build/components/page/index.d.ts +1 -6
  55. package/build/components/page-editor/model.d.ts +2 -6
  56. package/build/index.d.ts +0 -1
  57. package/build/index.es.js +10494 -18886
  58. package/build/index.js +10456 -18884
  59. package/build/models/data/brand/index.d.ts +1 -1
  60. package/build/models/data/cart/index.d.ts +0 -9
  61. package/build/models/data/category/index.d.ts +1 -22
  62. package/build/models/data/checkout/index.d.ts +0 -5
  63. package/build/models/data/country/index.d.ts +0 -2
  64. package/build/models/data/customer/index.d.ts +0 -7
  65. package/build/models/data/image/index.d.ts +0 -1
  66. package/build/models/data/index.d.ts +1 -5
  67. package/build/models/data/order/address/index.d.ts +0 -6
  68. package/build/models/data/order/index.d.ts +1 -19
  69. package/build/models/data/order/line-item/index.d.ts +0 -18
  70. package/build/models/data/payment-gateway/index.d.ts +2 -26
  71. package/build/models/data/product/attribute-value/index.d.ts +1 -15
  72. package/build/models/data/product/index.d.ts +1 -2
  73. package/build/models/data/product/variant/index.d.ts +0 -1
  74. package/build/models/data/product/variant/price/index.d.ts +0 -2
  75. package/build/models/data/product-attribute/index.d.ts +2 -5
  76. package/build/models/data/storefront/index.d.ts +6 -17
  77. package/build/models/data/storefront/stockfront-location/index.d.ts +5 -0
  78. package/build/models/data/storefront/stockfront-route/index.d.ts +5 -0
  79. package/build/models/data/storefront/{domain → storefront-domain}/index.d.ts +0 -1
  80. package/build/models/data/storefront/storefront-region/index.d.ts +18 -0
  81. package/build/models/data/variant-type/variant-value/index.d.ts +1 -1
  82. package/build/models/theme/component/prop/index.d.ts +1 -17
  83. package/build/models/theme/index.d.ts +0 -4
  84. package/build/models/theme/page/component/prop-value/product-list.d.ts +0 -2
  85. package/build/models/theme/page/index.d.ts +1 -14
  86. package/build/models/theme/theme.d.ts +0 -4
  87. package/build/models/ui/brand-list/index.d.ts +0 -3
  88. package/build/models/ui/category-list/index.d.ts +0 -3
  89. package/build/models/ui/index.d.ts +2 -12
  90. package/build/models/ui/product-detail/index.d.ts +3 -14
  91. package/build/models/ui/product-list/filter.d.ts +18 -0
  92. package/build/models/ui/product-list/index.d.ts +14 -62
  93. package/build/pages/{pages/[slug].d.ts → [slug]/[secondSlug].d.ts} +0 -2
  94. package/build/pages/[slug]/index.d.ts +3 -9
  95. package/build/pages/account/addresses.d.ts +0 -2
  96. package/build/pages/account/forgot-password.d.ts +0 -3
  97. package/build/pages/account/index.d.ts +0 -2
  98. package/build/pages/account/login.d.ts +0 -3
  99. package/build/pages/account/orders/[id].d.ts +0 -2
  100. package/build/pages/account/orders/index.d.ts +0 -2
  101. package/build/pages/account/recover-password.d.ts +0 -3
  102. package/build/pages/account/register.d.ts +0 -3
  103. package/build/pages/checkout/[id].d.ts +0 -5
  104. package/build/pages/home.d.ts +0 -3
  105. package/build/pages/index.d.ts +2 -8
  106. package/build/store/base.d.ts +0 -17
  107. package/build/store/customer.d.ts +1 -31
  108. package/build/storefront/index.d.ts +3 -29
  109. package/build/utils/helper.d.ts +0 -1
  110. package/build/utils/index.d.ts +0 -1
  111. package/build/utils/providers/page-data.d.ts +5 -60
  112. package/build/utils/providers/prop-value/boolean.d.ts +1 -1
  113. package/build/utils/providers/prop-value/category.d.ts +2 -2
  114. package/build/utils/providers/prop-value/product-detail.d.ts +2 -2
  115. package/build/utils/providers/prop-value/product-list.d.ts +3 -1
  116. package/package.json +3 -3
  117. package/build/analytics/analytics.d.ts +0 -22
  118. package/build/analytics/facebookPixel.d.ts +0 -15
  119. package/build/analytics/googleTagManager.d.ts +0 -201
  120. package/build/analytics/head/index.d.ts +0 -7
  121. package/build/analytics/index.d.ts +0 -2
  122. package/build/api/blog/__generated__/getBlog.d.ts +0 -83
  123. package/build/api/blog/__generated__/listBlog.d.ts +0 -86
  124. package/build/api/blog/__generated__/listBlogCategory.d.ts +0 -38
  125. package/build/api/blog/__generated__/listBlogMetaData.d.ts +0 -29
  126. package/build/api/blog/index.d.ts +0 -32
  127. package/build/api/category/__generated__/listCategoryPaths.d.ts +0 -23
  128. package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +0 -26
  129. package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +0 -9
  130. package/build/api/contact-form/index.d.ts +0 -10
  131. package/build/api/country/__generated__/getMyCountry.d.ts +0 -3
  132. package/build/api/customer/__generated__/createCustomerEmailSubscription.d.ts +0 -11
  133. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +0 -215
  134. package/build/api/customer/__generated__/getLastViewedProducts.d.ts +0 -15
  135. package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +0 -11
  136. package/build/api/favorite-product/__generated__/isFavoriteProduct.d.ts +0 -6
  137. package/build/api/favorite-product/__generated__/listFavoriteProducts.d.ts +0 -12
  138. package/build/api/favorite-product/__generated__/saveFavoriteProduct.d.ts +0 -7
  139. package/build/api/favorite-product/index.d.ts +0 -6
  140. package/build/api/product-search/__generated__/getProductFilterData.d.ts +0 -50
  141. package/build/api/product-search/__generated__/searchProducts.d.ts +0 -26
  142. package/build/api/product-search/index.d.ts +0 -20
  143. package/build/components/checkout/components/cart-summary/cross.d.ts +0 -6
  144. package/build/components/checkout/components/cart-summary/tag.d.ts +0 -6
  145. package/build/components/checkout/components/error-container/customer-login-required-error/index.d.ts +0 -6
  146. package/build/components/image/index.d.ts +0 -35
  147. package/build/models/data/blog/index.d.ts +0 -67
  148. package/build/models/data/checkout-settings/index.d.ts +0 -18
  149. package/build/models/data/contact-form/index.d.ts +0 -7
  150. package/build/models/data/favorite-product/index.d.ts +0 -6
  151. package/build/models/data/order/refund/index.d.ts +0 -6
  152. package/build/models/data/order/refund/refund-line-item/index.d.ts +0 -5
  153. package/build/models/data/product-attribute/product-attribute-table-cell/index.d.ts +0 -5
  154. package/build/models/data/product-attribute/product-attribute-table-template/index.d.ts +0 -6
  155. package/build/models/data/product-filter/index.d.ts +0 -102
  156. package/build/models/data/product-tag/index.d.ts +0 -5
  157. package/build/models/data/sales-channel/index.d.ts +0 -18
  158. package/build/models/data/simple-product/index.d.ts +0 -135
  159. package/build/models/data/storefront/localization/index.d.ts +0 -7
  160. package/build/models/data/storefront/routing/index.d.ts +0 -9
  161. package/build/models/data/storefront/theme/index.d.ts +0 -13
  162. package/build/models/data/storefront/theme-localization/index.d.ts +0 -12
  163. package/build/models/theme/custom-data/index.d.ts +0 -24
  164. package/build/models/theme/page/component/prop-value/attribute-list.d.ts +0 -7
  165. package/build/models/theme/page/component/prop-value/attribute.d.ts +0 -7
  166. package/build/models/theme/page/component/prop-value/blog-list.d.ts +0 -9
  167. package/build/models/theme/page/component/prop-value/blog.d.ts +0 -5
  168. package/build/models/theme/settings/index.d.ts +0 -7
  169. package/build/models/theme/settings/prop/color/index.d.ts +0 -7
  170. package/build/models/theme/settings/prop/favicon/index.d.ts +0 -4
  171. package/build/models/ui/blog-list/index.d.ts +0 -56
  172. package/build/models/ui/component-renderer/index.d.ts +0 -7
  173. package/build/models/ui/validator/form/account-info.d.ts +0 -40
  174. package/build/models/ui/validator/form/address.d.ts +0 -75
  175. package/build/models/ui/validator/form/contact-form.d.ts +0 -45
  176. package/build/models/ui/validator/form/forgot-password.d.ts +0 -29
  177. package/build/models/ui/validator/form/login.d.ts +0 -35
  178. package/build/models/ui/validator/form/recover-password.d.ts +0 -36
  179. package/build/models/ui/validator/form/register.d.ts +0 -45
  180. package/build/models/ui/validator/index.d.ts +0 -27
  181. package/build/models/ui/validator/rules/index.d.ts +0 -87
  182. package/build/pages/404.d.ts +0 -13
  183. package/build/pages/account/favorite-products.d.ts +0 -12
  184. package/build/pages/blog/[slug].d.ts +0 -18
  185. package/build/pages/blog/index.d.ts +0 -13
  186. package/build/pages/cart.d.ts +0 -12
  187. package/build/pages/search.d.ts +0 -13
  188. package/build/utils/providers/placeholders.d.ts +0 -5
  189. package/build/utils/providers/prop-value/attribute-list.d.ts +0 -9
  190. package/build/utils/providers/prop-value/attribute.d.ts +0 -9
  191. package/build/utils/providers/prop-value/blog-list.d.ts +0 -9
  192. package/build/utils/providers/prop-value/blog.d.ts +0 -8
  193. package/build/utils/providers/prop-value/color.d.ts +0 -6
  194. package/build/utils/providers/prop-value/custom.d.ts +0 -40
  195. package/build/utils/providers/prop-value/rich-text.d.ts +0 -6
  196. package/build/utils/settings.d.ts +0 -168
@@ -0,0 +1,18 @@
1
+ export declare class IkasProductListFilter {
2
+ category?: string | null;
3
+ brand?: string | null;
4
+ categories: string[];
5
+ brands: string[];
6
+ variantValues: VariantValueFilter[];
7
+ attributes: AttributeFilter[];
8
+ constructor(data?: Partial<IkasProductListFilter>);
9
+ }
10
+ declare type VariantValueFilter = {
11
+ variantType: string;
12
+ values: string[];
13
+ };
14
+ declare type AttributeFilter = {
15
+ attribute: string;
16
+ values: string[];
17
+ };
18
+ export {};
@@ -1,107 +1,60 @@
1
- import { IkasProductListPropValue, IkasThemePageType } from "../../theme/index";
1
+ import { IkasProductListPropValue } from "../../theme/index";
2
2
  import { IkasProductDetail } from "../product-detail/index";
3
- import { IkasProductFilter } from "../../data/product-filter/index";
4
- import { NextRouter } from "next/router";
5
- import { IkasFilterCategory } from "../../data/category/index";
3
+ import { IkasProductListFilter } from "./filter";
6
4
  export declare class IkasProductList {
7
5
  data: IkasProductDetail[];
8
- filters?: IkasProductFilter[] | null;
9
- private _filterCategories?;
10
6
  private _type;
11
- private _pageType;
12
7
  private _sort;
13
8
  private _limit;
14
9
  private _page;
15
- private _infiniteScrollPage;
16
10
  private _count;
17
- private _searchKeyword;
18
11
  private _initialized;
19
12
  private _minPage?;
20
13
  private _productListPropValue;
21
- private _filterBrandId?;
22
- private _filterCategoryId?;
14
+ private _filters?;
23
15
  private _recommendFor?;
24
16
  private _isLoading;
25
- private _fetchRequestTime;
26
- private router?;
27
- constructor(data: IkasProductListParams, router?: NextRouter);
17
+ constructor(data: IkasProductListParams);
28
18
  get sort(): IkasProductListSortType;
29
19
  get limit(): number;
30
- get pageType(): IkasThemePageType;
31
20
  get page(): number;
32
- get minPage(): number;
33
21
  get count(): number;
34
- get pageCount(): number;
35
- get searchKeyword(): string;
36
- set searchKeyword(value: string);
37
22
  get isInitialized(): boolean;
38
- get isFilterable(): boolean;
39
- get isFiltered(): boolean | undefined;
40
23
  get isStatic(): boolean;
41
24
  get isDiscounted(): boolean;
42
25
  get isRecommended(): boolean;
43
- get isLastViewed(): boolean;
44
- get isSearch(): boolean;
45
26
  get hasPrev(): boolean;
46
27
  get hasNext(): boolean;
47
28
  get isLoading(): boolean;
48
- get filterQueryParams(): string;
49
- get filterCategories(): IkasFilterCategory[] | undefined;
50
- get hasAppliedfilter(): boolean | undefined;
51
- private getSortParams;
52
- private searchProducts;
53
- private getFilters;
54
- private applyQueryParamFilters;
55
- private applyFacets;
56
- private applyFilters;
57
- clearFilters(): void;
58
- private getInitial;
29
+ getInitial: () => Promise<void>;
59
30
  getPrev: () => Promise<void>;
60
31
  getNext: () => Promise<void>;
61
32
  getPage: (page: number) => Promise<void>;
62
- setSortType(sortType: IkasProductListSortType): Promise<void>;
63
- onFilterCategoryClick(filterCategory: IkasFilterCategory, disableRoute?: boolean): Promise<void>;
33
+ applyFilters(): void;
64
34
  toJSON(): {
65
35
  data: IkasProductDetail[];
66
36
  type: IkasProductListType;
67
- pageType: IkasThemePageType;
68
37
  sort: IkasProductListSortType;
69
38
  limit: number;
70
39
  page: number;
71
40
  count: number;
72
- searchKeyword: string;
73
41
  initialized: boolean;
74
42
  minPage: number | null | undefined;
75
- filterBrandId: string | null | undefined;
76
- filterCategoryId: string | null | undefined;
77
- filterCategories: IkasFilterCategory[] | null | undefined;
78
- filters: IkasProductFilter[] | null | undefined;
43
+ filters: IkasProductListFilter | null | undefined;
79
44
  recommendFor: string | null | undefined;
80
45
  productListPropValue: IkasProductListPropValue;
81
46
  };
82
- setVisibleInfiniteScrollPage: (page: number) => void;
83
- private restoreInfiniteScrollPage;
84
- private getQueryParams;
85
- private isBrowser;
86
- private waitForCustomerStoreInit;
87
- private searchDebouncer;
88
- private analyticsDebouncer;
89
47
  }
90
48
  export declare type IkasProductListParams = {
91
49
  data?: IkasProductDetail[];
92
50
  type?: IkasProductListType;
93
- pageType: IkasThemePageType;
94
51
  sort?: IkasProductListSortType;
95
52
  limit?: number;
96
53
  page?: number;
97
54
  count?: number;
98
- searchKeyword?: string;
99
55
  initialized?: boolean;
100
56
  minPage?: number;
101
- filterBrandId?: string;
102
- filterCategoryId?: string;
103
- filters?: IkasProductFilter[];
104
- filterCategories?: IkasFilterCategory[];
57
+ filters?: IkasProductListFilter;
105
58
  recommendFor?: string;
106
59
  productListPropValue: IkasProductListPropValue;
107
60
  };
@@ -109,16 +62,15 @@ export declare enum IkasProductListType {
109
62
  ALL = "ALL",
110
63
  STATIC = "STATIC",
111
64
  DISCOUNTED = "DISCOUNTED",
112
- RECOMMENDED = "RECOMMENDED",
113
- CATEGORY = "CATEGORY",
114
- SEARCH = "SEARCH",
115
- LAST_VIEWED = "LAST_VIEWED"
65
+ RECOMMENDED = "RECOMMENDED"
116
66
  }
117
67
  export declare enum IkasProductListSortType {
68
+ MOST_SOLD = "MOST_SOLD",
69
+ FEATURED = "FEATURED",
118
70
  INCREASING_PRICE = "INCREASING_PRICE",
119
71
  DECREASING_PRICE = "DECREASING_PRICE",
72
+ A_Z = "A_Z",
73
+ Z_A = "Z_A",
120
74
  LAST_ADDED = "LAST_ADDED",
121
- FIRST_ADDED = "FIRST_ADDED",
122
- INCREASING_DISCOUNT = "INCREASING_DISCOUNT",
123
- DECRASING_DISCOUNT = "DECRASING_DISCOUNT"
75
+ FIRST_ADDED = "FIRST_ADDED"
124
76
  }
@@ -4,8 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- configJson: Record<string, any>;
9
7
  };
10
8
  declare const Page: React.FC<Props>;
11
9
  export default Page;
@@ -1,18 +1,12 @@
1
- /// <reference types="node" />
2
1
  import * as React from "react";
3
- import { GetStaticPaths, GetStaticProps } from "next";
2
+ import { GetStaticProps, GetStaticPaths } from "next";
4
3
  import { IkasThemePage } from "../../models/index";
5
- import { ParsedUrlQuery } from "querystring";
6
4
  declare type Props = {
7
5
  propValuesStr: string;
8
6
  pageSpecificDataStr: string;
9
7
  page: IkasThemePage;
10
- queryParams?: ParsedUrlQuery;
11
- settingsStr: string;
12
- merchantSettings: string;
13
- configJson: Record<string, any>;
14
8
  };
15
- declare const _default: React.FunctionComponent<Props>;
16
- export default _default;
9
+ declare const Page: React.FC<Props>;
10
+ export default Page;
17
11
  export declare const getStaticPaths: GetStaticPaths;
18
12
  export declare const getStaticProps: GetStaticProps;
@@ -4,8 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- configJson: Record<string, any>;
9
7
  };
10
8
  declare const Page: React.FC<Props>;
11
9
  export default Page;
@@ -4,9 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- merchantSettings: string;
9
- configJson: Record<string, any>;
10
7
  };
11
8
  declare const Page: React.FC<Props>;
12
9
  export default Page;
@@ -4,8 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- configJson: Record<string, any>;
9
7
  };
10
8
  declare const Page: React.FC<Props>;
11
9
  export default Page;
@@ -4,9 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- merchantSettings: string;
9
- configJson: Record<string, any>;
10
7
  };
11
8
  declare const Page: React.FC<Props>;
12
9
  export default Page;
@@ -4,8 +4,6 @@ import { IkasThemePage } from "../../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- configJson: Record<string, any>;
9
7
  };
10
8
  declare const Page: React.FC<Props>;
11
9
  export default Page;
@@ -4,8 +4,6 @@ import { IkasThemePage } from "../../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- configJson: Record<string, any>;
9
7
  };
10
8
  declare const Page: React.FC<Props>;
11
9
  export default Page;
@@ -4,9 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- merchantSettings: string;
9
- configJson: Record<string, any>;
10
7
  };
11
8
  declare const Page: React.FC<Props>;
12
9
  export default Page;
@@ -4,9 +4,6 @@ import { IkasThemePage } from "../../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- merchantSettings: string;
9
- configJson: Record<string, any>;
10
7
  };
11
8
  declare const Page: React.FC<Props>;
12
9
  export default Page;
@@ -4,12 +4,7 @@ import { GetServerSideProps } from "next";
4
4
  import { ParsedUrlQuery } from "querystring";
5
5
  declare type Props = {
6
6
  checkoutStr: string;
7
- checkoutSettingsStr: string | null;
8
- returnPolicy: string;
9
- privacyPolicy: string;
10
- termsOfService: string;
11
7
  queryParams: ParsedUrlQuery;
12
- configJson: Record<string, any>;
13
8
  };
14
9
  declare const _default: React.FunctionComponent<Props>;
15
10
  export default _default;
@@ -4,9 +4,6 @@ import { IkasThemePage } from "../models/index";
4
4
  declare type Props = {
5
5
  propValuesStr: string;
6
6
  page: IkasThemePage;
7
- settingsStr: string;
8
- merchantSettings: string;
9
- configJson: Record<string, any>;
10
7
  };
11
8
  declare const Page: React.FC<Props>;
12
9
  export default Page;
@@ -1,6 +1,6 @@
1
1
  import * as IndexPage from "./home";
2
2
  import * as SlugPage from "./[slug]/index";
3
- import * as CustomPage from "./pages/[slug]";
3
+ import * as CustomPage from "./[slug]/[secondSlug]";
4
4
  import * as CheckoutPage from "./checkout/[id]";
5
5
  import * as AccountPage from "./account/index";
6
6
  import * as AddressesPage from "./account/addresses";
@@ -10,11 +10,5 @@ import * as LoginPage from "./account/login";
10
10
  import * as RegisterPage from "./account/register";
11
11
  import * as ForgotPasswordPage from "./account/forgot-password";
12
12
  import * as RecoverPasswordPage from "./account/recover-password";
13
- import * as CartPage from "./cart";
14
13
  import * as EditorPage from "./editor";
15
- import * as FavoriteProductsPage from "./account/favorite-products";
16
- import * as SearchPage from "./search";
17
- import * as NotFoundPage from "./404";
18
- import * as BlogPage from "./blog/index";
19
- import * as BlogSlugPage from "./blog/[slug]";
20
- export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, };
14
+ export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, EditorPage, };
@@ -1,24 +1,7 @@
1
1
  import { IkasCartStore } from "./cart";
2
2
  import { IkasCustomerStore } from "./customer";
3
- import { IkasThemePageType } from "../models/index";
4
- import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
5
3
  export declare class IkasBaseStore {
6
4
  readonly customerStore: IkasCustomerStore;
7
5
  readonly cartStore: IkasCartStore;
8
- currentPageType?: IkasThemePageType | null;
9
- localeOptions: IkasLocaleOption[];
10
- showLocaleOptions: boolean;
11
- private localeChecked;
12
- private settingsSet;
13
6
  constructor();
14
- checkLocalization(): Promise<void>;
15
- setLocalization(localeOption: IkasLocaleOption): void;
16
- private setSettings;
17
7
  }
18
- declare type IkasLocaleOption = {
19
- readonly id: string;
20
- readonly countryName?: string;
21
- readonly routing: IkasStorefrontRouting;
22
- readonly isRecommended: boolean;
23
- };
24
- export {};
@@ -1,4 +1,4 @@
1
- import { IkasCustomer, IkasFavoriteProduct, IkasOrderTransaction, IkasProduct } from "../models/index";
1
+ import { IkasCustomer, IkasOrderTransaction } from "../models/index";
2
2
  import { IkasBaseStore } from "./base";
3
3
  export declare class IkasCustomerStore {
4
4
  customer?: IkasCustomer | null;
@@ -6,16 +6,10 @@ export declare class IkasCustomerStore {
6
6
  tokenExpiry?: number | null;
7
7
  private baseStore?;
8
8
  private _initialized;
9
- private _visitorSubscribedEmail;
10
- private _lastViewedProducts;
11
- private _customerConsentGranted;
12
9
  constructor(baseStore?: IkasBaseStore);
13
10
  get initialized(): boolean;
14
- get canCreateEmailSubscription(): boolean;
15
- get customerConsentGranted(): boolean;
16
11
  login: (email: string, password: string) => Promise<boolean>;
17
12
  register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
18
- saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
19
13
  checkEmail: (email: string) => Promise<boolean>;
20
14
  forgotPassword: (email: string) => Promise<boolean>;
21
15
  recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
@@ -28,35 +22,11 @@ export declare class IkasCustomerStore {
28
22
  id?: string;
29
23
  orderId?: string;
30
24
  }) => Promise<IkasOrderTransaction[]>;
31
- getFavoriteProductsIds: () => Promise<IkasFavoriteProduct[]>;
32
- getFavoriteProducts: () => Promise<IkasProduct[]>;
33
- addItemToFavorite: (productId: string) => Promise<boolean>;
34
- removeItemFromFavorite: (productId: string) => Promise<boolean>;
35
- isProductFavorite: (productId: string) => Promise<boolean>;
36
- createEmailSubscription: (email: string) => Promise<boolean>;
37
- onCustomerConsentGrant: () => void;
38
25
  private init;
39
26
  private getCustomer;
40
27
  private refreshToken;
41
28
  private setCustomer;
42
29
  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;
52
30
  private setToken;
53
31
  private loadToken;
54
- private clearLocalData;
55
32
  }
56
- declare type SaveContactForm = {
57
- firstName: string;
58
- lastName: string;
59
- email: string;
60
- message: string;
61
- };
62
- export {};
@@ -1,36 +1,10 @@
1
- import { IkasSalesChannelPaymentGateway } from "../models/data/sales-channel/index";
2
- import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
3
- import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
1
+ import { IkasTheme } from "../models/index";
4
2
  import { IkasBaseStore } from "../store/index";
5
3
  export declare class IkasStorefrontConfig {
6
4
  static store: IkasBaseStore;
7
5
  static components: any;
8
6
  static config: Record<string, any>;
7
+ static localTheme: IkasTheme;
9
8
  static apiUrlOverride: string | null;
10
- static storefrontId?: string;
11
- static storefrontRoutingId?: string;
12
- static storefrontThemeId?: string;
13
- static salesChannelId?: string;
14
- static priceListId?: string;
15
- static stockLocationIds?: string[];
16
- static routings: IkasStorefrontRouting[];
17
- static paymentGateways: IkasSalesChannelPaymentGateway[];
18
- static gtmId?: string;
19
- static fbpId?: string;
20
- static favicon: IkasThemeFavicon;
21
- static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
22
- static initWithJson(json: Record<string, any>): void;
23
- static getJson(): {
24
- storefrontId: string | null;
25
- storefrontRoutingId: string | null;
26
- storefrontThemeId: string | null;
27
- salesChannelId: string | null;
28
- priceListId: string | null;
29
- stockLocationIds: string[] | null;
30
- routings: any;
31
- paymentGateways: any;
32
- gtmId: string | null;
33
- fbpId: string | null;
34
- favicon: any;
35
- };
9
+ static init(store: IkasBaseStore, components: any, config: Record<string, any>, localTheme: IkasTheme, apiUrlOverride?: string): void;
36
10
  }
@@ -2,4 +2,3 @@ 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,4 +1,3 @@
1
1
  export * from "./providers/page-data";
2
- export * from "./providers/placeholders";
3
2
  export * from "./helper";
4
3
  export * from "./currency";
@@ -1,90 +1,35 @@
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, IkasProductAttribute } 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";
7
- import { IkasThemePageSpecification } from "../../models/theme/page/index";
8
- import { IkasBlog } from "../../models/data/blog/index";
9
- import { IkasProductAttributeMap } from "../../models/data/product/attribute-value/index";
2
+ import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasThemeComponentProp, IkasThemeComponent, IkasThemePage } from "../../models/index";
10
3
  export declare class IkasPageDataProvider {
11
4
  theme: IkasTheme;
12
5
  pageType?: IkasThemePageType | null;
13
6
  pageParams: Record<string, any>;
14
7
  pageComponentPropValues: IkasPageComponentPropValue[];
15
8
  pageSpecificData?: any | null;
16
- merchantSettings?: IkasMerchantSettings | null;
17
- possiblePageTypes?: IkasThemePageType[];
18
9
  constructor(theme: IkasTheme, pageParams?: Record<string, any>, pageType?: IkasThemePageType);
19
10
  get page(): IkasThemePage | undefined;
20
11
  get nextPageData(): {
21
12
  props: {
22
13
  propValuesStr: string;
23
- pageSpecificDataStr: string;
24
14
  page: IkasThemePage | null;
25
- settingsStr: string;
26
- merchantSettings: string | null;
27
- configJson: {
28
- storefrontId: string | null;
29
- storefrontRoutingId: string | null;
30
- storefrontThemeId: string | null;
31
- salesChannelId: string | null;
32
- priceListId: string | null;
33
- stockLocationIds: string[] | null;
34
- routings: any;
35
- paymentGateways: any;
36
- gtmId: string | null;
37
- fbpId: string | null;
38
- favicon: any;
39
- };
40
15
  };
41
16
  };
42
- get specification(): IkasThemePageSpecification | undefined;
43
- get pageComponents(): IkasThemePageComponent[];
44
- getMerchantSettings(): Promise<void>;
17
+ get isStaticPage(): boolean | null | undefined;
45
18
  getPageData(): Promise<void>;
46
19
  getPageSpecificData(): Promise<void>;
47
- getPageSpecificProduct(): Promise<void>;
48
20
  getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
49
21
  getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
50
- private setPageMetaData;
51
22
  static isServer(): boolean;
52
- static initPropValues(propValuesStr: string, router: NextRouter, settingsStr: string, isBrowser?: boolean): IkasPageComponentPropValue[];
23
+ static initPropValues(propValuesStr: string, router: NextRouter, queryParams?: Record<string, any>): IkasPageComponentPropValue[];
53
24
  static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
54
- static _initBrandPropValue(propValue: IkasBrand): IkasBrand;
55
25
  static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
56
- static _initBrandListPropValue(propValue: IkasBrandListParams): IkasBrandList;
57
26
  static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
58
- static _initCategoryPropValue(propValue: IkasCategory): IkasCategory;
59
27
  static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
60
- static _initCategoryListPropValue(propValue: IkasCategoryListParams): IkasCategoryList;
61
- static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter): void;
62
- static _initProductListPropValue(propValue: IkasProductListParams, router: NextRouter): IkasProductList;
63
- static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
64
- static _initProductDetailPropValue(propValue: any, router: NextRouter, isBrowser?: boolean): IkasProductDetail;
65
- static initAttributePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
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
- }[];
28
+ static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
29
+ static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, queryParams: Record<string, any>, router: NextRouter): void;
72
30
  static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
73
- static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
74
31
  static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
75
- static _initImagePropValue(propValue: any): IkasImage;
76
32
  static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
77
- static _initImageListPropValue(propValue: any): IkasImage[];
78
- static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
79
- static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): any;
80
- static initComponentPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
81
- static _initComponentPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer | undefined;
82
- static initComponentListPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
83
- static _initComponentListPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer[];
84
- static initBlogPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
85
- static _initBlogPropValue(propValue: IkasBlog): IkasBlog;
86
- static initBlogListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
87
- static _initBlogListPropValue(propValue: IkasBlogListParams): IkasBlogList;
88
33
  }
89
34
  export declare class IkasPageComponentPropValue {
90
35
  pageComponent: IkasThemePageComponent;
@@ -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(boolPropValue: boolean);
4
+ constructor(textPropValue: boolean);
5
5
  getValue(): Promise<boolean>;
6
6
  }
@@ -1,8 +1,8 @@
1
1
  import { IkasCategory, IkasCategoryPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
- export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory | null> {
3
+ export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory> {
4
4
  private categoryPropValue;
5
5
  private pageSpecificData?;
6
6
  constructor(prop: IkasCategoryPropValue, pageSpecificData?: any);
7
- getValue(): Promise<IkasCategory | null>;
7
+ getValue(): Promise<IkasCategory>;
8
8
  }
@@ -1,8 +1,8 @@
1
1
  import { IkasProductDetail, IkasProductDetailPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
- export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail | null> {
3
+ export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail> {
4
4
  private productDetailPropValue;
5
5
  private pageSpecificData?;
6
6
  constructor(prop: IkasProductDetailPropValue, pageSpecificData?: any);
7
- getValue(): Promise<IkasProductDetail | null>;
7
+ getValue(): Promise<IkasProductDetail>;
8
8
  }
@@ -3,7 +3,9 @@ import IkasPropValueProvider from "./index";
3
3
  export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList> {
4
4
  private pageType;
5
5
  private productListPropValue;
6
+ private pageParams;
6
7
  private pageSpecificData?;
7
- constructor(pageType: IkasThemePageType, productListPropValue: IkasProductListPropValue, pageSpecificData?: any);
8
+ private skipInitialFetch?;
9
+ constructor(pageType: IkasThemePageType, productListPropValue: IkasProductListPropValue, pageParams: Record<string, any>, pageSpecificData?: any, skipInitialFetch?: boolean);
8
10
  getValue(): Promise<IkasProductList>;
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.160.alpha-1",
3
+ "version": "0.0.17",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -18,7 +18,7 @@
18
18
  "peerDependencies": {
19
19
  "mobx": "^6.1.3",
20
20
  "mobx-react-lite": "^3.1.5",
21
- "next": "10.0.6",
21
+ "next": "10.0.3",
22
22
  "react": "17.0.1",
23
23
  "react-dom": "17.0.1"
24
24
  },
@@ -68,7 +68,7 @@
68
68
  "jest": "^26.4.2",
69
69
  "mobx": "^6.1.3",
70
70
  "mobx-react-lite": "^3.1.5",
71
- "next": "10.0.6",
71
+ "next": "10.0.3",
72
72
  "node-sass": "^5.0.0",
73
73
  "postcss": "^8.2.4",
74
74
  "prettier": "^2.2.1",
@@ -1,22 +0,0 @@
1
- import { IkasProductDetail, IkasOrderLineItem, IkasCheckout, IkasCategory } from "../models/index";
2
- import { CheckoutStep } from "../components/checkout/model";
3
- import { IkasCart } from "../models/data/cart/index";
4
- export declare class Analytics {
5
- constructor();
6
- static pageView(url: string): void;
7
- static productView(productDetail: IkasProductDetail): void;
8
- static addToCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): void;
9
- static removeFromCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): void;
10
- static beginCheckout(checkout: IkasCheckout): void;
11
- static purchase(checkout: IkasCheckout, orderId: string): void;
12
- static checkoutStep(checkout: IkasCheckout, step: CheckoutStep): void;
13
- static disableHTML(): void;
14
- static addToWishlist(id: string): void;
15
- static search(searchKeyword: string): void;
16
- static completeRegistration(): void;
17
- static customerLogin(email: string): void;
18
- static customerVisit(email: string): void;
19
- static viewCart(cart: IkasCart | null | undefined): void;
20
- static viewCategory(categoryPath: string, category: IkasCategory): void;
21
- static contactForm(): void;
22
- }