@ikas/storefront 0.0.168-alpha.3 → 0.0.168-alpha.6
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/analytics/analytics.d.ts +23 -10
- package/build/analytics/events.d.ts +34 -0
- package/build/assets/translations/checkout/en.js +1 -0
- package/build/assets/translations/checkout/tr.js +1 -0
- package/build/index.es.js +1988 -1543
- package/build/index.js +1988 -1542
- package/build/models/data/checkout-settings/index.d.ts +1 -0
- package/build/models/data/customer/address/index.d.ts +0 -1
- package/build/models/data/customer/index.d.ts +7 -0
- package/build/models/data/order/address/index.d.ts +0 -1
- package/build/models/ui/product-list/index.d.ts +2 -1
- package/build/store/customer.d.ts +2 -3
- package/build/utils/helper.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
import { IkasProductDetail, IkasOrderLineItem, IkasCheckout, IkasCategory } from "../models/index";
|
|
1
|
+
import { IkasProductDetail, IkasOrderLineItem, IkasCheckout, IkasCategory, IkasThemePageType, IkasOrderTransaction } from "../models/index";
|
|
2
2
|
import { CheckoutStep } from "../components/checkout/model";
|
|
3
3
|
import { IkasCart } from "../models/data/cart/index";
|
|
4
|
+
import { IkasEventSubscriber } from "./events";
|
|
5
|
+
import { IkasContactForm } from "../store/customer";
|
|
4
6
|
export declare class Analytics {
|
|
7
|
+
static subscribers: IkasEventSubscriber[];
|
|
5
8
|
constructor();
|
|
6
|
-
static
|
|
9
|
+
static getCustomerInfo(): Promise<{
|
|
10
|
+
consentGranted: boolean;
|
|
11
|
+
id: string;
|
|
12
|
+
firstName: string;
|
|
13
|
+
lastName: string;
|
|
14
|
+
email: string;
|
|
15
|
+
phone: string | null | undefined;
|
|
16
|
+
} | null>;
|
|
17
|
+
static pageView(pageType: IkasThemePageType): Promise<void>;
|
|
7
18
|
static productView(productDetail: IkasProductDetail): void;
|
|
8
|
-
static addToCart(item: IkasOrderLineItem, quantity: number, eventId: string): void;
|
|
9
|
-
static removeFromCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): void;
|
|
19
|
+
static addToCart(item: IkasOrderLineItem, quantity: number, eventId: string, cart: IkasCart): void;
|
|
20
|
+
static removeFromCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number, cart: IkasCart): void;
|
|
10
21
|
static beginCheckout(checkout: IkasCheckout): void;
|
|
11
|
-
static purchase(checkout: IkasCheckout,
|
|
22
|
+
static purchase(checkout: IkasCheckout, transaction: IkasOrderTransaction): void;
|
|
12
23
|
static checkoutStep(checkout: IkasCheckout, step: CheckoutStep): void;
|
|
13
24
|
static disableHTML(): void;
|
|
14
|
-
static addToWishlist(
|
|
25
|
+
static addToWishlist(productId: string): void;
|
|
15
26
|
static search(searchKeyword: string): void;
|
|
16
|
-
static completeRegistration(): void;
|
|
17
|
-
static customerLogin(
|
|
18
|
-
static
|
|
27
|
+
static completeRegistration(email: string): void;
|
|
28
|
+
static customerLogin(): Promise<void>;
|
|
29
|
+
static customerLogout(): Promise<void>;
|
|
30
|
+
static customerVisit(): Promise<void>;
|
|
19
31
|
static viewCart(cart: IkasCart | null | undefined): void;
|
|
20
32
|
static viewCategory(categoryPath: string, category: IkasCategory): void;
|
|
21
|
-
static
|
|
33
|
+
static viewSearchResults(searchKeyword: string, productDetails: IkasProductDetail[]): void;
|
|
34
|
+
static contactForm(form: IkasContactForm): void;
|
|
22
35
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare function IkasEvents(initialSubscribers: IkasEventSubscriber[]): {
|
|
2
|
+
subscribe: (subscriber: any) => void;
|
|
3
|
+
unsubscribe: (id: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function initIkasEvents(): void;
|
|
6
|
+
export declare function getIkasEventsScript(): string;
|
|
7
|
+
export declare function isValidIkasEventSubscriber(data: any): boolean;
|
|
8
|
+
export declare enum IkasEventType {
|
|
9
|
+
PAGE_VIEW = "PAGE_VIEW",
|
|
10
|
+
PRODUCT_VIEW = "PRODUCT_VIEW",
|
|
11
|
+
ADD_TO_CART = "ADD_TO_CART",
|
|
12
|
+
REMOVE_FROM_CART = "REMOVE_FROM_CART",
|
|
13
|
+
BEGIN_CHECKOUT = "BEGIN_CHECKOUT",
|
|
14
|
+
CHECKOUT_STEP = "CHECKOUT_STEP",
|
|
15
|
+
COMPLETE_CHECKOUT = "COMPLETE_CHECKOUT",
|
|
16
|
+
ADD_TO_WISHLIST = "ADD_TO_WISHLIST",
|
|
17
|
+
SEARCH = "SEARCH",
|
|
18
|
+
CUSTOMER_REGISTER = "CUSTOMER_REGISTER",
|
|
19
|
+
CUSTOMER_LOGIN = "CUSTOMER_LOGIN",
|
|
20
|
+
CUSTOMER_LOGOUT = "CUSTOMER_LOGOUT",
|
|
21
|
+
CUSTOMER_VISIT = "CUSTOMER_VISIT",
|
|
22
|
+
VIEW_CART = "VIEW_CART",
|
|
23
|
+
VIEW_CATEGORY = "VIEW_CATEGORY",
|
|
24
|
+
VIEW_SEARCH_RESULTS = "VIEW_SEARCH_RESULTS",
|
|
25
|
+
CONTACT_FORM = "CONTACT_FORM"
|
|
26
|
+
}
|
|
27
|
+
export declare type IkasEventSubscriber = {
|
|
28
|
+
id: string;
|
|
29
|
+
callback: (event: IkasEvent) => void;
|
|
30
|
+
};
|
|
31
|
+
export declare type IkasEvent = {
|
|
32
|
+
type: IkasEventType;
|
|
33
|
+
data: any;
|
|
34
|
+
};
|