@sinequa/atomic-angular 1.6.3 → 1.6.5

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.
@@ -3443,6 +3443,7 @@ class AggregationsService {
3443
3443
  const authorizedFilters = agg
3444
3444
  .filter((f) => this.getFilterCriteria()(f)) // filter only the filters present
3445
3445
  .filter((f) => !homepageOnly || this.getHomepageFilterCriteria()(f)) // when requested, keep only filters flagged `homepage: true`
3446
+ .filter((f) => !this.getLeftOnlyFilterCriteria()(f)) // exclude left-only filters (rendered in the left drawer, not the bar)
3446
3447
  .filter((f) => !excludedFilters.includes(f.name))
3447
3448
  .filter((f) => !includedFilters.length || includedFilters.includes(f.name))
3448
3449
  .map((f) => ({ field: f.column, column: f.column, name: f.name })); // field is needed for filters constructions
@@ -3486,6 +3487,11 @@ class AggregationsService {
3486
3487
  // only consider filters explicitly flagged with `homepage: true` in the custom JSON
3487
3488
  return (agg) => this.appStore.filters().some((filter) => filter.homepage && this.matchesAggregation(filter, agg));
3488
3489
  };
3490
+ getLeftOnlyFilterCriteria = () => {
3491
+ // filters configured with `position: 'left'` live only in the left drawer and must not appear in the bar.
3492
+ // `position: 'both'` (and an undefined position) stay in the bar.
3493
+ return (agg) => this.appStore.filters().some((filter) => filter.position === "left" && this.matchesAggregation(filter, agg));
3494
+ };
3489
3495
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AggregationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3490
3496
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AggregationsService, providedIn: "root" });
3491
3497
  }
@@ -4261,6 +4267,7 @@ class PreviewService {
4261
4267
  currentPage = signal(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : []));
4262
4268
  events = signal("idle", ...(ngDevMode ? [{ debugName: "events" }] : []));
4263
4269
  DOMContentLoaded = signal(false, ...(ngDevMode ? [{ debugName: "DOMContentLoaded" }] : []));
4270
+ selectedHighlightId = signal(null, ...(ngDevMode ? [{ debugName: "selectedHighlightId" }] : []));
4264
4271
  // ! worker
4265
4272
  onMessage = new Subject();
4266
4273
  worker;
@@ -9579,6 +9586,7 @@ class ArticleExtracts {
9579
9586
  scrollTo(type, index, usePassageHighlighter = false) {
9580
9587
  // if previewData contains "matchingpassages" then we use the passage highlighter otherwise we use "extractslocations"
9581
9588
  const category = type || this.previewService.highlightCategory;
9589
+ this.previewService.selectedHighlightId.set(`${category}_${index}`);
9582
9590
  this.previewService.events.set("scrollTo");
9583
9591
  this.previewService.sendMessage({ action: "select", id: `${category}_${index}`, usePassageHighlighter });
9584
9592
  }
@@ -14526,7 +14534,8 @@ class AsideFiltersComponent {
14526
14534
  position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
14527
14535
  appStore = inject(AppStore);
14528
14536
  asideFilters = computed(() => {
14529
- const asideFilters = this.appStore.filters().filter((f) => f.position === "left");
14537
+ // `left` filters live only in the drawer, `both` filters live in the drawer and the bar
14538
+ const asideFilters = this.appStore.filters().filter((f) => f.position === "left" || f.position === "both");
14530
14539
  return this.appStore.getAuthorized(asideFilters);
14531
14540
  }, ...(ngDevMode ? [{ debugName: "asideFilters" }] : []));
14532
14541
  /**
@@ -14542,7 +14551,13 @@ class AsideFiltersComponent {
14542
14551
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AsideFiltersComponent, isStandalone: true, selector: "aside-filters, AsideFilters, asidefilters", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cn('flex flex-col gap-2 overflow-auto', class())" } }, ngImport: i0, template: `
14543
14552
  <div class="flex flex-col gap-2">
14544
14553
  @for (agg of asideFilters(); track agg.name) {
14545
- <Aggregation id="aside-filters" [name]="agg.name" [column]="agg.column" showFiltersCount />
14554
+ <Aggregation
14555
+ id="aside-filters"
14556
+ [name]="agg.name"
14557
+ [column]="agg.column"
14558
+ [collapsible]="true"
14559
+ [collapsed]="true"
14560
+ showFiltersCount />
14546
14561
  }
14547
14562
  </div>
14548
14563
  `, isInline: true, dependencies: [{ kind: "component", type: AggregationComponent, selector: "Aggregation, aggregation", inputs: ["class", "id", "name", "column", "showFiltersCount", "collapsible", "collapsed", "searchable", "expandedLevel"], outputs: ["onSelect", "onApply", "onClear"] }] });
@@ -14555,7 +14570,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
14555
14570
  template: `
14556
14571
  <div class="flex flex-col gap-2">
14557
14572
  @for (agg of asideFilters(); track agg.name) {
14558
- <Aggregation id="aside-filters" [name]="agg.name" [column]="agg.column" showFiltersCount />
14573
+ <Aggregation
14574
+ id="aside-filters"
14575
+ [name]="agg.name"
14576
+ [column]="agg.column"
14577
+ [collapsible]="true"
14578
+ [collapsed]="true"
14579
+ showFiltersCount />
14559
14580
  }
14560
14581
  </div>
14561
14582
  `,