Skip to content

Commit 314c82e

Browse files
committed
Fixes for build --prod complaints
1 parent f7091e4 commit 314c82e

File tree

10 files changed

+44
-43
lines changed

10 files changed

+44
-43
lines changed

src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import { OPENDOCUMENT, CLOSEDOCUMENT, CHANGELANG, INITIATE, AppState, SearchRedu
1717
export class AppComponent {
1818

1919
private searchRedux: Observable<SearchRedux>;
20-
private openDocument = false;
21-
private loggedIn = false;
20+
public openDocument = false;
21+
public loggedIn = false;
2222

2323
public languages: string[];
2424
public selectedLanguage: string;

src/app/docselection/docselection.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class DocselectionComponent implements OnInit {
2323

2424
private hasSearched = false;
2525
private disablePaginatorEvent = false;
26-
26+
2727
private currentPaginatorPage: number = 1; // Needs to be 1-based because of the paginator widget
2828

2929
private documentsWithHits: StrixDocument[] = [];//StrixDocHit[] = [];
@@ -34,7 +34,7 @@ export class DocselectionComponent implements OnInit {
3434
private availableCorpora: { [key: string] : StrixCorpusConfig} = {};
3535
private checkedCorpora: any = {};
3636

37-
private show = true;
37+
public show = true;
3838

3939
private searchResultSubscription: Subscription;
4040
private metadataSubscription: Subscription;
@@ -75,7 +75,7 @@ export class DocselectionComponent implements OnInit {
7575
this.totalNumberOfDocuments = answer.count;
7676
this.hasSearched = true;
7777

78-
78+
7979
},
8080
error => null//this.errorMessage = <any>error
8181
);

src/app/indocsearch/indocsearch.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import { AppState, SEARCHINDOCUMENT } from '../searchreducer';
99
styleUrls: ['./indocsearch.component.css']
1010
})
1111
export class IndocsearchComponent implements OnInit {
12-
private asyncSelected: string = "";
12+
public asyncSelected: string = "";
1313

1414
constructor(private store: Store<AppState>) { }
1515

1616
ngOnInit() {
1717
}
1818

19-
private simpleSearch() {
19+
public simpleSearch() {
2020
this.store.dispatch({ type: SEARCHINDOCUMENT, payload : this.asyncSelected});
2121
}
2222

src/app/leftcolumn/leftcolumn.component.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { Bucket, Aggregations, Agg, AggregationsResult } from "../strixresult.mo
2323
styleUrls: ['./leftcolumn.component.css']
2424
})
2525
export class LeftcolumnComponent implements OnInit {
26-
27-
private gotMetadata = false;
26+
27+
public gotMetadata = false;
2828

2929
private metadataSubscription: Subscription;
3030
private aggregatedResultSubscription: Subscription;
@@ -34,13 +34,13 @@ export class LeftcolumnComponent implements OnInit {
3434
//private currentFilters: any[] = []; // TODO: Make some interface
3535
private unusedFacets : string[] = [];
3636

37-
private openDocument = false;
37+
public openDocument = false;
3838

3939
private searchRedux: Observable<any>;
4040
private include_facets : string[] = []
4141
private availableCorpora : { [key: string] : StrixCorpusConfig};
4242
private mem_guessConfFromAttributeName : Function;
43-
43+
4444

4545
constructor(private metadataService: MetadataService,
4646
private queryService: QueryService,
@@ -69,7 +69,7 @@ export class LeftcolumnComponent implements OnInit {
6969

7070
this.aggregatedResultSubscription = queryService.aggregationResult$.pipe(skip(1)).subscribe(
7171
(result : AggregationsResult) => {
72-
this.parseAggResults(result)
72+
this.parseAggResults(result)
7373
},
7474
error => null//this.errorMessage = <any>error
7575
);
@@ -92,7 +92,7 @@ export class LeftcolumnComponent implements OnInit {
9292
} else {
9393
return "list"
9494
}
95-
95+
9696
} else {
9797
return ret
9898
}
@@ -130,7 +130,7 @@ export class LeftcolumnComponent implements OnInit {
130130
}
131131
return item.to
132132
}).to
133-
133+
134134
agg.min = _.minBy(agg.buckets, "from").from
135135
agg.max = max
136136
agg.value = {range: {lte: agg.max, gte: agg.min}}
@@ -176,7 +176,7 @@ export class LeftcolumnComponent implements OnInit {
176176
if(target && target.length) {
177177
target[0].selected = true
178178
} else {
179-
// make sure selected filters don't disappear by adding them
179+
// make sure selected filters don't disappear by adding them
180180
// to incoming aggs array
181181
newValue.push(target)
182182
}
@@ -194,7 +194,7 @@ export class LeftcolumnComponent implements OnInit {
194194
.value()
195195
this.unusedFacets = _.difference(result.unused_facets, ["datefrom", "dateto"]);
196196
}
197-
197+
198198
private chooseBucket(aggregationKey: string, bucket: Bucket) {
199199
bucket.selected = true
200200

@@ -246,7 +246,7 @@ export class LeftcolumnComponent implements OnInit {
246246
this.store.dispatch({ type: SEARCH, payload : null});
247247
}
248248

249-
private reloadStrix() {
249+
public reloadStrix() {
250250
window.location.href = window.location.pathname;
251251
}
252252

@@ -267,10 +267,10 @@ export class LeftcolumnComponent implements OnInit {
267267
this.metadataService.loadedMetadata$
268268

269269
).subscribe(([result, {filters}, info] : [AggregationsResult, any, any]) => {
270-
//this.zone.run(() => {
270+
//this.zone.run(() => {
271271
console.log("Leftcolumn init", result, filters)
272272
this.parseAggResults(result)
273-
273+
274274
let filterData = filters || [];
275275
// Clear all filters first (could probably be optimized)
276276
for (let agg in this.aggregations) {

src/app/leftcolumn/multicomplete/multicomplete.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ export class MultiCompleteComponent implements OnInit, OnChanges {
2121
@Output() onSelect = new EventEmitter<Bucket>();
2222
@Output() onRemove = new EventEmitter<Bucket>();
2323

24-
private typeaheadSelected : string = "";
24+
public typeaheadSelected : string = "";
2525

26-
private selected : Bucket[] = [];
27-
private remaining : Bucket[] = [];
28-
private head : Bucket[] = [];
26+
public selected : Bucket[] = [];
27+
public remaining : Bucket[] = [];
28+
public head : Bucket[] = [];
2929

3030
constructor() {
3131

@@ -56,17 +56,17 @@ export class MultiCompleteComponent implements OnInit, OnChanges {
5656
return key
5757
}
5858
}
59-
private getRemaining() {
59+
public getRemaining() {
6060
return this.remaining;
6161
}
6262

63-
private onInputClick(event) {
63+
public onInputClick(event) {
6464
if(window.outerHeight - event.target.getBoundingClientRect().bottom < 300) {
6565
event.target.scrollIntoView()
6666
}
6767
}
6868
private onDeselect(bucket : Bucket) {
69-
this.remaining.push(bucket)
69+
this.remaining.push(bucket)
7070
this.remaining = _.orderBy(this.remaining, "doc_count", "desc")
7171
this.selected.splice(this.selected.indexOf(bucket), 1)
7272
this.onRemove.emit(bucket)
@@ -75,7 +75,7 @@ export class MultiCompleteComponent implements OnInit, OnChanges {
7575
bucket.selected = true
7676
this.onSelect.emit(bucket)
7777
}
78-
private dropdownSelected(match) {
78+
public dropdownSelected(match) {
7979
let selectedItem : Bucket = match.item;
8080
console.log("dropdownSelected", selectedItem)
8181
// let bucket : Bucket = _.find(this.aggregations[aggKey].buckets, (item) => item.key == selectedItem.item.key)
@@ -86,4 +86,4 @@ export class MultiCompleteComponent implements OnInit, OnChanges {
8686
this.typeaheadSelected = "";
8787
}
8888

89-
}
89+
}

src/app/reader/reader.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ export class ReaderComponent implements AfterViewInit, OnDestroy {
2626
subscription : Subscription;
2727

2828
private docLoadStatusSubscription: Subscription;
29-
private isLoading = false;
29+
public isLoading = false;
3030
private openness = {'HITS' : false, 'TEXTATTRIBUTES' : true, 'STRUCTURALATTRIBUTES' : false, 'TOKENATTRIBUTES' : false};
3131

3232
private mainDocument: StrixDocument;
3333

3434
/* Metadata */
35-
private gotMetadata = false;
35+
public gotMetadata = false;
3636
private metadataSubscription: Subscription;
3737
private availableCorpora{ [key: string] : StrixCorpusConfig} = {};
3838
//private availableCorporaKeys: string[] = [];
3939

4040
// Each item in cmViews is an index number of the DocumentsService documents.
4141
// They need not be in order!!
42-
private cmViews = [];
42+
public cmViews = [];
4343

4444
private titles = [""];
4545
private selectedMirrorIndex = 0;

src/app/search/search.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(keydown.Enter)="simpleSearch()"/>
2323

2424
<label for="keyword_search">{{'keyword_search' | loc}}</label>
25-
<input type="checkbox" class="" id="keyword_search"
25+
<input type="checkbox" class="" id="keyword_search"
2626
[(ngModel)]="isPhraseSearch"
2727
(change)="searchTypeChange(isPhraseSearch)"
2828
>
@@ -40,7 +40,7 @@
4040
[typeaheadItemTemplate]="lemgramItemTemplate"
4141
(typeaheadOnSelect)="typeaheadOnSelect($event)"/>
4242
</div>
43-
<button (click)="simpleSearch(false)" class="btn btn-sm btn-primary"><i class="fa fa-search"></i>&nbsp;{{'search' | loc}}</button>
43+
<button (click)="simpleSearch()" class="btn btn-sm btn-primary"><i class="fa fa-search"></i>&nbsp;{{'search' | loc}}</button>
4444
</div>
4545
<div class="clear"></div>
4646
<!--<div class="histogram_box">

src/app/search/search.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ import { Filter, QueryType } from '../strixquery.model';
1919
export class SearchComponent implements OnInit {
2020

2121
private searchRedux: Observable<SearchRedux>;
22-
22+
2323
private searchableAnnotations: string[] = ["lemgram", "betydelse"];
24-
private searchType = QueryType.Normal;
24+
public searchType = QueryType.Normal;
2525

2626
private asyncSelected: string = "";
2727
private dataSource: Observable<any>;
2828
private errorMessage: string;
2929

30-
private currentFilters: Filter[] = [];
30+
public currentFilters: Filter[] = [];
3131

3232
private histogramData: any;
3333
private histogramSelection: any;
@@ -65,7 +65,7 @@ export class SearchComponent implements OnInit {
6565
*/
6666

6767
private searchStatusSubscription: Subscription;
68-
private isSearching = false;
68+
public isSearching = false;
6969
private isPhraseSearch : boolean = true;
7070

7171
constructor(private callsService: CallsService,
@@ -97,7 +97,7 @@ export class SearchComponent implements OnInit {
9797

9898
// this.searchRedux.filter((d) => d.latestAction === CHANGEFILTERS).subscribe(({ filters }) => {
9999
// console.log("picked up filters change", filters);
100-
100+
101101
// this.currentFilters = filters; // Not sure we really should overwrite the whole tree.
102102
// let didFilter = false;
103103
// for (let filter of this.currentFilters) {
@@ -126,7 +126,7 @@ export class SearchComponent implements OnInit {
126126
if(data.query) {
127127
this.asyncSelected = data.query
128128
}
129-
});
129+
});
130130

131131
/* this.searchRedux.filter((d) => d.latestAction === CHANGECORPORA).subscribe((data) => {
132132
console.log("acting upon", data.latestAction);
@@ -147,7 +147,7 @@ export class SearchComponent implements OnInit {
147147
});
148148
}
149149

150-
private simpleSearch() {
150+
public simpleSearch() {
151151
this.store.dispatch({ type: CHANGEQUERY, payload : this.asyncSelected});
152152
this.store.dispatch({ type: SEARCH, payload : null});
153153
}

src/app/start-panel/start-panel.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { SEARCH, OPENDOCUMENT, AppState } from '../searchreducer';
1111
})
1212
export class StartPanelComponent implements OnInit {
1313

14-
private show = true;
14+
public show = true;
1515

1616
private searchRedux: Observable<any>;
1717

src/app/strixquery.model.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export class Filter {
1616
}
1717

1818
export enum QueryType {
19-
Normal = 'normal'
20-
}
19+
Normal = 'normal',
20+
Lemgram = 'lemgram',
21+
}

0 commit comments

Comments
 (0)