@websolutespa/bom-core 1.8.0 → 1.8.2
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -169,6 +169,8 @@ type IMediaInfo = {
|
|
|
169
169
|
filename: string;
|
|
170
170
|
mimeType: string;
|
|
171
171
|
filesize: number;
|
|
172
|
+
focalX?: number;
|
|
173
|
+
focalY?: number;
|
|
172
174
|
createdAt: Date | string;
|
|
173
175
|
updatedAt?: Date | string;
|
|
174
176
|
url: string;
|
|
@@ -306,9 +308,9 @@ type ILocale = IEntity & {
|
|
|
306
308
|
type IMarket = IEntity & {
|
|
307
309
|
id: string;
|
|
308
310
|
title?: string;
|
|
309
|
-
countries?: string[];
|
|
310
|
-
languages?: string[];
|
|
311
|
-
defaultLanguage?: string;
|
|
311
|
+
countries?: string[] | IEntity[];
|
|
312
|
+
languages?: string[] | IEntity[];
|
|
313
|
+
defaultLanguage?: string | IEntity;
|
|
312
314
|
isActive?: boolean;
|
|
313
315
|
isDefault?: boolean;
|
|
314
316
|
isHidden?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1345,7 +1345,7 @@ function collectRoutes(store, categories, markets, locales) {
|
|
|
1345
1345
|
if (rootCategory && item.category === rootCategory.id) {
|
|
1346
1346
|
const defaultLocale2 = locales.find((x) => x.isDefault) || locales[0];
|
|
1347
1347
|
const defaultMarket2 = markets.find((x) => x.isDefault) || markets[0];
|
|
1348
|
-
const defaultMarketLocale = defaultMarket2 && defaultMarket2.defaultLanguage ? defaultMarket2.defaultLanguage : defaultLocale2.id;
|
|
1348
|
+
const defaultMarketLocale = defaultMarket2 && defaultMarket2.defaultLanguage ? asEntityId(defaultMarket2.defaultLanguage) : defaultLocale2.id;
|
|
1349
1349
|
const title = localize(item.title, defaultMarketLocale);
|
|
1350
1350
|
const pickedProps = getPickedProps(item);
|
|
1351
1351
|
const route = {
|
|
@@ -1387,7 +1387,7 @@ function eachMarketLocale(markets, locales, callback) {
|
|
|
1387
1387
|
locales = locales.filter((x) => x.isActive !== false);
|
|
1388
1388
|
markets = markets.filter((x) => x.isActive !== false);
|
|
1389
1389
|
markets.forEach((market) => {
|
|
1390
|
-
const marketLocales = market.languages && market.languages.length > 0 ? market.languages.map((
|
|
1390
|
+
const marketLocales = market.languages && market.languages.length > 0 ? market.languages.map((idOrEntity) => locales.find((x) => x.id === asEntityId(idOrEntity))).filter((x) => x !== void 0) : locales;
|
|
1391
1391
|
marketLocales.forEach((locale) => {
|
|
1392
1392
|
callback(market, locale, markets, locales);
|
|
1393
1393
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1202,7 +1202,7 @@ function collectRoutes(store, categories, markets, locales) {
|
|
|
1202
1202
|
if (rootCategory && item.category === rootCategory.id) {
|
|
1203
1203
|
const defaultLocale2 = locales.find((x) => x.isDefault) || locales[0];
|
|
1204
1204
|
const defaultMarket2 = markets.find((x) => x.isDefault) || markets[0];
|
|
1205
|
-
const defaultMarketLocale = defaultMarket2 && defaultMarket2.defaultLanguage ? defaultMarket2.defaultLanguage : defaultLocale2.id;
|
|
1205
|
+
const defaultMarketLocale = defaultMarket2 && defaultMarket2.defaultLanguage ? asEntityId(defaultMarket2.defaultLanguage) : defaultLocale2.id;
|
|
1206
1206
|
const title = localize(item.title, defaultMarketLocale);
|
|
1207
1207
|
const pickedProps = getPickedProps(item);
|
|
1208
1208
|
const route = {
|
|
@@ -1244,7 +1244,7 @@ function eachMarketLocale(markets, locales, callback) {
|
|
|
1244
1244
|
locales = locales.filter((x) => x.isActive !== false);
|
|
1245
1245
|
markets = markets.filter((x) => x.isActive !== false);
|
|
1246
1246
|
markets.forEach((market) => {
|
|
1247
|
-
const marketLocales = market.languages && market.languages.length > 0 ? market.languages.map((
|
|
1247
|
+
const marketLocales = market.languages && market.languages.length > 0 ? market.languages.map((idOrEntity) => locales.find((x) => x.id === asEntityId(idOrEntity))).filter((x) => x !== void 0) : locales;
|
|
1248
1248
|
marketLocales.forEach((locale) => {
|
|
1249
1249
|
callback(market, locale, markets, locales);
|
|
1250
1250
|
});
|