@internetarchive/collection-browser 0.3.1-alpha.3 → 0.3.2-alpha.1
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.
- package/dist/src/collection-browser.d.ts +6 -0
- package/dist/src/collection-browser.js +346 -341
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +150 -150
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.js +134 -134
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets.d.ts +2 -0
- package/dist/src/collection-facets.js +158 -147
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +204 -204
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/utils/format-count.js.map +1 -1
- package/dist/test/collection-browser.test.js +26 -26
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets.test.js +2 -2
- package/dist/test/collection-facets.test.js.map +1 -1
- package/package.json +1 -1
- package/src/collection-browser.ts +1539 -1530
- package/src/collection-facets/facets-template.ts +294 -294
- package/src/collection-facets/more-facets-content.ts +518 -518
- package/src/collection-facets.ts +582 -569
- package/src/models.ts +216 -216
- package/src/restoration-state-handler.ts +302 -302
- package/src/tiles/list/tile-list.ts +509 -509
- package/src/utils/format-count.ts +96 -96
- package/test/collection-browser.test.ts +490 -490
- package/test/collection-facets.test.ts +510 -510
|
@@ -147,15 +147,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
149
|
this.setPlaceholderType();
|
|
150
|
-
return html `
|
|
151
|
-
<div
|
|
152
|
-
id="content-container"
|
|
153
|
-
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
154
|
-
>
|
|
150
|
+
return html `
|
|
151
|
+
<div
|
|
152
|
+
id="content-container"
|
|
153
|
+
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
154
|
+
>
|
|
155
155
|
${this.placeholderType
|
|
156
156
|
? this.emptyPlaceholderTemplate
|
|
157
|
-
: this.collectionBrowserTemplate}
|
|
158
|
-
</div>
|
|
157
|
+
: this.collectionBrowserTemplate}
|
|
158
|
+
</div>
|
|
159
159
|
`;
|
|
160
160
|
}
|
|
161
161
|
setPlaceholderType() {
|
|
@@ -168,73 +168,73 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
get emptyPlaceholderTemplate() {
|
|
171
|
-
return html `
|
|
172
|
-
<empty-placeholder
|
|
173
|
-
.placeholderType=${this.placeholderType}
|
|
174
|
-
?isMobileView=${this.mobileView}
|
|
175
|
-
></empty-placeholder>
|
|
171
|
+
return html `
|
|
172
|
+
<empty-placeholder
|
|
173
|
+
.placeholderType=${this.placeholderType}
|
|
174
|
+
?isMobileView=${this.mobileView}
|
|
175
|
+
></empty-placeholder>
|
|
176
176
|
`;
|
|
177
177
|
}
|
|
178
178
|
get collectionBrowserTemplate() {
|
|
179
|
-
return html `<div
|
|
180
|
-
id="left-column"
|
|
181
|
-
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
182
|
-
>
|
|
183
|
-
<div id="mobile-header-container">
|
|
184
|
-
${this.mobileView ? this.mobileFacetsTemplate : nothing}
|
|
185
|
-
<div id="results-total">
|
|
186
|
-
<span id="big-results-count">
|
|
179
|
+
return html `<div
|
|
180
|
+
id="left-column"
|
|
181
|
+
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
182
|
+
>
|
|
183
|
+
<div id="mobile-header-container">
|
|
184
|
+
${this.mobileView ? this.mobileFacetsTemplate : nothing}
|
|
185
|
+
<div id="results-total">
|
|
186
|
+
<span id="big-results-count">
|
|
187
187
|
${this.totalResults !== undefined
|
|
188
188
|
? this.totalResults.toLocaleString()
|
|
189
|
-
: '-'}
|
|
190
|
-
</span>
|
|
191
|
-
<span id="big-results-label">
|
|
192
|
-
${this.totalResults === 1 ? 'Result' : 'Results'}
|
|
193
|
-
</span>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
<div
|
|
197
|
-
id="facets-container"
|
|
189
|
+
: '-'}
|
|
190
|
+
</span>
|
|
191
|
+
<span id="big-results-label">
|
|
192
|
+
${this.totalResults === 1 ? 'Result' : 'Results'}
|
|
193
|
+
</span>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
<div
|
|
197
|
+
id="facets-container"
|
|
198
198
|
class=${!this.mobileView || this.mobileFacetsVisible
|
|
199
199
|
? 'expanded'
|
|
200
|
-
: ''}
|
|
201
|
-
>
|
|
202
|
-
${this.facetsTemplate}
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
<div id="right-column" class="column">
|
|
206
|
-
${this.searchResultsLoading ? this.loadingTemplate : nothing}
|
|
207
|
-
${this.sortFilterBarTemplate}
|
|
200
|
+
: ''}
|
|
201
|
+
>
|
|
202
|
+
${this.facetsTemplate}
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
<div id="right-column" class="column">
|
|
206
|
+
${this.searchResultsLoading ? this.loadingTemplate : nothing}
|
|
207
|
+
${this.sortFilterBarTemplate}
|
|
208
208
|
${this.displayMode === `list-compact`
|
|
209
209
|
? this.listHeaderTemplate
|
|
210
|
-
: nothing}
|
|
211
|
-
${this.infiniteScrollerTemplate}
|
|
210
|
+
: nothing}
|
|
211
|
+
${this.infiniteScrollerTemplate}
|
|
212
212
|
</div>`;
|
|
213
213
|
}
|
|
214
214
|
get infiniteScrollerTemplate() {
|
|
215
|
-
return html `<infinite-scroller
|
|
216
|
-
class="${ifDefined(this.displayMode)}"
|
|
217
|
-
.cellProvider=${this}
|
|
218
|
-
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
219
|
-
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
220
|
-
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
215
|
+
return html `<infinite-scroller
|
|
216
|
+
class="${ifDefined(this.displayMode)}"
|
|
217
|
+
.cellProvider=${this}
|
|
218
|
+
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
219
|
+
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
220
|
+
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
221
221
|
></infinite-scroller>`;
|
|
222
222
|
}
|
|
223
223
|
get sortFilterBarTemplate() {
|
|
224
|
-
return html `
|
|
225
|
-
<sort-filter-bar
|
|
226
|
-
.selectedSort=${this.selectedSort}
|
|
227
|
-
.sortDirection=${this.sortDirection}
|
|
228
|
-
.displayMode=${this.displayMode}
|
|
229
|
-
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
230
|
-
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
231
|
-
.resizeObserver=${this.resizeObserver}
|
|
232
|
-
@sortChanged=${this.userChangedSort}
|
|
233
|
-
@displayModeChanged=${this.displayModeChanged}
|
|
234
|
-
@titleLetterChanged=${this.titleLetterSelected}
|
|
235
|
-
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
236
|
-
>
|
|
237
|
-
</sort-filter-bar>
|
|
224
|
+
return html `
|
|
225
|
+
<sort-filter-bar
|
|
226
|
+
.selectedSort=${this.selectedSort}
|
|
227
|
+
.sortDirection=${this.sortDirection}
|
|
228
|
+
.displayMode=${this.displayMode}
|
|
229
|
+
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
230
|
+
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
231
|
+
.resizeObserver=${this.resizeObserver}
|
|
232
|
+
@sortChanged=${this.userChangedSort}
|
|
233
|
+
@displayModeChanged=${this.displayModeChanged}
|
|
234
|
+
@titleLetterChanged=${this.titleLetterSelected}
|
|
235
|
+
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
236
|
+
>
|
|
237
|
+
</sort-filter-bar>
|
|
238
238
|
`;
|
|
239
239
|
}
|
|
240
240
|
userChangedSort(e) {
|
|
@@ -335,87 +335,88 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
335
335
|
this.fullYearAggregationLoading);
|
|
336
336
|
}
|
|
337
337
|
get mobileFacetsTemplate() {
|
|
338
|
-
return html `
|
|
339
|
-
<div id="mobile-filter-collapse">
|
|
340
|
-
<h1
|
|
338
|
+
return html `
|
|
339
|
+
<div id="mobile-filter-collapse">
|
|
340
|
+
<h1
|
|
341
341
|
@click=${() => {
|
|
342
342
|
this.isResizeToMobile = false;
|
|
343
343
|
this.mobileFacetsVisible = !this.mobileFacetsVisible;
|
|
344
|
-
}}
|
|
344
|
+
}}
|
|
345
345
|
@keyup=${() => {
|
|
346
346
|
this.isResizeToMobile = false;
|
|
347
347
|
this.mobileFacetsVisible = !this.mobileFacetsVisible;
|
|
348
|
-
}}
|
|
349
|
-
>
|
|
350
|
-
<span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
|
|
351
|
-
${chevronIcon}
|
|
352
|
-
</span>
|
|
353
|
-
Filters
|
|
354
|
-
</h1>
|
|
355
|
-
</div>
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
|
|
351
|
+
${chevronIcon}
|
|
352
|
+
</span>
|
|
353
|
+
Filters
|
|
354
|
+
</h1>
|
|
355
|
+
</div>
|
|
356
356
|
`;
|
|
357
357
|
}
|
|
358
358
|
get facetsTemplate() {
|
|
359
|
-
return html `
|
|
360
|
-
${this.facetsLoading ? this.loadingTemplate : nothing}
|
|
361
|
-
<collection-facets
|
|
362
|
-
@facetsChanged=${this.facetsChanged}
|
|
363
|
-
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
364
|
-
.searchService=${this.searchService}
|
|
365
|
-
.searchType=${this.searchType}
|
|
366
|
-
.aggregations=${this.aggregations}
|
|
367
|
-
.fullYearsHistogramAggregation=${this.fullYearsHistogramAggregation}
|
|
368
|
-
.
|
|
369
|
-
.
|
|
370
|
-
.
|
|
371
|
-
.
|
|
372
|
-
.
|
|
373
|
-
.
|
|
374
|
-
.
|
|
375
|
-
.
|
|
376
|
-
|
|
377
|
-
?
|
|
378
|
-
?
|
|
379
|
-
|
|
380
|
-
.
|
|
381
|
-
|
|
382
|
-
|
|
359
|
+
return html `
|
|
360
|
+
${this.facetsLoading ? this.loadingTemplate : nothing}
|
|
361
|
+
<collection-facets
|
|
362
|
+
@facetsChanged=${this.facetsChanged}
|
|
363
|
+
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
364
|
+
.searchService=${this.searchService}
|
|
365
|
+
.searchType=${this.searchType}
|
|
366
|
+
.aggregations=${this.aggregations}
|
|
367
|
+
.fullYearsHistogramAggregation=${this.fullYearsHistogramAggregation}
|
|
368
|
+
.previousSearchType=${this.previousSearchType}
|
|
369
|
+
.minSelectedDate=${this.minSelectedDate}
|
|
370
|
+
.maxSelectedDate=${this.maxSelectedDate}
|
|
371
|
+
.selectedFacets=${this.selectedFacets}
|
|
372
|
+
.collectionNameCache=${this.collectionNameCache}
|
|
373
|
+
.languageCodeHandler=${this.languageCodeHandler}
|
|
374
|
+
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
375
|
+
.fullQuery=${this.fullQuery}
|
|
376
|
+
.modalManager=${this.modalManager}
|
|
377
|
+
?collapsableFacets=${this.mobileView}
|
|
378
|
+
?facetsLoading=${this.facetDataLoading}
|
|
379
|
+
?fullYearAggregationLoading=${this.fullYearAggregationLoading}
|
|
380
|
+
.onFacetClick=${this.facetClickHandler}
|
|
381
|
+
.analyticsHandler=${this.analyticsHandler}
|
|
382
|
+
>
|
|
383
|
+
</collection-facets>
|
|
383
384
|
`;
|
|
384
385
|
}
|
|
385
386
|
get loadingTemplate() {
|
|
386
|
-
return html `
|
|
387
|
-
<div class="loading-cover">
|
|
388
|
-
<circular-activity-indicator></circular-activity-indicator>
|
|
389
|
-
</div>
|
|
387
|
+
return html `
|
|
388
|
+
<div class="loading-cover">
|
|
389
|
+
<circular-activity-indicator></circular-activity-indicator>
|
|
390
|
+
</div>
|
|
390
391
|
`;
|
|
391
392
|
}
|
|
392
393
|
get listHeaderTemplate() {
|
|
393
|
-
return html `
|
|
394
|
-
<div id="list-header">
|
|
395
|
-
<tile-dispatcher
|
|
396
|
-
.tileDisplayMode=${'list-header'}
|
|
397
|
-
.resizeObserver=${this.resizeObserver}
|
|
398
|
-
.sortParam=${this.sortParam}
|
|
399
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
400
|
-
.loggedIn=${this.loggedIn}
|
|
401
|
-
>
|
|
402
|
-
</tile-dispatcher>
|
|
403
|
-
</div>
|
|
394
|
+
return html `
|
|
395
|
+
<div id="list-header">
|
|
396
|
+
<tile-dispatcher
|
|
397
|
+
.tileDisplayMode=${'list-header'}
|
|
398
|
+
.resizeObserver=${this.resizeObserver}
|
|
399
|
+
.sortParam=${this.sortParam}
|
|
400
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
401
|
+
.loggedIn=${this.loggedIn}
|
|
402
|
+
>
|
|
403
|
+
</tile-dispatcher>
|
|
404
|
+
</div>
|
|
404
405
|
`;
|
|
405
406
|
}
|
|
406
407
|
get queryDebuggingTemplate() {
|
|
407
408
|
var _a, _b;
|
|
408
|
-
return html `
|
|
409
|
-
<div>
|
|
410
|
-
<ul>
|
|
411
|
-
<li>Base Query: ${this.baseQuery}</li>
|
|
412
|
-
<li>Facet Query: ${this.facetQuery}</li>
|
|
413
|
-
<li>Sort Filter Query: ${this.sortFilterQueries}</li>
|
|
414
|
-
<li>Date Range Query: ${this.dateRangeQueryClause}</li>
|
|
415
|
-
<li>Sort: ${(_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field} ${(_b = this.sortParam) === null || _b === void 0 ? void 0 : _b.direction}</li>
|
|
416
|
-
<li>Full Query: ${this.fullQuery}</li>
|
|
417
|
-
</ul>
|
|
418
|
-
</div>
|
|
409
|
+
return html `
|
|
410
|
+
<div>
|
|
411
|
+
<ul>
|
|
412
|
+
<li>Base Query: ${this.baseQuery}</li>
|
|
413
|
+
<li>Facet Query: ${this.facetQuery}</li>
|
|
414
|
+
<li>Sort Filter Query: ${this.sortFilterQueries}</li>
|
|
415
|
+
<li>Date Range Query: ${this.dateRangeQueryClause}</li>
|
|
416
|
+
<li>Sort: ${(_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field} ${(_b = this.sortParam) === null || _b === void 0 ? void 0 : _b.direction}</li>
|
|
417
|
+
<li>Full Query: ${this.fullQuery}</li>
|
|
418
|
+
</ul>
|
|
419
|
+
</div>
|
|
419
420
|
`;
|
|
420
421
|
}
|
|
421
422
|
histogramDateRangeUpdated(e) {
|
|
@@ -723,6 +724,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
723
724
|
// The default aggregations for the search_results page type should be what we need here.
|
|
724
725
|
};
|
|
725
726
|
this.facetsLoading = true;
|
|
727
|
+
this.previousSearchType = this.searchType;
|
|
726
728
|
const results = await ((_a = this.searchService) === null || _a === void 0 ? void 0 : _a.search(params, this.searchType));
|
|
727
729
|
this.facetsLoading = false;
|
|
728
730
|
this.aggregations = {
|
|
@@ -1039,20 +1041,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1039
1041
|
const model = this.tileModelAtCellIndex(index);
|
|
1040
1042
|
if (!model)
|
|
1041
1043
|
return undefined;
|
|
1042
|
-
return html `
|
|
1043
|
-
<tile-dispatcher
|
|
1044
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1045
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
1046
|
-
.model=${model}
|
|
1047
|
-
.tileDisplayMode=${this.displayMode}
|
|
1048
|
-
.resizeObserver=${this.resizeObserver}
|
|
1049
|
-
.collectionNameCache=${this.collectionNameCache}
|
|
1050
|
-
.sortParam=${this.sortParam}
|
|
1051
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1052
|
-
.loggedIn=${this.loggedIn}
|
|
1053
|
-
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1054
|
-
>
|
|
1055
|
-
</tile-dispatcher>
|
|
1044
|
+
return html `
|
|
1045
|
+
<tile-dispatcher
|
|
1046
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1047
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
1048
|
+
.model=${model}
|
|
1049
|
+
.tileDisplayMode=${this.displayMode}
|
|
1050
|
+
.resizeObserver=${this.resizeObserver}
|
|
1051
|
+
.collectionNameCache=${this.collectionNameCache}
|
|
1052
|
+
.sortParam=${this.sortParam}
|
|
1053
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1054
|
+
.loggedIn=${this.loggedIn}
|
|
1055
|
+
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1056
|
+
>
|
|
1057
|
+
</tile-dispatcher>
|
|
1056
1058
|
`;
|
|
1057
1059
|
}
|
|
1058
1060
|
/**
|
|
@@ -1064,212 +1066,212 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1064
1066
|
this.fetchPage(this.pagesToRender);
|
|
1065
1067
|
}
|
|
1066
1068
|
};
|
|
1067
|
-
CollectionBrowser.styles = css `
|
|
1068
|
-
:host {
|
|
1069
|
-
display: block;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* When page width resizes from desktop to mobile, use this class to
|
|
1074
|
-
* disable expand/collapse transition when loading.
|
|
1075
|
-
*/
|
|
1076
|
-
.preload * {
|
|
1077
|
-
transition: none !important;
|
|
1078
|
-
-webkit-transition: none !important;
|
|
1079
|
-
-moz-transition: none !important;
|
|
1080
|
-
-ms-transition: none !important;
|
|
1081
|
-
-o-transition: none !important;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
#content-container {
|
|
1085
|
-
display: flex;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
.collapser {
|
|
1089
|
-
display: inline-block;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
.collapser svg {
|
|
1093
|
-
width: 10px;
|
|
1094
|
-
height: 10px;
|
|
1095
|
-
transition: transform 0.2s ease-out;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
.collapser.open svg {
|
|
1099
|
-
transform: rotate(90deg);
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
#mobile-filter-collapse h1 {
|
|
1103
|
-
cursor: pointer;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
#content-container.mobile {
|
|
1107
|
-
display: block;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.column {
|
|
1111
|
-
padding-top: 2rem;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
#right-column {
|
|
1115
|
-
flex: 1;
|
|
1116
|
-
position: relative;
|
|
1117
|
-
border-left: 1px solid rgb(232, 232, 232);
|
|
1118
|
-
padding-left: 1rem;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.mobile #right-column {
|
|
1122
|
-
border-left: none;
|
|
1123
|
-
padding: 0;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
#left-column {
|
|
1127
|
-
width: 18rem;
|
|
1128
|
-
min-width: 18rem; /* Prevents Safari from shrinking col at first draw */
|
|
1129
|
-
padding-right: 12px;
|
|
1130
|
-
padding-right: 1rem;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
.desktop #left-column::-webkit-scrollbar {
|
|
1134
|
-
display: none;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
.mobile #left-column {
|
|
1138
|
-
width: 100%;
|
|
1139
|
-
padding: 0;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.desktop #left-column {
|
|
1143
|
-
top: 0;
|
|
1144
|
-
position: sticky;
|
|
1145
|
-
max-height: 100vh;
|
|
1146
|
-
overflow: scroll;
|
|
1147
|
-
-ms-overflow-style: none; /* hide scrollbar IE and Edge */
|
|
1148
|
-
scrollbar-width: none; /* hide scrollbar Firefox */
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
#mobile-header-container {
|
|
1152
|
-
display: flex;
|
|
1153
|
-
justify-content: space-between;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
#facets-container {
|
|
1157
|
-
position: relative;
|
|
1158
|
-
max-height: 0;
|
|
1159
|
-
transition: max-height 0.2s ease-in-out;
|
|
1160
|
-
z-index: 1;
|
|
1161
|
-
padding-bottom: 2rem;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
.mobile #facets-container {
|
|
1165
|
-
overflow: hidden;
|
|
1166
|
-
padding-bottom: 0;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
#facets-container.expanded {
|
|
1170
|
-
max-height: 2000px;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
#results-total {
|
|
1174
|
-
display: flex;
|
|
1175
|
-
align-items: center;
|
|
1176
|
-
margin-bottom: 5rem;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
.mobile #results-total {
|
|
1180
|
-
margin-bottom: 0;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
#big-results-count {
|
|
1184
|
-
font-size: 2.4rem;
|
|
1185
|
-
font-weight: 500;
|
|
1186
|
-
margin-right: 5px;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
#big-results-label {
|
|
1190
|
-
font-size: 1rem;
|
|
1191
|
-
font-weight: 200;
|
|
1192
|
-
text-transform: uppercase;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
#list-header {
|
|
1196
|
-
max-height: 4.2rem;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
.loading-cover {
|
|
1200
|
-
position: absolute;
|
|
1201
|
-
top: 0;
|
|
1202
|
-
left: 0;
|
|
1203
|
-
width: 100%;
|
|
1204
|
-
height: 100%;
|
|
1205
|
-
display: flex;
|
|
1206
|
-
justify-content: center;
|
|
1207
|
-
z-index: 1;
|
|
1208
|
-
padding-top: 50px;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
circular-activity-indicator {
|
|
1212
|
-
width: 30px;
|
|
1213
|
-
height: 30px;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
sort-filter-bar {
|
|
1217
|
-
display: block;
|
|
1218
|
-
margin-bottom: 4rem;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
infinite-scroller {
|
|
1222
|
-
display: block;
|
|
1223
|
-
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
1224
|
-
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
infinite-scroller.list-compact {
|
|
1228
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1229
|
-
--collectionBrowserCellMinWidth,
|
|
1230
|
-
100%
|
|
1231
|
-
);
|
|
1232
|
-
--infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
|
|
1233
|
-
--infiniteScrollerCellMaxHeight: 56px;
|
|
1234
|
-
--infiniteScrollerRowGap: 0px;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
infinite-scroller.list-detail {
|
|
1238
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1239
|
-
--collectionBrowserCellMinWidth,
|
|
1240
|
-
100%
|
|
1241
|
-
);
|
|
1242
|
-
--infiniteScrollerCellMinHeight: var(
|
|
1243
|
-
--collectionBrowserCellMinHeight,
|
|
1244
|
-
5rem
|
|
1245
|
-
);
|
|
1246
|
-
/*
|
|
1247
|
-
30px in spec, compensating for a -4px margin
|
|
1248
|
-
to align title with top of item image
|
|
1249
|
-
src/tiles/list/tile-list.ts
|
|
1250
|
-
*/
|
|
1251
|
-
--infiniteScrollerRowGap: 34px;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.mobile infinite-scroller.list-detail {
|
|
1255
|
-
--infiniteScrollerRowGap: 24px;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
infinite-scroller.grid {
|
|
1259
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1260
|
-
--collectionBrowserCellMinWidth,
|
|
1261
|
-
18rem
|
|
1262
|
-
);
|
|
1263
|
-
--infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
|
|
1264
|
-
--infiniteScrollerCellMinHeight: var(
|
|
1265
|
-
--collectionBrowserCellMinHeight,
|
|
1266
|
-
29rem
|
|
1267
|
-
);
|
|
1268
|
-
--infiniteScrollerCellMaxHeight: var(
|
|
1269
|
-
--collectionBrowserCellMaxHeight,
|
|
1270
|
-
29rem
|
|
1271
|
-
);
|
|
1272
|
-
}
|
|
1069
|
+
CollectionBrowser.styles = css `
|
|
1070
|
+
:host {
|
|
1071
|
+
display: block;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* When page width resizes from desktop to mobile, use this class to
|
|
1076
|
+
* disable expand/collapse transition when loading.
|
|
1077
|
+
*/
|
|
1078
|
+
.preload * {
|
|
1079
|
+
transition: none !important;
|
|
1080
|
+
-webkit-transition: none !important;
|
|
1081
|
+
-moz-transition: none !important;
|
|
1082
|
+
-ms-transition: none !important;
|
|
1083
|
+
-o-transition: none !important;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
#content-container {
|
|
1087
|
+
display: flex;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.collapser {
|
|
1091
|
+
display: inline-block;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.collapser svg {
|
|
1095
|
+
width: 10px;
|
|
1096
|
+
height: 10px;
|
|
1097
|
+
transition: transform 0.2s ease-out;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.collapser.open svg {
|
|
1101
|
+
transform: rotate(90deg);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
#mobile-filter-collapse h1 {
|
|
1105
|
+
cursor: pointer;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
#content-container.mobile {
|
|
1109
|
+
display: block;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.column {
|
|
1113
|
+
padding-top: 2rem;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
#right-column {
|
|
1117
|
+
flex: 1;
|
|
1118
|
+
position: relative;
|
|
1119
|
+
border-left: 1px solid rgb(232, 232, 232);
|
|
1120
|
+
padding-left: 1rem;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.mobile #right-column {
|
|
1124
|
+
border-left: none;
|
|
1125
|
+
padding: 0;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
#left-column {
|
|
1129
|
+
width: 18rem;
|
|
1130
|
+
min-width: 18rem; /* Prevents Safari from shrinking col at first draw */
|
|
1131
|
+
padding-right: 12px;
|
|
1132
|
+
padding-right: 1rem;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.desktop #left-column::-webkit-scrollbar {
|
|
1136
|
+
display: none;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
.mobile #left-column {
|
|
1140
|
+
width: 100%;
|
|
1141
|
+
padding: 0;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
.desktop #left-column {
|
|
1145
|
+
top: 0;
|
|
1146
|
+
position: sticky;
|
|
1147
|
+
max-height: 100vh;
|
|
1148
|
+
overflow: scroll;
|
|
1149
|
+
-ms-overflow-style: none; /* hide scrollbar IE and Edge */
|
|
1150
|
+
scrollbar-width: none; /* hide scrollbar Firefox */
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
#mobile-header-container {
|
|
1154
|
+
display: flex;
|
|
1155
|
+
justify-content: space-between;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
#facets-container {
|
|
1159
|
+
position: relative;
|
|
1160
|
+
max-height: 0;
|
|
1161
|
+
transition: max-height 0.2s ease-in-out;
|
|
1162
|
+
z-index: 1;
|
|
1163
|
+
padding-bottom: 2rem;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.mobile #facets-container {
|
|
1167
|
+
overflow: hidden;
|
|
1168
|
+
padding-bottom: 0;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
#facets-container.expanded {
|
|
1172
|
+
max-height: 2000px;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
#results-total {
|
|
1176
|
+
display: flex;
|
|
1177
|
+
align-items: center;
|
|
1178
|
+
margin-bottom: 5rem;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
.mobile #results-total {
|
|
1182
|
+
margin-bottom: 0;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
#big-results-count {
|
|
1186
|
+
font-size: 2.4rem;
|
|
1187
|
+
font-weight: 500;
|
|
1188
|
+
margin-right: 5px;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
#big-results-label {
|
|
1192
|
+
font-size: 1rem;
|
|
1193
|
+
font-weight: 200;
|
|
1194
|
+
text-transform: uppercase;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
#list-header {
|
|
1198
|
+
max-height: 4.2rem;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.loading-cover {
|
|
1202
|
+
position: absolute;
|
|
1203
|
+
top: 0;
|
|
1204
|
+
left: 0;
|
|
1205
|
+
width: 100%;
|
|
1206
|
+
height: 100%;
|
|
1207
|
+
display: flex;
|
|
1208
|
+
justify-content: center;
|
|
1209
|
+
z-index: 1;
|
|
1210
|
+
padding-top: 50px;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
circular-activity-indicator {
|
|
1214
|
+
width: 30px;
|
|
1215
|
+
height: 30px;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
sort-filter-bar {
|
|
1219
|
+
display: block;
|
|
1220
|
+
margin-bottom: 4rem;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
infinite-scroller {
|
|
1224
|
+
display: block;
|
|
1225
|
+
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
1226
|
+
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
infinite-scroller.list-compact {
|
|
1230
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1231
|
+
--collectionBrowserCellMinWidth,
|
|
1232
|
+
100%
|
|
1233
|
+
);
|
|
1234
|
+
--infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
|
|
1235
|
+
--infiniteScrollerCellMaxHeight: 56px;
|
|
1236
|
+
--infiniteScrollerRowGap: 0px;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
infinite-scroller.list-detail {
|
|
1240
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1241
|
+
--collectionBrowserCellMinWidth,
|
|
1242
|
+
100%
|
|
1243
|
+
);
|
|
1244
|
+
--infiniteScrollerCellMinHeight: var(
|
|
1245
|
+
--collectionBrowserCellMinHeight,
|
|
1246
|
+
5rem
|
|
1247
|
+
);
|
|
1248
|
+
/*
|
|
1249
|
+
30px in spec, compensating for a -4px margin
|
|
1250
|
+
to align title with top of item image
|
|
1251
|
+
src/tiles/list/tile-list.ts
|
|
1252
|
+
*/
|
|
1253
|
+
--infiniteScrollerRowGap: 34px;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.mobile infinite-scroller.list-detail {
|
|
1257
|
+
--infiniteScrollerRowGap: 24px;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
infinite-scroller.grid {
|
|
1261
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1262
|
+
--collectionBrowserCellMinWidth,
|
|
1263
|
+
18rem
|
|
1264
|
+
);
|
|
1265
|
+
--infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
|
|
1266
|
+
--infiniteScrollerCellMinHeight: var(
|
|
1267
|
+
--collectionBrowserCellMinHeight,
|
|
1268
|
+
29rem
|
|
1269
|
+
);
|
|
1270
|
+
--infiniteScrollerCellMaxHeight: var(
|
|
1271
|
+
--collectionBrowserCellMaxHeight,
|
|
1272
|
+
29rem
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1273
1275
|
`;
|
|
1274
1276
|
__decorate([
|
|
1275
1277
|
property({ type: String })
|
|
@@ -1379,6 +1381,9 @@ __decorate([
|
|
|
1379
1381
|
__decorate([
|
|
1380
1382
|
state()
|
|
1381
1383
|
], CollectionBrowser.prototype, "fullYearsHistogramAggregation", void 0);
|
|
1384
|
+
__decorate([
|
|
1385
|
+
state()
|
|
1386
|
+
], CollectionBrowser.prototype, "previousSearchType", void 0);
|
|
1382
1387
|
__decorate([
|
|
1383
1388
|
state()
|
|
1384
1389
|
], CollectionBrowser.prototype, "totalResults", void 0);
|