@snabcentr/client-core 4.11.0 → 4.12.0
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.
|
@@ -7382,6 +7382,9 @@ class ScPaginationService {
|
|
|
7382
7382
|
* Список сохраняется при переходе по страницам, до тех пор пока не будет получен сигнал `others$`.
|
|
7383
7383
|
*/
|
|
7384
7384
|
this.dataAccumulated$ = this.others$.pipe(filter(tuiIsPresent), switchMap((params) => this.authStatus$.pipe(map$1(() => params))), switchMap((params) => this.page$.pipe(
|
|
7385
|
+
// Избегаем лишнего запроса со старыми параметрами: сброс страницы (patchPage) при смене others$ синхронно
|
|
7386
|
+
// «пинает» ещё живую предыдущую подписку — debounceTime(0) схлопывает такой всплеск до одной эмиссии.
|
|
7387
|
+
debounceTime(0),
|
|
7385
7388
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
|
|
7386
7389
|
map$1((page) => ({ ...params, ...page })),
|
|
7387
7390
|
// TODO: Заменить this.catalogService.getProducts$ на абстрактный метод сервиса по примеру `TuiTreeLoader`.
|
|
@@ -7717,7 +7720,7 @@ class SchemaOrgFactory {
|
|
|
7717
7720
|
...(id && { '@id': id }),
|
|
7718
7721
|
name: product.name,
|
|
7719
7722
|
...(image && { image }),
|
|
7720
|
-
...(description && { description }),
|
|
7723
|
+
...(description && { description: this.stripHtml(description) }),
|
|
7721
7724
|
mpn: product.code,
|
|
7722
7725
|
url: productUrl,
|
|
7723
7726
|
offers: {
|
|
@@ -7746,7 +7749,8 @@ class SchemaOrgFactory {
|
|
|
7746
7749
|
* @param id Необязательный идентификатор сущности для поля `@id` в JSON-LD.
|
|
7747
7750
|
*/
|
|
7748
7751
|
generateForCategoryItem(category, products, categoryPath, productPath, breadcrumbs, id) {
|
|
7749
|
-
const
|
|
7752
|
+
const descriptionRaw = category.seo?.description ?? category.properties?.description;
|
|
7753
|
+
const description = descriptionRaw ? this.stripHtml(descriptionRaw) : undefined;
|
|
7750
7754
|
const image = this.mediaImageTransformerPipe.transform(category.image, true);
|
|
7751
7755
|
return {
|
|
7752
7756
|
'@context': 'https://schema.org',
|
|
@@ -7865,7 +7869,7 @@ class SchemaOrgFactory {
|
|
|
7865
7869
|
'@type': 'NewsArticle',
|
|
7866
7870
|
...(id && { '@id': id }),
|
|
7867
7871
|
headline,
|
|
7868
|
-
...(description && { description }),
|
|
7872
|
+
...(description && { description: this.stripHtml(description) }),
|
|
7869
7873
|
...(image && { image }),
|
|
7870
7874
|
...(datePublished && { datePublished }),
|
|
7871
7875
|
...(articleBody && { articleBody }),
|
|
@@ -7997,6 +8001,7 @@ class SchemaOrgFactory {
|
|
|
7997
8001
|
})
|
|
7998
8002
|
.join('');
|
|
7999
8003
|
return withoutTags
|
|
8004
|
+
.replaceAll(/ /gi, ' ')
|
|
8000
8005
|
.replaceAll(/\s+/g, ' ')
|
|
8001
8006
|
.replaceAll(/ ([.,!?;:])/g, '$1')
|
|
8002
8007
|
.trim();
|
|
@@ -8092,7 +8097,7 @@ class SchemaOrgFactory {
|
|
|
8092
8097
|
name: product.name,
|
|
8093
8098
|
url: productUrl,
|
|
8094
8099
|
...(image && { image }),
|
|
8095
|
-
...(description && { description }),
|
|
8100
|
+
...(description && { description: this.stripHtml(description) }),
|
|
8096
8101
|
offers: {
|
|
8097
8102
|
'@type': 'Offer',
|
|
8098
8103
|
priceCurrency: 'RUB',
|
|
@@ -8138,7 +8143,7 @@ class SchemaOrgFactory {
|
|
|
8138
8143
|
name: subCategory.name,
|
|
8139
8144
|
url: this.getCategoryCanonicalUrl(subCategory, categoryPath),
|
|
8140
8145
|
...(image && { image }),
|
|
8141
|
-
...(description && { description }),
|
|
8146
|
+
...(description && { description: this.stripHtml(description) }),
|
|
8142
8147
|
},
|
|
8143
8148
|
};
|
|
8144
8149
|
}),
|