@ikas/storefront 0.0.15 → 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 +17665 -9253
- package/build/index.js +18346 -9898
- 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 +60 -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
|
@@ -1,23 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { StorefrontStatusTypes, StorefrontThemeStatus } from "../../../__generated__/global-types";
|
|
2
|
+
export interface getStorefront_getStorefront_localizations {
|
|
3
|
+
__typename: "StorefrontLocalization";
|
|
4
|
+
createdAt: any | null;
|
|
5
|
+
id: string;
|
|
6
|
+
isDefault: boolean;
|
|
4
7
|
locale: string;
|
|
5
|
-
|
|
6
|
-
returnPolicy: string | null;
|
|
7
|
-
termsOfService: string | null;
|
|
8
|
+
name: string;
|
|
8
9
|
}
|
|
9
|
-
export interface
|
|
10
|
-
__typename: "
|
|
11
|
-
|
|
10
|
+
export interface getStorefront_getStorefront_routings {
|
|
11
|
+
__typename: "StorefrontRouting";
|
|
12
|
+
countryCodes: string[] | null;
|
|
13
|
+
createdAt: any | null;
|
|
14
|
+
domain: string | null;
|
|
15
|
+
id: string;
|
|
16
|
+
locale: string;
|
|
17
|
+
path: string | null;
|
|
18
|
+
priceListId: string | null;
|
|
19
|
+
updatedAt: any | null;
|
|
20
|
+
}
|
|
21
|
+
export interface getStorefront_getStorefront_themes {
|
|
22
|
+
__typename: "StorefrontTheme";
|
|
23
|
+
createdAt: any | null;
|
|
24
|
+
id: string;
|
|
25
|
+
isMainTheme: boolean;
|
|
12
26
|
name: string;
|
|
27
|
+
status: StorefrontThemeStatus;
|
|
13
28
|
themeId: string;
|
|
14
29
|
themeVersionId: string;
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
updatedAt: any | null;
|
|
31
|
+
}
|
|
32
|
+
export interface getStorefront_getStorefront {
|
|
33
|
+
__typename: "Storefront";
|
|
34
|
+
createdAt: any | null;
|
|
35
|
+
emailSettingsId: string | null;
|
|
36
|
+
fbpId: string | null;
|
|
37
|
+
gtmId: string | null;
|
|
38
|
+
id: string;
|
|
39
|
+
localizations: getStorefront_getStorefront_localizations[];
|
|
40
|
+
mainStorefrontThemeId: string | null;
|
|
41
|
+
name: string;
|
|
42
|
+
salesChannelId: string;
|
|
43
|
+
routings: getStorefront_getStorefront_routings[];
|
|
44
|
+
status: StorefrontStatusTypes;
|
|
45
|
+
themes: getStorefront_getStorefront_themes[];
|
|
17
46
|
}
|
|
18
47
|
export interface getStorefront {
|
|
19
48
|
getStorefront: getStorefront_getStorefront;
|
|
20
49
|
}
|
|
21
50
|
export interface getStorefrontVariables {
|
|
22
|
-
|
|
51
|
+
id: string;
|
|
23
52
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringFilterInput, VariantSelectionTypeEnum } from "../../../__generated__/global-types";
|
|
2
2
|
export interface listVariantType_listVariantType_values {
|
|
3
3
|
__typename: "VariantValue";
|
|
4
|
-
id: string
|
|
4
|
+
id: string;
|
|
5
5
|
createdAt: any | null;
|
|
6
6
|
updatedAt: any | null;
|
|
7
7
|
deleted: boolean | null;
|
|
@@ -11,7 +11,7 @@ export interface listVariantType_listVariantType_values {
|
|
|
11
11
|
}
|
|
12
12
|
export interface listVariantType_listVariantType {
|
|
13
13
|
__typename: "VariantType";
|
|
14
|
-
id: string
|
|
14
|
+
id: string;
|
|
15
15
|
createdAt: any | null;
|
|
16
16
|
updatedAt: any | null;
|
|
17
17
|
deleted: boolean | null;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { IkasOrderAddress, IkasAddressValidationResult } from "../../../../models/data/order/address/index";
|
|
3
3
|
import { IkasCheckoutCustomer } from "../../../../models/index";
|
|
4
|
+
import CheckoutViewModel from "../../model";
|
|
4
5
|
declare type Props = {
|
|
6
|
+
vm: CheckoutViewModel;
|
|
5
7
|
address: IkasOrderAddress;
|
|
6
8
|
allowedCountryIds?: string[];
|
|
7
9
|
customer?: IkasCheckoutCustomer;
|
|
8
10
|
isErrorsVisible: boolean;
|
|
9
11
|
validationResult: IkasAddressValidationResult;
|
|
12
|
+
isBilling?: boolean;
|
|
10
13
|
};
|
|
11
14
|
export declare const AddressForm: React.FC<Props>;
|
|
12
15
|
export {};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { IkasOrderAddress } from "../../../../models/data/order/address/index";
|
|
2
2
|
import { IkasCountry, IkasState, IkasCity, IkasDistrict, IkasCheckoutCustomer } from "../../../../models/index";
|
|
3
|
+
import CheckoutViewModel from "../../model";
|
|
3
4
|
export default class AddressFormViewModel {
|
|
5
|
+
vm: CheckoutViewModel;
|
|
4
6
|
address: IkasOrderAddress;
|
|
5
|
-
customer?: IkasCheckoutCustomer;
|
|
7
|
+
customer?: IkasCheckoutCustomer | null;
|
|
6
8
|
countries: IkasCountry[];
|
|
7
9
|
states: IkasState[];
|
|
8
10
|
cities: IkasCity[];
|
|
9
11
|
districts: IkasDistrict[];
|
|
10
|
-
allowedCountryIds?: string[];
|
|
12
|
+
allowedCountryIds?: string[] | null;
|
|
13
|
+
isCorporate: boolean;
|
|
11
14
|
constructor(data: AddressFormViewModelParams);
|
|
12
15
|
get firstName(): string | null | undefined;
|
|
13
16
|
get lastName(): string | null | undefined;
|
|
14
17
|
get phone(): string | null | undefined;
|
|
18
|
+
get identityNumber(): string | null | undefined;
|
|
15
19
|
get country(): {
|
|
16
20
|
id?: string | undefined;
|
|
17
21
|
name?: string | undefined;
|
|
@@ -61,6 +65,7 @@ export default class AddressFormViewModel {
|
|
|
61
65
|
onFirstNameChange: (value: string) => void;
|
|
62
66
|
onLastNameChange: (value: string) => void;
|
|
63
67
|
onPhoneChange: (value: string) => void;
|
|
68
|
+
onIdentityNumberChange: (value: string) => void;
|
|
64
69
|
onAddressLine1Change: (value: string) => void;
|
|
65
70
|
onAddressLine2Change: (value: string) => void;
|
|
66
71
|
onAddressPostalCodeChange: (value: string) => void;
|
|
@@ -69,8 +74,14 @@ export default class AddressFormViewModel {
|
|
|
69
74
|
onCityChange: (cityId: string) => void;
|
|
70
75
|
onDistrictChange: (districtId: string) => void;
|
|
71
76
|
onDistrictInputChange: (value: string) => void;
|
|
77
|
+
onCorporateChange: (value: boolean) => void;
|
|
78
|
+
onCompanyChange: (value: string) => void;
|
|
79
|
+
onTaxNumberChange: (value: string) => void;
|
|
80
|
+
onTaxOfficeChange: (value: string) => void;
|
|
72
81
|
}
|
|
73
82
|
interface AddressFormViewModelParams extends Partial<AddressFormViewModel> {
|
|
83
|
+
vm: CheckoutViewModel;
|
|
74
84
|
address: IkasOrderAddress;
|
|
85
|
+
isCorporate?: boolean;
|
|
75
86
|
}
|
|
76
87
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare type Props = {
|
|
3
|
-
text: string;
|
|
3
|
+
text: string | React.ReactNode;
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
size?: "large" | "medium";
|
|
7
|
+
style?: React.CSSProperties;
|
|
5
8
|
onClick: () => void;
|
|
6
9
|
};
|
|
7
10
|
export declare const Button: React.FC<Props>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default class FormItemViewModel implements Props {
|
|
2
2
|
type: FormItemType;
|
|
3
|
+
inputType?: FormItemInputType;
|
|
3
4
|
options?: FormItemSelectOption[];
|
|
4
5
|
label: string;
|
|
5
6
|
value?: string;
|
|
@@ -11,10 +12,12 @@ export default class FormItemViewModel implements Props {
|
|
|
11
12
|
get labelStyle(): string;
|
|
12
13
|
get inputStyle(): string;
|
|
13
14
|
onValueChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
onTextAreaValueChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
14
16
|
onSelectChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
15
17
|
}
|
|
16
18
|
export interface Props {
|
|
17
19
|
type: FormItemType;
|
|
20
|
+
inputType?: FormItemInputType;
|
|
18
21
|
options?: FormItemSelectOption[];
|
|
19
22
|
label: string;
|
|
20
23
|
value?: string;
|
|
@@ -25,10 +28,16 @@ export interface Props {
|
|
|
25
28
|
}
|
|
26
29
|
export declare enum FormItemType {
|
|
27
30
|
TEXT = 0,
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
TEXT_AREA = 1,
|
|
32
|
+
SELECT = 2,
|
|
33
|
+
TEL = 3
|
|
30
34
|
}
|
|
31
35
|
export declare type FormItemSelectOption = {
|
|
32
36
|
value: string;
|
|
33
37
|
label: string;
|
|
34
38
|
};
|
|
39
|
+
export declare enum FormItemInputType {
|
|
40
|
+
NUMERIC = "numeric",
|
|
41
|
+
TEL = "tel",
|
|
42
|
+
EMAIL = "email"
|
|
43
|
+
}
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ParsedUrlQuery } from "querystring";
|
|
4
4
|
import { IkasCheckout } from "../../models/index";
|
|
5
|
+
import { IkasCheckoutSettings } from "../../models/data/checkout-settings/index";
|
|
5
6
|
declare type Props = {
|
|
6
7
|
checkout: IkasCheckout;
|
|
8
|
+
checkoutSettings: IkasCheckoutSettings;
|
|
9
|
+
returnPolicy: string;
|
|
10
|
+
privacyPolicy: string;
|
|
11
|
+
termsOfService: string;
|
|
7
12
|
queryParams: ParsedUrlQuery;
|
|
8
13
|
};
|
|
9
14
|
export declare const IkasCheckoutPage: React.FC<Props>;
|
|
@@ -7,32 +7,40 @@ import { IkasOrderLineVariant } from "../../models/data/order/line-item/variant/
|
|
|
7
7
|
import { IkasStorefront } from "../../models/data/storefront/index";
|
|
8
8
|
import { IkasCustomerStore } from "../../store/customer";
|
|
9
9
|
import CreditCardData from "./components/credit-card-form/model";
|
|
10
|
+
import { IkasCheckoutSettings } from "../../models/data/checkout-settings/index";
|
|
10
11
|
export default class CheckoutViewModel {
|
|
11
12
|
checkout: IkasCheckout;
|
|
12
|
-
|
|
13
|
+
checkoutSettings: IkasCheckoutSettings;
|
|
14
|
+
storefront?: IkasStorefront | null;
|
|
13
15
|
customerStore: IkasCustomerStore;
|
|
14
16
|
router: NextRouter;
|
|
15
17
|
isCheckoutLoaded: boolean;
|
|
16
18
|
isErrorsVisible: boolean;
|
|
17
19
|
isStepLoading: boolean;
|
|
20
|
+
isTermsAndConditionsChecked: boolean;
|
|
18
21
|
step: CheckoutStep;
|
|
19
22
|
merchantSettings?: IkasMerchantSettings;
|
|
20
|
-
cardData?: CreditCardData;
|
|
21
|
-
paymentGatewayId?: string;
|
|
23
|
+
cardData?: CreditCardData | null;
|
|
24
|
+
paymentGatewayId?: string | null;
|
|
22
25
|
paymentGateways: IkasPaymentGateway[];
|
|
23
|
-
installmentInfo?: IkasInstallmentInfo;
|
|
26
|
+
installmentInfo?: IkasInstallmentInfo | null;
|
|
24
27
|
useDifferentAddress: boolean;
|
|
25
28
|
shouldSaveAddress: boolean;
|
|
26
29
|
addressTitle: string;
|
|
27
|
-
shippingCountryIds?: string[];
|
|
30
|
+
shippingCountryIds?: string[] | null;
|
|
28
31
|
selectedShippingAddressId?: string;
|
|
29
32
|
selectedBillingAddressId?: string;
|
|
33
|
+
returnPolicy: string;
|
|
34
|
+
privacyPolicy: string;
|
|
35
|
+
termsOfService: string;
|
|
36
|
+
policyModalTitle: string;
|
|
37
|
+
policyModalText: string;
|
|
30
38
|
error?: CheckoutError | null;
|
|
31
|
-
constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter);
|
|
39
|
+
constructor(checkout: IkasCheckout, checkoutSettings: IkasCheckoutSettings, queryParams: ParsedUrlQuery, router: NextRouter, returnPolicy: string, privacyPolicy: string, termsOfService: string);
|
|
32
40
|
init: (queryParams: ParsedUrlQuery) => Promise<void>;
|
|
33
41
|
get cart(): import("../../models/data/cart/index").IkasCart | null | undefined;
|
|
34
|
-
get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion | undefined;
|
|
35
42
|
get selectedPaymentGatewayIndex(): number;
|
|
43
|
+
get selectedPaymentGateway(): IkasPaymentGateway | undefined;
|
|
36
44
|
get selectedInstallmentIndex(): number;
|
|
37
45
|
get checkoutUrl(): string;
|
|
38
46
|
get customerAddressOptions(): {
|
|
@@ -41,9 +49,10 @@ export default class CheckoutViewModel {
|
|
|
41
49
|
}[];
|
|
42
50
|
get installmentPrice(): number | null | undefined;
|
|
43
51
|
get installmentExtraPrice(): number | undefined;
|
|
52
|
+
get finalPrice(): number;
|
|
44
53
|
get canProceedToShipping(): boolean;
|
|
45
54
|
get canProceedToPayment(): boolean;
|
|
46
|
-
get canPerformPayment(): boolean;
|
|
55
|
+
get canPerformPayment(): boolean | undefined;
|
|
47
56
|
saveCheckout: () => Promise<void>;
|
|
48
57
|
checkStocks: () => Promise<void>;
|
|
49
58
|
getShippingCountries: () => Promise<void>;
|
|
@@ -51,19 +60,22 @@ export default class CheckoutViewModel {
|
|
|
51
60
|
initialStockCheck: () => Promise<void>;
|
|
52
61
|
listPaymentGateways: () => Promise<void>;
|
|
53
62
|
retrieveInstallmentInfo: (input: IkasInstallmentInfoInput) => Promise<void>;
|
|
54
|
-
getStorefront: () => Promise<void>;
|
|
55
63
|
createCustomer: () => void;
|
|
56
64
|
createShippingAddress: () => void;
|
|
57
65
|
createBillingAddress: () => void;
|
|
58
66
|
onEmailChange: (value: string) => void;
|
|
59
67
|
onShippingMethodChange: (shippingMethod: IkasAvailableShippingMethod) => Promise<void>;
|
|
60
68
|
onCouponCodeChange: (value: string) => void;
|
|
69
|
+
onCouponCodeApply: () => Promise<void>;
|
|
61
70
|
onSelectedShippingAddressIdChange: (value: string) => void;
|
|
62
71
|
onSelectedBillingAddressIdChange: (value: string) => void;
|
|
72
|
+
onTermsAndConditionsCheckedChange: (value: boolean) => void;
|
|
73
|
+
onCheckoutNoteChange: (value: string) => void;
|
|
63
74
|
onCardNumberChange: (value: string) => void;
|
|
64
75
|
onCardHolderNameChange: (value: string) => void;
|
|
65
76
|
onExpirationDateChange: (value: string) => void;
|
|
66
77
|
onCvcChange: (value: string) => void;
|
|
78
|
+
onGoToCartClick: () => void;
|
|
67
79
|
onBackToShoppingClick: () => void;
|
|
68
80
|
onProceedToShippingClick: () => Promise<void>;
|
|
69
81
|
onProceedToPaymentClick: () => Promise<void>;
|
|
@@ -89,7 +101,8 @@ export declare enum ErrorType {
|
|
|
89
101
|
API_ERROR = 1,
|
|
90
102
|
STOCK_ERROR = 2,
|
|
91
103
|
PAYMENT_ERROR = 3,
|
|
92
|
-
NO_SHIPPING_ERROR = 4
|
|
104
|
+
NO_SHIPPING_ERROR = 4,
|
|
105
|
+
CUSTOMER_LOGIN_REQUIRED_ERROR = 5
|
|
93
106
|
}
|
|
94
107
|
export declare type CheckoutError = {
|
|
95
108
|
type: ErrorType;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { IkasThemeSettings } from "../../models/index";
|
|
3
3
|
import { IkasPageComponentPropValue } from "../../utils/index";
|
|
4
4
|
declare type Props = {
|
|
5
5
|
pageComponentPropValue: IkasPageComponentPropValue;
|
|
6
|
-
pageComponent: IkasThemePageComponent;
|
|
7
6
|
index: number;
|
|
7
|
+
settings: IkasThemeSettings;
|
|
8
8
|
};
|
|
9
9
|
export declare const ThemeComponent: React.FC<Props>;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ImageLoader } from "next/image";
|
|
3
|
+
import { IkasImage } from "../../models/index";
|
|
4
|
+
export declare const Image: React.FC<ImageProps>;
|
|
5
|
+
declare const VALID_LAYOUT_VALUES: readonly [
|
|
6
|
+
"fill",
|
|
7
|
+
"fixed",
|
|
8
|
+
"intrinsic",
|
|
9
|
+
"responsive",
|
|
10
|
+
undefined
|
|
11
|
+
];
|
|
12
|
+
declare type LayoutValue = typeof VALID_LAYOUT_VALUES[number];
|
|
13
|
+
declare type ImgElementStyle = NonNullable<JSX.IntrinsicElements["img"]["style"]>;
|
|
14
|
+
declare type ImageProps = Omit<JSX.IntrinsicElements["img"], "src" | "srcSet" | "ref" | "width" | "height" | "loading" | "style"> & {
|
|
15
|
+
loader?: ImageLoader;
|
|
16
|
+
priority?: boolean;
|
|
17
|
+
loading?: "lazy" | "eager" | undefined;
|
|
18
|
+
objectFit?: ImgElementStyle["objectFit"];
|
|
19
|
+
objectPosition?: ImgElementStyle["objectPosition"];
|
|
20
|
+
image: IkasImage;
|
|
21
|
+
sizes: string;
|
|
22
|
+
} & ({
|
|
23
|
+
width?: never;
|
|
24
|
+
height?: never;
|
|
25
|
+
unsized: true;
|
|
26
|
+
} | {
|
|
27
|
+
width?: never;
|
|
28
|
+
height?: never;
|
|
29
|
+
layout: "fill";
|
|
30
|
+
} | {
|
|
31
|
+
width: number | string;
|
|
32
|
+
height: number | string;
|
|
33
|
+
layout?: Exclude<LayoutValue, "fill">;
|
|
34
|
+
});
|
|
35
|
+
export {};
|
|
@@ -2,5 +2,4 @@ export { IkasCheckoutPage } from "./checkout/index";
|
|
|
2
2
|
export { IkasPage } from "./page/index";
|
|
3
3
|
export { IkasPageHead } from "./page/head";
|
|
4
4
|
export { IkasPageEditor } from "./page-editor/index";
|
|
5
|
-
export
|
|
6
|
-
export * from "./gtm/functions";
|
|
5
|
+
export { Image } from "./image/index";
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { IkasThemePage } from "../../models/index";
|
|
2
3
|
declare type Props = {
|
|
4
|
+
page?: IkasThemePage;
|
|
3
5
|
pageTitle?: string | null;
|
|
4
6
|
description?: string | null;
|
|
7
|
+
pageSpecificDataStr?: string;
|
|
8
|
+
merchantSettings?: string;
|
|
9
|
+
addOgpMetas?: boolean;
|
|
5
10
|
};
|
|
6
11
|
export declare const IkasPageHead: React.FC<Props>;
|
|
7
12
|
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { IkasThemePage } from "../../models/index";
|
|
2
|
+
import { IkasThemePage, IkasThemeSettings } from "../../models/index";
|
|
3
3
|
import { IkasPageComponentPropValue } from "../../utils/index";
|
|
4
4
|
declare type Props = {
|
|
5
5
|
propValues: IkasPageComponentPropValue[];
|
|
6
6
|
page?: IkasThemePage;
|
|
7
|
+
pageSpecificDataStr?: string;
|
|
8
|
+
settingsStr: string;
|
|
9
|
+
merchantSettings?: string;
|
|
10
|
+
addOgpMetas?: boolean;
|
|
7
11
|
};
|
|
8
12
|
export declare const IkasPage: React.FC<Props>;
|
|
13
|
+
export declare const renderComponent: (pageComponentPropValue: IkasPageComponentPropValue, settings: IkasThemeSettings, index: number) => JSX.Element;
|
|
9
14
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NextRouter } from "next/router";
|
|
2
2
|
import { IkasThemePage, IkasThemePageComponent, IkasTheme, IkasThemeComponent } from "../../models/index";
|
|
3
3
|
import { IkasPageDataProvider } from "../../utils/index";
|
|
4
|
+
import { IkasThemePageSpecification } from "../../models/theme/page/index";
|
|
4
5
|
export default class PageViewModel {
|
|
5
6
|
theme?: IkasTheme | null;
|
|
6
7
|
page?: IkasThemePage | null;
|
|
@@ -14,6 +15,8 @@ export default class PageViewModel {
|
|
|
14
15
|
pageDataProvider?: IkasPageDataProvider | null;
|
|
15
16
|
router: NextRouter;
|
|
16
17
|
constructor(router: NextRouter);
|
|
18
|
+
get specification(): IkasThemePageSpecification | undefined;
|
|
19
|
+
get pageComponents(): IkasThemePageComponent[];
|
|
17
20
|
get selectedPageComponent(): IkasThemePageComponent | undefined;
|
|
18
21
|
get selectedComponent(): IkasThemeComponent | undefined;
|
|
19
22
|
startMessaging: () => void;
|
|
@@ -22,7 +25,6 @@ export default class PageViewModel {
|
|
|
22
25
|
onMouseOver: (id: string) => void;
|
|
23
26
|
onMouseLeave: (id: string) => void;
|
|
24
27
|
sendMessage: (type: BridgeMessageType, data?: any) => void;
|
|
25
|
-
getComponentPropValues: (pageComponent: IkasThemePageComponent) => any;
|
|
26
28
|
getPagePropValues: () => Promise<void>;
|
|
27
29
|
setComponentRef: (element: React.ElementType, component: IkasThemePageComponent) => void;
|
|
28
30
|
isScrolledIntoView: (el: HTMLElement) => boolean;
|
|
@@ -38,6 +40,7 @@ export default class PageViewModel {
|
|
|
38
40
|
handleSetSelectedComponent: (data: any) => void;
|
|
39
41
|
handleSetHoveredComponent: (data: any) => void;
|
|
40
42
|
handleScrollToComponent: (data: any) => void;
|
|
43
|
+
updateThemeSettings: (data: any) => void;
|
|
41
44
|
}
|
|
42
45
|
export declare enum BridgeMessageType {
|
|
43
46
|
FRAME_DID_LOAD = "FRAME_DID_LOAD",
|
|
@@ -55,5 +58,6 @@ export declare enum BridgeMessageType {
|
|
|
55
58
|
COMPONENT_CLICK = "COMPONENT_CLICK",
|
|
56
59
|
SET_SELECTED_COMPONENT = "SET_SELECTED_COMPONENT",
|
|
57
60
|
SET_HOVERED_COMPONENT = "SET_HOVERED_COMPONENT",
|
|
58
|
-
SCROLL_TO_COMPONENT = "SCROLL_TO_COMPONENT"
|
|
61
|
+
SCROLL_TO_COMPONENT = "SCROLL_TO_COMPONENT",
|
|
62
|
+
UPDATE_THEME_SETTINGS = "UPDATE_THEME_SETTINGS"
|
|
59
63
|
}
|
package/build/index.d.ts
CHANGED