@internetarchive/collection-browser 3.0.7-alpha-webdev7989.0 → 3.1.0

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.
@@ -1,64 +1,64 @@
1
- import type {
2
- CollectionExtraInfo,
3
- PageElementName,
4
- SearchServiceInterface,
5
- SearchType,
6
- SortDirection,
7
- SortParam,
8
- } from '@internetarchive/search-service';
9
- import type {
10
- FacetLoadStrategy,
11
- SelectedFacets,
12
- SortField,
13
- TvClipFilterType,
14
- } from '../models';
15
- import type { CollectionBrowserDataSourceInterface } from './collection-browser-data-source-interface';
16
-
17
- /**
18
- * Properties of collection browser that affect the overall search query
19
- */
20
- export interface CollectionBrowserQueryState {
21
- baseQuery?: string;
22
- withinCollection?: string;
23
- withinProfile?: string;
24
- profileElement?: PageElementName;
25
- searchType: SearchType;
26
- selectedFacets?: SelectedFacets;
27
- internalFilters?: SelectedFacets;
28
- minSelectedDate?: string;
29
- maxSelectedDate?: string;
30
- selectedTitleFilter: string | null;
31
- selectedCreatorFilter: string | null;
32
- tvClipFilter?: TvClipFilterType;
33
- selectedSort?: SortField;
34
- sortDirection: SortDirection | null;
35
- }
36
-
37
- /**
38
- * Interface representing search-related state and operations required by the
39
- * data source on its host component.
40
- */
41
- export interface CollectionBrowserSearchInterface
42
- extends CollectionBrowserQueryState {
43
- searchService?: SearchServiceInterface;
44
- isTVCollection: boolean;
45
- readonly sortParam: SortParam | null;
46
- readonly defaultSortField: SortField | null;
47
- readonly facetLoadStrategy: FacetLoadStrategy;
48
- readonly initialPageNumber: number;
49
- readonly maxPagesToManage: number;
50
- readonly currentVisiblePageNumbers: number[];
51
- readonly clearResultsOnEmptyQuery?: boolean;
52
- readonly dataSource?: CollectionBrowserDataSourceInterface;
53
-
54
- getSessionId(): Promise<string>;
55
- setSearchResultsLoading(loading: boolean): void;
56
- setFacetsLoading(loading: boolean): void;
57
- setTotalResultCount(count: number): void;
58
- setTileCount(count: number): void;
59
- applyDefaultCollectionSort(collectionInfo?: CollectionExtraInfo): void;
60
- emitEmptyResults(): void;
61
- emitSearchError(): void;
62
- emitQueryStateChanged(): void;
63
- refreshVisibleResults(): void;
64
- }
1
+ import type {
2
+ CollectionExtraInfo,
3
+ PageElementName,
4
+ SearchServiceInterface,
5
+ SearchType,
6
+ SortDirection,
7
+ SortParam,
8
+ } from '@internetarchive/search-service';
9
+ import type {
10
+ FacetLoadStrategy,
11
+ SelectedFacets,
12
+ SortField,
13
+ TvClipFilterType,
14
+ } from '../models';
15
+ import type { CollectionBrowserDataSourceInterface } from './collection-browser-data-source-interface';
16
+
17
+ /**
18
+ * Properties of collection browser that affect the overall search query
19
+ */
20
+ export interface CollectionBrowserQueryState {
21
+ baseQuery?: string;
22
+ withinCollection?: string;
23
+ withinProfile?: string;
24
+ profileElement?: PageElementName;
25
+ searchType: SearchType;
26
+ selectedFacets?: SelectedFacets;
27
+ internalFilters?: SelectedFacets;
28
+ minSelectedDate?: string;
29
+ maxSelectedDate?: string;
30
+ selectedTitleFilter: string | null;
31
+ selectedCreatorFilter: string | null;
32
+ tvClipFilter?: TvClipFilterType;
33
+ selectedSort?: SortField;
34
+ sortDirection: SortDirection | null;
35
+ }
36
+
37
+ /**
38
+ * Interface representing search-related state and operations required by the
39
+ * data source on its host component.
40
+ */
41
+ export interface CollectionBrowserSearchInterface
42
+ extends CollectionBrowserQueryState {
43
+ searchService?: SearchServiceInterface;
44
+ isTVCollection: boolean;
45
+ readonly sortParam: SortParam | null;
46
+ readonly defaultSortField: SortField | null;
47
+ readonly facetLoadStrategy: FacetLoadStrategy;
48
+ readonly initialPageNumber: number;
49
+ readonly maxPagesToManage: number;
50
+ readonly currentVisiblePageNumbers: number[];
51
+ readonly clearResultsOnEmptyQuery?: boolean;
52
+ readonly dataSource?: CollectionBrowserDataSourceInterface;
53
+
54
+ getSessionId(): Promise<string>;
55
+ setSearchResultsLoading(loading: boolean): void;
56
+ setFacetsLoading(loading: boolean): void;
57
+ setTotalResultCount(count: number): void;
58
+ setTileCount(count: number): void;
59
+ applyDefaultCollectionSort(collectionInfo?: CollectionExtraInfo): void;
60
+ emitEmptyResults(): void;
61
+ emitSearchError(): void;
62
+ emitQueryStateChanged(): void;
63
+ refreshVisibleResults(): void;
64
+ }