@ikas/storefront 0.0.128 → 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 +88 -4
- package/build/index.js +89 -3
- package/build/models/theme/settings/index.d.ts +3 -1
- package/build/models/theme/settings/prop/{index.d.ts → color/index.d.ts} +0 -0
- package/build/models/theme/settings/prop/favicon/index.d.ts +4 -0
- package/build/pages/index.d.ts +3 -1
- package/build/storefront/index.d.ts +3 -0
- package/build/utils/providers/page-data.d.ts +1 -0
- package/build/utils/settings.d.ts +8 -0
- package/package.json +1 -1
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()];
|
|
@@ -30924,6 +30939,75 @@ var _404 = /*#__PURE__*/Object.freeze({
|
|
|
30924
30939
|
getStaticProps: getStaticProps$d
|
|
30925
30940
|
});
|
|
30926
30941
|
|
|
30942
|
+
var Page$g = function (_a) {
|
|
30943
|
+
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
30944
|
+
IkasStorefrontConfig.initWithJson(configJson);
|
|
30945
|
+
var router = useRouter();
|
|
30946
|
+
var propValues = useMemo(function () {
|
|
30947
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
30948
|
+
}, [propValuesStr]);
|
|
30949
|
+
return (createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
30950
|
+
};
|
|
30951
|
+
var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30952
|
+
return __generator(this, function (_a) {
|
|
30953
|
+
switch (_a.label) {
|
|
30954
|
+
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, IkasThemePageType.BLOG_INDEX)];
|
|
30955
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
30956
|
+
}
|
|
30957
|
+
});
|
|
30958
|
+
}); };
|
|
30959
|
+
|
|
30960
|
+
var index$5 = /*#__PURE__*/Object.freeze({
|
|
30961
|
+
__proto__: null,
|
|
30962
|
+
'default': Page$g,
|
|
30963
|
+
getStaticProps: getStaticProps$e
|
|
30964
|
+
});
|
|
30965
|
+
|
|
30966
|
+
var Page$h = function (_a) {
|
|
30967
|
+
var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
30968
|
+
IkasStorefrontConfig.initWithJson(configJson);
|
|
30969
|
+
var router = useRouter();
|
|
30970
|
+
var _b = useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
|
|
30971
|
+
var initialPropValues = useMemo(function () {
|
|
30972
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr);
|
|
30973
|
+
}, [propValuesStr]);
|
|
30974
|
+
var _c = useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
|
|
30975
|
+
useEffect(function () {
|
|
30976
|
+
setIsBrowser(typeof window !== "undefined");
|
|
30977
|
+
}, []);
|
|
30978
|
+
useEffect(function () {
|
|
30979
|
+
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router, settingsStr, isBrowser));
|
|
30980
|
+
}, [isBrowser, propValuesStr]);
|
|
30981
|
+
return (createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
|
|
30982
|
+
};
|
|
30983
|
+
var _slug_$1 = observer(Page$h);
|
|
30984
|
+
var getStaticPaths$2 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30985
|
+
return __generator(this, function (_a) {
|
|
30986
|
+
return [2 /*return*/, {
|
|
30987
|
+
paths: [],
|
|
30988
|
+
fallback: "blocking",
|
|
30989
|
+
}];
|
|
30990
|
+
});
|
|
30991
|
+
}); };
|
|
30992
|
+
var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30993
|
+
return __generator(this, function (_a) {
|
|
30994
|
+
switch (_a.label) {
|
|
30995
|
+
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
|
|
30996
|
+
IkasThemePageType.BLOG,
|
|
30997
|
+
IkasThemePageType.BLOG_CATEGORY,
|
|
30998
|
+
])];
|
|
30999
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
31000
|
+
}
|
|
31001
|
+
});
|
|
31002
|
+
}); };
|
|
31003
|
+
|
|
31004
|
+
var _slug_$2 = /*#__PURE__*/Object.freeze({
|
|
31005
|
+
__proto__: null,
|
|
31006
|
+
'default': _slug_$1,
|
|
31007
|
+
getStaticPaths: getStaticPaths$2,
|
|
31008
|
+
getStaticProps: getStaticProps$f
|
|
31009
|
+
});
|
|
31010
|
+
|
|
30927
31011
|
/**
|
|
30928
31012
|
* Flattens `array` a single level deep.
|
|
30929
31013
|
*
|
|
@@ -31054,4 +31138,4 @@ var IkasBaseStore = /** @class */ (function () {
|
|
|
31054
31138
|
return IkasBaseStore;
|
|
31055
31139
|
}());
|
|
31056
31140
|
|
|
31057
|
-
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, 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, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, 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, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, 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, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|
|
31141
|
+
export { AccountInfoForm, index$3 as AccountPage, AddressForm, addresses as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$5 as BlogPage, _slug_$2 as BlogSlugPage, cart as CartPage, _id_$1 as CheckoutPage, ContactForm, _slug_ as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts as FavoriteProductsPage, ForgotPasswordForm, forgotPassword as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutPage, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, 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, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, 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, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, 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, getPlaceholderBlog, getPlaceholderBrand, getPlaceholderCategory, getPlaceholderProduct, parseRangeStr, pascalCase, stringToSlug, validatePhoneNumber };
|
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()];
|
|
@@ -30902,6 +30917,75 @@ var _404 = /*#__PURE__*/Object.freeze({
|
|
|
30902
30917
|
getStaticProps: getStaticProps$d
|
|
30903
30918
|
});
|
|
30904
30919
|
|
|
30920
|
+
var Page$g = function (_a) {
|
|
30921
|
+
var page = _a.page, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
30922
|
+
IkasStorefrontConfig.initWithJson(configJson);
|
|
30923
|
+
var router$1 = router.useRouter();
|
|
30924
|
+
var propValues = React.useMemo(function () {
|
|
30925
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
|
|
30926
|
+
}, [propValuesStr]);
|
|
30927
|
+
return (React.createElement(IkasPage, { merchantSettings: merchantSettings, settingsStr: settingsStr, page: page, propValues: propValues, addOgpMetas: true }));
|
|
30928
|
+
};
|
|
30929
|
+
var getStaticProps$e = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30930
|
+
return __generator(this, function (_a) {
|
|
30931
|
+
switch (_a.label) {
|
|
30932
|
+
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, exports.IkasThemePageType.BLOG_INDEX)];
|
|
30933
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
30934
|
+
}
|
|
30935
|
+
});
|
|
30936
|
+
}); };
|
|
30937
|
+
|
|
30938
|
+
var index$5 = /*#__PURE__*/Object.freeze({
|
|
30939
|
+
__proto__: null,
|
|
30940
|
+
'default': Page$g,
|
|
30941
|
+
getStaticProps: getStaticProps$e
|
|
30942
|
+
});
|
|
30943
|
+
|
|
30944
|
+
var Page$h = function (_a) {
|
|
30945
|
+
var page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, propValuesStr = _a.propValuesStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, configJson = _a.configJson;
|
|
30946
|
+
IkasStorefrontConfig.initWithJson(configJson);
|
|
30947
|
+
var router$1 = router.useRouter();
|
|
30948
|
+
var _b = React.useState(false), isBrowser = _b[0], setIsBrowser = _b[1];
|
|
30949
|
+
var initialPropValues = React.useMemo(function () {
|
|
30950
|
+
return IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr);
|
|
30951
|
+
}, [propValuesStr]);
|
|
30952
|
+
var _c = React.useState(initialPropValues), propValues = _c[0], setPropValues = _c[1];
|
|
30953
|
+
React.useEffect(function () {
|
|
30954
|
+
setIsBrowser(typeof window !== "undefined");
|
|
30955
|
+
}, []);
|
|
30956
|
+
React.useEffect(function () {
|
|
30957
|
+
setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr, isBrowser));
|
|
30958
|
+
}, [isBrowser, propValuesStr]);
|
|
30959
|
+
return (React.createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
|
|
30960
|
+
};
|
|
30961
|
+
var _slug_$1 = mobxReactLite.observer(Page$h);
|
|
30962
|
+
var getStaticPaths$2 = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30963
|
+
return __generator(this, function (_a) {
|
|
30964
|
+
return [2 /*return*/, {
|
|
30965
|
+
paths: [],
|
|
30966
|
+
fallback: "blocking",
|
|
30967
|
+
}];
|
|
30968
|
+
});
|
|
30969
|
+
}); };
|
|
30970
|
+
var getStaticProps$f = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30971
|
+
return __generator(this, function (_a) {
|
|
30972
|
+
switch (_a.label) {
|
|
30973
|
+
case 0: return [4 /*yield*/, SettingsHelper.getStaticProps(context, undefined, [
|
|
30974
|
+
exports.IkasThemePageType.BLOG,
|
|
30975
|
+
exports.IkasThemePageType.BLOG_CATEGORY,
|
|
30976
|
+
])];
|
|
30977
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
30978
|
+
}
|
|
30979
|
+
});
|
|
30980
|
+
}); };
|
|
30981
|
+
|
|
30982
|
+
var _slug_$2 = /*#__PURE__*/Object.freeze({
|
|
30983
|
+
__proto__: null,
|
|
30984
|
+
'default': _slug_$1,
|
|
30985
|
+
getStaticPaths: getStaticPaths$2,
|
|
30986
|
+
getStaticProps: getStaticProps$f
|
|
30987
|
+
});
|
|
30988
|
+
|
|
30905
30989
|
/**
|
|
30906
30990
|
* Flattens `array` a single level deep.
|
|
30907
30991
|
*
|
|
@@ -31039,6 +31123,8 @@ exports.AddressesPage = addresses;
|
|
|
31039
31123
|
exports.Analytics = Analytics;
|
|
31040
31124
|
exports.AnalyticsBody = AnalyticsBody;
|
|
31041
31125
|
exports.AnalyticsHead = AnalyticsHead;
|
|
31126
|
+
exports.BlogPage = index$5;
|
|
31127
|
+
exports.BlogSlugPage = _slug_$2;
|
|
31042
31128
|
exports.CartPage = cart;
|
|
31043
31129
|
exports.CheckoutPage = _id_$1;
|
|
31044
31130
|
exports.ContactForm = ContactForm;
|
|
@@ -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
|
}
|
|
File without changes
|
package/build/pages/index.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ import * as EditorPage from "./editor";
|
|
|
15
15
|
import * as FavoriteProductsPage from "./account/favorite-products";
|
|
16
16
|
import * as SearchPage from "./search";
|
|
17
17
|
import * as NotFoundPage from "./404";
|
|
18
|
-
|
|
18
|
+
import * as BlogPage from "./blog/index";
|
|
19
|
+
import * as BlogSlugPage from "./blog/[slug]";
|
|
20
|
+
export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, };
|
|
@@ -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
|
}
|
|
@@ -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
|
};
|