@ikas/storefront 0.0.7 → 0.0.8
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/api/apollo.d.ts +2 -2
- package/build/api/checkout/index.d.ts +4 -4
- package/build/api/customer/index.d.ts +6 -6
- package/build/api/product-stock-location/index.d.ts +1 -1
- package/build/api/stock-location/index.d.ts +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +19 -19
- package/build/components/checkout/model.d.ts +4 -4
- package/build/components/gtm/functions.d.ts +12 -12
- package/build/components/page-editor/model.d.ts +2 -2
- package/build/index.es.js +12 -8
- package/build/index.js +12 -8
- package/build/models/data/order/line-item/variant/index.d.ts +1 -1
- package/build/models/data/product/index.d.ts +1 -1
- package/build/models/data/product/variant/index.d.ts +1 -1
- package/build/models/data/variant-type/variant-value/index.d.ts +1 -1
- package/build/models/theme/theme.d.ts +2 -2
- package/build/models/ui/brand-list/index.d.ts +1 -1
- package/build/models/ui/product-detail/index.d.ts +1 -1
- package/build/models/ui/product-list/index.d.ts +3 -3
- package/build/store/cart.d.ts +2 -2
- package/build/store/customer.d.ts +2 -2
- package/build/utils/providers/page-data.d.ts +2 -2
- package/package.json +1 -1
package/build/api/apollo.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
|
|
|
2
2
|
declare class Apollo {
|
|
3
3
|
private _client?;
|
|
4
4
|
static customerToken?: string;
|
|
5
|
-
createApolloClient: (apiKey?: string) => void;
|
|
6
|
-
setCustomerToken: (customerToken?: string) => void;
|
|
5
|
+
createApolloClient: (apiKey?: string | undefined) => void;
|
|
6
|
+
setCustomerToken: (customerToken?: string | undefined) => void;
|
|
7
7
|
getClient: () => ApolloClient<NormalizedCacheObject>;
|
|
8
8
|
}
|
|
9
9
|
export declare const apollo: Apollo;
|
|
@@ -6,10 +6,10 @@ export declare class IkasCheckoutAPI {
|
|
|
6
6
|
static getCheckoutId(cartId: string): Promise<string | undefined>;
|
|
7
7
|
static getCheckoutById(id: string): Promise<IkasCheckout | undefined>;
|
|
8
8
|
static saveCheckout(checkout: IkasCheckout): Promise<string | undefined>;
|
|
9
|
-
static createSaleTransactionWithCheckout(checkoutId: string, paymentGatewayId: string, paymentMethodDetail?: IkasPaymentMethodDetail): Promise<SaleTransactionTypes.createSaleTransactionWithCheckout_createSaleTransactionWithCheckout>;
|
|
10
|
-
static listPaymentGateway(): Promise<IkasPaymentGateway[]>;
|
|
11
|
-
static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo>;
|
|
12
|
-
static checkStocks(lines: CheckStocksLineInput[]): Promise<CheckStocksTypes.checkStocks_checkStocks>;
|
|
9
|
+
static createSaleTransactionWithCheckout(checkoutId: string, paymentGatewayId: string, paymentMethodDetail?: IkasPaymentMethodDetail): Promise<SaleTransactionTypes.createSaleTransactionWithCheckout_createSaleTransactionWithCheckout | undefined>;
|
|
10
|
+
static listPaymentGateway(): Promise<IkasPaymentGateway[] | undefined>;
|
|
11
|
+
static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo | undefined>;
|
|
12
|
+
static checkStocks(lines: CheckStocksLineInput[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
|
|
13
13
|
}
|
|
14
14
|
declare type CheckStocksLineInput = {
|
|
15
15
|
quantity: number;
|
|
@@ -6,20 +6,20 @@ export declare class IkasCustomerAPI {
|
|
|
6
6
|
__typename: "CustomerLoginResponse";
|
|
7
7
|
token: string;
|
|
8
8
|
tokenExpiry: number;
|
|
9
|
-
}>;
|
|
9
|
+
} | undefined>;
|
|
10
10
|
static register(email: string, password: string, firstName: string, lastName: string): Promise<{
|
|
11
11
|
customer: IkasCustomer;
|
|
12
12
|
__typename: "CustomerLoginResponse";
|
|
13
13
|
token: string;
|
|
14
14
|
tokenExpiry: number;
|
|
15
|
-
}>;
|
|
16
|
-
static refreshToken(token: string): Promise<RefreshTokenTypes.customerRefreshToken_customerRefreshToken>;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
static refreshToken(token: string): Promise<RefreshTokenTypes.customerRefreshToken_customerRefreshToken | undefined>;
|
|
17
17
|
static forgotPassword(email: string): Promise<boolean>;
|
|
18
18
|
static recoverPassword(password: string, passwordAgain: string, token: string): Promise<boolean>;
|
|
19
19
|
static checkEmail(email: string): Promise<boolean>;
|
|
20
|
-
static getCustomer(): Promise<IkasCustomer>;
|
|
21
|
-
static saveCustomer(customer: IkasCustomer): Promise<IkasCustomer>;
|
|
22
|
-
static getOrders(id?: string): Promise<IkasOrder[]>;
|
|
20
|
+
static getCustomer(): Promise<IkasCustomer | undefined>;
|
|
21
|
+
static saveCustomer(customer: IkasCustomer): Promise<IkasCustomer | undefined>;
|
|
22
|
+
static getOrders(id?: string): Promise<IkasOrder[] | undefined>;
|
|
23
23
|
static getOrderTransactions(params?: {
|
|
24
24
|
checkoutId?: string;
|
|
25
25
|
id?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as ListProductStockLocationTypes from "./__generated__/listProductStockLocation";
|
|
2
2
|
export declare class IkasProductStockLocationAPI {
|
|
3
|
-
static listProductStockLocation(stockLocationIdList: string[], variantIdList: string[]): Promise<ListProductStockLocationTypes.listProductStockLocation_listProductStockLocation[]>;
|
|
3
|
+
static listProductStockLocation(stockLocationIdList: string[], variantIdList: string[]): Promise<ListProductStockLocationTypes.listProductStockLocation_listProductStockLocation[] | undefined>;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as ListStockLocationTypes from "./__generated__/listStockLocation";
|
|
2
2
|
export declare class IkasStockLocationAPI {
|
|
3
|
-
static listStockLocation(): Promise<ListStockLocationTypes.listStockLocation_listStockLocation>;
|
|
3
|
+
static listStockLocation(): Promise<ListStockLocationTypes.listStockLocation_listStockLocation | undefined>;
|
|
4
4
|
}
|
|
@@ -9,29 +9,29 @@ export default class AddressFormViewModel {
|
|
|
9
9
|
districts: IkasDistrict[];
|
|
10
10
|
allowedCountryIds?: string[];
|
|
11
11
|
constructor(data: AddressFormViewModelParams);
|
|
12
|
-
get firstName(): string;
|
|
13
|
-
get lastName(): string;
|
|
14
|
-
get phone(): string;
|
|
12
|
+
get firstName(): string | null | undefined;
|
|
13
|
+
get lastName(): string | null | undefined;
|
|
14
|
+
get phone(): string | null | undefined;
|
|
15
15
|
get country(): {
|
|
16
|
-
id?: string;
|
|
17
|
-
name?: string;
|
|
18
|
-
code?: string;
|
|
19
|
-
};
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
code?: string | undefined;
|
|
19
|
+
} | null | undefined;
|
|
20
20
|
get state(): {
|
|
21
|
-
id?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
code?: string;
|
|
24
|
-
};
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
code?: string | undefined;
|
|
24
|
+
} | null | undefined;
|
|
25
25
|
get city(): {
|
|
26
|
-
id?: string;
|
|
27
|
-
name?: string;
|
|
28
|
-
code?: string;
|
|
29
|
-
};
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
code?: string | undefined;
|
|
29
|
+
} | null | undefined;
|
|
30
30
|
get district(): {
|
|
31
|
-
id?: string;
|
|
32
|
-
name?: string;
|
|
33
|
-
code?: string;
|
|
34
|
-
};
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
code?: string | undefined;
|
|
34
|
+
} | null | undefined;
|
|
35
35
|
get countryOptions(): {
|
|
36
36
|
label: string;
|
|
37
37
|
value: string;
|
|
@@ -30,8 +30,8 @@ export default class CheckoutViewModel {
|
|
|
30
30
|
error?: CheckoutError | null;
|
|
31
31
|
constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter);
|
|
32
32
|
init: (queryParams: ParsedUrlQuery) => Promise<void>;
|
|
33
|
-
get cart(): import("../../models/data/cart/index").IkasCart;
|
|
34
|
-
get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion;
|
|
33
|
+
get cart(): import("../../models/data/cart/index").IkasCart | null | undefined;
|
|
34
|
+
get storefrontRegion(): import("../../models/data/storefront/storefront-region/index").IkasStorefrontRegion | undefined;
|
|
35
35
|
get selectedPaymentGatewayIndex(): number;
|
|
36
36
|
get selectedInstallmentIndex(): number;
|
|
37
37
|
get checkoutUrl(): string;
|
|
@@ -39,8 +39,8 @@ export default class CheckoutViewModel {
|
|
|
39
39
|
label: string;
|
|
40
40
|
value: string;
|
|
41
41
|
}[];
|
|
42
|
-
get installmentPrice(): number;
|
|
43
|
-
get installmentExtraPrice(): number;
|
|
42
|
+
get installmentPrice(): number | null | undefined;
|
|
43
|
+
get installmentExtraPrice(): number | undefined;
|
|
44
44
|
get canProceedToShipping(): boolean;
|
|
45
45
|
get canProceedToPayment(): boolean;
|
|
46
46
|
get canPerformPayment(): boolean;
|
|
@@ -3,7 +3,7 @@ import { CheckoutStep } from "../checkout/model";
|
|
|
3
3
|
export declare function GTMPageView(url: string): {
|
|
4
4
|
event: string;
|
|
5
5
|
page: string;
|
|
6
|
-
};
|
|
6
|
+
} | undefined;
|
|
7
7
|
export declare function GTMProductView(productDetail: IkasProductDetail): {
|
|
8
8
|
event: string;
|
|
9
9
|
ecommerce: {
|
|
@@ -23,7 +23,7 @@ export declare function GTMProductView(productDetail: IkasProductDetail): {
|
|
|
23
23
|
quantity: number;
|
|
24
24
|
}[];
|
|
25
25
|
};
|
|
26
|
-
};
|
|
26
|
+
} | undefined;
|
|
27
27
|
export declare function GTMAddToCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): {
|
|
28
28
|
event: string;
|
|
29
29
|
ecommerce: {
|
|
@@ -57,7 +57,7 @@ export declare function GTMAddToCart(item: IkasProductDetail | IkasOrderLineItem
|
|
|
57
57
|
quantity: number;
|
|
58
58
|
})[];
|
|
59
59
|
};
|
|
60
|
-
};
|
|
60
|
+
} | undefined;
|
|
61
61
|
export declare function GTMRemoveFromCart(item: IkasProductDetail | IkasOrderLineItem, quantity: number): {
|
|
62
62
|
event: string;
|
|
63
63
|
ecommerce: {
|
|
@@ -91,7 +91,7 @@ export declare function GTMRemoveFromCart(item: IkasProductDetail | IkasOrderLin
|
|
|
91
91
|
quantity: number;
|
|
92
92
|
})[];
|
|
93
93
|
};
|
|
94
|
-
};
|
|
94
|
+
} | undefined;
|
|
95
95
|
export declare function GTMBeginCheckout(checkout: IkasCheckout): {
|
|
96
96
|
event: string;
|
|
97
97
|
ecommerce: {
|
|
@@ -109,9 +109,9 @@ export declare function GTMBeginCheckout(checkout: IkasCheckout): {
|
|
|
109
109
|
item_list_id: string;
|
|
110
110
|
index: number;
|
|
111
111
|
quantity: number;
|
|
112
|
-
}[];
|
|
112
|
+
}[] | undefined;
|
|
113
113
|
};
|
|
114
|
-
};
|
|
114
|
+
} | undefined;
|
|
115
115
|
export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
|
|
116
116
|
event: string;
|
|
117
117
|
ecommerce: {
|
|
@@ -121,8 +121,8 @@ export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
|
|
|
121
121
|
value: string;
|
|
122
122
|
tax: string;
|
|
123
123
|
shipping: string;
|
|
124
|
-
currency: string;
|
|
125
|
-
coupon: string;
|
|
124
|
+
currency: string | undefined;
|
|
125
|
+
coupon: string | null | undefined;
|
|
126
126
|
items: {
|
|
127
127
|
item_name: string;
|
|
128
128
|
item_id: string;
|
|
@@ -137,10 +137,10 @@ export declare function GTMPurchase(checkout: IkasCheckout, orderId: string): {
|
|
|
137
137
|
item_list_id: string;
|
|
138
138
|
index: number;
|
|
139
139
|
quantity: number;
|
|
140
|
-
}[];
|
|
140
|
+
}[] | undefined;
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
-
};
|
|
143
|
+
} | undefined;
|
|
144
144
|
export declare function GTMCheckoutStep(checkout: IkasCheckout, step: CheckoutStep): {
|
|
145
145
|
event: string;
|
|
146
146
|
ecommerce: {
|
|
@@ -158,7 +158,7 @@ export declare function GTMCheckoutStep(checkout: IkasCheckout, step: CheckoutSt
|
|
|
158
158
|
item_list_id: string;
|
|
159
159
|
index: number;
|
|
160
160
|
quantity: number;
|
|
161
|
-
}[];
|
|
161
|
+
}[] | undefined;
|
|
162
162
|
};
|
|
163
|
-
};
|
|
163
|
+
} | undefined;
|
|
164
164
|
export declare function GTMDisableHTML(): void;
|
|
@@ -14,8 +14,8 @@ export default class PageViewModel {
|
|
|
14
14
|
pageDataProvider?: IkasPageDataProvider | null;
|
|
15
15
|
router: NextRouter;
|
|
16
16
|
constructor(router: NextRouter);
|
|
17
|
-
get selectedPageComponent(): IkasThemePageComponent;
|
|
18
|
-
get selectedComponent(): IkasThemeComponent;
|
|
17
|
+
get selectedPageComponent(): IkasThemePageComponent | undefined;
|
|
18
|
+
get selectedComponent(): IkasThemeComponent | undefined;
|
|
19
19
|
startMessaging: () => void;
|
|
20
20
|
onMessage: (event: MessageEvent) => Promise<void>;
|
|
21
21
|
onClick: (id: string) => void;
|
package/build/index.es.js
CHANGED
|
@@ -10870,7 +10870,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
|
|
|
10870
10870
|
IkasStorefrontConfig.components = components;
|
|
10871
10871
|
IkasStorefrontConfig.config = config;
|
|
10872
10872
|
IkasStorefrontConfig.localTheme = localTheme;
|
|
10873
|
-
IkasStorefrontConfig.apiUrlOverride = apiUrlOverride;
|
|
10873
|
+
IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
|
|
10874
10874
|
};
|
|
10875
10875
|
IkasStorefrontConfig.components = {};
|
|
10876
10876
|
IkasStorefrontConfig.config = {};
|
|
@@ -11700,7 +11700,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
|
11700
11700
|
IkasThemePageType.BRAND,
|
|
11701
11701
|
IkasThemePageType.CATEGORY,
|
|
11702
11702
|
].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
|
|
11703
|
-
return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId)];
|
|
11703
|
+
return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
|
|
11704
11704
|
case 10:
|
|
11705
11705
|
metaDataList = _d.sent();
|
|
11706
11706
|
if (metaDataList.length) {
|
|
@@ -12111,7 +12111,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12111
12111
|
};
|
|
12112
12112
|
IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12113
12113
|
if (Array.isArray(propValue)) {
|
|
12114
|
-
pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
|
|
12114
|
+
pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
|
|
12115
|
+
return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal || undefined);
|
|
12116
|
+
});
|
|
12115
12117
|
}
|
|
12116
12118
|
else if (propValue) {
|
|
12117
12119
|
pageComponentPropValue.propValues[prop.name] = new IkasNavigationLink(propValue.href, propValue.label, propValue.subLinks, propValue.isExternal);
|
|
@@ -13355,7 +13357,9 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
13355
13357
|
case 1:
|
|
13356
13358
|
_a.trys.push([1, 3, 4, 5]);
|
|
13357
13359
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
13358
|
-
idList: this.isStatic
|
|
13360
|
+
idList: this.isStatic
|
|
13361
|
+
? this._brandListPropValue.brandIds || undefined
|
|
13362
|
+
: undefined,
|
|
13359
13363
|
page: this.isStatic ? undefined : this.page,
|
|
13360
13364
|
limit: this.isStatic ? undefined : this.limit,
|
|
13361
13365
|
})];
|
|
@@ -20809,7 +20813,7 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
20809
20813
|
this.changeStep(CheckoutStep.SUCCESS);
|
|
20810
20814
|
}
|
|
20811
20815
|
else if (transactionStatus === IkasTransactionStatusEnum.PENDING &&
|
|
20812
|
-
response.returnSlug) {
|
|
20816
|
+
!!(response === null || response === void 0 ? void 0 : response.returnSlug)) {
|
|
20813
20817
|
window.location.href =
|
|
20814
20818
|
process.env.NEXT_PUBLIC_BASE_URL + response.returnSlug;
|
|
20815
20819
|
}
|
|
@@ -21670,7 +21674,7 @@ var CheckoutStepInfo = observer(function (_a) {
|
|
|
21670
21674
|
createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
|
|
21671
21675
|
createElement(AddressForm, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
|
|
21672
21676
|
? undefined
|
|
21673
|
-
: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
|
|
21677
|
+
: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
|
|
21674
21678
|
!!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (createElement("div", { style: { marginTop: "12px" } },
|
|
21675
21679
|
createElement(Checkbox, { value: vm.shouldSaveAddress, label: "Bir sonraki i\u015Flem i\u00E7in bu bilgileri kaydet", onChange: vm.setShouldSaveAddress }),
|
|
21676
21680
|
vm.shouldSaveAddress && (createElement("div", { style: { marginTop: "8px" } },
|
|
@@ -21883,7 +21887,7 @@ var BillingAddress = observer(function (_a) {
|
|
|
21883
21887
|
!!vm.customerStore.customer &&
|
|
21884
21888
|
!!vm.customerStore.customer.addresses.length && (createElement("div", { className: styles$2.RowPB },
|
|
21885
21889
|
createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
|
|
21886
|
-
createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
|
|
21890
|
+
createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
|
|
21887
21891
|
},
|
|
21888
21892
|
]; });
|
|
21889
21893
|
return (createElement(Fragment, null,
|
|
@@ -22983,7 +22987,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
22983
22987
|
this.pageParams = data.pageParams;
|
|
22984
22988
|
this.queryParams = data.queryParams;
|
|
22985
22989
|
this.apiKey = data.apiKey;
|
|
22986
|
-
apollo.createApolloClient(this.apiKey);
|
|
22990
|
+
apollo.createApolloClient(this.apiKey || undefined);
|
|
22987
22991
|
window.editorApiKey = data.apiKey;
|
|
22988
22992
|
return [4 /*yield*/, this.getPagePropValues()];
|
|
22989
22993
|
case 1:
|
package/build/index.js
CHANGED
|
@@ -10883,7 +10883,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
|
|
|
10883
10883
|
IkasStorefrontConfig.components = components;
|
|
10884
10884
|
IkasStorefrontConfig.config = config;
|
|
10885
10885
|
IkasStorefrontConfig.localTheme = localTheme;
|
|
10886
|
-
IkasStorefrontConfig.apiUrlOverride = apiUrlOverride;
|
|
10886
|
+
IkasStorefrontConfig.apiUrlOverride = apiUrlOverride || null;
|
|
10887
10887
|
};
|
|
10888
10888
|
IkasStorefrontConfig.components = {};
|
|
10889
10889
|
IkasStorefrontConfig.config = {};
|
|
@@ -11712,7 +11712,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
|
11712
11712
|
exports.IkasThemePageType.BRAND,
|
|
11713
11713
|
exports.IkasThemePageType.CATEGORY,
|
|
11714
11714
|
].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
|
|
11715
|
-
return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId)];
|
|
11715
|
+
return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
|
|
11716
11716
|
case 10:
|
|
11717
11717
|
metaDataList = _d.sent();
|
|
11718
11718
|
if (metaDataList.length) {
|
|
@@ -12123,7 +12123,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
12123
12123
|
};
|
|
12124
12124
|
IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
|
|
12125
12125
|
if (Array.isArray(propValue)) {
|
|
12126
|
-
pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
|
|
12126
|
+
pageComponentPropValue.propValues[prop.name] = propValue.map(function (p) {
|
|
12127
|
+
return new IkasNavigationLink(p.href, p.label, p.subLinks, p.isExternal || undefined);
|
|
12128
|
+
});
|
|
12127
12129
|
}
|
|
12128
12130
|
else if (propValue) {
|
|
12129
12131
|
pageComponentPropValue.propValues[prop.name] = new IkasNavigationLink(propValue.href, propValue.label, propValue.subLinks, propValue.isExternal);
|
|
@@ -13345,7 +13347,9 @@ var IkasBrandList = /** @class */ (function () {
|
|
|
13345
13347
|
case 1:
|
|
13346
13348
|
_a.trys.push([1, 3, 4, 5]);
|
|
13347
13349
|
return [4 /*yield*/, IkasBrandAPI.listBrands({
|
|
13348
|
-
idList: this.isStatic
|
|
13350
|
+
idList: this.isStatic
|
|
13351
|
+
? this._brandListPropValue.brandIds || undefined
|
|
13352
|
+
: undefined,
|
|
13349
13353
|
page: this.isStatic ? undefined : this.page,
|
|
13350
13354
|
limit: this.isStatic ? undefined : this.limit,
|
|
13351
13355
|
})];
|
|
@@ -20795,7 +20799,7 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
20795
20799
|
this.changeStep(CheckoutStep.SUCCESS);
|
|
20796
20800
|
}
|
|
20797
20801
|
else if (transactionStatus === exports.IkasTransactionStatusEnum.PENDING &&
|
|
20798
|
-
response.returnSlug) {
|
|
20802
|
+
!!(response === null || response === void 0 ? void 0 : response.returnSlug)) {
|
|
20799
20803
|
window.location.href =
|
|
20800
20804
|
process.env.NEXT_PUBLIC_BASE_URL + response.returnSlug;
|
|
20801
20805
|
}
|
|
@@ -21656,7 +21660,7 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
|
|
|
21656
21660
|
React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
|
|
21657
21661
|
React.createElement(AddressForm, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
|
|
21658
21662
|
? undefined
|
|
21659
|
-
: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
|
|
21663
|
+
: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds, validationResult: vm.checkout.shippingAddress.validationResult }),
|
|
21660
21664
|
!!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (React.createElement("div", { style: { marginTop: "12px" } },
|
|
21661
21665
|
React.createElement(Checkbox, { value: vm.shouldSaveAddress, label: "Bir sonraki i\u015Flem i\u00E7in bu bilgileri kaydet", onChange: vm.setShouldSaveAddress }),
|
|
21662
21666
|
vm.shouldSaveAddress && (React.createElement("div", { style: { marginTop: "8px" } },
|
|
@@ -21869,7 +21873,7 @@ var BillingAddress = mobxReactLite.observer(function (_a) {
|
|
|
21869
21873
|
!!vm.customerStore.customer &&
|
|
21870
21874
|
!!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$2.RowPB },
|
|
21871
21875
|
React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
|
|
21872
|
-
React.createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
|
|
21876
|
+
React.createElement(AddressForm, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
|
|
21873
21877
|
},
|
|
21874
21878
|
]; });
|
|
21875
21879
|
return (React.createElement(React.Fragment, null,
|
|
@@ -22969,7 +22973,7 @@ var PageViewModel = /** @class */ (function () {
|
|
|
22969
22973
|
this.pageParams = data.pageParams;
|
|
22970
22974
|
this.queryParams = data.queryParams;
|
|
22971
22975
|
this.apiKey = data.apiKey;
|
|
22972
|
-
apollo.createApolloClient(this.apiKey);
|
|
22976
|
+
apollo.createApolloClient(this.apiKey || undefined);
|
|
22973
22977
|
window.editorApiKey = data.apiKey;
|
|
22974
22978
|
return [4 /*yield*/, this.getPagePropValues()];
|
|
22975
22979
|
case 1:
|
|
@@ -11,7 +11,7 @@ export declare class IkasOrderLineVariant {
|
|
|
11
11
|
variantValues: IkasOrderLineVariantVariantValue[];
|
|
12
12
|
mainImage?: IkasImage | null;
|
|
13
13
|
constructor(data?: Partial<IkasOrderLineVariant>);
|
|
14
|
-
get href(): string;
|
|
14
|
+
get href(): string | undefined;
|
|
15
15
|
}
|
|
16
16
|
export declare class IkasOrderLineVariantVariantValue {
|
|
17
17
|
order: number;
|
|
@@ -19,7 +19,7 @@ export declare class IkasProduct {
|
|
|
19
19
|
variantTypes: IkasProductVariantType[];
|
|
20
20
|
constructor(data?: Partial<IkasProduct>);
|
|
21
21
|
get hasVariant(): boolean;
|
|
22
|
-
get mainVariantType(): import("../index").IkasVariantType;
|
|
22
|
+
get mainVariantType(): import("../index").IkasVariantType | undefined;
|
|
23
23
|
get href(): string;
|
|
24
24
|
}
|
|
25
25
|
export declare enum IkasProductType {
|
|
@@ -5,6 +5,6 @@ export declare class IkasTheme {
|
|
|
5
5
|
components: IkasThemeComponent[];
|
|
6
6
|
pages: IkasThemePage[];
|
|
7
7
|
constructor(data?: Partial<IkasTheme>);
|
|
8
|
-
get headerComponent(): IkasThemeComponent;
|
|
9
|
-
get footerComponent(): IkasThemeComponent;
|
|
8
|
+
get headerComponent(): IkasThemeComponent | undefined;
|
|
9
|
+
get footerComponent(): IkasThemeComponent | undefined;
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ export declare class IkasProductDetail {
|
|
|
6
6
|
private usePageData?;
|
|
7
7
|
private router?;
|
|
8
8
|
constructor(product: IkasProduct, selectedVariantValues: IkasVariantValue[], usePageData?: boolean, router?: NextRouter);
|
|
9
|
-
get mainVariantValue(): IkasVariantValue;
|
|
9
|
+
get mainVariantValue(): IkasVariantValue | undefined;
|
|
10
10
|
get selectedVariant(): import("../../index").IkasProductVariant;
|
|
11
11
|
get href(): string;
|
|
12
12
|
selectVariantValue(variantValue: IkasVariantValue): void;
|
|
@@ -39,9 +39,9 @@ export declare class IkasProductList {
|
|
|
39
39
|
page: number;
|
|
40
40
|
count: number;
|
|
41
41
|
initialized: boolean;
|
|
42
|
-
minPage: number;
|
|
43
|
-
filters: IkasProductListFilter;
|
|
44
|
-
recommendFor: string;
|
|
42
|
+
minPage: number | null | undefined;
|
|
43
|
+
filters: IkasProductListFilter | null | undefined;
|
|
44
|
+
recommendFor: string | null | undefined;
|
|
45
45
|
productListPropValue: IkasProductListPropValue;
|
|
46
46
|
};
|
|
47
47
|
}
|
package/build/store/cart.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare class IkasCartStore {
|
|
|
13
13
|
get isBrowser(): boolean;
|
|
14
14
|
get isLoadingCart(): boolean;
|
|
15
15
|
get cartLoadFinished(): boolean;
|
|
16
|
-
get checkoutId(): string;
|
|
17
|
-
get checkoutUrl(): string;
|
|
16
|
+
get checkoutId(): string | null | undefined;
|
|
17
|
+
get checkoutUrl(): string | undefined;
|
|
18
18
|
private getCart;
|
|
19
19
|
private setCart;
|
|
20
20
|
addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<void>;
|
|
@@ -15,8 +15,8 @@ export declare class IkasCustomerStore {
|
|
|
15
15
|
recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
|
|
16
16
|
logout: () => void;
|
|
17
17
|
saveCustomer: (customer: IkasCustomer) => Promise<boolean>;
|
|
18
|
-
getOrders: () => Promise<import("../models/index").IkasOrder[]>;
|
|
19
|
-
getOrder: (id: string) => Promise<import("../models/index").IkasOrder>;
|
|
18
|
+
getOrders: () => Promise<import("../models/index").IkasOrder[] | undefined>;
|
|
19
|
+
getOrder: (id: string) => Promise<import("../models/index").IkasOrder | null>;
|
|
20
20
|
getOrderTransactions: (params?: {
|
|
21
21
|
checkoutId?: string;
|
|
22
22
|
id?: string;
|
|
@@ -11,10 +11,10 @@ export declare class IkasPageDataProvider {
|
|
|
11
11
|
get nextPageData(): {
|
|
12
12
|
props: {
|
|
13
13
|
propValuesStr: string;
|
|
14
|
-
page: IkasThemePage;
|
|
14
|
+
page: IkasThemePage | null;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
get isStaticPage(): boolean;
|
|
17
|
+
get isStaticPage(): boolean | null | undefined;
|
|
18
18
|
getPageData(): Promise<void>;
|
|
19
19
|
getPageSpecificData(): Promise<void>;
|
|
20
20
|
getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
|