@ikas/storefront 0.0.69 → 0.0.70
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/components/checkout/components/error-container/payment-error/index.d.ts +2 -0
- package/build/index.es.js +38 -4
- package/build/index.js +38 -3
- package/build/models/theme/page/index.d.ts +2 -1
- package/build/pages/index.d.ts +2 -1
- package/build/pages/search.d.ts +12 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -18216,6 +18216,7 @@ var IkasThemePageType;
|
|
|
18216
18216
|
IkasThemePageType["RECOVER_PASSWORD"] = "RECOVER_PASSWORD";
|
|
18217
18217
|
IkasThemePageType["CART"] = "CART";
|
|
18218
18218
|
IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
|
|
18219
|
+
IkasThemePageType["SEARCH"] = "SEARCH";
|
|
18219
18220
|
})(IkasThemePageType || (IkasThemePageType = {}));
|
|
18220
18221
|
|
|
18221
18222
|
var IkasThemeColor = /** @class */ (function () {
|
|
@@ -20168,6 +20169,9 @@ var IkasProductList = /** @class */ (function () {
|
|
|
20168
20169
|
filter.applyQueryParam(value);
|
|
20169
20170
|
}
|
|
20170
20171
|
});
|
|
20172
|
+
var querySearch = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("s");
|
|
20173
|
+
if (querySearch)
|
|
20174
|
+
this._searchKeyword = querySearch;
|
|
20171
20175
|
}
|
|
20172
20176
|
catch (err) {
|
|
20173
20177
|
console.log(err);
|
|
@@ -24587,6 +24591,7 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
24587
24591
|
if (typeof queryParams.failed === "string") {
|
|
24588
24592
|
this.error = {
|
|
24589
24593
|
type: ErrorType.PAYMENT_ERROR,
|
|
24594
|
+
data: queryParams.error || null,
|
|
24590
24595
|
};
|
|
24591
24596
|
}
|
|
24592
24597
|
merchantId = decodeBase64(IkasStorefrontConfig.config.apiKey || "");
|
|
@@ -26325,9 +26330,10 @@ var UnknownError = observer(function (_a) {
|
|
|
26325
26330
|
});
|
|
26326
26331
|
|
|
26327
26332
|
var PaymentError = observer(function (_a) {
|
|
26328
|
-
var onClose = _a.onClose;
|
|
26333
|
+
var error = _a.error, onClose = _a.onClose;
|
|
26329
26334
|
return (createElement(ErrorContainer, { onClose: onClose },
|
|
26330
|
-
createElement("div", null,
|
|
26335
|
+
createElement("div", null, (error === null || error === void 0 ? void 0 : error.data) ||
|
|
26336
|
+
"Ödemeniz alınamadı. Lütfen bilgilerinizi kontrol edip tekrar deneyin.")));
|
|
26331
26337
|
});
|
|
26332
26338
|
|
|
26333
26339
|
var NoShippingError = observer(function (_a) {
|
|
@@ -27122,7 +27128,7 @@ var IkasCheckoutPage = observer(function (_a) {
|
|
|
27122
27128
|
return createElement(StockError, { error: vm.error, onClose: onErrorClose });
|
|
27123
27129
|
};
|
|
27124
27130
|
var renderPaymentError = function () {
|
|
27125
|
-
return createElement(PaymentError, { onClose: onErrorClose });
|
|
27131
|
+
return createElement(PaymentError, { error: vm.error, onClose: onErrorClose });
|
|
27126
27132
|
};
|
|
27127
27133
|
var renderNoShipingError = function () {
|
|
27128
27134
|
return createElement(NoShippingError, { onClose: onErrorClose });
|
|
@@ -28260,6 +28266,34 @@ var favoriteProducts = /*#__PURE__*/Object.freeze({
|
|
|
28260
28266
|
getStaticProps: getStaticProps$b
|
|
28261
28267
|
});
|
|
28262
28268
|
|
|
28269
|
+
var Page$e = function (_a) {
|
|
28270
|
+
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
|
|
28271
|
+
var router = useRouter();
|
|
28272
|
+
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
|
|
28273
|
+
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
28274
|
+
};
|
|
28275
|
+
var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
28276
|
+
var theme, provider;
|
|
28277
|
+
return __generator(this, function (_a) {
|
|
28278
|
+
switch (_a.label) {
|
|
28279
|
+
case 0: return [4 /*yield*/, IkasThemeAPI.fetchTheme()];
|
|
28280
|
+
case 1:
|
|
28281
|
+
theme = _a.sent();
|
|
28282
|
+
provider = new IkasPageDataProvider(theme, context.params, IkasThemePageType.SEARCH);
|
|
28283
|
+
return [4 /*yield*/, provider.getPageData()];
|
|
28284
|
+
case 2:
|
|
28285
|
+
_a.sent();
|
|
28286
|
+
return [2 /*return*/, __assign(__assign({}, provider.nextPageData), { revalidate: 60 })];
|
|
28287
|
+
}
|
|
28288
|
+
});
|
|
28289
|
+
}); };
|
|
28290
|
+
|
|
28291
|
+
var search = /*#__PURE__*/Object.freeze({
|
|
28292
|
+
__proto__: null,
|
|
28293
|
+
'default': Page$e,
|
|
28294
|
+
getStaticProps: getStaticProps$c
|
|
28295
|
+
});
|
|
28296
|
+
|
|
28263
28297
|
configure({
|
|
28264
28298
|
enforceActions: "never",
|
|
28265
28299
|
});
|
|
@@ -28271,4 +28305,4 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
28271
28305
|
return IkasBaseStore;
|
|
28272
28306
|
}());
|
|
28273
28307
|
|
|
28274
|
-
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, cart as CartPage, _id_$1 as CheckoutPage, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, GTMAddToCart, GTMBeginCheckout, GTMBody, GTMCheckoutStep, GTMDisableHTML, GTMHead, GTMPageView, GTMProductView, GTMPurchase, GTMRemoveFromCart, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAPI, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontAPI, IkasStorefrontConfig, IkasTheme, IkasThemeAPI, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemeCustomDataType, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _id_$2 as OrderDetailPage, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|
|
28308
|
+
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, cart as CartPage, _id_$1 as CheckoutPage, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, GTMAddToCart, GTMBeginCheckout, GTMBody, GTMCheckoutStep, GTMDisableHTML, GTMHead, GTMPageView, GTMProductView, GTMPurchase, GTMRemoveFromCart, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageComponentPropValue, IkasPageDataProvider, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAPI, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontAPI, IkasStorefrontConfig, IkasTheme, IkasThemeAPI, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemeCustomDataType, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home as IndexPage, LessThanRule, LoginForm, login as LoginPage, MaxRule, MinRule, _id_$2 as OrderDetailPage, index$4 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword as RecoverPasswordPage, RegisterForm, register as RegisterPage, RequiredRule, search as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, decodeBase64, formatMoney, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|
package/build/index.js
CHANGED
|
@@ -18204,6 +18204,7 @@ var IkasThemePage = /** @class */ (function () {
|
|
|
18204
18204
|
IkasThemePageType["RECOVER_PASSWORD"] = "RECOVER_PASSWORD";
|
|
18205
18205
|
IkasThemePageType["CART"] = "CART";
|
|
18206
18206
|
IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
|
|
18207
|
+
IkasThemePageType["SEARCH"] = "SEARCH";
|
|
18207
18208
|
})(exports.IkasThemePageType || (exports.IkasThemePageType = {}));
|
|
18208
18209
|
|
|
18209
18210
|
var IkasThemeColor = /** @class */ (function () {
|
|
@@ -20151,6 +20152,9 @@ var IkasProductList = /** @class */ (function () {
|
|
|
20151
20152
|
filter.applyQueryParam(value);
|
|
20152
20153
|
}
|
|
20153
20154
|
});
|
|
20155
|
+
var querySearch = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("s");
|
|
20156
|
+
if (querySearch)
|
|
20157
|
+
this._searchKeyword = querySearch;
|
|
20154
20158
|
}
|
|
20155
20159
|
catch (err) {
|
|
20156
20160
|
console.log(err);
|
|
@@ -24567,6 +24571,7 @@ var CheckoutViewModel = /** @class */ (function () {
|
|
|
24567
24571
|
if (typeof queryParams.failed === "string") {
|
|
24568
24572
|
this.error = {
|
|
24569
24573
|
type: ErrorType.PAYMENT_ERROR,
|
|
24574
|
+
data: queryParams.error || null,
|
|
24570
24575
|
};
|
|
24571
24576
|
}
|
|
24572
24577
|
merchantId = decodeBase64(IkasStorefrontConfig.config.apiKey || "");
|
|
@@ -26305,9 +26310,10 @@ var UnknownError = mobxReactLite.observer(function (_a) {
|
|
|
26305
26310
|
});
|
|
26306
26311
|
|
|
26307
26312
|
var PaymentError = mobxReactLite.observer(function (_a) {
|
|
26308
|
-
var onClose = _a.onClose;
|
|
26313
|
+
var error = _a.error, onClose = _a.onClose;
|
|
26309
26314
|
return (React.createElement(ErrorContainer, { onClose: onClose },
|
|
26310
|
-
React.createElement("div", null,
|
|
26315
|
+
React.createElement("div", null, (error === null || error === void 0 ? void 0 : error.data) ||
|
|
26316
|
+
"Ödemeniz alınamadı. Lütfen bilgilerinizi kontrol edip tekrar deneyin.")));
|
|
26311
26317
|
});
|
|
26312
26318
|
|
|
26313
26319
|
var NoShippingError = mobxReactLite.observer(function (_a) {
|
|
@@ -27102,7 +27108,7 @@ var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
|
|
|
27102
27108
|
return React.createElement(StockError, { error: vm.error, onClose: onErrorClose });
|
|
27103
27109
|
};
|
|
27104
27110
|
var renderPaymentError = function () {
|
|
27105
|
-
return React.createElement(PaymentError, { onClose: onErrorClose });
|
|
27111
|
+
return React.createElement(PaymentError, { error: vm.error, onClose: onErrorClose });
|
|
27106
27112
|
};
|
|
27107
27113
|
var renderNoShipingError = function () {
|
|
27108
27114
|
return React.createElement(NoShippingError, { onClose: onErrorClose });
|
|
@@ -28240,6 +28246,34 @@ var favoriteProducts = /*#__PURE__*/Object.freeze({
|
|
|
28240
28246
|
getStaticProps: getStaticProps$b
|
|
28241
28247
|
});
|
|
28242
28248
|
|
|
28249
|
+
var Page$e = function (_a) {
|
|
28250
|
+
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
|
|
28251
|
+
var router$1 = router.useRouter();
|
|
28252
|
+
var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router$1);
|
|
28253
|
+
return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
28254
|
+
};
|
|
28255
|
+
var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
28256
|
+
var theme, provider;
|
|
28257
|
+
return __generator(this, function (_a) {
|
|
28258
|
+
switch (_a.label) {
|
|
28259
|
+
case 0: return [4 /*yield*/, IkasThemeAPI.fetchTheme()];
|
|
28260
|
+
case 1:
|
|
28261
|
+
theme = _a.sent();
|
|
28262
|
+
provider = new IkasPageDataProvider(theme, context.params, exports.IkasThemePageType.SEARCH);
|
|
28263
|
+
return [4 /*yield*/, provider.getPageData()];
|
|
28264
|
+
case 2:
|
|
28265
|
+
_a.sent();
|
|
28266
|
+
return [2 /*return*/, __assign(__assign({}, provider.nextPageData), { revalidate: 60 })];
|
|
28267
|
+
}
|
|
28268
|
+
});
|
|
28269
|
+
}); };
|
|
28270
|
+
|
|
28271
|
+
var search = /*#__PURE__*/Object.freeze({
|
|
28272
|
+
__proto__: null,
|
|
28273
|
+
'default': Page$e,
|
|
28274
|
+
getStaticProps: getStaticProps$c
|
|
28275
|
+
});
|
|
28276
|
+
|
|
28243
28277
|
mobx.configure({
|
|
28244
28278
|
enforceActions: "never",
|
|
28245
28279
|
});
|
|
@@ -28359,6 +28393,7 @@ exports.RecoverPasswordPage = recoverPassword;
|
|
|
28359
28393
|
exports.RegisterForm = RegisterForm;
|
|
28360
28394
|
exports.RegisterPage = register;
|
|
28361
28395
|
exports.RequiredRule = RequiredRule;
|
|
28396
|
+
exports.SearchPage = search;
|
|
28362
28397
|
exports.SlugPage = index$2;
|
|
28363
28398
|
exports.ValidationRule = ValidationRule;
|
|
28364
28399
|
exports.Validator = Validator;
|
package/build/pages/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ import * as RecoverPasswordPage from "./account/recover-password";
|
|
|
13
13
|
import * as CartPage from "./cart";
|
|
14
14
|
import * as EditorPage from "./editor";
|
|
15
15
|
import * as FavoriteProductsPage from "./account/favorite-products";
|
|
16
|
-
|
|
16
|
+
import * as SearchPage from "./search";
|
|
17
|
+
export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, };
|
|
@@ -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
|
+
merchantSettings: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Page: React.FC<Props>;
|
|
11
|
+
export default Page;
|
|
12
|
+
export declare const getStaticProps: GetStaticProps;
|