@ikas/storefront 0.2.0-alpha.1 → 0.2.0-alpha.10
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/__generated__/global-types.d.ts +22 -0
- package/build/analytics/analytics.d.ts +3 -2
- package/build/analytics/events.d.ts +1 -0
- package/build/analytics/ikas.d.ts +133 -0
- package/build/api/back-in-stock-reminder/__generated__/listProductBackInStockRemind.d.ts +24 -0
- package/build/api/back-in-stock-reminder/__generated__/saveProductBackInStockRemind.d.ts +19 -0
- package/build/api/back-in-stock-reminder/index.d.ts +23 -0
- package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +11 -0
- package/build/api/checkout/index.d.ts +1 -0
- package/build/api/customer-review/__generated__/createCustomerReview.d.ts +11 -0
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +25 -0
- package/build/api/customer-review/index.d.ts +24 -0
- package/build/api/index.d.ts +2 -0
- package/build/api/merchant/__generated__/listMerchantSettings.d.ts +0 -4
- package/build/api/merchant/index.d.ts +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +8 -0
- package/build/components/checkout/model.d.ts +2 -2
- package/build/components/page/index.d.ts +1 -0
- package/build/index.css +9 -4
- package/build/index.es.css +9 -4
- package/build/index.es.js +19153 -17755
- package/build/index.js +19142 -17737
- package/build/models/data/customer-review/index.d.ts +23 -0
- package/build/models/data/customer-review-settings/index.d.ts +4 -0
- package/build/models/data/index.d.ts +3 -1
- package/build/models/data/order/address/index.d.ts +2 -0
- package/build/models/data/order/index.d.ts +0 -2
- package/build/models/data/payment-gateway/index.d.ts +2 -0
- package/build/models/data/product/index.d.ts +1 -0
- package/build/models/data/product/variant/index.d.ts +7 -0
- package/build/models/data/product-back-in-stock-settings/index.d.ts +3 -0
- package/build/models/data/product-option-set/index.d.ts +1 -1
- package/build/models/ui/customer-review-list/index.d.ts +43 -0
- package/build/models/ui/index.d.ts +2 -0
- package/build/models/ui/product-detail/index.d.ts +4 -1
- package/build/models/ui/validator/form/customer-review.d.ts +37 -0
- package/build/pages/editor.d.ts +1 -0
- package/build/pages/index.d.ts +19 -20
- package/build/providers/page-data-get.d.ts +2 -0
- package/build/providers/page-data-init.d.ts +1 -1
- package/build/providers/page-data-next.d.ts +18 -2
- package/build/store/cart.d.ts +1 -0
- package/build/store/customer.d.ts +8 -0
- package/build/storefront/index.d.ts +8 -2
- package/package.json +5 -2
- package/build/providers/prop-value/checkout.d.ts +0 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class IkasCustomerReview {
|
|
2
|
+
comment: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
customerId: string;
|
|
5
|
+
deleted: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
orderId: string;
|
|
8
|
+
orderNumber: string;
|
|
9
|
+
productId: string;
|
|
10
|
+
salesChannelId: string;
|
|
11
|
+
star: number;
|
|
12
|
+
status: CustomerReviewStatusEnum;
|
|
13
|
+
storefrontId: string;
|
|
14
|
+
title: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
constructor(data: Partial<IkasCustomerReview>);
|
|
17
|
+
}
|
|
18
|
+
declare enum CustomerReviewStatusEnum {
|
|
19
|
+
APPROVED = "APPROVED",
|
|
20
|
+
REJECTED = "REJECTED",
|
|
21
|
+
WAITING = "WAITING"
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from "./blog/index";
|
|
2
2
|
export { IkasBrand } from "./brand/index";
|
|
3
|
-
export { IkasCategory } from "./category/index";
|
|
3
|
+
export { IkasCategory, IkasFilterCategory, IkasCategoryPath } from "./category/index";
|
|
4
4
|
export * from "./checkout/index";
|
|
5
5
|
export type { IkasCity } from "./city/index";
|
|
6
6
|
export * from "./customer/address/index";
|
|
7
7
|
export { IkasCustomer } from "./customer/index";
|
|
8
|
+
export { IkasCustomerReview } from "./customer-review/index";
|
|
9
|
+
export type { IkasCustomerReviewSettings } from "./customer-review-settings/index";
|
|
8
10
|
export type { IkasCountry } from "./country/index";
|
|
9
11
|
export type { IkasDistrict } from "./district/index";
|
|
10
12
|
export { IkasHTMLMetaData, IkasHTMLMetaDataTargetType } from "./html-meta-data/index";
|
|
@@ -29,6 +29,8 @@ declare type IkasOrderAddressLocation = {
|
|
|
29
29
|
id?: string;
|
|
30
30
|
name?: string;
|
|
31
31
|
code?: string;
|
|
32
|
+
iso2?: string;
|
|
33
|
+
iso3?: string;
|
|
32
34
|
};
|
|
33
35
|
export declare type IkasOrderAddressCountry = IkasOrderAddressLocation;
|
|
34
36
|
export declare type IkasOrderAddressCity = IkasOrderAddressLocation;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IkasOrderAddress } from "./address/index";
|
|
2
2
|
import { IkasOrderShippingLine } from "./shipping-line/index";
|
|
3
3
|
import { IkasOrderLineItem } from "./line-item/index";
|
|
4
|
-
import { IkasCustomerStore } from "../../../store/customer";
|
|
5
4
|
export declare class IkasOrder {
|
|
6
5
|
id: string;
|
|
7
6
|
orderNumber: string;
|
|
@@ -25,7 +24,6 @@ export declare class IkasOrder {
|
|
|
25
24
|
taxLines: IkasOrderTaxLine[] | null;
|
|
26
25
|
orderPackages: IkasOrderPackage[] | null;
|
|
27
26
|
currencyRates: IkasOrderCurrencyRate[] | null;
|
|
28
|
-
customerStore: IkasCustomerStore;
|
|
29
27
|
private _refundSettings;
|
|
30
28
|
constructor(data: IkasOrder);
|
|
31
29
|
get refundableItems(): IkasOrderLineItem[];
|
|
@@ -11,6 +11,8 @@ export declare class IkasPaymentGateway {
|
|
|
11
11
|
description: string | null;
|
|
12
12
|
additionalPrices: IkasPaymentGatewayAdditionalPrice[] | null;
|
|
13
13
|
translations: IkasPaymentGatewayTranslation[] | null;
|
|
14
|
+
supportedCurrencies: string[];
|
|
15
|
+
availableCountries: string[];
|
|
14
16
|
constructor(data: Partial<IkasPaymentGateway>);
|
|
15
17
|
getCalculatedAdditionalPrices(totalFinalPrice: number, shippingLines: IkasOrderShippingLine[] | null): {
|
|
16
18
|
name: string;
|
|
@@ -23,6 +23,7 @@ export declare class IkasProduct {
|
|
|
23
23
|
productOptionSet?: IkasProductOptionSet | null;
|
|
24
24
|
constructor(data?: Partial<IkasProduct>);
|
|
25
25
|
get hasVariant(): boolean;
|
|
26
|
+
get hasStock(): boolean;
|
|
26
27
|
get mainVariantType(): import("../index").IkasVariantType | undefined;
|
|
27
28
|
get href(): string;
|
|
28
29
|
}
|
|
@@ -12,6 +12,13 @@ export declare class IkasProductVariant {
|
|
|
12
12
|
price: IkasProductPrice;
|
|
13
13
|
stock: number;
|
|
14
14
|
isActive: boolean;
|
|
15
|
+
productId: string;
|
|
16
|
+
private _backInStockReminderSaved;
|
|
15
17
|
constructor(data?: Partial<IkasProductVariant>);
|
|
16
18
|
get mainImage(): IkasImage | undefined;
|
|
19
|
+
get hasStock(): boolean;
|
|
20
|
+
get isBackInStockEnabled(): boolean;
|
|
21
|
+
get isBackInStockCustomerLoginRequired(): boolean | null;
|
|
22
|
+
get isBackInStockReminderSaved(): boolean;
|
|
23
|
+
saveBackInStockReminder(email: string): Promise<boolean>;
|
|
17
24
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IkasCustomerReview } from "../../data/customer-review/index";
|
|
2
|
+
export declare class IkasCustomerReviewList {
|
|
3
|
+
data: IkasCustomerReview[];
|
|
4
|
+
private _limit;
|
|
5
|
+
private _page;
|
|
6
|
+
private _count;
|
|
7
|
+
private _initialized;
|
|
8
|
+
private _minPage?;
|
|
9
|
+
private _productId;
|
|
10
|
+
private _isLoading;
|
|
11
|
+
constructor(data: IkasCustomerReviewListParams);
|
|
12
|
+
get limit(): number;
|
|
13
|
+
get page(): number;
|
|
14
|
+
get count(): number;
|
|
15
|
+
get pageCount(): number;
|
|
16
|
+
get isInitialized(): boolean;
|
|
17
|
+
get hasPrev(): boolean;
|
|
18
|
+
get hasNext(): boolean;
|
|
19
|
+
get isLoading(): boolean;
|
|
20
|
+
private listCustomerReviews;
|
|
21
|
+
private getInitial;
|
|
22
|
+
getPrev: () => Promise<void>;
|
|
23
|
+
getNext: () => Promise<void>;
|
|
24
|
+
getPage: (page: number) => Promise<void>;
|
|
25
|
+
toJSON(): {
|
|
26
|
+
data: IkasCustomerReview[];
|
|
27
|
+
limit: number;
|
|
28
|
+
page: number;
|
|
29
|
+
count: number;
|
|
30
|
+
initialized: boolean;
|
|
31
|
+
minPage: number | null | undefined;
|
|
32
|
+
productId: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare type IkasCustomerReviewListParams = {
|
|
36
|
+
data?: IkasCustomerReview[];
|
|
37
|
+
limit?: number;
|
|
38
|
+
page?: number;
|
|
39
|
+
count?: number;
|
|
40
|
+
initialized?: boolean;
|
|
41
|
+
minPage?: number;
|
|
42
|
+
productId: string;
|
|
43
|
+
};
|
|
@@ -8,6 +8,7 @@ export { IkasProductDetail, IkasDisplayedVariantType, IkasDisplayedVariantValue,
|
|
|
8
8
|
export { IkasProductList, IkasProductListType, IkasProductListSortType, } from "./product-list/index";
|
|
9
9
|
export * from "./product-attribute-detail/index";
|
|
10
10
|
export * from "./product-attribute-list/index";
|
|
11
|
+
export * from "./customer-review-list/index";
|
|
11
12
|
export { Validator, ValidationStatus } from "./validator/index";
|
|
12
13
|
export * from "./validator/rules/index";
|
|
13
14
|
export { LoginForm } from "./validator/form/login";
|
|
@@ -17,4 +18,5 @@ export { ContactForm } from "./validator/form/contact-form";
|
|
|
17
18
|
export { ForgotPasswordForm } from "./validator/form/forgot-password";
|
|
18
19
|
export { RecoverPasswordForm } from "./validator/form/recover-password";
|
|
19
20
|
export { AccountInfoForm } from "./validator/form/account-info";
|
|
21
|
+
export { CustomerReviewForm } from "./validator/form/customer-review";
|
|
20
22
|
export * from "./component-renderer/index";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IkasProduct, IkasVariantValue } from "../../index";
|
|
1
|
+
import { IkasProduct, IkasVariantValue, IkasCustomerReviewList } from "../../index";
|
|
2
2
|
import { NextRouter } from "next/router";
|
|
3
3
|
import { IkasProductVariant, IkasVariantType } from "../../data/index";
|
|
4
4
|
export declare class IkasProductDetail {
|
|
@@ -11,6 +11,9 @@ export declare class IkasProductDetail {
|
|
|
11
11
|
get href(): string;
|
|
12
12
|
get hasStock(): boolean;
|
|
13
13
|
get displayedVariantTypes(): IkasDisplayedVariantType[];
|
|
14
|
+
get isCustomerReviewEnabled(): boolean;
|
|
15
|
+
get isCustomerReviewLoginRequired(): boolean;
|
|
16
|
+
getCustomerReviews(): Promise<IkasCustomerReviewList>;
|
|
14
17
|
selectVariantValue(variantValue: IkasVariantValue): void;
|
|
15
18
|
}
|
|
16
19
|
export declare type IkasDisplayedVariantValue = {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IkasBaseStore } from "../../../../store/index";
|
|
2
|
+
declare type CustomerReviewFormProps<T> = {
|
|
3
|
+
productId: string;
|
|
4
|
+
message: {
|
|
5
|
+
starRule: ((model: T) => string) | string;
|
|
6
|
+
};
|
|
7
|
+
store: IkasBaseStore;
|
|
8
|
+
};
|
|
9
|
+
declare type CustomerReviewFormModel = {
|
|
10
|
+
title: string;
|
|
11
|
+
comment: string;
|
|
12
|
+
star: number;
|
|
13
|
+
};
|
|
14
|
+
export declare class CustomerReviewForm {
|
|
15
|
+
private productId;
|
|
16
|
+
private model;
|
|
17
|
+
private validator;
|
|
18
|
+
private store;
|
|
19
|
+
constructor(props: CustomerReviewFormProps<CustomerReviewFormModel>);
|
|
20
|
+
get title(): string;
|
|
21
|
+
set title(value: string);
|
|
22
|
+
get comment(): string;
|
|
23
|
+
set comment(value: string);
|
|
24
|
+
get star(): number;
|
|
25
|
+
set star(value: number);
|
|
26
|
+
get hasError(): boolean;
|
|
27
|
+
get starErrorMessage(): string | undefined;
|
|
28
|
+
onTitleChange: (value: string) => void;
|
|
29
|
+
onCommentChange: (value: string) => void;
|
|
30
|
+
onStarChange: (value: number) => void;
|
|
31
|
+
validateAll(): Promise<boolean>;
|
|
32
|
+
submit(): Promise<{
|
|
33
|
+
isFormError: boolean;
|
|
34
|
+
isSuccess: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
package/build/pages/editor.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { GetStaticProps } from "next";
|
|
3
3
|
declare type Props = {
|
|
4
4
|
configJson: Record<string, any>;
|
|
5
|
+
components?: Record<string, any>;
|
|
5
6
|
};
|
|
6
7
|
export declare const getStaticProps: GetStaticProps;
|
|
7
8
|
declare const _default: React.FunctionComponent<Props>;
|
package/build/pages/index.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, };
|
|
1
|
+
export * as IndexPage from "./home";
|
|
2
|
+
export * as SlugPage from "./[slug]/index";
|
|
3
|
+
export * as CustomPage from "./pages/[slug]";
|
|
4
|
+
export * as CheckoutPage from "./checkout";
|
|
5
|
+
export * as AccountPage from "./account/index";
|
|
6
|
+
export * as AddressesPage from "./account/addresses";
|
|
7
|
+
export * as OrdersPage from "./account/orders/index";
|
|
8
|
+
export * as OrderDetailPage from "./account/orders/[id]";
|
|
9
|
+
export * as LoginPage from "./account/login";
|
|
10
|
+
export * as RegisterPage from "./account/register";
|
|
11
|
+
export * as ForgotPasswordPage from "./account/forgot-password";
|
|
12
|
+
export * as RecoverPasswordPage from "./account/recover-password";
|
|
13
|
+
export * as CartPage from "./cart";
|
|
14
|
+
export * as EditorPage from "./editor";
|
|
15
|
+
export * as FavoriteProductsPage from "./account/favorite-products";
|
|
16
|
+
export * as SearchPage from "./search";
|
|
17
|
+
export * as NotFoundPage from "./404";
|
|
18
|
+
export * as BlogPage from "./blog/index";
|
|
19
|
+
export * as BlogSlugPage from "./blog/[slug]";
|
|
@@ -35,6 +35,8 @@ export declare class IkasPageDataProvider {
|
|
|
35
35
|
stockPreference: import("../models/theme/settings/index").IkasThemeStockPreference;
|
|
36
36
|
storefrontJSScripts: string[];
|
|
37
37
|
translations: Record<string, any>;
|
|
38
|
+
customerReviewSettings: import("../models/index").IkasCustomerReviewSettings | null;
|
|
39
|
+
productBackInStockSettings: any;
|
|
38
40
|
};
|
|
39
41
|
};
|
|
40
42
|
};
|
|
@@ -3,7 +3,7 @@ import { IkasCategoryListParams } from "../models/ui/category-list/index";
|
|
|
3
3
|
import { IkasAttributeList } from "../models/ui/product-attribute-list/index";
|
|
4
4
|
import { IkasProductListParams } from "../models/ui/product-list/index";
|
|
5
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";
|
|
6
|
+
import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList } from "../models/index";
|
|
7
7
|
import { IkasPageComponentPropValue } from "./page-data-get";
|
|
8
8
|
import { IkasAttributePropValueData } from "./prop-value/attribute";
|
|
9
9
|
import { IkasAttributeListPropValueData } from "./prop-value/attribute-list";
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { GetServerSidePropsContext, GetStaticPropsContext } from "next";
|
|
3
3
|
import { ParsedUrlQuery } from "querystring";
|
|
4
|
-
import { IkasTheme, IkasThemePageType } from "../models/index";
|
|
4
|
+
import { IkasTheme, IkasThemePageType, IkasCustomerReviewSettings } from "../models/index";
|
|
5
5
|
import { IkasStorefront } from "../models/data/storefront/index";
|
|
6
6
|
import { IkasSalesChannel } from "../models/data/sales-channel/index";
|
|
7
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
|
+
import { IkasProductBackInStockSettings } from "../models/data/product-back-in-stock-settings/index";
|
|
11
12
|
export declare class IkasNextPageDataProvider {
|
|
12
13
|
static readLocalTheme(): Promise<IkasTheme>;
|
|
13
|
-
static readSettingsFile(): Promise<
|
|
14
|
+
static readSettingsFile(): Promise<SettingsData | null>;
|
|
14
15
|
static getSettings(locale: string): Promise<SettingsData | null>;
|
|
15
16
|
static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemePageType, possiblePageTypes?: IkasThemePageType[], isEditor?: boolean): Promise<{
|
|
16
17
|
props: {};
|
|
@@ -41,6 +42,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
41
42
|
stockPreference: IkasThemeStockPreference;
|
|
42
43
|
storefrontJSScripts: string[];
|
|
43
44
|
translations: Record<string, any>;
|
|
45
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
46
|
+
productBackInStockSettings: any;
|
|
44
47
|
};
|
|
45
48
|
};
|
|
46
49
|
notFound?: undefined;
|
|
@@ -70,6 +73,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
70
73
|
stockPreference: IkasThemeStockPreference;
|
|
71
74
|
storefrontJSScripts: string[];
|
|
72
75
|
translations: Record<string, any>;
|
|
76
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
77
|
+
productBackInStockSettings: any;
|
|
73
78
|
};
|
|
74
79
|
};
|
|
75
80
|
revalidate: number;
|
|
@@ -108,6 +113,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
108
113
|
stockPreference: IkasThemeStockPreference;
|
|
109
114
|
storefrontJSScripts: string[];
|
|
110
115
|
translations: Record<string, any>;
|
|
116
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
117
|
+
productBackInStockSettings: any;
|
|
111
118
|
};
|
|
112
119
|
};
|
|
113
120
|
notFound?: undefined;
|
|
@@ -137,6 +144,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
137
144
|
stockPreference: IkasThemeStockPreference;
|
|
138
145
|
storefrontJSScripts: string[];
|
|
139
146
|
translations: Record<string, any>;
|
|
147
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
148
|
+
productBackInStockSettings: any;
|
|
140
149
|
};
|
|
141
150
|
};
|
|
142
151
|
revalidate: number;
|
|
@@ -175,6 +184,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
175
184
|
stockPreference: IkasThemeStockPreference;
|
|
176
185
|
storefrontJSScripts: string[];
|
|
177
186
|
translations: Record<string, any>;
|
|
187
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
188
|
+
productBackInStockSettings: any;
|
|
178
189
|
};
|
|
179
190
|
};
|
|
180
191
|
notFound?: undefined;
|
|
@@ -204,6 +215,8 @@ export declare class IkasNextPageDataProvider {
|
|
|
204
215
|
stockPreference: IkasThemeStockPreference;
|
|
205
216
|
storefrontJSScripts: string[];
|
|
206
217
|
translations: Record<string, any>;
|
|
218
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
219
|
+
productBackInStockSettings: any;
|
|
207
220
|
};
|
|
208
221
|
};
|
|
209
222
|
revalidate: number;
|
|
@@ -220,8 +233,11 @@ export declare type SettingsData = {
|
|
|
220
233
|
themeLocalization: IkasStorefrontThemeLocalization;
|
|
221
234
|
salesChannel: IkasSalesChannel;
|
|
222
235
|
routing: IkasStorefrontRouting;
|
|
236
|
+
localizationMap?: Record<string, any>;
|
|
223
237
|
favicon: IkasThemeFavicon;
|
|
224
238
|
stockPreference: IkasThemeStockPreference;
|
|
225
239
|
storefrontJSScripts: string[];
|
|
226
240
|
domain: string;
|
|
241
|
+
productBackInStockSettings: IkasProductBackInStockSettings | null;
|
|
242
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
227
243
|
};
|
package/build/store/cart.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class IkasCartStore {
|
|
|
17
17
|
get checkoutUrl(): string | undefined;
|
|
18
18
|
private getCart;
|
|
19
19
|
private setCart;
|
|
20
|
+
private beforeCartOperationCheck;
|
|
20
21
|
addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<void>;
|
|
21
22
|
changeItemQuantity: (item: IkasOrderLineItem, quantity: number) => Promise<void>;
|
|
22
23
|
removeItem: (item: IkasOrderLineItem) => Promise<void>;
|
|
@@ -36,9 +36,11 @@ export declare class IkasCustomerStore {
|
|
|
36
36
|
removeItemFromFavorite: (productId: string) => Promise<boolean>;
|
|
37
37
|
isProductFavorite: (productId: string) => Promise<boolean>;
|
|
38
38
|
createEmailSubscription: (email: string) => Promise<boolean>;
|
|
39
|
+
sendReview: (input: IkasCustomerReviewForm) => Promise<false | import("../api/customer-review/__generated__/createCustomerReview").createCustomerReview_createCustomerReview | undefined>;
|
|
39
40
|
onCustomerConsentGrant: () => void;
|
|
40
41
|
waitUntilInitialized: () => Promise<unknown>;
|
|
41
42
|
private init;
|
|
43
|
+
private routeChangeInit;
|
|
42
44
|
private getCustomer;
|
|
43
45
|
private refreshToken;
|
|
44
46
|
private setCustomer;
|
|
@@ -62,3 +64,9 @@ export declare type IkasContactForm = {
|
|
|
62
64
|
email: string;
|
|
63
65
|
message: string;
|
|
64
66
|
};
|
|
67
|
+
export declare type IkasCustomerReviewForm = {
|
|
68
|
+
comment?: string;
|
|
69
|
+
productId: string;
|
|
70
|
+
star: number;
|
|
71
|
+
title?: string;
|
|
72
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { IkasProductBackInStockSettings } from "../models/data/product-back-in-stock-settings/index";
|
|
1
2
|
import { IkasSalesChannelPaymentGateway } from "../models/data/sales-channel/index";
|
|
2
3
|
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
3
4
|
import { IkasThemeStockPreference } from "../models/theme/settings/index";
|
|
4
5
|
import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
|
|
5
6
|
import { IkasBaseStore } from "../store/index";
|
|
7
|
+
import { IkasCustomerReviewSettings } from "../models/index";
|
|
6
8
|
export declare class IkasStorefrontConfig {
|
|
7
9
|
static store: IkasBaseStore;
|
|
8
|
-
static components: any;
|
|
9
10
|
static config: Record<string, any>;
|
|
10
11
|
static apiUrlOverride: string | null;
|
|
11
12
|
static domain: string;
|
|
@@ -24,7 +25,10 @@ export declare class IkasStorefrontConfig {
|
|
|
24
25
|
static translations: Record<string, any>;
|
|
25
26
|
static storefrontJSScripts: string[];
|
|
26
27
|
static isEditor: boolean;
|
|
27
|
-
static
|
|
28
|
+
static customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
29
|
+
static productBackInStockSettings: IkasProductBackInStockSettings | null;
|
|
30
|
+
static currentPageComponents?: Record<string, any>;
|
|
31
|
+
static init(store: IkasBaseStore, config: Record<string, any>, apiUrlOverride?: string): void;
|
|
28
32
|
static initWithJson(json: Record<string, any>): void;
|
|
29
33
|
static getCurrentLocale(): string;
|
|
30
34
|
static getJson(): {
|
|
@@ -43,5 +47,7 @@ export declare class IkasStorefrontConfig {
|
|
|
43
47
|
stockPreference: IkasThemeStockPreference;
|
|
44
48
|
storefrontJSScripts: string[];
|
|
45
49
|
translations: Record<string, any>;
|
|
50
|
+
customerReviewSettings: IkasCustomerReviewSettings | null;
|
|
51
|
+
productBackInStockSettings: any;
|
|
46
52
|
};
|
|
47
53
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.10",
|
|
4
4
|
"main": "./build/index.js",
|
|
5
5
|
"module": "./build/index.es.js",
|
|
6
6
|
"author": "Umut Ozan Yıldırım",
|
|
7
7
|
"license": "ISC",
|
|
8
|
+
"sideEffects": false,
|
|
8
9
|
"files": [
|
|
9
10
|
"/build"
|
|
10
11
|
],
|
|
11
12
|
"scripts": {
|
|
12
|
-
"build": "rm -rf
|
|
13
|
+
"build": "rm -rf build && rollup -c",
|
|
13
14
|
"prepare": "npm run build",
|
|
14
15
|
"lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
|
|
15
16
|
"test": "jest",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"@babel/core": "^7.11.6",
|
|
40
41
|
"@rollup/plugin-commonjs": "^17.1.0",
|
|
41
42
|
"@rollup/plugin-json": "^4.1.0",
|
|
43
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
|
42
44
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
|
43
45
|
"@testing-library/jest-dom": "^5.11.4",
|
|
44
46
|
"@testing-library/react": "^11.0.4",
|
|
@@ -80,6 +82,7 @@
|
|
|
80
82
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
81
83
|
"rollup-plugin-postcss": "^4.0.0",
|
|
82
84
|
"rollup-plugin-sass": "^1.2.2",
|
|
85
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
83
86
|
"rollup-plugin-typescript": "^1.0.1",
|
|
84
87
|
"rollup-plugin-typescript2": "^0.29.0",
|
|
85
88
|
"rollup-watch": "^4.3.1",
|