-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/parallelize-ngrams
- Loading branch information
Showing
41 changed files
with
366 additions
and
260 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
frontend/src/app/filter/ad-hoc-filter/ad-hoc-filter.component.spec.ts
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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { commonTestBed } from '../../common-test-bed'; | ||
|
||
import { AdHocFilterComponent } from './ad-hoc-filter.component'; | ||
|
||
describe('AdHocFilterComponent', () => { | ||
let component: AdHocFilterComponent; | ||
let fixture: ComponentFixture<AdHocFilterComponent>; | ||
|
||
beforeEach(async () => { | ||
commonTestBed().testingModule.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AdHocFilterComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
11 changes: 11 additions & 0 deletions
11
frontend/src/app/filter/ad-hoc-filter/ad-hoc-filter.component.ts
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,11 @@ | ||
import { Component } from '@angular/core'; | ||
import { AdHocFilter, } from '../../models'; | ||
import { BaseFilterComponent } from './../base-filter.component'; | ||
|
||
@Component({ | ||
selector: 'ia-ad-hoc-filter', | ||
templateUrl: './ad-hoc-filter.component.html', | ||
styleUrls: ['./ad-hoc-filter.component.scss'] | ||
}) | ||
export class AdHocFilterComponent extends BaseFilterComponent<AdHocFilter> { | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...p/filter/boolean-filter.component.spec.ts → ...n-filter/boolean-filter.component.spec.ts
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
12 changes: 12 additions & 0 deletions
12
frontend/src/app/filter/boolean-filter/boolean-filter.component.ts
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,12 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { BaseFilterComponent } from '../base-filter.component'; | ||
import { BooleanFilter } from '../../models'; | ||
|
||
@Component({ | ||
selector: 'ia-boolean-filter', | ||
templateUrl: './boolean-filter.component.html', | ||
styleUrls: ['./boolean-filter.component.scss'] | ||
}) | ||
export class BooleanFilterComponent extends BaseFilterComponent<BooleanFilter> { | ||
} |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...src/app/filter/date-filter.component.scss → ...er/date-filter/date-filter.component.scss
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
@import "../../_utilities"; | ||
@import "../../../_utilities"; | ||
|
||
::ng-deep .p-datepicker { | ||
margin: 1px 0; | ||
.p-highlight { | ||
background-color: $primary !important; | ||
}; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
.../app/filter/date-filter.component.spec.ts → ...date-filter/date-filter.component.spec.ts
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
32 changes: 32 additions & 0 deletions
32
frontend/src/app/filter/filter-box/filter-box.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,32 @@ | ||
<div class="box filter-container" *ngIf="filter" [ngClass]="{'on': filter.active.value}"> | ||
<div class="field has-addons"> | ||
<div class="control is-expanded" iaBalloon="{{ filter.description }}" | ||
iaBalloonPosition="up-left" iaBalloonLength="fit"> | ||
<label class="label" [for]="'filter' + filter.corpusField.name">{{ filter.corpusField.displayName | ||
}}</label> | ||
</div> | ||
<p class="control"> | ||
<button *ngIf="(filter.isDefault$ | async) === false" class="button icon filter-icon is-primary is-inverted is-round" | ||
(click)="filter.reset()" iaBalloon="Reset this filter to its default values" | ||
iaBalloonPosition="down-left"> | ||
<i class="fa fa-trash"></i> | ||
</button> | ||
<button *ngIf="(filter.isDefault$ | async) === false" | ||
class="button icon filter-icon is-primary is-inverted is-round" | ||
[ngClass]="{'is-primary': filter.active.value}" | ||
(click)="filter.toggle()" iaBalloon="{{filter.active.value ? 'Disable this filter' : 'Enable this filter'}}" | ||
iaBalloonPosition="down-left"> | ||
<i class="fa fa-filter"></i> | ||
</button> | ||
</p> | ||
</div> | ||
<ng-container *ngIf="filter.adHoc"> | ||
<ia-ad-hoc-filter [filter]="filter" [queryModel]="queryModel"></ia-ad-hoc-filter> | ||
</ng-container> | ||
<ng-container *ngIf="!filter.adHoc" [ngSwitch]="filter.filterType"> | ||
<ia-boolean-filter *ngSwitchCase="'BooleanFilter'" [filter]="filter" [queryModel]="queryModel"></ia-boolean-filter> | ||
<ia-date-filter *ngSwitchCase="'DateFilter'" [filter]="filter" [queryModel]="queryModel"></ia-date-filter> | ||
<ia-multiple-choice-filter *ngSwitchCase="'MultipleChoiceFilter'" [filter]="filter" [queryModel]="queryModel"></ia-multiple-choice-filter> | ||
<ia-range-filter *ngSwitchCase="'RangeFilter'" [filter]="filter" [queryModel]="queryModel"></ia-range-filter> | ||
</ng-container> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
frontend/src/app/filter/filter-box/filter-box.component.scss
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,16 @@ | ||
@import "../../../_utilities"; | ||
|
||
.filter-container{ | ||
&:hover{ | ||
box-shadow: 0 0 0 1px $primary; | ||
} | ||
margin-bottom: 5px; | ||
} | ||
|
||
.filter-container.on{ | ||
box-shadow: 0 0 0 2px $primary; | ||
} | ||
|
||
.control { | ||
z-index: 20; | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/src/app/filter/filter-box/filter-box.component.spec.ts
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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FilterBoxComponent } from './filter-box.component'; | ||
import { commonTestBed } from '../../common-test-bed'; | ||
|
||
describe('FilterBoxComponent', () => { | ||
let component: FilterBoxComponent; | ||
let fixture: ComponentFixture<FilterBoxComponent>; | ||
|
||
beforeEach(async () => { | ||
commonTestBed().testingModule.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(FilterBoxComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
frontend/src/app/filter/filter-box/filter-box.component.ts
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,13 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { QueryModel, SearchFilter } from '../../models'; | ||
|
||
@Component({ | ||
selector: 'ia-filter-box', | ||
templateUrl: './filter-box.component.html', | ||
styleUrls: ['./filter-box.component.scss'] | ||
}) | ||
export class FilterBoxComponent { | ||
@Input() filter: SearchFilter; | ||
@Input() queryModel: QueryModel; | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +0,0 @@ | ||
@import "../../_utilities"; | ||
|
||
.filter-container{ | ||
&:hover{ | ||
box-shadow: 0 0 0 1px $primary; | ||
} | ||
margin-bottom: 5px; | ||
} | ||
|
||
.filter-container.on{ | ||
box-shadow: 0 0 0 2px $primary; | ||
} | ||
|
||
.filter-icon { | ||
border: none; | ||
} | ||
|
||
.control { | ||
z-index: 20; | ||
} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from './base-filter.component'; | ||
export * from './boolean-filter.component'; | ||
export * from './date-filter.component'; | ||
export * from './boolean-filter/boolean-filter.component'; | ||
export * from './date-filter/date-filter.component'; | ||
export * from './filter-manager.component'; | ||
export * from './multiple-choice-filter.component'; | ||
export * from './range-filter.component'; | ||
export * from './multiple-choice-filter/multiple-choice-filter.component'; | ||
export * from './range-filter/range-filter.component'; |
31 changes: 0 additions & 31 deletions
31
frontend/src/app/filter/multiple-choice-filter.component.spec.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
Oops, something went wrong.