@internetarchive/collection-browser 2.20.1-alpha-webdev7822.0 → 2.21.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.
@@ -358,32 +358,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
358
358
  this.setPlaceholderType();
359
359
  }
360
360
  render() {
361
- return html `
361
+ return html `
362
362
  ${this.showSmartFacetBar && this.placeholderType === null
363
- ? html `<smart-facet-bar
364
- .query=${this.baseQuery}
365
- .aggregations=${this.dataSource.aggregations}
366
- .selectedFacets=${this.selectedFacets}
367
- .collectionTitles=${this.dataSource.collectionTitles}
368
- .filterToggleShown=${!this.mobileView}
369
- .filterToggleActive=${this.facetPaneVisible}
370
- .label=${this.smartFacetBarLabel}
371
- @facetsChanged=${this.facetsChanged}
363
+ ? html `<smart-facet-bar
364
+ .query=${this.baseQuery}
365
+ .aggregations=${this.dataSource.aggregations}
366
+ .selectedFacets=${this.selectedFacets}
367
+ .collectionTitles=${this.dataSource.collectionTitles}
368
+ .filterToggleShown=${!this.mobileView}
369
+ .filterToggleActive=${this.facetPaneVisible}
370
+ .label=${this.smartFacetBarLabel}
371
+ @facetsChanged=${this.facetsChanged}
372
372
  @filtersToggled=${() => {
373
373
  this.facetPaneVisible = !this.facetPaneVisible;
374
374
  this.emitFacetPaneVisibilityChanged();
375
- }}
375
+ }}
376
376
  ></smart-facet-bar>`
377
- : nothing}
378
-
379
- <div
380
- id="content-container"
381
- class=${this.mobileView ? 'mobile' : 'desktop'}
382
- >
377
+ : nothing}
378
+
379
+ <div
380
+ id="content-container"
381
+ class=${this.mobileView ? 'mobile' : 'desktop'}
382
+ >
383
383
  ${this.placeholderType
384
384
  ? this.emptyPlaceholderTemplate
385
- : this.collectionBrowserTemplate}
386
- </div>
385
+ : this.collectionBrowserTemplate}
386
+ </div>
387
387
  `;
388
388
  }
389
389
  /**
@@ -396,6 +396,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
396
396
  */
397
397
  setPlaceholderType() {
398
398
  var _a;
399
+ const isInitialized = this.dataSource.queryInitialized;
399
400
  const hasQuery = !!((_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim());
400
401
  const isCollection = !!this.withinCollection;
401
402
  const isProfile = !!this.withinProfile;
@@ -404,7 +405,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
404
405
  this.placeholderType = null;
405
406
  if (this.suppressPlaceholders)
406
407
  return;
407
- if (!hasQuery && !isCollection && !isProfile) {
408
+ if (!isInitialized) {
409
+ this.placeholderType = 'empty-query';
410
+ }
411
+ else if (!hasQuery && !isCollection && !isProfile) {
408
412
  this.placeholderType = 'empty-query';
409
413
  }
410
414
  else if (noResults) {
@@ -423,23 +427,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
423
427
  */
424
428
  get emptyPlaceholderTemplate() {
425
429
  var _a;
426
- return html `
427
- <empty-placeholder
428
- .placeholderType=${this.placeholderType}
429
- ?isMobileView=${this.mobileView}
430
- ?isCollection=${!!this.withinCollection}
431
- .detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
432
- .baseNavigationUrl=${this.baseNavigationUrl}
433
- ></empty-placeholder>
430
+ return html `
431
+ <empty-placeholder
432
+ .placeholderType=${this.placeholderType}
433
+ ?isMobileView=${this.mobileView}
434
+ ?isCollection=${!!this.withinCollection}
435
+ .detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
436
+ .baseNavigationUrl=${this.baseNavigationUrl}
437
+ ></empty-placeholder>
434
438
  `;
435
439
  }
436
440
  /**
437
441
  * Top-level template for rendering the left (facets) and right (results) columns.
438
442
  */
439
443
  get collectionBrowserTemplate() {
440
- return html `
441
- <div id="left-column-scroll-sentinel"></div>
442
- ${this.leftColumnTemplate} ${this.rightColumnTemplate}
444
+ return html `
445
+ <div id="left-column-scroll-sentinel"></div>
446
+ ${this.leftColumnTemplate} ${this.rightColumnTemplate}
443
447
  `;
444
448
  }
445
449
  /**
@@ -458,33 +462,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
458
462
  * accordion-style facets.
459
463
  */
460
464
  get mobileLeftColumnTemplate() {
461
- return html `
462
- <div
463
- id="left-column"
464
- class="column${this.isResizeToMobile ? ' preload' : ''}"
465
- >
466
- ${this.facetTopViewSlot} ${this.resultsCountTemplate}
467
- <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
468
- </div>
465
+ return html `
466
+ <div
467
+ id="left-column"
468
+ class="column${this.isResizeToMobile ? ' preload' : ''}"
469
+ >
470
+ ${this.facetTopViewSlot} ${this.resultsCountTemplate}
471
+ <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
472
+ </div>
469
473
  `;
470
474
  }
471
475
  /**
472
476
  * Template for the desktop version of the left column, displaying the facets sidebar.
473
477
  */
474
478
  get desktopLeftColumnTemplate() {
475
- return html `
476
- <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
477
- ${this.facetTopViewSlot}
478
- <div id="facets-header-container">
479
- <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
480
- ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
481
- </div>
482
- <div id="facets-container" aria-labelledby="facets-header">
483
- ${this.facetsTemplate}
484
- <div id="facets-scroll-sentinel"></div>
485
- </div>
486
- <div id="facets-bottom-fade"></div>
487
- </div>
479
+ return html `
480
+ <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
481
+ ${this.facetTopViewSlot}
482
+ <div id="facets-header-container">
483
+ <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
484
+ ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
485
+ </div>
486
+ <div id="facets-container" aria-labelledby="facets-header">
487
+ ${this.facetsTemplate}
488
+ <div id="facets-scroll-sentinel"></div>
489
+ </div>
490
+ <div id="facets-bottom-fade"></div>
491
+ </div>
488
492
  `;
489
493
  }
490
494
  /**
@@ -492,8 +496,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
492
496
  * - mainly used to render userlists
493
497
  */
494
498
  get facetTopViewSlot() {
495
- return html `<div id="facet-top-view">
496
- <slot name="facet-top-slot"></slot>
499
+ return html `<div id="facet-top-view">
500
+ <slot name="facet-top-slot"></slot>
497
501
  </div>`;
498
502
  }
499
503
  /**
@@ -508,15 +512,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
508
512
  const resultsCount = (_a = this.totalResults) === null || _a === void 0 ? void 0 : _a.toLocaleString();
509
513
  const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
510
514
  // Added data-testid for Playwright testing
511
- return html `
512
- <div id="results-total" data-testid="results-total">
513
- <span id="big-results-count">
514
- ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
515
- </span>
516
- <span id="big-results-label">
517
- ${shouldShowSearching ? nothing : resultsLabel}
518
- </span>
519
- </div>
515
+ return html `
516
+ <div id="results-total" data-testid="results-total">
517
+ <span id="big-results-count">
518
+ ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
519
+ </span>
520
+ <span id="big-results-label">
521
+ ${shouldShowSearching ? nothing : resultsLabel}
522
+ </span>
523
+ </div>
520
524
  `;
521
525
  }
522
526
  /**
@@ -530,47 +534,47 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
530
534
  'full-width': !this.facetPaneVisible,
531
535
  'smart-results-spacing': !!this.showSmartResults,
532
536
  });
533
- return html `
534
- <div id="right-column" class=${rightColumnClasses}>
537
+ return html `
538
+ <div id="right-column" class=${rightColumnClasses}>
535
539
  ${this.showSmartResults
536
540
  ? html `<slot name="smart-results"></slot>`
537
- : nothing}
538
- <section id="results">
541
+ : nothing}
542
+ <section id="results">
539
543
  ${this.showSmartResults
540
- ? html `<h2 class="results-section-heading">
541
- ${(_a = this.resultsHeader) !== null && _a !== void 0 ? _a : msg('All results')}
544
+ ? html `<h2 class="results-section-heading">
545
+ ${(_a = this.resultsHeader) !== null && _a !== void 0 ? _a : msg('All results')}
542
546
  </h2>`
543
- : nothing}
544
- <div id="cb-top-view">
545
- <slot name="cb-top-slot"></slot>
546
- </div>
547
+ : nothing}
548
+ <div id="cb-top-view">
549
+ <slot name="cb-top-slot"></slot>
550
+ </div>
547
551
  ${this.isManageView
548
552
  ? this.manageBarTemplate
549
- : this.sortFilterBarTemplate}
550
- <slot name="cb-results"></slot>
553
+ : this.sortFilterBarTemplate}
554
+ <slot name="cb-results"></slot>
551
555
  ${this.displayMode === `list-compact` && this.totalResults
552
556
  ? this.listHeaderTemplate
553
- : nothing}
554
- ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
555
- </section>
556
- </div>
557
+ : nothing}
558
+ ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
559
+ </section>
560
+ </div>
557
561
  `;
558
562
  }
559
563
  /**
560
564
  * Template for the infinite scroller widget that contains the result tiles.
561
565
  */
562
566
  get infiniteScrollerTemplate() {
563
- return html `<infinite-scroller
564
- class=${this.infiniteScrollerClasses}
565
- itemCount=${this.placeholderType ? 0 : nothing}
566
- ariaLandmarkLabel="Search results"
567
- .cellProvider=${this}
568
- .placeholderCellTemplate=${this.placeholderCellTemplate}
569
- @scrollThresholdReached=${this.scrollThresholdReached}
570
- @visibleCellsChanged=${this.visibleCellsChanged}
567
+ return html `<infinite-scroller
568
+ class=${this.infiniteScrollerClasses}
569
+ itemCount=${this.placeholderType ? 0 : nothing}
570
+ ariaLandmarkLabel="Search results"
571
+ .cellProvider=${this}
572
+ .placeholderCellTemplate=${this.placeholderCellTemplate}
573
+ @scrollThresholdReached=${this.scrollThresholdReached}
574
+ @visibleCellsChanged=${this.visibleCellsChanged}
571
575
  >${this.displayMode === 'grid'
572
576
  ? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
573
- : nothing}
577
+ : nothing}
574
578
  </infinite-scroller>`;
575
579
  }
576
580
  /**
@@ -611,32 +615,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
611
615
  }
612
616
  // We only show relevance sort if a search query is currently defined
613
617
  sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
614
- return html `
615
- <sort-filter-bar
616
- .defaultSortField=${this.defaultSortField}
617
- .defaultSortDirection=${this.defaultSortDirection}
618
- .defaultViewSort=${defaultViewSort}
619
- .defaultDateSort=${defaultDateSort}
620
- .selectedSort=${this.selectedSort}
621
- .sortDirection=${this.sortDirection}
622
- .sortFieldAvailability=${sortFieldAvailability}
623
- .displayMode=${this.displayMode}
624
- .selectedTitleFilter=${this.selectedTitleFilter}
625
- .selectedCreatorFilter=${this.selectedCreatorFilter}
626
- .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
627
- .resizeObserver=${this.resizeObserver}
628
- .enableSortOptionsSlot=${this.enableSortOptionsSlot}
629
- .suppressDisplayModes=${this.suppressDisplayModes}
630
- @sortChanged=${this.userChangedSort}
631
- @displayModeChanged=${this.displayModeChanged}
632
- @titleLetterChanged=${this.titleLetterSelected}
633
- @creatorLetterChanged=${this.creatorLetterSelected}
634
- >
635
- ${this.tileBlurCheckboxTemplate}
636
- <slot name="sort-options-left" slot="sort-options-left"></slot>
637
- <slot name="sort-options" slot="sort-options"></slot>
638
- <slot name="sort-options-right" slot="sort-options-right"></slot>
639
- </sort-filter-bar>
618
+ return html `
619
+ <sort-filter-bar
620
+ .defaultSortField=${this.defaultSortField}
621
+ .defaultSortDirection=${this.defaultSortDirection}
622
+ .defaultViewSort=${defaultViewSort}
623
+ .defaultDateSort=${defaultDateSort}
624
+ .selectedSort=${this.selectedSort}
625
+ .sortDirection=${this.sortDirection}
626
+ .sortFieldAvailability=${sortFieldAvailability}
627
+ .displayMode=${this.displayMode}
628
+ .selectedTitleFilter=${this.selectedTitleFilter}
629
+ .selectedCreatorFilter=${this.selectedCreatorFilter}
630
+ .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
631
+ .resizeObserver=${this.resizeObserver}
632
+ .enableSortOptionsSlot=${this.enableSortOptionsSlot}
633
+ .suppressDisplayModes=${this.suppressDisplayModes}
634
+ @sortChanged=${this.userChangedSort}
635
+ @displayModeChanged=${this.displayModeChanged}
636
+ @titleLetterChanged=${this.titleLetterSelected}
637
+ @creatorLetterChanged=${this.creatorLetterSelected}
638
+ >
639
+ ${this.tileBlurCheckboxTemplate}
640
+ <slot name="sort-options-left" slot="sort-options-left"></slot>
641
+ <slot name="sort-options" slot="sort-options"></slot>
642
+ <slot name="sort-options-right" slot="sort-options-right"></slot>
643
+ </sort-filter-bar>
640
644
  `;
641
645
  }
642
646
  /**
@@ -648,20 +652,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
648
652
  // Only show the checkbox for @archive.org users
649
653
  if (!((_a = this.dataSource.sessionContext) === null || _a === void 0 ? void 0 : _a.is_archive_user))
650
654
  return nothing;
651
- return html `
652
- <label
653
- id="tile-blur-label"
654
- for="tile-blur-check"
655
- slot="sort-options-right"
656
- >
657
- ${msg('Blurring')}
658
- <input
659
- id="tile-blur-check"
660
- type="checkbox"
661
- ?checked=${!this.shouldSuppressTileBlurring}
662
- @change=${this.tileBlurCheckboxChanged}
663
- />
664
- </label>
655
+ return html `
656
+ <label
657
+ id="tile-blur-label"
658
+ for="tile-blur-check"
659
+ slot="sort-options-right"
660
+ >
661
+ ${msg('Blurring')}
662
+ <input
663
+ id="tile-blur-check"
664
+ type="checkbox"
665
+ ?checked=${!this.shouldSuppressTileBlurring}
666
+ @change=${this.tileBlurCheckboxChanged}
667
+ />
668
+ </label>
665
669
  `;
666
670
  }
667
671
  /**
@@ -672,27 +676,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
672
676
  const manageViewModalMsg = this.profileElement === 'uploads'
673
677
  ? 'Note: it may take a few minutes for these items to stop appearing in your uploads list.'
674
678
  : nothing;
675
- return html `
676
- <manage-bar
677
- .label=${this.manageViewLabel}
678
- .modalManager=${this.modalManager}
679
- .selectedItems=${this.dataSource.checkedTileModels}
680
- .manageViewModalMsg=${manageViewModalMsg}
681
- showSelectAll
682
- showUnselectAll
683
- ?showItemManageButton=${this.pageContext === 'search'}
684
- ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
685
- @removeItems=${this.handleRemoveItems}
686
- @manageItems=${this.handleManageItems}
687
- @selectAll=${() => this.dataSource.checkAllTiles()}
688
- @unselectAll=${() => this.dataSource.uncheckAllTiles()}
679
+ return html `
680
+ <manage-bar
681
+ .label=${this.manageViewLabel}
682
+ .modalManager=${this.modalManager}
683
+ .selectedItems=${this.dataSource.checkedTileModels}
684
+ .manageViewModalMsg=${manageViewModalMsg}
685
+ showSelectAll
686
+ showUnselectAll
687
+ ?showItemManageButton=${this.pageContext === 'search'}
688
+ ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
689
+ @removeItems=${this.handleRemoveItems}
690
+ @manageItems=${this.handleManageItems}
691
+ @selectAll=${() => this.dataSource.checkAllTiles()}
692
+ @unselectAll=${() => this.dataSource.uncheckAllTiles()}
689
693
  @cancel=${() => {
690
694
  this.isManageView = false;
691
695
  this.dataSource.uncheckAllTiles();
692
696
  if (this.searchResultsLoading)
693
697
  this.dataSource.resetPages();
694
- }}
695
- ></manage-bar>
698
+ }}
699
+ ></manage-bar>
696
700
  `;
697
701
  }
698
702
  /**
@@ -940,15 +944,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
940
944
  label: target.open ? 'open' : 'closed',
941
945
  });
942
946
  };
943
- return html `
944
- <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
945
- <summary>
946
- <span class="collapser-icon">${chevronIcon}</span>
947
- <h2>${msg('Filters')}</h2>
948
- ${this.clearFiltersBtnTemplate(true)}
949
- </summary>
950
- ${this.facetsTemplate}
951
- </details>
947
+ return html `
948
+ <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
949
+ <summary>
950
+ <span class="collapser-icon">${chevronIcon}</span>
951
+ <h2>${msg('Filters')}</h2>
952
+ ${this.clearFiltersBtnTemplate(true)}
953
+ </summary>
954
+ ${this.facetsTemplate}
955
+ </details>
952
956
  `;
953
957
  }
954
958
  /**
@@ -958,10 +962,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
958
962
  if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
959
963
  return nothing;
960
964
  if (this.facetLoadStrategy === 'off') {
961
- return html `
962
- <p class="facets-message">
963
- ${msg('Facets are temporarily unavailable.')}
964
- </p>
965
+ return html `
966
+ <p class="facets-message">
967
+ ${msg('Facets are temporarily unavailable.')}
968
+ </p>
965
969
  `;
966
970
  }
967
971
  // We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
@@ -970,44 +974,44 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
970
974
  const facetDisplayOrder = shouldUseTvInterface
971
975
  ? tvFacetDisplayOrder
972
976
  : defaultFacetDisplayOrder;
973
- const facets = html `
974
- <collection-facets
975
- .collectionPagePath=${this.collectionPagePath}
976
- .parentCollections=${this.dataSource.parentCollections}
977
- .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
978
- .searchService=${this.searchService}
979
- .featureFeedbackService=${this.featureFeedbackService}
980
- .recaptchaManager=${this.recaptchaManager}
981
- .resizeObserver=${this.resizeObserver}
982
- .searchType=${this.searchType}
983
- .aggregations=${this.dataSource.aggregations}
984
- .histogramAggregation=${this.dataSource.histogramAggregation}
985
- .minSelectedDate=${this.minSelectedDate}
986
- .maxSelectedDate=${this.maxSelectedDate}
987
- .selectedFacets=${this.selectedFacets}
988
- .baseNavigationUrl=${this.baseNavigationUrl}
989
- .collectionTitles=${this.dataSource.collectionTitles}
990
- .tvChannelAliases=${this.dataSource.tvChannelAliases}
991
- .showHistogramDatePicker=${this.showHistogramDatePicker}
992
- .allowExpandingDatePicker=${!this.mobileView}
993
- .allowDatePickerMonths=${shouldUseTvInterface}
994
- .contentWidth=${this.contentWidth}
995
- .query=${this.baseQuery}
996
- .filterMap=${this.dataSource.filterMap}
997
- .isManageView=${this.isManageView}
998
- .modalManager=${this.modalManager}
999
- .analyticsHandler=${this.analyticsHandler}
1000
- .facetDisplayOrder=${facetDisplayOrder}
1001
- .isTvSearch=${shouldUseTvInterface}
1002
- ?collapsableFacets=${this.mobileView}
1003
- ?facetsLoading=${this.facetsLoading}
1004
- ?histogramAggregationLoading=${this.facetsLoading}
1005
- ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1006
- @facetClick=${this.facetClickHandler}
1007
- @facetsChanged=${this.facetsChanged}
1008
- @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1009
- >
1010
- </collection-facets>
977
+ const facets = html `
978
+ <collection-facets
979
+ .collectionPagePath=${this.collectionPagePath}
980
+ .parentCollections=${this.dataSource.parentCollections}
981
+ .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
982
+ .searchService=${this.searchService}
983
+ .featureFeedbackService=${this.featureFeedbackService}
984
+ .recaptchaManager=${this.recaptchaManager}
985
+ .resizeObserver=${this.resizeObserver}
986
+ .searchType=${this.searchType}
987
+ .aggregations=${this.dataSource.aggregations}
988
+ .histogramAggregation=${this.dataSource.histogramAggregation}
989
+ .minSelectedDate=${this.minSelectedDate}
990
+ .maxSelectedDate=${this.maxSelectedDate}
991
+ .selectedFacets=${this.selectedFacets}
992
+ .baseNavigationUrl=${this.baseNavigationUrl}
993
+ .collectionTitles=${this.dataSource.collectionTitles}
994
+ .tvChannelAliases=${this.dataSource.tvChannelAliases}
995
+ .showHistogramDatePicker=${this.showHistogramDatePicker}
996
+ .allowExpandingDatePicker=${!this.mobileView}
997
+ .allowDatePickerMonths=${shouldUseTvInterface}
998
+ .contentWidth=${this.contentWidth}
999
+ .query=${this.baseQuery}
1000
+ .filterMap=${this.dataSource.filterMap}
1001
+ .isManageView=${this.isManageView}
1002
+ .modalManager=${this.modalManager}
1003
+ .analyticsHandler=${this.analyticsHandler}
1004
+ .facetDisplayOrder=${facetDisplayOrder}
1005
+ .isTvSearch=${shouldUseTvInterface}
1006
+ ?collapsableFacets=${this.mobileView}
1007
+ ?facetsLoading=${this.facetsLoading}
1008
+ ?histogramAggregationLoading=${this.facetsLoading}
1009
+ ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1010
+ @facetClick=${this.facetClickHandler}
1011
+ @facetsChanged=${this.facetsChanged}
1012
+ @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1013
+ >
1014
+ </collection-facets>
1011
1015
  `;
1012
1016
  // If we are using one of the opt-in facet load strategies, we may need to wrap the
1013
1017
  // desktop view facets in a <details> widget so that patrons can opt into loading them.
@@ -1015,20 +1019,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1015
1019
  const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
1016
1020
  (this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
1017
1021
  if (showDesktopOptInWidget && !this.mobileView) {
1018
- return html `
1019
- <details
1020
- class="desktop-facets-dropdown"
1022
+ return html `
1023
+ <details
1024
+ class="desktop-facets-dropdown"
1021
1025
  @toggle=${(e) => {
1022
1026
  const target = e.target;
1023
1027
  this.collapsibleFacetsVisible = target.open;
1024
- }}
1025
- >
1026
- <summary>
1027
- <span class="collapser-icon">${chevronIcon}</span>
1028
- <h2>${msg('Filters')}</h2>
1029
- </summary>
1030
- ${facets}
1031
- </details>
1028
+ }}
1029
+ >
1030
+ <summary>
1031
+ <span class="collapser-icon">${chevronIcon}</span>
1032
+ <h2>${msg('Filters')}</h2>
1033
+ </summary>
1034
+ ${facets}
1035
+ </details>
1032
1036
  `;
1033
1037
  }
1034
1038
  // Otherwise, just render the facets component bare
@@ -1048,34 +1052,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1048
1052
  mobile,
1049
1053
  });
1050
1054
  const buttonText = mobile ? 'Clear all' : 'Clear all filters';
1051
- return html `
1052
- <div class="clear-filters-btn-row">
1055
+ return html `
1056
+ <div class="clear-filters-btn-row">
1053
1057
  ${mobile
1054
1058
  ? html `<span class="clear-filters-btn-separator">&nbsp;</span>`
1055
- : nothing}
1056
- <button class=${buttonClasses} @click=${this.clearFilters}>
1057
- ${buttonText}
1058
- </button>
1059
- </div>
1059
+ : nothing}
1060
+ <button class=${buttonClasses} @click=${this.clearFilters}>
1061
+ ${buttonText}
1062
+ </button>
1063
+ </div>
1060
1064
  `;
1061
1065
  }
1062
1066
  /**
1063
1067
  * Template for the table header content that appears atop the compact list view.
1064
1068
  */
1065
1069
  get listHeaderTemplate() {
1066
- return html `
1067
- <div id="list-header">
1068
- <tile-dispatcher
1069
- .tileDisplayMode=${'list-header'}
1070
- .resizeObserver=${this.resizeObserver}
1071
- .sortParam=${this.sortParam}
1072
- .defaultSortParam=${this.defaultSortParam}
1073
- .mobileBreakpoint=${this.mobileBreakpoint}
1074
- .loggedIn=${this.loggedIn}
1075
- .suppressBlurring=${this.shouldSuppressTileBlurring}
1076
- >
1077
- </tile-dispatcher>
1078
- </div>
1070
+ return html `
1071
+ <div id="list-header">
1072
+ <tile-dispatcher
1073
+ .tileDisplayMode=${'list-header'}
1074
+ .resizeObserver=${this.resizeObserver}
1075
+ .sortParam=${this.sortParam}
1076
+ .defaultSortParam=${this.defaultSortParam}
1077
+ .mobileBreakpoint=${this.mobileBreakpoint}
1078
+ .loggedIn=${this.loggedIn}
1079
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1080
+ >
1081
+ </tile-dispatcher>
1082
+ </div>
1079
1083
  `;
1080
1084
  }
1081
1085
  /**
@@ -1804,27 +1808,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1804
1808
  const model = this.tileModelAtCellIndex(index);
1805
1809
  if (!model)
1806
1810
  return undefined;
1807
- return html `
1808
- <tile-dispatcher
1809
- .collectionPagePath=${this.collectionPagePath}
1810
- .baseNavigationUrl=${this.baseNavigationUrl}
1811
- .baseImageUrl=${this.baseImageUrl}
1812
- .model=${model}
1813
- .tileDisplayMode=${this.displayMode}
1814
- .resizeObserver=${this.resizeObserver}
1815
- .collectionTitles=${this.dataSource.collectionTitles}
1816
- .sortParam=${this.sortParam}
1817
- .defaultSortParam=${this.defaultSortParam}
1818
- .creatorFilter=${this.selectedCreatorFilter}
1819
- .mobileBreakpoint=${this.mobileBreakpoint}
1820
- .loggedIn=${this.loggedIn}
1821
- .suppressBlurring=${this.shouldSuppressTileBlurring}
1822
- .isManageView=${this.isManageView}
1823
- ?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
1824
- ?enableHoverPane=${true}
1825
- @resultSelected=${(e) => this.resultSelected(e)}
1826
- >
1827
- </tile-dispatcher>
1811
+ return html `
1812
+ <tile-dispatcher
1813
+ .collectionPagePath=${this.collectionPagePath}
1814
+ .baseNavigationUrl=${this.baseNavigationUrl}
1815
+ .baseImageUrl=${this.baseImageUrl}
1816
+ .model=${model}
1817
+ .tileDisplayMode=${this.displayMode}
1818
+ .resizeObserver=${this.resizeObserver}
1819
+ .collectionTitles=${this.dataSource.collectionTitles}
1820
+ .sortParam=${this.sortParam}
1821
+ .defaultSortParam=${this.defaultSortParam}
1822
+ .creatorFilter=${this.selectedCreatorFilter}
1823
+ .mobileBreakpoint=${this.mobileBreakpoint}
1824
+ .loggedIn=${this.loggedIn}
1825
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1826
+ .isManageView=${this.isManageView}
1827
+ ?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
1828
+ ?enableHoverPane=${true}
1829
+ @resultSelected=${(e) => this.resultSelected(e)}
1830
+ >
1831
+ </tile-dispatcher>
1828
1832
  `;
1829
1833
  }
1830
1834
  /**
@@ -1860,440 +1864,440 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1860
1864
  static get styles() {
1861
1865
  return [
1862
1866
  srOnlyStyle,
1863
- css `
1864
- :host {
1865
- display: block;
1866
- --leftColumnWidth: 18rem;
1867
- --leftColumnPaddingTop: 2rem;
1868
- --leftColumnPaddingRight: 2.5rem;
1869
- }
1870
-
1871
- #facet-top-view {
1872
- display: flex;
1873
- }
1874
-
1875
- /**
1876
- * When page width resizes from desktop to mobile, use this class to
1877
- * disable expand/collapse transition when loading.
1878
- */
1879
- .preload * {
1880
- transition: none !important;
1881
- -webkit-transition: none !important;
1882
- -moz-transition: none !important;
1883
- -ms-transition: none !important;
1884
- -o-transition: none !important;
1885
- }
1886
-
1887
- #content-container {
1888
- display: flex;
1889
- }
1890
-
1891
- empty-placeholder {
1892
- margin-top: var(--placeholderMarginTop, 0);
1893
- }
1894
-
1895
- .collapser-icon {
1896
- display: inline-block;
1897
- }
1898
-
1899
- .collapser-icon svg {
1900
- display: inline-block;
1901
- width: 12px;
1902
- height: 12px;
1903
- transition: transform 0.2s ease-out;
1904
- }
1905
-
1906
- #mobile-filter-collapse {
1907
- width: 100%;
1908
- }
1909
-
1910
- #mobile-filter-collapse > summary {
1911
- cursor: pointer;
1912
- list-style: none;
1913
- }
1914
-
1915
- #mobile-filter-collapse[open] > summary {
1916
- margin-bottom: 10px;
1917
- }
1918
-
1919
- #mobile-filter-collapse h2 {
1920
- display: inline-block;
1921
- margin: 0;
1922
- font-size: 2rem;
1923
- }
1924
-
1925
- #mobile-filter-collapse[open] svg {
1926
- transform: rotate(90deg);
1927
- }
1928
-
1929
- #content-container.mobile {
1930
- display: block;
1931
- }
1932
-
1933
- #right-column {
1934
- flex: 1;
1935
- position: relative;
1936
- min-height: 90vh;
1937
- border-right: 1px solid rgb(232, 232, 232);
1938
- margin-top: var(--rightColumnMarginTop, 0);
1939
- padding-top: 2rem;
1940
- background: #fff;
1941
- }
1942
-
1943
- #left-column:not([hidden]) + #right-column {
1944
- border-left: 1px solid rgb(232, 232, 232);
1945
- }
1946
-
1947
- #right-column.smart-results-spacing {
1948
- padding-top: 0.5rem;
1949
- border-right: none;
1950
- background: transparent;
1951
- min-width: 0;
1952
- }
1953
-
1954
- #results {
1955
- background: #fff;
1956
- padding-left: 1rem;
1957
- padding-right: 1rem;
1958
- }
1959
-
1960
- #right-column.smart-results-spacing #results {
1961
- border-radius: 10px 10px 0px 0px;
1962
- padding-top: 0.5rem;
1963
- margin-top: 1rem;
1964
- }
1965
-
1966
- .mobile #right-column {
1967
- border-left: none;
1968
- }
1969
-
1970
- .mobile #results {
1971
- padding: 5px 5px 0;
1972
- }
1973
-
1974
- #left-column {
1975
- width: var(--leftColumnWidth, 18rem);
1976
- /* Prevents Safari from shrinking col at first draw */
1977
- min-width: var(--leftColumnWidth, 18rem);
1978
- padding-top: var(--leftColumnPaddingTop, 2rem);
1979
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1980
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1981
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1982
- z-index: 1;
1983
- }
1984
-
1985
- .desktop #left-column {
1986
- top: 0;
1987
- position: sticky;
1988
- height: calc(100vh - 2rem);
1989
- max-height: calc(100vh - 2rem);
1990
- overflow-x: hidden;
1991
- overflow-y: scroll;
1992
-
1993
- /*
1994
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1995
- * does at least give us a tiny bit of control over width & color.
1996
- */
1997
- scrollbar-width: thin;
1998
- scrollbar-color: transparent transparent;
1999
- }
2000
- .desktop #left-column:hover {
2001
- scrollbar-color: auto;
2002
- }
2003
- .desktop #left-column::-webkit-scrollbar {
2004
- appearance: none;
2005
- width: 6px;
2006
- }
2007
- .desktop #left-column::-webkit-scrollbar-button {
2008
- height: 3px;
2009
- background: transparent;
2010
- }
2011
- .desktop #left-column::-webkit-scrollbar-corner {
2012
- background: transparent;
2013
- }
2014
- .desktop #left-column::-webkit-scrollbar-thumb {
2015
- border-radius: 4px;
2016
- }
2017
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
2018
- background: rgba(0, 0, 0, 0.15);
2019
- }
2020
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2021
- background: rgba(0, 0, 0, 0.2);
2022
- }
2023
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2024
- background: rgba(0, 0, 0, 0.3);
2025
- }
2026
-
2027
- #facets-bottom-fade {
2028
- background: linear-gradient(
2029
- to bottom,
2030
- #f5f5f700 0%,
2031
- #f5f5f7c0 50%,
2032
- #f5f5f7 80%,
2033
- #f5f5f7 100%
2034
- );
2035
- position: fixed;
2036
- bottom: 0;
2037
- height: 50px;
2038
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
2039
- width: calc(
2040
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2041
- );
2042
- z-index: 2;
2043
- pointer-events: none;
2044
- transition: height 0.1s ease;
2045
- }
2046
- #facets-bottom-fade.hidden {
2047
- height: 0;
2048
- }
2049
-
2050
- .facets-message {
2051
- font-size: 1.4rem;
2052
- }
2053
-
2054
- .desktop-facets-dropdown > summary {
2055
- cursor: pointer;
2056
- list-style: none;
2057
- }
2058
-
2059
- .desktop-facets-dropdown h2 {
2060
- display: inline-block;
2061
- margin: 0;
2062
- font-size: 1.6rem;
2063
- }
2064
-
2065
- .desktop-facets-dropdown[open] > summary {
2066
- margin-bottom: 10px;
2067
- }
2068
-
2069
- .desktop-facets-dropdown[open] svg {
2070
- transform: rotate(90deg);
2071
- }
2072
-
2073
- .desktop #left-column-scroll-sentinel {
2074
- width: 1px;
2075
- height: 100vh;
2076
- background: transparent;
2077
- }
2078
-
2079
- .desktop #facets-scroll-sentinel {
2080
- width: 1px;
2081
- height: 1px;
2082
- background: transparent;
2083
- }
2084
-
2085
- #facets-header-container {
2086
- display: flex;
2087
- justify-content: space-between;
2088
- align-items: flex-start;
2089
- clear: both;
2090
- }
2091
-
2092
- .desktop #facets-header-container {
2093
- flex-wrap: wrap;
2094
- }
2095
-
2096
- .mobile #left-column {
2097
- width: 100%;
2098
- min-width: 0;
2099
- padding: 5px 0;
2100
- border: 0;
2101
- }
2102
-
2103
- .clear-filters-btn-row {
2104
- display: inline-block;
2105
- }
2106
-
2107
- .desktop .clear-filters-btn-row {
2108
- width: 100%;
2109
- }
2110
-
2111
- .clear-filters-btn {
2112
- display: inline-block;
2113
- appearance: none;
2114
- margin: 0;
2115
- padding: 0;
2116
- border: 0;
2117
- background: none;
2118
- color: var(--ia-theme-link-color);
2119
- font-size: 1.4rem;
2120
- font-family: inherit;
2121
- cursor: pointer;
2122
- }
2123
-
2124
- .clear-filters-btn:hover {
2125
- text-decoration: underline;
2126
- }
2127
-
2128
- .clear-filters-btn-separator {
2129
- display: inline-block;
2130
- margin-left: 5px;
2131
- border-left: 1px solid #2c2c2c;
2132
- font-size: 1.4rem;
2133
- line-height: 1.3rem;
2134
- }
2135
-
2136
- #facets-container {
2137
- position: relative;
2138
- max-height: 0;
2139
- transition: max-height 0.2s ease-in-out;
2140
- z-index: 1;
2141
- margin-top: 5rem;
2142
- padding-bottom: 2rem;
2143
- }
2144
-
2145
- .desktop #facets-container {
2146
- width: 18rem;
2147
- }
2148
-
2149
- .mobile #facets-container {
2150
- overflow: hidden;
2151
- padding-bottom: 0;
2152
- padding-left: 10px;
2153
- padding-right: 10px;
2154
- }
2155
-
2156
- #facets-container.expanded {
2157
- max-height: 2000px;
2158
- }
2159
-
2160
- .results-section-heading {
2161
- margin: 0.5rem 0.3rem;
2162
- font-size: 2rem;
2163
- line-height: 25px;
2164
- }
2165
-
2166
- #results-total {
2167
- display: flex;
2168
- align-items: baseline;
2169
- }
2170
-
2171
- .mobile #results-total {
2172
- position: absolute;
2173
- right: 10px;
2174
- }
2175
-
2176
- #big-results-count {
2177
- font-size: 2.4rem;
2178
- font-weight: 500;
2179
- margin-right: 5px;
2180
- }
2181
-
2182
- .mobile #big-results-count {
2183
- font-size: 2rem;
2184
- }
2185
-
2186
- #big-results-label {
2187
- font-size: 1.4rem;
2188
- font-weight: 200;
2189
- }
2190
-
2191
- #list-header {
2192
- max-height: 4.2rem;
2193
- }
2194
-
2195
- .loading-cover {
2196
- position: absolute;
2197
- top: 0;
2198
- left: 0;
2199
- width: 100%;
2200
- height: 100%;
2201
- display: flex;
2202
- justify-content: center;
2203
- z-index: 1;
2204
- padding-top: 50px;
2205
- }
2206
-
2207
- #tile-blur-label {
2208
- display: flex;
2209
- align-items: center;
2210
- column-gap: 5px;
2211
- }
2212
-
2213
- #tile-blur-check {
2214
- margin: 0 5px 0 0;
2215
- }
2216
-
2217
- circular-activity-indicator {
2218
- width: 30px;
2219
- height: 30px;
2220
- }
2221
-
2222
- sort-filter-bar {
2223
- display: block;
2224
- margin-bottom: 4rem;
2225
- }
2226
-
2227
- infinite-scroller {
2228
- display: block;
2229
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2230
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2231
- }
2232
-
2233
- infinite-scroller.list-compact {
2234
- --infiniteScrollerCellMinWidth: var(
2235
- --collectionBrowserCellMinWidth,
2236
- 100%
2237
- );
2238
- --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2239
- --infiniteScrollerCellMaxHeight: 56px;
2240
- --infiniteScrollerRowGap: 10px;
2241
- }
2242
-
2243
- infinite-scroller.list-detail {
2244
- --infiniteScrollerCellMinWidth: var(
2245
- --collectionBrowserCellMinWidth,
2246
- 100%
2247
- );
2248
- --infiniteScrollerCellMinHeight: var(
2249
- --collectionBrowserCellMinHeight,
2250
- 5rem
2251
- );
2252
- /*
2253
- 30px in spec, compensating for a -4px margin
2254
- to align title with top of item image
2255
- src/tiles/list/tile-list.ts
2256
- */
2257
- --infiniteScrollerRowGap: 34px;
2258
- }
2259
-
2260
- .mobile infinite-scroller.list-detail {
2261
- --infiniteScrollerRowGap: 24px;
2262
- }
2263
-
2264
- infinite-scroller.grid {
2265
- --infiniteScrollerCellMinWidth: var(
2266
- --collectionBrowserCellMinWidth,
2267
- 17rem
2268
- );
2269
- --infiniteScrollerCellMaxWidth: var(
2270
- --collectionBrowserCellMaxWidth,
2271
- 1fr
2272
- );
2273
- }
2274
-
2275
- /* Allow tiles to shrink a bit further at smaller viewport widths */
2276
- @media screen and (max-width: 880px) {
2277
- infinite-scroller.grid {
2278
- --infiniteScrollerCellMinWidth: var(
2279
- --collectionBrowserCellMinWidth,
2280
- 15rem
2281
- );
2282
- }
2283
- }
2284
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2285
- @media screen and (max-width: 360px) {
2286
- infinite-scroller.grid {
2287
- --infiniteScrollerCellMinWidth: var(
2288
- --collectionBrowserCellMinWidth,
2289
- 12rem
2290
- );
2291
- }
2292
- }
2293
-
2294
- infinite-scroller.hidden {
2295
- display: none;
2296
- }
1867
+ css `
1868
+ :host {
1869
+ display: block;
1870
+ --leftColumnWidth: 18rem;
1871
+ --leftColumnPaddingTop: 2rem;
1872
+ --leftColumnPaddingRight: 2.5rem;
1873
+ }
1874
+
1875
+ #facet-top-view {
1876
+ display: flex;
1877
+ }
1878
+
1879
+ /**
1880
+ * When page width resizes from desktop to mobile, use this class to
1881
+ * disable expand/collapse transition when loading.
1882
+ */
1883
+ .preload * {
1884
+ transition: none !important;
1885
+ -webkit-transition: none !important;
1886
+ -moz-transition: none !important;
1887
+ -ms-transition: none !important;
1888
+ -o-transition: none !important;
1889
+ }
1890
+
1891
+ #content-container {
1892
+ display: flex;
1893
+ }
1894
+
1895
+ empty-placeholder {
1896
+ margin-top: var(--placeholderMarginTop, 0);
1897
+ }
1898
+
1899
+ .collapser-icon {
1900
+ display: inline-block;
1901
+ }
1902
+
1903
+ .collapser-icon svg {
1904
+ display: inline-block;
1905
+ width: 12px;
1906
+ height: 12px;
1907
+ transition: transform 0.2s ease-out;
1908
+ }
1909
+
1910
+ #mobile-filter-collapse {
1911
+ width: 100%;
1912
+ }
1913
+
1914
+ #mobile-filter-collapse > summary {
1915
+ cursor: pointer;
1916
+ list-style: none;
1917
+ }
1918
+
1919
+ #mobile-filter-collapse[open] > summary {
1920
+ margin-bottom: 10px;
1921
+ }
1922
+
1923
+ #mobile-filter-collapse h2 {
1924
+ display: inline-block;
1925
+ margin: 0;
1926
+ font-size: 2rem;
1927
+ }
1928
+
1929
+ #mobile-filter-collapse[open] svg {
1930
+ transform: rotate(90deg);
1931
+ }
1932
+
1933
+ #content-container.mobile {
1934
+ display: block;
1935
+ }
1936
+
1937
+ #right-column {
1938
+ flex: 1;
1939
+ position: relative;
1940
+ min-height: 90vh;
1941
+ border-right: 1px solid rgb(232, 232, 232);
1942
+ margin-top: var(--rightColumnMarginTop, 0);
1943
+ padding-top: 2rem;
1944
+ background: #fff;
1945
+ }
1946
+
1947
+ #left-column:not([hidden]) + #right-column {
1948
+ border-left: 1px solid rgb(232, 232, 232);
1949
+ }
1950
+
1951
+ #right-column.smart-results-spacing {
1952
+ padding-top: 0.5rem;
1953
+ border-right: none;
1954
+ background: transparent;
1955
+ min-width: 0;
1956
+ }
1957
+
1958
+ #results {
1959
+ background: #fff;
1960
+ padding-left: 1rem;
1961
+ padding-right: 1rem;
1962
+ }
1963
+
1964
+ #right-column.smart-results-spacing #results {
1965
+ border-radius: 10px 10px 0px 0px;
1966
+ padding-top: 0.5rem;
1967
+ margin-top: 1rem;
1968
+ }
1969
+
1970
+ .mobile #right-column {
1971
+ border-left: none;
1972
+ }
1973
+
1974
+ .mobile #results {
1975
+ padding: 5px 5px 0;
1976
+ }
1977
+
1978
+ #left-column {
1979
+ width: var(--leftColumnWidth, 18rem);
1980
+ /* Prevents Safari from shrinking col at first draw */
1981
+ min-width: var(--leftColumnWidth, 18rem);
1982
+ padding-top: var(--leftColumnPaddingTop, 2rem);
1983
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1984
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1985
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1986
+ z-index: 1;
1987
+ }
1988
+
1989
+ .desktop #left-column {
1990
+ top: 0;
1991
+ position: sticky;
1992
+ height: calc(100vh - 2rem);
1993
+ max-height: calc(100vh - 2rem);
1994
+ overflow-x: hidden;
1995
+ overflow-y: scroll;
1996
+
1997
+ /*
1998
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1999
+ * does at least give us a tiny bit of control over width & color.
2000
+ */
2001
+ scrollbar-width: thin;
2002
+ scrollbar-color: transparent transparent;
2003
+ }
2004
+ .desktop #left-column:hover {
2005
+ scrollbar-color: auto;
2006
+ }
2007
+ .desktop #left-column::-webkit-scrollbar {
2008
+ appearance: none;
2009
+ width: 6px;
2010
+ }
2011
+ .desktop #left-column::-webkit-scrollbar-button {
2012
+ height: 3px;
2013
+ background: transparent;
2014
+ }
2015
+ .desktop #left-column::-webkit-scrollbar-corner {
2016
+ background: transparent;
2017
+ }
2018
+ .desktop #left-column::-webkit-scrollbar-thumb {
2019
+ border-radius: 4px;
2020
+ }
2021
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
2022
+ background: rgba(0, 0, 0, 0.15);
2023
+ }
2024
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2025
+ background: rgba(0, 0, 0, 0.2);
2026
+ }
2027
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2028
+ background: rgba(0, 0, 0, 0.3);
2029
+ }
2030
+
2031
+ #facets-bottom-fade {
2032
+ background: linear-gradient(
2033
+ to bottom,
2034
+ #f5f5f700 0%,
2035
+ #f5f5f7c0 50%,
2036
+ #f5f5f7 80%,
2037
+ #f5f5f7 100%
2038
+ );
2039
+ position: fixed;
2040
+ bottom: 0;
2041
+ height: 50px;
2042
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
2043
+ width: calc(
2044
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2045
+ );
2046
+ z-index: 2;
2047
+ pointer-events: none;
2048
+ transition: height 0.1s ease;
2049
+ }
2050
+ #facets-bottom-fade.hidden {
2051
+ height: 0;
2052
+ }
2053
+
2054
+ .facets-message {
2055
+ font-size: 1.4rem;
2056
+ }
2057
+
2058
+ .desktop-facets-dropdown > summary {
2059
+ cursor: pointer;
2060
+ list-style: none;
2061
+ }
2062
+
2063
+ .desktop-facets-dropdown h2 {
2064
+ display: inline-block;
2065
+ margin: 0;
2066
+ font-size: 1.6rem;
2067
+ }
2068
+
2069
+ .desktop-facets-dropdown[open] > summary {
2070
+ margin-bottom: 10px;
2071
+ }
2072
+
2073
+ .desktop-facets-dropdown[open] svg {
2074
+ transform: rotate(90deg);
2075
+ }
2076
+
2077
+ .desktop #left-column-scroll-sentinel {
2078
+ width: 1px;
2079
+ height: 100vh;
2080
+ background: transparent;
2081
+ }
2082
+
2083
+ .desktop #facets-scroll-sentinel {
2084
+ width: 1px;
2085
+ height: 1px;
2086
+ background: transparent;
2087
+ }
2088
+
2089
+ #facets-header-container {
2090
+ display: flex;
2091
+ justify-content: space-between;
2092
+ align-items: flex-start;
2093
+ clear: both;
2094
+ }
2095
+
2096
+ .desktop #facets-header-container {
2097
+ flex-wrap: wrap;
2098
+ }
2099
+
2100
+ .mobile #left-column {
2101
+ width: 100%;
2102
+ min-width: 0;
2103
+ padding: 5px 0;
2104
+ border: 0;
2105
+ }
2106
+
2107
+ .clear-filters-btn-row {
2108
+ display: inline-block;
2109
+ }
2110
+
2111
+ .desktop .clear-filters-btn-row {
2112
+ width: 100%;
2113
+ }
2114
+
2115
+ .clear-filters-btn {
2116
+ display: inline-block;
2117
+ appearance: none;
2118
+ margin: 0;
2119
+ padding: 0;
2120
+ border: 0;
2121
+ background: none;
2122
+ color: var(--ia-theme-link-color);
2123
+ font-size: 1.4rem;
2124
+ font-family: inherit;
2125
+ cursor: pointer;
2126
+ }
2127
+
2128
+ .clear-filters-btn:hover {
2129
+ text-decoration: underline;
2130
+ }
2131
+
2132
+ .clear-filters-btn-separator {
2133
+ display: inline-block;
2134
+ margin-left: 5px;
2135
+ border-left: 1px solid #2c2c2c;
2136
+ font-size: 1.4rem;
2137
+ line-height: 1.3rem;
2138
+ }
2139
+
2140
+ #facets-container {
2141
+ position: relative;
2142
+ max-height: 0;
2143
+ transition: max-height 0.2s ease-in-out;
2144
+ z-index: 1;
2145
+ margin-top: 5rem;
2146
+ padding-bottom: 2rem;
2147
+ }
2148
+
2149
+ .desktop #facets-container {
2150
+ width: 18rem;
2151
+ }
2152
+
2153
+ .mobile #facets-container {
2154
+ overflow: hidden;
2155
+ padding-bottom: 0;
2156
+ padding-left: 10px;
2157
+ padding-right: 10px;
2158
+ }
2159
+
2160
+ #facets-container.expanded {
2161
+ max-height: 2000px;
2162
+ }
2163
+
2164
+ .results-section-heading {
2165
+ margin: 0.5rem 0.3rem;
2166
+ font-size: 2rem;
2167
+ line-height: 25px;
2168
+ }
2169
+
2170
+ #results-total {
2171
+ display: flex;
2172
+ align-items: baseline;
2173
+ }
2174
+
2175
+ .mobile #results-total {
2176
+ position: absolute;
2177
+ right: 10px;
2178
+ }
2179
+
2180
+ #big-results-count {
2181
+ font-size: 2.4rem;
2182
+ font-weight: 500;
2183
+ margin-right: 5px;
2184
+ }
2185
+
2186
+ .mobile #big-results-count {
2187
+ font-size: 2rem;
2188
+ }
2189
+
2190
+ #big-results-label {
2191
+ font-size: 1.4rem;
2192
+ font-weight: 200;
2193
+ }
2194
+
2195
+ #list-header {
2196
+ max-height: 4.2rem;
2197
+ }
2198
+
2199
+ .loading-cover {
2200
+ position: absolute;
2201
+ top: 0;
2202
+ left: 0;
2203
+ width: 100%;
2204
+ height: 100%;
2205
+ display: flex;
2206
+ justify-content: center;
2207
+ z-index: 1;
2208
+ padding-top: 50px;
2209
+ }
2210
+
2211
+ #tile-blur-label {
2212
+ display: flex;
2213
+ align-items: center;
2214
+ column-gap: 5px;
2215
+ }
2216
+
2217
+ #tile-blur-check {
2218
+ margin: 0 5px 0 0;
2219
+ }
2220
+
2221
+ circular-activity-indicator {
2222
+ width: 30px;
2223
+ height: 30px;
2224
+ }
2225
+
2226
+ sort-filter-bar {
2227
+ display: block;
2228
+ margin-bottom: 4rem;
2229
+ }
2230
+
2231
+ infinite-scroller {
2232
+ display: block;
2233
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2234
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2235
+ }
2236
+
2237
+ infinite-scroller.list-compact {
2238
+ --infiniteScrollerCellMinWidth: var(
2239
+ --collectionBrowserCellMinWidth,
2240
+ 100%
2241
+ );
2242
+ --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2243
+ --infiniteScrollerCellMaxHeight: 56px;
2244
+ --infiniteScrollerRowGap: 10px;
2245
+ }
2246
+
2247
+ infinite-scroller.list-detail {
2248
+ --infiniteScrollerCellMinWidth: var(
2249
+ --collectionBrowserCellMinWidth,
2250
+ 100%
2251
+ );
2252
+ --infiniteScrollerCellMinHeight: var(
2253
+ --collectionBrowserCellMinHeight,
2254
+ 5rem
2255
+ );
2256
+ /*
2257
+ 30px in spec, compensating for a -4px margin
2258
+ to align title with top of item image
2259
+ src/tiles/list/tile-list.ts
2260
+ */
2261
+ --infiniteScrollerRowGap: 34px;
2262
+ }
2263
+
2264
+ .mobile infinite-scroller.list-detail {
2265
+ --infiniteScrollerRowGap: 24px;
2266
+ }
2267
+
2268
+ infinite-scroller.grid {
2269
+ --infiniteScrollerCellMinWidth: var(
2270
+ --collectionBrowserCellMinWidth,
2271
+ 17rem
2272
+ );
2273
+ --infiniteScrollerCellMaxWidth: var(
2274
+ --collectionBrowserCellMaxWidth,
2275
+ 1fr
2276
+ );
2277
+ }
2278
+
2279
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
2280
+ @media screen and (max-width: 880px) {
2281
+ infinite-scroller.grid {
2282
+ --infiniteScrollerCellMinWidth: var(
2283
+ --collectionBrowserCellMinWidth,
2284
+ 15rem
2285
+ );
2286
+ }
2287
+ }
2288
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2289
+ @media screen and (max-width: 360px) {
2290
+ infinite-scroller.grid {
2291
+ --infiniteScrollerCellMinWidth: var(
2292
+ --collectionBrowserCellMinWidth,
2293
+ 12rem
2294
+ );
2295
+ }
2296
+ }
2297
+
2298
+ infinite-scroller.hidden {
2299
+ display: none;
2300
+ }
2297
2301
  `,
2298
2302
  ];
2299
2303
  }