@internetarchive/collection-browser 0.4.18-alpha.6 → 0.4.19

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.
Files changed (63) hide show
  1. package/dist/src/collection-browser.d.ts +10 -9
  2. package/dist/src/collection-browser.js +331 -328
  3. package/dist/src/collection-browser.js.map +1 -1
  4. package/dist/src/collection-facets/facets-template.js +0 -2
  5. package/dist/src/collection-facets/facets-template.js.map +1 -1
  6. package/dist/src/collection-facets/more-facets-content.js +70 -63
  7. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  8. package/dist/src/collection-facets/more-facets-pagination.js +55 -49
  9. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
  10. package/dist/src/collection-facets/toggle-switch.js +56 -46
  11. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  12. package/dist/src/collection-facets.d.ts +1 -1
  13. package/dist/src/collection-facets.js +84 -94
  14. package/dist/src/collection-facets.js.map +1 -1
  15. package/dist/src/sort-filter-bar/alpha-bar.d.ts +1 -2
  16. package/dist/src/sort-filter-bar/alpha-bar.js +25 -33
  17. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  18. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
  19. package/dist/src/sort-filter-bar/sort-filter-bar.js +186 -198
  20. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  21. package/dist/src/tiles/grid/account-tile.js +1 -1
  22. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  23. package/dist/src/tiles/grid/collection-tile.js +2 -2
  24. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  25. package/dist/src/tiles/grid/item-tile.js +2 -2
  26. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  27. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +15 -5
  28. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  29. package/dist/src/tiles/grid/tile-stats.js +65 -58
  30. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  31. package/dist/src/tiles/tile-dispatcher.js +2 -3
  32. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  33. package/dist/test/collection-browser.test.js +2 -2
  34. package/dist/test/collection-browser.test.js.map +1 -1
  35. package/dist/test/collection-facets.test.js +5 -8
  36. package/dist/test/collection-facets.test.js.map +1 -1
  37. package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
  38. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  39. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
  40. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  41. package/package.json +5 -5
  42. package/src/collection-browser.ts +339 -330
  43. package/src/collection-facets/facets-template.ts +0 -2
  44. package/src/collection-facets/more-facets-content.ts +70 -63
  45. package/src/collection-facets/more-facets-pagination.ts +55 -49
  46. package/src/collection-facets/toggle-switch.ts +61 -51
  47. package/src/collection-facets.ts +85 -96
  48. package/src/sort-filter-bar/alpha-bar.ts +18 -26
  49. package/src/sort-filter-bar/sort-filter-bar.ts +186 -200
  50. package/src/tiles/grid/account-tile.ts +1 -1
  51. package/src/tiles/grid/collection-tile.ts +2 -2
  52. package/src/tiles/grid/item-tile.ts +2 -2
  53. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +15 -5
  54. package/src/tiles/grid/tile-stats.ts +73 -66
  55. package/src/tiles/tile-dispatcher.ts +0 -1
  56. package/test/collection-browser.test.ts +2 -2
  57. package/test/collection-facets.test.ts +2 -10
  58. package/test/sort-filter-bar/alpha-bar.test.ts +12 -16
  59. package/test/sort-filter-bar/sort-filter-bar.test.ts +2 -2
  60. package/dist/src/styles/sr-only.d.ts +0 -1
  61. package/dist/src/styles/sr-only.js +0 -18
  62. package/dist/src/styles/sr-only.js.map +0 -1
  63. package/src/styles/sr-only.ts +0 -18
@@ -16,7 +16,6 @@ import { RestorationStateHandler, } from './restoration-state-handler';
16
16
  import chevronIcon from './assets/img/icons/chevron';
17
17
  import './empty-placeholder';
18
18
  import { analyticsActions, analyticsCategories, } from './utils/analytics-events';
19
- import { srOnlyStyle } from './styles/sr-only';
20
19
  let CollectionBrowser = class CollectionBrowser extends LitElement {
21
20
  constructor() {
22
21
  super(...arguments);
@@ -250,9 +249,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
250
249
  class="column${this.isResizeToMobile ? ' preload' : ''}"
251
250
  >
252
251
  <div id="mobile-header-container">
253
- ${this.mobileView
254
- ? this.mobileFacetsTemplate
255
- : html `<h2 id="facets-header" class="sr-only">Filters</h2>`}
252
+ ${this.mobileView ? this.mobileFacetsTemplate : nothing}
256
253
  <div id="results-total">
257
254
  <span id="big-results-count">
258
255
  ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
@@ -262,12 +259,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
262
259
  </span>
263
260
  </div>
264
261
  </div>
265
- ${this.mobileView
266
- ? nothing
267
- : html `<div id="facets-container" aria-labelledby="facets-header">
268
- ${this.facetsTemplate}
269
- <div id="facets-scroll-sentinel"></div>
270
- </div>`}
262
+ <div
263
+ id="facets-container"
264
+ class=${!this.mobileView || this.mobileFacetsVisible
265
+ ? 'expanded'
266
+ : ''}
267
+ >
268
+ ${this.facetsTemplate}
269
+ <div id="facets-scroll-sentinel"></div>
270
+ </div>
271
271
  ${this.mobileView ? nothing : html `<div id="facets-bottom-fade"></div>`}
272
272
  </div>
273
273
  <div id="right-column" class="column">
@@ -282,7 +282,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
282
282
  return html `<infinite-scroller
283
283
  class=${this.infiniteScrollerClasses}
284
284
  itemCount=${this.placeholderType ? 0 : nothing}
285
- ariaLandmarkLabel="Search results"
286
285
  .cellProvider=${this}
287
286
  .placeholderCellTemplate=${this.placeholderCellTemplate}
288
287
  @scrollThresholdReached=${this.scrollThresholdReached}
@@ -426,32 +425,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
426
425
  this.selectedTitleFilter = null;
427
426
  this.selectedCreatorFilter = e.detail.selectedLetter;
428
427
  }
429
- /**
430
- * The full template for how the facets should be structured in mobile view,
431
- * including the collapsible container (with header) and the facets themselves.
432
- */
433
428
  get mobileFacetsTemplate() {
434
- const toggleFacetsVisible = () => {
429
+ return html `
430
+ <div id="mobile-filter-collapse">
431
+ <h1
432
+ @click=${() => {
435
433
  this.isResizeToMobile = false;
436
434
  this.mobileFacetsVisible = !this.mobileFacetsVisible;
437
- };
438
- return html `
439
- <details
440
- id="mobile-filter-collapse"
441
- @click=${toggleFacetsVisible}
442
- @keyup=${toggleFacetsVisible}
443
- >
444
- <summary>
445
- <span class="collapser-icon">${chevronIcon}</span>
446
- <h2>Filters</h2>
447
- </summary>
448
- ${this.facetsTemplate}
449
- </details>
435
+ }}
436
+ @keyup=${() => {
437
+ this.isResizeToMobile = false;
438
+ this.mobileFacetsVisible = !this.mobileFacetsVisible;
439
+ }}
440
+ >
441
+ <span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
442
+ ${chevronIcon}
443
+ </span>
444
+ Filters
445
+ </h1>
446
+ </div>
450
447
  `;
451
448
  }
452
- /**
453
- * The template for the facets component alone, without any surrounding wrappers.
454
- */
455
449
  get facetsTemplate() {
456
450
  return html `
457
451
  <collection-facets
@@ -717,7 +711,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
717
711
  this.dispatchEvent(event);
718
712
  }
719
713
  async handleQueryChange() {
720
- var _a;
721
714
  // only reset if the query has actually changed
722
715
  if (!this.searchService || this.pageFetchQueryKey === this.previousQueryKey)
723
716
  return;
@@ -728,11 +721,17 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
728
721
  this.fullYearsHistogramAggregation = undefined;
729
722
  this.pageFetchesInProgress = {};
730
723
  this.endOfDataReached = false;
731
- this.pagesToRender = this.initialPageNumber;
724
+ this.pagesToRender =
725
+ this.initialPageNumber === 1
726
+ ? 2 // First two pages are batched into one request when starting from page 1
727
+ : this.initialPageNumber;
732
728
  this.queryErrorMessage = undefined;
733
729
  // Reset the infinite scroller's item count, so that it
734
730
  // shows tile placeholders until the new query's results load in
735
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.reload();
731
+ if (this.infiniteScroller) {
732
+ this.infiniteScroller.itemCount = this.estimatedTileCount;
733
+ this.infiniteScroller.reload();
734
+ }
736
735
  if (!this.initialQueryChangeHappened && this.initialPageNumber > 1) {
737
736
  this.scrollToPage(this.initialPageNumber);
738
737
  }
@@ -797,7 +796,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
797
796
  }
798
797
  async doInitialPageFetch() {
799
798
  this.searchResultsLoading = true;
800
- await this.fetchPage(this.initialPageNumber);
799
+ // Try to batch 2 initial page requests when possible
800
+ await this.fetchPage(this.initialPageNumber, 2);
801
801
  this.searchResultsLoading = false;
802
802
  }
803
803
  emitSearchResultsLoadingChanged() {
@@ -1054,7 +1054,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1054
1054
  get facetFetchQueryKey() {
1055
1055
  return `${this.fullQuery}-${this.searchType}`;
1056
1056
  }
1057
- async fetchPage(pageNumber) {
1057
+ /**
1058
+ * Fetches one or more pages of results and updates the data source.
1059
+ *
1060
+ * @param pageNumber The page number to fetch
1061
+ * @param numInitialPages If this is an initial page fetch (`pageNumber = 1`),
1062
+ * specifies how many pages to batch together in one request. Ignored
1063
+ * if `pageNumber != 1`, defaulting to a single page.
1064
+ */
1065
+ async fetchPage(pageNumber, numInitialPages = 1) {
1058
1066
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1059
1067
  const trimmedQuery = (_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim();
1060
1068
  if (!trimmedQuery)
@@ -1066,18 +1074,24 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1066
1074
  return;
1067
1075
  if (this.endOfDataReached)
1068
1076
  return;
1077
+ // Batch multiple initial page requests together if needed (e.g., can request
1078
+ // pages 1 and 2 together in a single request).
1079
+ const numPages = pageNumber === 1 ? numInitialPages : 1;
1080
+ const numRows = this.pageSize * numPages;
1069
1081
  // if a fetch is already in progress for this query and page, don't fetch again
1070
1082
  const { pageFetchQueryKey } = this;
1071
1083
  const pageFetches = (_b = this.pageFetchesInProgress[pageFetchQueryKey]) !== null && _b !== void 0 ? _b : new Set();
1072
1084
  if (pageFetches.has(pageNumber))
1073
1085
  return;
1074
- pageFetches.add(pageNumber);
1086
+ for (let i = 0; i < numPages; i += 1) {
1087
+ pageFetches.add(pageNumber + i);
1088
+ }
1075
1089
  this.pageFetchesInProgress[pageFetchQueryKey] = pageFetches;
1076
1090
  const sortParams = this.sortParam ? [this.sortParam] : [];
1077
1091
  const params = {
1078
1092
  query: trimmedQuery,
1079
1093
  page: pageNumber,
1080
- rows: this.pageSize,
1094
+ rows: numRows,
1081
1095
  sort: sortParams,
1082
1096
  filters: this.filterMap,
1083
1097
  aggregations: { omit: true },
@@ -1100,20 +1114,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1100
1114
  // @ts-ignore: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
1101
1115
  (_g = (_f = window === null || window === void 0 ? void 0 : window.Sentry) === null || _f === void 0 ? void 0 : _f.captureMessage) === null || _g === void 0 ? void 0 : _g.call(_f, this.queryErrorMessage, 'error');
1102
1116
  }
1103
- (_h = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _h === void 0 ? void 0 : _h.delete(pageNumber);
1117
+ for (let i = 0; i < numPages; i += 1) {
1118
+ (_h = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _h === void 0 ? void 0 : _h.delete(pageNumber + i);
1119
+ }
1104
1120
  this.searchResultsLoading = false;
1105
1121
  return;
1106
1122
  }
1107
1123
  this.totalResults = success.response.totalResults;
1108
1124
  const { results, collectionTitles } = success.response;
1109
1125
  if (results && results.length > 0) {
1126
+ // Load any collection titles present on the response into the cache,
1127
+ // or queue up preload fetches for them if none were present.
1110
1128
  if (collectionTitles) {
1111
1129
  (_j = this.collectionNameCache) === null || _j === void 0 ? void 0 : _j.addKnownTitles(collectionTitles);
1112
1130
  }
1113
1131
  else {
1114
1132
  this.preloadCollectionNames(results);
1115
1133
  }
1116
- this.updateDataSource(pageNumber, results);
1134
+ // Update the data source for each returned page
1135
+ for (let i = 0; i < numPages; i += 1) {
1136
+ const pageStartIndex = this.pageSize * i;
1137
+ this.updateDataSource(pageNumber + i, results.slice(pageStartIndex, pageStartIndex + this.pageSize));
1138
+ }
1117
1139
  }
1118
1140
  // When we reach the end of the data, we can set the infinite scroller's
1119
1141
  // item count to the real total number of results (rather than the
@@ -1124,7 +1146,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1124
1146
  this.infiniteScroller.itemCount = this.totalResults;
1125
1147
  }
1126
1148
  }
1127
- (_k = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _k === void 0 ? void 0 : _k.delete(pageNumber);
1149
+ for (let i = 0; i < numPages; i += 1) {
1150
+ (_k = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _k === void 0 ? void 0 : _k.delete(pageNumber + i);
1151
+ }
1128
1152
  }
1129
1153
  preloadCollectionNames(results) {
1130
1154
  var _a;
@@ -1330,330 +1354,309 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1330
1354
  this.fetchPage(this.pagesToRender);
1331
1355
  }
1332
1356
  }
1333
- static get styles() {
1334
- return [
1335
- srOnlyStyle,
1336
- css `
1337
- :host {
1338
- display: block;
1339
-
1340
- --leftColumnWidth: 18rem;
1341
- --leftColumnPaddingRight: 2.5rem;
1342
- }
1343
-
1344
- /**
1345
- * When page width resizes from desktop to mobile, use this class to
1346
- * disable expand/collapse transition when loading.
1347
- */
1348
- .preload * {
1349
- transition: none !important;
1350
- -webkit-transition: none !important;
1351
- -moz-transition: none !important;
1352
- -ms-transition: none !important;
1353
- -o-transition: none !important;
1354
- }
1357
+ };
1358
+ CollectionBrowser.styles = css `
1359
+ :host {
1360
+ display: block;
1355
1361
 
1356
- #content-container {
1357
- display: flex;
1358
- }
1362
+ --leftColumnWidth: 18rem;
1363
+ --leftColumnPaddingRight: 2.5rem;
1364
+ }
1359
1365
 
1360
- .collapser-icon {
1361
- display: inline-block;
1362
- }
1366
+ /**
1367
+ * When page width resizes from desktop to mobile, use this class to
1368
+ * disable expand/collapse transition when loading.
1369
+ */
1370
+ .preload * {
1371
+ transition: none !important;
1372
+ -webkit-transition: none !important;
1373
+ -moz-transition: none !important;
1374
+ -ms-transition: none !important;
1375
+ -o-transition: none !important;
1376
+ }
1363
1377
 
1364
- .collapser-icon svg {
1365
- display: inline-block;
1366
- width: 12px;
1367
- height: 12px;
1368
- transition: transform 0.2s ease-out;
1369
- }
1378
+ #content-container {
1379
+ display: flex;
1380
+ }
1370
1381
 
1371
- #mobile-filter-collapse > summary {
1372
- cursor: pointer;
1373
- list-style: none;
1374
- }
1382
+ .collapser {
1383
+ display: inline-block;
1384
+ }
1375
1385
 
1376
- #mobile-filter-collapse[open] > summary {
1377
- margin-bottom: 10px;
1378
- }
1386
+ .collapser svg {
1387
+ width: 10px;
1388
+ height: 10px;
1389
+ transition: transform 0.2s ease-out;
1390
+ }
1379
1391
 
1380
- #mobile-filter-collapse h2 {
1381
- display: inline-block;
1382
- margin: 0;
1383
- font-size: 2rem;
1384
- }
1392
+ .collapser.open svg {
1393
+ transform: rotate(90deg);
1394
+ }
1385
1395
 
1386
- #mobile-filter-collapse[open] svg {
1387
- transform: rotate(90deg);
1388
- }
1396
+ #mobile-filter-collapse h1 {
1397
+ cursor: pointer;
1398
+ }
1389
1399
 
1390
- #content-container.mobile {
1391
- display: block;
1392
- }
1400
+ #content-container.mobile {
1401
+ display: block;
1402
+ }
1393
1403
 
1394
- .column {
1395
- padding-top: 2rem;
1396
- }
1404
+ .column {
1405
+ padding-top: 2rem;
1406
+ }
1397
1407
 
1398
- #right-column {
1399
- flex: 1;
1400
- position: relative;
1401
- border-left: 1px solid rgb(232, 232, 232);
1402
- border-right: 1px solid rgb(232, 232, 232);
1403
- padding-left: 1rem;
1404
- padding-right: 1rem;
1405
- background: #fff;
1406
- }
1408
+ #right-column {
1409
+ flex: 1;
1410
+ position: relative;
1411
+ border-left: 1px solid rgb(232, 232, 232);
1412
+ border-right: 1px solid rgb(232, 232, 232);
1413
+ padding-left: 1rem;
1414
+ padding-right: 1rem;
1415
+ background: #fff;
1416
+ }
1407
1417
 
1408
- .mobile #right-column {
1409
- border-left: none;
1410
- padding: 5px 5px 0;
1411
- }
1418
+ .mobile #right-column {
1419
+ border-left: none;
1420
+ padding: 5px 5px 0;
1421
+ }
1412
1422
 
1413
- #left-column {
1414
- width: var(--leftColumnWidth, 18rem);
1415
- /* Prevents Safari from shrinking col at first draw */
1416
- min-width: var(--leftColumnWidth, 18rem);
1417
- padding-top: 0;
1418
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1419
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1420
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1421
- z-index: 1;
1422
- }
1423
+ #left-column {
1424
+ width: var(--leftColumnWidth, 18rem);
1425
+ /* Prevents Safari from shrinking col at first draw */
1426
+ min-width: var(--leftColumnWidth, 18rem);
1427
+ padding-top: 0;
1428
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1429
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1430
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1431
+ z-index: 1;
1432
+ }
1423
1433
 
1424
- .desktop #left-column {
1425
- top: 0;
1426
- position: sticky;
1427
- height: calc(100vh - 2rem);
1428
- max-height: calc(100vh - 2rem);
1429
- overflow-x: hidden;
1430
- overflow-y: scroll;
1434
+ .desktop #left-column {
1435
+ top: 0;
1436
+ position: sticky;
1437
+ height: calc(100vh - 2rem);
1438
+ max-height: calc(100vh - 2rem);
1439
+ overflow-x: hidden;
1440
+ overflow-y: scroll;
1431
1441
 
1432
- /*
1433
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1434
- * does at least give us a tiny bit of control over width & color.
1435
- */
1436
- scrollbar-width: thin;
1437
- scrollbar-color: transparent transparent;
1438
- }
1439
- .desktop #left-column:hover {
1440
- scrollbar-color: auto;
1441
- }
1442
- .desktop #left-column::-webkit-scrollbar {
1443
- appearance: none;
1444
- width: 6px;
1445
- }
1446
- .desktop #left-column::-webkit-scrollbar-button {
1447
- height: 3px;
1448
- background: transparent;
1449
- }
1450
- .desktop #left-column::-webkit-scrollbar-corner {
1451
- background: transparent;
1452
- }
1453
- .desktop #left-column::-webkit-scrollbar-thumb {
1454
- border-radius: 4px;
1455
- }
1456
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
1457
- background: rgba(0, 0, 0, 0.15);
1458
- }
1459
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
1460
- background: rgba(0, 0, 0, 0.2);
1461
- }
1462
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
1463
- background: rgba(0, 0, 0, 0.3);
1464
- }
1442
+ /*
1443
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1444
+ * does at least give us a tiny bit of control over width & color.
1445
+ */
1446
+ scrollbar-width: thin;
1447
+ scrollbar-color: transparent transparent;
1448
+ }
1449
+ .desktop #left-column:hover {
1450
+ scrollbar-color: auto;
1451
+ }
1452
+ .desktop #left-column::-webkit-scrollbar {
1453
+ appearance: none;
1454
+ width: 6px;
1455
+ }
1456
+ .desktop #left-column::-webkit-scrollbar-button {
1457
+ height: 3px;
1458
+ background: transparent;
1459
+ }
1460
+ .desktop #left-column::-webkit-scrollbar-corner {
1461
+ background: transparent;
1462
+ }
1463
+ .desktop #left-column::-webkit-scrollbar-thumb {
1464
+ border-radius: 4px;
1465
+ }
1466
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
1467
+ background: rgba(0, 0, 0, 0.15);
1468
+ }
1469
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
1470
+ background: rgba(0, 0, 0, 0.2);
1471
+ }
1472
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
1473
+ background: rgba(0, 0, 0, 0.3);
1474
+ }
1465
1475
 
1466
- #facets-bottom-fade {
1467
- background: linear-gradient(
1468
- to bottom,
1469
- #f5f5f700 0%,
1470
- #f5f5f7c0 50%,
1471
- #f5f5f7 80%,
1472
- #f5f5f7 100%
1473
- );
1474
- position: fixed;
1475
- bottom: 0;
1476
- height: 50px;
1477
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
1478
- width: calc(
1479
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
1480
- );
1481
- z-index: 2;
1482
- pointer-events: none;
1483
- transition: height 0.1s ease;
1484
- }
1485
- #facets-bottom-fade.hidden {
1486
- height: 0;
1487
- }
1476
+ #facets-bottom-fade {
1477
+ background: linear-gradient(
1478
+ to bottom,
1479
+ #f5f5f700 0%,
1480
+ #f5f5f7c0 50%,
1481
+ #f5f5f7 80%,
1482
+ #f5f5f7 100%
1483
+ );
1484
+ position: fixed;
1485
+ bottom: 0;
1486
+ height: 50px;
1487
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
1488
+ width: calc(
1489
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
1490
+ );
1491
+ z-index: 2;
1492
+ pointer-events: none;
1493
+ transition: height 0.1s ease;
1494
+ }
1495
+ #facets-bottom-fade.hidden {
1496
+ height: 0;
1497
+ }
1488
1498
 
1489
- .desktop #left-column-scroll-sentinel {
1490
- width: 1px;
1491
- height: 100vh;
1492
- background: transparent;
1493
- }
1499
+ .desktop #left-column-scroll-sentinel {
1500
+ width: 1px;
1501
+ height: 100vh;
1502
+ background: transparent;
1503
+ }
1494
1504
 
1495
- .desktop #facets-scroll-sentinel {
1496
- width: 1px;
1497
- height: 1px;
1498
- background: transparent;
1499
- }
1505
+ .desktop #facets-scroll-sentinel {
1506
+ width: 1px;
1507
+ height: 1px;
1508
+ background: transparent;
1509
+ }
1500
1510
 
1501
- .mobile #left-column {
1502
- width: 100%;
1503
- padding: 0;
1504
- }
1511
+ .mobile #left-column {
1512
+ width: 100%;
1513
+ padding: 0;
1514
+ }
1505
1515
 
1506
- #mobile-header-container {
1507
- display: flex;
1508
- justify-content: space-between;
1509
- align-items: flex-start;
1510
- margin: 10px 0;
1511
- }
1516
+ #mobile-header-container {
1517
+ display: flex;
1518
+ justify-content: space-between;
1519
+ align-items: center;
1520
+ }
1512
1521
 
1513
- .desktop #mobile-header-container {
1514
- padding-top: 2rem;
1515
- }
1522
+ .desktop #mobile-header-container {
1523
+ padding-top: 2rem;
1524
+ }
1516
1525
 
1517
- #facets-container {
1518
- position: relative;
1519
- max-height: 0;
1520
- transition: max-height 0.2s ease-in-out;
1521
- z-index: 1;
1522
- padding-bottom: 2rem;
1523
- }
1526
+ #facets-container {
1527
+ position: relative;
1528
+ max-height: 0;
1529
+ transition: max-height 0.2s ease-in-out;
1530
+ z-index: 1;
1531
+ padding-bottom: 2rem;
1532
+ }
1524
1533
 
1525
- .mobile #facets-container {
1526
- overflow: hidden;
1527
- padding-bottom: 0;
1528
- padding-left: 10px;
1529
- padding-right: 10px;
1530
- }
1534
+ .mobile #facets-container {
1535
+ overflow: hidden;
1536
+ padding-bottom: 0;
1537
+ padding-left: 10px;
1538
+ padding-right: 10px;
1539
+ }
1531
1540
 
1532
- #facets-container.expanded {
1533
- max-height: 2000px;
1534
- }
1541
+ #facets-container.expanded {
1542
+ max-height: 2000px;
1543
+ }
1535
1544
 
1536
- #results-total {
1537
- display: flex;
1538
- align-items: baseline;
1539
- margin-bottom: 5rem;
1540
- }
1545
+ #results-total {
1546
+ display: flex;
1547
+ align-items: baseline;
1548
+ margin-bottom: 5rem;
1549
+ }
1541
1550
 
1542
- .mobile #results-total {
1543
- margin-bottom: 0;
1544
- }
1551
+ .mobile #results-total {
1552
+ margin-bottom: 0;
1553
+ }
1545
1554
 
1546
- #big-results-count {
1547
- font-size: 2.4rem;
1548
- font-weight: 500;
1549
- margin-right: 5px;
1550
- }
1555
+ #big-results-count {
1556
+ font-size: 2.4rem;
1557
+ font-weight: 500;
1558
+ margin-right: 5px;
1559
+ }
1551
1560
 
1552
- #big-results-label {
1553
- font-size: 1.4rem;
1554
- font-weight: 200;
1555
- }
1561
+ #big-results-label {
1562
+ font-size: 1.4rem;
1563
+ font-weight: 200;
1564
+ }
1556
1565
 
1557
- #list-header {
1558
- max-height: 4.2rem;
1559
- }
1566
+ #list-header {
1567
+ max-height: 4.2rem;
1568
+ }
1560
1569
 
1561
- .loading-cover {
1562
- position: absolute;
1563
- top: 0;
1564
- left: 0;
1565
- width: 100%;
1566
- height: 100%;
1567
- display: flex;
1568
- justify-content: center;
1569
- z-index: 1;
1570
- padding-top: 50px;
1571
- }
1570
+ .loading-cover {
1571
+ position: absolute;
1572
+ top: 0;
1573
+ left: 0;
1574
+ width: 100%;
1575
+ height: 100%;
1576
+ display: flex;
1577
+ justify-content: center;
1578
+ z-index: 1;
1579
+ padding-top: 50px;
1580
+ }
1572
1581
 
1573
- circular-activity-indicator {
1574
- width: 30px;
1575
- height: 30px;
1576
- }
1582
+ circular-activity-indicator {
1583
+ width: 30px;
1584
+ height: 30px;
1585
+ }
1577
1586
 
1578
- sort-filter-bar {
1579
- display: block;
1580
- margin-bottom: 4rem;
1581
- }
1587
+ sort-filter-bar {
1588
+ display: block;
1589
+ margin-bottom: 4rem;
1590
+ }
1582
1591
 
1583
- infinite-scroller {
1584
- display: block;
1585
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1586
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1587
- }
1592
+ infinite-scroller {
1593
+ display: block;
1594
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1595
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1596
+ }
1588
1597
 
1589
- infinite-scroller.list-compact {
1590
- --infiniteScrollerCellMinWidth: var(
1591
- --collectionBrowserCellMinWidth,
1592
- 100%
1593
- );
1594
- --infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
1595
- --infiniteScrollerCellMaxHeight: 56px;
1596
- --infiniteScrollerRowGap: 0px;
1597
- }
1598
+ infinite-scroller.list-compact {
1599
+ --infiniteScrollerCellMinWidth: var(
1600
+ --collectionBrowserCellMinWidth,
1601
+ 100%
1602
+ );
1603
+ --infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
1604
+ --infiniteScrollerCellMaxHeight: 56px;
1605
+ --infiniteScrollerRowGap: 0px;
1606
+ }
1598
1607
 
1599
- infinite-scroller.list-detail {
1600
- --infiniteScrollerCellMinWidth: var(
1601
- --collectionBrowserCellMinWidth,
1602
- 100%
1603
- );
1604
- --infiniteScrollerCellMinHeight: var(
1605
- --collectionBrowserCellMinHeight,
1606
- 5rem
1607
- );
1608
- /*
1609
- 30px in spec, compensating for a -4px margin
1610
- to align title with top of item image
1611
- src/tiles/list/tile-list.ts
1612
- */
1613
- --infiniteScrollerRowGap: 34px;
1614
- }
1608
+ infinite-scroller.list-detail {
1609
+ --infiniteScrollerCellMinWidth: var(
1610
+ --collectionBrowserCellMinWidth,
1611
+ 100%
1612
+ );
1613
+ --infiniteScrollerCellMinHeight: var(
1614
+ --collectionBrowserCellMinHeight,
1615
+ 5rem
1616
+ );
1617
+ /*
1618
+ 30px in spec, compensating for a -4px margin
1619
+ to align title with top of item image
1620
+ src/tiles/list/tile-list.ts
1621
+ */
1622
+ --infiniteScrollerRowGap: 34px;
1623
+ }
1615
1624
 
1616
- .mobile infinite-scroller.list-detail {
1617
- --infiniteScrollerRowGap: 24px;
1618
- }
1625
+ .mobile infinite-scroller.list-detail {
1626
+ --infiniteScrollerRowGap: 24px;
1627
+ }
1619
1628
 
1620
- infinite-scroller.grid {
1621
- --infiniteScrollerCellMinWidth: var(
1622
- --collectionBrowserCellMinWidth,
1623
- 17rem
1624
- );
1625
- --infiniteScrollerCellMaxWidth: var(
1626
- --collectionBrowserCellMaxWidth,
1627
- 1fr
1628
- );
1629
- }
1629
+ infinite-scroller.grid {
1630
+ --infiniteScrollerCellMinWidth: var(
1631
+ --collectionBrowserCellMinWidth,
1632
+ 17rem
1633
+ );
1634
+ --infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
1635
+ }
1630
1636
 
1631
- /* Allow tiles to shrink a bit further at smaller viewport widths */
1632
- @media screen and (max-width: 880px) {
1633
- infinite-scroller.grid {
1634
- --infiniteScrollerCellMinWidth: var(
1635
- --collectionBrowserCellMinWidth,
1636
- 15rem
1637
- );
1638
- }
1639
- }
1640
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
1641
- @media screen and (max-width: 360px) {
1642
- infinite-scroller.grid {
1643
- --infiniteScrollerCellMinWidth: var(
1644
- --collectionBrowserCellMinWidth,
1645
- 12rem
1646
- );
1647
- }
1648
- }
1637
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
1638
+ @media screen and (max-width: 880px) {
1639
+ infinite-scroller.grid {
1640
+ --infiniteScrollerCellMinWidth: var(
1641
+ --collectionBrowserCellMinWidth,
1642
+ 15rem
1643
+ );
1644
+ }
1645
+ }
1646
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
1647
+ @media screen and (max-width: 360px) {
1648
+ infinite-scroller.grid {
1649
+ --infiniteScrollerCellMinWidth: var(
1650
+ --collectionBrowserCellMinWidth,
1651
+ 12rem
1652
+ );
1653
+ }
1654
+ }
1649
1655
 
1650
- infinite-scroller.hidden {
1651
- display: none;
1652
- }
1653
- `,
1654
- ];
1655
- }
1656
- };
1656
+ infinite-scroller.hidden {
1657
+ display: none;
1658
+ }
1659
+ `;
1657
1660
  __decorate([
1658
1661
  property({ type: String })
1659
1662
  ], CollectionBrowser.prototype, "baseNavigationUrl", void 0);