@ikas/storefront 0.0.157 → 0.0.158-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.
@@ -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 | undefined;
26
28
  get href(): string;
29
+ toJSON(): this & {
30
+ isSelected: boolean | undefined;
31
+ };
27
32
  }
@@ -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;
@@ -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;
@@ -28,6 +29,7 @@ export declare class IkasProductList {
28
29
  get limit(): number;
29
30
  get pageType(): IkasThemePageType;
30
31
  get page(): number;
32
+ get minPage(): number;
31
33
  get count(): number;
32
34
  get pageCount(): number;
33
35
  get searchKeyword(): string;
@@ -38,6 +40,7 @@ export declare class IkasProductList {
38
40
  get isStatic(): boolean;
39
41
  get isDiscounted(): boolean;
40
42
  get isRecommended(): boolean;
43
+ get isLastViewed(): boolean;
41
44
  get isSearch(): boolean;
42
45
  get hasPrev(): boolean;
43
46
  get hasNext(): boolean;
@@ -58,7 +61,6 @@ export declare class IkasProductList {
58
61
  getPage: (page: number) => Promise<void>;
59
62
  setSortType(sortType: IkasProductListSortType): Promise<void>;
60
63
  onFilterCategoryClick(filterCategory: IkasFilterCategory, disableRoute?: boolean): Promise<void>;
61
- setVisibleInfiniteScrollPage(page: number): void;
62
64
  toJSON(): {
63
65
  data: IkasProductDetail[];
64
66
  type: IkasProductListType;
@@ -77,10 +79,11 @@ export declare class IkasProductList {
77
79
  recommendFor: string | null | undefined;
78
80
  productListPropValue: IkasProductListPropValue;
79
81
  };
80
- private checkRestoreInfiniteScroll;
81
- private hasForwardRoute;
82
+ setVisibleInfiniteScrollPage: (page: number) => void;
83
+ private restoreInfiniteScrollPage;
82
84
  private getQueryParams;
83
85
  private isBrowser;
86
+ private waitForCustomerStoreInit;
84
87
  private searchDebouncer;
85
88
  private analyticsDebouncer;
86
89
  }
@@ -108,7 +111,8 @@ export declare enum IkasProductListType {
108
111
  DISCOUNTED = "DISCOUNTED",
109
112
  RECOMMENDED = "RECOMMENDED",
110
113
  CATEGORY = "CATEGORY",
111
- SEARCH = "SEARCH"
114
+ SEARCH = "SEARCH",
115
+ LAST_VIEWED = "LAST_VIEWED"
112
116
  }
113
117
  export declare enum IkasProductListSortType {
114
118
  INCREASING_PRICE = "INCREASING_PRICE",
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.157",
3
+ "version": "0.0.158-alpha.10",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",