@ikas/storefront 0.0.168-alpha.1 → 0.0.168-alpha.11

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 (56) hide show
  1. package/build/analytics/analytics.d.ts +23 -10
  2. package/build/analytics/events.d.ts +34 -0
  3. package/build/assets/translations/checkout/en.js +1 -0
  4. package/build/assets/translations/checkout/tr.js +1 -0
  5. package/build/components/{hoc → page}/ThemeComponent.d.ts +1 -1
  6. package/build/components/page/index.d.ts +1 -1
  7. package/build/components/{hoc → page-editor}/ThemeComponentEditor.d.ts +2 -2
  8. package/build/components/page-editor/model.d.ts +2 -2
  9. package/build/index.es.js +13053 -12459
  10. package/build/index.js +13050 -12460
  11. package/build/models/data/checkout-settings/index.d.ts +1 -0
  12. package/build/models/data/customer/address/index.d.ts +0 -1
  13. package/build/models/data/customer/index.d.ts +7 -0
  14. package/build/models/data/order/address/index.d.ts +0 -1
  15. package/build/models/ui/index.d.ts +2 -0
  16. package/build/models/ui/product-attribute-detail/index.d.ts +8 -0
  17. package/build/models/ui/product-attribute-list/index.d.ts +9 -0
  18. package/build/models/ui/product-list/index.d.ts +2 -1
  19. package/build/providers/page-data-get.d.ts +55 -0
  20. package/build/providers/page-data-init.d.ts +58 -0
  21. package/build/{utils/settings.d.ts → providers/page-data-next.d.ts} +1 -1
  22. package/build/{utils/providers → providers}/placeholders.d.ts +1 -1
  23. package/build/providers/prop-value/attribute-list.d.ts +12 -0
  24. package/build/providers/prop-value/attribute.d.ts +12 -0
  25. package/build/{utils/providers → providers}/prop-value/blog-category-list.d.ts +1 -1
  26. package/build/providers/prop-value/blog-category.d.ts +11 -0
  27. package/build/{utils/providers → providers}/prop-value/blog-list.d.ts +1 -1
  28. package/build/providers/prop-value/blog.d.ts +11 -0
  29. package/build/{utils/providers → providers}/prop-value/boolean.d.ts +0 -0
  30. package/build/{utils/providers → providers}/prop-value/brand-list.d.ts +1 -1
  31. package/build/providers/prop-value/brand.d.ts +11 -0
  32. package/build/{utils/providers → providers}/prop-value/category-list.d.ts +1 -1
  33. package/build/providers/prop-value/category.d.ts +11 -0
  34. package/build/{utils/providers → providers}/prop-value/checkout.d.ts +1 -1
  35. package/build/{utils/providers → providers}/prop-value/color.d.ts +0 -0
  36. package/build/{utils/providers → providers}/prop-value/custom.d.ts +2 -2
  37. package/build/{utils/providers → providers}/prop-value/image-list.d.ts +1 -1
  38. package/build/{utils/providers → providers}/prop-value/image.d.ts +1 -1
  39. package/build/{utils/providers → providers}/prop-value/index.d.ts +0 -0
  40. package/build/{utils/providers → providers}/prop-value/link.d.ts +1 -1
  41. package/build/providers/prop-value/product-detail.d.ts +11 -0
  42. package/build/{utils/providers → providers}/prop-value/product-list.d.ts +1 -1
  43. package/build/{utils/providers → providers}/prop-value/rich-text.d.ts +0 -0
  44. package/build/{utils/providers → providers}/prop-value/text.d.ts +0 -0
  45. package/build/store/customer.d.ts +2 -3
  46. package/build/utils/helper.d.ts +1 -0
  47. package/build/utils/index.d.ts +0 -2
  48. package/package.json +1 -1
  49. package/build/utils/providers/page-data.d.ts +0 -104
  50. package/build/utils/providers/prop-value/attribute-list.d.ts +0 -9
  51. package/build/utils/providers/prop-value/attribute.d.ts +0 -9
  52. package/build/utils/providers/prop-value/blog-category.d.ts +0 -8
  53. package/build/utils/providers/prop-value/blog.d.ts +0 -8
  54. package/build/utils/providers/prop-value/brand.d.ts +0 -8
  55. package/build/utils/providers/prop-value/category.d.ts +0 -8
  56. package/build/utils/providers/prop-value/product-detail.d.ts +0 -8
@@ -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 pageView(url: string): void;
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, eventId: string): void;
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(id: string): void;
25
+ static addToWishlist(productId: string): void;
15
26
  static search(searchKeyword: string): void;
16
- static completeRegistration(): void;
17
- static customerLogin(email: string): void;
18
- static customerVisit(email: string): void;
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 contactForm(): void;
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
+ };
@@ -53,6 +53,7 @@ module.exports = {
53
53
 
54
54
  shipping: "Shipping",
55
55
  payment: "Payment",
56
+ summary: "Summary",
56
57
 
57
58
  free: "Free",
58
59
  standartShipping: "Standart Shipping",
@@ -52,6 +52,7 @@ module.exports = {
52
52
 
53
53
  shipping: "Kargo",
54
54
  payment: "Ödeme",
55
+ summary: "Özet",
55
56
 
56
57
  free: "Ücretsiz",
57
58
  standartShipping: "Standart Kargo",
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { IkasThemeSettings } from "../../models/index";
3
- import { IkasPageComponentPropValue } from "../../utils/index";
3
+ import { IkasPageComponentPropValue } from "../../providers/page-data-get";
4
4
  declare type Props = {
5
5
  pageComponentPropValue: IkasPageComponentPropValue;
6
6
  index: number;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { IkasThemePageType, IkasThemeSettings } from "../../models/index";
3
- import { IkasPageComponentPropValue } from "../../utils/index";
3
+ import { IkasPageComponentPropValue } from "../../providers/page-data-get";
4
4
  export declare type IkasPageProps = {
5
5
  propValuesStr: string;
6
6
  pageSpecificDataStr: string;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import PageViewModel from "../page-editor/model";
2
+ import IkasPageEditorViewModel from "./model";
3
3
  import { IkasThemePageComponent } from "../../models/index";
4
4
  declare type Props = {
5
- vm: PageViewModel;
5
+ vm: IkasPageEditorViewModel;
6
6
  pageComponent: IkasThemePageComponent;
7
7
  };
8
8
  export declare const ThemeEditorComponent: React.FC<Props>;
@@ -1,8 +1,8 @@
1
1
  import { NextRouter } from "next/router";
2
2
  import { IkasThemePage, IkasThemePageComponent, IkasTheme, IkasThemeComponent } from "../../models/index";
3
- import { IkasPageDataProvider } from "../../utils/index";
3
+ import { IkasPageDataProvider } from "../../providers/page-data-get";
4
4
  import { IkasThemePageSpecification } from "../../models/theme/page/index";
5
- export default class PageViewModel {
5
+ export default class IkasPageEditorViewModel {
6
6
  theme?: IkasTheme | null;
7
7
  page?: IkasThemePage | null;
8
8
  selectedPageComponentId?: string | null;