@ikas/storefront 0.0.14 → 0.0.16-0.alpha-1
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 +214 -8
- package/build/analytics/analytics.d.ts +22 -0
- package/build/analytics/facebookPixel.d.ts +15 -0
- package/build/analytics/googleTagManager.d.ts +201 -0
- package/build/analytics/head/index.d.ts +7 -0
- package/build/analytics/index.d.ts +2 -0
- package/build/api/blog/__generated__/getBlog.d.ts +83 -0
- package/build/api/blog/__generated__/listBlog.d.ts +86 -0
- package/build/api/blog/__generated__/listBlogCategory.d.ts +38 -0
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +29 -0
- package/build/api/blog/index.d.ts +32 -0
- package/build/api/brand/__generated__/listProductBrand.d.ts +3 -2
- package/build/api/brand/index.d.ts +1 -0
- package/build/api/cart/__generated__/getCart.d.ts +7 -3
- package/build/api/cart/__generated__/saveItemToCart.d.ts +6 -3
- package/build/api/category/__generated__/listCategory.d.ts +4 -2
- package/build/api/category/__generated__/listCategoryPaths.d.ts +23 -0
- package/build/api/category/index.d.ts +3 -0
- package/build/api/checkout/__generated__/checkStocks.d.ts +3 -3
- package/build/api/checkout/__generated__/getCheckoutByCartId.d.ts +1 -1
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +5 -4
- package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +26 -0
- package/build/api/checkout/__generated__/listPaymentGateway.d.ts +14 -2
- package/build/api/checkout/__generated__/saveCheckout.d.ts +1 -1
- package/build/api/checkout/index.d.ts +11 -3
- package/build/api/city/__generated__/listCity.d.ts +1 -1
- package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +9 -0
- package/build/api/contact-form/index.d.ts +10 -0
- package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +3 -0
- package/build/api/country/__generated__/getMyCountry.d.ts +3 -0
- package/build/api/country/__generated__/listCountry.d.ts +8 -1
- package/build/api/country/index.d.ts +3 -2
- package/build/api/customer/__generated__/createCustomerEmailSubscription.d.ts +11 -0
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +215 -0
- package/build/api/customer/__generated__/customerLogin.d.ts +5 -3
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +3 -4
- package/build/api/customer/__generated__/getLastViewedProducts.d.ts +15 -0
- package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -2
- package/build/api/customer/__generated__/listOrderTransactions.d.ts +1 -1
- package/build/api/customer/__generated__/registerCustomer.d.ts +2 -2
- package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +11 -0
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +3 -2
- package/build/api/customer/index.d.ts +15 -0
- package/build/api/district/__generated__/listDistrict.d.ts +1 -1
- package/build/api/favorite-product/__generated__/isFavoriteProduct.d.ts +6 -0
- package/build/api/favorite-product/__generated__/listFavoriteProducts.d.ts +12 -0
- package/build/api/favorite-product/__generated__/saveFavoriteProduct.d.ts +7 -0
- package/build/api/favorite-product/index.d.ts +6 -0
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +2 -1
- package/build/api/html-meta-data/index.d.ts +1 -1
- package/build/api/index.d.ts +4 -3
- package/build/api/merchant/__generated__/listMerchantSettings.d.ts +1 -1
- package/build/api/product-attribute/__generated__/listProductAttribute.d.ts +2 -2
- package/build/api/product-search/__generated__/getProductFilterData.d.ts +50 -0
- package/build/api/product-search/__generated__/searchProducts.d.ts +26 -0
- package/build/api/product-search/index.d.ts +20 -0
- package/build/api/state/__generated__/listState.d.ts +1 -1
- package/build/api/stock-location/__generated__/listStockLocation.d.ts +1 -1
- package/build/api/storefront/__generated__/getStorefront.d.ts +41 -12
- package/build/api/storefront/index.d.ts +1 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +2 -2
- package/build/components/checkout/components/address-form/index.d.ts +3 -0
- package/build/components/checkout/components/address-form/model.d.ts +13 -2
- package/build/components/checkout/components/button/index.d.ts +4 -1
- package/build/components/checkout/components/cart-summary/cross.d.ts +6 -0
- package/build/components/checkout/components/cart-summary/tag.d.ts +6 -0
- package/build/components/checkout/components/checkbox/index.d.ts +2 -1
- package/build/components/checkout/components/error-container/customer-login-required-error/index.d.ts +6 -0
- package/build/components/checkout/components/error-container/payment-error/index.d.ts +2 -0
- package/build/components/checkout/components/form-item/model.d.ts +11 -2
- package/build/components/checkout/index.d.ts +5 -0
- package/build/components/checkout/model.d.ts +23 -10
- package/build/components/hoc/ThemeComponent.d.ts +2 -2
- package/build/components/image/index.d.ts +35 -0
- package/build/components/index.d.ts +1 -2
- package/build/components/page/head.d.ts +5 -0
- package/build/components/page/index.d.ts +6 -1
- package/build/components/page-editor/model.d.ts +6 -2
- package/build/index.d.ts +1 -0
- package/build/index.es.js +17677 -9251
- package/build/index.js +18351 -9889
- package/build/models/data/blog/index.d.ts +67 -0
- package/build/models/data/brand/index.d.ts +1 -1
- package/build/models/data/cart/index.d.ts +9 -0
- package/build/models/data/category/index.d.ts +22 -1
- package/build/models/data/checkout/index.d.ts +5 -0
- package/build/models/data/checkout-settings/index.d.ts +18 -0
- package/build/models/data/contact-form/index.d.ts +7 -0
- package/build/models/data/country/index.d.ts +2 -0
- package/build/models/data/customer/index.d.ts +7 -0
- package/build/models/data/favorite-product/index.d.ts +6 -0
- package/build/models/data/image/index.d.ts +1 -0
- package/build/models/data/index.d.ts +5 -1
- package/build/models/data/order/address/index.d.ts +6 -0
- package/build/models/data/order/index.d.ts +19 -1
- package/build/models/data/order/line-item/index.d.ts +18 -0
- package/build/models/data/order/refund/index.d.ts +6 -0
- package/build/models/data/order/refund/refund-line-item/index.d.ts +5 -0
- package/build/models/data/payment-gateway/index.d.ts +26 -2
- package/build/models/data/product/attribute-value/index.d.ts +15 -1
- package/build/models/data/product/index.d.ts +2 -1
- package/build/models/data/product/variant/index.d.ts +1 -0
- package/build/models/data/product/variant/price/index.d.ts +2 -0
- package/build/models/data/product-attribute/index.d.ts +5 -2
- package/build/models/data/product-attribute/product-attribute-table-cell/index.d.ts +5 -0
- package/build/models/data/product-attribute/product-attribute-table-template/index.d.ts +6 -0
- package/build/models/data/product-filter/index.d.ts +102 -0
- package/build/models/data/product-tag/index.d.ts +5 -0
- package/build/models/data/sales-channel/index.d.ts +18 -0
- package/build/models/data/simple-product/index.d.ts +135 -0
- package/build/models/data/storefront/{storefront-domain → domain}/index.d.ts +1 -0
- package/build/models/data/storefront/index.d.ts +17 -6
- package/build/models/data/storefront/localization/index.d.ts +7 -0
- package/build/models/data/storefront/routing/index.d.ts +9 -0
- package/build/models/data/storefront/theme/index.d.ts +13 -0
- package/build/models/data/storefront/theme-localization/index.d.ts +12 -0
- package/build/models/data/variant-type/variant-value/index.d.ts +1 -1
- package/build/models/theme/component/prop/index.d.ts +17 -1
- package/build/models/theme/custom-data/index.d.ts +24 -0
- package/build/models/theme/index.d.ts +4 -0
- package/build/models/theme/page/component/prop-value/attribute-list.d.ts +7 -0
- package/build/models/theme/page/component/prop-value/attribute.d.ts +7 -0
- package/build/models/theme/page/component/prop-value/blog-list.d.ts +9 -0
- package/build/models/theme/page/component/prop-value/blog.d.ts +5 -0
- package/build/models/theme/page/component/prop-value/product-list.d.ts +2 -0
- package/build/models/theme/page/index.d.ts +14 -1
- package/build/models/theme/settings/index.d.ts +7 -0
- package/build/models/theme/settings/prop/color/index.d.ts +7 -0
- package/build/models/theme/settings/prop/favicon/index.d.ts +4 -0
- package/build/models/theme/theme.d.ts +4 -0
- package/build/models/ui/blog-list/index.d.ts +56 -0
- package/build/models/ui/brand-list/index.d.ts +3 -0
- package/build/models/ui/category-list/index.d.ts +3 -0
- package/build/models/ui/component-renderer/index.d.ts +7 -0
- package/build/models/ui/index.d.ts +12 -2
- package/build/models/ui/product-detail/index.d.ts +14 -3
- package/build/models/ui/product-list/index.d.ts +62 -14
- package/build/models/ui/validator/form/account-info.d.ts +40 -0
- package/build/models/ui/validator/form/address.d.ts +75 -0
- package/build/models/ui/validator/form/contact-form.d.ts +45 -0
- package/build/models/ui/validator/form/forgot-password.d.ts +29 -0
- package/build/models/ui/validator/form/login.d.ts +35 -0
- package/build/models/ui/validator/form/recover-password.d.ts +36 -0
- package/build/models/ui/validator/form/register.d.ts +45 -0
- package/build/models/ui/validator/index.d.ts +27 -0
- package/build/models/ui/validator/rules/index.d.ts +87 -0
- package/build/pages/404.d.ts +13 -0
- package/build/pages/[slug]/index.d.ts +9 -3
- package/build/pages/account/addresses.d.ts +2 -0
- package/build/pages/account/favorite-products.d.ts +12 -0
- package/build/pages/account/forgot-password.d.ts +3 -0
- package/build/pages/account/index.d.ts +2 -0
- package/build/pages/account/login.d.ts +3 -0
- package/build/pages/account/orders/[id].d.ts +2 -0
- package/build/pages/account/orders/index.d.ts +2 -0
- package/build/pages/account/recover-password.d.ts +3 -0
- package/build/pages/account/register.d.ts +3 -0
- package/build/pages/blog/[slug].d.ts +18 -0
- package/build/pages/blog/index.d.ts +13 -0
- package/build/pages/cart.d.ts +12 -0
- package/build/pages/checkout/[id].d.ts +5 -0
- package/build/pages/home.d.ts +3 -0
- package/build/pages/index.d.ts +8 -2
- package/build/pages/{[slug]/[secondSlug].d.ts → pages/[slug].d.ts} +2 -0
- package/build/pages/search.d.ts +13 -0
- package/build/store/base.d.ts +17 -0
- package/build/store/customer.d.ts +31 -1
- package/build/storefront/index.d.ts +29 -3
- package/build/utils/helper.d.ts +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/providers/page-data.d.ts +62 -5
- package/build/utils/providers/placeholders.d.ts +5 -0
- package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
- package/build/utils/providers/prop-value/attribute.d.ts +9 -0
- package/build/utils/providers/prop-value/blog-list.d.ts +9 -0
- package/build/utils/providers/prop-value/blog.d.ts +8 -0
- package/build/utils/providers/prop-value/boolean.d.ts +1 -1
- package/build/utils/providers/prop-value/category.d.ts +2 -2
- package/build/utils/providers/prop-value/color.d.ts +6 -0
- package/build/utils/providers/prop-value/custom.d.ts +40 -0
- package/build/utils/providers/prop-value/product-detail.d.ts +2 -2
- package/build/utils/providers/prop-value/product-list.d.ts +1 -3
- package/build/utils/providers/prop-value/rich-text.d.ts +6 -0
- package/build/utils/settings.d.ts +168 -0
- package/package.json +3 -3
- package/build/api/product/__generated__/listProduct.d.ts +0 -90
- package/build/api/product/index.d.ts +0 -15
- package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +0 -13
- package/build/api/product-stock-location/index.d.ts +0 -4
- package/build/api/theme/index.d.ts +0 -4
- package/build/components/gtm/functions.d.ts +0 -164
- package/build/components/gtm/index.d.ts +0 -7
- package/build/models/data/storefront/stockfront-location/index.d.ts +0 -5
- package/build/models/data/storefront/stockfront-route/index.d.ts +0 -5
- package/build/models/data/storefront/storefront-region/index.d.ts +0 -18
- package/build/models/ui/product-list/filter.d.ts +0 -18
|
@@ -4,6 +4,9 @@ import { IkasThemePage } from "../../models/index";
|
|
|
4
4
|
declare type Props = {
|
|
5
5
|
propValuesStr: string;
|
|
6
6
|
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
merchantSettings: string;
|
|
9
|
+
configJson: Record<string, any>;
|
|
7
10
|
};
|
|
8
11
|
declare const Page: React.FC<Props>;
|
|
9
12
|
export default Page;
|
|
@@ -4,6 +4,9 @@ import { IkasThemePage } from "../../models/index";
|
|
|
4
4
|
declare type Props = {
|
|
5
5
|
propValuesStr: string;
|
|
6
6
|
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
merchantSettings: string;
|
|
9
|
+
configJson: Record<string, any>;
|
|
7
10
|
};
|
|
8
11
|
declare const Page: React.FC<Props>;
|
|
9
12
|
export default Page;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { GetStaticPaths, GetStaticProps } from "next";
|
|
4
|
+
import { IkasThemePage } from "../../models/index";
|
|
5
|
+
import { ParsedUrlQuery } from "querystring";
|
|
6
|
+
declare type Props = {
|
|
7
|
+
propValuesStr: string;
|
|
8
|
+
pageSpecificDataStr: string;
|
|
9
|
+
page: IkasThemePage;
|
|
10
|
+
queryParams?: ParsedUrlQuery;
|
|
11
|
+
settingsStr: string;
|
|
12
|
+
merchantSettings: string;
|
|
13
|
+
configJson: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: React.FunctionComponent<Props>;
|
|
16
|
+
export default _default;
|
|
17
|
+
export declare const getStaticPaths: GetStaticPaths;
|
|
18
|
+
export declare const getStaticProps: GetStaticProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps } from "next";
|
|
3
|
+
import { IkasThemePage } from "../../models/index";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
propValuesStr: string;
|
|
6
|
+
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
merchantSettings: string;
|
|
9
|
+
configJson: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
declare const Page: React.FC<Props>;
|
|
12
|
+
export default Page;
|
|
13
|
+
export declare const getStaticProps: GetStaticProps;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps } from "next";
|
|
3
|
+
import { IkasThemePage } from "../models/index";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
propValuesStr: string;
|
|
6
|
+
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
configJson: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
declare const Page: React.FC<Props>;
|
|
11
|
+
export default Page;
|
|
12
|
+
export declare const getStaticProps: GetStaticProps;
|
|
@@ -4,7 +4,12 @@ import { GetServerSideProps } from "next";
|
|
|
4
4
|
import { ParsedUrlQuery } from "querystring";
|
|
5
5
|
declare type Props = {
|
|
6
6
|
checkoutStr: string;
|
|
7
|
+
checkoutSettingsStr: string | null;
|
|
8
|
+
returnPolicy: string;
|
|
9
|
+
privacyPolicy: string;
|
|
10
|
+
termsOfService: string;
|
|
7
11
|
queryParams: ParsedUrlQuery;
|
|
12
|
+
configJson: Record<string, any>;
|
|
8
13
|
};
|
|
9
14
|
declare const _default: React.FunctionComponent<Props>;
|
|
10
15
|
export default _default;
|
package/build/pages/home.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ import { IkasThemePage } from "../models/index";
|
|
|
4
4
|
declare type Props = {
|
|
5
5
|
propValuesStr: string;
|
|
6
6
|
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
merchantSettings: string;
|
|
9
|
+
configJson: Record<string, any>;
|
|
7
10
|
};
|
|
8
11
|
declare const Page: React.FC<Props>;
|
|
9
12
|
export default Page;
|
package/build/pages/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as IndexPage from "./home";
|
|
2
2
|
import * as SlugPage from "./[slug]/index";
|
|
3
|
-
import * as CustomPage from "./[slug]
|
|
3
|
+
import * as CustomPage from "./pages/[slug]";
|
|
4
4
|
import * as CheckoutPage from "./checkout/[id]";
|
|
5
5
|
import * as AccountPage from "./account/index";
|
|
6
6
|
import * as AddressesPage from "./account/addresses";
|
|
@@ -10,5 +10,11 @@ import * as LoginPage from "./account/login";
|
|
|
10
10
|
import * as RegisterPage from "./account/register";
|
|
11
11
|
import * as ForgotPasswordPage from "./account/forgot-password";
|
|
12
12
|
import * as RecoverPasswordPage from "./account/recover-password";
|
|
13
|
+
import * as CartPage from "./cart";
|
|
13
14
|
import * as EditorPage from "./editor";
|
|
14
|
-
|
|
15
|
+
import * as FavoriteProductsPage from "./account/favorite-products";
|
|
16
|
+
import * as SearchPage from "./search";
|
|
17
|
+
import * as NotFoundPage from "./404";
|
|
18
|
+
import * as BlogPage from "./blog/index";
|
|
19
|
+
import * as BlogSlugPage from "./blog/[slug]";
|
|
20
|
+
export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps } from "next";
|
|
3
|
+
import { IkasThemePage } from "../models/index";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
propValuesStr: string;
|
|
6
|
+
page: IkasThemePage;
|
|
7
|
+
settingsStr: string;
|
|
8
|
+
merchantSettings: string;
|
|
9
|
+
configJson: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
declare const Page: React.FC<Props>;
|
|
12
|
+
export default Page;
|
|
13
|
+
export declare const getStaticProps: GetStaticProps;
|
package/build/store/base.d.ts
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { IkasCartStore } from "./cart";
|
|
2
2
|
import { IkasCustomerStore } from "./customer";
|
|
3
|
+
import { IkasThemePageType } from "../models/index";
|
|
4
|
+
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
3
5
|
export declare class IkasBaseStore {
|
|
4
6
|
readonly customerStore: IkasCustomerStore;
|
|
5
7
|
readonly cartStore: IkasCartStore;
|
|
8
|
+
currentPageType?: IkasThemePageType | null;
|
|
9
|
+
localeOptions: IkasLocaleOption[];
|
|
10
|
+
showLocaleOptions: boolean;
|
|
11
|
+
private localeChecked;
|
|
12
|
+
private settingsSet;
|
|
6
13
|
constructor();
|
|
14
|
+
checkLocalization(): Promise<void>;
|
|
15
|
+
setLocalization(localeOption: IkasLocaleOption): void;
|
|
16
|
+
private setSettings;
|
|
7
17
|
}
|
|
18
|
+
declare type IkasLocaleOption = {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly countryName?: string;
|
|
21
|
+
readonly routing: IkasStorefrontRouting;
|
|
22
|
+
readonly isRecommended: boolean;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IkasCustomer, IkasOrderTransaction } from "../models/index";
|
|
1
|
+
import { IkasCustomer, IkasFavoriteProduct, IkasOrderTransaction, IkasProduct } from "../models/index";
|
|
2
2
|
import { IkasBaseStore } from "./base";
|
|
3
3
|
export declare class IkasCustomerStore {
|
|
4
4
|
customer?: IkasCustomer | null;
|
|
@@ -6,10 +6,16 @@ export declare class IkasCustomerStore {
|
|
|
6
6
|
tokenExpiry?: number | null;
|
|
7
7
|
private baseStore?;
|
|
8
8
|
private _initialized;
|
|
9
|
+
private _visitorSubscribedEmail;
|
|
10
|
+
private _lastViewedProducts;
|
|
11
|
+
private _customerConsentGranted;
|
|
9
12
|
constructor(baseStore?: IkasBaseStore);
|
|
10
13
|
get initialized(): boolean;
|
|
14
|
+
get canCreateEmailSubscription(): boolean;
|
|
15
|
+
get customerConsentGranted(): boolean;
|
|
11
16
|
login: (email: string, password: string) => Promise<boolean>;
|
|
12
17
|
register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
|
|
18
|
+
saveContactForm: (input: SaveContactForm) => Promise<boolean | undefined>;
|
|
13
19
|
checkEmail: (email: string) => Promise<boolean>;
|
|
14
20
|
forgotPassword: (email: string) => Promise<boolean>;
|
|
15
21
|
recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
|
|
@@ -22,11 +28,35 @@ export declare class IkasCustomerStore {
|
|
|
22
28
|
id?: string;
|
|
23
29
|
orderId?: string;
|
|
24
30
|
}) => Promise<IkasOrderTransaction[]>;
|
|
31
|
+
getFavoriteProductsIds: () => Promise<IkasFavoriteProduct[]>;
|
|
32
|
+
getFavoriteProducts: () => Promise<IkasProduct[]>;
|
|
33
|
+
addItemToFavorite: (productId: string) => Promise<boolean>;
|
|
34
|
+
removeItemFromFavorite: (productId: string) => Promise<boolean>;
|
|
35
|
+
isProductFavorite: (productId: string) => Promise<boolean>;
|
|
36
|
+
createEmailSubscription: (email: string) => Promise<boolean>;
|
|
37
|
+
onCustomerConsentGrant: () => void;
|
|
25
38
|
private init;
|
|
26
39
|
private getCustomer;
|
|
27
40
|
private refreshToken;
|
|
28
41
|
private setCustomer;
|
|
29
42
|
private loadCustomer;
|
|
43
|
+
private getLastViewedProducts;
|
|
44
|
+
private saveLastViewedProducts;
|
|
45
|
+
private loadLastViewedProducts;
|
|
46
|
+
private removeLastViewedProducts;
|
|
47
|
+
private onProductView;
|
|
48
|
+
private saveLocalLastViewedProducts;
|
|
49
|
+
private saveCustomerConsent;
|
|
50
|
+
private loadCustomerConsent;
|
|
51
|
+
private removeCustomerConsent;
|
|
30
52
|
private setToken;
|
|
31
53
|
private loadToken;
|
|
54
|
+
private clearLocalData;
|
|
32
55
|
}
|
|
56
|
+
declare type SaveContactForm = {
|
|
57
|
+
firstName: string;
|
|
58
|
+
lastName: string;
|
|
59
|
+
email: string;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IkasSalesChannelPaymentGateway } from "../models/data/sales-channel/index";
|
|
2
|
+
import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
|
|
3
|
+
import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
|
|
2
4
|
import { IkasBaseStore } from "../store/index";
|
|
3
5
|
export declare class IkasStorefrontConfig {
|
|
4
6
|
static store: IkasBaseStore;
|
|
5
7
|
static components: any;
|
|
6
8
|
static config: Record<string, any>;
|
|
7
|
-
static localTheme: IkasTheme;
|
|
8
9
|
static apiUrlOverride: string | null;
|
|
9
|
-
static
|
|
10
|
+
static storefrontId?: string;
|
|
11
|
+
static storefrontRoutingId?: string;
|
|
12
|
+
static storefrontThemeId?: string;
|
|
13
|
+
static salesChannelId?: string;
|
|
14
|
+
static priceListId?: string;
|
|
15
|
+
static stockLocationIds?: string[];
|
|
16
|
+
static routings: IkasStorefrontRouting[];
|
|
17
|
+
static paymentGateways: IkasSalesChannelPaymentGateway[];
|
|
18
|
+
static gtmId?: string;
|
|
19
|
+
static fbpId?: string;
|
|
20
|
+
static favicon: IkasThemeFavicon;
|
|
21
|
+
static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
|
|
22
|
+
static initWithJson(json: Record<string, any>): void;
|
|
23
|
+
static getJson(): {
|
|
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
|
+
};
|
|
10
36
|
}
|
package/build/utils/helper.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare const stringToSlug: (str: string) => string;
|
|
|
2
2
|
export declare const validatePhoneNumber: (str: string) => boolean;
|
|
3
3
|
export declare const pascalCase: (str: string) => string;
|
|
4
4
|
export declare const decodeBase64: (base64: string) => string;
|
|
5
|
+
export declare function stringSorter(atitle: string, btitle: string): number;
|
package/build/utils/index.d.ts
CHANGED
|
@@ -1,33 +1,90 @@
|
|
|
1
1
|
import { NextRouter } from "next/router";
|
|
2
|
-
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasThemeComponentProp, IkasThemeComponent, IkasThemePage } from "../../models/index";
|
|
2
|
+
import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasProductDetail, IkasThemeComponentProp, IkasThemeComponent, IkasProductList, IkasBrandList, IkasBrandListParams, IkasThemePage, IkasImage, IkasCategoryList, IkasBrand, IkasCategory, IkasThemeCustomData, IkasMerchantSettings, IkasThemeSettings, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasProductAttributeValue, IkasProductAttribute } 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 } from "../../models/data/blog/index";
|
|
9
|
+
import { IkasProductAttributeMap } from "../../models/data/product/attribute-value/index";
|
|
3
10
|
export declare class IkasPageDataProvider {
|
|
4
11
|
theme: IkasTheme;
|
|
5
12
|
pageType?: IkasThemePageType | null;
|
|
6
13
|
pageParams: Record<string, any>;
|
|
7
14
|
pageComponentPropValues: IkasPageComponentPropValue[];
|
|
8
15
|
pageSpecificData?: any | null;
|
|
16
|
+
merchantSettings?: IkasMerchantSettings | null;
|
|
17
|
+
possiblePageTypes?: IkasThemePageType[];
|
|
9
18
|
constructor(theme: IkasTheme, pageParams?: Record<string, any>, pageType?: IkasThemePageType);
|
|
10
19
|
get page(): IkasThemePage | undefined;
|
|
11
20
|
get nextPageData(): {
|
|
12
21
|
props: {
|
|
13
22
|
propValuesStr: string;
|
|
23
|
+
pageSpecificDataStr: string;
|
|
14
24
|
page: IkasThemePage | null;
|
|
25
|
+
settingsStr: string;
|
|
26
|
+
merchantSettings: string | null;
|
|
27
|
+
configJson: {
|
|
28
|
+
storefrontId: string | null;
|
|
29
|
+
storefrontRoutingId: string | null;
|
|
30
|
+
storefrontThemeId: string | null;
|
|
31
|
+
salesChannelId: string | null;
|
|
32
|
+
priceListId: string | null;
|
|
33
|
+
stockLocationIds: string[] | null;
|
|
34
|
+
routings: any;
|
|
35
|
+
paymentGateways: any;
|
|
36
|
+
gtmId: string | null;
|
|
37
|
+
fbpId: string | null;
|
|
38
|
+
favicon: any;
|
|
39
|
+
};
|
|
15
40
|
};
|
|
16
41
|
};
|
|
17
|
-
get
|
|
42
|
+
get specification(): IkasThemePageSpecification | undefined;
|
|
43
|
+
get pageComponents(): IkasThemePageComponent[];
|
|
44
|
+
getMerchantSettings(): Promise<void>;
|
|
18
45
|
getPageData(): Promise<void>;
|
|
19
46
|
getPageSpecificData(): Promise<void>;
|
|
47
|
+
getPageSpecificProduct(): Promise<void>;
|
|
20
48
|
getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
|
|
21
49
|
getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
|
|
50
|
+
private setPageMetaData;
|
|
22
51
|
static isServer(): boolean;
|
|
23
|
-
static initPropValues(propValuesStr: string, router: NextRouter,
|
|
52
|
+
static initPropValues(propValuesStr: string, router: NextRouter, settingsStr: string, isBrowser?: boolean): IkasPageComponentPropValue[];
|
|
53
|
+
static initBrandPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
54
|
+
static _initBrandPropValue(propValue: IkasBrand): IkasBrand;
|
|
24
55
|
static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
56
|
+
static _initBrandListPropValue(propValue: IkasBrandListParams): IkasBrandList;
|
|
57
|
+
static initCategoryPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
58
|
+
static _initCategoryPropValue(propValue: IkasCategory): IkasCategory;
|
|
25
59
|
static initCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
26
|
-
static
|
|
27
|
-
static
|
|
60
|
+
static _initCategoryListPropValue(propValue: IkasCategoryListParams): IkasCategoryList;
|
|
61
|
+
static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter): void;
|
|
62
|
+
static _initProductListPropValue(propValue: IkasProductListParams, router: NextRouter): IkasProductList;
|
|
63
|
+
static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, isBrowser?: boolean): void;
|
|
64
|
+
static _initProductDetailPropValue(propValue: any, router: NextRouter, isBrowser?: boolean): IkasProductDetail;
|
|
65
|
+
static initAttributePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
66
|
+
static _initAttributePropValue(propValue: IkasProductAttributeValue[]): IkasProductAttributeValue[];
|
|
67
|
+
static initAttributeListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
68
|
+
static _initAttributeListPropValue(propValue: IkasProductAttributeMap[]): {
|
|
69
|
+
attribute: IkasProductAttribute;
|
|
70
|
+
values: IkasProductAttributeValue[];
|
|
71
|
+
}[];
|
|
28
72
|
static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
73
|
+
static _initLinkPropValue(propValue: any): IkasNavigationLink | IkasNavigationLink[] | undefined;
|
|
29
74
|
static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
75
|
+
static _initImagePropValue(propValue: any): IkasImage;
|
|
30
76
|
static initImageListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
77
|
+
static _initImageListPropValue(propValue: any): IkasImage[];
|
|
78
|
+
static initCustomDataPropValue(prop: IkasThemeComponentProp, customDataValue: CustomDataValue | undefined, pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
|
|
79
|
+
static _initCustomDataPropValue(customDataValue: CustomDataValue | undefined, customData: IkasThemeCustomData, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): any;
|
|
80
|
+
static initComponentPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
|
|
81
|
+
static _initComponentPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer | undefined;
|
|
82
|
+
static initComponentListPropValue(prop: IkasThemeComponentProp, propValue: IkasPageComponentPropValue[], pageComponentPropValue: IkasPageComponentPropValue, router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): void;
|
|
83
|
+
static _initComponentListPropValue(propValue: IkasPageComponentPropValue[], router: NextRouter, settings: IkasThemeSettings, isBrowser?: boolean): IkasComponentRenderer[];
|
|
84
|
+
static initBlogPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
85
|
+
static _initBlogPropValue(propValue: IkasBlog): IkasBlog;
|
|
86
|
+
static initBlogListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
87
|
+
static _initBlogListPropValue(propValue: IkasBlogListParams): IkasBlogList;
|
|
31
88
|
}
|
|
32
89
|
export declare class IkasPageComponentPropValue {
|
|
33
90
|
pageComponent: IkasThemePageComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IkasBlog, IkasBrand, IkasCategory, IkasProductDetail } from "../../models/index";
|
|
2
|
+
export declare function getPlaceholderProduct(): IkasProductDetail;
|
|
3
|
+
export declare function getPlaceholderCategory(): IkasCategory;
|
|
4
|
+
export declare function getPlaceholderBrand(): IkasBrand;
|
|
5
|
+
export declare function getPlaceholderBlog(): IkasBlog;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IkasBlogList, IkasBlogListPropValue, IkasThemePageType } from "../../../models/index";
|
|
2
|
+
import IkasPropValueProvider from "./index";
|
|
3
|
+
export declare class IkasBlogListPropValueProvider implements IkasPropValueProvider<IkasBlogList> {
|
|
4
|
+
private pageType;
|
|
5
|
+
private blogListPropValue;
|
|
6
|
+
private pageSpecificData?;
|
|
7
|
+
constructor(pageType: IkasThemePageType, brandListPropValue: IkasBlogListPropValue, pageSpecificData?: any);
|
|
8
|
+
getValue(): Promise<IkasBlogList>;
|
|
9
|
+
}
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import IkasPropValueProvider from "./index";
|
|
2
2
|
export declare class IkasBooleanPropValueProvider implements IkasPropValueProvider<boolean> {
|
|
3
3
|
private bool;
|
|
4
|
-
constructor(
|
|
4
|
+
constructor(boolPropValue: boolean);
|
|
5
5
|
getValue(): Promise<boolean>;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IkasCategory, IkasCategoryPropValue } from "../../../models/index";
|
|
2
2
|
import IkasPropValueProvider from "./index";
|
|
3
|
-
export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory> {
|
|
3
|
+
export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory | null> {
|
|
4
4
|
private categoryPropValue;
|
|
5
5
|
private pageSpecificData?;
|
|
6
6
|
constructor(prop: IkasCategoryPropValue, pageSpecificData?: any);
|
|
7
|
-
getValue(): Promise<IkasCategory>;
|
|
7
|
+
getValue(): Promise<IkasCategory | null>;
|
|
8
8
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IkasTheme, IkasThemeCustomData, IkasThemePageType } from "../../../models/index";
|
|
2
|
+
import IkasPropValueProvider from "./index";
|
|
3
|
+
import { IkasPageDataProvider } from "../page-data";
|
|
4
|
+
export declare class IkasCustomPropValueProvider implements IkasPropValueProvider<CustomDataValue | undefined> {
|
|
5
|
+
private value;
|
|
6
|
+
private customData;
|
|
7
|
+
private theme;
|
|
8
|
+
private pageType;
|
|
9
|
+
private pageSpecificData?;
|
|
10
|
+
private pageParams?;
|
|
11
|
+
private pageDataProvider;
|
|
12
|
+
constructor(value: any, customData: IkasThemeCustomData, theme: IkasTheme, pageType: IkasThemePageType, pageDataProvider: IkasPageDataProvider, pageSpecificData?: any, pageParams?: Record<string, any>);
|
|
13
|
+
getValue(): Promise<CustomDataValue | undefined>;
|
|
14
|
+
private getBooleanValue;
|
|
15
|
+
private getBrandListPropValue;
|
|
16
|
+
private getBrandPropValue;
|
|
17
|
+
private getCategoryListPropValue;
|
|
18
|
+
private getCategoryPropValue;
|
|
19
|
+
private getColorPropValue;
|
|
20
|
+
private getRichTextPropValue;
|
|
21
|
+
private getImageListPropValue;
|
|
22
|
+
private getImagePropValue;
|
|
23
|
+
private getLinkPropValue;
|
|
24
|
+
private getProductDetailPropValue;
|
|
25
|
+
private getProductListPropValue;
|
|
26
|
+
private getProductAttributePropValue;
|
|
27
|
+
private getProductAttributeListPropValue;
|
|
28
|
+
private getTextValue;
|
|
29
|
+
private getObjectValue;
|
|
30
|
+
private getArrayValue;
|
|
31
|
+
private getEnumValue;
|
|
32
|
+
private getCustomDataValue;
|
|
33
|
+
private getComponentListValue;
|
|
34
|
+
private getBlogValue;
|
|
35
|
+
private getBlogListValue;
|
|
36
|
+
}
|
|
37
|
+
export declare type CustomDataValue = {
|
|
38
|
+
value: any;
|
|
39
|
+
customData: IkasThemeCustomData;
|
|
40
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IkasProductDetail, IkasProductDetailPropValue } from "../../../models/index";
|
|
2
2
|
import IkasPropValueProvider from "./index";
|
|
3
|
-
export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail> {
|
|
3
|
+
export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail | null> {
|
|
4
4
|
private productDetailPropValue;
|
|
5
5
|
private pageSpecificData?;
|
|
6
6
|
constructor(prop: IkasProductDetailPropValue, pageSpecificData?: any);
|
|
7
|
-
getValue(): Promise<IkasProductDetail>;
|
|
7
|
+
getValue(): Promise<IkasProductDetail | null>;
|
|
8
8
|
}
|
|
@@ -3,9 +3,7 @@ import IkasPropValueProvider from "./index";
|
|
|
3
3
|
export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList> {
|
|
4
4
|
private pageType;
|
|
5
5
|
private productListPropValue;
|
|
6
|
-
private pageParams;
|
|
7
6
|
private pageSpecificData?;
|
|
8
|
-
|
|
9
|
-
constructor(pageType: IkasThemePageType, productListPropValue: IkasProductListPropValue, pageParams: Record<string, any>, pageSpecificData?: any, skipInitialFetch?: boolean);
|
|
7
|
+
constructor(pageType: IkasThemePageType, productListPropValue: IkasProductListPropValue, pageSpecificData?: any);
|
|
10
8
|
getValue(): Promise<IkasProductList>;
|
|
11
9
|
}
|