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