-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search: add nested aggregations support
* Adds nested aggregations support. * Refactors RecordSearchComponent. * Unsubscribes from observables when components are destroyed. * Creates a RecordSearchService for handling aggregations filters. * Adapts menu component in order to include query parameters. * Sets aggregations buckets size to 8 in tester application. * Fixes "combineLatest" RxJS function deprecation warnings. * Exports RecordSearchService in public-api to use it outside ng-core. * Initializes filters to launch first search on homepage. Co-Authored-by: Alicia Zangger alicia.zangger@rero.ch Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch Co-Authored-by: Sébastien Délèze sebastien.deleze@rero.ch
- Loading branch information
Sébastien Délèze
committed
Apr 7, 2020
1 parent
43e4bcc
commit fd0fd70
Showing
22 changed files
with
926 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
projects/rero/ng-core/src/lib/record/search/aggregation/buckets/buckets.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
Invenio angular core | ||
Copyright (C) 2019 RERO | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<ul *ngIf="buckets" class="list-unstyled m-0"> | ||
<li class="form-check" *ngFor="let bucket of buckets|slice:0:bucketSize"> | ||
<input class="form-check-input" type="checkbox" [checked]="isSelected(bucket.key)" | ||
(click)="updateFilter(bucket)"> | ||
<label class="form-check-label"> | ||
{{ getBucketName(bucket) }} ({{ bucket.doc_count }}) | ||
</label> | ||
<ng-container *ngIf="isSelected(bucket.key)"> | ||
<ng-core-record-search-aggregation-buckets | ||
*ngFor="let aggregation of bucketChildren(bucket)" | ||
[buckets]="aggregation.buckets" | ||
[aggregationKey]="aggregation.key" | ||
></ng-core-record-search-aggregation-buckets> | ||
</ng-container> | ||
</li> | ||
</ul> | ||
<div *ngIf="displayMoreAndLessLink()"> | ||
<button class="btn btn-link ml-2" | ||
(click)="moreMode = !moreMode">{{ (moreMode ? 'more…' : 'less…') | translate }}</button> | ||
</div> |
Oops, something went wrong.