@arsedizioni/ars-utils 18.2.187 → 18.2.188

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.
@@ -885,6 +885,7 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
885
885
  this.scrollerId = 'scroller_' + SystemUtils.generateUUID();
886
886
  this.restorableId = null;
887
887
  this.hasFacets = signal(false);
888
+ this.hasTags = signal(false);
888
889
  this.hasCalendar = signal(false);
889
890
  this.hasRegions = () => {
890
891
  return (this.filterParams.sectors?.filter(n => n.value === 'LR').length ?? 0) > 0;
@@ -1163,13 +1164,16 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
1163
1164
  }
1164
1165
  if (facets || months || month) {
1165
1166
  this.hasFacets.set(false);
1167
+ this.hasTags.set(false);
1166
1168
  this.hasCalendar.set(false);
1167
1169
  if (facets) {
1168
1170
  this.hasFacets.set(facets.total > 0);
1171
+ this.hasTags.set(facets.tags?.length > 0);
1169
1172
  this.facets?.update(facets.facets, facets.interval);
1170
1173
  if (this.snapshot) {
1171
1174
  this.snapshot.facets = this.facets.save();
1172
1175
  this.snapshot.facets.hasTooManyResults = this.snapshot.total >= 1000;
1176
+ this.snapshot.tags = facets.tags;
1173
1177
  }
1174
1178
  }
1175
1179
  else if (months || month) {
@@ -1340,8 +1344,9 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
1340
1344
  this.sortOptions = data.sort.options;
1341
1345
  if (this.facets && data.facets) {
1342
1346
  this.facets.restore(data.facets);
1343
- this.hasFacets.set(data.facets.hasFacets);
1344
1347
  }
1348
+ this.hasFacets.set(this.snapshot.facets?.hasFacets);
1349
+ this.hasTags.set(this.snapshot.tags?.length > 0);
1345
1350
  if (this.paginator && data.paginator) {
1346
1351
  this.paginator.pageIndex = data.paginator.page;
1347
1352
  this.paginator.pageSize = data.paginator.size;