@sinequa/atomic-angular 1.6.3 → 1.6.4

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
  }
@@ -14526,7 +14532,8 @@ class AsideFiltersComponent {
14526
14532
  position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
14527
14533
  appStore = inject(AppStore);
14528
14534
  asideFilters = computed(() => {
14529
- const asideFilters = this.appStore.filters().filter((f) => f.position === "left");
14535
+ // `left` filters live only in the drawer, `both` filters live in the drawer and the bar
14536
+ const asideFilters = this.appStore.filters().filter((f) => f.position === "left" || f.position === "both");
14530
14537
  return this.appStore.getAuthorized(asideFilters);
14531
14538
  }, ...(ngDevMode ? [{ debugName: "asideFilters" }] : []));
14532
14539
  /**
@@ -14542,7 +14549,13 @@ class AsideFiltersComponent {
14542
14549
  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
14550
  <div class="flex flex-col gap-2">
14544
14551
  @for (agg of asideFilters(); track agg.name) {
14545
- <Aggregation id="aside-filters" [name]="agg.name" [column]="agg.column" showFiltersCount />
14552
+ <Aggregation
14553
+ id="aside-filters"
14554
+ [name]="agg.name"
14555
+ [column]="agg.column"
14556
+ [collapsible]="true"
14557
+ [collapsed]="true"
14558
+ showFiltersCount />
14546
14559
  }
14547
14560
  </div>
14548
14561
  `, 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 +14568,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
14555
14568
  template: `
14556
14569
  <div class="flex flex-col gap-2">
14557
14570
  @for (agg of asideFilters(); track agg.name) {
14558
- <Aggregation id="aside-filters" [name]="agg.name" [column]="agg.column" showFiltersCount />
14571
+ <Aggregation
14572
+ id="aside-filters"
14573
+ [name]="agg.name"
14574
+ [column]="agg.column"
14575
+ [collapsible]="true"
14576
+ [collapsed]="true"
14577
+ showFiltersCount />
14559
14578
  }
14560
14579
  </div>
14561
14580
  `,