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