@internetarchive/collection-browser 2.22.1-alpha-webdev7818.5 → 2.22.1-alpha-webdev7761.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/collection-browser.d.ts +12 -5
- package/dist/src/collection-browser.js +785 -691
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets.js +12 -0
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +10 -1
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.d.ts +19 -1
- package/dist/src/data-source/collection-browser-data-source.js +36 -18
- package/dist/src/data-source/collection-browser-data-source.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/data-source/models.d.ts +11 -0
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/models.d.ts +2 -6
- package/dist/src/models.js +8 -12
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.d.ts +1 -2
- package/dist/src/restoration-state-handler.js +3 -9
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +97 -97
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +289 -289
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/test/collection-browser.test.js +206 -196
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/restoration-state-handler.test.js +5 -37
- package/dist/test/restoration-state-handler.test.js.map +1 -1
- package/package.json +1 -1
- package/src/collection-browser.ts +2848 -2755
- package/src/collection-facets.ts +11 -0
- package/src/data-source/collection-browser-data-source-interface.ts +345 -333
- package/src/data-source/collection-browser-data-source.ts +1432 -1390
- package/src/data-source/collection-browser-query-state.ts +1 -7
- package/src/data-source/models.ts +13 -0
- package/src/models.ts +10 -14
- package/src/restoration-state-handler.ts +9 -11
- package/src/tiles/list/tile-list-compact-header.ts +86 -86
- package/src/tiles/list/tile-list-compact.ts +236 -236
- package/src/tiles/list/tile-list.ts +688 -688
- package/test/collection-browser.test.ts +2369 -2359
- package/test/restoration-state-handler.test.ts +12 -42
|
@@ -22,6 +22,7 @@ import './manage/manage-bar';
|
|
|
22
22
|
import './collection-facets';
|
|
23
23
|
import './circular-activity-indicator';
|
|
24
24
|
import './collection-facets/smart-facets/smart-facet-bar';
|
|
25
|
+
import { mergeSelectedFacets, updateSelectedFacetBucket } from './utils/facet-utils';
|
|
25
26
|
let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
26
27
|
constructor() {
|
|
27
28
|
super();
|
|
@@ -33,7 +34,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
33
34
|
this.selectedSort = SortField.default;
|
|
34
35
|
this.selectedTitleFilter = null;
|
|
35
36
|
this.selectedCreatorFilter = null;
|
|
36
|
-
this.tvClipFilter = 'all';
|
|
37
37
|
this.sortDirection = null;
|
|
38
38
|
this.defaultSortField = SortField.relevance;
|
|
39
39
|
this.defaultSortDirection = null;
|
|
@@ -125,7 +125,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
125
125
|
this.manageViewLabel = 'Select items to remove';
|
|
126
126
|
/** Whether to replace the default sort options with a slot for customization (default: false) */
|
|
127
127
|
this.enableSortOptionsSlot = false;
|
|
128
|
-
/** Whether to
|
|
128
|
+
/** Whether to display a smart results carousel above the full results */
|
|
129
129
|
this.showSmartResults = false;
|
|
130
130
|
/**
|
|
131
131
|
* The maximum number of pages we will load when a privileged user clicks
|
|
@@ -183,6 +183,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
183
183
|
*/
|
|
184
184
|
this.dataSourceInstallInProgress = false;
|
|
185
185
|
this.placeholderCellTemplate = html `<collection-browser-loading-tile></collection-browser-loading-tile>`;
|
|
186
|
+
this.selectedTVNetwork = undefined;
|
|
187
|
+
this.selectedTVShow = undefined;
|
|
186
188
|
/**
|
|
187
189
|
* Updates the height of the left column according to its position on the page.
|
|
188
190
|
* Arrow function ensures proper `this` binding.
|
|
@@ -358,32 +360,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
358
360
|
this.setPlaceholderType();
|
|
359
361
|
}
|
|
360
362
|
render() {
|
|
361
|
-
return html `
|
|
363
|
+
return html `
|
|
362
364
|
${this.showSmartFacetBar && this.placeholderType === null
|
|
363
|
-
? html `<smart-facet-bar
|
|
364
|
-
.query=${this.baseQuery}
|
|
365
|
-
.aggregations=${this.dataSource.aggregations}
|
|
366
|
-
.selectedFacets=${this.selectedFacets}
|
|
367
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
368
|
-
.filterToggleShown=${!this.mobileView}
|
|
369
|
-
.filterToggleActive=${this.facetPaneVisible}
|
|
370
|
-
.label=${this.smartFacetBarLabel}
|
|
371
|
-
@facetsChanged=${this.facetsChanged}
|
|
365
|
+
? html `<smart-facet-bar
|
|
366
|
+
.query=${this.baseQuery}
|
|
367
|
+
.aggregations=${this.dataSource.aggregations}
|
|
368
|
+
.selectedFacets=${this.selectedFacets}
|
|
369
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
370
|
+
.filterToggleShown=${!this.mobileView}
|
|
371
|
+
.filterToggleActive=${this.facetPaneVisible}
|
|
372
|
+
.label=${this.smartFacetBarLabel}
|
|
373
|
+
@facetsChanged=${this.facetsChanged}
|
|
372
374
|
@filtersToggled=${() => {
|
|
373
375
|
this.facetPaneVisible = !this.facetPaneVisible;
|
|
374
376
|
this.emitFacetPaneVisibilityChanged();
|
|
375
|
-
}}
|
|
377
|
+
}}
|
|
376
378
|
></smart-facet-bar>`
|
|
377
|
-
: nothing}
|
|
378
|
-
|
|
379
|
-
<div
|
|
380
|
-
id="content-container"
|
|
381
|
-
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
382
|
-
>
|
|
379
|
+
: nothing}
|
|
380
|
+
|
|
381
|
+
<div
|
|
382
|
+
id="content-container"
|
|
383
|
+
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
384
|
+
>
|
|
383
385
|
${this.placeholderType
|
|
384
386
|
? this.emptyPlaceholderTemplate
|
|
385
|
-
: this.collectionBrowserTemplate}
|
|
386
|
-
</div>
|
|
387
|
+
: this.collectionBrowserTemplate}
|
|
388
|
+
</div>
|
|
387
389
|
`;
|
|
388
390
|
}
|
|
389
391
|
/**
|
|
@@ -427,23 +429,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
427
429
|
*/
|
|
428
430
|
get emptyPlaceholderTemplate() {
|
|
429
431
|
var _a;
|
|
430
|
-
return html `
|
|
431
|
-
<empty-placeholder
|
|
432
|
-
.placeholderType=${this.placeholderType}
|
|
433
|
-
?isMobileView=${this.mobileView}
|
|
434
|
-
?isCollection=${!!this.withinCollection}
|
|
435
|
-
.detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
|
|
436
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
437
|
-
></empty-placeholder>
|
|
432
|
+
return html `
|
|
433
|
+
<empty-placeholder
|
|
434
|
+
.placeholderType=${this.placeholderType}
|
|
435
|
+
?isMobileView=${this.mobileView}
|
|
436
|
+
?isCollection=${!!this.withinCollection}
|
|
437
|
+
.detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
|
|
438
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
439
|
+
></empty-placeholder>
|
|
438
440
|
`;
|
|
439
441
|
}
|
|
440
442
|
/**
|
|
441
443
|
* Top-level template for rendering the left (facets) and right (results) columns.
|
|
442
444
|
*/
|
|
443
445
|
get collectionBrowserTemplate() {
|
|
444
|
-
return html `
|
|
445
|
-
<div id="left-column-scroll-sentinel"></div>
|
|
446
|
-
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
446
|
+
return html `
|
|
447
|
+
<div id="left-column-scroll-sentinel"></div>
|
|
448
|
+
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
447
449
|
`;
|
|
448
450
|
}
|
|
449
451
|
/**
|
|
@@ -462,33 +464,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
462
464
|
* accordion-style facets.
|
|
463
465
|
*/
|
|
464
466
|
get mobileLeftColumnTemplate() {
|
|
465
|
-
return html `
|
|
466
|
-
<div
|
|
467
|
-
id="left-column"
|
|
468
|
-
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
469
|
-
>
|
|
470
|
-
${this.facetTopViewSlot} ${this.resultsCountTemplate}
|
|
471
|
-
<div id="facets-header-container">${this.mobileFacetsTemplate}</div>
|
|
472
|
-
</div>
|
|
467
|
+
return html `
|
|
468
|
+
<div
|
|
469
|
+
id="left-column"
|
|
470
|
+
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
471
|
+
>
|
|
472
|
+
${this.facetTopViewSlot} ${this.resultsCountTemplate}
|
|
473
|
+
<div id="facets-header-container">${this.mobileFacetsTemplate}</div>
|
|
474
|
+
</div>
|
|
473
475
|
`;
|
|
474
476
|
}
|
|
475
477
|
/**
|
|
476
478
|
* Template for the desktop version of the left column, displaying the facets sidebar.
|
|
477
479
|
*/
|
|
478
480
|
get desktopLeftColumnTemplate() {
|
|
479
|
-
return html `
|
|
480
|
-
<div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
|
|
481
|
-
${this.facetTopViewSlot}
|
|
482
|
-
<div id="facets-header-container">
|
|
483
|
-
<h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
|
|
484
|
-
${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
|
|
485
|
-
</div>
|
|
486
|
-
<div id="facets-container" aria-labelledby="facets-header">
|
|
487
|
-
${this.facetsTemplate}
|
|
488
|
-
<div id="facets-scroll-sentinel"></div>
|
|
489
|
-
</div>
|
|
490
|
-
<div id="facets-bottom-fade"></div>
|
|
491
|
-
</div>
|
|
481
|
+
return html `
|
|
482
|
+
<div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
|
|
483
|
+
${this.facetTopViewSlot}
|
|
484
|
+
<div id="facets-header-container">
|
|
485
|
+
<h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
|
|
486
|
+
${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
|
|
487
|
+
</div>
|
|
488
|
+
<div id="facets-container" aria-labelledby="facets-header">
|
|
489
|
+
${this.facetsTemplate}
|
|
490
|
+
<div id="facets-scroll-sentinel"></div>
|
|
491
|
+
</div>
|
|
492
|
+
<div id="facets-bottom-fade"></div>
|
|
493
|
+
</div>
|
|
492
494
|
`;
|
|
493
495
|
}
|
|
494
496
|
/**
|
|
@@ -496,8 +498,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
496
498
|
* - mainly used to render userlists
|
|
497
499
|
*/
|
|
498
500
|
get facetTopViewSlot() {
|
|
499
|
-
return html `<div id="facet-top-view">
|
|
500
|
-
<slot name="facet-top-slot"></slot>
|
|
501
|
+
return html `<div id="facet-top-view">
|
|
502
|
+
<slot name="facet-top-slot"></slot>
|
|
501
503
|
</div>`;
|
|
502
504
|
}
|
|
503
505
|
/**
|
|
@@ -512,15 +514,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
512
514
|
const resultsCount = (_a = this.totalResults) === null || _a === void 0 ? void 0 : _a.toLocaleString();
|
|
513
515
|
const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
|
|
514
516
|
// Added data-testid for Playwright testing
|
|
515
|
-
return html `
|
|
516
|
-
<div id="results-total" data-testid="results-total">
|
|
517
|
-
<span id="big-results-count">
|
|
518
|
-
${shouldShowSearching ? html `Searching…` : resultsCount}
|
|
519
|
-
</span>
|
|
520
|
-
<span id="big-results-label">
|
|
521
|
-
${shouldShowSearching ? nothing : resultsLabel}
|
|
522
|
-
</span>
|
|
523
|
-
</div>
|
|
517
|
+
return html `
|
|
518
|
+
<div id="results-total" data-testid="results-total">
|
|
519
|
+
<span id="big-results-count">
|
|
520
|
+
${shouldShowSearching ? html `Searching…` : resultsCount}
|
|
521
|
+
</span>
|
|
522
|
+
<span id="big-results-label">
|
|
523
|
+
${shouldShowSearching ? nothing : resultsLabel}
|
|
524
|
+
</span>
|
|
525
|
+
</div>
|
|
524
526
|
`;
|
|
525
527
|
}
|
|
526
528
|
/**
|
|
@@ -528,50 +530,53 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
528
530
|
* tiles and sort/filter bar are shown.
|
|
529
531
|
*/
|
|
530
532
|
get rightColumnTemplate() {
|
|
533
|
+
var _a;
|
|
531
534
|
const rightColumnClasses = classMap({
|
|
532
535
|
column: true,
|
|
533
536
|
'full-width': !this.facetPaneVisible,
|
|
534
537
|
'smart-results-spacing': !!this.showSmartResults,
|
|
535
538
|
});
|
|
536
|
-
return html `
|
|
537
|
-
<div id="right-column" class=${rightColumnClasses}>
|
|
539
|
+
return html `
|
|
540
|
+
<div id="right-column" class=${rightColumnClasses}>
|
|
538
541
|
${this.showSmartResults
|
|
539
542
|
? html `<slot name="smart-results"></slot>`
|
|
540
|
-
: nothing}
|
|
541
|
-
<section id="results">
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
543
|
+
: nothing}
|
|
544
|
+
<section id="results">
|
|
545
|
+
${this.showSmartResults
|
|
546
|
+
? html `<h2 class="results-section-heading">
|
|
547
|
+
${(_a = this.resultsHeader) !== null && _a !== void 0 ? _a : msg('All results')}
|
|
548
|
+
</h2>`
|
|
549
|
+
: nothing}
|
|
550
|
+
<div id="cb-top-view">
|
|
551
|
+
<slot name="cb-top-slot"></slot>
|
|
552
|
+
</div>
|
|
548
553
|
${this.isManageView
|
|
549
554
|
? this.manageBarTemplate
|
|
550
|
-
: this.sortFilterBarTemplate}
|
|
551
|
-
<slot name="cb-results"></slot>
|
|
555
|
+
: this.sortFilterBarTemplate}
|
|
556
|
+
<slot name="cb-results"></slot>
|
|
552
557
|
${this.displayMode === `list-compact` && this.totalResults
|
|
553
558
|
? this.listHeaderTemplate
|
|
554
|
-
: nothing}
|
|
555
|
-
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
556
|
-
</section>
|
|
557
|
-
</div>
|
|
559
|
+
: nothing}
|
|
560
|
+
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
561
|
+
</section>
|
|
562
|
+
</div>
|
|
558
563
|
`;
|
|
559
564
|
}
|
|
560
565
|
/**
|
|
561
566
|
* Template for the infinite scroller widget that contains the result tiles.
|
|
562
567
|
*/
|
|
563
568
|
get infiniteScrollerTemplate() {
|
|
564
|
-
return html `<infinite-scroller
|
|
565
|
-
class=${this.infiniteScrollerClasses}
|
|
566
|
-
itemCount=${this.placeholderType ? 0 : nothing}
|
|
567
|
-
ariaLandmarkLabel="Search results"
|
|
568
|
-
.cellProvider=${this}
|
|
569
|
-
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
570
|
-
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
571
|
-
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
569
|
+
return html `<infinite-scroller
|
|
570
|
+
class=${this.infiniteScrollerClasses}
|
|
571
|
+
itemCount=${this.placeholderType ? 0 : nothing}
|
|
572
|
+
ariaLandmarkLabel="Search results"
|
|
573
|
+
.cellProvider=${this}
|
|
574
|
+
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
575
|
+
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
576
|
+
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
572
577
|
>${this.displayMode === 'grid'
|
|
573
578
|
? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
|
|
574
|
-
: nothing}
|
|
579
|
+
: nothing}
|
|
575
580
|
</infinite-scroller>`;
|
|
576
581
|
}
|
|
577
582
|
/**
|
|
@@ -612,32 +617,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
612
617
|
}
|
|
613
618
|
// We only show relevance sort if a search query is currently defined
|
|
614
619
|
sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
|
|
615
|
-
return html `
|
|
616
|
-
<sort-filter-bar
|
|
617
|
-
.defaultSortField=${this.defaultSortField}
|
|
618
|
-
.defaultSortDirection=${this.defaultSortDirection}
|
|
619
|
-
.defaultViewSort=${defaultViewSort}
|
|
620
|
-
.defaultDateSort=${defaultDateSort}
|
|
621
|
-
.selectedSort=${this.selectedSort}
|
|
622
|
-
.sortDirection=${this.sortDirection}
|
|
623
|
-
.sortFieldAvailability=${sortFieldAvailability}
|
|
624
|
-
.displayMode=${this.displayMode}
|
|
625
|
-
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
626
|
-
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
627
|
-
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
628
|
-
.resizeObserver=${this.resizeObserver}
|
|
629
|
-
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
630
|
-
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
631
|
-
@sortChanged=${this.userChangedSort}
|
|
632
|
-
@displayModeChanged=${this.displayModeChanged}
|
|
633
|
-
@titleLetterChanged=${this.titleLetterSelected}
|
|
634
|
-
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
635
|
-
>
|
|
636
|
-
${this.tileBlurCheckboxTemplate}
|
|
637
|
-
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
638
|
-
<slot name="sort-options" slot="sort-options"></slot>
|
|
639
|
-
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
640
|
-
</sort-filter-bar>
|
|
620
|
+
return html `
|
|
621
|
+
<sort-filter-bar
|
|
622
|
+
.defaultSortField=${this.defaultSortField}
|
|
623
|
+
.defaultSortDirection=${this.defaultSortDirection}
|
|
624
|
+
.defaultViewSort=${defaultViewSort}
|
|
625
|
+
.defaultDateSort=${defaultDateSort}
|
|
626
|
+
.selectedSort=${this.selectedSort}
|
|
627
|
+
.sortDirection=${this.sortDirection}
|
|
628
|
+
.sortFieldAvailability=${sortFieldAvailability}
|
|
629
|
+
.displayMode=${this.displayMode}
|
|
630
|
+
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
631
|
+
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
632
|
+
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
633
|
+
.resizeObserver=${this.resizeObserver}
|
|
634
|
+
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
635
|
+
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
636
|
+
@sortChanged=${this.userChangedSort}
|
|
637
|
+
@displayModeChanged=${this.displayModeChanged}
|
|
638
|
+
@titleLetterChanged=${this.titleLetterSelected}
|
|
639
|
+
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
640
|
+
>
|
|
641
|
+
${this.tileBlurCheckboxTemplate}
|
|
642
|
+
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
643
|
+
<slot name="sort-options" slot="sort-options"></slot>
|
|
644
|
+
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
645
|
+
</sort-filter-bar>
|
|
641
646
|
`;
|
|
642
647
|
}
|
|
643
648
|
/**
|
|
@@ -649,20 +654,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
649
654
|
// Only show the checkbox for @archive.org users
|
|
650
655
|
if (!((_a = this.dataSource.sessionContext) === null || _a === void 0 ? void 0 : _a.is_archive_user))
|
|
651
656
|
return nothing;
|
|
652
|
-
return html `
|
|
653
|
-
<label
|
|
654
|
-
id="tile-blur-label"
|
|
655
|
-
for="tile-blur-check"
|
|
656
|
-
slot="sort-options-right"
|
|
657
|
-
>
|
|
658
|
-
${msg('Blurring')}
|
|
659
|
-
<input
|
|
660
|
-
id="tile-blur-check"
|
|
661
|
-
type="checkbox"
|
|
662
|
-
?checked=${!this.shouldSuppressTileBlurring}
|
|
663
|
-
@change=${this.tileBlurCheckboxChanged}
|
|
664
|
-
/>
|
|
665
|
-
</label>
|
|
657
|
+
return html `
|
|
658
|
+
<label
|
|
659
|
+
id="tile-blur-label"
|
|
660
|
+
for="tile-blur-check"
|
|
661
|
+
slot="sort-options-right"
|
|
662
|
+
>
|
|
663
|
+
${msg('Blurring')}
|
|
664
|
+
<input
|
|
665
|
+
id="tile-blur-check"
|
|
666
|
+
type="checkbox"
|
|
667
|
+
?checked=${!this.shouldSuppressTileBlurring}
|
|
668
|
+
@change=${this.tileBlurCheckboxChanged}
|
|
669
|
+
/>
|
|
670
|
+
</label>
|
|
666
671
|
`;
|
|
667
672
|
}
|
|
668
673
|
/**
|
|
@@ -673,27 +678,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
673
678
|
const manageViewModalMsg = this.profileElement === 'uploads'
|
|
674
679
|
? 'Note: it may take a few minutes for these items to stop appearing in your uploads list.'
|
|
675
680
|
: nothing;
|
|
676
|
-
return html `
|
|
677
|
-
<manage-bar
|
|
678
|
-
.label=${this.manageViewLabel}
|
|
679
|
-
.modalManager=${this.modalManager}
|
|
680
|
-
.selectedItems=${this.dataSource.checkedTileModels}
|
|
681
|
-
.manageViewModalMsg=${manageViewModalMsg}
|
|
682
|
-
showSelectAll
|
|
683
|
-
showUnselectAll
|
|
684
|
-
?showItemManageButton=${this.pageContext === 'search'}
|
|
685
|
-
?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
|
|
686
|
-
@removeItems=${this.handleRemoveItems}
|
|
687
|
-
@manageItems=${this.handleManageItems}
|
|
688
|
-
@selectAll=${() => this.dataSource.checkAllTiles()}
|
|
689
|
-
@unselectAll=${() => this.dataSource.uncheckAllTiles()}
|
|
681
|
+
return html `
|
|
682
|
+
<manage-bar
|
|
683
|
+
.label=${this.manageViewLabel}
|
|
684
|
+
.modalManager=${this.modalManager}
|
|
685
|
+
.selectedItems=${this.dataSource.checkedTileModels}
|
|
686
|
+
.manageViewModalMsg=${manageViewModalMsg}
|
|
687
|
+
showSelectAll
|
|
688
|
+
showUnselectAll
|
|
689
|
+
?showItemManageButton=${this.pageContext === 'search'}
|
|
690
|
+
?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
|
|
691
|
+
@removeItems=${this.handleRemoveItems}
|
|
692
|
+
@manageItems=${this.handleManageItems}
|
|
693
|
+
@selectAll=${() => this.dataSource.checkAllTiles()}
|
|
694
|
+
@unselectAll=${() => this.dataSource.uncheckAllTiles()}
|
|
690
695
|
@cancel=${() => {
|
|
691
696
|
this.isManageView = false;
|
|
692
697
|
this.dataSource.uncheckAllTiles();
|
|
693
698
|
if (this.searchResultsLoading)
|
|
694
699
|
this.dataSource.resetPages();
|
|
695
|
-
}}
|
|
696
|
-
></manage-bar>
|
|
700
|
+
}}
|
|
701
|
+
></manage-bar>
|
|
697
702
|
`;
|
|
698
703
|
}
|
|
699
704
|
/**
|
|
@@ -941,15 +946,88 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
941
946
|
label: target.open ? 'open' : 'closed',
|
|
942
947
|
});
|
|
943
948
|
};
|
|
944
|
-
return html `
|
|
945
|
-
<details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
|
|
946
|
-
<summary>
|
|
947
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
948
|
-
<h2>${msg('Filters')}</h2>
|
|
949
|
-
${this.clearFiltersBtnTemplate(true)}
|
|
950
|
-
</summary>
|
|
951
|
-
${this.facetsTemplate}
|
|
952
|
-
</details>
|
|
949
|
+
return html `
|
|
950
|
+
<details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
|
|
951
|
+
<summary>
|
|
952
|
+
<span class="collapser-icon">${chevronIcon}</span>
|
|
953
|
+
<h2>${msg('Filters')}</h2>
|
|
954
|
+
${this.clearFiltersBtnTemplate(true)}
|
|
955
|
+
</summary>
|
|
956
|
+
${this.facetsTemplate}
|
|
957
|
+
</details>
|
|
958
|
+
`;
|
|
959
|
+
}
|
|
960
|
+
async networksDropdownClicked() {
|
|
961
|
+
var _a, _b;
|
|
962
|
+
(_a = this.tvNetworksDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('loading');
|
|
963
|
+
await this.dataSource.populateTVChannelMaps();
|
|
964
|
+
(_b = this.tvNetworksDropdown) === null || _b === void 0 ? void 0 : _b.classList.remove('loading');
|
|
965
|
+
}
|
|
966
|
+
async showsDropdownClicked() {
|
|
967
|
+
var _a, _b;
|
|
968
|
+
(_a = this.tvShowsDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('loading');
|
|
969
|
+
await this.dataSource.populateTVChannelMaps();
|
|
970
|
+
(_b = this.tvShowsDropdown) === null || _b === void 0 ? void 0 : _b.classList.remove('loading');
|
|
971
|
+
}
|
|
972
|
+
async networksDropdownChanged() {
|
|
973
|
+
var _a;
|
|
974
|
+
if (((_a = this.tvNetworksDropdown) === null || _a === void 0 ? void 0 : _a.selectedIndex) === 0) {
|
|
975
|
+
this.selectedTVNetwork = undefined;
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
this.selectedTVNetwork = this.tvNetworksDropdown.selectedOptions[0].value;
|
|
979
|
+
const newNetworkFacets = getDefaultSelectedFacets();
|
|
980
|
+
for (const [channel, network] of this.dataSource.tvChannelMaps.channelToNetwork) {
|
|
981
|
+
if (network === this.selectedTVNetwork) {
|
|
982
|
+
updateSelectedFacetBucket(newNetworkFacets, 'creator', {
|
|
983
|
+
key: channel.toLowerCase(),
|
|
984
|
+
count: 0,
|
|
985
|
+
state: 'selected',
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
this.selectedFacets = mergeSelectedFacets(this.selectedFacets, newNetworkFacets);
|
|
990
|
+
}
|
|
991
|
+
async showsDropdownChanged() {
|
|
992
|
+
var _a;
|
|
993
|
+
if (((_a = this.tvShowsDropdown) === null || _a === void 0 ? void 0 : _a.selectedIndex) === 0) {
|
|
994
|
+
this.selectedTVShow = undefined;
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
this.selectedTVShow = this.tvShowsDropdown.selectedOptions[0].value;
|
|
998
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, 'program', {
|
|
999
|
+
key: this.selectedTVShow,
|
|
1000
|
+
count: 0,
|
|
1001
|
+
state: 'selected',
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
get tvDropdownFiltersTemplate() {
|
|
1005
|
+
if (this.searchType !== SearchType.TV)
|
|
1006
|
+
return nothing;
|
|
1007
|
+
log('start filters template preprocess', Date.now());
|
|
1008
|
+
const { channelToNetwork, programToChannels } = this.dataSource.tvChannelMaps;
|
|
1009
|
+
const networks = channelToNetwork
|
|
1010
|
+
? [...new Set(channelToNetwork.values())]
|
|
1011
|
+
: [];
|
|
1012
|
+
let showEntries = programToChannels
|
|
1013
|
+
? [...programToChannels.entries()]
|
|
1014
|
+
: [];
|
|
1015
|
+
if (channelToNetwork && this.selectedTVNetwork) {
|
|
1016
|
+
showEntries = showEntries.filter(([, channels]) => Object.keys(channels).some(c => channelToNetwork.get(c) === this.selectedTVNetwork));
|
|
1017
|
+
}
|
|
1018
|
+
const shows = showEntries.map(([show]) => show);
|
|
1019
|
+
log('end filters template preprocess', Date.now());
|
|
1020
|
+
return html `
|
|
1021
|
+
<div id="tv-filters" slot="facets-top">
|
|
1022
|
+
<select id="tv-networks" class="tv-filter-dropdown" @click=${this.networksDropdownClicked} @change=${this.networksDropdownChanged}>
|
|
1023
|
+
<option selected value="">${msg('Filter by Network')}</option>
|
|
1024
|
+
${networks.map(n => html `<option>${n}</option>`)}
|
|
1025
|
+
</select>
|
|
1026
|
+
<select id="tv-shows" class="tv-filter-dropdown" @click=${this.showsDropdownClicked} @change=${this.showsDropdownChanged}>
|
|
1027
|
+
<option selected value="">${msg('Filter by Show')}</option>
|
|
1028
|
+
${shows.map(s => html `<option>${s}</option>`)}
|
|
1029
|
+
</select>
|
|
1030
|
+
</div>
|
|
953
1031
|
`;
|
|
954
1032
|
}
|
|
955
1033
|
/**
|
|
@@ -959,10 +1037,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
959
1037
|
if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
|
|
960
1038
|
return nothing;
|
|
961
1039
|
if (this.facetLoadStrategy === 'off') {
|
|
962
|
-
return html `
|
|
963
|
-
<p class="facets-message">
|
|
964
|
-
${msg('Facets are temporarily unavailable.')}
|
|
965
|
-
</p>
|
|
1040
|
+
return html `
|
|
1041
|
+
<p class="facets-message">
|
|
1042
|
+
${msg('Facets are temporarily unavailable.')}
|
|
1043
|
+
</p>
|
|
966
1044
|
`;
|
|
967
1045
|
}
|
|
968
1046
|
// We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
|
|
@@ -971,44 +1049,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
971
1049
|
const facetDisplayOrder = shouldUseTvInterface
|
|
972
1050
|
? tvFacetDisplayOrder
|
|
973
1051
|
: defaultFacetDisplayOrder;
|
|
974
|
-
const facets = html `
|
|
975
|
-
<collection-facets
|
|
976
|
-
.collectionPagePath=${this.collectionPagePath}
|
|
977
|
-
.parentCollections=${this.dataSource.parentCollections}
|
|
978
|
-
.pageSpecifierParams=${this.dataSource.pageSpecifierParams}
|
|
979
|
-
.searchService=${this.searchService}
|
|
980
|
-
.featureFeedbackService=${this.featureFeedbackService}
|
|
981
|
-
.recaptchaManager=${this.recaptchaManager}
|
|
982
|
-
.resizeObserver=${this.resizeObserver}
|
|
983
|
-
.searchType=${this.searchType}
|
|
984
|
-
.aggregations=${this.dataSource.aggregations}
|
|
985
|
-
.histogramAggregation=${this.dataSource.histogramAggregation}
|
|
986
|
-
.minSelectedDate=${this.minSelectedDate}
|
|
987
|
-
.maxSelectedDate=${this.maxSelectedDate}
|
|
988
|
-
.selectedFacets=${this.selectedFacets}
|
|
989
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
990
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
991
|
-
.tvChannelAliases=${this.dataSource.tvChannelAliases}
|
|
992
|
-
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
993
|
-
.allowExpandingDatePicker=${!this.mobileView}
|
|
994
|
-
.allowDatePickerMonths=${shouldUseTvInterface}
|
|
995
|
-
.contentWidth=${this.contentWidth}
|
|
996
|
-
.query=${this.baseQuery}
|
|
997
|
-
.filterMap=${this.dataSource.filterMap}
|
|
998
|
-
.isManageView=${this.isManageView}
|
|
999
|
-
.modalManager=${this.modalManager}
|
|
1000
|
-
.analyticsHandler=${this.analyticsHandler}
|
|
1001
|
-
.facetDisplayOrder=${facetDisplayOrder}
|
|
1002
|
-
.isTvSearch=${shouldUseTvInterface}
|
|
1003
|
-
?collapsableFacets=${this.mobileView}
|
|
1004
|
-
?facetsLoading=${this.facetsLoading}
|
|
1005
|
-
?histogramAggregationLoading=${this.facetsLoading}
|
|
1006
|
-
?suppressMediatypeFacets=${this.suppressMediatypeFacets}
|
|
1007
|
-
@facetClick=${this.facetClickHandler}
|
|
1008
|
-
@facetsChanged=${this.facetsChanged}
|
|
1009
|
-
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
1010
|
-
>
|
|
1011
|
-
|
|
1052
|
+
const facets = html `
|
|
1053
|
+
<collection-facets
|
|
1054
|
+
.collectionPagePath=${this.collectionPagePath}
|
|
1055
|
+
.parentCollections=${this.dataSource.parentCollections}
|
|
1056
|
+
.pageSpecifierParams=${this.dataSource.pageSpecifierParams}
|
|
1057
|
+
.searchService=${this.searchService}
|
|
1058
|
+
.featureFeedbackService=${this.featureFeedbackService}
|
|
1059
|
+
.recaptchaManager=${this.recaptchaManager}
|
|
1060
|
+
.resizeObserver=${this.resizeObserver}
|
|
1061
|
+
.searchType=${this.searchType}
|
|
1062
|
+
.aggregations=${this.dataSource.aggregations}
|
|
1063
|
+
.histogramAggregation=${this.dataSource.histogramAggregation}
|
|
1064
|
+
.minSelectedDate=${this.minSelectedDate}
|
|
1065
|
+
.maxSelectedDate=${this.maxSelectedDate}
|
|
1066
|
+
.selectedFacets=${this.selectedFacets}
|
|
1067
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1068
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1069
|
+
.tvChannelAliases=${this.dataSource.tvChannelAliases}
|
|
1070
|
+
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
1071
|
+
.allowExpandingDatePicker=${!this.mobileView}
|
|
1072
|
+
.allowDatePickerMonths=${shouldUseTvInterface}
|
|
1073
|
+
.contentWidth=${this.contentWidth}
|
|
1074
|
+
.query=${this.baseQuery}
|
|
1075
|
+
.filterMap=${this.dataSource.filterMap}
|
|
1076
|
+
.isManageView=${this.isManageView}
|
|
1077
|
+
.modalManager=${this.modalManager}
|
|
1078
|
+
.analyticsHandler=${this.analyticsHandler}
|
|
1079
|
+
.facetDisplayOrder=${facetDisplayOrder}
|
|
1080
|
+
.isTvSearch=${shouldUseTvInterface}
|
|
1081
|
+
?collapsableFacets=${this.mobileView}
|
|
1082
|
+
?facetsLoading=${this.facetsLoading}
|
|
1083
|
+
?histogramAggregationLoading=${this.facetsLoading}
|
|
1084
|
+
?suppressMediatypeFacets=${this.suppressMediatypeFacets}
|
|
1085
|
+
@facetClick=${this.facetClickHandler}
|
|
1086
|
+
@facetsChanged=${this.facetsChanged}
|
|
1087
|
+
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
1088
|
+
>
|
|
1089
|
+
${this.tvDropdownFiltersTemplate}
|
|
1090
|
+
</collection-facets>
|
|
1012
1091
|
`;
|
|
1013
1092
|
// If we are using one of the opt-in facet load strategies, we may need to wrap the
|
|
1014
1093
|
// desktop view facets in a <details> widget so that patrons can opt into loading them.
|
|
@@ -1016,20 +1095,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1016
1095
|
const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
|
|
1017
1096
|
(this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
|
|
1018
1097
|
if (showDesktopOptInWidget && !this.mobileView) {
|
|
1019
|
-
return html `
|
|
1020
|
-
<details
|
|
1021
|
-
class="desktop-facets-dropdown"
|
|
1098
|
+
return html `
|
|
1099
|
+
<details
|
|
1100
|
+
class="desktop-facets-dropdown"
|
|
1022
1101
|
@toggle=${(e) => {
|
|
1023
1102
|
const target = e.target;
|
|
1024
1103
|
this.collapsibleFacetsVisible = target.open;
|
|
1025
|
-
}}
|
|
1026
|
-
>
|
|
1027
|
-
<summary>
|
|
1028
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
1029
|
-
<h2>${msg('Filters')}</h2>
|
|
1030
|
-
</summary>
|
|
1031
|
-
${facets}
|
|
1032
|
-
</details>
|
|
1104
|
+
}}
|
|
1105
|
+
>
|
|
1106
|
+
<summary>
|
|
1107
|
+
<span class="collapser-icon">${chevronIcon}</span>
|
|
1108
|
+
<h2>${msg('Filters')}</h2>
|
|
1109
|
+
</summary>
|
|
1110
|
+
${facets}
|
|
1111
|
+
</details>
|
|
1033
1112
|
`;
|
|
1034
1113
|
}
|
|
1035
1114
|
// Otherwise, just render the facets component bare
|
|
@@ -1049,34 +1128,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1049
1128
|
mobile,
|
|
1050
1129
|
});
|
|
1051
1130
|
const buttonText = mobile ? 'Clear all' : 'Clear all filters';
|
|
1052
|
-
return html `
|
|
1053
|
-
<div class="clear-filters-btn-row">
|
|
1131
|
+
return html `
|
|
1132
|
+
<div class="clear-filters-btn-row">
|
|
1054
1133
|
${mobile
|
|
1055
1134
|
? html `<span class="clear-filters-btn-separator"> </span>`
|
|
1056
|
-
: nothing}
|
|
1057
|
-
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1058
|
-
${buttonText}
|
|
1059
|
-
</button>
|
|
1060
|
-
</div>
|
|
1135
|
+
: nothing}
|
|
1136
|
+
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1137
|
+
${buttonText}
|
|
1138
|
+
</button>
|
|
1139
|
+
</div>
|
|
1061
1140
|
`;
|
|
1062
1141
|
}
|
|
1063
1142
|
/**
|
|
1064
1143
|
* Template for the table header content that appears atop the compact list view.
|
|
1065
1144
|
*/
|
|
1066
1145
|
get listHeaderTemplate() {
|
|
1067
|
-
return html `
|
|
1068
|
-
<div id="list-header">
|
|
1069
|
-
<tile-dispatcher
|
|
1070
|
-
.tileDisplayMode=${'list-header'}
|
|
1071
|
-
.resizeObserver=${this.resizeObserver}
|
|
1072
|
-
.sortParam=${this.sortParam}
|
|
1073
|
-
.defaultSortParam=${this.defaultSortParam}
|
|
1074
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1075
|
-
.loggedIn=${this.loggedIn}
|
|
1076
|
-
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1077
|
-
>
|
|
1078
|
-
</tile-dispatcher>
|
|
1079
|
-
</div>
|
|
1146
|
+
return html `
|
|
1147
|
+
<div id="list-header">
|
|
1148
|
+
<tile-dispatcher
|
|
1149
|
+
.tileDisplayMode=${'list-header'}
|
|
1150
|
+
.resizeObserver=${this.resizeObserver}
|
|
1151
|
+
.sortParam=${this.sortParam}
|
|
1152
|
+
.defaultSortParam=${this.defaultSortParam}
|
|
1153
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1154
|
+
.loggedIn=${this.loggedIn}
|
|
1155
|
+
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1156
|
+
>
|
|
1157
|
+
</tile-dispatcher>
|
|
1158
|
+
</div>
|
|
1080
1159
|
`;
|
|
1081
1160
|
}
|
|
1082
1161
|
/**
|
|
@@ -1123,7 +1202,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1123
1202
|
* represent, such as the search query, sort option, and any filters applied.
|
|
1124
1203
|
*/
|
|
1125
1204
|
async installDataSourceAndQueryState(dataSource, queryState) {
|
|
1126
|
-
var _a, _b
|
|
1205
|
+
var _a, _b;
|
|
1127
1206
|
log('Installing data source & query state in CB:', dataSource, queryState);
|
|
1128
1207
|
if (this.dataSource)
|
|
1129
1208
|
this.removeController(this.dataSource);
|
|
@@ -1141,7 +1220,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1141
1220
|
this.sortDirection = queryState.sortDirection;
|
|
1142
1221
|
this.selectedTitleFilter = queryState.selectedTitleFilter;
|
|
1143
1222
|
this.selectedCreatorFilter = queryState.selectedCreatorFilter;
|
|
1144
|
-
this.tvClipFilter = (_c = queryState.tvClipFilter) !== null && _c !== void 0 ? _c : 'all';
|
|
1145
1223
|
this.pagesToRender = this.initialPageNumber;
|
|
1146
1224
|
// We set this flag during the update to prevent the URL state persistence
|
|
1147
1225
|
// from creating an unwanted extra history entry.
|
|
@@ -1458,7 +1536,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1458
1536
|
sortDirection: this.sortDirection,
|
|
1459
1537
|
selectedTitleFilter: this.selectedTitleFilter,
|
|
1460
1538
|
selectedCreatorFilter: this.selectedCreatorFilter,
|
|
1461
|
-
tvClipFilter: this.tvClipFilter,
|
|
1462
1539
|
},
|
|
1463
1540
|
}));
|
|
1464
1541
|
}
|
|
@@ -1576,7 +1653,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1576
1653
|
this.restoreState();
|
|
1577
1654
|
}
|
|
1578
1655
|
restoreState() {
|
|
1579
|
-
var _a, _b, _c, _d, _e
|
|
1656
|
+
var _a, _b, _c, _d, _e;
|
|
1580
1657
|
const restorationState = this.restorationStateHandler.getRestorationState();
|
|
1581
1658
|
this.displayMode = restorationState.displayMode;
|
|
1582
1659
|
if (!this.suppressURLSinParam && restorationState.searchType != null)
|
|
@@ -1591,7 +1668,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1591
1668
|
this.currentPage = (_e = restorationState.currentPage) !== null && _e !== void 0 ? _e : 1;
|
|
1592
1669
|
this.minSelectedDate = restorationState.minSelectedDate;
|
|
1593
1670
|
this.maxSelectedDate = restorationState.maxSelectedDate;
|
|
1594
|
-
this.tvClipFilter = (_f = restorationState.tvClipFilter) !== null && _f !== void 0 ? _f : 'all';
|
|
1595
1671
|
if (this.currentPage > 1) {
|
|
1596
1672
|
this.goToPage(this.currentPage);
|
|
1597
1673
|
}
|
|
@@ -1612,7 +1688,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1612
1688
|
maxSelectedDate: this.maxSelectedDate,
|
|
1613
1689
|
selectedTitleFilter: (_c = this.selectedTitleFilter) !== null && _c !== void 0 ? _c : undefined,
|
|
1614
1690
|
selectedCreatorFilter: (_d = this.selectedCreatorFilter) !== null && _d !== void 0 ? _d : undefined,
|
|
1615
|
-
tvClipFilter: this.tvClipFilter,
|
|
1616
1691
|
};
|
|
1617
1692
|
const persistOptions = {
|
|
1618
1693
|
forceReplace: this.dataSourceInstallInProgress,
|
|
@@ -1805,27 +1880,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1805
1880
|
const model = this.tileModelAtCellIndex(index);
|
|
1806
1881
|
if (!model)
|
|
1807
1882
|
return undefined;
|
|
1808
|
-
return html `
|
|
1809
|
-
<tile-dispatcher
|
|
1810
|
-
.collectionPagePath=${this.collectionPagePath}
|
|
1811
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1812
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
1813
|
-
.model=${model}
|
|
1814
|
-
.tileDisplayMode=${this.displayMode}
|
|
1815
|
-
.resizeObserver=${this.resizeObserver}
|
|
1816
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1817
|
-
.sortParam=${this.sortParam}
|
|
1818
|
-
.defaultSortParam=${this.defaultSortParam}
|
|
1819
|
-
.creatorFilter=${this.selectedCreatorFilter}
|
|
1820
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1821
|
-
.loggedIn=${this.loggedIn}
|
|
1822
|
-
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1823
|
-
.isManageView=${this.isManageView}
|
|
1824
|
-
?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
|
|
1825
|
-
?enableHoverPane=${true}
|
|
1826
|
-
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1827
|
-
>
|
|
1828
|
-
</tile-dispatcher>
|
|
1883
|
+
return html `
|
|
1884
|
+
<tile-dispatcher
|
|
1885
|
+
.collectionPagePath=${this.collectionPagePath}
|
|
1886
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1887
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
1888
|
+
.model=${model}
|
|
1889
|
+
.tileDisplayMode=${this.displayMode}
|
|
1890
|
+
.resizeObserver=${this.resizeObserver}
|
|
1891
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1892
|
+
.sortParam=${this.sortParam}
|
|
1893
|
+
.defaultSortParam=${this.defaultSortParam}
|
|
1894
|
+
.creatorFilter=${this.selectedCreatorFilter}
|
|
1895
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1896
|
+
.loggedIn=${this.loggedIn}
|
|
1897
|
+
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1898
|
+
.isManageView=${this.isManageView}
|
|
1899
|
+
?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
|
|
1900
|
+
?enableHoverPane=${true}
|
|
1901
|
+
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1902
|
+
>
|
|
1903
|
+
</tile-dispatcher>
|
|
1829
1904
|
`;
|
|
1830
1905
|
}
|
|
1831
1906
|
/**
|
|
@@ -1861,440 +1936,450 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1861
1936
|
static get styles() {
|
|
1862
1937
|
return [
|
|
1863
1938
|
srOnlyStyle,
|
|
1864
|
-
css `
|
|
1865
|
-
:host {
|
|
1866
|
-
display: block;
|
|
1867
|
-
--leftColumnWidth: 18rem;
|
|
1868
|
-
--leftColumnPaddingTop: 2rem;
|
|
1869
|
-
--leftColumnPaddingRight: 2.5rem;
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
#facet-top-view {
|
|
1873
|
-
display: flex;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* When page width resizes from desktop to mobile, use this class to
|
|
1878
|
-
* disable expand/collapse transition when loading.
|
|
1879
|
-
*/
|
|
1880
|
-
.preload * {
|
|
1881
|
-
transition: none !important;
|
|
1882
|
-
-webkit-transition: none !important;
|
|
1883
|
-
-moz-transition: none !important;
|
|
1884
|
-
-ms-transition: none !important;
|
|
1885
|
-
-o-transition: none !important;
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
#content-container {
|
|
1889
|
-
display: flex;
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
empty-placeholder {
|
|
1893
|
-
margin-top: var(--placeholderMarginTop, 0);
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
.collapser-icon {
|
|
1897
|
-
display: inline-block;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
.collapser-icon svg {
|
|
1901
|
-
display: inline-block;
|
|
1902
|
-
width: 12px;
|
|
1903
|
-
height: 12px;
|
|
1904
|
-
transition: transform 0.2s ease-out;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
#mobile-filter-collapse {
|
|
1908
|
-
width: 100%;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
#mobile-filter-collapse > summary {
|
|
1912
|
-
cursor: pointer;
|
|
1913
|
-
list-style: none;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
#mobile-filter-collapse[open] > summary {
|
|
1917
|
-
margin-bottom: 10px;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
#mobile-filter-collapse h2 {
|
|
1921
|
-
display: inline-block;
|
|
1922
|
-
margin: 0;
|
|
1923
|
-
font-size: 2rem;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
#mobile-filter-collapse[open] svg {
|
|
1927
|
-
transform: rotate(90deg);
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
#content-container.mobile {
|
|
1931
|
-
display: block;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
#right-column {
|
|
1935
|
-
flex: 1;
|
|
1936
|
-
position: relative;
|
|
1937
|
-
min-height: 90vh;
|
|
1938
|
-
border-right: 1px solid rgb(232, 232, 232);
|
|
1939
|
-
margin-top: var(--rightColumnMarginTop, 0);
|
|
1940
|
-
padding-top:
|
|
1941
|
-
background: #fff;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
#left-column:not([hidden]) + #right-column {
|
|
1945
|
-
border-left: 1px solid rgb(232, 232, 232);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
#right-column.smart-results-spacing {
|
|
1949
|
-
padding-top: 0.5rem;
|
|
1950
|
-
border-right: none;
|
|
1951
|
-
background: transparent;
|
|
1952
|
-
min-width: 0;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
#results {
|
|
1956
|
-
background: #fff;
|
|
1957
|
-
padding-left: 1rem;
|
|
1958
|
-
padding-right: 1rem;
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
#right-column.smart-results-spacing #results {
|
|
1962
|
-
border-radius: 10px 10px 0px 0px;
|
|
1963
|
-
padding-top: 0.5rem;
|
|
1964
|
-
margin-top: 1rem;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
.mobile #right-column {
|
|
1968
|
-
border-left: none;
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
.mobile #results {
|
|
1972
|
-
padding: 5px 5px 0;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
#left-column {
|
|
1976
|
-
width: var(--leftColumnWidth, 18rem);
|
|
1977
|
-
/* Prevents Safari from shrinking col at first draw */
|
|
1978
|
-
min-width: var(--leftColumnWidth, 18rem);
|
|
1979
|
-
padding-top: var(--leftColumnPaddingTop, 2rem);
|
|
1980
|
-
/* Reduced padding by 0.2rem to add the invisible border in the rule below */
|
|
1981
|
-
padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
|
|
1982
|
-
border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
|
|
1983
|
-
z-index: 1;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
.desktop #left-column {
|
|
1987
|
-
top: 0;
|
|
1988
|
-
position: sticky;
|
|
1989
|
-
height: calc(100vh - 2rem);
|
|
1990
|
-
max-height: calc(100vh - 2rem);
|
|
1991
|
-
overflow-x: hidden;
|
|
1992
|
-
overflow-y: scroll;
|
|
1993
|
-
|
|
1994
|
-
/*
|
|
1995
|
-
* Firefox doesn't support any of the -webkit-scrollbar stuff below, but
|
|
1996
|
-
* does at least give us a tiny bit of control over width & color.
|
|
1997
|
-
*/
|
|
1998
|
-
scrollbar-width: thin;
|
|
1999
|
-
scrollbar-color: transparent transparent;
|
|
2000
|
-
}
|
|
2001
|
-
.desktop #left-column:hover {
|
|
2002
|
-
scrollbar-color: auto;
|
|
2003
|
-
}
|
|
2004
|
-
.desktop #left-column::-webkit-scrollbar {
|
|
2005
|
-
appearance: none;
|
|
2006
|
-
width: 6px;
|
|
2007
|
-
}
|
|
2008
|
-
.desktop #left-column::-webkit-scrollbar-button {
|
|
2009
|
-
height: 3px;
|
|
2010
|
-
background: transparent;
|
|
2011
|
-
}
|
|
2012
|
-
.desktop #left-column::-webkit-scrollbar-corner {
|
|
2013
|
-
background: transparent;
|
|
2014
|
-
}
|
|
2015
|
-
.desktop #left-column::-webkit-scrollbar-thumb {
|
|
2016
|
-
border-radius: 4px;
|
|
2017
|
-
}
|
|
2018
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb {
|
|
2019
|
-
background: rgba(0, 0, 0, 0.15);
|
|
2020
|
-
}
|
|
2021
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
|
|
2022
|
-
background: rgba(0, 0, 0, 0.2);
|
|
2023
|
-
}
|
|
2024
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb:active {
|
|
2025
|
-
background: rgba(0, 0, 0, 0.3);
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
#facets-bottom-fade {
|
|
2029
|
-
background: linear-gradient(
|
|
2030
|
-
to bottom,
|
|
2031
|
-
#f5f5f700 0%,
|
|
2032
|
-
#f5f5f7c0 50%,
|
|
2033
|
-
#f5f5f7 80%,
|
|
2034
|
-
#f5f5f7 100%
|
|
2035
|
-
);
|
|
2036
|
-
position: fixed;
|
|
2037
|
-
bottom: 0;
|
|
2038
|
-
height: 50px;
|
|
2039
|
-
/* Wide enough to cover the content, but leave the scrollbar uncovered */
|
|
2040
|
-
width: calc(
|
|
2041
|
-
var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
|
|
2042
|
-
);
|
|
2043
|
-
z-index: 2;
|
|
2044
|
-
pointer-events: none;
|
|
2045
|
-
transition: height 0.1s ease;
|
|
2046
|
-
}
|
|
2047
|
-
#facets-bottom-fade.hidden {
|
|
2048
|
-
height: 0;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
.facets-message {
|
|
2052
|
-
font-size: 1.4rem;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
.desktop-facets-dropdown > summary {
|
|
2056
|
-
cursor: pointer;
|
|
2057
|
-
list-style: none;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
.desktop-facets-dropdown h2 {
|
|
2061
|
-
display: inline-block;
|
|
2062
|
-
margin: 0;
|
|
2063
|
-
font-size: 1.6rem;
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
.desktop-facets-dropdown[open] > summary {
|
|
2067
|
-
margin-bottom: 10px;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
.desktop-facets-dropdown[open] svg {
|
|
2071
|
-
transform: rotate(90deg);
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
.desktop #left-column-scroll-sentinel {
|
|
2075
|
-
width: 1px;
|
|
2076
|
-
height: 100vh;
|
|
2077
|
-
background: transparent;
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
.desktop #facets-scroll-sentinel {
|
|
2081
|
-
width: 1px;
|
|
2082
|
-
height: 1px;
|
|
2083
|
-
background: transparent;
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
#facets-header-container {
|
|
2087
|
-
display: flex;
|
|
2088
|
-
justify-content: space-between;
|
|
2089
|
-
align-items: flex-start;
|
|
2090
|
-
clear: both;
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
.desktop #facets-header-container {
|
|
2094
|
-
flex-wrap: wrap;
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
.mobile #left-column {
|
|
2098
|
-
width: 100%;
|
|
2099
|
-
min-width: 0;
|
|
2100
|
-
padding: 5px 0;
|
|
2101
|
-
border: 0;
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
.clear-filters-btn-row {
|
|
2105
|
-
display: inline-block;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
.desktop .clear-filters-btn-row {
|
|
2109
|
-
width: 100%;
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
.clear-filters-btn {
|
|
2113
|
-
display: inline-block;
|
|
2114
|
-
appearance: none;
|
|
2115
|
-
margin: 0;
|
|
2116
|
-
padding: 0;
|
|
2117
|
-
border: 0;
|
|
2118
|
-
background: none;
|
|
2119
|
-
color: var(--ia-theme-link-color);
|
|
2120
|
-
font-size: 1.4rem;
|
|
2121
|
-
font-family: inherit;
|
|
2122
|
-
cursor: pointer;
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
.clear-filters-btn:hover {
|
|
2126
|
-
text-decoration: underline;
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
.clear-filters-btn-separator {
|
|
2130
|
-
display: inline-block;
|
|
2131
|
-
margin-left: 5px;
|
|
2132
|
-
border-left: 1px solid #2c2c2c;
|
|
2133
|
-
font-size: 1.4rem;
|
|
2134
|
-
line-height: 1.3rem;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
#
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
padding
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
padding-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
#
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
#
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
#big-results-
|
|
2188
|
-
font-size:
|
|
2189
|
-
font-weight:
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
margin
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
--
|
|
2241
|
-
--
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
infinite-scroller.list-
|
|
2245
|
-
--infiniteScrollerCellMinWidth: var(
|
|
2246
|
-
--collectionBrowserCellMinWidth,
|
|
2247
|
-
100%
|
|
2248
|
-
);
|
|
2249
|
-
--infiniteScrollerCellMinHeight:
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
1939
|
+
css `
|
|
1940
|
+
:host {
|
|
1941
|
+
display: block;
|
|
1942
|
+
--leftColumnWidth: 18rem;
|
|
1943
|
+
--leftColumnPaddingTop: 2rem;
|
|
1944
|
+
--leftColumnPaddingRight: 2.5rem;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
#facet-top-view {
|
|
1948
|
+
display: flex;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* When page width resizes from desktop to mobile, use this class to
|
|
1953
|
+
* disable expand/collapse transition when loading.
|
|
1954
|
+
*/
|
|
1955
|
+
.preload * {
|
|
1956
|
+
transition: none !important;
|
|
1957
|
+
-webkit-transition: none !important;
|
|
1958
|
+
-moz-transition: none !important;
|
|
1959
|
+
-ms-transition: none !important;
|
|
1960
|
+
-o-transition: none !important;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
#content-container {
|
|
1964
|
+
display: flex;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
empty-placeholder {
|
|
1968
|
+
margin-top: var(--placeholderMarginTop, 0);
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.collapser-icon {
|
|
1972
|
+
display: inline-block;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.collapser-icon svg {
|
|
1976
|
+
display: inline-block;
|
|
1977
|
+
width: 12px;
|
|
1978
|
+
height: 12px;
|
|
1979
|
+
transition: transform 0.2s ease-out;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
#mobile-filter-collapse {
|
|
1983
|
+
width: 100%;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
#mobile-filter-collapse > summary {
|
|
1987
|
+
cursor: pointer;
|
|
1988
|
+
list-style: none;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
#mobile-filter-collapse[open] > summary {
|
|
1992
|
+
margin-bottom: 10px;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
#mobile-filter-collapse h2 {
|
|
1996
|
+
display: inline-block;
|
|
1997
|
+
margin: 0;
|
|
1998
|
+
font-size: 2rem;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
#mobile-filter-collapse[open] svg {
|
|
2002
|
+
transform: rotate(90deg);
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
#content-container.mobile {
|
|
2006
|
+
display: block;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
#right-column {
|
|
2010
|
+
flex: 1;
|
|
2011
|
+
position: relative;
|
|
2012
|
+
min-height: 90vh;
|
|
2013
|
+
border-right: 1px solid rgb(232, 232, 232);
|
|
2014
|
+
margin-top: var(--rightColumnMarginTop, 0);
|
|
2015
|
+
padding-top: 2rem;
|
|
2016
|
+
background: #fff;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
#left-column:not([hidden]) + #right-column {
|
|
2020
|
+
border-left: 1px solid rgb(232, 232, 232);
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
#right-column.smart-results-spacing {
|
|
2024
|
+
padding-top: 0.5rem;
|
|
2025
|
+
border-right: none;
|
|
2026
|
+
background: transparent;
|
|
2027
|
+
min-width: 0;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
#results {
|
|
2031
|
+
background: #fff;
|
|
2032
|
+
padding-left: 1rem;
|
|
2033
|
+
padding-right: 1rem;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
#right-column.smart-results-spacing #results {
|
|
2037
|
+
border-radius: 10px 10px 0px 0px;
|
|
2038
|
+
padding-top: 0.5rem;
|
|
2039
|
+
margin-top: 1rem;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
.mobile #right-column {
|
|
2043
|
+
border-left: none;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.mobile #results {
|
|
2047
|
+
padding: 5px 5px 0;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
#left-column {
|
|
2051
|
+
width: var(--leftColumnWidth, 18rem);
|
|
2052
|
+
/* Prevents Safari from shrinking col at first draw */
|
|
2053
|
+
min-width: var(--leftColumnWidth, 18rem);
|
|
2054
|
+
padding-top: var(--leftColumnPaddingTop, 2rem);
|
|
2055
|
+
/* Reduced padding by 0.2rem to add the invisible border in the rule below */
|
|
2056
|
+
padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
|
|
2057
|
+
border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
|
|
2058
|
+
z-index: 1;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.desktop #left-column {
|
|
2062
|
+
top: 0;
|
|
2063
|
+
position: sticky;
|
|
2064
|
+
height: calc(100vh - 2rem);
|
|
2065
|
+
max-height: calc(100vh - 2rem);
|
|
2066
|
+
overflow-x: hidden;
|
|
2067
|
+
overflow-y: scroll;
|
|
2068
|
+
|
|
2069
|
+
/*
|
|
2070
|
+
* Firefox doesn't support any of the -webkit-scrollbar stuff below, but
|
|
2071
|
+
* does at least give us a tiny bit of control over width & color.
|
|
2072
|
+
*/
|
|
2073
|
+
scrollbar-width: thin;
|
|
2074
|
+
scrollbar-color: transparent transparent;
|
|
2075
|
+
}
|
|
2076
|
+
.desktop #left-column:hover {
|
|
2077
|
+
scrollbar-color: auto;
|
|
2078
|
+
}
|
|
2079
|
+
.desktop #left-column::-webkit-scrollbar {
|
|
2080
|
+
appearance: none;
|
|
2081
|
+
width: 6px;
|
|
2082
|
+
}
|
|
2083
|
+
.desktop #left-column::-webkit-scrollbar-button {
|
|
2084
|
+
height: 3px;
|
|
2085
|
+
background: transparent;
|
|
2086
|
+
}
|
|
2087
|
+
.desktop #left-column::-webkit-scrollbar-corner {
|
|
2088
|
+
background: transparent;
|
|
2089
|
+
}
|
|
2090
|
+
.desktop #left-column::-webkit-scrollbar-thumb {
|
|
2091
|
+
border-radius: 4px;
|
|
2092
|
+
}
|
|
2093
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb {
|
|
2094
|
+
background: rgba(0, 0, 0, 0.15);
|
|
2095
|
+
}
|
|
2096
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
|
|
2097
|
+
background: rgba(0, 0, 0, 0.2);
|
|
2098
|
+
}
|
|
2099
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb:active {
|
|
2100
|
+
background: rgba(0, 0, 0, 0.3);
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
#facets-bottom-fade {
|
|
2104
|
+
background: linear-gradient(
|
|
2105
|
+
to bottom,
|
|
2106
|
+
#f5f5f700 0%,
|
|
2107
|
+
#f5f5f7c0 50%,
|
|
2108
|
+
#f5f5f7 80%,
|
|
2109
|
+
#f5f5f7 100%
|
|
2110
|
+
);
|
|
2111
|
+
position: fixed;
|
|
2112
|
+
bottom: 0;
|
|
2113
|
+
height: 50px;
|
|
2114
|
+
/* Wide enough to cover the content, but leave the scrollbar uncovered */
|
|
2115
|
+
width: calc(
|
|
2116
|
+
var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
|
|
2117
|
+
);
|
|
2118
|
+
z-index: 2;
|
|
2119
|
+
pointer-events: none;
|
|
2120
|
+
transition: height 0.1s ease;
|
|
2121
|
+
}
|
|
2122
|
+
#facets-bottom-fade.hidden {
|
|
2123
|
+
height: 0;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
.facets-message {
|
|
2127
|
+
font-size: 1.4rem;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
.desktop-facets-dropdown > summary {
|
|
2131
|
+
cursor: pointer;
|
|
2132
|
+
list-style: none;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
.desktop-facets-dropdown h2 {
|
|
2136
|
+
display: inline-block;
|
|
2137
|
+
margin: 0;
|
|
2138
|
+
font-size: 1.6rem;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
.desktop-facets-dropdown[open] > summary {
|
|
2142
|
+
margin-bottom: 10px;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
.desktop-facets-dropdown[open] svg {
|
|
2146
|
+
transform: rotate(90deg);
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
.desktop #left-column-scroll-sentinel {
|
|
2150
|
+
width: 1px;
|
|
2151
|
+
height: 100vh;
|
|
2152
|
+
background: transparent;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
.desktop #facets-scroll-sentinel {
|
|
2156
|
+
width: 1px;
|
|
2157
|
+
height: 1px;
|
|
2158
|
+
background: transparent;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
#facets-header-container {
|
|
2162
|
+
display: flex;
|
|
2163
|
+
justify-content: space-between;
|
|
2164
|
+
align-items: flex-start;
|
|
2165
|
+
clear: both;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
.desktop #facets-header-container {
|
|
2169
|
+
flex-wrap: wrap;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
.mobile #left-column {
|
|
2173
|
+
width: 100%;
|
|
2174
|
+
min-width: 0;
|
|
2175
|
+
padding: 5px 0;
|
|
2176
|
+
border: 0;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
.clear-filters-btn-row {
|
|
2180
|
+
display: inline-block;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
.desktop .clear-filters-btn-row {
|
|
2184
|
+
width: 100%;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
.clear-filters-btn {
|
|
2188
|
+
display: inline-block;
|
|
2189
|
+
appearance: none;
|
|
2190
|
+
margin: 0;
|
|
2191
|
+
padding: 0;
|
|
2192
|
+
border: 0;
|
|
2193
|
+
background: none;
|
|
2194
|
+
color: var(--ia-theme-link-color);
|
|
2195
|
+
font-size: 1.4rem;
|
|
2196
|
+
font-family: inherit;
|
|
2197
|
+
cursor: pointer;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
.clear-filters-btn:hover {
|
|
2201
|
+
text-decoration: underline;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
.clear-filters-btn-separator {
|
|
2205
|
+
display: inline-block;
|
|
2206
|
+
margin-left: 5px;
|
|
2207
|
+
border-left: 1px solid #2c2c2c;
|
|
2208
|
+
font-size: 1.4rem;
|
|
2209
|
+
line-height: 1.3rem;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
#tv-filters {
|
|
2213
|
+
margin-bottom: 15px;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.tv-filter-dropdown {
|
|
2217
|
+
width: 100%;
|
|
2218
|
+
padding: 3px;
|
|
2219
|
+
margin-bottom: 5px;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
#facets-container {
|
|
2223
|
+
position: relative;
|
|
2224
|
+
max-height: 0;
|
|
2225
|
+
transition: max-height 0.2s ease-in-out;
|
|
2226
|
+
z-index: 1;
|
|
2227
|
+
margin-top: 5rem;
|
|
2228
|
+
padding-bottom: 2rem;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
.desktop #facets-container {
|
|
2232
|
+
width: 18rem;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
.mobile #facets-container {
|
|
2236
|
+
overflow: hidden;
|
|
2237
|
+
padding-bottom: 0;
|
|
2238
|
+
padding-left: 10px;
|
|
2239
|
+
padding-right: 10px;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
#facets-container.expanded {
|
|
2243
|
+
max-height: 2000px;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.results-section-heading {
|
|
2247
|
+
margin: 0.5rem 0.3rem;
|
|
2248
|
+
font-size: 2rem;
|
|
2249
|
+
line-height: 25px;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
#results-total {
|
|
2253
|
+
display: flex;
|
|
2254
|
+
align-items: baseline;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.mobile #results-total {
|
|
2258
|
+
position: absolute;
|
|
2259
|
+
right: 10px;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
#big-results-count {
|
|
2263
|
+
font-size: 2.4rem;
|
|
2264
|
+
font-weight: 500;
|
|
2265
|
+
margin-right: 5px;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.mobile #big-results-count {
|
|
2269
|
+
font-size: 2rem;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
#big-results-label {
|
|
2273
|
+
font-size: 1.4rem;
|
|
2274
|
+
font-weight: 200;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
#list-header {
|
|
2278
|
+
max-height: 4.2rem;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
.loading-cover {
|
|
2282
|
+
position: absolute;
|
|
2283
|
+
top: 0;
|
|
2284
|
+
left: 0;
|
|
2285
|
+
width: 100%;
|
|
2286
|
+
height: 100%;
|
|
2287
|
+
display: flex;
|
|
2288
|
+
justify-content: center;
|
|
2289
|
+
z-index: 1;
|
|
2290
|
+
padding-top: 50px;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
#tile-blur-label {
|
|
2294
|
+
display: flex;
|
|
2295
|
+
align-items: center;
|
|
2296
|
+
column-gap: 5px;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
#tile-blur-check {
|
|
2300
|
+
margin: 0 5px 0 0;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
circular-activity-indicator {
|
|
2304
|
+
width: 30px;
|
|
2305
|
+
height: 30px;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
sort-filter-bar {
|
|
2309
|
+
display: block;
|
|
2310
|
+
margin-bottom: 4rem;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
infinite-scroller {
|
|
2314
|
+
display: block;
|
|
2315
|
+
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
2316
|
+
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
infinite-scroller.list-compact {
|
|
2320
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2321
|
+
--collectionBrowserCellMinWidth,
|
|
2322
|
+
100%
|
|
2323
|
+
);
|
|
2324
|
+
--infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
|
|
2325
|
+
--infiniteScrollerCellMaxHeight: 56px;
|
|
2326
|
+
--infiniteScrollerRowGap: 10px;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
infinite-scroller.list-detail {
|
|
2330
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2331
|
+
--collectionBrowserCellMinWidth,
|
|
2332
|
+
100%
|
|
2333
|
+
);
|
|
2334
|
+
--infiniteScrollerCellMinHeight: var(
|
|
2335
|
+
--collectionBrowserCellMinHeight,
|
|
2336
|
+
5rem
|
|
2337
|
+
);
|
|
2338
|
+
/*
|
|
2339
|
+
30px in spec, compensating for a -4px margin
|
|
2340
|
+
to align title with top of item image
|
|
2341
|
+
src/tiles/list/tile-list.ts
|
|
2342
|
+
*/
|
|
2343
|
+
--infiniteScrollerRowGap: 34px;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
.mobile infinite-scroller.list-detail {
|
|
2347
|
+
--infiniteScrollerRowGap: 24px;
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
infinite-scroller.grid {
|
|
2351
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2352
|
+
--collectionBrowserCellMinWidth,
|
|
2353
|
+
17rem
|
|
2354
|
+
);
|
|
2355
|
+
--infiniteScrollerCellMaxWidth: var(
|
|
2356
|
+
--collectionBrowserCellMaxWidth,
|
|
2357
|
+
1fr
|
|
2358
|
+
);
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
/* Allow tiles to shrink a bit further at smaller viewport widths */
|
|
2362
|
+
@media screen and (max-width: 880px) {
|
|
2363
|
+
infinite-scroller.grid {
|
|
2364
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2365
|
+
--collectionBrowserCellMinWidth,
|
|
2366
|
+
15rem
|
|
2367
|
+
);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
/* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
|
|
2371
|
+
@media screen and (max-width: 360px) {
|
|
2372
|
+
infinite-scroller.grid {
|
|
2373
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2374
|
+
--collectionBrowserCellMinWidth,
|
|
2375
|
+
12rem
|
|
2376
|
+
);
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
infinite-scroller.hidden {
|
|
2381
|
+
display: none;
|
|
2382
|
+
}
|
|
2298
2383
|
`,
|
|
2299
2384
|
];
|
|
2300
2385
|
}
|
|
@@ -2335,9 +2420,6 @@ __decorate([
|
|
|
2335
2420
|
__decorate([
|
|
2336
2421
|
property({ type: String })
|
|
2337
2422
|
], CollectionBrowser.prototype, "selectedCreatorFilter", void 0);
|
|
2338
|
-
__decorate([
|
|
2339
|
-
property({ type: String })
|
|
2340
|
-
], CollectionBrowser.prototype, "tvClipFilter", void 0);
|
|
2341
2423
|
__decorate([
|
|
2342
2424
|
property({ type: String })
|
|
2343
2425
|
], CollectionBrowser.prototype, "sortDirection", void 0);
|
|
@@ -2509,6 +2591,18 @@ __decorate([
|
|
|
2509
2591
|
__decorate([
|
|
2510
2592
|
query('infinite-scroller')
|
|
2511
2593
|
], CollectionBrowser.prototype, "infiniteScroller", void 0);
|
|
2594
|
+
__decorate([
|
|
2595
|
+
state()
|
|
2596
|
+
], CollectionBrowser.prototype, "selectedTVNetwork", void 0);
|
|
2597
|
+
__decorate([
|
|
2598
|
+
state()
|
|
2599
|
+
], CollectionBrowser.prototype, "selectedTVShow", void 0);
|
|
2600
|
+
__decorate([
|
|
2601
|
+
query('#tv-networks')
|
|
2602
|
+
], CollectionBrowser.prototype, "tvNetworksDropdown", void 0);
|
|
2603
|
+
__decorate([
|
|
2604
|
+
query('#tv-shows')
|
|
2605
|
+
], CollectionBrowser.prototype, "tvShowsDropdown", void 0);
|
|
2512
2606
|
CollectionBrowser = __decorate([
|
|
2513
2607
|
customElement('collection-browser')
|
|
2514
2608
|
], CollectionBrowser);
|