@internetarchive/collection-browser 0.3.2-alpha.4 → 0.3.2-alpha.5
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/app-root.d.ts +1 -0
- package/dist/src/app-root.js +10 -1
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.js +344 -364
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets.d.ts +2 -2
- package/dist/src/collection-facets.js +153 -153
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/test/collection-browser.test.js +16 -1
- 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 +3 -3
- package/src/app-root.ts +12 -1
- package/src/collection-browser.ts +1526 -1547
- package/src/collection-facets.ts +582 -582
- package/test/collection-browser.test.ts +24 -1
- package/test/collection-facets.test.ts +556 -556
|
@@ -154,15 +154,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
154
154
|
}
|
|
155
155
|
render() {
|
|
156
156
|
this.setPlaceholderType();
|
|
157
|
-
return html `
|
|
158
|
-
<div
|
|
159
|
-
id="content-container"
|
|
160
|
-
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
161
|
-
>
|
|
157
|
+
return html `
|
|
158
|
+
<div
|
|
159
|
+
id="content-container"
|
|
160
|
+
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
161
|
+
>
|
|
162
162
|
${this.placeholderType
|
|
163
163
|
? this.emptyPlaceholderTemplate
|
|
164
|
-
: this.collectionBrowserTemplate}
|
|
165
|
-
</div>
|
|
164
|
+
: this.collectionBrowserTemplate}
|
|
165
|
+
</div>
|
|
166
166
|
`;
|
|
167
167
|
}
|
|
168
168
|
setPlaceholderType() {
|
|
@@ -175,73 +175,73 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
get emptyPlaceholderTemplate() {
|
|
178
|
-
return html `
|
|
179
|
-
<empty-placeholder
|
|
180
|
-
.placeholderType=${this.placeholderType}
|
|
181
|
-
?isMobileView=${this.mobileView}
|
|
182
|
-
></empty-placeholder>
|
|
178
|
+
return html `
|
|
179
|
+
<empty-placeholder
|
|
180
|
+
.placeholderType=${this.placeholderType}
|
|
181
|
+
?isMobileView=${this.mobileView}
|
|
182
|
+
></empty-placeholder>
|
|
183
183
|
`;
|
|
184
184
|
}
|
|
185
185
|
get collectionBrowserTemplate() {
|
|
186
|
-
return html `<div
|
|
187
|
-
id="left-column"
|
|
188
|
-
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
189
|
-
>
|
|
190
|
-
<div id="mobile-header-container">
|
|
191
|
-
${this.mobileView ? this.mobileFacetsTemplate : nothing}
|
|
192
|
-
<div id="results-total">
|
|
193
|
-
<span id="big-results-count">
|
|
186
|
+
return html `<div
|
|
187
|
+
id="left-column"
|
|
188
|
+
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
189
|
+
>
|
|
190
|
+
<div id="mobile-header-container">
|
|
191
|
+
${this.mobileView ? this.mobileFacetsTemplate : nothing}
|
|
192
|
+
<div id="results-total">
|
|
193
|
+
<span id="big-results-count">
|
|
194
194
|
${this.totalResults !== undefined
|
|
195
195
|
? this.totalResults.toLocaleString()
|
|
196
|
-
: '-'}
|
|
197
|
-
</span>
|
|
198
|
-
<span id="big-results-label">
|
|
199
|
-
${this.totalResults === 1 ? 'Result' : 'Results'}
|
|
200
|
-
</span>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
<div
|
|
204
|
-
id="facets-container"
|
|
196
|
+
: '-'}
|
|
197
|
+
</span>
|
|
198
|
+
<span id="big-results-label">
|
|
199
|
+
${this.totalResults === 1 ? 'Result' : 'Results'}
|
|
200
|
+
</span>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
<div
|
|
204
|
+
id="facets-container"
|
|
205
205
|
class=${!this.mobileView || this.mobileFacetsVisible
|
|
206
206
|
? 'expanded'
|
|
207
|
-
: ''}
|
|
208
|
-
>
|
|
209
|
-
${this.facetsTemplate}
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
<div id="right-column" class="column">
|
|
213
|
-
${this.searchResultsLoading ? this.loadingTemplate : nothing}
|
|
214
|
-
${this.sortFilterBarTemplate}
|
|
207
|
+
: ''}
|
|
208
|
+
>
|
|
209
|
+
${this.facetsTemplate}
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<div id="right-column" class="column">
|
|
213
|
+
${this.searchResultsLoading ? this.loadingTemplate : nothing}
|
|
214
|
+
${this.sortFilterBarTemplate}
|
|
215
215
|
${this.displayMode === `list-compact`
|
|
216
216
|
? this.listHeaderTemplate
|
|
217
|
-
: nothing}
|
|
218
|
-
${this.infiniteScrollerTemplate}
|
|
217
|
+
: nothing}
|
|
218
|
+
${this.infiniteScrollerTemplate}
|
|
219
219
|
</div>`;
|
|
220
220
|
}
|
|
221
221
|
get infiniteScrollerTemplate() {
|
|
222
|
-
return html `<infinite-scroller
|
|
223
|
-
class="${ifDefined(this.displayMode)}"
|
|
224
|
-
.cellProvider=${this}
|
|
225
|
-
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
226
|
-
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
227
|
-
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
222
|
+
return html `<infinite-scroller
|
|
223
|
+
class="${ifDefined(this.displayMode)}"
|
|
224
|
+
.cellProvider=${this}
|
|
225
|
+
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
226
|
+
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
227
|
+
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
228
228
|
></infinite-scroller>`;
|
|
229
229
|
}
|
|
230
230
|
get sortFilterBarTemplate() {
|
|
231
|
-
return html `
|
|
232
|
-
<sort-filter-bar
|
|
233
|
-
.selectedSort=${this.selectedSort}
|
|
234
|
-
.sortDirection=${this.sortDirection}
|
|
235
|
-
.displayMode=${this.displayMode}
|
|
236
|
-
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
237
|
-
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
238
|
-
.resizeObserver=${this.resizeObserver}
|
|
239
|
-
@sortChanged=${this.userChangedSort}
|
|
240
|
-
@displayModeChanged=${this.displayModeChanged}
|
|
241
|
-
@titleLetterChanged=${this.titleLetterSelected}
|
|
242
|
-
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
243
|
-
>
|
|
244
|
-
</sort-filter-bar>
|
|
231
|
+
return html `
|
|
232
|
+
<sort-filter-bar
|
|
233
|
+
.selectedSort=${this.selectedSort}
|
|
234
|
+
.sortDirection=${this.sortDirection}
|
|
235
|
+
.displayMode=${this.displayMode}
|
|
236
|
+
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
237
|
+
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
238
|
+
.resizeObserver=${this.resizeObserver}
|
|
239
|
+
@sortChanged=${this.userChangedSort}
|
|
240
|
+
@displayModeChanged=${this.displayModeChanged}
|
|
241
|
+
@titleLetterChanged=${this.titleLetterSelected}
|
|
242
|
+
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
243
|
+
>
|
|
244
|
+
</sort-filter-bar>
|
|
245
245
|
`;
|
|
246
246
|
}
|
|
247
247
|
userChangedSort(e) {
|
|
@@ -342,88 +342,88 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
342
342
|
this.fullYearAggregationLoading);
|
|
343
343
|
}
|
|
344
344
|
get mobileFacetsTemplate() {
|
|
345
|
-
return html `
|
|
346
|
-
<div id="mobile-filter-collapse">
|
|
347
|
-
<h1
|
|
345
|
+
return html `
|
|
346
|
+
<div id="mobile-filter-collapse">
|
|
347
|
+
<h1
|
|
348
348
|
@click=${() => {
|
|
349
349
|
this.isResizeToMobile = false;
|
|
350
350
|
this.mobileFacetsVisible = !this.mobileFacetsVisible;
|
|
351
|
-
}}
|
|
351
|
+
}}
|
|
352
352
|
@keyup=${() => {
|
|
353
353
|
this.isResizeToMobile = false;
|
|
354
354
|
this.mobileFacetsVisible = !this.mobileFacetsVisible;
|
|
355
|
-
}}
|
|
356
|
-
>
|
|
357
|
-
<span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
|
|
358
|
-
${chevronIcon}
|
|
359
|
-
</span>
|
|
360
|
-
Filters
|
|
361
|
-
</h1>
|
|
362
|
-
</div>
|
|
355
|
+
}}
|
|
356
|
+
>
|
|
357
|
+
<span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
|
|
358
|
+
${chevronIcon}
|
|
359
|
+
</span>
|
|
360
|
+
Filters
|
|
361
|
+
</h1>
|
|
362
|
+
</div>
|
|
363
363
|
`;
|
|
364
364
|
}
|
|
365
365
|
get facetsTemplate() {
|
|
366
|
-
return html `
|
|
367
|
-
${this.facetsLoading ? this.loadingTemplate : nothing}
|
|
368
|
-
<collection-facets
|
|
369
|
-
@facetsChanged=${this.facetsChanged}
|
|
370
|
-
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
371
|
-
.searchService=${this.searchService}
|
|
372
|
-
.searchType=${this.searchType}
|
|
373
|
-
.aggregations=${this.aggregations}
|
|
374
|
-
.fullYearsHistogramAggregation=${this.fullYearsHistogramAggregation}
|
|
375
|
-
.
|
|
376
|
-
.minSelectedDate=${this.minSelectedDate}
|
|
377
|
-
.maxSelectedDate=${this.maxSelectedDate}
|
|
378
|
-
.selectedFacets=${this.selectedFacets}
|
|
379
|
-
.collectionNameCache=${this.collectionNameCache}
|
|
380
|
-
.languageCodeHandler=${this.languageCodeHandler}
|
|
381
|
-
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
382
|
-
.fullQuery=${this.fullQuery}
|
|
383
|
-
.modalManager=${this.modalManager}
|
|
384
|
-
?collapsableFacets=${this.mobileView}
|
|
385
|
-
?facetsLoading=${this.facetDataLoading}
|
|
386
|
-
?fullYearAggregationLoading=${this.fullYearAggregationLoading}
|
|
387
|
-
.onFacetClick=${this.facetClickHandler}
|
|
388
|
-
.analyticsHandler=${this.analyticsHandler}
|
|
389
|
-
>
|
|
390
|
-
</collection-facets>
|
|
366
|
+
return html `
|
|
367
|
+
${this.facetsLoading ? this.loadingTemplate : nothing}
|
|
368
|
+
<collection-facets
|
|
369
|
+
@facetsChanged=${this.facetsChanged}
|
|
370
|
+
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
371
|
+
.searchService=${this.searchService}
|
|
372
|
+
.searchType=${this.searchType}
|
|
373
|
+
.aggregations=${this.aggregations}
|
|
374
|
+
.fullYearsHistogramAggregation=${this.fullYearsHistogramAggregation}
|
|
375
|
+
.moreLinksVisible=${this.previousSearchType !== SearchType.FULLTEXT}
|
|
376
|
+
.minSelectedDate=${this.minSelectedDate}
|
|
377
|
+
.maxSelectedDate=${this.maxSelectedDate}
|
|
378
|
+
.selectedFacets=${this.selectedFacets}
|
|
379
|
+
.collectionNameCache=${this.collectionNameCache}
|
|
380
|
+
.languageCodeHandler=${this.languageCodeHandler}
|
|
381
|
+
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
382
|
+
.fullQuery=${this.fullQuery}
|
|
383
|
+
.modalManager=${this.modalManager}
|
|
384
|
+
?collapsableFacets=${this.mobileView}
|
|
385
|
+
?facetsLoading=${this.facetDataLoading}
|
|
386
|
+
?fullYearAggregationLoading=${this.fullYearAggregationLoading}
|
|
387
|
+
.onFacetClick=${this.facetClickHandler}
|
|
388
|
+
.analyticsHandler=${this.analyticsHandler}
|
|
389
|
+
>
|
|
390
|
+
</collection-facets>
|
|
391
391
|
`;
|
|
392
392
|
}
|
|
393
393
|
get loadingTemplate() {
|
|
394
|
-
return html `
|
|
395
|
-
<div class="loading-cover">
|
|
396
|
-
<circular-activity-indicator></circular-activity-indicator>
|
|
397
|
-
</div>
|
|
394
|
+
return html `
|
|
395
|
+
<div class="loading-cover">
|
|
396
|
+
<circular-activity-indicator></circular-activity-indicator>
|
|
397
|
+
</div>
|
|
398
398
|
`;
|
|
399
399
|
}
|
|
400
400
|
get listHeaderTemplate() {
|
|
401
|
-
return html `
|
|
402
|
-
<div id="list-header">
|
|
403
|
-
<tile-dispatcher
|
|
404
|
-
.tileDisplayMode=${'list-header'}
|
|
405
|
-
.resizeObserver=${this.resizeObserver}
|
|
406
|
-
.sortParam=${this.sortParam}
|
|
407
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
408
|
-
.loggedIn=${this.loggedIn}
|
|
409
|
-
>
|
|
410
|
-
</tile-dispatcher>
|
|
411
|
-
</div>
|
|
401
|
+
return html `
|
|
402
|
+
<div id="list-header">
|
|
403
|
+
<tile-dispatcher
|
|
404
|
+
.tileDisplayMode=${'list-header'}
|
|
405
|
+
.resizeObserver=${this.resizeObserver}
|
|
406
|
+
.sortParam=${this.sortParam}
|
|
407
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
408
|
+
.loggedIn=${this.loggedIn}
|
|
409
|
+
>
|
|
410
|
+
</tile-dispatcher>
|
|
411
|
+
</div>
|
|
412
412
|
`;
|
|
413
413
|
}
|
|
414
414
|
get queryDebuggingTemplate() {
|
|
415
415
|
var _a, _b;
|
|
416
|
-
return html `
|
|
417
|
-
<div>
|
|
418
|
-
<ul>
|
|
419
|
-
<li>Base Query: ${this.baseQuery}</li>
|
|
420
|
-
<li>Facet Query: ${this.facetQuery}</li>
|
|
421
|
-
<li>Sort Filter Query: ${this.sortFilterQueries}</li>
|
|
422
|
-
<li>Date Range Query: ${this.dateRangeQueryClause}</li>
|
|
423
|
-
<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>
|
|
424
|
-
<li>Full Query: ${this.fullQuery}</li>
|
|
425
|
-
</ul>
|
|
426
|
-
</div>
|
|
416
|
+
return html `
|
|
417
|
+
<div>
|
|
418
|
+
<ul>
|
|
419
|
+
<li>Base Query: ${this.baseQuery}</li>
|
|
420
|
+
<li>Facet Query: ${this.facetQuery}</li>
|
|
421
|
+
<li>Sort Filter Query: ${this.sortFilterQueries}</li>
|
|
422
|
+
<li>Date Range Query: ${this.dateRangeQueryClause}</li>
|
|
423
|
+
<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>
|
|
424
|
+
<li>Full Query: ${this.fullQuery}</li>
|
|
425
|
+
</ul>
|
|
426
|
+
</div>
|
|
427
427
|
`;
|
|
428
428
|
}
|
|
429
429
|
histogramDateRangeUpdated(e) {
|
|
@@ -846,27 +846,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
846
846
|
const sortParams = this.sortParam ? [this.sortParam] : [];
|
|
847
847
|
const params = {
|
|
848
848
|
query: this.fullQuery,
|
|
849
|
-
fields: [
|
|
850
|
-
'addeddate',
|
|
851
|
-
'avg_rating',
|
|
852
|
-
'collections_raw',
|
|
853
|
-
'creator',
|
|
854
|
-
'date',
|
|
855
|
-
'description',
|
|
856
|
-
'downloads',
|
|
857
|
-
'identifier',
|
|
858
|
-
'issue',
|
|
859
|
-
'item_count',
|
|
860
|
-
'mediatype',
|
|
861
|
-
'num_favorites',
|
|
862
|
-
'num_reviews',
|
|
863
|
-
'publicdate',
|
|
864
|
-
'reviewdate',
|
|
865
|
-
'source',
|
|
866
|
-
'subject',
|
|
867
|
-
'title',
|
|
868
|
-
'volume',
|
|
869
|
-
],
|
|
870
849
|
page: pageNumber,
|
|
871
850
|
rows: this.pageSize,
|
|
872
851
|
sort: sortParams,
|
|
@@ -933,7 +912,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
933
912
|
* page are visible, but if the page is not currenlty visible, we don't need to reload
|
|
934
913
|
*/
|
|
935
914
|
get currentVisiblePageNumbers() {
|
|
936
|
-
|
|
915
|
+
var _a, _b;
|
|
916
|
+
const visibleCells = (_b = (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.getVisibleCellIndices()) !== null && _b !== void 0 ? _b : [];
|
|
937
917
|
const visiblePages = new Set();
|
|
938
918
|
visibleCells.forEach(cellIndex => {
|
|
939
919
|
const visiblePage = Math.floor(cellIndex / this.pageSize) + 1;
|
|
@@ -1048,20 +1028,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1048
1028
|
const model = this.tileModelAtCellIndex(index);
|
|
1049
1029
|
if (!model)
|
|
1050
1030
|
return undefined;
|
|
1051
|
-
return html `
|
|
1052
|
-
<tile-dispatcher
|
|
1053
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1054
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
1055
|
-
.model=${model}
|
|
1056
|
-
.tileDisplayMode=${this.displayMode}
|
|
1057
|
-
.resizeObserver=${this.resizeObserver}
|
|
1058
|
-
.collectionNameCache=${this.collectionNameCache}
|
|
1059
|
-
.sortParam=${this.sortParam}
|
|
1060
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1061
|
-
.loggedIn=${this.loggedIn}
|
|
1062
|
-
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1063
|
-
>
|
|
1064
|
-
</tile-dispatcher>
|
|
1031
|
+
return html `
|
|
1032
|
+
<tile-dispatcher
|
|
1033
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1034
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
1035
|
+
.model=${model}
|
|
1036
|
+
.tileDisplayMode=${this.displayMode}
|
|
1037
|
+
.resizeObserver=${this.resizeObserver}
|
|
1038
|
+
.collectionNameCache=${this.collectionNameCache}
|
|
1039
|
+
.sortParam=${this.sortParam}
|
|
1040
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1041
|
+
.loggedIn=${this.loggedIn}
|
|
1042
|
+
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1043
|
+
>
|
|
1044
|
+
</tile-dispatcher>
|
|
1065
1045
|
`;
|
|
1066
1046
|
}
|
|
1067
1047
|
/**
|
|
@@ -1073,212 +1053,212 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1073
1053
|
this.fetchPage(this.pagesToRender);
|
|
1074
1054
|
}
|
|
1075
1055
|
};
|
|
1076
|
-
CollectionBrowser.styles = css `
|
|
1077
|
-
:host {
|
|
1078
|
-
display: block;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* When page width resizes from desktop to mobile, use this class to
|
|
1083
|
-
* disable expand/collapse transition when loading.
|
|
1084
|
-
*/
|
|
1085
|
-
.preload * {
|
|
1086
|
-
transition: none !important;
|
|
1087
|
-
-webkit-transition: none !important;
|
|
1088
|
-
-moz-transition: none !important;
|
|
1089
|
-
-ms-transition: none !important;
|
|
1090
|
-
-o-transition: none !important;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
#content-container {
|
|
1094
|
-
display: flex;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
.collapser {
|
|
1098
|
-
display: inline-block;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
.collapser svg {
|
|
1102
|
-
width: 10px;
|
|
1103
|
-
height: 10px;
|
|
1104
|
-
transition: transform 0.2s ease-out;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
.collapser.open svg {
|
|
1108
|
-
transform: rotate(90deg);
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
#mobile-filter-collapse h1 {
|
|
1112
|
-
cursor: pointer;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
#content-container.mobile {
|
|
1116
|
-
display: block;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
.column {
|
|
1120
|
-
padding-top: 2rem;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
#right-column {
|
|
1124
|
-
flex: 1;
|
|
1125
|
-
position: relative;
|
|
1126
|
-
border-left: 1px solid rgb(232, 232, 232);
|
|
1127
|
-
padding-left: 1rem;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
.mobile #right-column {
|
|
1131
|
-
border-left: none;
|
|
1132
|
-
padding: 0;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
#left-column {
|
|
1136
|
-
width: 18rem;
|
|
1137
|
-
min-width: 18rem; /* Prevents Safari from shrinking col at first draw */
|
|
1138
|
-
padding-right: 12px;
|
|
1139
|
-
padding-right: 1rem;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.desktop #left-column::-webkit-scrollbar {
|
|
1143
|
-
display: none;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.mobile #left-column {
|
|
1147
|
-
width: 100%;
|
|
1148
|
-
padding: 0;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
.desktop #left-column {
|
|
1152
|
-
top: 0;
|
|
1153
|
-
position: sticky;
|
|
1154
|
-
max-height: 100vh;
|
|
1155
|
-
overflow: scroll;
|
|
1156
|
-
-ms-overflow-style: none; /* hide scrollbar IE and Edge */
|
|
1157
|
-
scrollbar-width: none; /* hide scrollbar Firefox */
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
#mobile-header-container {
|
|
1161
|
-
display: flex;
|
|
1162
|
-
justify-content: space-between;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
#facets-container {
|
|
1166
|
-
position: relative;
|
|
1167
|
-
max-height: 0;
|
|
1168
|
-
transition: max-height 0.2s ease-in-out;
|
|
1169
|
-
z-index: 1;
|
|
1170
|
-
padding-bottom: 2rem;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
.mobile #facets-container {
|
|
1174
|
-
overflow: hidden;
|
|
1175
|
-
padding-bottom: 0;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
#facets-container.expanded {
|
|
1179
|
-
max-height: 2000px;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
#results-total {
|
|
1183
|
-
display: flex;
|
|
1184
|
-
align-items: center;
|
|
1185
|
-
margin-bottom: 5rem;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
.mobile #results-total {
|
|
1189
|
-
margin-bottom: 0;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
#big-results-count {
|
|
1193
|
-
font-size: 2.4rem;
|
|
1194
|
-
font-weight: 500;
|
|
1195
|
-
margin-right: 5px;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
#big-results-label {
|
|
1199
|
-
font-size: 1rem;
|
|
1200
|
-
font-weight: 200;
|
|
1201
|
-
text-transform: uppercase;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
#list-header {
|
|
1205
|
-
max-height: 4.2rem;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
.loading-cover {
|
|
1209
|
-
position: absolute;
|
|
1210
|
-
top: 0;
|
|
1211
|
-
left: 0;
|
|
1212
|
-
width: 100%;
|
|
1213
|
-
height: 100%;
|
|
1214
|
-
display: flex;
|
|
1215
|
-
justify-content: center;
|
|
1216
|
-
z-index: 1;
|
|
1217
|
-
padding-top: 50px;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
circular-activity-indicator {
|
|
1221
|
-
width: 30px;
|
|
1222
|
-
height: 30px;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
sort-filter-bar {
|
|
1226
|
-
display: block;
|
|
1227
|
-
margin-bottom: 4rem;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
infinite-scroller {
|
|
1231
|
-
display: block;
|
|
1232
|
-
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
1233
|
-
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
infinite-scroller.list-compact {
|
|
1237
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1238
|
-
--collectionBrowserCellMinWidth,
|
|
1239
|
-
100%
|
|
1240
|
-
);
|
|
1241
|
-
--infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
|
|
1242
|
-
--infiniteScrollerCellMaxHeight: 56px;
|
|
1243
|
-
--infiniteScrollerRowGap: 0px;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
infinite-scroller.list-detail {
|
|
1247
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1248
|
-
--collectionBrowserCellMinWidth,
|
|
1249
|
-
100%
|
|
1250
|
-
);
|
|
1251
|
-
--infiniteScrollerCellMinHeight: var(
|
|
1252
|
-
--collectionBrowserCellMinHeight,
|
|
1253
|
-
5rem
|
|
1254
|
-
);
|
|
1255
|
-
/*
|
|
1256
|
-
30px in spec, compensating for a -4px margin
|
|
1257
|
-
to align title with top of item image
|
|
1258
|
-
src/tiles/list/tile-list.ts
|
|
1259
|
-
*/
|
|
1260
|
-
--infiniteScrollerRowGap: 34px;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
.mobile infinite-scroller.list-detail {
|
|
1264
|
-
--infiniteScrollerRowGap: 24px;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
infinite-scroller.grid {
|
|
1268
|
-
--infiniteScrollerCellMinWidth: var(
|
|
1269
|
-
--collectionBrowserCellMinWidth,
|
|
1270
|
-
18rem
|
|
1271
|
-
);
|
|
1272
|
-
--infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
|
|
1273
|
-
--infiniteScrollerCellMinHeight: var(
|
|
1274
|
-
--collectionBrowserCellMinHeight,
|
|
1275
|
-
29rem
|
|
1276
|
-
);
|
|
1277
|
-
--infiniteScrollerCellMaxHeight: var(
|
|
1278
|
-
--collectionBrowserCellMaxHeight,
|
|
1279
|
-
29rem
|
|
1280
|
-
);
|
|
1281
|
-
}
|
|
1056
|
+
CollectionBrowser.styles = css `
|
|
1057
|
+
:host {
|
|
1058
|
+
display: block;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* When page width resizes from desktop to mobile, use this class to
|
|
1063
|
+
* disable expand/collapse transition when loading.
|
|
1064
|
+
*/
|
|
1065
|
+
.preload * {
|
|
1066
|
+
transition: none !important;
|
|
1067
|
+
-webkit-transition: none !important;
|
|
1068
|
+
-moz-transition: none !important;
|
|
1069
|
+
-ms-transition: none !important;
|
|
1070
|
+
-o-transition: none !important;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
#content-container {
|
|
1074
|
+
display: flex;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.collapser {
|
|
1078
|
+
display: inline-block;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.collapser svg {
|
|
1082
|
+
width: 10px;
|
|
1083
|
+
height: 10px;
|
|
1084
|
+
transition: transform 0.2s ease-out;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.collapser.open svg {
|
|
1088
|
+
transform: rotate(90deg);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
#mobile-filter-collapse h1 {
|
|
1092
|
+
cursor: pointer;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
#content-container.mobile {
|
|
1096
|
+
display: block;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.column {
|
|
1100
|
+
padding-top: 2rem;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
#right-column {
|
|
1104
|
+
flex: 1;
|
|
1105
|
+
position: relative;
|
|
1106
|
+
border-left: 1px solid rgb(232, 232, 232);
|
|
1107
|
+
padding-left: 1rem;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.mobile #right-column {
|
|
1111
|
+
border-left: none;
|
|
1112
|
+
padding: 0;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
#left-column {
|
|
1116
|
+
width: 18rem;
|
|
1117
|
+
min-width: 18rem; /* Prevents Safari from shrinking col at first draw */
|
|
1118
|
+
padding-right: 12px;
|
|
1119
|
+
padding-right: 1rem;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.desktop #left-column::-webkit-scrollbar {
|
|
1123
|
+
display: none;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.mobile #left-column {
|
|
1127
|
+
width: 100%;
|
|
1128
|
+
padding: 0;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.desktop #left-column {
|
|
1132
|
+
top: 0;
|
|
1133
|
+
position: sticky;
|
|
1134
|
+
max-height: 100vh;
|
|
1135
|
+
overflow: scroll;
|
|
1136
|
+
-ms-overflow-style: none; /* hide scrollbar IE and Edge */
|
|
1137
|
+
scrollbar-width: none; /* hide scrollbar Firefox */
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
#mobile-header-container {
|
|
1141
|
+
display: flex;
|
|
1142
|
+
justify-content: space-between;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
#facets-container {
|
|
1146
|
+
position: relative;
|
|
1147
|
+
max-height: 0;
|
|
1148
|
+
transition: max-height 0.2s ease-in-out;
|
|
1149
|
+
z-index: 1;
|
|
1150
|
+
padding-bottom: 2rem;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.mobile #facets-container {
|
|
1154
|
+
overflow: hidden;
|
|
1155
|
+
padding-bottom: 0;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
#facets-container.expanded {
|
|
1159
|
+
max-height: 2000px;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
#results-total {
|
|
1163
|
+
display: flex;
|
|
1164
|
+
align-items: center;
|
|
1165
|
+
margin-bottom: 5rem;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.mobile #results-total {
|
|
1169
|
+
margin-bottom: 0;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
#big-results-count {
|
|
1173
|
+
font-size: 2.4rem;
|
|
1174
|
+
font-weight: 500;
|
|
1175
|
+
margin-right: 5px;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
#big-results-label {
|
|
1179
|
+
font-size: 1rem;
|
|
1180
|
+
font-weight: 200;
|
|
1181
|
+
text-transform: uppercase;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
#list-header {
|
|
1185
|
+
max-height: 4.2rem;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.loading-cover {
|
|
1189
|
+
position: absolute;
|
|
1190
|
+
top: 0;
|
|
1191
|
+
left: 0;
|
|
1192
|
+
width: 100%;
|
|
1193
|
+
height: 100%;
|
|
1194
|
+
display: flex;
|
|
1195
|
+
justify-content: center;
|
|
1196
|
+
z-index: 1;
|
|
1197
|
+
padding-top: 50px;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
circular-activity-indicator {
|
|
1201
|
+
width: 30px;
|
|
1202
|
+
height: 30px;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
sort-filter-bar {
|
|
1206
|
+
display: block;
|
|
1207
|
+
margin-bottom: 4rem;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
infinite-scroller {
|
|
1211
|
+
display: block;
|
|
1212
|
+
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
1213
|
+
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
infinite-scroller.list-compact {
|
|
1217
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1218
|
+
--collectionBrowserCellMinWidth,
|
|
1219
|
+
100%
|
|
1220
|
+
);
|
|
1221
|
+
--infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
|
|
1222
|
+
--infiniteScrollerCellMaxHeight: 56px;
|
|
1223
|
+
--infiniteScrollerRowGap: 0px;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
infinite-scroller.list-detail {
|
|
1227
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1228
|
+
--collectionBrowserCellMinWidth,
|
|
1229
|
+
100%
|
|
1230
|
+
);
|
|
1231
|
+
--infiniteScrollerCellMinHeight: var(
|
|
1232
|
+
--collectionBrowserCellMinHeight,
|
|
1233
|
+
5rem
|
|
1234
|
+
);
|
|
1235
|
+
/*
|
|
1236
|
+
30px in spec, compensating for a -4px margin
|
|
1237
|
+
to align title with top of item image
|
|
1238
|
+
src/tiles/list/tile-list.ts
|
|
1239
|
+
*/
|
|
1240
|
+
--infiniteScrollerRowGap: 34px;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.mobile infinite-scroller.list-detail {
|
|
1244
|
+
--infiniteScrollerRowGap: 24px;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
infinite-scroller.grid {
|
|
1248
|
+
--infiniteScrollerCellMinWidth: var(
|
|
1249
|
+
--collectionBrowserCellMinWidth,
|
|
1250
|
+
18rem
|
|
1251
|
+
);
|
|
1252
|
+
--infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
|
|
1253
|
+
--infiniteScrollerCellMinHeight: var(
|
|
1254
|
+
--collectionBrowserCellMinHeight,
|
|
1255
|
+
29rem
|
|
1256
|
+
);
|
|
1257
|
+
--infiniteScrollerCellMaxHeight: var(
|
|
1258
|
+
--collectionBrowserCellMaxHeight,
|
|
1259
|
+
29rem
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1282
1262
|
`;
|
|
1283
1263
|
__decorate([
|
|
1284
1264
|
property({ type: String })
|