@internetarchive/collection-browser 4.1.3-alpha-webdev8257.1 → 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/dist/index.d.ts +0 -1
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +0 -8
- package/dist/src/app-root.js +614 -645
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.d.ts +0 -3
- package/dist/src/collection-browser.js +790 -794
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/tiles/models.d.ts +0 -14
- package/dist/src/tiles/models.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +1 -12
- package/dist/src/tiles/tile-dispatcher.js +216 -333
- 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/index.ts +28 -29
- package/package.json +1 -1
- package/src/app-root.ts +1166 -1201
- package/src/collection-browser.ts +3077 -3080
- package/src/tiles/models.ts +8 -24
- package/src/tiles/tile-dispatcher.ts +527 -652
- package/test/collection-browser.test.ts +2507 -2402
|
@@ -122,8 +122,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
122
122
|
* If item management UI active
|
|
123
123
|
*/
|
|
124
124
|
this.isManageView = false;
|
|
125
|
-
/** Action buttons to display on each tile (grid mode only) */
|
|
126
|
-
this.tileActions = [];
|
|
127
125
|
this.manageViewLabel = 'Select items to remove';
|
|
128
126
|
/** Whether to replace the default sort options with a slot for customization (default: false) */
|
|
129
127
|
this.enableSortOptionsSlot = false;
|
|
@@ -378,34 +376,62 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
378
376
|
if (changed.has('searchType') && this.searchType === SearchType.TV) {
|
|
379
377
|
this.applyDefaultTVSearchSort();
|
|
380
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
|
+
}
|
|
381
407
|
}
|
|
382
408
|
render() {
|
|
383
|
-
return html `
|
|
409
|
+
return html `
|
|
384
410
|
${this.showSmartFacetBar && this.placeholderType === null
|
|
385
|
-
? html `<smart-facet-bar
|
|
386
|
-
.query=${this.baseQuery}
|
|
387
|
-
.aggregations=${this.dataSource.aggregations}
|
|
388
|
-
.selectedFacets=${this.selectedFacets}
|
|
389
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
390
|
-
.filterToggleShown=${!this.mobileView}
|
|
391
|
-
.filterToggleActive=${this.facetPaneVisible}
|
|
392
|
-
.label=${this.smartFacetBarLabel}
|
|
393
|
-
@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}
|
|
394
420
|
@filtersToggled=${() => {
|
|
395
421
|
this.facetPaneVisible = !this.facetPaneVisible;
|
|
396
422
|
this.emitFacetPaneVisibilityChanged();
|
|
397
|
-
}}
|
|
423
|
+
}}
|
|
398
424
|
></smart-facet-bar>`
|
|
399
|
-
: nothing}
|
|
400
|
-
|
|
401
|
-
<div
|
|
402
|
-
id="content-container"
|
|
403
|
-
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
404
|
-
>
|
|
425
|
+
: nothing}
|
|
426
|
+
|
|
427
|
+
<div
|
|
428
|
+
id="content-container"
|
|
429
|
+
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
430
|
+
>
|
|
405
431
|
${this.placeholderType
|
|
406
432
|
? this.emptyPlaceholderTemplate
|
|
407
|
-
: this.collectionBrowserTemplate}
|
|
408
|
-
</div>
|
|
433
|
+
: this.collectionBrowserTemplate}
|
|
434
|
+
</div>
|
|
409
435
|
`;
|
|
410
436
|
}
|
|
411
437
|
/**
|
|
@@ -449,23 +475,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
449
475
|
* Template for the placeholder content to show when no results are available.
|
|
450
476
|
*/
|
|
451
477
|
get emptyPlaceholderTemplate() {
|
|
452
|
-
return html `
|
|
453
|
-
<empty-placeholder
|
|
454
|
-
.placeholderType=${this.placeholderType}
|
|
455
|
-
?isMobileView=${this.mobileView}
|
|
456
|
-
?isCollection=${!!this.withinCollection}
|
|
457
|
-
.detailMessage=${this.dataSource.queryErrorMessage ?? ''}
|
|
458
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
459
|
-
></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>
|
|
460
486
|
`;
|
|
461
487
|
}
|
|
462
488
|
/**
|
|
463
489
|
* Top-level template for rendering the left (facets) and right (results) columns.
|
|
464
490
|
*/
|
|
465
491
|
get collectionBrowserTemplate() {
|
|
466
|
-
return html `
|
|
467
|
-
<div id="left-column-scroll-sentinel"></div>
|
|
468
|
-
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
492
|
+
return html `
|
|
493
|
+
<div id="left-column-scroll-sentinel"></div>
|
|
494
|
+
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
469
495
|
`;
|
|
470
496
|
}
|
|
471
497
|
/**
|
|
@@ -484,33 +510,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
484
510
|
* accordion-style facets.
|
|
485
511
|
*/
|
|
486
512
|
get mobileLeftColumnTemplate() {
|
|
487
|
-
return html `
|
|
488
|
-
<div
|
|
489
|
-
id="left-column"
|
|
490
|
-
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
491
|
-
>
|
|
492
|
-
${this.facetTopViewSlot} ${this.resultsCountTemplate}
|
|
493
|
-
<div id="facets-header-container">${this.mobileFacetsTemplate}</div>
|
|
494
|
-
</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>
|
|
495
521
|
`;
|
|
496
522
|
}
|
|
497
523
|
/**
|
|
498
524
|
* Template for the desktop version of the left column, displaying the facets sidebar.
|
|
499
525
|
*/
|
|
500
526
|
get desktopLeftColumnTemplate() {
|
|
501
|
-
return html `
|
|
502
|
-
<div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
|
|
503
|
-
${this.facetTopViewSlot}
|
|
504
|
-
<div id="facets-header-container">
|
|
505
|
-
<h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
|
|
506
|
-
${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
|
|
507
|
-
</div>
|
|
508
|
-
<div id="facets-container" aria-labelledby="facets-header">
|
|
509
|
-
${this.facetsTemplate}
|
|
510
|
-
<div id="facets-scroll-sentinel"></div>
|
|
511
|
-
</div>
|
|
512
|
-
<div id="facets-bottom-fade"></div>
|
|
513
|
-
</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>
|
|
514
540
|
`;
|
|
515
541
|
}
|
|
516
542
|
/**
|
|
@@ -518,8 +544,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
518
544
|
* - mainly used to render userlists
|
|
519
545
|
*/
|
|
520
546
|
get facetTopViewSlot() {
|
|
521
|
-
return html `<div id="facet-top-view">
|
|
522
|
-
<slot name="facet-top-slot"></slot>
|
|
547
|
+
return html `<div id="facet-top-view">
|
|
548
|
+
<slot name="facet-top-slot"></slot>
|
|
523
549
|
</div>`;
|
|
524
550
|
}
|
|
525
551
|
/**
|
|
@@ -534,15 +560,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
534
560
|
const resultsCount = this.totalResults?.toLocaleString();
|
|
535
561
|
const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
|
|
536
562
|
// Added data-testid for Playwright testing
|
|
537
|
-
return html `
|
|
538
|
-
<div id="results-total" class=${classes} data-testid="results-total">
|
|
539
|
-
<span id="big-results-count">
|
|
540
|
-
${shouldShowSearching ? html `Searching…` : resultsCount}
|
|
541
|
-
</span>
|
|
542
|
-
<span id="big-results-label">
|
|
543
|
-
${shouldShowSearching ? nothing : resultsLabel}
|
|
544
|
-
</span>
|
|
545
|
-
</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>
|
|
546
572
|
`;
|
|
547
573
|
}
|
|
548
574
|
/**
|
|
@@ -555,45 +581,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
555
581
|
'full-width': !this.facetPaneVisible,
|
|
556
582
|
'smart-results-spacing': !!this.showSmartResults,
|
|
557
583
|
});
|
|
558
|
-
return html `
|
|
559
|
-
<div id="right-column" class=${rightColumnClasses}>
|
|
584
|
+
return html `
|
|
585
|
+
<div id="right-column" class=${rightColumnClasses}>
|
|
560
586
|
${this.showSmartResults
|
|
561
587
|
? html `<slot name="smart-results"></slot>`
|
|
562
|
-
: nothing}
|
|
563
|
-
<section id="results">
|
|
564
|
-
<h2 class="results-section-heading">
|
|
565
|
-
<slot name="results-heading"></slot>
|
|
566
|
-
</h2>
|
|
567
|
-
<div id="cb-top-view">
|
|
568
|
-
<slot name="cb-top-slot"></slot>
|
|
569
|
-
</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>
|
|
570
596
|
${this.isManageView
|
|
571
597
|
? this.manageBarTemplate
|
|
572
|
-
: this.sortFilterBarTemplate}
|
|
573
|
-
<slot name="cb-results"></slot>
|
|
598
|
+
: this.sortFilterBarTemplate}
|
|
599
|
+
<slot name="cb-results"></slot>
|
|
574
600
|
${this.displayMode === `list-compact` && this.totalResults
|
|
575
601
|
? this.listHeaderTemplate
|
|
576
|
-
: nothing}
|
|
577
|
-
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
578
|
-
</section>
|
|
579
|
-
</div>
|
|
602
|
+
: nothing}
|
|
603
|
+
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
604
|
+
</section>
|
|
605
|
+
</div>
|
|
580
606
|
`;
|
|
581
607
|
}
|
|
582
608
|
/**
|
|
583
609
|
* Template for the infinite scroller widget that contains the result tiles.
|
|
584
610
|
*/
|
|
585
611
|
get infiniteScrollerTemplate() {
|
|
586
|
-
return html `<infinite-scroller
|
|
587
|
-
class=${this.infiniteScrollerClasses}
|
|
588
|
-
itemCount=${this.placeholderType ? 0 : nothing}
|
|
589
|
-
ariaLandmarkLabel="Search results"
|
|
590
|
-
.cellProvider=${this}
|
|
591
|
-
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
592
|
-
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
593
|
-
@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}
|
|
594
620
|
>${this.displayMode === 'grid'
|
|
595
621
|
? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
|
|
596
|
-
: nothing}
|
|
622
|
+
: nothing}
|
|
597
623
|
</infinite-scroller>`;
|
|
598
624
|
}
|
|
599
625
|
/**
|
|
@@ -627,29 +653,29 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
627
653
|
}
|
|
628
654
|
// We only show relevance sort if a search query is currently defined
|
|
629
655
|
sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
|
|
630
|
-
return html `
|
|
631
|
-
<sort-filter-bar
|
|
632
|
-
.defaultSortField=${this.defaultSortField}
|
|
633
|
-
.defaultSortDirection=${this.defaultSortDirection}
|
|
634
|
-
.selectedSort=${this.selectedSort}
|
|
635
|
-
.sortDirection=${this.sortDirection}
|
|
636
|
-
.sortFieldAvailability=${sortFieldAvailability}
|
|
637
|
-
.displayMode=${this.displayMode}
|
|
638
|
-
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
639
|
-
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
640
|
-
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
641
|
-
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
642
|
-
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
643
|
-
@sortChanged=${this.userChangedSort}
|
|
644
|
-
@displayModeChanged=${this.displayModeChanged}
|
|
645
|
-
@titleLetterChanged=${this.titleLetterSelected}
|
|
646
|
-
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
647
|
-
>
|
|
648
|
-
${this.tileBlurCheckboxTemplate}
|
|
649
|
-
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
650
|
-
<slot name="sort-options" slot="sort-options"></slot>
|
|
651
|
-
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
652
|
-
</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>
|
|
653
679
|
`;
|
|
654
680
|
}
|
|
655
681
|
/**
|
|
@@ -660,20 +686,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
660
686
|
// Only show the checkbox for @archive.org users
|
|
661
687
|
if (!this.dataSource.sessionContext?.is_archive_user)
|
|
662
688
|
return nothing;
|
|
663
|
-
return html `
|
|
664
|
-
<label
|
|
665
|
-
id="tile-blur-label"
|
|
666
|
-
for="tile-blur-check"
|
|
667
|
-
slot="sort-options-right"
|
|
668
|
-
>
|
|
669
|
-
${msg('Blurring')}
|
|
670
|
-
<input
|
|
671
|
-
id="tile-blur-check"
|
|
672
|
-
type="checkbox"
|
|
673
|
-
?checked=${!this.shouldSuppressTileBlurring}
|
|
674
|
-
@change=${this.tileBlurCheckboxChanged}
|
|
675
|
-
/>
|
|
676
|
-
</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>
|
|
677
703
|
`;
|
|
678
704
|
}
|
|
679
705
|
/**
|
|
@@ -699,27 +725,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
699
725
|
* showing the management view. This generally replaces the sort bar when present.
|
|
700
726
|
*/
|
|
701
727
|
get manageBarTemplate() {
|
|
702
|
-
return html `
|
|
703
|
-
<manage-bar
|
|
704
|
-
.label=${this.manageViewLabel}
|
|
705
|
-
.modalManager=${this.modalManager}
|
|
706
|
-
.selectedItems=${this.dataSource.checkedTileModels}
|
|
707
|
-
.manageViewModalMsg=${this.manageViewModalMsg}
|
|
708
|
-
showSelectAll
|
|
709
|
-
showUnselectAll
|
|
710
|
-
?showItemManageButton=${this.pageContext === 'search'}
|
|
711
|
-
?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
|
|
712
|
-
@removeItems=${this.handleRemoveItems}
|
|
713
|
-
@manageItems=${this.handleManageItems}
|
|
714
|
-
@selectAll=${() => this.dataSource.checkAllTiles()}
|
|
715
|
-
@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()}
|
|
716
742
|
@cancel=${() => {
|
|
717
743
|
this.isManageView = false;
|
|
718
744
|
this.dataSource.uncheckAllTiles();
|
|
719
745
|
if (this.searchResultsLoading)
|
|
720
746
|
this.dataSource.resetPages();
|
|
721
|
-
}}
|
|
722
|
-
></manage-bar>
|
|
747
|
+
}}
|
|
748
|
+
></manage-bar>
|
|
723
749
|
`;
|
|
724
750
|
}
|
|
725
751
|
/**
|
|
@@ -954,15 +980,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
954
980
|
label: target.open ? 'open' : 'closed',
|
|
955
981
|
});
|
|
956
982
|
};
|
|
957
|
-
return html `
|
|
958
|
-
<details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
|
|
959
|
-
<summary>
|
|
960
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
961
|
-
<h2>${msg('Filters')}</h2>
|
|
962
|
-
${this.clearFiltersBtnTemplate(true)}
|
|
963
|
-
</summary>
|
|
964
|
-
${this.facetsTemplate}
|
|
965
|
-
</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>
|
|
966
992
|
`;
|
|
967
993
|
}
|
|
968
994
|
/**
|
|
@@ -1046,50 +1072,50 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1046
1072
|
const filterByNetworkLabel = msg('Filter by Network');
|
|
1047
1073
|
const filterByShowLabel = msg('Filter by Show');
|
|
1048
1074
|
const shows = showEntries.map(([show]) => show);
|
|
1049
|
-
const loadingIndicator = html `
|
|
1050
|
-
<span slot="empty-options">
|
|
1051
|
-
<img src="https://archive.org/images/loading.gif" />
|
|
1052
|
-
</span>
|
|
1075
|
+
const loadingIndicator = html `
|
|
1076
|
+
<span slot="empty-options">
|
|
1077
|
+
<img src="https://archive.org/images/loading.gif" />
|
|
1078
|
+
</span>
|
|
1053
1079
|
`;
|
|
1054
|
-
const errorMessage = html `
|
|
1055
|
-
<span slot="empty-options">
|
|
1056
|
-
${msg('Unable to fetch options, try again later')}
|
|
1057
|
-
</span>
|
|
1080
|
+
const errorMessage = html `
|
|
1081
|
+
<span slot="empty-options">
|
|
1082
|
+
${msg('Unable to fetch options, try again later')}
|
|
1083
|
+
</span>
|
|
1058
1084
|
`;
|
|
1059
|
-
return html `
|
|
1060
|
-
<div id="tv-filters" slot="facets-top">
|
|
1061
|
-
<ia-combo-box
|
|
1062
|
-
id="tv-networks"
|
|
1063
|
-
class="tv-filter-dropdown"
|
|
1064
|
-
placeholder=${filterByNetworkLabel}
|
|
1065
|
-
clearable
|
|
1066
|
-
wrap-arrow-keys
|
|
1067
|
-
sort
|
|
1068
|
-
.options=${networks.map((n, i) => ({ id: `network-${i}`, text: n }))}
|
|
1069
|
-
@toggle=${this.tvDropdownToggled}
|
|
1070
|
-
@change=${this.networksDropdownChanged}
|
|
1071
|
-
>
|
|
1072
|
-
<span slot="label" class="sr-only">${filterByNetworkLabel}</span>
|
|
1073
|
-
${this.tvMapsLoading ? loadingIndicator : nothing}
|
|
1074
|
-
${this.tvMapsErrored ? errorMessage : nothing}
|
|
1075
|
-
</ia-combo-box>
|
|
1076
|
-
<ia-combo-box
|
|
1077
|
-
id="tv-shows"
|
|
1078
|
-
class="tv-filter-dropdown"
|
|
1079
|
-
placeholder=${filterByShowLabel}
|
|
1080
|
-
max-autocomplete-entries="500"
|
|
1081
|
-
clearable
|
|
1082
|
-
wrap-arrow-keys
|
|
1083
|
-
sort
|
|
1084
|
-
.options=${shows.map((s, i) => ({ id: `show-${i}`, text: s }))}
|
|
1085
|
-
@toggle=${this.tvDropdownToggled}
|
|
1086
|
-
@change=${this.showsDropdownChanged}
|
|
1087
|
-
>
|
|
1088
|
-
<span slot="label" class="sr-only">${filterByShowLabel}</span>
|
|
1089
|
-
${this.tvMapsLoading ? loadingIndicator : nothing}
|
|
1090
|
-
${this.tvMapsErrored ? errorMessage : nothing}
|
|
1091
|
-
</ia-combo-box>
|
|
1092
|
-
</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>
|
|
1093
1119
|
`;
|
|
1094
1120
|
}
|
|
1095
1121
|
/**
|
|
@@ -1099,10 +1125,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1099
1125
|
if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
|
|
1100
1126
|
return nothing;
|
|
1101
1127
|
if (this.facetLoadStrategy === 'off') {
|
|
1102
|
-
return html `
|
|
1103
|
-
<p class="facets-message">
|
|
1104
|
-
${msg('Facets are temporarily unavailable.')}
|
|
1105
|
-
</p>
|
|
1128
|
+
return html `
|
|
1129
|
+
<p class="facets-message">
|
|
1130
|
+
${msg('Facets are temporarily unavailable.')}
|
|
1131
|
+
</p>
|
|
1106
1132
|
`;
|
|
1107
1133
|
}
|
|
1108
1134
|
// We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
|
|
@@ -1111,46 +1137,46 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1111
1137
|
const facetDisplayOrder = shouldUseTvInterface
|
|
1112
1138
|
? tvFacetDisplayOrder
|
|
1113
1139
|
: defaultFacetDisplayOrder;
|
|
1114
|
-
const facets = html `
|
|
1115
|
-
<collection-facets
|
|
1116
|
-
.collectionPagePath=${this.collectionPagePath}
|
|
1117
|
-
.parentCollections=${this.dataSource.parentCollections}
|
|
1118
|
-
.pageSpecifierParams=${this.dataSource.pageSpecifierParams}
|
|
1119
|
-
.searchService=${this.searchService}
|
|
1120
|
-
.featureFeedbackService=${this.featureFeedbackService}
|
|
1121
|
-
.recaptchaManager=${this.recaptchaManager}
|
|
1122
|
-
.resizeObserver=${this.resizeObserver}
|
|
1123
|
-
.searchType=${this.searchType}
|
|
1124
|
-
.aggregations=${this.dataSource.aggregations}
|
|
1125
|
-
.histogramAggregation=${this.dataSource.histogramAggregation}
|
|
1126
|
-
.minSelectedDate=${this.minSelectedDate}
|
|
1127
|
-
.maxSelectedDate=${this.maxSelectedDate}
|
|
1128
|
-
.selectedFacets=${this.selectedFacets}
|
|
1129
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1130
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1131
|
-
.tvChannelAliases=${this.dataSource.tvChannelAliases}
|
|
1132
|
-
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
1133
|
-
.allowExpandingDatePicker=${!this.mobileView}
|
|
1134
|
-
.allowDatePickerMonths=${shouldUseTvInterface}
|
|
1135
|
-
.contentWidth=${this.contentWidth}
|
|
1136
|
-
.query=${this.baseQuery}
|
|
1137
|
-
.identifiers=${this.identifiers}
|
|
1138
|
-
.filterMap=${this.dataSource.filterMap}
|
|
1139
|
-
.isManageView=${this.isManageView}
|
|
1140
|
-
.modalManager=${this.modalManager}
|
|
1141
|
-
.analyticsHandler=${this.analyticsHandler}
|
|
1142
|
-
.facetDisplayOrder=${facetDisplayOrder}
|
|
1143
|
-
.isTvSearch=${shouldUseTvInterface}
|
|
1144
|
-
?collapsableFacets=${this.mobileView}
|
|
1145
|
-
?facetsLoading=${this.facetsLoading}
|
|
1146
|
-
?histogramAggregationLoading=${this.facetsLoading}
|
|
1147
|
-
?suppressMediatypeFacets=${this.suppressMediatypeFacets}
|
|
1148
|
-
@facetClick=${this.facetClickHandler}
|
|
1149
|
-
@facetsChanged=${this.facetsChanged}
|
|
1150
|
-
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
1151
|
-
>
|
|
1152
|
-
${this.tvDropdownFiltersTemplate}
|
|
1153
|
-
</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>
|
|
1154
1180
|
`;
|
|
1155
1181
|
// If we are using one of the opt-in facet load strategies, we may need to wrap the
|
|
1156
1182
|
// desktop view facets in a <details> widget so that patrons can opt into loading them.
|
|
@@ -1158,20 +1184,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1158
1184
|
const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
|
|
1159
1185
|
(this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
|
|
1160
1186
|
if (showDesktopOptInWidget && !this.mobileView) {
|
|
1161
|
-
return html `
|
|
1162
|
-
<details
|
|
1163
|
-
class="desktop-facets-dropdown"
|
|
1187
|
+
return html `
|
|
1188
|
+
<details
|
|
1189
|
+
class="desktop-facets-dropdown"
|
|
1164
1190
|
@toggle=${(e) => {
|
|
1165
1191
|
const target = e.target;
|
|
1166
1192
|
this.collapsibleFacetsVisible = target.open;
|
|
1167
|
-
}}
|
|
1168
|
-
>
|
|
1169
|
-
<summary>
|
|
1170
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
1171
|
-
<h2>${msg('Filters')}</h2>
|
|
1172
|
-
</summary>
|
|
1173
|
-
${facets}
|
|
1174
|
-
</details>
|
|
1193
|
+
}}
|
|
1194
|
+
>
|
|
1195
|
+
<summary>
|
|
1196
|
+
<span class="collapser-icon">${chevronIcon}</span>
|
|
1197
|
+
<h2>${msg('Filters')}</h2>
|
|
1198
|
+
</summary>
|
|
1199
|
+
${facets}
|
|
1200
|
+
</details>
|
|
1175
1201
|
`;
|
|
1176
1202
|
}
|
|
1177
1203
|
// Otherwise, just render the facets component bare
|
|
@@ -1191,34 +1217,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1191
1217
|
mobile,
|
|
1192
1218
|
});
|
|
1193
1219
|
const buttonText = mobile ? 'Clear all' : 'Clear all filters';
|
|
1194
|
-
return html `
|
|
1195
|
-
<div class="clear-filters-btn-row">
|
|
1220
|
+
return html `
|
|
1221
|
+
<div class="clear-filters-btn-row">
|
|
1196
1222
|
${mobile
|
|
1197
1223
|
? html `<span class="clear-filters-btn-separator"> </span>`
|
|
1198
|
-
: nothing}
|
|
1199
|
-
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1200
|
-
${buttonText}
|
|
1201
|
-
</button>
|
|
1202
|
-
</div>
|
|
1224
|
+
: nothing}
|
|
1225
|
+
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1226
|
+
${buttonText}
|
|
1227
|
+
</button>
|
|
1228
|
+
</div>
|
|
1203
1229
|
`;
|
|
1204
1230
|
}
|
|
1205
1231
|
/**
|
|
1206
1232
|
* Template for the table header content that appears atop the compact list view.
|
|
1207
1233
|
*/
|
|
1208
1234
|
get listHeaderTemplate() {
|
|
1209
|
-
return html `
|
|
1210
|
-
<div id="list-header">
|
|
1211
|
-
<tile-dispatcher
|
|
1212
|
-
.tileDisplayMode=${'list-header'}
|
|
1213
|
-
.resizeObserver=${this.resizeObserver}
|
|
1214
|
-
.sortParam=${this.sortParam}
|
|
1215
|
-
.defaultSortParam=${this.defaultSortParam}
|
|
1216
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1217
|
-
.loggedIn=${this.loggedIn}
|
|
1218
|
-
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1219
|
-
>
|
|
1220
|
-
</tile-dispatcher>
|
|
1221
|
-
</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>
|
|
1222
1248
|
`;
|
|
1223
1249
|
}
|
|
1224
1250
|
/**
|
|
@@ -1338,35 +1364,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1338
1364
|
if (changed.has('displayMode') ||
|
|
1339
1365
|
changed.has('baseNavigationUrl') ||
|
|
1340
1366
|
changed.has('baseImageUrl') ||
|
|
1341
|
-
changed.has('loggedIn')
|
|
1342
|
-
changed.has('tileActions')) {
|
|
1367
|
+
changed.has('loggedIn')) {
|
|
1343
1368
|
this.infiniteScroller?.reload();
|
|
1344
1369
|
}
|
|
1345
|
-
if (changed.has('baseQuery') ||
|
|
1346
|
-
changed.has('identifiers') ||
|
|
1347
|
-
changed.has('searchType') ||
|
|
1348
|
-
changed.has('withinCollection')) {
|
|
1349
|
-
// Unless this query/search type update is from the initial page load or the
|
|
1350
|
-
// result of hitting the back button,
|
|
1351
|
-
// we need to clear any existing filters since they may no longer be valid for
|
|
1352
|
-
// the new set of search results.
|
|
1353
|
-
if (!this.historyPopOccurred && this.initialQueryChangeHappened) {
|
|
1354
|
-
// Ordinarily, we leave the sort param unchanged between searches.
|
|
1355
|
-
// However, if we are changing the target collection itself, we want the sort cleared too,
|
|
1356
|
-
// since different collections may have different sorting options available.
|
|
1357
|
-
const shouldClearSort = changed.has('withinCollection') &&
|
|
1358
|
-
!changed.has('selectedSort') &&
|
|
1359
|
-
!changed.has('sortDirection');
|
|
1360
|
-
// Otherwise, only clear filters that haven't been simultaneously applied in this update
|
|
1361
|
-
this.clearFilters({
|
|
1362
|
-
sort: shouldClearSort,
|
|
1363
|
-
facets: !changed.has('selectedFacets'),
|
|
1364
|
-
dateRange: !(changed.has('minSelectedDate') || changed.has('maxSelectedDate')),
|
|
1365
|
-
letterFilters: !(changed.has('selectedTitleFilter') ||
|
|
1366
|
-
changed.has('selectedCreatorFilter')),
|
|
1367
|
-
});
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
1370
|
if (changed.has('profileElement')) {
|
|
1371
1371
|
this.applyDefaultProfileSort();
|
|
1372
1372
|
}
|
|
@@ -1974,29 +1974,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1974
1974
|
const isRadioSearch = this.searchType === SearchType.RADIO;
|
|
1975
1975
|
const { isTVCollection, isRadioCollection } = this;
|
|
1976
1976
|
const shouldUseLocalTime = isTVSearch || isRadioSearch || isTVCollection || isRadioCollection;
|
|
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
|
-
|
|
1994
|
-
?
|
|
1995
|
-
?
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
>
|
|
1999
|
-
</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>
|
|
2000
1999
|
`;
|
|
2001
2000
|
}
|
|
2002
2001
|
/**
|
|
@@ -2031,479 +2030,479 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
2031
2030
|
static get styles() {
|
|
2032
2031
|
return [
|
|
2033
2032
|
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
|
-
}
|
|
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
|
+
}
|
|
2507
2506
|
`,
|
|
2508
2507
|
];
|
|
2509
2508
|
}
|
|
@@ -2652,9 +2651,6 @@ __decorate([
|
|
|
2652
2651
|
__decorate([
|
|
2653
2652
|
property({ type: Boolean })
|
|
2654
2653
|
], CollectionBrowser.prototype, "isManageView", void 0);
|
|
2655
|
-
__decorate([
|
|
2656
|
-
property({ type: Array })
|
|
2657
|
-
], CollectionBrowser.prototype, "tileActions", void 0);
|
|
2658
2654
|
__decorate([
|
|
2659
2655
|
property({ type: String })
|
|
2660
2656
|
], CollectionBrowser.prototype, "manageViewLabel", void 0);
|