@ikas/storefront 0.0.70 → 0.0.72

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/index.es.js CHANGED
@@ -18217,6 +18217,7 @@ var IkasThemePageType;
18217
18217
  IkasThemePageType["CART"] = "CART";
18218
18218
  IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
18219
18219
  IkasThemePageType["SEARCH"] = "SEARCH";
18220
+ IkasThemePageType["NOT_FOUND"] = "NOT_FOUND";
18220
18221
  })(IkasThemePageType || (IkasThemePageType = {}));
18221
18222
 
18222
18223
  var IkasThemeColor = /** @class */ (function () {
@@ -28269,7 +28270,15 @@ var favoriteProducts = /*#__PURE__*/Object.freeze({
28269
28270
  var Page$e = function (_a) {
28270
28271
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
28271
28272
  var router = useRouter();
28272
- var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
28273
+ var _b = useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
28274
+ var initialPropValues = useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router); }, [propValuesStr]);
28275
+ var _c = useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
28276
+ useEffect(function () {
28277
+ setIsBrowser(typeof window !== "undefined");
28278
+ }, []);
28279
+ useEffect(function () {
28280
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, isBrowser));
28281
+ }, [isBrowser, propValuesStr]);
28273
28282
  return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
28274
28283
  };
28275
28284
  var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -28294,6 +28303,34 @@ var search = /*#__PURE__*/Object.freeze({
28294
28303
  getStaticProps: getStaticProps$c
28295
28304
  });
28296
28305
 
28306
+ var Page$f = function (_a) {
28307
+ var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
28308
+ var router = useRouter();
28309
+ var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router);
28310
+ return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
28311
+ };
28312
+ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
28313
+ var theme, provider;
28314
+ return __generator(this, function (_a) {
28315
+ switch (_a.label) {
28316
+ case 0: return [4 /*yield*/, IkasThemeAPI.fetchTheme()];
28317
+ case 1:
28318
+ theme = _a.sent();
28319
+ provider = new IkasPageDataProvider(theme, context.params, IkasThemePageType.NOT_FOUND);
28320
+ return [4 /*yield*/, provider.getPageData()];
28321
+ case 2:
28322
+ _a.sent();
28323
+ return [2 /*return*/, __assign(__assign({}, provider.nextPageData), { revalidate: 60 })];
28324
+ }
28325
+ });
28326
+ }); };
28327
+
28328
+ var _404 = /*#__PURE__*/Object.freeze({
28329
+ __proto__: null,
28330
+ 'default': Page$f,
28331
+ getStaticProps: getStaticProps$d
28332
+ });
28333
+
28297
28334
  configure({
28298
28335
  enforceActions: "never",
28299
28336
  });
@@ -28305,4 +28342,4 @@ var IkasBaseStore = /** @class */ (function () {
28305
28342
  return IkasBaseStore;
28306
28343
  }());
28307
28344
 
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 };
28345
+ 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, _404 as NotFoundPage, _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
@@ -18205,6 +18205,7 @@ var IkasThemePage = /** @class */ (function () {
18205
18205
  IkasThemePageType["CART"] = "CART";
18206
18206
  IkasThemePageType["FAVORITE_PRODUCTS"] = "FAVORITE_PRODUCTS";
18207
18207
  IkasThemePageType["SEARCH"] = "SEARCH";
18208
+ IkasThemePageType["NOT_FOUND"] = "NOT_FOUND";
18208
18209
  })(exports.IkasThemePageType || (exports.IkasThemePageType = {}));
18209
18210
 
18210
18211
  var IkasThemeColor = /** @class */ (function () {
@@ -28249,7 +28250,15 @@ var favoriteProducts = /*#__PURE__*/Object.freeze({
28249
28250
  var Page$e = function (_a) {
28250
28251
  var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
28251
28252
  var router$1 = router.useRouter();
28252
- var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router$1);
28253
+ var _b = React.useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
28254
+ var initialPropValues = React.useMemo(function () { return IkasPageDataProvider.initPropValues(propValuesStr, router$1); }, [propValuesStr]);
28255
+ var _c = React.useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
28256
+ React.useEffect(function () {
28257
+ setIsBrowser(typeof window !== "undefined");
28258
+ }, []);
28259
+ React.useEffect(function () {
28260
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, isBrowser));
28261
+ }, [isBrowser, propValuesStr]);
28253
28262
  return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
28254
28263
  };
28255
28264
  var getStaticProps$c = function (context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -28274,6 +28283,34 @@ var search = /*#__PURE__*/Object.freeze({
28274
28283
  getStaticProps: getStaticProps$c
28275
28284
  });
28276
28285
 
28286
+ var Page$f = function (_a) {
28287
+ var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings;
28288
+ var router$1 = router.useRouter();
28289
+ var propValues = IkasPageDataProvider.initPropValues(propValuesStr, router$1);
28290
+ return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues }));
28291
+ };
28292
+ var getStaticProps$d = function (context) { return __awaiter(void 0, void 0, void 0, function () {
28293
+ var theme, provider;
28294
+ return __generator(this, function (_a) {
28295
+ switch (_a.label) {
28296
+ case 0: return [4 /*yield*/, IkasThemeAPI.fetchTheme()];
28297
+ case 1:
28298
+ theme = _a.sent();
28299
+ provider = new IkasPageDataProvider(theme, context.params, exports.IkasThemePageType.NOT_FOUND);
28300
+ return [4 /*yield*/, provider.getPageData()];
28301
+ case 2:
28302
+ _a.sent();
28303
+ return [2 /*return*/, __assign(__assign({}, provider.nextPageData), { revalidate: 60 })];
28304
+ }
28305
+ });
28306
+ }); };
28307
+
28308
+ var _404 = /*#__PURE__*/Object.freeze({
28309
+ __proto__: null,
28310
+ 'default': Page$f,
28311
+ getStaticProps: getStaticProps$d
28312
+ });
28313
+
28277
28314
  mobx.configure({
28278
28315
  enforceActions: "never",
28279
28316
  });
@@ -28384,6 +28421,7 @@ exports.LoginForm = LoginForm;
28384
28421
  exports.LoginPage = login;
28385
28422
  exports.MaxRule = MaxRule;
28386
28423
  exports.MinRule = MinRule;
28424
+ exports.NotFoundPage = _404;
28387
28425
  exports.OrderDetailPage = _id_$2;
28388
28426
  exports.OrdersPage = index$4;
28389
28427
  exports.PhoneRule = PhoneRule;
@@ -25,5 +25,6 @@ export declare enum IkasThemePageType {
25
25
  RECOVER_PASSWORD = "RECOVER_PASSWORD",
26
26
  CART = "CART",
27
27
  FAVORITE_PRODUCTS = "FAVORITE_PRODUCTS",
28
- SEARCH = "SEARCH"
28
+ SEARCH = "SEARCH",
29
+ NOT_FOUND = "NOT_FOUND"
29
30
  }
@@ -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;
@@ -14,4 +14,5 @@ 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, };
17
+ import * as NotFoundPage from "./404";
18
+ export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",