@ikas/storefront 0.0.136 → 0.0.137
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 +11 -6
- package/build/index.js +11 -6
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -24738,12 +24738,16 @@ var ThemeComponent = observer(function (_a) {
|
|
|
24738
24738
|
});
|
|
24739
24739
|
|
|
24740
24740
|
var IkasPageHead = observer(function (_a) {
|
|
24741
|
-
var _b;
|
|
24741
|
+
var _b, _c;
|
|
24742
24742
|
var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
|
|
24743
24743
|
var ogpMetas = [];
|
|
24744
24744
|
var schemas = [];
|
|
24745
24745
|
var isCanonicalLinkAdd = false;
|
|
24746
24746
|
var canonicalHref = "";
|
|
24747
|
+
if (typeof window !== "undefined") {
|
|
24748
|
+
document.documentElement.lang =
|
|
24749
|
+
((_b = IkasStorefrontConfig.routings.find(function (r) { return r.id === IkasStorefrontConfig.storefrontRoutingId; })) === null || _b === void 0 ? void 0 : _b.locale) || "tr";
|
|
24750
|
+
}
|
|
24747
24751
|
if (props.addOgpMetas) {
|
|
24748
24752
|
ogpMetas.push({
|
|
24749
24753
|
property: "og:type",
|
|
@@ -24780,7 +24784,7 @@ var IkasPageHead = observer(function (_a) {
|
|
|
24780
24784
|
if (productDetail.selectedVariant.mainImage) {
|
|
24781
24785
|
ogpMetas.push({
|
|
24782
24786
|
property: "og:image",
|
|
24783
|
-
content: (
|
|
24787
|
+
content: (_c = productDetail.selectedVariant.mainImage) === null || _c === void 0 ? void 0 : _c.src,
|
|
24784
24788
|
});
|
|
24785
24789
|
}
|
|
24786
24790
|
}
|
|
@@ -30325,7 +30329,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30325
30329
|
SettingsHelper.getSettings = function (locale) {
|
|
30326
30330
|
var _this = this;
|
|
30327
30331
|
return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
30328
|
-
var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap,
|
|
30332
|
+
var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, themeLocalizationPath, routing_1;
|
|
30329
30333
|
return __generator(this, function (_a) {
|
|
30330
30334
|
switch (_a.label) {
|
|
30331
30335
|
case 0:
|
|
@@ -30367,7 +30371,6 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30367
30371
|
storefront_1 = new IkasStorefront(settings.storefront);
|
|
30368
30372
|
salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
|
|
30369
30373
|
localizationMap = settings.localizationMap;
|
|
30370
|
-
favicon_1 = settings.favicon;
|
|
30371
30374
|
themeLocalizationPath = localizationMap[locale];
|
|
30372
30375
|
routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
|
|
30373
30376
|
if (!themeLocalizationPath || !routing_1) {
|
|
@@ -30383,12 +30386,14 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30383
30386
|
return resolve(null);
|
|
30384
30387
|
}
|
|
30385
30388
|
var result = file.length ? JSON.parse(file.toString()) : {};
|
|
30389
|
+
var themeLocalization = new IkasStorefrontThemeLocalization(result);
|
|
30390
|
+
var favicon = themeLocalization.themeJson.settings.favicon;
|
|
30386
30391
|
resolve({
|
|
30387
30392
|
storefront: storefront_1,
|
|
30388
|
-
themeLocalization:
|
|
30393
|
+
themeLocalization: themeLocalization,
|
|
30389
30394
|
salesChannel: salesChannel_1,
|
|
30390
30395
|
routing: routing_1,
|
|
30391
|
-
favicon:
|
|
30396
|
+
favicon: favicon,
|
|
30392
30397
|
});
|
|
30393
30398
|
});
|
|
30394
30399
|
_a.label = 5;
|
package/build/index.js
CHANGED
|
@@ -24718,12 +24718,16 @@ var ThemeComponent = mobxReactLite.observer(function (_a) {
|
|
|
24718
24718
|
});
|
|
24719
24719
|
|
|
24720
24720
|
var IkasPageHead = mobxReactLite.observer(function (_a) {
|
|
24721
|
-
var _b;
|
|
24721
|
+
var _b, _c;
|
|
24722
24722
|
var page = _a.page, pageTitle = _a.pageTitle, description = _a.description, pageSpecificDataStr = _a.pageSpecificDataStr, props = __rest(_a, ["page", "pageTitle", "description", "pageSpecificDataStr"]);
|
|
24723
24723
|
var ogpMetas = [];
|
|
24724
24724
|
var schemas = [];
|
|
24725
24725
|
var isCanonicalLinkAdd = false;
|
|
24726
24726
|
var canonicalHref = "";
|
|
24727
|
+
if (typeof window !== "undefined") {
|
|
24728
|
+
document.documentElement.lang =
|
|
24729
|
+
((_b = IkasStorefrontConfig.routings.find(function (r) { return r.id === IkasStorefrontConfig.storefrontRoutingId; })) === null || _b === void 0 ? void 0 : _b.locale) || "tr";
|
|
24730
|
+
}
|
|
24727
24731
|
if (props.addOgpMetas) {
|
|
24728
24732
|
ogpMetas.push({
|
|
24729
24733
|
property: "og:type",
|
|
@@ -24760,7 +24764,7 @@ var IkasPageHead = mobxReactLite.observer(function (_a) {
|
|
|
24760
24764
|
if (productDetail.selectedVariant.mainImage) {
|
|
24761
24765
|
ogpMetas.push({
|
|
24762
24766
|
property: "og:image",
|
|
24763
|
-
content: (
|
|
24767
|
+
content: (_c = productDetail.selectedVariant.mainImage) === null || _c === void 0 ? void 0 : _c.src,
|
|
24764
24768
|
});
|
|
24765
24769
|
}
|
|
24766
24770
|
}
|
|
@@ -30304,7 +30308,7 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30304
30308
|
SettingsHelper.getSettings = function (locale) {
|
|
30305
30309
|
var _this = this;
|
|
30306
30310
|
return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
30307
|
-
var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap,
|
|
30311
|
+
var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, themeLocalizationPath, routing_1;
|
|
30308
30312
|
return __generator(this, function (_a) {
|
|
30309
30313
|
switch (_a.label) {
|
|
30310
30314
|
case 0:
|
|
@@ -30346,7 +30350,6 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30346
30350
|
storefront_1 = new IkasStorefront(settings.storefront);
|
|
30347
30351
|
salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
|
|
30348
30352
|
localizationMap = settings.localizationMap;
|
|
30349
|
-
favicon_1 = settings.favicon;
|
|
30350
30353
|
themeLocalizationPath = localizationMap[locale];
|
|
30351
30354
|
routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
|
|
30352
30355
|
if (!themeLocalizationPath || !routing_1) {
|
|
@@ -30362,12 +30365,14 @@ var SettingsHelper = /** @class */ (function () {
|
|
|
30362
30365
|
return resolve(null);
|
|
30363
30366
|
}
|
|
30364
30367
|
var result = file.length ? JSON.parse(file.toString()) : {};
|
|
30368
|
+
var themeLocalization = new IkasStorefrontThemeLocalization(result);
|
|
30369
|
+
var favicon = themeLocalization.themeJson.settings.favicon;
|
|
30365
30370
|
resolve({
|
|
30366
30371
|
storefront: storefront_1,
|
|
30367
|
-
themeLocalization:
|
|
30372
|
+
themeLocalization: themeLocalization,
|
|
30368
30373
|
salesChannel: salesChannel_1,
|
|
30369
30374
|
routing: routing_1,
|
|
30370
|
-
favicon:
|
|
30375
|
+
favicon: favicon,
|
|
30371
30376
|
});
|
|
30372
30377
|
});
|
|
30373
30378
|
_a.label = 5;
|