@ikas/storefront 0.0.122 → 0.0.124

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.
@@ -9,6 +9,7 @@ export declare class IkasThemeComponentProp {
9
9
  }
10
10
  export declare enum IkasThemeComponentPropType {
11
11
  TEXT = "TEXT",
12
+ RICH_TEXT = "RICH_TEXT",
12
13
  BOOLEAN = "BOOLEAN",
13
14
  IMAGE = "IMAGE",
14
15
  IMAGE_LIST = "IMAGE_LIST",
@@ -21,5 +22,7 @@ export declare enum IkasThemeComponentPropType {
21
22
  CATEGORY = "CATEGORY",
22
23
  CATEGORY_LIST = "CATEGORY_LIST",
23
24
  COLOR = "COLOR",
24
- CUSTOM = "CUSTOM"
25
+ CUSTOM = "CUSTOM",
26
+ COMPONENT = "COMPONENT",
27
+ COMPONENT_LIST = "COMPONENT_LIST"
25
28
  }
@@ -13,6 +13,7 @@ export declare class IkasThemeCustomData {
13
13
  }
14
14
  export declare enum IkasThemeCustomDataType {
15
15
  TEXT = "TEXT",
16
+ RICH_TEXT = "RICH_TEXT",
16
17
  NUMBER = "NUMBER",
17
18
  BOOLEAN = "BOOLEAN",
18
19
  IMAGE = "IMAGE",
@@ -26,6 +27,8 @@ export declare enum IkasThemeCustomDataType {
26
27
  CATEGORY = "CATEGORY",
27
28
  CATEGORY_LIST = "CATEGORY_LIST",
28
29
  COLOR = "COLOR",
30
+ COMPONENT = "COMPONENT",
31
+ COMPONENT_LIST = "COMPONENT_LIST",
29
32
  OBJECT = "OBJECT",
30
33
  STATIC_LIST = "STATIC_LIST",
31
34
  DYNAMIC_LIST = "DYNAMIC_LIST"
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type RenderFunction = () => React.ReactNode;
3
+ export declare class IkasComponentRenderer {
4
+ render: RenderFunction;
5
+ constructor(render: RenderFunction);
6
+ }
7
+ export {};
@@ -13,3 +13,4 @@ export { ContactForm } from "./validator/form/contact-form";
13
13
  export { ForgotPasswordForm } from "./validator/form/forgot-password";
14
14
  export { RecoverPasswordForm } from "./validator/form/recover-password";
15
15
  export { AccountInfoForm } from "./validator/form/account-info";
16
+ export * from "./component-renderer/index";
@@ -9,9 +9,11 @@ export declare class IkasBaseStore {
9
9
  localeOptions: IkasLocaleOption[];
10
10
  showLocaleOptions: boolean;
11
11
  private localeChecked;
12
+ private settingsSet;
12
13
  constructor();
13
14
  checkLocalization(): Promise<void>;
14
15
  setLocalization(localeOption: IkasLocaleOption): void;
16
+ private setSettings;
15
17
  }
16
18
  declare type IkasLocaleOption = {
17
19
  readonly id: string;
@@ -1,5 +1,5 @@
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 } from "../../models/index";
2
+ import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasProductDetail, IkasThemeComponentProp, IkasThemeComponent, IkasProductList, IkasBrandList, IkasBrandListParams, IkasThemePage, IkasImage, IkasCategoryList, IkasBrand, IkasCategory, IkasThemeCustomData, IkasMerchantSettings, IkasThemeSettings, IkasComponentRenderer } from "../../models/index";
3
3
  import { IkasProductListParams } from "../../models/ui/product-list/index";
4
4
  import { IkasNavigationLink } from "../../models/ui/navigation-link/index";
5
5
  import { IkasCategoryListParams } from "../../models/ui/category-list/index";
@@ -46,7 +46,7 @@ export declare class IkasPageDataProvider {
46
46
  getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
47
47
  private setPageMetaData;
48
48
  static isServer(): boolean;
49
- static initPropValues(propValuesStr: string, router: NextRouter, isBrowser?: boolean): IkasPageComponentPropValue[];
49
+ static initPropValues(propValuesStr: string, router: NextRouter, settingsStr: string, isBrowser?: boolean): IkasPageComponentPropValue[];
50
50
  static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
51
51
  static _initBrandPropValue(propValue: IkasBrand): IkasBrand;
52
52
  static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
@@ -65,8 +65,12 @@ export declare class IkasPageDataProvider {
65
65
  static _initImagePropValue(propValue: any): IkasImage;
66
66
  static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
67
67
  static _initImageListPropValue(propValue: any): IkasImage[];
68
- static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
69
- static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, isBrowser?: boolean): any;
68
+ static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
69
+ static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): any;
70
+ static initComponentPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
71
+ static _initComponentPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer | undefined;
72
+ static initComponentListPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
73
+ static _initComponentListPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer[];
70
74
  }
71
75
  export declare class IkasPageComponentPropValue {
72
76
  pageComponent: IkasThemePageComponent;
@@ -1,5 +1,6 @@
1
1
  import { IkasTheme, IkasThemeCustomData, IkasThemePageType } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
+ import { IkasPageDataProvider } from "../page-data";
3
4
  export declare class IkasCustomPropValueProvider implements IkasPropValueProvider<CustomDataValue | undefined> {
4
5
  private value;
5
6
  private customData;
@@ -7,7 +8,8 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
7
8
  private pageType;
8
9
  private pageSpecificData?;
9
10
  private pageParams?;
10
- constructor(value: any, customData: IkasThemeCustomData, theme: IkasTheme, pageType: IkasThemePageType, pageSpecificData?: any, pageParams?: Record<string, any>);
11
+ private pageDataProvider;
12
+ constructor(value: any, customData: IkasThemeCustomData, theme: IkasTheme, pageType: IkasThemePageType, pageDataProvider: IkasPageDataProvider, pageSpecificData?: any, pageParams?: Record<string, any>);
11
13
  getValue(): Promise<CustomDataValue | undefined>;
12
14
  private getBooleanValue;
13
15
  private getBrandListPropValue;
@@ -15,6 +17,7 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
15
17
  private getCategoryListPropValue;
16
18
  private getCategoryPropValue;
17
19
  private getColorPropValue;
20
+ private getRichTextPropValue;
18
21
  private getImageListPropValue;
19
22
  private getImagePropValue;
20
23
  private getLinkPropValue;
@@ -23,6 +26,7 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
23
26
  private getTextValue;
24
27
  private getObjectValue;
25
28
  private getArrayValue;
29
+ private getComponentListValue;
26
30
  }
27
31
  export declare type CustomDataValue = {
28
32
  value: any;
@@ -0,0 +1,6 @@
1
+ import IkasPropValueProvider from "./index";
2
+ export declare class IkasRichTextPropValueProvider implements IkasPropValueProvider<string> {
3
+ private text;
4
+ constructor(textPropValue: string);
5
+ getValue(): Promise<string>;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.122",
3
+ "version": "0.0.124",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",