@ikas/storefront 0.0.161-alpha.4 → 0.0.161-alpha.6

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
@@ -37920,7 +37920,7 @@ var SettingsHelper = /** @class */ (function () {
37920
37920
  id: storefront.salesChannelId,
37921
37921
  }),
37922
37922
  routing: storefront.routings.length
37923
- ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37923
+ ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37924
37924
  storefront.routings[0]
37925
37925
  : new IkasStorefrontRouting({}),
37926
37926
  favicon: localTheme.settings.favicon,
@@ -37971,7 +37971,7 @@ var SettingsHelper = /** @class */ (function () {
37971
37971
  SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
37972
37972
  var _a;
37973
37973
  return __awaiter(this, void 0, void 0, function () {
37974
- var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37974
+ var isLocal, locale, serverRuntimeConfig, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37975
37975
  var _d, _e;
37976
37976
  return __generator(this, function (_f) {
37977
37977
  switch (_f.label) {
@@ -37984,6 +37984,7 @@ var SettingsHelper = /** @class */ (function () {
37984
37984
  notFound: true,
37985
37985
  }];
37986
37986
  }
37987
+ serverRuntimeConfig = getConfig().serverRuntimeConfig;
37987
37988
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
37988
37989
  case 1:
37989
37990
  settings = _f.sent();
@@ -38027,13 +38028,17 @@ var SettingsHelper = /** @class */ (function () {
38027
38028
  if (!isServer) return [3 /*break*/, 4];
38028
38029
  _d = {};
38029
38030
  _b = [{}];
38030
- return [4 /*yield*/, serverSideTranslations(locale, componentDirs)];
38031
+ return [4 /*yield*/, serverSideTranslations(locale, componentDirs, {
38032
+ i18n: serverRuntimeConfig.i18n,
38033
+ })];
38031
38034
  case 3: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
38032
38035
  _d)];
38033
38036
  case 4:
38034
38037
  _e = {};
38035
38038
  _c = [{}];
38036
- return [4 /*yield*/, serverSideTranslations(locale, componentDirs)];
38039
+ return [4 /*yield*/, serverSideTranslations(locale, componentDirs, {
38040
+ i18n: serverRuntimeConfig.i18n,
38041
+ })];
38037
38042
  case 5: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
38038
38043
  _e.revalidate = 60,
38039
38044
  _e)];
package/build/index.js CHANGED
@@ -37897,7 +37897,7 @@ var SettingsHelper = /** @class */ (function () {
37897
37897
  id: storefront.salesChannelId,
37898
37898
  }),
37899
37899
  routing: storefront.routings.length
37900
- ? storefront.routings.find(function (r) { return r.locale === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37900
+ ? storefront.routings.find(function (r) { return r.locale === locale || r.id === locale; }) || //storefront.routings.find((r) => !r.path && !r.domain) ||
37901
37901
  storefront.routings[0]
37902
37902
  : new IkasStorefrontRouting({}),
37903
37903
  favicon: localTheme.settings.favicon,
@@ -37948,7 +37948,7 @@ var SettingsHelper = /** @class */ (function () {
37948
37948
  SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
37949
37949
  var _a;
37950
37950
  return __awaiter(this, void 0, void 0, function () {
37951
- var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37951
+ var isLocal, locale, serverRuntimeConfig, settings, storefront, themeLocalization, salesChannel, routing, favicon, stockPreference, provider, componentIds, components, componentDirs, _b, _c;
37952
37952
  var _d, _e;
37953
37953
  return __generator(this, function (_f) {
37954
37954
  switch (_f.label) {
@@ -37961,6 +37961,7 @@ var SettingsHelper = /** @class */ (function () {
37961
37961
  notFound: true,
37962
37962
  }];
37963
37963
  }
37964
+ serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
37964
37965
  return [4 /*yield*/, SettingsHelper.getSettings(locale)];
37965
37966
  case 1:
37966
37967
  settings = _f.sent();
@@ -38004,13 +38005,17 @@ var SettingsHelper = /** @class */ (function () {
38004
38005
  if (!isServer) return [3 /*break*/, 4];
38005
38006
  _d = {};
38006
38007
  _b = [{}];
38007
- return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs)];
38008
+ return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs, {
38009
+ i18n: serverRuntimeConfig.i18n,
38010
+ })];
38008
38011
  case 3: return [2 /*return*/, (_d.props = __assign.apply(void 0, [__assign.apply(void 0, _b.concat([(_f.sent())])), provider.nextPageData.props]),
38009
38012
  _d)];
38010
38013
  case 4:
38011
38014
  _e = {};
38012
38015
  _c = [{}];
38013
- return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs)];
38016
+ return [4 /*yield*/, serverSideTranslations.serverSideTranslations(locale, componentDirs, {
38017
+ i18n: serverRuntimeConfig.i18n,
38018
+ })];
38014
38019
  case 5: return [2 /*return*/, (_e.props = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), provider.nextPageData.props]),
38015
38020
  _e.revalidate = 60,
38016
38021
  _e)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.161-alpha.4",
3
+ "version": "0.0.161-alpha.6",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",