wt-front-shared 19.0.23 → 19.0.25
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.
|
@@ -7018,8 +7018,11 @@ const getStaticDataForListContentTypes = (contentTypes) => createSelector(getSta
|
|
|
7018
7018
|
});
|
|
7019
7019
|
return result;
|
|
7020
7020
|
});
|
|
7021
|
-
const getStaticDataItem = (contentType, subSection, itemIdOrSlug) => createSelector(getStaticDataState, (state) => {
|
|
7021
|
+
const getStaticDataItem = (contentType, subSection, itemIdOrSlug, langId) => createSelector(getStaticDataState, (state) => {
|
|
7022
7022
|
const foundItem = state.list[contentType]?.[subSection]?.find(item => {
|
|
7023
|
+
if (langId) {
|
|
7024
|
+
return Number(item.id) === Number(itemIdOrSlug) || (item._langId === langId && (item?.slug === itemIdOrSlug || item?.slug + '.html' === itemIdOrSlug));
|
|
7025
|
+
}
|
|
7023
7026
|
return Number(item.id) === Number(itemIdOrSlug) || item?.slug === itemIdOrSlug || item?.slug + '.html' === itemIdOrSlug;
|
|
7024
7027
|
}); //
|
|
7025
7028
|
return foundItem || {};
|
|
@@ -7066,8 +7069,8 @@ class StaticDataFacade {
|
|
|
7066
7069
|
getStaticDataForListContentTypes$(contentTypes) {
|
|
7067
7070
|
return this.store.pipe(select(staticDataQuery.getStaticDataForListContentTypes(contentTypes)));
|
|
7068
7071
|
}
|
|
7069
|
-
getStaticDataItem$(contentType, subSection = 'list', itemIdOrSlug) {
|
|
7070
|
-
return this.store.pipe(select(staticDataQuery.getStaticDataItem(contentType, subSection, itemIdOrSlug)));
|
|
7072
|
+
getStaticDataItem$(contentType, subSection = 'list', itemIdOrSlug, langId) {
|
|
7073
|
+
return this.store.pipe(select(staticDataQuery.getStaticDataItem(contentType, subSection, itemIdOrSlug, langId)));
|
|
7071
7074
|
}
|
|
7072
7075
|
getStaticDataRevision(contentType) {
|
|
7073
7076
|
return new Promise((resolve, reject) => {
|