@internetarchive/collection-browser 2.22.1-webdev-7936.0 → 3.0.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.
Files changed (83) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/src/collection-browser.d.ts +5 -2
  11. package/dist/src/collection-browser.js +699 -690
  12. package/dist/src/collection-browser.js.map +1 -1
  13. package/dist/src/collection-facets/facet-row.js +130 -130
  14. package/dist/src/collection-facets/facet-row.js.map +1 -1
  15. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +75 -75
  16. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  17. package/dist/src/collection-facets.js +263 -264
  18. package/dist/src/collection-facets.js.map +1 -1
  19. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  20. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  21. package/dist/src/data-source/models.js.map +1 -1
  22. package/dist/src/models.js.map +1 -1
  23. package/dist/src/restoration-state-handler.js.map +1 -1
  24. package/dist/src/tiles/base-tile-component.js.map +1 -1
  25. package/dist/src/tiles/grid/collection-tile.js +2 -3
  26. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  27. package/dist/src/tiles/grid/item-tile.js +139 -139
  28. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  29. package/dist/src/tiles/grid/search-tile.js +2 -3
  30. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  31. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +1 -2
  32. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  33. package/dist/src/tiles/hover/hover-pane-controller.js +21 -21
  34. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  35. package/dist/src/tiles/hover/tile-hover-pane.js +108 -108
  36. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
  37. package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
  38. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  39. package/dist/src/tiles/list/tile-list-compact.js +97 -97
  40. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  41. package/dist/src/tiles/list/tile-list.js +289 -295
  42. package/dist/src/tiles/list/tile-list.js.map +1 -1
  43. package/dist/src/tiles/tile-dispatcher.js +200 -200
  44. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  45. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  46. package/dist/test/collection-browser.test.js +183 -197
  47. package/dist/test/collection-browser.test.js.map +1 -1
  48. package/dist/test/restoration-state-handler.test.js.map +1 -1
  49. package/dist/test/tiles/list/tile-list.test.js +0 -1
  50. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  51. package/eslint.config.mjs +53 -53
  52. package/index.html +24 -24
  53. package/local.archive.org.cert +86 -86
  54. package/local.archive.org.key +27 -27
  55. package/package.json +117 -117
  56. package/renovate.json +6 -6
  57. package/src/collection-browser.ts +2775 -2756
  58. package/src/collection-facets/facet-row.ts +282 -282
  59. package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
  60. package/src/collection-facets.ts +990 -991
  61. package/src/data-source/collection-browser-data-source.ts +1390 -1390
  62. package/src/data-source/collection-browser-query-state.ts +63 -63
  63. package/src/data-source/models.ts +43 -43
  64. package/src/models.ts +870 -870
  65. package/src/restoration-state-handler.ts +544 -544
  66. package/src/tiles/base-tile-component.ts +53 -53
  67. package/src/tiles/grid/collection-tile.ts +2 -3
  68. package/src/tiles/grid/item-tile.ts +339 -339
  69. package/src/tiles/grid/search-tile.ts +2 -3
  70. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +1 -2
  71. package/src/tiles/hover/hover-pane-controller.ts +517 -517
  72. package/src/tiles/hover/tile-hover-pane.ts +180 -180
  73. package/src/tiles/list/tile-list-compact-header.ts +86 -86
  74. package/src/tiles/list/tile-list-compact.ts +236 -236
  75. package/src/tiles/list/tile-list.ts +688 -692
  76. package/src/tiles/tile-dispatcher.ts +486 -486
  77. package/src/tiles/tile-display-value-provider.ts +124 -124
  78. package/test/collection-browser.test.ts +2340 -2359
  79. package/test/restoration-state-handler.test.ts +510 -510
  80. package/test/tiles/list/tile-list.test.ts +0 -1
  81. package/tsconfig.json +20 -20
  82. package/web-dev-server.config.mjs +30 -30
  83. package/web-test-runner.config.mjs +41 -41
@@ -125,7 +125,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
125
125
  this.manageViewLabel = 'Select items to remove';
126
126
  /** Whether to replace the default sort options with a slot for customization (default: false) */
127
127
  this.enableSortOptionsSlot = false;
128
- /** Whether to display a smart results carousel above the full results */
128
+ /** Whether to expose a slot for a smart results carousel above the full results */
129
129
  this.showSmartResults = false;
130
130
  /**
131
131
  * The maximum number of pages we will load when a privileged user clicks
@@ -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
  /**
@@ -427,23 +427,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
427
427
  */
428
428
  get emptyPlaceholderTemplate() {
429
429
  var _a;
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>
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>
438
438
  `;
439
439
  }
440
440
  /**
441
441
  * Top-level template for rendering the left (facets) and right (results) columns.
442
442
  */
443
443
  get collectionBrowserTemplate() {
444
- return html `
445
- <div id="left-column-scroll-sentinel"></div>
446
- ${this.leftColumnTemplate} ${this.rightColumnTemplate}
444
+ return html `
445
+ <div id="left-column-scroll-sentinel"></div>
446
+ ${this.leftColumnTemplate} ${this.rightColumnTemplate}
447
447
  `;
448
448
  }
449
449
  /**
@@ -462,33 +462,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
462
462
  * accordion-style facets.
463
463
  */
464
464
  get mobileLeftColumnTemplate() {
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>
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>
473
473
  `;
474
474
  }
475
475
  /**
476
476
  * Template for the desktop version of the left column, displaying the facets sidebar.
477
477
  */
478
478
  get desktopLeftColumnTemplate() {
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>
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>
492
492
  `;
493
493
  }
494
494
  /**
@@ -496,8 +496,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
496
496
  * - mainly used to render userlists
497
497
  */
498
498
  get facetTopViewSlot() {
499
- return html `<div id="facet-top-view">
500
- <slot name="facet-top-slot"></slot>
499
+ return html `<div id="facet-top-view">
500
+ <slot name="facet-top-slot"></slot>
501
501
  </div>`;
502
502
  }
503
503
  /**
@@ -512,15 +512,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
512
512
  const resultsCount = (_a = this.totalResults) === null || _a === void 0 ? void 0 : _a.toLocaleString();
513
513
  const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
514
514
  // Added data-testid for Playwright testing
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>
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>
524
524
  `;
525
525
  }
526
526
  /**
@@ -528,53 +528,50 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
528
528
  * tiles and sort/filter bar are shown.
529
529
  */
530
530
  get rightColumnTemplate() {
531
- var _a;
532
531
  const rightColumnClasses = classMap({
533
532
  column: true,
534
533
  'full-width': !this.facetPaneVisible,
535
534
  'smart-results-spacing': !!this.showSmartResults,
536
535
  });
537
- return html `
538
- <div id="right-column" class=${rightColumnClasses}>
536
+ return html `
537
+ <div id="right-column" class=${rightColumnClasses}>
539
538
  ${this.showSmartResults
540
539
  ? html `<slot name="smart-results"></slot>`
541
- : nothing}
542
- <section id="results">
543
- ${this.showSmartResults
544
- ? html `<h2 class="results-section-heading">
545
- ${(_a = this.resultsHeader) !== null && _a !== void 0 ? _a : msg('All results')}
546
- </h2>`
547
- : nothing}
548
- <div id="cb-top-view">
549
- <slot name="cb-top-slot"></slot>
550
- </div>
540
+ : nothing}
541
+ <section id="results">
542
+ <h2 class="results-section-heading">
543
+ <slot name="results-heading"></slot>
544
+ </h2>
545
+ <div id="cb-top-view">
546
+ <slot name="cb-top-slot"></slot>
547
+ </div>
551
548
  ${this.isManageView
552
549
  ? this.manageBarTemplate
553
- : this.sortFilterBarTemplate}
554
- <slot name="cb-results"></slot>
550
+ : this.sortFilterBarTemplate}
551
+ <slot name="cb-results"></slot>
555
552
  ${this.displayMode === `list-compact` && this.totalResults
556
553
  ? this.listHeaderTemplate
557
- : nothing}
558
- ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
559
- </section>
560
- </div>
554
+ : nothing}
555
+ ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
556
+ </section>
557
+ </div>
561
558
  `;
562
559
  }
563
560
  /**
564
561
  * Template for the infinite scroller widget that contains the result tiles.
565
562
  */
566
563
  get infiniteScrollerTemplate() {
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}
564
+ return html `<infinite-scroller
565
+ class=${this.infiniteScrollerClasses}
566
+ itemCount=${this.placeholderType ? 0 : nothing}
567
+ ariaLandmarkLabel="Search results"
568
+ .cellProvider=${this}
569
+ .placeholderCellTemplate=${this.placeholderCellTemplate}
570
+ @scrollThresholdReached=${this.scrollThresholdReached}
571
+ @visibleCellsChanged=${this.visibleCellsChanged}
575
572
  >${this.displayMode === 'grid'
576
573
  ? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
577
- : nothing}
574
+ : nothing}
578
575
  </infinite-scroller>`;
579
576
  }
580
577
  /**
@@ -615,32 +612,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
615
612
  }
616
613
  // We only show relevance sort if a search query is currently defined
617
614
  sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
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>
615
+ return html `
616
+ <sort-filter-bar
617
+ .defaultSortField=${this.defaultSortField}
618
+ .defaultSortDirection=${this.defaultSortDirection}
619
+ .defaultViewSort=${defaultViewSort}
620
+ .defaultDateSort=${defaultDateSort}
621
+ .selectedSort=${this.selectedSort}
622
+ .sortDirection=${this.sortDirection}
623
+ .sortFieldAvailability=${sortFieldAvailability}
624
+ .displayMode=${this.displayMode}
625
+ .selectedTitleFilter=${this.selectedTitleFilter}
626
+ .selectedCreatorFilter=${this.selectedCreatorFilter}
627
+ .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
628
+ .resizeObserver=${this.resizeObserver}
629
+ .enableSortOptionsSlot=${this.enableSortOptionsSlot}
630
+ .suppressDisplayModes=${this.suppressDisplayModes}
631
+ @sortChanged=${this.userChangedSort}
632
+ @displayModeChanged=${this.displayModeChanged}
633
+ @titleLetterChanged=${this.titleLetterSelected}
634
+ @creatorLetterChanged=${this.creatorLetterSelected}
635
+ >
636
+ ${this.tileBlurCheckboxTemplate}
637
+ <slot name="sort-options-left" slot="sort-options-left"></slot>
638
+ <slot name="sort-options" slot="sort-options"></slot>
639
+ <slot name="sort-options-right" slot="sort-options-right"></slot>
640
+ </sort-filter-bar>
644
641
  `;
645
642
  }
646
643
  /**
@@ -652,51 +649,66 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
652
649
  // Only show the checkbox for @archive.org users
653
650
  if (!((_a = this.dataSource.sessionContext) === null || _a === void 0 ? void 0 : _a.is_archive_user))
654
651
  return nothing;
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>
652
+ return html `
653
+ <label
654
+ id="tile-blur-label"
655
+ for="tile-blur-check"
656
+ slot="sort-options-right"
657
+ >
658
+ ${msg('Blurring')}
659
+ <input
660
+ id="tile-blur-check"
661
+ type="checkbox"
662
+ ?checked=${!this.shouldSuppressTileBlurring}
663
+ @change=${this.tileBlurCheckboxChanged}
664
+ />
665
+ </label>
669
666
  `;
670
667
  }
668
+ /**
669
+ * Message to show in the manage view modal, depending on context.
670
+ */
671
+ get manageViewModalMsg() {
672
+ const pluralize = this.dataSource.checkedTileModels.length > 1;
673
+ switch (this.profileElement) {
674
+ case 'uploads':
675
+ return pluralize
676
+ ? msg('Note: It may take a few minutes for these items to stop appearing in your uploads list.')
677
+ : msg('Note: It may take a few minutes for this item to stop appearing in your uploads list.');
678
+ case 'web_archives':
679
+ return pluralize
680
+ ? msg('Note: It may take a few minutes for these items to stop appearing in your web archives list.')
681
+ : msg('Note: It may take a few minutes for this item to stop appearing in your web archives list.');
682
+ default:
683
+ return '';
684
+ }
685
+ }
671
686
  /**
672
687
  * Template for the manage bar UI that appears atop the search results when we are
673
688
  * showing the management view. This generally replaces the sort bar when present.
674
689
  */
675
690
  get manageBarTemplate() {
676
- const manageViewModalMsg = this.profileElement === 'uploads'
677
- ? 'Note: it may take a few minutes for these items to stop appearing in your uploads list.'
678
- : nothing;
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()}
691
+ return html `
692
+ <manage-bar
693
+ .label=${this.manageViewLabel}
694
+ .modalManager=${this.modalManager}
695
+ .selectedItems=${this.dataSource.checkedTileModels}
696
+ .manageViewModalMsg=${this.manageViewModalMsg}
697
+ showSelectAll
698
+ showUnselectAll
699
+ ?showItemManageButton=${this.pageContext === 'search'}
700
+ ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
701
+ @removeItems=${this.handleRemoveItems}
702
+ @manageItems=${this.handleManageItems}
703
+ @selectAll=${() => this.dataSource.checkAllTiles()}
704
+ @unselectAll=${() => this.dataSource.uncheckAllTiles()}
693
705
  @cancel=${() => {
694
706
  this.isManageView = false;
695
707
  this.dataSource.uncheckAllTiles();
696
708
  if (this.searchResultsLoading)
697
709
  this.dataSource.resetPages();
698
- }}
699
- ></manage-bar>
710
+ }}
711
+ ></manage-bar>
700
712
  `;
701
713
  }
702
714
  /**
@@ -944,15 +956,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
944
956
  label: target.open ? 'open' : 'closed',
945
957
  });
946
958
  };
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>
959
+ return html `
960
+ <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
961
+ <summary>
962
+ <span class="collapser-icon">${chevronIcon}</span>
963
+ <h2>${msg('Filters')}</h2>
964
+ ${this.clearFiltersBtnTemplate(true)}
965
+ </summary>
966
+ ${this.facetsTemplate}
967
+ </details>
956
968
  `;
957
969
  }
958
970
  /**
@@ -962,10 +974,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
962
974
  if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
963
975
  return nothing;
964
976
  if (this.facetLoadStrategy === 'off') {
965
- return html `
966
- <p class="facets-message">
967
- ${msg('Facets are temporarily unavailable.')}
968
- </p>
977
+ return html `
978
+ <p class="facets-message">
979
+ ${msg('Facets are temporarily unavailable.')}
980
+ </p>
969
981
  `;
970
982
  }
971
983
  // We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
@@ -974,44 +986,44 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
974
986
  const facetDisplayOrder = shouldUseTvInterface
975
987
  ? tvFacetDisplayOrder
976
988
  : defaultFacetDisplayOrder;
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>
989
+ const facets = html `
990
+ <collection-facets
991
+ .collectionPagePath=${this.collectionPagePath}
992
+ .parentCollections=${this.dataSource.parentCollections}
993
+ .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
994
+ .searchService=${this.searchService}
995
+ .featureFeedbackService=${this.featureFeedbackService}
996
+ .recaptchaManager=${this.recaptchaManager}
997
+ .resizeObserver=${this.resizeObserver}
998
+ .searchType=${this.searchType}
999
+ .aggregations=${this.dataSource.aggregations}
1000
+ .histogramAggregation=${this.dataSource.histogramAggregation}
1001
+ .minSelectedDate=${this.minSelectedDate}
1002
+ .maxSelectedDate=${this.maxSelectedDate}
1003
+ .selectedFacets=${this.selectedFacets}
1004
+ .baseNavigationUrl=${this.baseNavigationUrl}
1005
+ .collectionTitles=${this.dataSource.collectionTitles}
1006
+ .tvChannelAliases=${this.dataSource.tvChannelAliases}
1007
+ .showHistogramDatePicker=${this.showHistogramDatePicker}
1008
+ .allowExpandingDatePicker=${!this.mobileView}
1009
+ .allowDatePickerMonths=${shouldUseTvInterface}
1010
+ .contentWidth=${this.contentWidth}
1011
+ .query=${this.baseQuery}
1012
+ .filterMap=${this.dataSource.filterMap}
1013
+ .isManageView=${this.isManageView}
1014
+ .modalManager=${this.modalManager}
1015
+ .analyticsHandler=${this.analyticsHandler}
1016
+ .facetDisplayOrder=${facetDisplayOrder}
1017
+ .isTvSearch=${shouldUseTvInterface}
1018
+ ?collapsableFacets=${this.mobileView}
1019
+ ?facetsLoading=${this.facetsLoading}
1020
+ ?histogramAggregationLoading=${this.facetsLoading}
1021
+ ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1022
+ @facetClick=${this.facetClickHandler}
1023
+ @facetsChanged=${this.facetsChanged}
1024
+ @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1025
+ >
1026
+ </collection-facets>
1015
1027
  `;
1016
1028
  // If we are using one of the opt-in facet load strategies, we may need to wrap the
1017
1029
  // desktop view facets in a <details> widget so that patrons can opt into loading them.
@@ -1019,20 +1031,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1019
1031
  const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
1020
1032
  (this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
1021
1033
  if (showDesktopOptInWidget && !this.mobileView) {
1022
- return html `
1023
- <details
1024
- class="desktop-facets-dropdown"
1034
+ return html `
1035
+ <details
1036
+ class="desktop-facets-dropdown"
1025
1037
  @toggle=${(e) => {
1026
1038
  const target = e.target;
1027
1039
  this.collapsibleFacetsVisible = target.open;
1028
- }}
1029
- >
1030
- <summary>
1031
- <span class="collapser-icon">${chevronIcon}</span>
1032
- <h2>${msg('Filters')}</h2>
1033
- </summary>
1034
- ${facets}
1035
- </details>
1040
+ }}
1041
+ >
1042
+ <summary>
1043
+ <span class="collapser-icon">${chevronIcon}</span>
1044
+ <h2>${msg('Filters')}</h2>
1045
+ </summary>
1046
+ ${facets}
1047
+ </details>
1036
1048
  `;
1037
1049
  }
1038
1050
  // Otherwise, just render the facets component bare
@@ -1052,34 +1064,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1052
1064
  mobile,
1053
1065
  });
1054
1066
  const buttonText = mobile ? 'Clear all' : 'Clear all filters';
1055
- return html `
1056
- <div class="clear-filters-btn-row">
1067
+ return html `
1068
+ <div class="clear-filters-btn-row">
1057
1069
  ${mobile
1058
1070
  ? html `<span class="clear-filters-btn-separator">&nbsp;</span>`
1059
- : nothing}
1060
- <button class=${buttonClasses} @click=${this.clearFilters}>
1061
- ${buttonText}
1062
- </button>
1063
- </div>
1071
+ : nothing}
1072
+ <button class=${buttonClasses} @click=${this.clearFilters}>
1073
+ ${buttonText}
1074
+ </button>
1075
+ </div>
1064
1076
  `;
1065
1077
  }
1066
1078
  /**
1067
1079
  * Template for the table header content that appears atop the compact list view.
1068
1080
  */
1069
1081
  get listHeaderTemplate() {
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>
1082
+ return html `
1083
+ <div id="list-header">
1084
+ <tile-dispatcher
1085
+ .tileDisplayMode=${'list-header'}
1086
+ .resizeObserver=${this.resizeObserver}
1087
+ .sortParam=${this.sortParam}
1088
+ .defaultSortParam=${this.defaultSortParam}
1089
+ .mobileBreakpoint=${this.mobileBreakpoint}
1090
+ .loggedIn=${this.loggedIn}
1091
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1092
+ >
1093
+ </tile-dispatcher>
1094
+ </div>
1083
1095
  `;
1084
1096
  }
1085
1097
  /**
@@ -1808,27 +1820,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1808
1820
  const model = this.tileModelAtCellIndex(index);
1809
1821
  if (!model)
1810
1822
  return undefined;
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>
1823
+ return html `
1824
+ <tile-dispatcher
1825
+ .collectionPagePath=${this.collectionPagePath}
1826
+ .baseNavigationUrl=${this.baseNavigationUrl}
1827
+ .baseImageUrl=${this.baseImageUrl}
1828
+ .model=${model}
1829
+ .tileDisplayMode=${this.displayMode}
1830
+ .resizeObserver=${this.resizeObserver}
1831
+ .collectionTitles=${this.dataSource.collectionTitles}
1832
+ .sortParam=${this.sortParam}
1833
+ .defaultSortParam=${this.defaultSortParam}
1834
+ .creatorFilter=${this.selectedCreatorFilter}
1835
+ .mobileBreakpoint=${this.mobileBreakpoint}
1836
+ .loggedIn=${this.loggedIn}
1837
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1838
+ .isManageView=${this.isManageView}
1839
+ ?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
1840
+ ?enableHoverPane=${true}
1841
+ @resultSelected=${(e) => this.resultSelected(e)}
1842
+ >
1843
+ </tile-dispatcher>
1832
1844
  `;
1833
1845
  }
1834
1846
  /**
@@ -1864,440 +1876,440 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1864
1876
  static get styles() {
1865
1877
  return [
1866
1878
  srOnlyStyle,
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
- }
1879
+ css `
1880
+ :host {
1881
+ display: block;
1882
+ --leftColumnWidth: 18rem;
1883
+ --leftColumnPaddingTop: 2rem;
1884
+ --leftColumnPaddingRight: 2.5rem;
1885
+ }
1886
+
1887
+ #facet-top-view {
1888
+ display: flex;
1889
+ }
1890
+
1891
+ /**
1892
+ * When page width resizes from desktop to mobile, use this class to
1893
+ * disable expand/collapse transition when loading.
1894
+ */
1895
+ .preload * {
1896
+ transition: none !important;
1897
+ -webkit-transition: none !important;
1898
+ -moz-transition: none !important;
1899
+ -ms-transition: none !important;
1900
+ -o-transition: none !important;
1901
+ }
1902
+
1903
+ #content-container {
1904
+ display: flex;
1905
+ }
1906
+
1907
+ empty-placeholder {
1908
+ margin-top: var(--placeholderMarginTop, 0);
1909
+ }
1910
+
1911
+ .collapser-icon {
1912
+ display: inline-block;
1913
+ }
1914
+
1915
+ .collapser-icon svg {
1916
+ display: inline-block;
1917
+ width: 12px;
1918
+ height: 12px;
1919
+ transition: transform 0.2s ease-out;
1920
+ }
1921
+
1922
+ #mobile-filter-collapse {
1923
+ width: 100%;
1924
+ }
1925
+
1926
+ #mobile-filter-collapse > summary {
1927
+ cursor: pointer;
1928
+ list-style: none;
1929
+ }
1930
+
1931
+ #mobile-filter-collapse[open] > summary {
1932
+ margin-bottom: 10px;
1933
+ }
1934
+
1935
+ #mobile-filter-collapse h2 {
1936
+ display: inline-block;
1937
+ margin: 0;
1938
+ font-size: 2rem;
1939
+ }
1940
+
1941
+ #mobile-filter-collapse[open] svg {
1942
+ transform: rotate(90deg);
1943
+ }
1944
+
1945
+ #content-container.mobile {
1946
+ display: block;
1947
+ }
1948
+
1949
+ #right-column {
1950
+ flex: 1;
1951
+ position: relative;
1952
+ min-height: 90vh;
1953
+ border-right: 1px solid rgb(232, 232, 232);
1954
+ margin-top: var(--rightColumnMarginTop, 0);
1955
+ padding-top: var(--rightColumnPaddingTop, 2rem);
1956
+ background: #fff;
1957
+ }
1958
+
1959
+ #left-column:not([hidden]) + #right-column {
1960
+ border-left: 1px solid rgb(232, 232, 232);
1961
+ }
1962
+
1963
+ #right-column.smart-results-spacing {
1964
+ padding-top: 0.5rem;
1965
+ border-right: none;
1966
+ background: transparent;
1967
+ min-width: 0;
1968
+ }
1969
+
1970
+ #results {
1971
+ background: #fff;
1972
+ padding-left: 1rem;
1973
+ padding-right: 1rem;
1974
+ }
1975
+
1976
+ #right-column.smart-results-spacing #results {
1977
+ border-radius: 10px 10px 0px 0px;
1978
+ padding-top: 0.5rem;
1979
+ margin-top: 1rem;
1980
+ }
1981
+
1982
+ .mobile #right-column {
1983
+ border-left: none;
1984
+ }
1985
+
1986
+ .mobile #results {
1987
+ padding: 5px 5px 0;
1988
+ }
1989
+
1990
+ #left-column {
1991
+ width: var(--leftColumnWidth, 18rem);
1992
+ /* Prevents Safari from shrinking col at first draw */
1993
+ min-width: var(--leftColumnWidth, 18rem);
1994
+ padding-top: var(--leftColumnPaddingTop, 2rem);
1995
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1996
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1997
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1998
+ z-index: 1;
1999
+ }
2000
+
2001
+ .desktop #left-column {
2002
+ top: 0;
2003
+ position: sticky;
2004
+ height: calc(100vh - 2rem);
2005
+ max-height: calc(100vh - 2rem);
2006
+ overflow-x: hidden;
2007
+ overflow-y: scroll;
2008
+
2009
+ /*
2010
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
2011
+ * does at least give us a tiny bit of control over width & color.
2012
+ */
2013
+ scrollbar-width: thin;
2014
+ scrollbar-color: transparent transparent;
2015
+ }
2016
+ .desktop #left-column:hover {
2017
+ scrollbar-color: auto;
2018
+ }
2019
+ .desktop #left-column::-webkit-scrollbar {
2020
+ appearance: none;
2021
+ width: 6px;
2022
+ }
2023
+ .desktop #left-column::-webkit-scrollbar-button {
2024
+ height: 3px;
2025
+ background: transparent;
2026
+ }
2027
+ .desktop #left-column::-webkit-scrollbar-corner {
2028
+ background: transparent;
2029
+ }
2030
+ .desktop #left-column::-webkit-scrollbar-thumb {
2031
+ border-radius: 4px;
2032
+ }
2033
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
2034
+ background: rgba(0, 0, 0, 0.15);
2035
+ }
2036
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2037
+ background: rgba(0, 0, 0, 0.2);
2038
+ }
2039
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2040
+ background: rgba(0, 0, 0, 0.3);
2041
+ }
2042
+
2043
+ #facets-bottom-fade {
2044
+ background: linear-gradient(
2045
+ to bottom,
2046
+ #f5f5f700 0%,
2047
+ #f5f5f7c0 50%,
2048
+ #f5f5f7 80%,
2049
+ #f5f5f7 100%
2050
+ );
2051
+ position: fixed;
2052
+ bottom: 0;
2053
+ height: 50px;
2054
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
2055
+ width: calc(
2056
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2057
+ );
2058
+ z-index: 2;
2059
+ pointer-events: none;
2060
+ transition: height 0.1s ease;
2061
+ }
2062
+ #facets-bottom-fade.hidden {
2063
+ height: 0;
2064
+ }
2065
+
2066
+ .facets-message {
2067
+ font-size: 1.4rem;
2068
+ }
2069
+
2070
+ .desktop-facets-dropdown > summary {
2071
+ cursor: pointer;
2072
+ list-style: none;
2073
+ }
2074
+
2075
+ .desktop-facets-dropdown h2 {
2076
+ display: inline-block;
2077
+ margin: 0;
2078
+ font-size: 1.6rem;
2079
+ }
2080
+
2081
+ .desktop-facets-dropdown[open] > summary {
2082
+ margin-bottom: 10px;
2083
+ }
2084
+
2085
+ .desktop-facets-dropdown[open] svg {
2086
+ transform: rotate(90deg);
2087
+ }
2088
+
2089
+ .desktop #left-column-scroll-sentinel {
2090
+ width: 1px;
2091
+ height: 100vh;
2092
+ background: transparent;
2093
+ }
2094
+
2095
+ .desktop #facets-scroll-sentinel {
2096
+ width: 1px;
2097
+ height: 1px;
2098
+ background: transparent;
2099
+ }
2100
+
2101
+ #facets-header-container {
2102
+ display: flex;
2103
+ justify-content: space-between;
2104
+ align-items: flex-start;
2105
+ clear: both;
2106
+ }
2107
+
2108
+ .desktop #facets-header-container {
2109
+ flex-wrap: wrap;
2110
+ }
2111
+
2112
+ .mobile #left-column {
2113
+ width: 100%;
2114
+ min-width: 0;
2115
+ padding: 5px 0;
2116
+ border: 0;
2117
+ }
2118
+
2119
+ .clear-filters-btn-row {
2120
+ display: inline-block;
2121
+ }
2122
+
2123
+ .desktop .clear-filters-btn-row {
2124
+ width: 100%;
2125
+ }
2126
+
2127
+ .clear-filters-btn {
2128
+ display: inline-block;
2129
+ appearance: none;
2130
+ margin: 0;
2131
+ padding: 0;
2132
+ border: 0;
2133
+ background: none;
2134
+ color: var(--ia-theme-link-color);
2135
+ font-size: 1.4rem;
2136
+ font-family: inherit;
2137
+ cursor: pointer;
2138
+ }
2139
+
2140
+ .clear-filters-btn:hover {
2141
+ text-decoration: underline;
2142
+ }
2143
+
2144
+ .clear-filters-btn-separator {
2145
+ display: inline-block;
2146
+ margin-left: 5px;
2147
+ border-left: 1px solid #2c2c2c;
2148
+ font-size: 1.4rem;
2149
+ line-height: 1.3rem;
2150
+ }
2151
+
2152
+ #facets-container {
2153
+ position: relative;
2154
+ max-height: 0;
2155
+ transition: max-height 0.2s ease-in-out;
2156
+ z-index: 1;
2157
+ margin-top: var(--facetsContainerMarginTop, 5rem);
2158
+ padding-bottom: 2rem;
2159
+ }
2160
+
2161
+ .desktop #facets-container {
2162
+ width: 18rem;
2163
+ }
2164
+
2165
+ .mobile #facets-container {
2166
+ overflow: hidden;
2167
+ padding-bottom: 0;
2168
+ padding-left: 10px;
2169
+ padding-right: 10px;
2170
+ }
2171
+
2172
+ #facets-container.expanded {
2173
+ max-height: 2000px;
2174
+ }
2175
+
2176
+ .results-section-heading {
2177
+ margin: 0.5rem 0.3rem;
2178
+ font-size: 2rem;
2179
+ line-height: 25px;
2180
+ }
2181
+
2182
+ #results-total {
2183
+ display: flex;
2184
+ align-items: baseline;
2185
+ }
2186
+
2187
+ .mobile #results-total {
2188
+ position: absolute;
2189
+ right: 10px;
2190
+ }
2191
+
2192
+ #big-results-count {
2193
+ font-size: 2.4rem;
2194
+ font-weight: 500;
2195
+ margin-right: 5px;
2196
+ }
2197
+
2198
+ .mobile #big-results-count {
2199
+ font-size: 2rem;
2200
+ }
2201
+
2202
+ #big-results-label {
2203
+ font-size: 1.4rem;
2204
+ font-weight: 200;
2205
+ }
2206
+
2207
+ #list-header {
2208
+ max-height: 4.2rem;
2209
+ }
2210
+
2211
+ .loading-cover {
2212
+ position: absolute;
2213
+ top: 0;
2214
+ left: 0;
2215
+ width: 100%;
2216
+ height: 100%;
2217
+ display: flex;
2218
+ justify-content: center;
2219
+ z-index: 1;
2220
+ padding-top: 50px;
2221
+ }
2222
+
2223
+ #tile-blur-label {
2224
+ display: flex;
2225
+ align-items: center;
2226
+ column-gap: 5px;
2227
+ }
2228
+
2229
+ #tile-blur-check {
2230
+ margin: 0 5px 0 0;
2231
+ }
2232
+
2233
+ circular-activity-indicator {
2234
+ width: 30px;
2235
+ height: 30px;
2236
+ }
2237
+
2238
+ sort-filter-bar {
2239
+ display: block;
2240
+ margin-bottom: 4rem;
2241
+ }
2242
+
2243
+ infinite-scroller {
2244
+ display: block;
2245
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2246
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2247
+ }
2248
+
2249
+ infinite-scroller.list-compact {
2250
+ --infiniteScrollerCellMinWidth: var(
2251
+ --collectionBrowserCellMinWidth,
2252
+ 100%
2253
+ );
2254
+ --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2255
+ --infiniteScrollerCellMaxHeight: 56px;
2256
+ --infiniteScrollerRowGap: 10px;
2257
+ }
2258
+
2259
+ infinite-scroller.list-detail {
2260
+ --infiniteScrollerCellMinWidth: var(
2261
+ --collectionBrowserCellMinWidth,
2262
+ 100%
2263
+ );
2264
+ --infiniteScrollerCellMinHeight: var(
2265
+ --collectionBrowserCellMinHeight,
2266
+ 5rem
2267
+ );
2268
+ /*
2269
+ 30px in spec, compensating for a -4px margin
2270
+ to align title with top of item image
2271
+ src/tiles/list/tile-list.ts
2272
+ */
2273
+ --infiniteScrollerRowGap: 34px;
2274
+ }
2275
+
2276
+ .mobile infinite-scroller.list-detail {
2277
+ --infiniteScrollerRowGap: 24px;
2278
+ }
2279
+
2280
+ infinite-scroller.grid {
2281
+ --infiniteScrollerCellMinWidth: var(
2282
+ --collectionBrowserCellMinWidth,
2283
+ 17rem
2284
+ );
2285
+ --infiniteScrollerCellMaxWidth: var(
2286
+ --collectionBrowserCellMaxWidth,
2287
+ 1fr
2288
+ );
2289
+ }
2290
+
2291
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
2292
+ @media screen and (max-width: 880px) {
2293
+ infinite-scroller.grid {
2294
+ --infiniteScrollerCellMinWidth: var(
2295
+ --collectionBrowserCellMinWidth,
2296
+ 15rem
2297
+ );
2298
+ }
2299
+ }
2300
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2301
+ @media screen and (max-width: 360px) {
2302
+ infinite-scroller.grid {
2303
+ --infiniteScrollerCellMinWidth: var(
2304
+ --collectionBrowserCellMinWidth,
2305
+ 12rem
2306
+ );
2307
+ }
2308
+ }
2309
+
2310
+ infinite-scroller.hidden {
2311
+ display: none;
2312
+ }
2301
2313
  `,
2302
2314
  ];
2303
2315
  }
@@ -2455,9 +2467,6 @@ __decorate([
2455
2467
  __decorate([
2456
2468
  property({ type: Boolean, reflect: true })
2457
2469
  ], CollectionBrowser.prototype, "showSmartResults", void 0);
2458
- __decorate([
2459
- property({ type: String })
2460
- ], CollectionBrowser.prototype, "resultsHeader", void 0);
2461
2470
  __decorate([
2462
2471
  property({ type: Number })
2463
2472
  ], CollectionBrowser.prototype, "maxPagesToManage", void 0);