@internetarchive/collection-browser 2.14.2-alpha-webdev7679.5 → 2.15.1-alpha-webdev7667.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 +3 -0
- package/dist/src/collection-browser.js +31 -0
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/tiles/base-tile-component.d.ts +1 -0
- package/dist/src/tiles/base-tile-component.js +4 -0
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.js +2 -0
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +2 -0
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +2 -0
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/search-tile.js +2 -0
- package/dist/src/tiles/grid/search-tile.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.d.ts +1 -0
- package/dist/src/tiles/hover/hover-pane-controller.js +4 -3
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.d.ts +1 -0
- package/dist/src/tiles/hover/tile-hover-pane.js +5 -0
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
- package/dist/src/tiles/image-block.d.ts +1 -0
- package/dist/src/tiles/image-block.js +7 -0
- package/dist/src/tiles/image-block.js.map +1 -1
- package/dist/src/tiles/item-image.d.ts +1 -0
- package/dist/src/tiles/item-image.js +7 -2
- package/dist/src/tiles/item-image.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +1 -0
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +2 -0
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +2 -0
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +7 -0
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.js +1 -0
- package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
- package/package.json +2 -2
- package/src/collection-browser.ts +30 -0
- package/src/tiles/base-tile-component.ts +2 -0
- package/src/tiles/grid/account-tile.ts +2 -0
- package/src/tiles/grid/collection-tile.ts +2 -0
- package/src/tiles/grid/item-tile.ts +2 -0
- package/src/tiles/grid/search-tile.ts +2 -0
- package/src/tiles/hover/hover-pane-controller.ts +2 -0
- package/src/tiles/hover/tile-hover-pane.ts +3 -0
- package/src/tiles/image-block.ts +5 -0
- package/src/tiles/item-image.ts +6 -2
- package/src/tiles/list/tile-list-compact-header.ts +1 -0
- package/src/tiles/list/tile-list-compact.ts +2 -0
- package/src/tiles/list/tile-list.ts +2 -0
- package/src/tiles/tile-dispatcher.ts +7 -0
- package/test/tiles/hover/hover-pane-controller.test.ts +1 -0
|
@@ -180,6 +180,7 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
180
180
|
private facetsLoading;
|
|
181
181
|
private totalResults?;
|
|
182
182
|
private mobileView;
|
|
183
|
+
private tileBlurringEnabled;
|
|
183
184
|
private collapsibleFacetsVisible;
|
|
184
185
|
private contentWidth?;
|
|
185
186
|
private placeholderType;
|
|
@@ -329,6 +330,8 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
329
330
|
* Template for the sort & filtering bar that appears atop the search results.
|
|
330
331
|
*/
|
|
331
332
|
private get sortFilterBarTemplate();
|
|
333
|
+
private get tileBlurringToggleTemplate();
|
|
334
|
+
private tileBlurringChanged;
|
|
332
335
|
/**
|
|
333
336
|
* Template for the manage bar UI that appears atop the search results when we are
|
|
334
337
|
* showing the management view. This generally replaces the sort bar when present.
|
|
@@ -149,6 +149,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
149
149
|
this.searchResultsLoading = false;
|
|
150
150
|
this.facetsLoading = false;
|
|
151
151
|
this.mobileView = false;
|
|
152
|
+
this.tileBlurringEnabled = true;
|
|
152
153
|
this.collapsibleFacetsVisible = false;
|
|
153
154
|
this.placeholderType = null;
|
|
154
155
|
/** Whether layout size analytics have been sent already. */
|
|
@@ -597,12 +598,37 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
597
598
|
@titleLetterChanged=${this.titleLetterSelected}
|
|
598
599
|
@creatorLetterChanged=${this.creatorLetterSelected}
|
|
599
600
|
>
|
|
601
|
+
${this.tileBlurringToggleTemplate}
|
|
600
602
|
<slot name="sort-options-left" slot="sort-options-left"></slot>
|
|
601
603
|
<slot name="sort-options" slot="sort-options"></slot>
|
|
602
604
|
<slot name="sort-options-right" slot="sort-options-right"></slot>
|
|
603
605
|
</sort-filter-bar>
|
|
604
606
|
`;
|
|
605
607
|
}
|
|
608
|
+
get tileBlurringToggleTemplate() {
|
|
609
|
+
const { sessionContext } = this.dataSource;
|
|
610
|
+
if (!(sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.is_archive_user))
|
|
611
|
+
return nothing;
|
|
612
|
+
const userPrefs = sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.pps_relevant_user_preferences;
|
|
613
|
+
const blurEnabled = (userPrefs === null || userPrefs === void 0 ? void 0 : userPrefs.display__blur_moderated_content) === 'on';
|
|
614
|
+
return html `
|
|
615
|
+
<label for="tile-blur-check" slot="sort-options-right">
|
|
616
|
+
${msg('Blurring:')}
|
|
617
|
+
<input
|
|
618
|
+
id="tile-blur-check"
|
|
619
|
+
type="checkbox"
|
|
620
|
+
?checked=${blurEnabled}
|
|
621
|
+
@change=${this.tileBlurringChanged}
|
|
622
|
+
/>
|
|
623
|
+
</label>
|
|
624
|
+
`;
|
|
625
|
+
}
|
|
626
|
+
tileBlurringChanged(e) {
|
|
627
|
+
var _a;
|
|
628
|
+
const { checked } = e.target;
|
|
629
|
+
this.tileBlurringEnabled = checked;
|
|
630
|
+
(_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.refreshAllVisibleCells();
|
|
631
|
+
}
|
|
606
632
|
/**
|
|
607
633
|
* Template for the manage bar UI that appears atop the search results when we are
|
|
608
634
|
* showing the management view. This generally replaces the sort bar when present.
|
|
@@ -983,6 +1009,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
983
1009
|
.defaultSortParam=${this.defaultSortParam}
|
|
984
1010
|
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
985
1011
|
.loggedIn=${this.loggedIn}
|
|
1012
|
+
.suppressBlurring=${!this.tileBlurringEnabled}
|
|
986
1013
|
>
|
|
987
1014
|
</tile-dispatcher>
|
|
988
1015
|
</div>
|
|
@@ -1728,6 +1755,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1728
1755
|
.creatorFilter=${this.selectedCreatorFilter}
|
|
1729
1756
|
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1730
1757
|
.loggedIn=${this.loggedIn}
|
|
1758
|
+
.suppressBlurring=${!this.tileBlurringEnabled}
|
|
1731
1759
|
.isManageView=${this.isManageView}
|
|
1732
1760
|
?showTvClips=${this.isTVCollection || this.searchType === SearchType.TV}
|
|
1733
1761
|
?enableHoverPane=${true}
|
|
@@ -2369,6 +2397,9 @@ __decorate([
|
|
|
2369
2397
|
__decorate([
|
|
2370
2398
|
state()
|
|
2371
2399
|
], CollectionBrowser.prototype, "mobileView", void 0);
|
|
2400
|
+
__decorate([
|
|
2401
|
+
state()
|
|
2402
|
+
], CollectionBrowser.prototype, "tileBlurringEnabled", void 0);
|
|
2372
2403
|
__decorate([
|
|
2373
2404
|
state()
|
|
2374
2405
|
], CollectionBrowser.prototype, "collapsibleFacetsVisible", void 0);
|