@ikas/storefront 0.0.129 → 0.0.130

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
@@ -10901,6 +10901,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
10901
10901
  null,
10902
10902
  gtmId: IkasStorefrontConfig.gtmId || null,
10903
10903
  fbpId: IkasStorefrontConfig.fbpId || null,
10904
+ favicon: JSON.parse(JSON.stringify(IkasStorefrontConfig.favicon)),
10904
10905
  };
10905
10906
  };
10906
10907
  IkasStorefrontConfig.components = {};
@@ -21217,12 +21218,22 @@ var IkasThemeColor = /** @class */ (function () {
21217
21218
  return IkasThemeColor;
21218
21219
  }());
21219
21220
 
21221
+ var IkasThemeFavicon = /** @class */ (function () {
21222
+ function IkasThemeFavicon(data) {
21223
+ this.id = (data === null || data === void 0 ? void 0 : data.id) || null;
21224
+ makeAutoObservable(this);
21225
+ }
21226
+ return IkasThemeFavicon;
21227
+ }());
21228
+
21220
21229
  var IkasThemeSettings = /** @class */ (function () {
21221
21230
  function IkasThemeSettings(data) {
21222
21231
  if (data === void 0) { data = {}; }
21232
+ var _a;
21223
21233
  this.colors = data.colors
21224
21234
  ? data.colors.map(function (c) { return new IkasThemeColor(c); })
21225
21235
  : [];
21236
+ this.favicon = ((_a = data.favicon) === null || _a === void 0 ? void 0 : _a.id) ? data.favicon : new IkasThemeFavicon();
21226
21237
  makeAutoObservable(this);
21227
21238
  }
21228
21239
  return IkasThemeSettings;
@@ -30186,7 +30197,7 @@ var SettingsHelper = /** @class */ (function () {
30186
30197
  SettingsHelper.getSettings = function (locale) {
30187
30198
  var _this = this;
30188
30199
  return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
30189
- var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, themeLocalizationPath, routing_1;
30200
+ var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, favicon_1, themeLocalizationPath, routing_1;
30190
30201
  return __generator(this, function (_a) {
30191
30202
  switch (_a.label) {
30192
30203
  case 0:
@@ -30217,6 +30228,7 @@ var SettingsHelper = /** @class */ (function () {
30217
30228
  ? storefront.routings.find(function (r) { return !r.path && !r.domain; }) ||
30218
30229
  storefront.routings[0]
30219
30230
  : new IkasStorefrontRouting({}),
30231
+ favicon: localTheme.settings.favicon,
30220
30232
  });
30221
30233
  return [3 /*break*/, 5];
30222
30234
  case 3: return [4 /*yield*/, SettingsHelper.readSettingsFile()];
@@ -30227,6 +30239,7 @@ var SettingsHelper = /** @class */ (function () {
30227
30239
  storefront_1 = new IkasStorefront(settings.storefront);
30228
30240
  salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
30229
30241
  localizationMap = settings.localizationMap;
30242
+ favicon_1 = settings.favicon;
30230
30243
  themeLocalizationPath = localizationMap[locale];
30231
30244
  routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
30232
30245
  if (!themeLocalizationPath || !routing_1) {
@@ -30247,6 +30260,7 @@ var SettingsHelper = /** @class */ (function () {
30247
30260
  themeLocalization: new IkasStorefrontThemeLocalization(result),
30248
30261
  salesChannel: salesChannel_1,
30249
30262
  routing: routing_1,
30263
+ favicon: favicon_1,
30250
30264
  });
30251
30265
  });
30252
30266
  _a.label = 5;
@@ -30258,7 +30272,7 @@ var SettingsHelper = /** @class */ (function () {
30258
30272
  SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
30259
30273
  var _a;
30260
30274
  return __awaiter(this, void 0, void 0, function () {
30261
- var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, provider;
30275
+ var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, provider;
30262
30276
  return __generator(this, function (_b) {
30263
30277
  switch (_b.label) {
30264
30278
  case 0:
@@ -30281,7 +30295,7 @@ var SettingsHelper = /** @class */ (function () {
30281
30295
  notFound: true,
30282
30296
  }];
30283
30297
  }
30284
- storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing;
30298
+ storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing, favicon = settings.favicon;
30285
30299
  IkasStorefrontConfig.storefrontId = storefront.id;
30286
30300
  IkasStorefrontConfig.storefrontRoutingId = routing.id;
30287
30301
  IkasStorefrontConfig.storefrontThemeId = storefront.mainStorefrontThemeId;
@@ -30292,6 +30306,7 @@ var SettingsHelper = /** @class */ (function () {
30292
30306
  IkasStorefrontConfig.paymentGateways = salesChannel.paymentGateways || [];
30293
30307
  IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
30294
30308
  IkasStorefrontConfig.fbpId = storefront.fbpId || undefined;
30309
+ IkasStorefrontConfig.favicon = favicon || null;
30295
30310
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
30296
30311
  provider.possiblePageTypes = possiblePageTypes;
30297
30312
  return [4 /*yield*/, provider.getPageData()];
package/build/index.js CHANGED
@@ -10916,6 +10916,7 @@ var IkasStorefrontConfig = /** @class */ (function () {
10916
10916
  null,
10917
10917
  gtmId: IkasStorefrontConfig.gtmId || null,
10918
10918
  fbpId: IkasStorefrontConfig.fbpId || null,
10919
+ favicon: JSON.parse(JSON.stringify(IkasStorefrontConfig.favicon)),
10919
10920
  };
10920
10921
  };
10921
10922
  IkasStorefrontConfig.components = {};
@@ -21204,12 +21205,22 @@ var IkasThemeColor = /** @class */ (function () {
21204
21205
  return IkasThemeColor;
21205
21206
  }());
21206
21207
 
21208
+ var IkasThemeFavicon = /** @class */ (function () {
21209
+ function IkasThemeFavicon(data) {
21210
+ this.id = (data === null || data === void 0 ? void 0 : data.id) || null;
21211
+ mobx.makeAutoObservable(this);
21212
+ }
21213
+ return IkasThemeFavicon;
21214
+ }());
21215
+
21207
21216
  var IkasThemeSettings = /** @class */ (function () {
21208
21217
  function IkasThemeSettings(data) {
21209
21218
  if (data === void 0) { data = {}; }
21219
+ var _a;
21210
21220
  this.colors = data.colors
21211
21221
  ? data.colors.map(function (c) { return new IkasThemeColor(c); })
21212
21222
  : [];
21223
+ this.favicon = ((_a = data.favicon) === null || _a === void 0 ? void 0 : _a.id) ? data.favicon : new IkasThemeFavicon();
21213
21224
  mobx.makeAutoObservable(this);
21214
21225
  }
21215
21226
  return IkasThemeSettings;
@@ -30164,7 +30175,7 @@ var SettingsHelper = /** @class */ (function () {
30164
30175
  SettingsHelper.getSettings = function (locale) {
30165
30176
  var _this = this;
30166
30177
  return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
30167
- var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, themeLocalizationPath, routing_1;
30178
+ var isLocal, storefrontResponse, storefront, localTheme, settings, storefront_1, salesChannel_1, localizationMap, favicon_1, themeLocalizationPath, routing_1;
30168
30179
  return __generator(this, function (_a) {
30169
30180
  switch (_a.label) {
30170
30181
  case 0:
@@ -30195,6 +30206,7 @@ var SettingsHelper = /** @class */ (function () {
30195
30206
  ? storefront.routings.find(function (r) { return !r.path && !r.domain; }) ||
30196
30207
  storefront.routings[0]
30197
30208
  : new IkasStorefrontRouting({}),
30209
+ favicon: localTheme.settings.favicon,
30198
30210
  });
30199
30211
  return [3 /*break*/, 5];
30200
30212
  case 3: return [4 /*yield*/, SettingsHelper.readSettingsFile()];
@@ -30205,6 +30217,7 @@ var SettingsHelper = /** @class */ (function () {
30205
30217
  storefront_1 = new IkasStorefront(settings.storefront);
30206
30218
  salesChannel_1 = new IkasSalesChannel(settings.salesChannel);
30207
30219
  localizationMap = settings.localizationMap;
30220
+ favicon_1 = settings.favicon;
30208
30221
  themeLocalizationPath = localizationMap[locale];
30209
30222
  routing_1 = storefront_1.routings.find(function (r) { return r.id === locale || r.path === locale; });
30210
30223
  if (!themeLocalizationPath || !routing_1) {
@@ -30225,6 +30238,7 @@ var SettingsHelper = /** @class */ (function () {
30225
30238
  themeLocalization: new IkasStorefrontThemeLocalization(result),
30226
30239
  salesChannel: salesChannel_1,
30227
30240
  routing: routing_1,
30241
+ favicon: favicon_1,
30228
30242
  });
30229
30243
  });
30230
30244
  _a.label = 5;
@@ -30236,7 +30250,7 @@ var SettingsHelper = /** @class */ (function () {
30236
30250
  SettingsHelper.getPageData = function (context, isServer, pageType, possiblePageTypes) {
30237
30251
  var _a;
30238
30252
  return __awaiter(this, void 0, void 0, function () {
30239
- var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, provider;
30253
+ var isLocal, locale, settings, storefront, themeLocalization, salesChannel, routing, favicon, provider;
30240
30254
  return __generator(this, function (_b) {
30241
30255
  switch (_b.label) {
30242
30256
  case 0:
@@ -30259,7 +30273,7 @@ var SettingsHelper = /** @class */ (function () {
30259
30273
  notFound: true,
30260
30274
  }];
30261
30275
  }
30262
- storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing;
30276
+ storefront = settings.storefront, themeLocalization = settings.themeLocalization, salesChannel = settings.salesChannel, routing = settings.routing, favicon = settings.favicon;
30263
30277
  IkasStorefrontConfig.storefrontId = storefront.id;
30264
30278
  IkasStorefrontConfig.storefrontRoutingId = routing.id;
30265
30279
  IkasStorefrontConfig.storefrontThemeId = storefront.mainStorefrontThemeId;
@@ -30270,6 +30284,7 @@ var SettingsHelper = /** @class */ (function () {
30270
30284
  IkasStorefrontConfig.paymentGateways = salesChannel.paymentGateways || [];
30271
30285
  IkasStorefrontConfig.gtmId = storefront.gtmId || undefined;
30272
30286
  IkasStorefrontConfig.fbpId = storefront.fbpId || undefined;
30287
+ IkasStorefrontConfig.favicon = favicon || null;
30273
30288
  provider = new IkasPageDataProvider(themeLocalization.themeJson, context.params, pageType);
30274
30289
  provider.possiblePageTypes = possiblePageTypes;
30275
30290
  return [4 /*yield*/, provider.getPageData()];
@@ -1,5 +1,7 @@
1
- import { IkasThemeColor } from "./prop/index";
1
+ import { IkasThemeColor } from "./prop/color/index";
2
+ import { IkasThemeFavicon } from "./prop/favicon/index";
2
3
  export declare class IkasThemeSettings {
3
4
  colors: IkasThemeColor[];
5
+ favicon: IkasThemeFavicon;
4
6
  constructor(data?: Partial<IkasThemeSettings>);
5
7
  }
@@ -0,0 +1,4 @@
1
+ export declare class IkasThemeFavicon {
2
+ id: string | null;
3
+ constructor(data?: Partial<IkasThemeFavicon>);
4
+ }
@@ -1,5 +1,6 @@
1
1
  import { IkasSalesChannelPaymentGateway } from "../models/data/sales-channel/index";
2
2
  import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
3
+ import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
3
4
  import { IkasBaseStore } from "../store/index";
4
5
  export declare class IkasStorefrontConfig {
5
6
  static store: IkasBaseStore;
@@ -16,6 +17,7 @@ export declare class IkasStorefrontConfig {
16
17
  static paymentGateways: IkasSalesChannelPaymentGateway[];
17
18
  static gtmId?: string;
18
19
  static fbpId?: string;
20
+ static favicon: IkasThemeFavicon;
19
21
  static init(store: IkasBaseStore, components: any, config: Record<string, any>, apiUrlOverride?: string): void;
20
22
  static initWithJson(json: Record<string, any>): void;
21
23
  static getJson(): {
@@ -29,5 +31,6 @@ export declare class IkasStorefrontConfig {
29
31
  paymentGateways: any;
30
32
  gtmId: string | null;
31
33
  fbpId: string | null;
34
+ favicon: any;
32
35
  };
33
36
  }
@@ -34,6 +34,7 @@ export declare class IkasPageDataProvider {
34
34
  paymentGateways: any;
35
35
  gtmId: string | null;
36
36
  fbpId: string | null;
37
+ favicon: any;
37
38
  };
38
39
  };
39
40
  };
@@ -6,6 +6,7 @@ import { IkasStorefront } from "../models/data/storefront/index";
6
6
  import { IkasSalesChannel } from "../models/data/sales-channel/index";
7
7
  import { IkasStorefrontRouting } from "../models/data/storefront/routing/index";
8
8
  import { IkasStorefrontThemeLocalization } from "../models/data/storefront/theme-localization/index";
9
+ import { IkasThemeFavicon } from "../models/theme/settings/prop/favicon/index";
9
10
  export declare class SettingsHelper {
10
11
  static readLocalTheme(): Promise<IkasTheme>;
11
12
  static readSettingsFile(): Promise<any>;
@@ -28,6 +29,7 @@ export declare class SettingsHelper {
28
29
  paymentGateways: any;
29
30
  gtmId: string | null;
30
31
  fbpId: string | null;
32
+ favicon: any;
31
33
  };
32
34
  };
33
35
  } | {
@@ -52,6 +54,7 @@ export declare class SettingsHelper {
52
54
  paymentGateways: any;
53
55
  gtmId: string | null;
54
56
  fbpId: string | null;
57
+ favicon: any;
55
58
  };
56
59
  };
57
60
  revalidate: number;
@@ -75,6 +78,7 @@ export declare class SettingsHelper {
75
78
  paymentGateways: any;
76
79
  gtmId: string | null;
77
80
  fbpId: string | null;
81
+ favicon: any;
78
82
  };
79
83
  };
80
84
  } | {
@@ -99,6 +103,7 @@ export declare class SettingsHelper {
99
103
  paymentGateways: any;
100
104
  gtmId: string | null;
101
105
  fbpId: string | null;
106
+ favicon: any;
102
107
  };
103
108
  };
104
109
  revalidate: number;
@@ -122,6 +127,7 @@ export declare class SettingsHelper {
122
127
  paymentGateways: any;
123
128
  gtmId: string | null;
124
129
  fbpId: string | null;
130
+ favicon: any;
125
131
  };
126
132
  };
127
133
  } | {
@@ -146,6 +152,7 @@ export declare class SettingsHelper {
146
152
  paymentGateways: any;
147
153
  gtmId: string | null;
148
154
  fbpId: string | null;
155
+ favicon: any;
149
156
  };
150
157
  };
151
158
  revalidate: number;
@@ -157,4 +164,5 @@ export declare type SettingsData = {
157
164
  themeLocalization: IkasStorefrontThemeLocalization;
158
165
  salesChannel: IkasSalesChannel;
159
166
  routing: IkasStorefrontRouting;
167
+ favicon: IkasThemeFavicon;
160
168
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",