@internetarchive/collection-browser 4.1.0-alpha-webdev8186.4 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -378,32 +378,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
378
378
  }
379
379
  }
380
380
  render() {
381
- return html `
381
+ return html `
382
382
  ${this.showSmartFacetBar && this.placeholderType === null
383
- ? html `<smart-facet-bar
384
- .query=${this.baseQuery}
385
- .aggregations=${this.dataSource.aggregations}
386
- .selectedFacets=${this.selectedFacets}
387
- .collectionTitles=${this.dataSource.collectionTitles}
388
- .filterToggleShown=${!this.mobileView}
389
- .filterToggleActive=${this.facetPaneVisible}
390
- .label=${this.smartFacetBarLabel}
391
- @facetsChanged=${this.facetsChanged}
383
+ ? html `<smart-facet-bar
384
+ .query=${this.baseQuery}
385
+ .aggregations=${this.dataSource.aggregations}
386
+ .selectedFacets=${this.selectedFacets}
387
+ .collectionTitles=${this.dataSource.collectionTitles}
388
+ .filterToggleShown=${!this.mobileView}
389
+ .filterToggleActive=${this.facetPaneVisible}
390
+ .label=${this.smartFacetBarLabel}
391
+ @facetsChanged=${this.facetsChanged}
392
392
  @filtersToggled=${() => {
393
393
  this.facetPaneVisible = !this.facetPaneVisible;
394
394
  this.emitFacetPaneVisibilityChanged();
395
- }}
395
+ }}
396
396
  ></smart-facet-bar>`
397
- : nothing}
398
-
399
- <div
400
- id="content-container"
401
- class=${this.mobileView ? 'mobile' : 'desktop'}
402
- >
397
+ : nothing}
398
+
399
+ <div
400
+ id="content-container"
401
+ class=${this.mobileView ? 'mobile' : 'desktop'}
402
+ >
403
403
  ${this.placeholderType
404
404
  ? this.emptyPlaceholderTemplate
405
- : this.collectionBrowserTemplate}
406
- </div>
405
+ : this.collectionBrowserTemplate}
406
+ </div>
407
407
  `;
408
408
  }
409
409
  /**
@@ -447,23 +447,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
447
447
  * Template for the placeholder content to show when no results are available.
448
448
  */
449
449
  get emptyPlaceholderTemplate() {
450
- return html `
451
- <empty-placeholder
452
- .placeholderType=${this.placeholderType}
453
- ?isMobileView=${this.mobileView}
454
- ?isCollection=${!!this.withinCollection}
455
- .detailMessage=${this.dataSource.queryErrorMessage ?? ''}
456
- .baseNavigationUrl=${this.baseNavigationUrl}
457
- ></empty-placeholder>
450
+ return html `
451
+ <empty-placeholder
452
+ .placeholderType=${this.placeholderType}
453
+ ?isMobileView=${this.mobileView}
454
+ ?isCollection=${!!this.withinCollection}
455
+ .detailMessage=${this.dataSource.queryErrorMessage ?? ''}
456
+ .baseNavigationUrl=${this.baseNavigationUrl}
457
+ ></empty-placeholder>
458
458
  `;
459
459
  }
460
460
  /**
461
461
  * Top-level template for rendering the left (facets) and right (results) columns.
462
462
  */
463
463
  get collectionBrowserTemplate() {
464
- return html `
465
- <div id="left-column-scroll-sentinel"></div>
466
- ${this.leftColumnTemplate} ${this.rightColumnTemplate}
464
+ return html `
465
+ <div id="left-column-scroll-sentinel"></div>
466
+ ${this.leftColumnTemplate} ${this.rightColumnTemplate}
467
467
  `;
468
468
  }
469
469
  /**
@@ -482,33 +482,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
482
482
  * accordion-style facets.
483
483
  */
484
484
  get mobileLeftColumnTemplate() {
485
- return html `
486
- <div
487
- id="left-column"
488
- class="column${this.isResizeToMobile ? ' preload' : ''}"
489
- >
490
- ${this.facetTopViewSlot} ${this.resultsCountTemplate}
491
- <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
492
- </div>
485
+ return html `
486
+ <div
487
+ id="left-column"
488
+ class="column${this.isResizeToMobile ? ' preload' : ''}"
489
+ >
490
+ ${this.facetTopViewSlot} ${this.resultsCountTemplate}
491
+ <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
492
+ </div>
493
493
  `;
494
494
  }
495
495
  /**
496
496
  * Template for the desktop version of the left column, displaying the facets sidebar.
497
497
  */
498
498
  get desktopLeftColumnTemplate() {
499
- return html `
500
- <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
501
- ${this.facetTopViewSlot}
502
- <div id="facets-header-container">
503
- <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
504
- ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
505
- </div>
506
- <div id="facets-container" aria-labelledby="facets-header">
507
- ${this.facetsTemplate}
508
- <div id="facets-scroll-sentinel"></div>
509
- </div>
510
- <div id="facets-bottom-fade"></div>
511
- </div>
499
+ return html `
500
+ <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
501
+ ${this.facetTopViewSlot}
502
+ <div id="facets-header-container">
503
+ <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
504
+ ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
505
+ </div>
506
+ <div id="facets-container" aria-labelledby="facets-header">
507
+ ${this.facetsTemplate}
508
+ <div id="facets-scroll-sentinel"></div>
509
+ </div>
510
+ <div id="facets-bottom-fade"></div>
511
+ </div>
512
512
  `;
513
513
  }
514
514
  /**
@@ -516,8 +516,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
516
516
  * - mainly used to render userlists
517
517
  */
518
518
  get facetTopViewSlot() {
519
- return html `<div id="facet-top-view">
520
- <slot name="facet-top-slot"></slot>
519
+ return html `<div id="facet-top-view">
520
+ <slot name="facet-top-slot"></slot>
521
521
  </div>`;
522
522
  }
523
523
  /**
@@ -532,15 +532,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
532
532
  const resultsCount = this.totalResults?.toLocaleString();
533
533
  const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
534
534
  // Added data-testid for Playwright testing
535
- return html `
536
- <div id="results-total" class=${classes} data-testid="results-total">
537
- <span id="big-results-count">
538
- ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
539
- </span>
540
- <span id="big-results-label">
541
- ${shouldShowSearching ? nothing : resultsLabel}
542
- </span>
543
- </div>
535
+ return html `
536
+ <div id="results-total" class=${classes} data-testid="results-total">
537
+ <span id="big-results-count">
538
+ ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
539
+ </span>
540
+ <span id="big-results-label">
541
+ ${shouldShowSearching ? nothing : resultsLabel}
542
+ </span>
543
+ </div>
544
544
  `;
545
545
  }
546
546
  /**
@@ -553,45 +553,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
553
553
  'full-width': !this.facetPaneVisible,
554
554
  'smart-results-spacing': !!this.showSmartResults,
555
555
  });
556
- return html `
557
- <div id="right-column" class=${rightColumnClasses}>
556
+ return html `
557
+ <div id="right-column" class=${rightColumnClasses}>
558
558
  ${this.showSmartResults
559
559
  ? html `<slot name="smart-results"></slot>`
560
- : nothing}
561
- <section id="results">
562
- <h2 class="results-section-heading">
563
- <slot name="results-heading"></slot>
564
- </h2>
565
- <div id="cb-top-view">
566
- <slot name="cb-top-slot"></slot>
567
- </div>
560
+ : nothing}
561
+ <section id="results">
562
+ <h2 class="results-section-heading">
563
+ <slot name="results-heading"></slot>
564
+ </h2>
565
+ <div id="cb-top-view">
566
+ <slot name="cb-top-slot"></slot>
567
+ </div>
568
568
  ${this.isManageView
569
569
  ? this.manageBarTemplate
570
- : this.sortFilterBarTemplate}
571
- <slot name="cb-results"></slot>
570
+ : this.sortFilterBarTemplate}
571
+ <slot name="cb-results"></slot>
572
572
  ${this.displayMode === `list-compact` && this.totalResults
573
573
  ? this.listHeaderTemplate
574
- : nothing}
575
- ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
576
- </section>
577
- </div>
574
+ : nothing}
575
+ ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
576
+ </section>
577
+ </div>
578
578
  `;
579
579
  }
580
580
  /**
581
581
  * Template for the infinite scroller widget that contains the result tiles.
582
582
  */
583
583
  get infiniteScrollerTemplate() {
584
- return html `<infinite-scroller
585
- class=${this.infiniteScrollerClasses}
586
- itemCount=${this.placeholderType ? 0 : nothing}
587
- ariaLandmarkLabel="Search results"
588
- .cellProvider=${this}
589
- .placeholderCellTemplate=${this.placeholderCellTemplate}
590
- @scrollThresholdReached=${this.scrollThresholdReached}
591
- @visibleCellsChanged=${this.visibleCellsChanged}
584
+ return html `<infinite-scroller
585
+ class=${this.infiniteScrollerClasses}
586
+ itemCount=${this.placeholderType ? 0 : nothing}
587
+ ariaLandmarkLabel="Search results"
588
+ .cellProvider=${this}
589
+ .placeholderCellTemplate=${this.placeholderCellTemplate}
590
+ @scrollThresholdReached=${this.scrollThresholdReached}
591
+ @visibleCellsChanged=${this.visibleCellsChanged}
592
592
  >${this.displayMode === 'grid'
593
593
  ? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
594
- : nothing}
594
+ : nothing}
595
595
  </infinite-scroller>`;
596
596
  }
597
597
  /**
@@ -623,29 +623,29 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
623
623
  }
624
624
  // We only show relevance sort if a search query is currently defined
625
625
  sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
626
- return html `
627
- <sort-filter-bar
628
- .defaultSortField=${this.defaultSortField}
629
- .defaultSortDirection=${this.defaultSortDirection}
630
- .selectedSort=${this.selectedSort}
631
- .sortDirection=${this.sortDirection}
632
- .sortFieldAvailability=${sortFieldAvailability}
633
- .displayMode=${this.displayMode}
634
- .selectedTitleFilter=${this.selectedTitleFilter}
635
- .selectedCreatorFilter=${this.selectedCreatorFilter}
636
- .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
637
- .enableSortOptionsSlot=${this.enableSortOptionsSlot}
638
- .suppressDisplayModes=${this.suppressDisplayModes}
639
- @sortChanged=${this.userChangedSort}
640
- @displayModeChanged=${this.displayModeChanged}
641
- @titleLetterChanged=${this.titleLetterSelected}
642
- @creatorLetterChanged=${this.creatorLetterSelected}
643
- >
644
- ${this.tileBlurCheckboxTemplate}
645
- <slot name="sort-options-left" slot="sort-options-left"></slot>
646
- <slot name="sort-options" slot="sort-options"></slot>
647
- <slot name="sort-options-right" slot="sort-options-right"></slot>
648
- </sort-filter-bar>
626
+ return html `
627
+ <sort-filter-bar
628
+ .defaultSortField=${this.defaultSortField}
629
+ .defaultSortDirection=${this.defaultSortDirection}
630
+ .selectedSort=${this.selectedSort}
631
+ .sortDirection=${this.sortDirection}
632
+ .sortFieldAvailability=${sortFieldAvailability}
633
+ .displayMode=${this.displayMode}
634
+ .selectedTitleFilter=${this.selectedTitleFilter}
635
+ .selectedCreatorFilter=${this.selectedCreatorFilter}
636
+ .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
637
+ .enableSortOptionsSlot=${this.enableSortOptionsSlot}
638
+ .suppressDisplayModes=${this.suppressDisplayModes}
639
+ @sortChanged=${this.userChangedSort}
640
+ @displayModeChanged=${this.displayModeChanged}
641
+ @titleLetterChanged=${this.titleLetterSelected}
642
+ @creatorLetterChanged=${this.creatorLetterSelected}
643
+ >
644
+ ${this.tileBlurCheckboxTemplate}
645
+ <slot name="sort-options-left" slot="sort-options-left"></slot>
646
+ <slot name="sort-options" slot="sort-options"></slot>
647
+ <slot name="sort-options-right" slot="sort-options-right"></slot>
648
+ </sort-filter-bar>
649
649
  `;
650
650
  }
651
651
  /**
@@ -656,20 +656,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
656
656
  // Only show the checkbox for @archive.org users
657
657
  if (!this.dataSource.sessionContext?.is_archive_user)
658
658
  return nothing;
659
- return html `
660
- <label
661
- id="tile-blur-label"
662
- for="tile-blur-check"
663
- slot="sort-options-right"
664
- >
665
- ${msg('Blurring')}
666
- <input
667
- id="tile-blur-check"
668
- type="checkbox"
669
- ?checked=${!this.shouldSuppressTileBlurring}
670
- @change=${this.tileBlurCheckboxChanged}
671
- />
672
- </label>
659
+ return html `
660
+ <label
661
+ id="tile-blur-label"
662
+ for="tile-blur-check"
663
+ slot="sort-options-right"
664
+ >
665
+ ${msg('Blurring')}
666
+ <input
667
+ id="tile-blur-check"
668
+ type="checkbox"
669
+ ?checked=${!this.shouldSuppressTileBlurring}
670
+ @change=${this.tileBlurCheckboxChanged}
671
+ />
672
+ </label>
673
673
  `;
674
674
  }
675
675
  /**
@@ -695,27 +695,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
695
695
  * showing the management view. This generally replaces the sort bar when present.
696
696
  */
697
697
  get manageBarTemplate() {
698
- return html `
699
- <manage-bar
700
- .label=${this.manageViewLabel}
701
- .modalManager=${this.modalManager}
702
- .selectedItems=${this.dataSource.checkedTileModels}
703
- .manageViewModalMsg=${this.manageViewModalMsg}
704
- showSelectAll
705
- showUnselectAll
706
- ?showItemManageButton=${this.pageContext === 'search'}
707
- ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
708
- @removeItems=${this.handleRemoveItems}
709
- @manageItems=${this.handleManageItems}
710
- @selectAll=${() => this.dataSource.checkAllTiles()}
711
- @unselectAll=${() => this.dataSource.uncheckAllTiles()}
698
+ return html `
699
+ <manage-bar
700
+ .label=${this.manageViewLabel}
701
+ .modalManager=${this.modalManager}
702
+ .selectedItems=${this.dataSource.checkedTileModels}
703
+ .manageViewModalMsg=${this.manageViewModalMsg}
704
+ showSelectAll
705
+ showUnselectAll
706
+ ?showItemManageButton=${this.pageContext === 'search'}
707
+ ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
708
+ @removeItems=${this.handleRemoveItems}
709
+ @manageItems=${this.handleManageItems}
710
+ @selectAll=${() => this.dataSource.checkAllTiles()}
711
+ @unselectAll=${() => this.dataSource.uncheckAllTiles()}
712
712
  @cancel=${() => {
713
713
  this.isManageView = false;
714
714
  this.dataSource.uncheckAllTiles();
715
715
  if (this.searchResultsLoading)
716
716
  this.dataSource.resetPages();
717
- }}
718
- ></manage-bar>
717
+ }}
718
+ ></manage-bar>
719
719
  `;
720
720
  }
721
721
  /**
@@ -950,15 +950,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
950
950
  label: target.open ? 'open' : 'closed',
951
951
  });
952
952
  };
953
- return html `
954
- <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
955
- <summary>
956
- <span class="collapser-icon">${chevronIcon}</span>
957
- <h2>${msg('Filters')}</h2>
958
- ${this.clearFiltersBtnTemplate(true)}
959
- </summary>
960
- ${this.facetsTemplate}
961
- </details>
953
+ return html `
954
+ <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
955
+ <summary>
956
+ <span class="collapser-icon">${chevronIcon}</span>
957
+ <h2>${msg('Filters')}</h2>
958
+ ${this.clearFiltersBtnTemplate(true)}
959
+ </summary>
960
+ ${this.facetsTemplate}
961
+ </details>
962
962
  `;
963
963
  }
964
964
  /**
@@ -1042,50 +1042,50 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1042
1042
  const filterByNetworkLabel = msg('Filter by Network');
1043
1043
  const filterByShowLabel = msg('Filter by Show');
1044
1044
  const shows = showEntries.map(([show]) => show);
1045
- const loadingIndicator = html `
1046
- <span slot="empty-options">
1047
- <img src="https://archive.org/images/loading.gif" />
1048
- </span>
1045
+ const loadingIndicator = html `
1046
+ <span slot="empty-options">
1047
+ <img src="https://archive.org/images/loading.gif" />
1048
+ </span>
1049
1049
  `;
1050
- const errorMessage = html `
1051
- <span slot="empty-options">
1052
- ${msg('Unable to fetch options, try again later')}
1053
- </span>
1050
+ const errorMessage = html `
1051
+ <span slot="empty-options">
1052
+ ${msg('Unable to fetch options, try again later')}
1053
+ </span>
1054
1054
  `;
1055
- return html `
1056
- <div id="tv-filters" slot="facets-top">
1057
- <ia-combo-box
1058
- id="tv-networks"
1059
- class="tv-filter-dropdown"
1060
- placeholder=${filterByNetworkLabel}
1061
- clearable
1062
- wrap-arrow-keys
1063
- sort
1064
- .options=${networks.map((n, i) => ({ id: `network-${i}`, text: n }))}
1065
- @toggle=${this.tvDropdownToggled}
1066
- @change=${this.networksDropdownChanged}
1067
- >
1068
- <span slot="label" class="sr-only">${filterByNetworkLabel}</span>
1069
- ${this.tvMapsLoading ? loadingIndicator : nothing}
1070
- ${this.tvMapsErrored ? errorMessage : nothing}
1071
- </ia-combo-box>
1072
- <ia-combo-box
1073
- id="tv-shows"
1074
- class="tv-filter-dropdown"
1075
- placeholder=${filterByShowLabel}
1076
- max-autocomplete-entries="500"
1077
- clearable
1078
- wrap-arrow-keys
1079
- sort
1080
- .options=${shows.map((s, i) => ({ id: `show-${i}`, text: s }))}
1081
- @toggle=${this.tvDropdownToggled}
1082
- @change=${this.showsDropdownChanged}
1083
- >
1084
- <span slot="label" class="sr-only">${filterByShowLabel}</span>
1085
- ${this.tvMapsLoading ? loadingIndicator : nothing}
1086
- ${this.tvMapsErrored ? errorMessage : nothing}
1087
- </ia-combo-box>
1088
- </div>
1055
+ return html `
1056
+ <div id="tv-filters" slot="facets-top">
1057
+ <ia-combo-box
1058
+ id="tv-networks"
1059
+ class="tv-filter-dropdown"
1060
+ placeholder=${filterByNetworkLabel}
1061
+ clearable
1062
+ wrap-arrow-keys
1063
+ sort
1064
+ .options=${networks.map((n, i) => ({ id: `network-${i}`, text: n }))}
1065
+ @toggle=${this.tvDropdownToggled}
1066
+ @change=${this.networksDropdownChanged}
1067
+ >
1068
+ <span slot="label" class="sr-only">${filterByNetworkLabel}</span>
1069
+ ${this.tvMapsLoading ? loadingIndicator : nothing}
1070
+ ${this.tvMapsErrored ? errorMessage : nothing}
1071
+ </ia-combo-box>
1072
+ <ia-combo-box
1073
+ id="tv-shows"
1074
+ class="tv-filter-dropdown"
1075
+ placeholder=${filterByShowLabel}
1076
+ max-autocomplete-entries="500"
1077
+ clearable
1078
+ wrap-arrow-keys
1079
+ sort
1080
+ .options=${shows.map((s, i) => ({ id: `show-${i}`, text: s }))}
1081
+ @toggle=${this.tvDropdownToggled}
1082
+ @change=${this.showsDropdownChanged}
1083
+ >
1084
+ <span slot="label" class="sr-only">${filterByShowLabel}</span>
1085
+ ${this.tvMapsLoading ? loadingIndicator : nothing}
1086
+ ${this.tvMapsErrored ? errorMessage : nothing}
1087
+ </ia-combo-box>
1088
+ </div>
1089
1089
  `;
1090
1090
  }
1091
1091
  /**
@@ -1095,10 +1095,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1095
1095
  if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
1096
1096
  return nothing;
1097
1097
  if (this.facetLoadStrategy === 'off') {
1098
- return html `
1099
- <p class="facets-message">
1100
- ${msg('Facets are temporarily unavailable.')}
1101
- </p>
1098
+ return html `
1099
+ <p class="facets-message">
1100
+ ${msg('Facets are temporarily unavailable.')}
1101
+ </p>
1102
1102
  `;
1103
1103
  }
1104
1104
  // We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
@@ -1107,46 +1107,46 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1107
1107
  const facetDisplayOrder = shouldUseTvInterface
1108
1108
  ? tvFacetDisplayOrder
1109
1109
  : defaultFacetDisplayOrder;
1110
- const facets = html `
1111
- <collection-facets
1112
- .collectionPagePath=${this.collectionPagePath}
1113
- .parentCollections=${this.dataSource.parentCollections}
1114
- .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
1115
- .searchService=${this.searchService}
1116
- .featureFeedbackService=${this.featureFeedbackService}
1117
- .recaptchaManager=${this.recaptchaManager}
1118
- .resizeObserver=${this.resizeObserver}
1119
- .searchType=${this.searchType}
1120
- .aggregations=${this.dataSource.aggregations}
1121
- .histogramAggregation=${this.dataSource.histogramAggregation}
1122
- .minSelectedDate=${this.minSelectedDate}
1123
- .maxSelectedDate=${this.maxSelectedDate}
1124
- .selectedFacets=${this.selectedFacets}
1125
- .baseNavigationUrl=${this.baseNavigationUrl}
1126
- .collectionTitles=${this.dataSource.collectionTitles}
1127
- .tvChannelAliases=${this.dataSource.tvChannelAliases}
1128
- .showHistogramDatePicker=${this.showHistogramDatePicker}
1129
- .allowExpandingDatePicker=${!this.mobileView}
1130
- .allowDatePickerMonths=${shouldUseTvInterface}
1131
- .contentWidth=${this.contentWidth}
1132
- .query=${this.baseQuery}
1133
- .identifiers=${this.identifiers}
1134
- .filterMap=${this.dataSource.filterMap}
1135
- .isManageView=${this.isManageView}
1136
- .modalManager=${this.modalManager}
1137
- .analyticsHandler=${this.analyticsHandler}
1138
- .facetDisplayOrder=${facetDisplayOrder}
1139
- .isTvSearch=${shouldUseTvInterface}
1140
- ?collapsableFacets=${this.mobileView}
1141
- ?facetsLoading=${this.facetsLoading}
1142
- ?histogramAggregationLoading=${this.facetsLoading}
1143
- ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1144
- @facetClick=${this.facetClickHandler}
1145
- @facetsChanged=${this.facetsChanged}
1146
- @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1147
- >
1148
- ${this.tvDropdownFiltersTemplate}
1149
- </collection-facets>
1110
+ const facets = html `
1111
+ <collection-facets
1112
+ .collectionPagePath=${this.collectionPagePath}
1113
+ .parentCollections=${this.dataSource.parentCollections}
1114
+ .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
1115
+ .searchService=${this.searchService}
1116
+ .featureFeedbackService=${this.featureFeedbackService}
1117
+ .recaptchaManager=${this.recaptchaManager}
1118
+ .resizeObserver=${this.resizeObserver}
1119
+ .searchType=${this.searchType}
1120
+ .aggregations=${this.dataSource.aggregations}
1121
+ .histogramAggregation=${this.dataSource.histogramAggregation}
1122
+ .minSelectedDate=${this.minSelectedDate}
1123
+ .maxSelectedDate=${this.maxSelectedDate}
1124
+ .selectedFacets=${this.selectedFacets}
1125
+ .baseNavigationUrl=${this.baseNavigationUrl}
1126
+ .collectionTitles=${this.dataSource.collectionTitles}
1127
+ .tvChannelAliases=${this.dataSource.tvChannelAliases}
1128
+ .showHistogramDatePicker=${this.showHistogramDatePicker}
1129
+ .allowExpandingDatePicker=${!this.mobileView}
1130
+ .allowDatePickerMonths=${shouldUseTvInterface}
1131
+ .contentWidth=${this.contentWidth}
1132
+ .query=${this.baseQuery}
1133
+ .identifiers=${this.identifiers}
1134
+ .filterMap=${this.dataSource.filterMap}
1135
+ .isManageView=${this.isManageView}
1136
+ .modalManager=${this.modalManager}
1137
+ .analyticsHandler=${this.analyticsHandler}
1138
+ .facetDisplayOrder=${facetDisplayOrder}
1139
+ .isTvSearch=${shouldUseTvInterface}
1140
+ ?collapsableFacets=${this.mobileView}
1141
+ ?facetsLoading=${this.facetsLoading}
1142
+ ?histogramAggregationLoading=${this.facetsLoading}
1143
+ ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1144
+ @facetClick=${this.facetClickHandler}
1145
+ @facetsChanged=${this.facetsChanged}
1146
+ @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1147
+ >
1148
+ ${this.tvDropdownFiltersTemplate}
1149
+ </collection-facets>
1150
1150
  `;
1151
1151
  // If we are using one of the opt-in facet load strategies, we may need to wrap the
1152
1152
  // desktop view facets in a <details> widget so that patrons can opt into loading them.
@@ -1154,20 +1154,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1154
1154
  const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
1155
1155
  (this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
1156
1156
  if (showDesktopOptInWidget && !this.mobileView) {
1157
- return html `
1158
- <details
1159
- class="desktop-facets-dropdown"
1157
+ return html `
1158
+ <details
1159
+ class="desktop-facets-dropdown"
1160
1160
  @toggle=${(e) => {
1161
1161
  const target = e.target;
1162
1162
  this.collapsibleFacetsVisible = target.open;
1163
- }}
1164
- >
1165
- <summary>
1166
- <span class="collapser-icon">${chevronIcon}</span>
1167
- <h2>${msg('Filters')}</h2>
1168
- </summary>
1169
- ${facets}
1170
- </details>
1163
+ }}
1164
+ >
1165
+ <summary>
1166
+ <span class="collapser-icon">${chevronIcon}</span>
1167
+ <h2>${msg('Filters')}</h2>
1168
+ </summary>
1169
+ ${facets}
1170
+ </details>
1171
1171
  `;
1172
1172
  }
1173
1173
  // Otherwise, just render the facets component bare
@@ -1187,34 +1187,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1187
1187
  mobile,
1188
1188
  });
1189
1189
  const buttonText = mobile ? 'Clear all' : 'Clear all filters';
1190
- return html `
1191
- <div class="clear-filters-btn-row">
1190
+ return html `
1191
+ <div class="clear-filters-btn-row">
1192
1192
  ${mobile
1193
1193
  ? html `<span class="clear-filters-btn-separator">&nbsp;</span>`
1194
- : nothing}
1195
- <button class=${buttonClasses} @click=${this.clearFilters}>
1196
- ${buttonText}
1197
- </button>
1198
- </div>
1194
+ : nothing}
1195
+ <button class=${buttonClasses} @click=${this.clearFilters}>
1196
+ ${buttonText}
1197
+ </button>
1198
+ </div>
1199
1199
  `;
1200
1200
  }
1201
1201
  /**
1202
1202
  * Template for the table header content that appears atop the compact list view.
1203
1203
  */
1204
1204
  get listHeaderTemplate() {
1205
- return html `
1206
- <div id="list-header">
1207
- <tile-dispatcher
1208
- .tileDisplayMode=${'list-header'}
1209
- .resizeObserver=${this.resizeObserver}
1210
- .sortParam=${this.sortParam}
1211
- .defaultSortParam=${this.defaultSortParam}
1212
- .mobileBreakpoint=${this.mobileBreakpoint}
1213
- .loggedIn=${this.loggedIn}
1214
- .suppressBlurring=${this.shouldSuppressTileBlurring}
1215
- >
1216
- </tile-dispatcher>
1217
- </div>
1205
+ return html `
1206
+ <div id="list-header">
1207
+ <tile-dispatcher
1208
+ .tileDisplayMode=${'list-header'}
1209
+ .resizeObserver=${this.resizeObserver}
1210
+ .sortParam=${this.sortParam}
1211
+ .defaultSortParam=${this.defaultSortParam}
1212
+ .mobileBreakpoint=${this.mobileBreakpoint}
1213
+ .loggedIn=${this.loggedIn}
1214
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1215
+ >
1216
+ </tile-dispatcher>
1217
+ </div>
1218
1218
  `;
1219
1219
  }
1220
1220
  /**
@@ -1969,28 +1969,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1969
1969
  const isRadioSearch = this.searchType === SearchType.RADIO;
1970
1970
  const { isTVCollection, isRadioCollection } = this;
1971
1971
  const shouldUseLocalTime = isTVSearch || isRadioSearch || isTVCollection || isRadioCollection;
1972
- return html `
1973
- <tile-dispatcher
1974
- .collectionPagePath=${this.collectionPagePath}
1975
- .baseNavigationUrl=${this.baseNavigationUrl}
1976
- .baseImageUrl=${this.baseImageUrl}
1977
- .model=${model}
1978
- .tileDisplayMode=${this.displayMode}
1979
- .resizeObserver=${this.resizeObserver}
1980
- .collectionTitles=${this.dataSource.collectionTitles}
1981
- .sortParam=${this.sortParam}
1982
- .defaultSortParam=${this.defaultSortParam}
1983
- .creatorFilter=${this.selectedCreatorFilter}
1984
- .mobileBreakpoint=${this.mobileBreakpoint}
1985
- .loggedIn=${this.loggedIn}
1986
- .suppressBlurring=${this.shouldSuppressTileBlurring}
1987
- .isManageView=${this.isManageView}
1988
- ?showTvClips=${isTVSearch || isTVCollection}
1989
- ?enableHoverPane=${true}
1990
- ?useLocalTime=${shouldUseLocalTime}
1991
- @resultSelected=${(e) => this.resultSelected(e)}
1992
- >
1993
- </tile-dispatcher>
1972
+ return html `
1973
+ <tile-dispatcher
1974
+ .collectionPagePath=${this.collectionPagePath}
1975
+ .baseNavigationUrl=${this.baseNavigationUrl}
1976
+ .baseImageUrl=${this.baseImageUrl}
1977
+ .model=${model}
1978
+ .tileDisplayMode=${this.displayMode}
1979
+ .resizeObserver=${this.resizeObserver}
1980
+ .collectionTitles=${this.dataSource.collectionTitles}
1981
+ .sortParam=${this.sortParam}
1982
+ .defaultSortParam=${this.defaultSortParam}
1983
+ .creatorFilter=${this.selectedCreatorFilter}
1984
+ .mobileBreakpoint=${this.mobileBreakpoint}
1985
+ .loggedIn=${this.loggedIn}
1986
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1987
+ .isManageView=${this.isManageView}
1988
+ ?showTvClips=${isTVSearch || isTVCollection}
1989
+ ?enableHoverPane=${true}
1990
+ ?useLocalTime=${shouldUseLocalTime}
1991
+ @resultSelected=${(e) => this.resultSelected(e)}
1992
+ >
1993
+ </tile-dispatcher>
1994
1994
  `;
1995
1995
  }
1996
1996
  /**
@@ -2025,479 +2025,479 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
2025
2025
  static get styles() {
2026
2026
  return [
2027
2027
  srOnlyStyle,
2028
- css `
2029
- :host {
2030
- display: block;
2031
- --leftColumnWidth: 18rem;
2032
- --leftColumnPaddingTop: 2rem;
2033
- --leftColumnPaddingRight: 2.5rem;
2034
- }
2035
-
2036
- #facet-top-view {
2037
- display: flex;
2038
- }
2039
-
2040
- /**
2041
- * When page width resizes from desktop to mobile, use this class to
2042
- * disable expand/collapse transition when loading.
2043
- */
2044
- .preload * {
2045
- transition: none !important;
2046
- -webkit-transition: none !important;
2047
- -moz-transition: none !important;
2048
- -ms-transition: none !important;
2049
- -o-transition: none !important;
2050
- }
2051
-
2052
- #content-container {
2053
- display: flex;
2054
- }
2055
-
2056
- empty-placeholder {
2057
- margin-top: var(--placeholderMarginTop, 0);
2058
- }
2059
-
2060
- .collapser-icon {
2061
- display: inline-block;
2062
- }
2063
-
2064
- .collapser-icon svg {
2065
- display: inline-block;
2066
- width: 12px;
2067
- height: 12px;
2068
- transition: transform 0.2s ease-out;
2069
- }
2070
-
2071
- #mobile-filter-collapse {
2072
- width: 100%;
2073
- }
2074
-
2075
- #mobile-filter-collapse > summary {
2076
- cursor: pointer;
2077
- list-style: none;
2078
- }
2079
-
2080
- #mobile-filter-collapse[open] > summary {
2081
- margin-bottom: 10px;
2082
- }
2083
-
2084
- #mobile-filter-collapse h2 {
2085
- display: inline-block;
2086
- margin: 0;
2087
- font-size: 2rem;
2088
- }
2089
-
2090
- #mobile-filter-collapse[open] svg {
2091
- transform: rotate(90deg);
2092
- }
2093
-
2094
- #content-container.mobile {
2095
- display: block;
2096
- }
2097
-
2098
- #right-column {
2099
- flex: 1;
2100
- position: relative;
2101
- min-height: 90vh;
2102
- border-right: 1px solid rgb(232, 232, 232);
2103
- margin-top: var(--rightColumnMarginTop, 0);
2104
- padding-top: var(--rightColumnPaddingTop, 2rem);
2105
- background: #fff;
2106
- }
2107
-
2108
- #left-column:not([hidden]) + #right-column {
2109
- border-left: 1px solid rgb(232, 232, 232);
2110
- }
2111
-
2112
- #right-column.smart-results-spacing {
2113
- padding-top: 0.5rem;
2114
- border-right: none;
2115
- background: transparent;
2116
- min-width: 0;
2117
- }
2118
-
2119
- #results {
2120
- background: #fff;
2121
- padding-left: 1rem;
2122
- padding-right: 1rem;
2123
- }
2124
-
2125
- #right-column.smart-results-spacing #results {
2126
- border-radius: 10px 10px 0px 0px;
2127
- padding-top: 0.5rem;
2128
- margin-top: 1rem;
2129
- }
2130
-
2131
- .mobile #right-column {
2132
- border-left: none;
2133
- }
2134
-
2135
- .mobile #results {
2136
- padding: 5px 5px 0;
2137
- }
2138
-
2139
- #left-column {
2140
- width: var(--leftColumnWidth, 18rem);
2141
- /* Prevents Safari from shrinking col at first draw */
2142
- min-width: var(--leftColumnWidth, 18rem);
2143
- padding-top: var(--leftColumnPaddingTop, 2rem);
2144
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
2145
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
2146
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
2147
- z-index: 1;
2148
- }
2149
-
2150
- .desktop #left-column {
2151
- top: 0;
2152
- position: sticky;
2153
- height: calc(100vh - 2rem);
2154
- max-height: calc(100vh - 2rem);
2155
- overflow-x: hidden;
2156
- overflow-y: scroll;
2157
-
2158
- /*
2159
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
2160
- * does at least give us a tiny bit of control over width & color.
2161
- */
2162
- scrollbar-width: thin;
2163
- scrollbar-color: transparent transparent;
2164
- }
2165
- .desktop #left-column:hover {
2166
- scrollbar-color: auto;
2167
- }
2168
- .desktop #left-column::-webkit-scrollbar {
2169
- appearance: none;
2170
- width: 6px;
2171
- }
2172
- .desktop #left-column::-webkit-scrollbar-button {
2173
- height: 3px;
2174
- background: transparent;
2175
- }
2176
- .desktop #left-column::-webkit-scrollbar-corner {
2177
- background: transparent;
2178
- }
2179
- .desktop #left-column::-webkit-scrollbar-thumb {
2180
- border-radius: 4px;
2181
- }
2182
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
2183
- background: rgba(0, 0, 0, 0.15);
2184
- }
2185
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2186
- background: rgba(0, 0, 0, 0.2);
2187
- }
2188
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2189
- background: rgba(0, 0, 0, 0.3);
2190
- }
2191
-
2192
- #facets-bottom-fade {
2193
- background: linear-gradient(
2194
- to bottom,
2195
- #fbfbfd00 0%,
2196
- #fbfbfdc0 50%,
2197
- #fbfbfd 80%,
2198
- #fbfbfd 100%
2199
- );
2200
- position: fixed;
2201
- bottom: 0;
2202
- height: 50px;
2203
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
2204
- width: calc(
2205
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2206
- );
2207
- z-index: 2;
2208
- pointer-events: none;
2209
- transition: height 0.1s ease;
2210
- }
2211
- #facets-bottom-fade.hidden {
2212
- height: 0;
2213
- }
2214
-
2215
- .facets-message {
2216
- font-size: 1.4rem;
2217
- }
2218
-
2219
- .desktop-facets-dropdown > summary {
2220
- cursor: pointer;
2221
- list-style: none;
2222
- }
2223
-
2224
- .desktop-facets-dropdown h2 {
2225
- display: inline-block;
2226
- margin: 0;
2227
- font-size: 1.6rem;
2228
- }
2229
-
2230
- .desktop-facets-dropdown[open] > summary {
2231
- margin-bottom: 10px;
2232
- }
2233
-
2234
- .desktop-facets-dropdown[open] svg {
2235
- transform: rotate(90deg);
2236
- }
2237
-
2238
- .desktop #left-column-scroll-sentinel {
2239
- width: 1px;
2240
- height: 100vh;
2241
- background: transparent;
2242
- }
2243
-
2244
- .desktop #facets-scroll-sentinel {
2245
- width: 1px;
2246
- height: 1px;
2247
- background: transparent;
2248
- }
2249
-
2250
- #facets-header-container {
2251
- display: flex;
2252
- justify-content: space-between;
2253
- align-items: flex-start;
2254
- clear: both;
2255
- }
2256
-
2257
- .desktop #facets-header-container {
2258
- flex-wrap: wrap;
2259
- }
2260
-
2261
- .mobile #left-column {
2262
- width: 100%;
2263
- min-width: 0;
2264
- padding: 5px 0;
2265
- border: 0;
2266
- }
2267
-
2268
- .clear-filters-btn-row {
2269
- display: inline-block;
2270
- }
2271
-
2272
- .desktop .clear-filters-btn-row {
2273
- width: 100%;
2274
- }
2275
-
2276
- .clear-filters-btn {
2277
- display: inline-block;
2278
- appearance: none;
2279
- margin: 0;
2280
- padding: 0;
2281
- border: 0;
2282
- background: none;
2283
- color: var(--ia-theme-link-color);
2284
- font-size: 1.4rem;
2285
- font-family: inherit;
2286
- cursor: pointer;
2287
- }
2288
-
2289
- .clear-filters-btn:hover {
2290
- text-decoration: underline;
2291
- }
2292
-
2293
- .clear-filters-btn-separator {
2294
- display: inline-block;
2295
- margin-left: 5px;
2296
- border-left: 1px solid #2c2c2c;
2297
- font-size: 1.4rem;
2298
- line-height: 1.3rem;
2299
- }
2300
-
2301
- #tv-filters {
2302
- margin-bottom: 15px;
2303
- }
2304
-
2305
- #tv-shows {
2306
- --comboBoxListWidth: 300px;
2307
- }
2308
-
2309
- .tv-filter-dropdown {
2310
- display: block;
2311
- font-size: 14px;
2312
- margin-left: 1px;
2313
- margin-bottom: 5px;
2314
- }
2315
-
2316
- .tv-filter-dropdown::part(combo-box) {
2317
- outline-offset: 1px;
2318
- }
2319
-
2320
- .tv-filter-dropdown::part(option) {
2321
- line-height: 1.1;
2322
- padding: 7px;
2323
- }
2324
-
2325
- .tv-filter-dropdown::part(clear-button) {
2326
- flex: 0 0 26px;
2327
- --combo-box-clear-icon-size: 14px;
2328
- }
2329
-
2330
- .tv-filter-dropdown::part(icon) {
2331
- width: 1.4rem;
2332
- height: 1.4rem;
2333
- }
2334
-
2335
- #facets-container {
2336
- position: relative;
2337
- max-height: 0;
2338
- transition: max-height 0.2s ease-in-out;
2339
- z-index: 1;
2340
- margin-top: var(--facetsContainerMarginTop, 3rem);
2341
- padding-bottom: 2rem;
2342
- }
2343
-
2344
- .desktop #facets-container {
2345
- width: 18rem;
2346
- }
2347
-
2348
- .mobile #facets-container {
2349
- overflow: hidden;
2350
- padding-bottom: 0;
2351
- padding-left: 10px;
2352
- padding-right: 10px;
2353
- }
2354
-
2355
- #facets-container.expanded {
2356
- max-height: 2000px;
2357
- }
2358
-
2359
- .results-section-heading {
2360
- margin: 0.5rem 0.3rem;
2361
- font-size: 2rem;
2362
- line-height: 25px;
2363
- }
2364
-
2365
- #results-total {
2366
- display: flex;
2367
- align-items: baseline;
2368
- }
2369
-
2370
- #results-total:not(.filtered) {
2371
- padding-bottom: 2rem;
2372
- }
2373
-
2374
- .mobile #results-total {
2375
- position: absolute;
2376
- right: 10px;
2377
- }
2378
-
2379
- #big-results-count {
2380
- font-size: 2.4rem;
2381
- font-weight: 500;
2382
- margin-right: 5px;
2383
- }
2384
-
2385
- .mobile #big-results-count {
2386
- font-size: 2rem;
2387
- }
2388
-
2389
- #big-results-label {
2390
- font-size: 1.4rem;
2391
- font-weight: 200;
2392
- }
2393
-
2394
- #list-header {
2395
- max-height: 4.2rem;
2396
- }
2397
-
2398
- .loading-cover {
2399
- position: absolute;
2400
- top: 0;
2401
- left: 0;
2402
- width: 100%;
2403
- height: 100%;
2404
- display: flex;
2405
- justify-content: center;
2406
- z-index: 1;
2407
- padding-top: 50px;
2408
- }
2409
-
2410
- #tile-blur-label {
2411
- display: flex;
2412
- align-items: center;
2413
- column-gap: 5px;
2414
- }
2415
-
2416
- #tile-blur-check {
2417
- margin: 0 5px 0 0;
2418
- width: 15px;
2419
- }
2420
-
2421
- circular-activity-indicator {
2422
- width: 30px;
2423
- height: 30px;
2424
- }
2425
-
2426
- sort-filter-bar {
2427
- display: block;
2428
- margin-bottom: 4rem;
2429
- }
2430
-
2431
- infinite-scroller {
2432
- display: block;
2433
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2434
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2435
- }
2436
-
2437
- infinite-scroller.list-compact {
2438
- --infiniteScrollerCellMinWidth: var(
2439
- --collectionBrowserCellMinWidth,
2440
- 100%
2441
- );
2442
- --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2443
- --infiniteScrollerCellMaxHeight: 56px;
2444
- --infiniteScrollerRowGap: 10px;
2445
- }
2446
-
2447
- infinite-scroller.list-detail {
2448
- --infiniteScrollerCellMinWidth: var(
2449
- --collectionBrowserCellMinWidth,
2450
- 100%
2451
- );
2452
- --infiniteScrollerCellMinHeight: var(
2453
- --collectionBrowserCellMinHeight,
2454
- 5rem
2455
- );
2456
- /*
2457
- 30px in spec, compensating for a -4px margin
2458
- to align title with top of item image
2459
- src/tiles/list/tile-list.ts
2460
- */
2461
- --infiniteScrollerRowGap: 34px;
2462
- }
2463
-
2464
- .mobile infinite-scroller.list-detail {
2465
- --infiniteScrollerRowGap: 24px;
2466
- }
2467
-
2468
- infinite-scroller.grid {
2469
- --infiniteScrollerCellMinWidth: var(
2470
- --collectionBrowserCellMinWidth,
2471
- 17rem
2472
- );
2473
- --infiniteScrollerCellMaxWidth: var(
2474
- --collectionBrowserCellMaxWidth,
2475
- 1fr
2476
- );
2477
- }
2478
-
2479
- /* Allow tiles to shrink a bit further at smaller viewport widths */
2480
- @media screen and (max-width: 880px) {
2481
- infinite-scroller.grid {
2482
- --infiniteScrollerCellMinWidth: var(
2483
- --collectionBrowserCellMinWidth,
2484
- 15rem
2485
- );
2486
- }
2487
- }
2488
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2489
- @media screen and (max-width: 360px) {
2490
- infinite-scroller.grid {
2491
- --infiniteScrollerCellMinWidth: var(
2492
- --collectionBrowserCellMinWidth,
2493
- 12rem
2494
- );
2495
- }
2496
- }
2497
-
2498
- infinite-scroller.hidden {
2499
- display: none;
2500
- }
2028
+ css `
2029
+ :host {
2030
+ display: block;
2031
+ --leftColumnWidth: 18rem;
2032
+ --leftColumnPaddingTop: 2rem;
2033
+ --leftColumnPaddingRight: 2.5rem;
2034
+ }
2035
+
2036
+ #facet-top-view {
2037
+ display: flex;
2038
+ }
2039
+
2040
+ /**
2041
+ * When page width resizes from desktop to mobile, use this class to
2042
+ * disable expand/collapse transition when loading.
2043
+ */
2044
+ .preload * {
2045
+ transition: none !important;
2046
+ -webkit-transition: none !important;
2047
+ -moz-transition: none !important;
2048
+ -ms-transition: none !important;
2049
+ -o-transition: none !important;
2050
+ }
2051
+
2052
+ #content-container {
2053
+ display: flex;
2054
+ }
2055
+
2056
+ empty-placeholder {
2057
+ margin-top: var(--placeholderMarginTop, 0);
2058
+ }
2059
+
2060
+ .collapser-icon {
2061
+ display: inline-block;
2062
+ }
2063
+
2064
+ .collapser-icon svg {
2065
+ display: inline-block;
2066
+ width: 12px;
2067
+ height: 12px;
2068
+ transition: transform 0.2s ease-out;
2069
+ }
2070
+
2071
+ #mobile-filter-collapse {
2072
+ width: 100%;
2073
+ }
2074
+
2075
+ #mobile-filter-collapse > summary {
2076
+ cursor: pointer;
2077
+ list-style: none;
2078
+ }
2079
+
2080
+ #mobile-filter-collapse[open] > summary {
2081
+ margin-bottom: 10px;
2082
+ }
2083
+
2084
+ #mobile-filter-collapse h2 {
2085
+ display: inline-block;
2086
+ margin: 0;
2087
+ font-size: 2rem;
2088
+ }
2089
+
2090
+ #mobile-filter-collapse[open] svg {
2091
+ transform: rotate(90deg);
2092
+ }
2093
+
2094
+ #content-container.mobile {
2095
+ display: block;
2096
+ }
2097
+
2098
+ #right-column {
2099
+ flex: 1;
2100
+ position: relative;
2101
+ min-height: 90vh;
2102
+ border-right: 1px solid rgb(232, 232, 232);
2103
+ margin-top: var(--rightColumnMarginTop, 0);
2104
+ padding-top: var(--rightColumnPaddingTop, 2rem);
2105
+ background: #fff;
2106
+ }
2107
+
2108
+ #left-column:not([hidden]) + #right-column {
2109
+ border-left: 1px solid rgb(232, 232, 232);
2110
+ }
2111
+
2112
+ #right-column.smart-results-spacing {
2113
+ padding-top: 0.5rem;
2114
+ border-right: none;
2115
+ background: transparent;
2116
+ min-width: 0;
2117
+ }
2118
+
2119
+ #results {
2120
+ background: #fff;
2121
+ padding-left: 1rem;
2122
+ padding-right: 1rem;
2123
+ }
2124
+
2125
+ #right-column.smart-results-spacing #results {
2126
+ border-radius: 10px 10px 0px 0px;
2127
+ padding-top: 0.5rem;
2128
+ margin-top: 1rem;
2129
+ }
2130
+
2131
+ .mobile #right-column {
2132
+ border-left: none;
2133
+ }
2134
+
2135
+ .mobile #results {
2136
+ padding: 5px 5px 0;
2137
+ }
2138
+
2139
+ #left-column {
2140
+ width: var(--leftColumnWidth, 18rem);
2141
+ /* Prevents Safari from shrinking col at first draw */
2142
+ min-width: var(--leftColumnWidth, 18rem);
2143
+ padding-top: var(--leftColumnPaddingTop, 2rem);
2144
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
2145
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
2146
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
2147
+ z-index: 1;
2148
+ }
2149
+
2150
+ .desktop #left-column {
2151
+ top: 0;
2152
+ position: sticky;
2153
+ height: calc(100vh - 2rem);
2154
+ max-height: calc(100vh - 2rem);
2155
+ overflow-x: hidden;
2156
+ overflow-y: scroll;
2157
+
2158
+ /*
2159
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
2160
+ * does at least give us a tiny bit of control over width & color.
2161
+ */
2162
+ scrollbar-width: thin;
2163
+ scrollbar-color: transparent transparent;
2164
+ }
2165
+ .desktop #left-column:hover {
2166
+ scrollbar-color: auto;
2167
+ }
2168
+ .desktop #left-column::-webkit-scrollbar {
2169
+ appearance: none;
2170
+ width: 6px;
2171
+ }
2172
+ .desktop #left-column::-webkit-scrollbar-button {
2173
+ height: 3px;
2174
+ background: transparent;
2175
+ }
2176
+ .desktop #left-column::-webkit-scrollbar-corner {
2177
+ background: transparent;
2178
+ }
2179
+ .desktop #left-column::-webkit-scrollbar-thumb {
2180
+ border-radius: 4px;
2181
+ }
2182
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
2183
+ background: rgba(0, 0, 0, 0.15);
2184
+ }
2185
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2186
+ background: rgba(0, 0, 0, 0.2);
2187
+ }
2188
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2189
+ background: rgba(0, 0, 0, 0.3);
2190
+ }
2191
+
2192
+ #facets-bottom-fade {
2193
+ background: linear-gradient(
2194
+ to bottom,
2195
+ #fbfbfd00 0%,
2196
+ #fbfbfdc0 50%,
2197
+ #fbfbfd 80%,
2198
+ #fbfbfd 100%
2199
+ );
2200
+ position: fixed;
2201
+ bottom: 0;
2202
+ height: 50px;
2203
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
2204
+ width: calc(
2205
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2206
+ );
2207
+ z-index: 2;
2208
+ pointer-events: none;
2209
+ transition: height 0.1s ease;
2210
+ }
2211
+ #facets-bottom-fade.hidden {
2212
+ height: 0;
2213
+ }
2214
+
2215
+ .facets-message {
2216
+ font-size: 1.4rem;
2217
+ }
2218
+
2219
+ .desktop-facets-dropdown > summary {
2220
+ cursor: pointer;
2221
+ list-style: none;
2222
+ }
2223
+
2224
+ .desktop-facets-dropdown h2 {
2225
+ display: inline-block;
2226
+ margin: 0;
2227
+ font-size: 1.6rem;
2228
+ }
2229
+
2230
+ .desktop-facets-dropdown[open] > summary {
2231
+ margin-bottom: 10px;
2232
+ }
2233
+
2234
+ .desktop-facets-dropdown[open] svg {
2235
+ transform: rotate(90deg);
2236
+ }
2237
+
2238
+ .desktop #left-column-scroll-sentinel {
2239
+ width: 1px;
2240
+ height: 100vh;
2241
+ background: transparent;
2242
+ }
2243
+
2244
+ .desktop #facets-scroll-sentinel {
2245
+ width: 1px;
2246
+ height: 1px;
2247
+ background: transparent;
2248
+ }
2249
+
2250
+ #facets-header-container {
2251
+ display: flex;
2252
+ justify-content: space-between;
2253
+ align-items: flex-start;
2254
+ clear: both;
2255
+ }
2256
+
2257
+ .desktop #facets-header-container {
2258
+ flex-wrap: wrap;
2259
+ }
2260
+
2261
+ .mobile #left-column {
2262
+ width: 100%;
2263
+ min-width: 0;
2264
+ padding: 5px 0;
2265
+ border: 0;
2266
+ }
2267
+
2268
+ .clear-filters-btn-row {
2269
+ display: inline-block;
2270
+ }
2271
+
2272
+ .desktop .clear-filters-btn-row {
2273
+ width: 100%;
2274
+ }
2275
+
2276
+ .clear-filters-btn {
2277
+ display: inline-block;
2278
+ appearance: none;
2279
+ margin: 0;
2280
+ padding: 0;
2281
+ border: 0;
2282
+ background: none;
2283
+ color: var(--ia-theme-link-color);
2284
+ font-size: 1.4rem;
2285
+ font-family: inherit;
2286
+ cursor: pointer;
2287
+ }
2288
+
2289
+ .clear-filters-btn:hover {
2290
+ text-decoration: underline;
2291
+ }
2292
+
2293
+ .clear-filters-btn-separator {
2294
+ display: inline-block;
2295
+ margin-left: 5px;
2296
+ border-left: 1px solid #2c2c2c;
2297
+ font-size: 1.4rem;
2298
+ line-height: 1.3rem;
2299
+ }
2300
+
2301
+ #tv-filters {
2302
+ margin-bottom: 15px;
2303
+ }
2304
+
2305
+ #tv-shows {
2306
+ --comboBoxListWidth: 300px;
2307
+ }
2308
+
2309
+ .tv-filter-dropdown {
2310
+ display: block;
2311
+ font-size: 14px;
2312
+ margin-left: 1px;
2313
+ margin-bottom: 5px;
2314
+ }
2315
+
2316
+ .tv-filter-dropdown::part(combo-box) {
2317
+ outline-offset: 1px;
2318
+ }
2319
+
2320
+ .tv-filter-dropdown::part(option) {
2321
+ line-height: 1.1;
2322
+ padding: 7px;
2323
+ }
2324
+
2325
+ .tv-filter-dropdown::part(clear-button) {
2326
+ flex: 0 0 26px;
2327
+ --combo-box-clear-icon-size: 14px;
2328
+ }
2329
+
2330
+ .tv-filter-dropdown::part(icon) {
2331
+ width: 1.4rem;
2332
+ height: 1.4rem;
2333
+ }
2334
+
2335
+ #facets-container {
2336
+ position: relative;
2337
+ max-height: 0;
2338
+ transition: max-height 0.2s ease-in-out;
2339
+ z-index: 1;
2340
+ margin-top: var(--facetsContainerMarginTop, 3rem);
2341
+ padding-bottom: 2rem;
2342
+ }
2343
+
2344
+ .desktop #facets-container {
2345
+ width: 18rem;
2346
+ }
2347
+
2348
+ .mobile #facets-container {
2349
+ overflow: hidden;
2350
+ padding-bottom: 0;
2351
+ padding-left: 10px;
2352
+ padding-right: 10px;
2353
+ }
2354
+
2355
+ #facets-container.expanded {
2356
+ max-height: 2000px;
2357
+ }
2358
+
2359
+ .results-section-heading {
2360
+ margin: 0.5rem 0.3rem;
2361
+ font-size: 2rem;
2362
+ line-height: 25px;
2363
+ }
2364
+
2365
+ #results-total {
2366
+ display: flex;
2367
+ align-items: baseline;
2368
+ }
2369
+
2370
+ #results-total:not(.filtered) {
2371
+ padding-bottom: 2rem;
2372
+ }
2373
+
2374
+ .mobile #results-total {
2375
+ position: absolute;
2376
+ right: 10px;
2377
+ }
2378
+
2379
+ #big-results-count {
2380
+ font-size: 2.4rem;
2381
+ font-weight: 500;
2382
+ margin-right: 5px;
2383
+ }
2384
+
2385
+ .mobile #big-results-count {
2386
+ font-size: 2rem;
2387
+ }
2388
+
2389
+ #big-results-label {
2390
+ font-size: 1.4rem;
2391
+ font-weight: 200;
2392
+ }
2393
+
2394
+ #list-header {
2395
+ max-height: 4.2rem;
2396
+ }
2397
+
2398
+ .loading-cover {
2399
+ position: absolute;
2400
+ top: 0;
2401
+ left: 0;
2402
+ width: 100%;
2403
+ height: 100%;
2404
+ display: flex;
2405
+ justify-content: center;
2406
+ z-index: 1;
2407
+ padding-top: 50px;
2408
+ }
2409
+
2410
+ #tile-blur-label {
2411
+ display: flex;
2412
+ align-items: center;
2413
+ column-gap: 5px;
2414
+ }
2415
+
2416
+ #tile-blur-check {
2417
+ margin: 0 5px 0 0;
2418
+ width: 15px;
2419
+ }
2420
+
2421
+ circular-activity-indicator {
2422
+ width: 30px;
2423
+ height: 30px;
2424
+ }
2425
+
2426
+ sort-filter-bar {
2427
+ display: block;
2428
+ margin-bottom: 4rem;
2429
+ }
2430
+
2431
+ infinite-scroller {
2432
+ display: block;
2433
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2434
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2435
+ }
2436
+
2437
+ infinite-scroller.list-compact {
2438
+ --infiniteScrollerCellMinWidth: var(
2439
+ --collectionBrowserCellMinWidth,
2440
+ 100%
2441
+ );
2442
+ --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2443
+ --infiniteScrollerCellMaxHeight: 56px;
2444
+ --infiniteScrollerRowGap: 10px;
2445
+ }
2446
+
2447
+ infinite-scroller.list-detail {
2448
+ --infiniteScrollerCellMinWidth: var(
2449
+ --collectionBrowserCellMinWidth,
2450
+ 100%
2451
+ );
2452
+ --infiniteScrollerCellMinHeight: var(
2453
+ --collectionBrowserCellMinHeight,
2454
+ 5rem
2455
+ );
2456
+ /*
2457
+ 30px in spec, compensating for a -4px margin
2458
+ to align title with top of item image
2459
+ src/tiles/list/tile-list.ts
2460
+ */
2461
+ --infiniteScrollerRowGap: 34px;
2462
+ }
2463
+
2464
+ .mobile infinite-scroller.list-detail {
2465
+ --infiniteScrollerRowGap: 24px;
2466
+ }
2467
+
2468
+ infinite-scroller.grid {
2469
+ --infiniteScrollerCellMinWidth: var(
2470
+ --collectionBrowserCellMinWidth,
2471
+ 17rem
2472
+ );
2473
+ --infiniteScrollerCellMaxWidth: var(
2474
+ --collectionBrowserCellMaxWidth,
2475
+ 1fr
2476
+ );
2477
+ }
2478
+
2479
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
2480
+ @media screen and (max-width: 880px) {
2481
+ infinite-scroller.grid {
2482
+ --infiniteScrollerCellMinWidth: var(
2483
+ --collectionBrowserCellMinWidth,
2484
+ 15rem
2485
+ );
2486
+ }
2487
+ }
2488
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2489
+ @media screen and (max-width: 360px) {
2490
+ infinite-scroller.grid {
2491
+ --infiniteScrollerCellMinWidth: var(
2492
+ --collectionBrowserCellMinWidth,
2493
+ 12rem
2494
+ );
2495
+ }
2496
+ }
2497
+
2498
+ infinite-scroller.hidden {
2499
+ display: none;
2500
+ }
2501
2501
  `,
2502
2502
  ];
2503
2503
  }