@ikas/storefront 0.0.168-alpha.22 → 0.0.168-alpha.3

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 (75) hide show
  1. package/build/__generated__/global-types.d.ts +24 -37
  2. package/build/analytics/analytics.d.ts +10 -24
  3. package/build/api/brand/__generated__/listProductBrand.d.ts +0 -7
  4. package/build/api/cart/__generated__/saveItemToCart.d.ts +0 -6
  5. package/build/api/category/__generated__/listCategory.d.ts +0 -7
  6. package/build/api/checkout/__generated__/getCheckoutById.d.ts +2 -8
  7. package/build/api/checkout/__generated__/getOrder.d.ts +2 -2
  8. package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +0 -1
  9. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +1 -3
  10. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +2 -2
  11. package/build/api/customer/__generated__/customerLogin.d.ts +1 -1
  12. package/build/api/customer/__generated__/getCustomerOrders.d.ts +2 -2
  13. package/build/api/customer/__generated__/getLastViewedProducts.d.ts +1 -1
  14. package/build/api/customer/__generated__/getMyCustomer.d.ts +1 -1
  15. package/build/api/customer/__generated__/registerCustomer.d.ts +1 -1
  16. package/build/api/customer/__generated__/saveMyCustomer.d.ts +1 -1
  17. package/build/api/storefront/__generated__/getStorefront.d.ts +1 -1
  18. package/build/assets/translations/checkout/en.js +0 -1
  19. package/build/assets/translations/checkout/tr.js +0 -1
  20. package/build/components/{page → hoc}/ThemeComponent.d.ts +1 -1
  21. package/build/components/{page-editor → hoc}/ThemeComponentEditor.d.ts +2 -2
  22. package/build/components/page/index.d.ts +1 -1
  23. package/build/components/page-editor/model.d.ts +2 -2
  24. package/build/index.es.js +12449 -13146
  25. package/build/index.js +12421 -13114
  26. package/build/models/data/checkout-settings/index.d.ts +0 -1
  27. package/build/models/data/customer/address/index.d.ts +1 -0
  28. package/build/models/data/customer/index.d.ts +0 -7
  29. package/build/models/data/order/address/index.d.ts +1 -0
  30. package/build/models/data/payment-gateway/index.d.ts +0 -6
  31. package/build/models/ui/index.d.ts +0 -2
  32. package/build/models/ui/product-list/index.d.ts +1 -2
  33. package/build/store/cart.d.ts +0 -1
  34. package/build/store/customer.d.ts +3 -2
  35. package/build/utils/helper.d.ts +0 -1
  36. package/build/utils/index.d.ts +2 -0
  37. package/build/utils/providers/page-data.d.ts +104 -0
  38. package/build/{providers → utils/providers}/placeholders.d.ts +1 -1
  39. package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
  40. package/build/utils/providers/prop-value/attribute.d.ts +9 -0
  41. package/build/{providers → utils/providers}/prop-value/blog-category-list.d.ts +1 -1
  42. package/build/utils/providers/prop-value/blog-category.d.ts +8 -0
  43. package/build/{providers → utils/providers}/prop-value/blog-list.d.ts +1 -1
  44. package/build/utils/providers/prop-value/blog.d.ts +8 -0
  45. package/build/{providers → utils/providers}/prop-value/boolean.d.ts +0 -0
  46. package/build/{providers → utils/providers}/prop-value/brand-list.d.ts +1 -1
  47. package/build/utils/providers/prop-value/brand.d.ts +8 -0
  48. package/build/{providers → utils/providers}/prop-value/category-list.d.ts +1 -1
  49. package/build/utils/providers/prop-value/category.d.ts +8 -0
  50. package/build/{providers → utils/providers}/prop-value/checkout.d.ts +1 -1
  51. package/build/{providers → utils/providers}/prop-value/color.d.ts +0 -0
  52. package/build/{providers → utils/providers}/prop-value/custom.d.ts +2 -2
  53. package/build/{providers → utils/providers}/prop-value/image-list.d.ts +1 -1
  54. package/build/{providers → utils/providers}/prop-value/image.d.ts +1 -1
  55. package/build/{providers → utils/providers}/prop-value/index.d.ts +0 -0
  56. package/build/{providers → utils/providers}/prop-value/link.d.ts +1 -1
  57. package/build/utils/providers/prop-value/product-detail.d.ts +8 -0
  58. package/build/{providers → utils/providers}/prop-value/product-list.d.ts +1 -1
  59. package/build/{providers → utils/providers}/prop-value/rich-text.d.ts +0 -0
  60. package/build/{providers → utils/providers}/prop-value/text.d.ts +0 -0
  61. package/build/{providers/page-data-next.d.ts → utils/settings.d.ts} +1 -1
  62. package/package.json +1 -1
  63. package/build/analytics/events.d.ts +0 -35
  64. package/build/components/checkout/components/external.d.ts +0 -6
  65. package/build/models/ui/product-attribute-detail/index.d.ts +0 -8
  66. package/build/models/ui/product-attribute-list/index.d.ts +0 -9
  67. package/build/providers/page-data-get.d.ts +0 -55
  68. package/build/providers/page-data-init.d.ts +0 -58
  69. package/build/providers/prop-value/attribute-list.d.ts +0 -12
  70. package/build/providers/prop-value/attribute.d.ts +0 -12
  71. package/build/providers/prop-value/blog-category.d.ts +0 -11
  72. package/build/providers/prop-value/blog.d.ts +0 -11
  73. package/build/providers/prop-value/brand.d.ts +0 -11
  74. package/build/providers/prop-value/category.d.ts +0 -11
  75. package/build/providers/prop-value/product-detail.d.ts +0 -11
@@ -11,7 +11,6 @@ export declare class IkasCheckoutSettings {
11
11
  storefrontId: string;
12
12
  giftPackagePriceList: IkasCheckoutSettingsPrice[] | null;
13
13
  isGiftPackageEnabled: boolean;
14
- isShowPostalCode: boolean;
15
14
  constructor(data?: Partial<IkasCheckoutSettings>);
16
15
  }
17
16
  export declare enum IkasCheckoutRequirementEnum {
@@ -38,6 +38,7 @@ export declare type IkasAddressValidationResult = {
38
38
  firstName: boolean;
39
39
  lastName: boolean;
40
40
  addressLine1: boolean;
41
+ postalCode: boolean;
41
42
  country: boolean;
42
43
  state: boolean;
43
44
  city: boolean;
@@ -12,13 +12,6 @@ export declare class IkasCustomer {
12
12
  subscriptionStatus: IkasCustomerEmailSubscriptionStatus | null;
13
13
  constructor(data: Partial<IkasCustomer>);
14
14
  get isSubscribed(): boolean;
15
- get basicInfo(): {
16
- id: string;
17
- firstName: string;
18
- lastName: string;
19
- email: string;
20
- phone: string | null | undefined;
21
- };
22
15
  }
23
16
  export declare enum IkasCustomerAccountStatus {
24
17
  ACTIVE_ACCOUNT = "ACTIVE_ACCOUNT",
@@ -38,6 +38,7 @@ export declare type IkasAddressValidationResult = {
38
38
  firstName: boolean;
39
39
  lastName: boolean;
40
40
  addressLine1: boolean;
41
+ postalCode: boolean;
41
42
  country: boolean;
42
43
  state: boolean;
43
44
  city: boolean;
@@ -5,8 +5,6 @@ export declare class IkasPaymentGateway {
5
5
  id: string | null;
6
6
  name: string;
7
7
  code: string;
8
- type: IkasPaymentGatewayType;
9
- logoUrl: string | null;
10
8
  testMode: boolean | null;
11
9
  description: string | null;
12
10
  additionalPrices: IkasPaymentGatewayAdditionalPrice[] | null;
@@ -47,10 +45,6 @@ export declare enum IkasPaymentGatewayAdditionalPriceAmountType {
47
45
  AMOUNT = "AMOUNT",
48
46
  RATIO = "RATIO"
49
47
  }
50
- export declare enum IkasPaymentGatewayType {
51
- EXTERNAL = "EXTERNAL",
52
- INTERNAL = "INTERNAL"
53
- }
54
48
  declare type IkasPaymentGatewayTranslation = {
55
49
  description: string | null;
56
50
  locale: string;
@@ -6,8 +6,6 @@ export type { IkasBrandListParams } from "./brand-list/index";
6
6
  export { IkasNavigationLink } from "./navigation-link/index";
7
7
  export { IkasProductDetail, IkasDisplayedVariantType, IkasDisplayedVariantValue, } from "./product-detail/index";
8
8
  export { IkasProductList, IkasProductListType, IkasProductListSortType, } from "./product-list/index";
9
- export * from "./product-attribute-detail/index";
10
- export * from "./product-attribute-list/index";
11
9
  export { Validator, ValidationStatus } from "./validator/index";
12
10
  export * from "./validator/rules/index";
13
11
  export { LoginForm } from "./validator/form/login";
@@ -89,9 +89,8 @@ export declare class IkasProductList {
89
89
  private getQueryParams;
90
90
  private isBrowser;
91
91
  private waitForCustomerStoreInit;
92
- private handleListingEvent;
93
92
  private searchDebouncer;
94
- private searchAnalyticsDebouncer;
93
+ private analyticsDebouncer;
95
94
  }
96
95
  export declare type IkasProductListParams = {
97
96
  data?: IkasProductDetail[];
@@ -22,5 +22,4 @@ export declare class IkasCartStore {
22
22
  removeItem: (item: IkasOrderLineItem) => Promise<void>;
23
23
  removeCardIfEmpty: () => void;
24
24
  removeCart: () => void;
25
- waitUntilInitialized: () => Promise<unknown>;
26
25
  }
@@ -16,7 +16,7 @@ export declare class IkasCustomerStore {
16
16
  get customerConsentGranted(): boolean;
17
17
  login: (email: string, password: string) => Promise<boolean>;
18
18
  register: (firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean | undefined) => Promise<boolean>;
19
- saveContactForm: (input: IkasContactForm) => Promise<boolean | undefined>;
19
+ saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
20
20
  checkEmail: (email: string) => Promise<boolean>;
21
21
  forgotPassword: (email: string) => Promise<boolean>;
22
22
  recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
@@ -56,9 +56,10 @@ export declare class IkasCustomerStore {
56
56
  private clearLocalTokenData;
57
57
  private clearLocalData;
58
58
  }
59
- export declare type IkasContactForm = {
59
+ declare type SaveContactForm = {
60
60
  firstName: string;
61
61
  lastName: string;
62
62
  email: string;
63
63
  message: string;
64
64
  };
65
+ export {};
@@ -5,4 +5,3 @@ export declare const decodeBase64: (base64: string) => string;
5
5
  export declare function stringSorter(atitle: string, btitle: string): number;
6
6
  export declare function findAllIndexes(str: string, pattern: string): number[];
7
7
  export declare function formatDate(date: Date): string;
8
- export declare function tryForEach(items: Array<any>, callback: (item: any, index: number) => void, printErrors?: boolean): void;
@@ -1,3 +1,5 @@
1
+ export * from "./providers/page-data";
2
+ export * from "./providers/placeholders";
1
3
  export * from "./helper";
2
4
  export * from "./currency";
3
5
  export { useTranslation, createTranslationInputData } from "./i18n";
@@ -0,0 +1,104 @@
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, IkasBlogCategoryList, IkasBlogCategoryListParams } 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, IkasBlogCategory } from "../../models/data/blog/index";
9
+ import { IkasProductAttributeMap } from "../../models/data/product/attribute-value/index";
10
+ export declare class IkasPageDataProvider {
11
+ theme: IkasTheme;
12
+ pageType?: IkasThemePageType | null;
13
+ pageParams: Record<string, any>;
14
+ pageComponentPropValues: IkasPageComponentPropValue[];
15
+ pageSpecificData?: any | null;
16
+ merchantSettings?: IkasMerchantSettings | null;
17
+ possiblePageTypes?: IkasThemePageType[];
18
+ constructor(theme: IkasTheme, pageParams?: Record<string, any>, pageType?: IkasThemePageType);
19
+ get page(): IkasThemePage | undefined;
20
+ get nextPageData(): {
21
+ props: {
22
+ propValuesStr: string;
23
+ pageSpecificDataStr: string;
24
+ pageType: IkasThemePageType;
25
+ pageTitle: string | null;
26
+ pageDescription: string | null;
27
+ settingsStr: string;
28
+ merchantSettingsStr: string | null;
29
+ configJson: {
30
+ domain: string;
31
+ storefrontId: string | null;
32
+ storefrontRoutingId: string | null;
33
+ storefrontThemeId: string | null;
34
+ salesChannelId: string | null;
35
+ priceListId: string | null;
36
+ stockLocationIds: string[] | null;
37
+ routings: any;
38
+ paymentGateways: any;
39
+ gtmId: string | null;
40
+ fbpId: string | null;
41
+ favicon: any;
42
+ stockPreference: import("../../models/theme/settings/index").IkasThemeStockPreference;
43
+ storefrontJSScripts: string[];
44
+ translations: Record<string, any>;
45
+ };
46
+ };
47
+ };
48
+ get specification(): IkasThemePageSpecification | undefined;
49
+ get pageComponents(): IkasThemePageComponent[];
50
+ getMerchantSettings(): Promise<void>;
51
+ getPageData(): Promise<void>;
52
+ getPageSpecificData(): Promise<void>;
53
+ getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
54
+ getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
55
+ private setPageMetaData;
56
+ static isServer(): boolean;
57
+ static initPropValues(propValuesStr: string, router: NextRouter, settingsStr: string, isBrowser?: boolean): IkasPageComponentPropValue[];
58
+ static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
59
+ static _initBrandPropValue(propValue: IkasBrand): IkasBrand;
60
+ static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
61
+ static _initBrandListPropValue(propValue: IkasBrandListParams): IkasBrandList;
62
+ static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
63
+ static _initCategoryPropValue(propValue: IkasCategory): IkasCategory;
64
+ static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
65
+ static _initCategoryListPropValue(propValue: IkasCategoryListParams): IkasCategoryList;
66
+ static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter): void;
67
+ static _initProductListPropValue(propValue: IkasProductListParams, router: NextRouter): IkasProductList;
68
+ static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
69
+ static _initProductDetailPropValue(propValue: any, router: NextRouter, isBrowser?: boolean): IkasProductDetail;
70
+ static _initProductDetailOnBrowser(productDetail: IkasProductDetail): void;
71
+ static initAttributePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
72
+ static _initAttributePropValue(propValue: IkasProductAttributeValue[]): IkasProductAttributeValue[];
73
+ static initAttributeListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
74
+ static _initAttributeListPropValue(propValue: IkasProductAttributeMap[]): {
75
+ attribute: IkasProductAttribute;
76
+ values: IkasProductAttributeValue[];
77
+ }[];
78
+ static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
79
+ static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
80
+ static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
81
+ static _initImagePropValue(propValue: any): IkasImage;
82
+ static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
83
+ static _initImageListPropValue(propValue: any): IkasImage[];
84
+ static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
85
+ static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): any;
86
+ static initComponentPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
87
+ static _initComponentPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer | undefined;
88
+ static initComponentListPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
89
+ static _initComponentListPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer[];
90
+ static initBlogPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
91
+ static _initBlogPropValue(propValue: IkasBlog): IkasBlog;
92
+ static initBlogListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
93
+ static _initBlogListPropValue(propValue: IkasBlogListParams): IkasBlogList;
94
+ static initBlogCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
95
+ static _initBlogCategoryPropValue(propValue: IkasBlogCategory): IkasBlogCategory;
96
+ static initBlogCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
97
+ static _initBlogCategoryListPropValue(propValue: IkasBlogCategoryListParams): IkasBlogCategoryList;
98
+ }
99
+ export declare class IkasPageComponentPropValue {
100
+ pageComponent: IkasThemePageComponent;
101
+ component: IkasThemeComponent;
102
+ propValues: Record<string, any>;
103
+ constructor(data: Partial<IkasPageComponentPropValue>);
104
+ }
@@ -1,4 +1,4 @@
1
- import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProductDetail } from "../models/index";
1
+ import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProductDetail } from "../../models/index";
2
2
  export declare function getPlaceholderProduct(): IkasProductDetail;
3
3
  export declare function getPlaceholderCategory(): IkasCategory;
4
4
  export declare function getPlaceholderBrand(): IkasBrand;
@@ -0,0 +1,9 @@
1
+ import IkasPropValueProvider from "./index";
2
+ import { IkasAttributeListPropValue } from "../../../models/theme/page/component/prop-value/attribute-list";
3
+ import { IkasProductAttributeMap } from "../../../models/data/product/attribute-value/index";
4
+ export declare class IkasAttributeListPropValueProvider implements IkasPropValueProvider<IkasProductAttributeMap[]> {
5
+ private attributeListPropValue;
6
+ private pageSpecificData?;
7
+ constructor(prop: IkasAttributeListPropValue, pageSpecificData?: any);
8
+ getValue(): Promise<IkasProductAttributeMap[]>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IkasProductAttributeValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ import { IkasAttributePropValue } from "../../../models/theme/page/component/prop-value/attribute";
4
+ export declare class IkasAttributePropValueProvider implements IkasPropValueProvider<IkasProductAttributeValue[]> {
5
+ private attributePropValue;
6
+ private pageSpecificData?;
7
+ constructor(prop: IkasAttributePropValue, pageSpecificData?: any);
8
+ getValue(): Promise<IkasProductAttributeValue[]>;
9
+ }
@@ -1,4 +1,4 @@
1
- import { IkasBlogCategoryList, IkasBlogCategoryListPropValue } from "../../models/index";
1
+ import { IkasBlogCategoryList, IkasBlogCategoryListPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasBlogCategoryListPropValueProvider implements IkasPropValueProvider<IkasBlogCategoryList> {
4
4
  private blogCategoryListPropValue;
@@ -0,0 +1,8 @@
1
+ import { IkasBlogCategory, IkasBlogCategoryPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasBlogCategoryPropValueProvider implements IkasPropValueProvider<IkasBlogCategory | null> {
4
+ private blogCategoryPropValue;
5
+ private pageSpecificData?;
6
+ constructor(propValue: IkasBlogCategoryPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasBlogCategory | null>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { IkasBlogList, IkasBlogListPropValue, IkasThemePageType } from "../../models/index";
1
+ import { IkasBlogList, IkasBlogListPropValue, IkasThemePageType } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasBlogListPropValueProvider implements IkasPropValueProvider<IkasBlogList> {
4
4
  private pageType;
@@ -0,0 +1,8 @@
1
+ import { IkasBlog, IkasBlogPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasBlogPropValueProvider implements IkasPropValueProvider<IkasBlog | null> {
4
+ private blogPropValue;
5
+ private pageSpecificData?;
6
+ constructor(propValue: IkasBlogPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasBlog | null>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { IkasBrandList, IkasBrandListPropValue } from "../../models/index";
1
+ import { IkasBrandList, IkasBrandListPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasBrandListPropValueProvider implements IkasPropValueProvider<IkasBrandList> {
4
4
  private brandListPropValue;
@@ -0,0 +1,8 @@
1
+ import { IkasBrand, IkasBrandPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasBrandPropValueProvider implements IkasPropValueProvider<IkasBrand> {
4
+ private brandPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasBrandPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasBrand>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { IkasCategoryList, IkasCategoryListPropValue } from "../../models/index";
1
+ import { IkasCategoryList, IkasCategoryListPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasCategoryListPropValueProvider implements IkasPropValueProvider<IkasCategoryList> {
4
4
  private categoryListPropValue;
@@ -0,0 +1,8 @@
1
+ import { IkasCategory, IkasCategoryPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory | null> {
4
+ private categoryPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasCategoryPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasCategory | null>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { IkasCheckout } from "../../models/index";
1
+ import { IkasCheckout } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasCheckoutPropValueProvider implements IkasPropValueProvider<IkasCheckout | null> {
4
4
  }
@@ -1,6 +1,6 @@
1
- import { IkasTheme, IkasThemeCustomData, IkasThemePageType } from "../../models/index";
1
+ import { IkasTheme, IkasThemeCustomData, IkasThemePageType } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
- import { IkasPageDataProvider } from "../page-data-get";
3
+ import { IkasPageDataProvider } from "../page-data";
4
4
  export declare class IkasCustomPropValueProvider implements IkasPropValueProvider<CustomDataValue | undefined> {
5
5
  private value;
6
6
  private customData;
@@ -1,4 +1,4 @@
1
- import { IkasImage } from "../../models/index";
1
+ import { IkasImage } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasImageListPropValueProvider implements IkasPropValueProvider<IkasImage[]> {
4
4
  private imageListPropValue;
@@ -1,4 +1,4 @@
1
- import { IkasImage } from "../../models/index";
1
+ import { IkasImage } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasImagePropValueProvider implements IkasPropValueProvider<IkasImage> {
4
4
  private imagePropValue;
@@ -1,5 +1,5 @@
1
1
  import IkasPropValueProvider from "./index";
2
- import { IkasNavigationLink, IkasLinkPropValue, IkasTheme } from "../../models/index";
2
+ import { IkasNavigationLink, IkasLinkPropValue, IkasTheme } from "../../../models/index";
3
3
  export declare class IkasLinkPropValueProvider implements IkasPropValueProvider<IkasNavigationLink | IkasNavigationLink[]> {
4
4
  private linkPropValue;
5
5
  private theme;
@@ -0,0 +1,8 @@
1
+ import { IkasProductDetail, IkasProductDetailPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail | null> {
4
+ private productDetailPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasProductDetailPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasProductDetail | null>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { IkasProductList, IkasProductListPropValue, IkasThemePageType } from "../../models/index";
1
+ import { IkasProductList, IkasProductListPropValue, IkasThemePageType } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
3
  export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList> {
4
4
  private pageType;
@@ -8,7 +8,7 @@ import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
8
8
  import { IkasStorefrontThemeLocalization } from "../models/data/storefront/theme-localization/index";
9
9
  import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
10
10
  import { IkasThemeSettings, IkasThemeStockPreference } from "../models/theme/settings/index";
11
- export declare class IkasNextPageDataProvider {
11
+ export declare class SettingsHelper {
12
12
  static readLocalTheme(): Promise<IkasTheme>;
13
13
  static readSettingsFile(): Promise<any>;
14
14
  static getSettings(locale: string): Promise<SettingsData | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.168-alpha.22",
3
+ "version": "0.0.168-alpha.3",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1,35 +0,0 @@
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
- VIEW_LISTING = "VIEW_LISTING",
26
- CONTACT_FORM = "CONTACT_FORM"
27
- }
28
- export declare type IkasEventSubscriber = {
29
- id: string;
30
- callback: (event: IkasEvent) => void;
31
- };
32
- export declare type IkasEvent = {
33
- type: IkasEventType;
34
- data: any;
35
- };
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- declare type Props = {
3
- className?: string;
4
- };
5
- declare const SVGExternal: React.FC<Props>;
6
- export default SVGExternal;
@@ -1,8 +0,0 @@
1
- import { IkasAttributePropValue } from "../../theme/page/component/prop-value/attribute";
2
- import { IkasProductDetail } from "../product-detail/index";
3
- export declare class IkasAttributeDetail {
4
- productDetail: IkasProductDetail | null;
5
- attributePropValue: IkasAttributePropValue;
6
- constructor(productDetail: IkasProductDetail | null, attributePropValue: IkasAttributePropValue);
7
- get values(): import("../../index").IkasProductAttributeValue[];
8
- }
@@ -1,9 +0,0 @@
1
- import { IkasProductAttributeMap } from "../../data/index";
2
- import { IkasProductDetail } from "../product-detail/index";
3
- import { IkasAttributeListPropValue } from "../../theme/page/component/prop-value/attribute-list";
4
- export declare class IkasAttributeList {
5
- productDetail: IkasProductDetail | null;
6
- attributeListPropValue: IkasAttributeListPropValue;
7
- constructor(productDetail: IkasProductDetail | null, attributeListPropValue: IkasAttributeListPropValue);
8
- get values(): IkasProductAttributeMap[];
9
- }
@@ -1,55 +0,0 @@
1
- import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasThemeComponentProp, IkasThemeComponent, IkasThemePage, IkasMerchantSettings } from "../models/index";
2
- import { IkasThemePageSpecification } from "../models/theme/page/index";
3
- export declare class IkasPageDataProvider {
4
- theme: IkasTheme;
5
- pageType?: IkasThemePageType | null;
6
- pageParams: Record<string, any>;
7
- pageComponentPropValues: IkasPageComponentPropValue[];
8
- pageSpecificData?: any | null;
9
- merchantSettings?: IkasMerchantSettings | null;
10
- possiblePageTypes?: IkasThemePageType[];
11
- constructor(theme: IkasTheme, pageParams?: Record<string, any>, pageType?: IkasThemePageType);
12
- get page(): IkasThemePage | undefined;
13
- get nextPageData(): {
14
- props: {
15
- propValuesStr: string;
16
- pageSpecificDataStr: string;
17
- pageType: IkasThemePageType;
18
- pageTitle: string | null;
19
- pageDescription: string | null;
20
- settingsStr: string;
21
- merchantSettingsStr: string | null;
22
- configJson: {
23
- domain: string;
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
- stockPreference: import("../models/theme/settings/index").IkasThemeStockPreference;
36
- storefrontJSScripts: string[];
37
- translations: Record<string, any>;
38
- };
39
- };
40
- };
41
- get specification(): IkasThemePageSpecification | undefined;
42
- get pageComponents(): IkasThemePageComponent[];
43
- getMerchantSettings(): Promise<void>;
44
- getPageData(): Promise<void>;
45
- getPageSpecificData(): Promise<void>;
46
- getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
47
- getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
48
- private setPageMetaData;
49
- }
50
- export declare class IkasPageComponentPropValue {
51
- pageComponent: IkasThemePageComponent;
52
- component: IkasThemeComponent;
53
- propValues: Record<string, any>;
54
- constructor(data: Partial<IkasPageComponentPropValue>);
55
- }
@@ -1,58 +0,0 @@
1
- import { IkasThemePageType } from "../models/index";
2
- import { IkasCategoryListParams } from "../models/ui/category-list/index";
3
- import { IkasAttributeList } from "../models/ui/product-attribute-list/index";
4
- import { IkasProductListParams } from "../models/ui/product-list/index";
5
- import { NextRouter } from "next/router";
6
- import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList } from "../index";
7
- import { IkasPageComponentPropValue } from "./page-data-get";
8
- import { IkasAttributePropValueData } from "./prop-value/attribute";
9
- import { IkasAttributeListPropValueData } from "./prop-value/attribute-list";
10
- import { IkasBlogPropValueData } from "./prop-value/blog";
11
- import { IkasBlogCategoryPropValueData } from "./prop-value/blog-category";
12
- import { IkasBrandPropValueData } from "./prop-value/brand";
13
- import { IkasCategoryPropValueData } from "./prop-value/category";
14
- import { CustomDataValue } from "./prop-value/custom";
15
- import { IkasProductDetailData } from "./prop-value/product-detail";
16
- export declare class IkasPageDataInit {
17
- static pageSpecificData: any;
18
- static setPageSpecificData(pageSpecficicDataStr: string, pageType: IkasThemePageType, isBrowser: boolean): void;
19
- static isServer(): boolean;
20
- static initPropValues(propValuesStr: string, router: NextRouter, settingsStr: string, isBrowser?: boolean): IkasPageComponentPropValue[];
21
- static initBrandPropValue(prop: IkasThemeComponentProp, propValue: IkasBrandPropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
22
- static _initBrandPropValue(propValue: IkasBrandPropValueData): any;
23
- static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
24
- static _initBrandListPropValue(propValue: IkasBrandListParams): IkasBrandList;
25
- static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: IkasCategoryPropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
26
- static _initCategoryPropValue(propValue: IkasCategoryPropValueData): any;
27
- static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
28
- static _initCategoryListPropValue(propValue: IkasCategoryListParams): IkasCategoryList;
29
- static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter): void;
30
- static _initProductListPropValue(propValue: IkasProductListParams, router: NextRouter): IkasProductList;
31
- static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: IkasProductDetailData, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter): void;
32
- static _initProductDetailPropValue(propValue: IkasProductDetailData, router: NextRouter): IkasProductDetail;
33
- static _initProductDetailOnBrowser(productDetail: IkasProductDetail): void;
34
- static initAttributePropValue(prop: IkasThemeComponentProp, propValue: IkasAttributePropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
35
- static _initAttributePropValue(propValue: IkasAttributePropValueData): IkasAttributeDetail;
36
- static initAttributeListPropValue(prop: IkasThemeComponentProp, propValue: IkasAttributeListPropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
37
- static _initAttributeListPropValue(propValue: IkasAttributeListPropValueData): IkasAttributeList;
38
- static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
39
- static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
40
- static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
41
- static _initImagePropValue(propValue: any): IkasImage;
42
- static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
43
- static _initImageListPropValue(propValue: any): IkasImage[];
44
- static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
45
- static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): any;
46
- static initComponentPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
47
- static _initComponentPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer | undefined;
48
- static initComponentListPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
49
- static _initComponentListPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer[];
50
- static initBlogPropValue(prop: IkasThemeComponentProp, propValue: IkasBlogPropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
51
- static _initBlogPropValue(propValue: IkasBlogPropValueData): any;
52
- static initBlogListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
53
- static _initBlogListPropValue(propValue: IkasBlogListParams): IkasBlogList;
54
- static initBlogCategoryPropValue(prop: IkasThemeComponentProp, propValue: IkasBlogCategoryPropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
55
- static _initBlogCategoryPropValue(propValue: IkasBlogCategoryPropValueData): any;
56
- static initBlogCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
57
- static _initBlogCategoryListPropValue(propValue: IkasBlogCategoryListParams): IkasBlogCategoryList;
58
- }
@@ -1,12 +0,0 @@
1
- import { IkasProductDetail } from "../../models/index";
2
- import IkasPropValueProvider from "./index";
3
- import { IkasAttributeListPropValue } from "../../models/theme/page/component/prop-value/attribute-list";
4
- export declare class IkasAttributeListPropValueProvider implements IkasPropValueProvider<IkasAttributeListPropValueData> {
5
- private attributeListPropValue;
6
- constructor(prop: IkasAttributeListPropValue);
7
- getValue(): Promise<IkasAttributeListPropValueData>;
8
- }
9
- export declare type IkasAttributeListPropValueData = {
10
- productDetail: IkasProductDetail | null;
11
- attributeListPropValue: IkasAttributeListPropValue;
12
- };