@ikas/storefront 0.0.8 → 0.0.13

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.
@@ -1,6 +1,6 @@
1
1
  export declare class IkasProductAttributeValue {
2
2
  value: string | null;
3
- productAttributeId: string;
3
+ productAttributeId: string | null;
4
4
  productAttributeOptionId: string | null;
5
5
  constructor(data: Partial<IkasProductAttributeValue>);
6
6
  }
@@ -1,13 +1,16 @@
1
1
  export declare class IkasThemeComponentProp {
2
+ id: string;
2
3
  name: string;
3
4
  displayName: string;
4
5
  type: IkasThemeComponentPropType;
6
+ isRequired: boolean;
5
7
  constructor(data: Partial<IkasThemeComponentProp>);
6
8
  }
7
9
  export declare enum IkasThemeComponentPropType {
8
- IMAGE = "IMAGE",
9
10
  TEXT = "TEXT",
10
11
  BOOLEAN = "BOOLEAN",
12
+ IMAGE = "IMAGE",
13
+ IMAGE_LIST = "IMAGE_LIST",
11
14
  LINK = "LINK",
12
15
  LIST_OF_LINK = "LIST_OF_LINK",
13
16
  PRODUCT_DETAIL = "PRODUCT_DETAIL",
@@ -8,3 +8,5 @@ export { IkasBrandPropValue } from "./page/component/prop-value/brand";
8
8
  export { IkasBrandListPropValue } from "./page/component/prop-value/brand-list";
9
9
  export { IkasProductListPropValue } from "./page/component/prop-value/product-list";
10
10
  export { IkasProductDetailPropValue } from "./page/component/prop-value/product-detail";
11
+ export { IkasCategoryPropValue } from "./page/component/prop-value/category";
12
+ export { IkasCategoryListPropValue } from "./page/component/prop-value/category-list";
@@ -0,0 +1,9 @@
1
+ import { IkasCategoryListSortType, IkasCategoryListType } from "../../../../ui/category-list/index";
2
+ export declare class IkasCategoryListPropValue {
3
+ categoryListType: IkasCategoryListType;
4
+ initialSort?: IkasCategoryListSortType | null;
5
+ initialLimit?: number | null;
6
+ categoryCount?: number | null;
7
+ categoryIds?: string[] | null;
8
+ constructor(data: Partial<IkasCategoryListPropValue>);
9
+ }
@@ -0,0 +1,5 @@
1
+ export declare class IkasCategoryPropValue {
2
+ categoryId?: string | null;
3
+ usePageData?: boolean | null;
4
+ constructor(data: Partial<IkasCategoryPropValue>);
5
+ }
@@ -0,0 +1,58 @@
1
+ import { IkasCategory } from "../../data/index";
2
+ import { IkasCategoryListPropValue } from "../../theme/page/component/prop-value/category-list";
3
+ export declare class IkasCategoryList {
4
+ data: IkasCategory[];
5
+ private _type;
6
+ private _sort;
7
+ private _limit;
8
+ private _page;
9
+ private _count;
10
+ private _initialized;
11
+ private _minPage?;
12
+ private _categoryListPropValue;
13
+ private _isLoading;
14
+ constructor(data: IkasCategoryListParams);
15
+ get sort(): IkasCategoryListSortType;
16
+ get limit(): number;
17
+ get page(): number;
18
+ get count(): number;
19
+ get isInitialized(): boolean;
20
+ get isStatic(): boolean;
21
+ get hasPrev(): boolean;
22
+ get hasNext(): boolean;
23
+ get isLoading(): boolean;
24
+ getInitial: () => Promise<void>;
25
+ getPrev: () => Promise<void>;
26
+ getNext: () => Promise<void>;
27
+ getPage: (page: number) => Promise<void>;
28
+ toJSON(): {
29
+ data: IkasCategory[];
30
+ type: IkasCategoryListType;
31
+ sort: IkasCategoryListSortType;
32
+ limit: number;
33
+ page: number;
34
+ count: number;
35
+ initialized: boolean;
36
+ minPage: number | null | undefined;
37
+ categoryListPropValue: IkasCategoryListPropValue;
38
+ };
39
+ }
40
+ export declare type IkasCategoryListParams = {
41
+ data?: IkasCategory[];
42
+ type?: IkasCategoryListType;
43
+ sort?: IkasCategoryListSortType;
44
+ limit?: number;
45
+ page?: number;
46
+ count?: number;
47
+ initialized?: boolean;
48
+ minPage?: number;
49
+ categoryListPropValue: IkasCategoryListPropValue;
50
+ };
51
+ export declare enum IkasCategoryListType {
52
+ ALL = "ALL",
53
+ STATIC = "STATIC"
54
+ }
55
+ export declare enum IkasCategoryListSortType {
56
+ A_Z = "A_Z",
57
+ Z_A = "Z_A"
58
+ }
@@ -1,4 +1,5 @@
1
1
  export { IkasBrandList, IkasBrandListType, IkasBrandListSortType, } from "./brand-list/index";
2
+ export { IkasCategoryList, IkasCategoryListType, IkasCategoryListSortType, } from "./category-list/index";
2
3
  export type { IkasBrandListParams } from "./brand-list/index";
3
4
  export { IkasNavigationLink } from "./navigation-link/index";
4
5
  export { IkasProductDetail } from "./product-detail/index";
@@ -22,10 +22,12 @@ export declare class IkasPageDataProvider {
22
22
  static isServer(): boolean;
23
23
  static initPropValues(propValuesStr: string, router: NextRouter, queryParams?: Record<string, any>): IkasPageComponentPropValue[];
24
24
  static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
25
+ static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
25
26
  static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
26
27
  static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, queryParams: Record<string, any>, router: NextRouter): void;
27
28
  static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
28
29
  static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
30
+ static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
29
31
  }
30
32
  export declare class IkasPageComponentPropValue {
31
33
  pageComponent: IkasThemePageComponent;
@@ -0,0 +1,6 @@
1
+ import IkasPropValueProvider from "./index";
2
+ export declare class IkasBooleanPropValueProvider implements IkasPropValueProvider<boolean> {
3
+ private bool;
4
+ constructor(textPropValue: boolean);
5
+ getValue(): Promise<boolean>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { IkasCategoryList, IkasCategoryListPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasCategoryListPropValueProvider implements IkasPropValueProvider<IkasCategoryList> {
4
+ private categoryListPropValue;
5
+ constructor(categoryListPropValue: IkasCategoryListPropValue);
6
+ getValue(): Promise<IkasCategoryList>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { IkasCategory, IkasCategoryPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory> {
4
+ private categoryPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasCategoryPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasCategory>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { IkasImage } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasImageListPropValueProvider implements IkasPropValueProvider<IkasImage[]> {
4
+ private imageListPropValue;
5
+ constructor(imageListPropValue: string[]);
6
+ getValue(): Promise<IkasImage[]>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { IkasImage } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasImagePropValueProvider implements IkasPropValueProvider<IkasImage> {
4
+ private imagePropValue;
5
+ constructor(imagePropValue: string);
6
+ getValue(): Promise<IkasImage>;
7
+ }
@@ -3,7 +3,7 @@ import { IkasNavigationLink, IkasLinkPropValue, IkasTheme } from "../../../model
3
3
  export declare class IkasLinkPropValueProvider implements IkasPropValueProvider<IkasNavigationLink | IkasNavigationLink[]> {
4
4
  private linkPropValue;
5
5
  private theme;
6
- constructor(prop: IkasLinkPropValue | IkasLinkPropValue[], theme: IkasTheme);
6
+ constructor(linkPropValue: IkasLinkPropValue | IkasLinkPropValue[], theme: IkasTheme);
7
7
  private getNavigationLink;
8
8
  getValue(): Promise<IkasNavigationLink | IkasNavigationLink[]>;
9
9
  }
@@ -0,0 +1,6 @@
1
+ import IkasPropValueProvider from "./index";
2
+ export declare class IkasTextPropValueProvider 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.8",
3
+ "version": "0.0.13",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1,14 +0,0 @@
1
- import { IkasNavigationLink } from "../../../../ui/navigation-link/index";
2
- import { IkasProductDetail } from "../../../../ui/product-detail/index";
3
- import { IkasBrand } from "../../../../data/brand/index";
4
- import { IkasCategory } from "../../../../data/category/index";
5
- export declare type IkasText = string;
6
- export declare type IkasBoolean = boolean;
7
- export declare class IkasLink extends IkasNavigationLink {
8
- }
9
- export declare type IkasLinkList = IkasLink[];
10
- export declare class IkasProduct extends IkasProductDetail {
11
- }
12
- export declare type IkasProductList = IkasProduct[];
13
- export declare type IkasBrandList = IkasBrand[];
14
- export declare type IkasCategoryList = IkasCategory[];