@internetarchive/collection-browser 3.3.3 → 3.3.4-alpha-webdev7761.1
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 +11 -2
- package/dist/src/collection-browser.js +840 -693
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.js +141 -140
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/models.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/manage/manage-bar.js +77 -77
- package/dist/src/manage/manage-bar.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/grid/search-tile.js +42 -42
- package/dist/src/tiles/grid/search-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +119 -119
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/test/collection-browser.test.js +19 -9
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/facet-row.test.js +23 -23
- package/dist/test/collection-facets/facet-row.test.js.map +1 -1
- package/dist/test/collection-facets.test.js +20 -20
- package/dist/test/collection-facets.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 +3002 -2829
- package/src/collection-facets/facet-row.ts +299 -296
- package/src/collection-facets/models.ts +10 -10
- 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 +59 -19
- package/src/data-source/collection-browser-query-state.ts +1 -7
- package/src/data-source/models.ts +13 -0
- package/src/manage/manage-bar.ts +247 -247
- package/src/models.ts +866 -870
- package/src/restoration-state-handler.ts +542 -544
- package/src/tiles/grid/search-tile.ts +90 -90
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -130
- package/test/collection-browser.test.ts +21 -11
- package/test/collection-facets/facet-row.test.ts +375 -375
- package/test/collection-facets.test.ts +928 -928
- package/test/restoration-state-handler.test.ts +480 -510
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, LitElement, nothing, } from 'lit';
|
|
3
3
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
|
+
import { map } from 'lit/directives/map.js';
|
|
4
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
6
|
import { msg } from '@lit/localize';
|
|
6
7
|
import { SearchType, } from '@internetarchive/search-service';
|
|
@@ -22,6 +23,7 @@ import './manage/manage-bar';
|
|
|
22
23
|
import './collection-facets';
|
|
23
24
|
import './circular-activity-indicator';
|
|
24
25
|
import './collection-facets/smart-facets/smart-facet-bar';
|
|
26
|
+
import { updateSelectedFacetBucket, } from './utils/facet-utils';
|
|
25
27
|
let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
26
28
|
constructor() {
|
|
27
29
|
super();
|
|
@@ -33,7 +35,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
33
35
|
this.selectedSort = SortField.default;
|
|
34
36
|
this.selectedTitleFilter = null;
|
|
35
37
|
this.selectedCreatorFilter = null;
|
|
36
|
-
this.tvClipFilter = 'all';
|
|
37
38
|
this.sortDirection = null;
|
|
38
39
|
this.defaultSortField = SortField.relevance;
|
|
39
40
|
this.defaultSortDirection = null;
|
|
@@ -183,6 +184,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
183
184
|
*/
|
|
184
185
|
this.dataSourceInstallInProgress = false;
|
|
185
186
|
this.placeholderCellTemplate = html `<collection-browser-loading-tile></collection-browser-loading-tile>`;
|
|
187
|
+
this.selectedTVNetwork = undefined;
|
|
188
|
+
this.selectedTVShow = undefined;
|
|
189
|
+
this.shouldPopulateShows = false;
|
|
186
190
|
/**
|
|
187
191
|
* Updates the height of the left column according to its position on the page.
|
|
188
192
|
* Arrow function ensures proper `this` binding.
|
|
@@ -358,32 +362,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
358
362
|
this.setPlaceholderType();
|
|
359
363
|
}
|
|
360
364
|
render() {
|
|
361
|
-
return html `
|
|
365
|
+
return html `
|
|
362
366
|
${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}
|
|
367
|
+
? html `<smart-facet-bar
|
|
368
|
+
.query=${this.baseQuery}
|
|
369
|
+
.aggregations=${this.dataSource.aggregations}
|
|
370
|
+
.selectedFacets=${this.selectedFacets}
|
|
371
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
372
|
+
.filterToggleShown=${!this.mobileView}
|
|
373
|
+
.filterToggleActive=${this.facetPaneVisible}
|
|
374
|
+
.label=${this.smartFacetBarLabel}
|
|
375
|
+
@facetsChanged=${this.facetsChanged}
|
|
372
376
|
@filtersToggled=${() => {
|
|
373
377
|
this.facetPaneVisible = !this.facetPaneVisible;
|
|
374
378
|
this.emitFacetPaneVisibilityChanged();
|
|
375
|
-
}}
|
|
379
|
+
}}
|
|
376
380
|
></smart-facet-bar>`
|
|
377
|
-
: nothing}
|
|
378
|
-
|
|
379
|
-
<div
|
|
380
|
-
id="content-container"
|
|
381
|
-
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
382
|
-
>
|
|
381
|
+
: nothing}
|
|
382
|
+
|
|
383
|
+
<div
|
|
384
|
+
id="content-container"
|
|
385
|
+
class=${this.mobileView ? 'mobile' : 'desktop'}
|
|
386
|
+
>
|
|
383
387
|
${this.placeholderType
|
|
384
388
|
? this.emptyPlaceholderTemplate
|
|
385
|
-
: this.collectionBrowserTemplate}
|
|
386
|
-
</div>
|
|
389
|
+
: this.collectionBrowserTemplate}
|
|
390
|
+
</div>
|
|
387
391
|
`;
|
|
388
392
|
}
|
|
389
393
|
/**
|
|
@@ -429,23 +433,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
429
433
|
*/
|
|
430
434
|
get emptyPlaceholderTemplate() {
|
|
431
435
|
var _a;
|
|
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>
|
|
436
|
+
return html `
|
|
437
|
+
<empty-placeholder
|
|
438
|
+
.placeholderType=${this.placeholderType}
|
|
439
|
+
?isMobileView=${this.mobileView}
|
|
440
|
+
?isCollection=${!!this.withinCollection}
|
|
441
|
+
.detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
|
|
442
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
443
|
+
></empty-placeholder>
|
|
440
444
|
`;
|
|
441
445
|
}
|
|
442
446
|
/**
|
|
443
447
|
* Top-level template for rendering the left (facets) and right (results) columns.
|
|
444
448
|
*/
|
|
445
449
|
get collectionBrowserTemplate() {
|
|
446
|
-
return html `
|
|
447
|
-
<div id="left-column-scroll-sentinel"></div>
|
|
448
|
-
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
450
|
+
return html `
|
|
451
|
+
<div id="left-column-scroll-sentinel"></div>
|
|
452
|
+
${this.leftColumnTemplate} ${this.rightColumnTemplate}
|
|
449
453
|
`;
|
|
450
454
|
}
|
|
451
455
|
/**
|
|
@@ -464,33 +468,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
464
468
|
* accordion-style facets.
|
|
465
469
|
*/
|
|
466
470
|
get mobileLeftColumnTemplate() {
|
|
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>
|
|
471
|
+
return html `
|
|
472
|
+
<div
|
|
473
|
+
id="left-column"
|
|
474
|
+
class="column${this.isResizeToMobile ? ' preload' : ''}"
|
|
475
|
+
>
|
|
476
|
+
${this.facetTopViewSlot} ${this.resultsCountTemplate}
|
|
477
|
+
<div id="facets-header-container">${this.mobileFacetsTemplate}</div>
|
|
478
|
+
</div>
|
|
475
479
|
`;
|
|
476
480
|
}
|
|
477
481
|
/**
|
|
478
482
|
* Template for the desktop version of the left column, displaying the facets sidebar.
|
|
479
483
|
*/
|
|
480
484
|
get desktopLeftColumnTemplate() {
|
|
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>
|
|
485
|
+
return html `
|
|
486
|
+
<div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
|
|
487
|
+
${this.facetTopViewSlot}
|
|
488
|
+
<div id="facets-header-container">
|
|
489
|
+
<h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
|
|
490
|
+
${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
|
|
491
|
+
</div>
|
|
492
|
+
<div id="facets-container" aria-labelledby="facets-header">
|
|
493
|
+
${this.facetsTemplate}
|
|
494
|
+
<div id="facets-scroll-sentinel"></div>
|
|
495
|
+
</div>
|
|
496
|
+
<div id="facets-bottom-fade"></div>
|
|
497
|
+
</div>
|
|
494
498
|
`;
|
|
495
499
|
}
|
|
496
500
|
/**
|
|
@@ -498,8 +502,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
498
502
|
* - mainly used to render userlists
|
|
499
503
|
*/
|
|
500
504
|
get facetTopViewSlot() {
|
|
501
|
-
return html `<div id="facet-top-view">
|
|
502
|
-
<slot name="facet-top-slot"></slot>
|
|
505
|
+
return html `<div id="facet-top-view">
|
|
506
|
+
<slot name="facet-top-slot"></slot>
|
|
503
507
|
</div>`;
|
|
504
508
|
}
|
|
505
509
|
/**
|
|
@@ -514,15 +518,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
514
518
|
const resultsCount = (_a = this.totalResults) === null || _a === void 0 ? void 0 : _a.toLocaleString();
|
|
515
519
|
const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
|
|
516
520
|
// Added data-testid for Playwright testing
|
|
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>
|
|
521
|
+
return html `
|
|
522
|
+
<div id="results-total" data-testid="results-total">
|
|
523
|
+
<span id="big-results-count">
|
|
524
|
+
${shouldShowSearching ? html `Searching…` : resultsCount}
|
|
525
|
+
</span>
|
|
526
|
+
<span id="big-results-label">
|
|
527
|
+
${shouldShowSearching ? nothing : resultsLabel}
|
|
528
|
+
</span>
|
|
529
|
+
</div>
|
|
526
530
|
`;
|
|
527
531
|
}
|
|
528
532
|
/**
|
|
@@ -535,45 +539,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
535
539
|
'full-width': !this.facetPaneVisible,
|
|
536
540
|
'smart-results-spacing': !!this.showSmartResults,
|
|
537
541
|
});
|
|
538
|
-
return html `
|
|
539
|
-
<div id="right-column" class=${rightColumnClasses}>
|
|
542
|
+
return html `
|
|
543
|
+
<div id="right-column" class=${rightColumnClasses}>
|
|
540
544
|
${this.showSmartResults
|
|
541
545
|
? html `<slot name="smart-results"></slot>`
|
|
542
|
-
: nothing}
|
|
543
|
-
<section id="results">
|
|
544
|
-
<h2 class="results-section-heading">
|
|
545
|
-
<slot name="results-heading"></slot>
|
|
546
|
-
</h2>
|
|
547
|
-
<div id="cb-top-view">
|
|
548
|
-
<slot name="cb-top-slot"></slot>
|
|
549
|
-
</div>
|
|
546
|
+
: nothing}
|
|
547
|
+
<section id="results">
|
|
548
|
+
<h2 class="results-section-heading">
|
|
549
|
+
<slot name="results-heading"></slot>
|
|
550
|
+
</h2>
|
|
551
|
+
<div id="cb-top-view">
|
|
552
|
+
<slot name="cb-top-slot"></slot>
|
|
553
|
+
</div>
|
|
550
554
|
${this.isManageView
|
|
551
555
|
? this.manageBarTemplate
|
|
552
|
-
: this.sortFilterBarTemplate}
|
|
553
|
-
<slot name="cb-results"></slot>
|
|
556
|
+
: this.sortFilterBarTemplate}
|
|
557
|
+
<slot name="cb-results"></slot>
|
|
554
558
|
${this.displayMode === `list-compact` && this.totalResults
|
|
555
559
|
? this.listHeaderTemplate
|
|
556
|
-
: nothing}
|
|
557
|
-
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
558
|
-
</section>
|
|
559
|
-
</div>
|
|
560
|
+
: nothing}
|
|
561
|
+
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
562
|
+
</section>
|
|
563
|
+
</div>
|
|
560
564
|
`;
|
|
561
565
|
}
|
|
562
566
|
/**
|
|
563
567
|
* Template for the infinite scroller widget that contains the result tiles.
|
|
564
568
|
*/
|
|
565
569
|
get infiniteScrollerTemplate() {
|
|
566
|
-
return html `<infinite-scroller
|
|
567
|
-
class=${this.infiniteScrollerClasses}
|
|
568
|
-
itemCount=${this.placeholderType ? 0 : nothing}
|
|
569
|
-
ariaLandmarkLabel="Search results"
|
|
570
|
-
.cellProvider=${this}
|
|
571
|
-
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
572
|
-
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
573
|
-
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
570
|
+
return html `<infinite-scroller
|
|
571
|
+
class=${this.infiniteScrollerClasses}
|
|
572
|
+
itemCount=${this.placeholderType ? 0 : nothing}
|
|
573
|
+
ariaLandmarkLabel="Search results"
|
|
574
|
+
.cellProvider=${this}
|
|
575
|
+
.placeholderCellTemplate=${this.placeholderCellTemplate}
|
|
576
|
+
@scrollThresholdReached=${this.scrollThresholdReached}
|
|
577
|
+
@visibleCellsChanged=${this.visibleCellsChanged}
|
|
574
578
|
>${this.displayMode === 'grid'
|
|
575
579
|
? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
|
|
576
|
-
: nothing}
|
|
580
|
+
: nothing}
|
|
577
581
|
</infinite-scroller>`;
|
|
578
582
|
}
|
|
579
583
|
/**
|
|
@@ -614,32 +618,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
614
618
|
}
|
|
615
619
|
// We only show relevance sort if a search query is currently defined
|
|
616
620
|
sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
|
|
617
|
-
return html `
|
|
618
|
-
<sort-filter-bar
|
|
619
|
-
.defaultSortField=${this.defaultSortField}
|
|
620
|
-
.defaultSortDirection=${this.defaultSortDirection}
|
|
621
|
-
.defaultViewSort=${defaultViewSort}
|
|
622
|
-
.defaultDateSort=${defaultDateSort}
|
|
623
|
-
.selectedSort=${this.selectedSort}
|
|
624
|
-
.sortDirection=${this.sortDirection}
|
|
625
|
-
.sortFieldAvailability=${sortFieldAvailability}
|
|
626
|
-
.displayMode=${this.displayMode}
|
|
627
|
-
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
628
|
-
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
629
|
-
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
630
|
-
.resizeObserver=${this.resizeObserver}
|
|
631
|
-
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
632
|
-
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
633
|
-
@sortChanged=${this.userChangedSort}
|
|
634
|
-
@displayModeChanged=${this.displayModeChanged}
|
|
635
|
-
@titleLetterChanged=${this.titleLetterSelected}
|
|
636
|
-
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
637
|
-
>
|
|
638
|
-
${this.tileBlurCheckboxTemplate}
|
|
639
|
-
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
640
|
-
<slot name="sort-options" slot="sort-options"></slot>
|
|
641
|
-
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
642
|
-
</sort-filter-bar>
|
|
621
|
+
return html `
|
|
622
|
+
<sort-filter-bar
|
|
623
|
+
.defaultSortField=${this.defaultSortField}
|
|
624
|
+
.defaultSortDirection=${this.defaultSortDirection}
|
|
625
|
+
.defaultViewSort=${defaultViewSort}
|
|
626
|
+
.defaultDateSort=${defaultDateSort}
|
|
627
|
+
.selectedSort=${this.selectedSort}
|
|
628
|
+
.sortDirection=${this.sortDirection}
|
|
629
|
+
.sortFieldAvailability=${sortFieldAvailability}
|
|
630
|
+
.displayMode=${this.displayMode}
|
|
631
|
+
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
632
|
+
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
633
|
+
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
634
|
+
.resizeObserver=${this.resizeObserver}
|
|
635
|
+
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
636
|
+
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
637
|
+
@sortChanged=${this.userChangedSort}
|
|
638
|
+
@displayModeChanged=${this.displayModeChanged}
|
|
639
|
+
@titleLetterChanged=${this.titleLetterSelected}
|
|
640
|
+
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
641
|
+
>
|
|
642
|
+
${this.tileBlurCheckboxTemplate}
|
|
643
|
+
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
644
|
+
<slot name="sort-options" slot="sort-options"></slot>
|
|
645
|
+
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
646
|
+
</sort-filter-bar>
|
|
643
647
|
`;
|
|
644
648
|
}
|
|
645
649
|
/**
|
|
@@ -651,20 +655,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
651
655
|
// Only show the checkbox for @archive.org users
|
|
652
656
|
if (!((_a = this.dataSource.sessionContext) === null || _a === void 0 ? void 0 : _a.is_archive_user))
|
|
653
657
|
return nothing;
|
|
654
|
-
return html `
|
|
655
|
-
<label
|
|
656
|
-
id="tile-blur-label"
|
|
657
|
-
for="tile-blur-check"
|
|
658
|
-
slot="sort-options-right"
|
|
659
|
-
>
|
|
660
|
-
${msg('Blurring')}
|
|
661
|
-
<input
|
|
662
|
-
id="tile-blur-check"
|
|
663
|
-
type="checkbox"
|
|
664
|
-
?checked=${!this.shouldSuppressTileBlurring}
|
|
665
|
-
@change=${this.tileBlurCheckboxChanged}
|
|
666
|
-
/>
|
|
667
|
-
</label>
|
|
658
|
+
return html `
|
|
659
|
+
<label
|
|
660
|
+
id="tile-blur-label"
|
|
661
|
+
for="tile-blur-check"
|
|
662
|
+
slot="sort-options-right"
|
|
663
|
+
>
|
|
664
|
+
${msg('Blurring')}
|
|
665
|
+
<input
|
|
666
|
+
id="tile-blur-check"
|
|
667
|
+
type="checkbox"
|
|
668
|
+
?checked=${!this.shouldSuppressTileBlurring}
|
|
669
|
+
@change=${this.tileBlurCheckboxChanged}
|
|
670
|
+
/>
|
|
671
|
+
</label>
|
|
668
672
|
`;
|
|
669
673
|
}
|
|
670
674
|
/**
|
|
@@ -690,27 +694,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
690
694
|
* showing the management view. This generally replaces the sort bar when present.
|
|
691
695
|
*/
|
|
692
696
|
get manageBarTemplate() {
|
|
693
|
-
return html `
|
|
694
|
-
<manage-bar
|
|
695
|
-
.label=${this.manageViewLabel}
|
|
696
|
-
.modalManager=${this.modalManager}
|
|
697
|
-
.selectedItems=${this.dataSource.checkedTileModels}
|
|
698
|
-
.manageViewModalMsg=${this.manageViewModalMsg}
|
|
699
|
-
showSelectAll
|
|
700
|
-
showUnselectAll
|
|
701
|
-
?showItemManageButton=${this.pageContext === 'search'}
|
|
702
|
-
?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
|
|
703
|
-
@removeItems=${this.handleRemoveItems}
|
|
704
|
-
@manageItems=${this.handleManageItems}
|
|
705
|
-
@selectAll=${() => this.dataSource.checkAllTiles()}
|
|
706
|
-
@unselectAll=${() => this.dataSource.uncheckAllTiles()}
|
|
697
|
+
return html `
|
|
698
|
+
<manage-bar
|
|
699
|
+
.label=${this.manageViewLabel}
|
|
700
|
+
.modalManager=${this.modalManager}
|
|
701
|
+
.selectedItems=${this.dataSource.checkedTileModels}
|
|
702
|
+
.manageViewModalMsg=${this.manageViewModalMsg}
|
|
703
|
+
showSelectAll
|
|
704
|
+
showUnselectAll
|
|
705
|
+
?showItemManageButton=${this.pageContext === 'search'}
|
|
706
|
+
?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
|
|
707
|
+
@removeItems=${this.handleRemoveItems}
|
|
708
|
+
@manageItems=${this.handleManageItems}
|
|
709
|
+
@selectAll=${() => this.dataSource.checkAllTiles()}
|
|
710
|
+
@unselectAll=${() => this.dataSource.uncheckAllTiles()}
|
|
707
711
|
@cancel=${() => {
|
|
708
712
|
this.isManageView = false;
|
|
709
713
|
this.dataSource.uncheckAllTiles();
|
|
710
714
|
if (this.searchResultsLoading)
|
|
711
715
|
this.dataSource.resetPages();
|
|
712
|
-
}}
|
|
713
|
-
></manage-bar>
|
|
716
|
+
}}
|
|
717
|
+
></manage-bar>
|
|
714
718
|
`;
|
|
715
719
|
}
|
|
716
720
|
/**
|
|
@@ -958,15 +962,124 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
958
962
|
label: target.open ? 'open' : 'closed',
|
|
959
963
|
});
|
|
960
964
|
};
|
|
961
|
-
return html `
|
|
962
|
-
<details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
|
|
963
|
-
<summary>
|
|
964
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
965
|
-
<h2>${msg('Filters')}</h2>
|
|
966
|
-
${this.clearFiltersBtnTemplate(true)}
|
|
967
|
-
</summary>
|
|
968
|
-
${this.facetsTemplate}
|
|
969
|
-
</details>
|
|
965
|
+
return html `
|
|
966
|
+
<details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
|
|
967
|
+
<summary>
|
|
968
|
+
<span class="collapser-icon">${chevronIcon}</span>
|
|
969
|
+
<h2>${msg('Filters')}</h2>
|
|
970
|
+
${this.clearFiltersBtnTemplate(true)}
|
|
971
|
+
</summary>
|
|
972
|
+
${this.facetsTemplate}
|
|
973
|
+
</details>
|
|
974
|
+
`;
|
|
975
|
+
}
|
|
976
|
+
async networksDropdownClicked() {
|
|
977
|
+
var _a, _b;
|
|
978
|
+
(_a = this.tvNetworksDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('loading');
|
|
979
|
+
await this.dataSource.populateTVChannelMaps();
|
|
980
|
+
(_b = this.tvNetworksDropdown) === null || _b === void 0 ? void 0 : _b.classList.remove('loading');
|
|
981
|
+
}
|
|
982
|
+
async showsDropdownClicked() {
|
|
983
|
+
var _a, _b;
|
|
984
|
+
(_a = this.tvShowsDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('loading');
|
|
985
|
+
await this.dataSource.populateTVChannelMaps();
|
|
986
|
+
// Delay for a single tick so that the loading indicator will be rendered
|
|
987
|
+
// while the dropdown options are being added
|
|
988
|
+
await new Promise(res => setTimeout(res, 0));
|
|
989
|
+
this.shouldPopulateShows = true;
|
|
990
|
+
await this.updateComplete;
|
|
991
|
+
(_b = this.tvShowsDropdown) === null || _b === void 0 ? void 0 : _b.classList.remove('loading');
|
|
992
|
+
}
|
|
993
|
+
async networksDropdownChanged() {
|
|
994
|
+
const previousNetwork = this.selectedTVNetwork;
|
|
995
|
+
this.selectedTVNetwork =
|
|
996
|
+
this.tvNetworksDropdown.selectedOptions[0].value || undefined;
|
|
997
|
+
const entries = this.dataSource.tvChannelMaps.channelToNetwork.entries();
|
|
998
|
+
for (const [channel, network] of entries) {
|
|
999
|
+
if (network === previousNetwork) {
|
|
1000
|
+
// Remove any previously-applied network filter
|
|
1001
|
+
const removedBucket = {
|
|
1002
|
+
key: channel.toLowerCase(),
|
|
1003
|
+
count: 0,
|
|
1004
|
+
state: 'none',
|
|
1005
|
+
};
|
|
1006
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, 'creator', removedBucket, true);
|
|
1007
|
+
}
|
|
1008
|
+
else if (network === this.selectedTVNetwork) {
|
|
1009
|
+
const newBucket = {
|
|
1010
|
+
key: channel.toLowerCase(),
|
|
1011
|
+
count: 0,
|
|
1012
|
+
state: 'selected',
|
|
1013
|
+
};
|
|
1014
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, 'creator', newBucket);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
async showsDropdownChanged() {
|
|
1019
|
+
const previousShow = this.selectedTVShow;
|
|
1020
|
+
this.selectedTVShow =
|
|
1021
|
+
this.tvShowsDropdown.selectedOptions[0].value || undefined;
|
|
1022
|
+
// Remove any previously-applied shows filter
|
|
1023
|
+
if (previousShow !== undefined) {
|
|
1024
|
+
const removedBucket = {
|
|
1025
|
+
key: previousShow,
|
|
1026
|
+
count: 0,
|
|
1027
|
+
state: 'none',
|
|
1028
|
+
};
|
|
1029
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, 'program', removedBucket, true);
|
|
1030
|
+
}
|
|
1031
|
+
if (this.selectedTVShow) {
|
|
1032
|
+
const newBucket = {
|
|
1033
|
+
key: this.selectedTVShow,
|
|
1034
|
+
count: 0,
|
|
1035
|
+
state: 'selected',
|
|
1036
|
+
};
|
|
1037
|
+
this.selectedFacets = updateSelectedFacetBucket(this.selectedFacets, 'program', newBucket);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
get tvDropdownFiltersTemplate() {
|
|
1041
|
+
if (this.searchType !== SearchType.TV)
|
|
1042
|
+
return nothing;
|
|
1043
|
+
log('start filters template preprocess', Date.now());
|
|
1044
|
+
const { channelToNetwork, programToChannels } = this.dataSource.tvChannelMaps;
|
|
1045
|
+
const networks = channelToNetwork
|
|
1046
|
+
? [...new Set(channelToNetwork.values())]
|
|
1047
|
+
: [];
|
|
1048
|
+
let showEntries = programToChannels ? [...programToChannels.entries()] : [];
|
|
1049
|
+
if (channelToNetwork && this.selectedTVNetwork) {
|
|
1050
|
+
showEntries = showEntries.filter(([, channels]) => Object.keys(channels).some(c => channelToNetwork.get(c) === this.selectedTVNetwork));
|
|
1051
|
+
}
|
|
1052
|
+
const shows = showEntries.map(([show]) => show);
|
|
1053
|
+
log('end filters template preprocess', Date.now());
|
|
1054
|
+
return html `
|
|
1055
|
+
<div id="tv-filters" slot="facets-top">
|
|
1056
|
+
<div class="tv-filter-dropdown-wrap">
|
|
1057
|
+
<select
|
|
1058
|
+
id="tv-networks"
|
|
1059
|
+
class="tv-filter-dropdown"
|
|
1060
|
+
@click=${this.networksDropdownClicked}
|
|
1061
|
+
@change=${this.networksDropdownChanged}
|
|
1062
|
+
>
|
|
1063
|
+
<option selected value="">${msg('Filter by Network')}</option>
|
|
1064
|
+
${map(networks, n => html `<option>${n}</option>`)}
|
|
1065
|
+
</select>
|
|
1066
|
+
<img src="https://archive.org/images/loading.gif" />
|
|
1067
|
+
</div>
|
|
1068
|
+
<div class="tv-filter-dropdown-wrap">
|
|
1069
|
+
<select
|
|
1070
|
+
id="tv-shows"
|
|
1071
|
+
class="tv-filter-dropdown"
|
|
1072
|
+
@click=${this.showsDropdownClicked}
|
|
1073
|
+
@change=${this.showsDropdownChanged}
|
|
1074
|
+
>
|
|
1075
|
+
<option selected value="">${msg('Filter by Show')}</option>
|
|
1076
|
+
${this.shouldPopulateShows
|
|
1077
|
+
? map(shows, s => html `<option>${s}</option>`)
|
|
1078
|
+
: nothing}
|
|
1079
|
+
</select>
|
|
1080
|
+
<img src="https://archive.org/images/loading.gif" />
|
|
1081
|
+
</div>
|
|
1082
|
+
</div>
|
|
970
1083
|
`;
|
|
971
1084
|
}
|
|
972
1085
|
/**
|
|
@@ -976,10 +1089,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
976
1089
|
if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
|
|
977
1090
|
return nothing;
|
|
978
1091
|
if (this.facetLoadStrategy === 'off') {
|
|
979
|
-
return html `
|
|
980
|
-
<p class="facets-message">
|
|
981
|
-
${msg('Facets are temporarily unavailable.')}
|
|
982
|
-
</p>
|
|
1092
|
+
return html `
|
|
1093
|
+
<p class="facets-message">
|
|
1094
|
+
${msg('Facets are temporarily unavailable.')}
|
|
1095
|
+
</p>
|
|
983
1096
|
`;
|
|
984
1097
|
}
|
|
985
1098
|
// We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
|
|
@@ -988,45 +1101,46 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
988
1101
|
const facetDisplayOrder = shouldUseTvInterface
|
|
989
1102
|
? tvFacetDisplayOrder
|
|
990
1103
|
: defaultFacetDisplayOrder;
|
|
991
|
-
const facets = html `
|
|
992
|
-
<collection-facets
|
|
993
|
-
.collectionPagePath=${this.collectionPagePath}
|
|
994
|
-
.parentCollections=${this.dataSource.parentCollections}
|
|
995
|
-
.pageSpecifierParams=${this.dataSource.pageSpecifierParams}
|
|
996
|
-
.searchService=${this.searchService}
|
|
997
|
-
.featureFeedbackService=${this.featureFeedbackService}
|
|
998
|
-
.recaptchaManager=${this.recaptchaManager}
|
|
999
|
-
.resizeObserver=${this.resizeObserver}
|
|
1000
|
-
.searchType=${this.searchType}
|
|
1001
|
-
.aggregations=${this.dataSource.aggregations}
|
|
1002
|
-
.histogramAggregation=${this.dataSource.histogramAggregation}
|
|
1003
|
-
.minSelectedDate=${this.minSelectedDate}
|
|
1004
|
-
.maxSelectedDate=${this.maxSelectedDate}
|
|
1005
|
-
.selectedFacets=${this.selectedFacets}
|
|
1006
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1007
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1008
|
-
.tvChannelAliases=${this.dataSource.tvChannelAliases}
|
|
1009
|
-
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
1010
|
-
.allowExpandingDatePicker=${!this.mobileView}
|
|
1011
|
-
.allowDatePickerMonths=${shouldUseTvInterface}
|
|
1012
|
-
.contentWidth=${this.contentWidth}
|
|
1013
|
-
.query=${this.baseQuery}
|
|
1014
|
-
.identifiers=${this.identifiers}
|
|
1015
|
-
.filterMap=${this.dataSource.filterMap}
|
|
1016
|
-
.isManageView=${this.isManageView}
|
|
1017
|
-
.modalManager=${this.modalManager}
|
|
1018
|
-
.analyticsHandler=${this.analyticsHandler}
|
|
1019
|
-
.facetDisplayOrder=${facetDisplayOrder}
|
|
1020
|
-
.isTvSearch=${shouldUseTvInterface}
|
|
1021
|
-
?collapsableFacets=${this.mobileView}
|
|
1022
|
-
?facetsLoading=${this.facetsLoading}
|
|
1023
|
-
?histogramAggregationLoading=${this.facetsLoading}
|
|
1024
|
-
?suppressMediatypeFacets=${this.suppressMediatypeFacets}
|
|
1025
|
-
@facetClick=${this.facetClickHandler}
|
|
1026
|
-
@facetsChanged=${this.facetsChanged}
|
|
1027
|
-
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
1028
|
-
>
|
|
1029
|
-
|
|
1104
|
+
const facets = html `
|
|
1105
|
+
<collection-facets
|
|
1106
|
+
.collectionPagePath=${this.collectionPagePath}
|
|
1107
|
+
.parentCollections=${this.dataSource.parentCollections}
|
|
1108
|
+
.pageSpecifierParams=${this.dataSource.pageSpecifierParams}
|
|
1109
|
+
.searchService=${this.searchService}
|
|
1110
|
+
.featureFeedbackService=${this.featureFeedbackService}
|
|
1111
|
+
.recaptchaManager=${this.recaptchaManager}
|
|
1112
|
+
.resizeObserver=${this.resizeObserver}
|
|
1113
|
+
.searchType=${this.searchType}
|
|
1114
|
+
.aggregations=${this.dataSource.aggregations}
|
|
1115
|
+
.histogramAggregation=${this.dataSource.histogramAggregation}
|
|
1116
|
+
.minSelectedDate=${this.minSelectedDate}
|
|
1117
|
+
.maxSelectedDate=${this.maxSelectedDate}
|
|
1118
|
+
.selectedFacets=${this.selectedFacets}
|
|
1119
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1120
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1121
|
+
.tvChannelAliases=${this.dataSource.tvChannelAliases}
|
|
1122
|
+
.showHistogramDatePicker=${this.showHistogramDatePicker}
|
|
1123
|
+
.allowExpandingDatePicker=${!this.mobileView}
|
|
1124
|
+
.allowDatePickerMonths=${shouldUseTvInterface}
|
|
1125
|
+
.contentWidth=${this.contentWidth}
|
|
1126
|
+
.query=${this.baseQuery}
|
|
1127
|
+
.identifiers=${this.identifiers}
|
|
1128
|
+
.filterMap=${this.dataSource.filterMap}
|
|
1129
|
+
.isManageView=${this.isManageView}
|
|
1130
|
+
.modalManager=${this.modalManager}
|
|
1131
|
+
.analyticsHandler=${this.analyticsHandler}
|
|
1132
|
+
.facetDisplayOrder=${facetDisplayOrder}
|
|
1133
|
+
.isTvSearch=${shouldUseTvInterface}
|
|
1134
|
+
?collapsableFacets=${this.mobileView}
|
|
1135
|
+
?facetsLoading=${this.facetsLoading}
|
|
1136
|
+
?histogramAggregationLoading=${this.facetsLoading}
|
|
1137
|
+
?suppressMediatypeFacets=${this.suppressMediatypeFacets}
|
|
1138
|
+
@facetClick=${this.facetClickHandler}
|
|
1139
|
+
@facetsChanged=${this.facetsChanged}
|
|
1140
|
+
@histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
|
|
1141
|
+
>
|
|
1142
|
+
${this.tvDropdownFiltersTemplate}
|
|
1143
|
+
</collection-facets>
|
|
1030
1144
|
`;
|
|
1031
1145
|
// If we are using one of the opt-in facet load strategies, we may need to wrap the
|
|
1032
1146
|
// desktop view facets in a <details> widget so that patrons can opt into loading them.
|
|
@@ -1034,20 +1148,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1034
1148
|
const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
|
|
1035
1149
|
(this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
|
|
1036
1150
|
if (showDesktopOptInWidget && !this.mobileView) {
|
|
1037
|
-
return html `
|
|
1038
|
-
<details
|
|
1039
|
-
class="desktop-facets-dropdown"
|
|
1151
|
+
return html `
|
|
1152
|
+
<details
|
|
1153
|
+
class="desktop-facets-dropdown"
|
|
1040
1154
|
@toggle=${(e) => {
|
|
1041
1155
|
const target = e.target;
|
|
1042
1156
|
this.collapsibleFacetsVisible = target.open;
|
|
1043
|
-
}}
|
|
1044
|
-
>
|
|
1045
|
-
<summary>
|
|
1046
|
-
<span class="collapser-icon">${chevronIcon}</span>
|
|
1047
|
-
<h2>${msg('Filters')}</h2>
|
|
1048
|
-
</summary>
|
|
1049
|
-
${facets}
|
|
1050
|
-
</details>
|
|
1157
|
+
}}
|
|
1158
|
+
>
|
|
1159
|
+
<summary>
|
|
1160
|
+
<span class="collapser-icon">${chevronIcon}</span>
|
|
1161
|
+
<h2>${msg('Filters')}</h2>
|
|
1162
|
+
</summary>
|
|
1163
|
+
${facets}
|
|
1164
|
+
</details>
|
|
1051
1165
|
`;
|
|
1052
1166
|
}
|
|
1053
1167
|
// Otherwise, just render the facets component bare
|
|
@@ -1067,34 +1181,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1067
1181
|
mobile,
|
|
1068
1182
|
});
|
|
1069
1183
|
const buttonText = mobile ? 'Clear all' : 'Clear all filters';
|
|
1070
|
-
return html `
|
|
1071
|
-
<div class="clear-filters-btn-row">
|
|
1184
|
+
return html `
|
|
1185
|
+
<div class="clear-filters-btn-row">
|
|
1072
1186
|
${mobile
|
|
1073
1187
|
? html `<span class="clear-filters-btn-separator"> </span>`
|
|
1074
|
-
: nothing}
|
|
1075
|
-
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1076
|
-
${buttonText}
|
|
1077
|
-
</button>
|
|
1078
|
-
</div>
|
|
1188
|
+
: nothing}
|
|
1189
|
+
<button class=${buttonClasses} @click=${this.clearFilters}>
|
|
1190
|
+
${buttonText}
|
|
1191
|
+
</button>
|
|
1192
|
+
</div>
|
|
1079
1193
|
`;
|
|
1080
1194
|
}
|
|
1081
1195
|
/**
|
|
1082
1196
|
* Template for the table header content that appears atop the compact list view.
|
|
1083
1197
|
*/
|
|
1084
1198
|
get listHeaderTemplate() {
|
|
1085
|
-
return html `
|
|
1086
|
-
<div id="list-header">
|
|
1087
|
-
<tile-dispatcher
|
|
1088
|
-
.tileDisplayMode=${'list-header'}
|
|
1089
|
-
.resizeObserver=${this.resizeObserver}
|
|
1090
|
-
.sortParam=${this.sortParam}
|
|
1091
|
-
.defaultSortParam=${this.defaultSortParam}
|
|
1092
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1093
|
-
.loggedIn=${this.loggedIn}
|
|
1094
|
-
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1095
|
-
>
|
|
1096
|
-
</tile-dispatcher>
|
|
1097
|
-
</div>
|
|
1199
|
+
return html `
|
|
1200
|
+
<div id="list-header">
|
|
1201
|
+
<tile-dispatcher
|
|
1202
|
+
.tileDisplayMode=${'list-header'}
|
|
1203
|
+
.resizeObserver=${this.resizeObserver}
|
|
1204
|
+
.sortParam=${this.sortParam}
|
|
1205
|
+
.defaultSortParam=${this.defaultSortParam}
|
|
1206
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1207
|
+
.loggedIn=${this.loggedIn}
|
|
1208
|
+
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1209
|
+
>
|
|
1210
|
+
</tile-dispatcher>
|
|
1211
|
+
</div>
|
|
1098
1212
|
`;
|
|
1099
1213
|
}
|
|
1100
1214
|
/**
|
|
@@ -1141,7 +1255,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1141
1255
|
* represent, such as the search query, sort option, and any filters applied.
|
|
1142
1256
|
*/
|
|
1143
1257
|
async installDataSourceAndQueryState(dataSource, queryState) {
|
|
1144
|
-
var _a, _b
|
|
1258
|
+
var _a, _b;
|
|
1145
1259
|
log('Installing data source & query state in CB:', dataSource, queryState);
|
|
1146
1260
|
if (this.dataSource)
|
|
1147
1261
|
this.removeController(this.dataSource);
|
|
@@ -1159,7 +1273,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1159
1273
|
this.sortDirection = queryState.sortDirection;
|
|
1160
1274
|
this.selectedTitleFilter = queryState.selectedTitleFilter;
|
|
1161
1275
|
this.selectedCreatorFilter = queryState.selectedCreatorFilter;
|
|
1162
|
-
this.tvClipFilter = (_c = queryState.tvClipFilter) !== null && _c !== void 0 ? _c : 'all';
|
|
1163
1276
|
this.pagesToRender = this.initialPageNumber;
|
|
1164
1277
|
// We set this flag during the update to prevent the URL state persistence
|
|
1165
1278
|
// from creating an unwanted extra history entry.
|
|
@@ -1488,7 +1601,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1488
1601
|
sortDirection: this.sortDirection,
|
|
1489
1602
|
selectedTitleFilter: this.selectedTitleFilter,
|
|
1490
1603
|
selectedCreatorFilter: this.selectedCreatorFilter,
|
|
1491
|
-
tvClipFilter: this.tvClipFilter,
|
|
1492
1604
|
},
|
|
1493
1605
|
}));
|
|
1494
1606
|
}
|
|
@@ -1606,7 +1718,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1606
1718
|
this.restoreState();
|
|
1607
1719
|
}
|
|
1608
1720
|
restoreState() {
|
|
1609
|
-
var _a, _b, _c, _d, _e
|
|
1721
|
+
var _a, _b, _c, _d, _e;
|
|
1610
1722
|
const restorationState = this.restorationStateHandler.getRestorationState();
|
|
1611
1723
|
this.displayMode = restorationState.displayMode;
|
|
1612
1724
|
if (!this.suppressURLSinParam && restorationState.searchType != null)
|
|
@@ -1621,7 +1733,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1621
1733
|
this.currentPage = (_e = restorationState.currentPage) !== null && _e !== void 0 ? _e : 1;
|
|
1622
1734
|
this.minSelectedDate = restorationState.minSelectedDate;
|
|
1623
1735
|
this.maxSelectedDate = restorationState.maxSelectedDate;
|
|
1624
|
-
this.tvClipFilter = (_f = restorationState.tvClipFilter) !== null && _f !== void 0 ? _f : 'all';
|
|
1625
1736
|
if (this.currentPage > 1) {
|
|
1626
1737
|
this.goToPage(this.currentPage);
|
|
1627
1738
|
}
|
|
@@ -1642,7 +1753,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1642
1753
|
maxSelectedDate: this.maxSelectedDate,
|
|
1643
1754
|
selectedTitleFilter: (_c = this.selectedTitleFilter) !== null && _c !== void 0 ? _c : undefined,
|
|
1644
1755
|
selectedCreatorFilter: (_d = this.selectedCreatorFilter) !== null && _d !== void 0 ? _d : undefined,
|
|
1645
|
-
tvClipFilter: this.tvClipFilter,
|
|
1646
1756
|
};
|
|
1647
1757
|
const persistOptions = {
|
|
1648
1758
|
forceReplace: this.dataSourceInstallInProgress,
|
|
@@ -1854,28 +1964,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1854
1964
|
const isRadioSearch = this.searchType === SearchType.RADIO;
|
|
1855
1965
|
const { isTVCollection, isRadioCollection } = this;
|
|
1856
1966
|
const shouldUseLocalTime = isTVSearch || isRadioSearch || isTVCollection || isRadioCollection;
|
|
1857
|
-
return html `
|
|
1858
|
-
<tile-dispatcher
|
|
1859
|
-
.collectionPagePath=${this.collectionPagePath}
|
|
1860
|
-
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1861
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
1862
|
-
.model=${model}
|
|
1863
|
-
.tileDisplayMode=${this.displayMode}
|
|
1864
|
-
.resizeObserver=${this.resizeObserver}
|
|
1865
|
-
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1866
|
-
.sortParam=${this.sortParam}
|
|
1867
|
-
.defaultSortParam=${this.defaultSortParam}
|
|
1868
|
-
.creatorFilter=${this.selectedCreatorFilter}
|
|
1869
|
-
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1870
|
-
.loggedIn=${this.loggedIn}
|
|
1871
|
-
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1872
|
-
.isManageView=${this.isManageView}
|
|
1873
|
-
?showTvClips=${isTVSearch || isTVCollection}
|
|
1874
|
-
?enableHoverPane=${true}
|
|
1875
|
-
?useLocalTime=${shouldUseLocalTime}
|
|
1876
|
-
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1877
|
-
>
|
|
1878
|
-
</tile-dispatcher>
|
|
1967
|
+
return html `
|
|
1968
|
+
<tile-dispatcher
|
|
1969
|
+
.collectionPagePath=${this.collectionPagePath}
|
|
1970
|
+
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
1971
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
1972
|
+
.model=${model}
|
|
1973
|
+
.tileDisplayMode=${this.displayMode}
|
|
1974
|
+
.resizeObserver=${this.resizeObserver}
|
|
1975
|
+
.collectionTitles=${this.dataSource.collectionTitles}
|
|
1976
|
+
.sortParam=${this.sortParam}
|
|
1977
|
+
.defaultSortParam=${this.defaultSortParam}
|
|
1978
|
+
.creatorFilter=${this.selectedCreatorFilter}
|
|
1979
|
+
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1980
|
+
.loggedIn=${this.loggedIn}
|
|
1981
|
+
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1982
|
+
.isManageView=${this.isManageView}
|
|
1983
|
+
?showTvClips=${isTVSearch || isTVCollection}
|
|
1984
|
+
?enableHoverPane=${true}
|
|
1985
|
+
?useLocalTime=${shouldUseLocalTime}
|
|
1986
|
+
@resultSelected=${(e) => this.resultSelected(e)}
|
|
1987
|
+
>
|
|
1988
|
+
</tile-dispatcher>
|
|
1879
1989
|
`;
|
|
1880
1990
|
}
|
|
1881
1991
|
/**
|
|
@@ -1911,441 +2021,466 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1911
2021
|
static get styles() {
|
|
1912
2022
|
return [
|
|
1913
2023
|
srOnlyStyle,
|
|
1914
|
-
css `
|
|
1915
|
-
:host {
|
|
1916
|
-
display: block;
|
|
1917
|
-
--leftColumnWidth: 18rem;
|
|
1918
|
-
--leftColumnPaddingTop: 2rem;
|
|
1919
|
-
--leftColumnPaddingRight: 2.5rem;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
#facet-top-view {
|
|
1923
|
-
display: flex;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
/**
|
|
1927
|
-
* When page width resizes from desktop to mobile, use this class to
|
|
1928
|
-
* disable expand/collapse transition when loading.
|
|
1929
|
-
*/
|
|
1930
|
-
.preload * {
|
|
1931
|
-
transition: none !important;
|
|
1932
|
-
-webkit-transition: none !important;
|
|
1933
|
-
-moz-transition: none !important;
|
|
1934
|
-
-ms-transition: none !important;
|
|
1935
|
-
-o-transition: none !important;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
#content-container {
|
|
1939
|
-
display: flex;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
empty-placeholder {
|
|
1943
|
-
margin-top: var(--placeholderMarginTop, 0);
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
.collapser-icon {
|
|
1947
|
-
display: inline-block;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
.collapser-icon svg {
|
|
1951
|
-
display: inline-block;
|
|
1952
|
-
width: 12px;
|
|
1953
|
-
height: 12px;
|
|
1954
|
-
transition: transform 0.2s ease-out;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
#mobile-filter-collapse {
|
|
1958
|
-
width: 100%;
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
#mobile-filter-collapse > summary {
|
|
1962
|
-
cursor: pointer;
|
|
1963
|
-
list-style: none;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
#mobile-filter-collapse[open] > summary {
|
|
1967
|
-
margin-bottom: 10px;
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
#mobile-filter-collapse h2 {
|
|
1971
|
-
display: inline-block;
|
|
1972
|
-
margin: 0;
|
|
1973
|
-
font-size: 2rem;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
#mobile-filter-collapse[open] svg {
|
|
1977
|
-
transform: rotate(90deg);
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
#content-container.mobile {
|
|
1981
|
-
display: block;
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
#right-column {
|
|
1985
|
-
flex: 1;
|
|
1986
|
-
position: relative;
|
|
1987
|
-
min-height: 90vh;
|
|
1988
|
-
border-right: 1px solid rgb(232, 232, 232);
|
|
1989
|
-
margin-top: var(--rightColumnMarginTop, 0);
|
|
1990
|
-
padding-top: var(--rightColumnPaddingTop, 2rem);
|
|
1991
|
-
background: #fff;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
#left-column:not([hidden]) + #right-column {
|
|
1995
|
-
border-left: 1px solid rgb(232, 232, 232);
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
#right-column.smart-results-spacing {
|
|
1999
|
-
padding-top: 0.5rem;
|
|
2000
|
-
border-right: none;
|
|
2001
|
-
background: transparent;
|
|
2002
|
-
min-width: 0;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
#results {
|
|
2006
|
-
background: #fff;
|
|
2007
|
-
padding-left: 1rem;
|
|
2008
|
-
padding-right: 1rem;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
#right-column.smart-results-spacing #results {
|
|
2012
|
-
border-radius: 10px 10px 0px 0px;
|
|
2013
|
-
padding-top: 0.5rem;
|
|
2014
|
-
margin-top: 1rem;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
.mobile #right-column {
|
|
2018
|
-
border-left: none;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
.mobile #results {
|
|
2022
|
-
padding: 5px 5px 0;
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
#left-column {
|
|
2026
|
-
width: var(--leftColumnWidth, 18rem);
|
|
2027
|
-
/* Prevents Safari from shrinking col at first draw */
|
|
2028
|
-
min-width: var(--leftColumnWidth, 18rem);
|
|
2029
|
-
padding-top: var(--leftColumnPaddingTop, 2rem);
|
|
2030
|
-
/* Reduced padding by 0.2rem to add the invisible border in the rule below */
|
|
2031
|
-
padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
|
|
2032
|
-
border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
|
|
2033
|
-
z-index: 1;
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
.desktop #left-column {
|
|
2037
|
-
top: 0;
|
|
2038
|
-
position: sticky;
|
|
2039
|
-
height: calc(100vh - 2rem);
|
|
2040
|
-
max-height: calc(100vh - 2rem);
|
|
2041
|
-
overflow-x: hidden;
|
|
2042
|
-
overflow-y: scroll;
|
|
2043
|
-
|
|
2044
|
-
/*
|
|
2045
|
-
* Firefox doesn't support any of the -webkit-scrollbar stuff below, but
|
|
2046
|
-
* does at least give us a tiny bit of control over width & color.
|
|
2047
|
-
*/
|
|
2048
|
-
scrollbar-width: thin;
|
|
2049
|
-
scrollbar-color: transparent transparent;
|
|
2050
|
-
}
|
|
2051
|
-
.desktop #left-column:hover {
|
|
2052
|
-
scrollbar-color: auto;
|
|
2053
|
-
}
|
|
2054
|
-
.desktop #left-column::-webkit-scrollbar {
|
|
2055
|
-
appearance: none;
|
|
2056
|
-
width: 6px;
|
|
2057
|
-
}
|
|
2058
|
-
.desktop #left-column::-webkit-scrollbar-button {
|
|
2059
|
-
height: 3px;
|
|
2060
|
-
background: transparent;
|
|
2061
|
-
}
|
|
2062
|
-
.desktop #left-column::-webkit-scrollbar-corner {
|
|
2063
|
-
background: transparent;
|
|
2064
|
-
}
|
|
2065
|
-
.desktop #left-column::-webkit-scrollbar-thumb {
|
|
2066
|
-
border-radius: 4px;
|
|
2067
|
-
}
|
|
2068
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb {
|
|
2069
|
-
background: rgba(0, 0, 0, 0.15);
|
|
2070
|
-
}
|
|
2071
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
|
|
2072
|
-
background: rgba(0, 0, 0, 0.2);
|
|
2073
|
-
}
|
|
2074
|
-
.desktop #left-column:hover::-webkit-scrollbar-thumb:active {
|
|
2075
|
-
background: rgba(0, 0, 0, 0.3);
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
#facets-bottom-fade {
|
|
2079
|
-
background: linear-gradient(
|
|
2080
|
-
to bottom,
|
|
2081
|
-
#f5f5f700 0%,
|
|
2082
|
-
#f5f5f7c0 50%,
|
|
2083
|
-
#f5f5f7 80%,
|
|
2084
|
-
#f5f5f7 100%
|
|
2085
|
-
);
|
|
2086
|
-
position: fixed;
|
|
2087
|
-
bottom: 0;
|
|
2088
|
-
height: 50px;
|
|
2089
|
-
/* Wide enough to cover the content, but leave the scrollbar uncovered */
|
|
2090
|
-
width: calc(
|
|
2091
|
-
var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
|
|
2092
|
-
);
|
|
2093
|
-
z-index: 2;
|
|
2094
|
-
pointer-events: none;
|
|
2095
|
-
transition: height 0.1s ease;
|
|
2096
|
-
}
|
|
2097
|
-
#facets-bottom-fade.hidden {
|
|
2098
|
-
height: 0;
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
.facets-message {
|
|
2102
|
-
font-size: 1.4rem;
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
.desktop-facets-dropdown > summary {
|
|
2106
|
-
cursor: pointer;
|
|
2107
|
-
list-style: none;
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
.desktop-facets-dropdown h2 {
|
|
2111
|
-
display: inline-block;
|
|
2112
|
-
margin: 0;
|
|
2113
|
-
font-size: 1.6rem;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
.desktop-facets-dropdown[open] > summary {
|
|
2117
|
-
margin-bottom: 10px;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
.desktop-facets-dropdown[open] svg {
|
|
2121
|
-
transform: rotate(90deg);
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
.desktop #left-column-scroll-sentinel {
|
|
2125
|
-
width: 1px;
|
|
2126
|
-
height: 100vh;
|
|
2127
|
-
background: transparent;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
.desktop #facets-scroll-sentinel {
|
|
2131
|
-
width: 1px;
|
|
2132
|
-
height: 1px;
|
|
2133
|
-
background: transparent;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
#facets-header-container {
|
|
2137
|
-
display: flex;
|
|
2138
|
-
justify-content: space-between;
|
|
2139
|
-
align-items: flex-start;
|
|
2140
|
-
clear: both;
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
.desktop #facets-header-container {
|
|
2144
|
-
flex-wrap: wrap;
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
.mobile #left-column {
|
|
2148
|
-
width: 100%;
|
|
2149
|
-
min-width: 0;
|
|
2150
|
-
padding: 5px 0;
|
|
2151
|
-
border: 0;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
.clear-filters-btn-row {
|
|
2155
|
-
display: inline-block;
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
.desktop .clear-filters-btn-row {
|
|
2159
|
-
width: 100%;
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
.clear-filters-btn {
|
|
2163
|
-
display: inline-block;
|
|
2164
|
-
appearance: none;
|
|
2165
|
-
margin: 0;
|
|
2166
|
-
padding: 0;
|
|
2167
|
-
border: 0;
|
|
2168
|
-
background: none;
|
|
2169
|
-
color: var(--ia-theme-link-color);
|
|
2170
|
-
font-size: 1.4rem;
|
|
2171
|
-
font-family: inherit;
|
|
2172
|
-
cursor: pointer;
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
.clear-filters-btn:hover {
|
|
2176
|
-
text-decoration: underline;
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2179
|
-
.clear-filters-btn-separator {
|
|
2180
|
-
display: inline-block;
|
|
2181
|
-
margin-left: 5px;
|
|
2182
|
-
border-left: 1px solid #2c2c2c;
|
|
2183
|
-
font-size: 1.4rem;
|
|
2184
|
-
line-height: 1.3rem;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
#
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
padding
|
|
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
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
font-size:
|
|
2239
|
-
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
#
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
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
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
--
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
--
|
|
2322
|
-
--
|
|
2323
|
-
|
|
2324
|
-
);
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2024
|
+
css `
|
|
2025
|
+
:host {
|
|
2026
|
+
display: block;
|
|
2027
|
+
--leftColumnWidth: 18rem;
|
|
2028
|
+
--leftColumnPaddingTop: 2rem;
|
|
2029
|
+
--leftColumnPaddingRight: 2.5rem;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
#facet-top-view {
|
|
2033
|
+
display: flex;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* When page width resizes from desktop to mobile, use this class to
|
|
2038
|
+
* disable expand/collapse transition when loading.
|
|
2039
|
+
*/
|
|
2040
|
+
.preload * {
|
|
2041
|
+
transition: none !important;
|
|
2042
|
+
-webkit-transition: none !important;
|
|
2043
|
+
-moz-transition: none !important;
|
|
2044
|
+
-ms-transition: none !important;
|
|
2045
|
+
-o-transition: none !important;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
#content-container {
|
|
2049
|
+
display: flex;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
empty-placeholder {
|
|
2053
|
+
margin-top: var(--placeholderMarginTop, 0);
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.collapser-icon {
|
|
2057
|
+
display: inline-block;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.collapser-icon svg {
|
|
2061
|
+
display: inline-block;
|
|
2062
|
+
width: 12px;
|
|
2063
|
+
height: 12px;
|
|
2064
|
+
transition: transform 0.2s ease-out;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
#mobile-filter-collapse {
|
|
2068
|
+
width: 100%;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
#mobile-filter-collapse > summary {
|
|
2072
|
+
cursor: pointer;
|
|
2073
|
+
list-style: none;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
#mobile-filter-collapse[open] > summary {
|
|
2077
|
+
margin-bottom: 10px;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
#mobile-filter-collapse h2 {
|
|
2081
|
+
display: inline-block;
|
|
2082
|
+
margin: 0;
|
|
2083
|
+
font-size: 2rem;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
#mobile-filter-collapse[open] svg {
|
|
2087
|
+
transform: rotate(90deg);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
#content-container.mobile {
|
|
2091
|
+
display: block;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
#right-column {
|
|
2095
|
+
flex: 1;
|
|
2096
|
+
position: relative;
|
|
2097
|
+
min-height: 90vh;
|
|
2098
|
+
border-right: 1px solid rgb(232, 232, 232);
|
|
2099
|
+
margin-top: var(--rightColumnMarginTop, 0);
|
|
2100
|
+
padding-top: var(--rightColumnPaddingTop, 2rem);
|
|
2101
|
+
background: #fff;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
#left-column:not([hidden]) + #right-column {
|
|
2105
|
+
border-left: 1px solid rgb(232, 232, 232);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
#right-column.smart-results-spacing {
|
|
2109
|
+
padding-top: 0.5rem;
|
|
2110
|
+
border-right: none;
|
|
2111
|
+
background: transparent;
|
|
2112
|
+
min-width: 0;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
#results {
|
|
2116
|
+
background: #fff;
|
|
2117
|
+
padding-left: 1rem;
|
|
2118
|
+
padding-right: 1rem;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
#right-column.smart-results-spacing #results {
|
|
2122
|
+
border-radius: 10px 10px 0px 0px;
|
|
2123
|
+
padding-top: 0.5rem;
|
|
2124
|
+
margin-top: 1rem;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
.mobile #right-column {
|
|
2128
|
+
border-left: none;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
.mobile #results {
|
|
2132
|
+
padding: 5px 5px 0;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
#left-column {
|
|
2136
|
+
width: var(--leftColumnWidth, 18rem);
|
|
2137
|
+
/* Prevents Safari from shrinking col at first draw */
|
|
2138
|
+
min-width: var(--leftColumnWidth, 18rem);
|
|
2139
|
+
padding-top: var(--leftColumnPaddingTop, 2rem);
|
|
2140
|
+
/* Reduced padding by 0.2rem to add the invisible border in the rule below */
|
|
2141
|
+
padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
|
|
2142
|
+
border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
|
|
2143
|
+
z-index: 1;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
.desktop #left-column {
|
|
2147
|
+
top: 0;
|
|
2148
|
+
position: sticky;
|
|
2149
|
+
height: calc(100vh - 2rem);
|
|
2150
|
+
max-height: calc(100vh - 2rem);
|
|
2151
|
+
overflow-x: hidden;
|
|
2152
|
+
overflow-y: scroll;
|
|
2153
|
+
|
|
2154
|
+
/*
|
|
2155
|
+
* Firefox doesn't support any of the -webkit-scrollbar stuff below, but
|
|
2156
|
+
* does at least give us a tiny bit of control over width & color.
|
|
2157
|
+
*/
|
|
2158
|
+
scrollbar-width: thin;
|
|
2159
|
+
scrollbar-color: transparent transparent;
|
|
2160
|
+
}
|
|
2161
|
+
.desktop #left-column:hover {
|
|
2162
|
+
scrollbar-color: auto;
|
|
2163
|
+
}
|
|
2164
|
+
.desktop #left-column::-webkit-scrollbar {
|
|
2165
|
+
appearance: none;
|
|
2166
|
+
width: 6px;
|
|
2167
|
+
}
|
|
2168
|
+
.desktop #left-column::-webkit-scrollbar-button {
|
|
2169
|
+
height: 3px;
|
|
2170
|
+
background: transparent;
|
|
2171
|
+
}
|
|
2172
|
+
.desktop #left-column::-webkit-scrollbar-corner {
|
|
2173
|
+
background: transparent;
|
|
2174
|
+
}
|
|
2175
|
+
.desktop #left-column::-webkit-scrollbar-thumb {
|
|
2176
|
+
border-radius: 4px;
|
|
2177
|
+
}
|
|
2178
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb {
|
|
2179
|
+
background: rgba(0, 0, 0, 0.15);
|
|
2180
|
+
}
|
|
2181
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
|
|
2182
|
+
background: rgba(0, 0, 0, 0.2);
|
|
2183
|
+
}
|
|
2184
|
+
.desktop #left-column:hover::-webkit-scrollbar-thumb:active {
|
|
2185
|
+
background: rgba(0, 0, 0, 0.3);
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
#facets-bottom-fade {
|
|
2189
|
+
background: linear-gradient(
|
|
2190
|
+
to bottom,
|
|
2191
|
+
#f5f5f700 0%,
|
|
2192
|
+
#f5f5f7c0 50%,
|
|
2193
|
+
#f5f5f7 80%,
|
|
2194
|
+
#f5f5f7 100%
|
|
2195
|
+
);
|
|
2196
|
+
position: fixed;
|
|
2197
|
+
bottom: 0;
|
|
2198
|
+
height: 50px;
|
|
2199
|
+
/* Wide enough to cover the content, but leave the scrollbar uncovered */
|
|
2200
|
+
width: calc(
|
|
2201
|
+
var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
|
|
2202
|
+
);
|
|
2203
|
+
z-index: 2;
|
|
2204
|
+
pointer-events: none;
|
|
2205
|
+
transition: height 0.1s ease;
|
|
2206
|
+
}
|
|
2207
|
+
#facets-bottom-fade.hidden {
|
|
2208
|
+
height: 0;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
.facets-message {
|
|
2212
|
+
font-size: 1.4rem;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
.desktop-facets-dropdown > summary {
|
|
2216
|
+
cursor: pointer;
|
|
2217
|
+
list-style: none;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
.desktop-facets-dropdown h2 {
|
|
2221
|
+
display: inline-block;
|
|
2222
|
+
margin: 0;
|
|
2223
|
+
font-size: 1.6rem;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.desktop-facets-dropdown[open] > summary {
|
|
2227
|
+
margin-bottom: 10px;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.desktop-facets-dropdown[open] svg {
|
|
2231
|
+
transform: rotate(90deg);
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
.desktop #left-column-scroll-sentinel {
|
|
2235
|
+
width: 1px;
|
|
2236
|
+
height: 100vh;
|
|
2237
|
+
background: transparent;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
.desktop #facets-scroll-sentinel {
|
|
2241
|
+
width: 1px;
|
|
2242
|
+
height: 1px;
|
|
2243
|
+
background: transparent;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
#facets-header-container {
|
|
2247
|
+
display: flex;
|
|
2248
|
+
justify-content: space-between;
|
|
2249
|
+
align-items: flex-start;
|
|
2250
|
+
clear: both;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
.desktop #facets-header-container {
|
|
2254
|
+
flex-wrap: wrap;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.mobile #left-column {
|
|
2258
|
+
width: 100%;
|
|
2259
|
+
min-width: 0;
|
|
2260
|
+
padding: 5px 0;
|
|
2261
|
+
border: 0;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
.clear-filters-btn-row {
|
|
2265
|
+
display: inline-block;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.desktop .clear-filters-btn-row {
|
|
2269
|
+
width: 100%;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
.clear-filters-btn {
|
|
2273
|
+
display: inline-block;
|
|
2274
|
+
appearance: none;
|
|
2275
|
+
margin: 0;
|
|
2276
|
+
padding: 0;
|
|
2277
|
+
border: 0;
|
|
2278
|
+
background: none;
|
|
2279
|
+
color: var(--ia-theme-link-color);
|
|
2280
|
+
font-size: 1.4rem;
|
|
2281
|
+
font-family: inherit;
|
|
2282
|
+
cursor: pointer;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
.clear-filters-btn:hover {
|
|
2286
|
+
text-decoration: underline;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
.clear-filters-btn-separator {
|
|
2290
|
+
display: inline-block;
|
|
2291
|
+
margin-left: 5px;
|
|
2292
|
+
border-left: 1px solid #2c2c2c;
|
|
2293
|
+
font-size: 1.4rem;
|
|
2294
|
+
line-height: 1.3rem;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
#tv-filters {
|
|
2298
|
+
margin-bottom: 15px;
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
.tv-filter-dropdown {
|
|
2302
|
+
width: 100%;
|
|
2303
|
+
padding: 3px;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.tv-filter-dropdown-wrap {
|
|
2307
|
+
display: flex;
|
|
2308
|
+
align-items: center;
|
|
2309
|
+
column-gap: 5px;
|
|
2310
|
+
margin-bottom: 5px;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
.tv-filter-dropdown-wrap > img {
|
|
2314
|
+
flex: 1;
|
|
2315
|
+
visibility: hidden;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
.tv-filter-dropdown.loading + img {
|
|
2319
|
+
visibility: visible;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
#facets-container {
|
|
2323
|
+
position: relative;
|
|
2324
|
+
max-height: 0;
|
|
2325
|
+
transition: max-height 0.2s ease-in-out;
|
|
2326
|
+
z-index: 1;
|
|
2327
|
+
margin-top: var(--facetsContainerMarginTop, 5rem);
|
|
2328
|
+
padding-bottom: 2rem;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
.desktop #facets-container {
|
|
2332
|
+
width: 18rem;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.mobile #facets-container {
|
|
2336
|
+
overflow: hidden;
|
|
2337
|
+
padding-bottom: 0;
|
|
2338
|
+
padding-left: 10px;
|
|
2339
|
+
padding-right: 10px;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
#facets-container.expanded {
|
|
2343
|
+
max-height: 2000px;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
.results-section-heading {
|
|
2347
|
+
margin: 0.5rem 0.3rem;
|
|
2348
|
+
font-size: 2rem;
|
|
2349
|
+
line-height: 25px;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
#results-total {
|
|
2353
|
+
display: flex;
|
|
2354
|
+
align-items: baseline;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
.mobile #results-total {
|
|
2358
|
+
position: absolute;
|
|
2359
|
+
right: 10px;
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
#big-results-count {
|
|
2363
|
+
font-size: 2.4rem;
|
|
2364
|
+
font-weight: 500;
|
|
2365
|
+
margin-right: 5px;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.mobile #big-results-count {
|
|
2369
|
+
font-size: 2rem;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
#big-results-label {
|
|
2373
|
+
font-size: 1.4rem;
|
|
2374
|
+
font-weight: 200;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
#list-header {
|
|
2378
|
+
max-height: 4.2rem;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.loading-cover {
|
|
2382
|
+
position: absolute;
|
|
2383
|
+
top: 0;
|
|
2384
|
+
left: 0;
|
|
2385
|
+
width: 100%;
|
|
2386
|
+
height: 100%;
|
|
2387
|
+
display: flex;
|
|
2388
|
+
justify-content: center;
|
|
2389
|
+
z-index: 1;
|
|
2390
|
+
padding-top: 50px;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
#tile-blur-label {
|
|
2394
|
+
display: flex;
|
|
2395
|
+
align-items: center;
|
|
2396
|
+
column-gap: 5px;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
#tile-blur-check {
|
|
2400
|
+
margin: 0 5px 0 0;
|
|
2401
|
+
width: 15px;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
circular-activity-indicator {
|
|
2405
|
+
width: 30px;
|
|
2406
|
+
height: 30px;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
sort-filter-bar {
|
|
2410
|
+
display: block;
|
|
2411
|
+
margin-bottom: 4rem;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
infinite-scroller {
|
|
2415
|
+
display: block;
|
|
2416
|
+
--infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
|
|
2417
|
+
--infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
infinite-scroller.list-compact {
|
|
2421
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2422
|
+
--collectionBrowserCellMinWidth,
|
|
2423
|
+
100%
|
|
2424
|
+
);
|
|
2425
|
+
--infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
|
|
2426
|
+
--infiniteScrollerCellMaxHeight: 56px;
|
|
2427
|
+
--infiniteScrollerRowGap: 10px;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
infinite-scroller.list-detail {
|
|
2431
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2432
|
+
--collectionBrowserCellMinWidth,
|
|
2433
|
+
100%
|
|
2434
|
+
);
|
|
2435
|
+
--infiniteScrollerCellMinHeight: var(
|
|
2436
|
+
--collectionBrowserCellMinHeight,
|
|
2437
|
+
5rem
|
|
2438
|
+
);
|
|
2439
|
+
/*
|
|
2440
|
+
30px in spec, compensating for a -4px margin
|
|
2441
|
+
to align title with top of item image
|
|
2442
|
+
src/tiles/list/tile-list.ts
|
|
2443
|
+
*/
|
|
2444
|
+
--infiniteScrollerRowGap: 34px;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
.mobile infinite-scroller.list-detail {
|
|
2448
|
+
--infiniteScrollerRowGap: 24px;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
infinite-scroller.grid {
|
|
2452
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2453
|
+
--collectionBrowserCellMinWidth,
|
|
2454
|
+
17rem
|
|
2455
|
+
);
|
|
2456
|
+
--infiniteScrollerCellMaxWidth: var(
|
|
2457
|
+
--collectionBrowserCellMaxWidth,
|
|
2458
|
+
1fr
|
|
2459
|
+
);
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
/* Allow tiles to shrink a bit further at smaller viewport widths */
|
|
2463
|
+
@media screen and (max-width: 880px) {
|
|
2464
|
+
infinite-scroller.grid {
|
|
2465
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2466
|
+
--collectionBrowserCellMinWidth,
|
|
2467
|
+
15rem
|
|
2468
|
+
);
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
/* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
|
|
2472
|
+
@media screen and (max-width: 360px) {
|
|
2473
|
+
infinite-scroller.grid {
|
|
2474
|
+
--infiniteScrollerCellMinWidth: var(
|
|
2475
|
+
--collectionBrowserCellMinWidth,
|
|
2476
|
+
12rem
|
|
2477
|
+
);
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
infinite-scroller.hidden {
|
|
2482
|
+
display: none;
|
|
2483
|
+
}
|
|
2349
2484
|
`,
|
|
2350
2485
|
];
|
|
2351
2486
|
}
|
|
@@ -2389,9 +2524,6 @@ __decorate([
|
|
|
2389
2524
|
__decorate([
|
|
2390
2525
|
property({ type: String })
|
|
2391
2526
|
], CollectionBrowser.prototype, "selectedCreatorFilter", void 0);
|
|
2392
|
-
__decorate([
|
|
2393
|
-
property({ type: String })
|
|
2394
|
-
], CollectionBrowser.prototype, "tvClipFilter", void 0);
|
|
2395
2527
|
__decorate([
|
|
2396
2528
|
property({ type: String })
|
|
2397
2529
|
], CollectionBrowser.prototype, "sortDirection", void 0);
|
|
@@ -2560,6 +2692,21 @@ __decorate([
|
|
|
2560
2692
|
__decorate([
|
|
2561
2693
|
query('infinite-scroller')
|
|
2562
2694
|
], CollectionBrowser.prototype, "infiniteScroller", void 0);
|
|
2695
|
+
__decorate([
|
|
2696
|
+
state()
|
|
2697
|
+
], CollectionBrowser.prototype, "selectedTVNetwork", void 0);
|
|
2698
|
+
__decorate([
|
|
2699
|
+
state()
|
|
2700
|
+
], CollectionBrowser.prototype, "selectedTVShow", void 0);
|
|
2701
|
+
__decorate([
|
|
2702
|
+
state()
|
|
2703
|
+
], CollectionBrowser.prototype, "shouldPopulateShows", void 0);
|
|
2704
|
+
__decorate([
|
|
2705
|
+
query('#tv-networks')
|
|
2706
|
+
], CollectionBrowser.prototype, "tvNetworksDropdown", void 0);
|
|
2707
|
+
__decorate([
|
|
2708
|
+
query('#tv-shows')
|
|
2709
|
+
], CollectionBrowser.prototype, "tvShowsDropdown", void 0);
|
|
2563
2710
|
CollectionBrowser = __decorate([
|
|
2564
2711
|
customElement('collection-browser')
|
|
2565
2712
|
], CollectionBrowser);
|