import {OrgService} from '@eg/core/org.service';
import {CatalogSearchContext, CatalogBrowseContext, CatalogMarcContext,
CatalogTermContext, FacetFilter} from './search-context';
-import {CATALOG_CCVM_FILTERS} from './catalog.service';
+import {CATALOG_CCVM_FILTERS} from './search-context';
@Injectable()
export class CatalogUrlService {
import {CatalogSearchContext, CatalogSearchState} from './search-context';
import {BibRecordService, BibRecordSummary} from './bib-record.service';
import {BasketService} from './basket.service';
-
-// CCVM's we care about in a catalog context
-// Don't fetch them all because there are a lot.
-export const CATALOG_CCVM_FILTERS = [
- 'item_type',
- 'item_form',
- 'item_lang',
- 'audience',
- 'audience_group',
- 'vr_format',
- 'bib_level',
- 'lit_form',
- 'search_format',
- 'icon_format'
-];
+import {CATALOG_CCVM_FILTERS} from './search-context';
@Injectable()
export class CatalogService {
import {Pager} from '@eg/share/util/pager';
import {Params} from '@angular/router';
+// CCVM's we care about in a catalog context
+// Don't fetch them all because there are a lot.
+export const CATALOG_CCVM_FILTERS = [
+ 'item_type',
+ 'item_form',
+ 'item_lang',
+ 'audience',
+ 'audience_group',
+ 'vr_format',
+ 'bib_level',
+ 'lit_form',
+ 'search_format',
+ 'icon_format'
+];
+
export enum CatalogSearchState {
PENDING,
SEARCHING,
this.fieldClass = ['keyword'];
this.matchOp = ['contains'];
this.joinOp = [''];
- this.ccvmFilters = {};
this.facetFilters = [];
this.copyLocations = [''];
this.format = '';
this.date1 = null;
this.date2 = null;
this.dateOp = 'is';
+
+ // Apply empty string values for each ccvm filter
+ this.ccvmFilters = {};
+ CATALOG_CCVM_FILTERS.forEach(code => this.ccvmFilters[code] = ['']);
}
isSearchable(): boolean {