@internetarchive/collection-browser 2.17.1-alpha-webdev7713.0 → 2.17.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 +20 -0
- package/dist/src/collection-browser.js +74 -0
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/models.d.ts +9 -0
- package/dist/src/models.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 +3 -3
- package/src/collection-browser.ts +76 -0
- package/src/models.ts +10 -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 +7 -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
|
@@ -21,6 +21,7 @@ export class AccountTile extends BaseTileComponent {
|
|
|
21
21
|
* - creatorFilter?: string;
|
|
22
22
|
* - mobileBreakpoint?: number;
|
|
23
23
|
* - loggedIn = false;
|
|
24
|
+
* - suppressBlurring = false;
|
|
24
25
|
*/
|
|
25
26
|
|
|
26
27
|
@property({ type: Boolean }) showInfoButton = false;
|
|
@@ -46,6 +47,7 @@ export class AccountTile extends BaseTileComponent {
|
|
|
46
47
|
.model=${this.model}
|
|
47
48
|
.baseImageUrl=${this.baseImageUrl}
|
|
48
49
|
.viewSize=${'grid'}
|
|
50
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
49
51
|
>
|
|
50
52
|
</image-block>
|
|
51
53
|
`;
|
|
@@ -21,6 +21,7 @@ export class CollectionTile extends BaseTileComponent {
|
|
|
21
21
|
* - creatorFilter?: string;
|
|
22
22
|
* - mobileBreakpoint?: number;
|
|
23
23
|
* - loggedIn = false;
|
|
24
|
+
* - suppressBlurring = false;
|
|
24
25
|
*/
|
|
25
26
|
|
|
26
27
|
@property({ type: Boolean }) showInfoButton = false;
|
|
@@ -46,6 +47,7 @@ export class CollectionTile extends BaseTileComponent {
|
|
|
46
47
|
.model=${this.model}
|
|
47
48
|
.baseImageUrl=${this.baseImageUrl}
|
|
48
49
|
.viewSize=${'grid'}
|
|
50
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
49
51
|
>
|
|
50
52
|
</image-block>
|
|
51
53
|
`;
|
|
@@ -34,6 +34,7 @@ export class ItemTile extends BaseTileComponent {
|
|
|
34
34
|
* - creatorFilter?: string;
|
|
35
35
|
* - mobileBreakpoint?: number;
|
|
36
36
|
* - loggedIn = false;
|
|
37
|
+
* - suppressBlurring = false;
|
|
37
38
|
*/
|
|
38
39
|
|
|
39
40
|
@property({ type: Boolean }) showInfoButton = false;
|
|
@@ -101,6 +102,7 @@ export class ItemTile extends BaseTileComponent {
|
|
|
101
102
|
.model=${this.model}
|
|
102
103
|
.baseImageUrl=${this.baseImageUrl}
|
|
103
104
|
.loggedIn=${this.loggedIn}
|
|
105
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
104
106
|
.isCompactTile=${false}
|
|
105
107
|
.isListTile=${false}
|
|
106
108
|
.viewSize=${'grid'}
|
|
@@ -18,6 +18,7 @@ export class SearchTile extends BaseTileComponent {
|
|
|
18
18
|
* - creatorFilter?: string;
|
|
19
19
|
* - mobileBreakpoint?: number;
|
|
20
20
|
* - loggedIn = false;
|
|
21
|
+
* - suppressBlurring = false;
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
@property({ type: Boolean }) showInfoButton = false;
|
|
@@ -40,6 +41,7 @@ export class SearchTile extends BaseTileComponent {
|
|
|
40
41
|
.model=${this.model}
|
|
41
42
|
.baseImageUrl=${this.baseImageUrl}
|
|
42
43
|
.viewSize=${'grid'}
|
|
44
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
43
45
|
>
|
|
44
46
|
</image-block>
|
|
45
47
|
`;
|
|
@@ -16,6 +16,7 @@ export interface HoverPaneProperties {
|
|
|
16
16
|
baseNavigationUrl?: string;
|
|
17
17
|
baseImageUrl?: string;
|
|
18
18
|
loggedIn: boolean;
|
|
19
|
+
suppressBlurring: boolean;
|
|
19
20
|
sortParam: SortParam | null;
|
|
20
21
|
collectionTitles?: CollectionTitles;
|
|
21
22
|
}
|
|
@@ -189,6 +190,7 @@ export class HoverPaneController implements HoverPaneControllerInterface {
|
|
|
189
190
|
.baseNavigationUrl=${this.hoverPaneProps?.baseNavigationUrl}
|
|
190
191
|
.baseImageUrl=${this.hoverPaneProps?.baseImageUrl}
|
|
191
192
|
.loggedIn=${this.hoverPaneProps?.loggedIn}
|
|
193
|
+
.suppressBlurring=${this.hoverPaneProps?.suppressBlurring}
|
|
192
194
|
.sortParam=${this.hoverPaneProps?.sortParam}
|
|
193
195
|
.collectionTitles=${this.hoverPaneProps?.collectionTitles}
|
|
194
196
|
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
@@ -22,6 +22,8 @@ export class TileHoverPane extends LitElement {
|
|
|
22
22
|
|
|
23
23
|
@property({ type: Boolean }) loggedIn: boolean = false;
|
|
24
24
|
|
|
25
|
+
@property({ type: Boolean }) suppressBlurring: boolean = false;
|
|
26
|
+
|
|
25
27
|
@property({ type: Object }) sortParam?: SortParam;
|
|
26
28
|
|
|
27
29
|
@property({ type: Number }) mobileBreakpoint?: number;
|
|
@@ -41,6 +43,7 @@ export class TileHoverPane extends LitElement {
|
|
|
41
43
|
.baseNavigationUrl=${this.baseNavigationUrl}
|
|
42
44
|
.baseImageUrl=${this.baseImageUrl}
|
|
43
45
|
.loggedIn=${this.loggedIn}
|
|
46
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
44
47
|
.sortParam=${this.sortParam}
|
|
45
48
|
.collectionTitles=${this.collectionTitles}
|
|
46
49
|
.mobileBreakpoint=${this.mobileBreakpoint}
|
package/src/tiles/image-block.ts
CHANGED
|
@@ -17,6 +17,8 @@ export class ImageBlock extends LitElement {
|
|
|
17
17
|
|
|
18
18
|
@property({ type: Boolean }) loggedIn = false;
|
|
19
19
|
|
|
20
|
+
@property({ type: Boolean }) suppressBlurring = false;
|
|
21
|
+
|
|
20
22
|
@property({ type: Object }) model?: TileModel;
|
|
21
23
|
|
|
22
24
|
@property({ type: String }) viewSize: string = 'desktop';
|
|
@@ -32,6 +34,7 @@ export class ImageBlock extends LitElement {
|
|
|
32
34
|
.isListTile=${this.isListTile}
|
|
33
35
|
.isCompactTile=${this.isCompactTile}
|
|
34
36
|
.loggedIn=${this.loggedIn}
|
|
37
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
35
38
|
style="--imgHeight: 100%; --imgWidth: 100%"
|
|
36
39
|
>
|
|
37
40
|
</item-image>
|
|
@@ -78,6 +81,8 @@ export class ImageBlock extends LitElement {
|
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
private get overlayType(): TileOverlayType | undefined {
|
|
84
|
+
if (this.suppressBlurring) return undefined;
|
|
85
|
+
|
|
81
86
|
// Prioritize showing the login-required overlay if needed.
|
|
82
87
|
// Otherwise, if a content warning is required, show that overlay instead.
|
|
83
88
|
// If neither flag is present, no overlay should be shown.
|
package/src/tiles/item-image.ts
CHANGED
|
@@ -22,6 +22,8 @@ export class ItemImage extends LitElement {
|
|
|
22
22
|
|
|
23
23
|
@property({ type: Boolean }) loggedIn = false;
|
|
24
24
|
|
|
25
|
+
@property({ type: Boolean }) suppressBlurring = false;
|
|
26
|
+
|
|
25
27
|
@state() private isWaveform = false;
|
|
26
28
|
|
|
27
29
|
@state() private isNotFound = false;
|
|
@@ -111,12 +113,15 @@ export class ItemImage extends LitElement {
|
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
private get itemImageClass(): ClassInfo {
|
|
114
|
-
const
|
|
116
|
+
const hasSensitiveContent = !!(
|
|
117
|
+
this.model?.contentWarning || this.model?.loginRequired
|
|
118
|
+
);
|
|
119
|
+
const shouldBlur = hasSensitiveContent && !this.suppressBlurring;
|
|
115
120
|
|
|
116
121
|
return {
|
|
117
122
|
contain: !this.isCompactTile && !this.isWaveform,
|
|
118
123
|
cover: this.isCompactTile,
|
|
119
|
-
blur:
|
|
124
|
+
blur: shouldBlur,
|
|
120
125
|
waveform: this.isWaveform,
|
|
121
126
|
'account-image': this.isAccountImage, // for account tile image
|
|
122
127
|
'collection-image': this.model?.mediatype === 'collection', // for collection tile image
|
|
@@ -26,6 +26,7 @@ export class TileListCompact extends BaseTileComponent {
|
|
|
26
26
|
* - creatorFilter?: string;
|
|
27
27
|
* - mobileBreakpoint?: number;
|
|
28
28
|
* - loggedIn = false;
|
|
29
|
+
* - suppressBlurring = false;
|
|
29
30
|
*/
|
|
30
31
|
|
|
31
32
|
render() {
|
|
@@ -38,6 +39,7 @@ export class TileListCompact extends BaseTileComponent {
|
|
|
38
39
|
.isListTile=${true}
|
|
39
40
|
.viewSize=${this.classSize}
|
|
40
41
|
.loggedIn=${this.loggedIn}
|
|
42
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
41
43
|
>
|
|
42
44
|
</image-block>
|
|
43
45
|
<a href=${this.href} id="title"
|
|
@@ -36,6 +36,7 @@ export class TileList extends BaseTileComponent {
|
|
|
36
36
|
* - creatorFilter?: string;
|
|
37
37
|
* - mobileBreakpoint?: number;
|
|
38
38
|
* - loggedIn = false;
|
|
39
|
+
* - suppressBlurring = false;
|
|
39
40
|
*/
|
|
40
41
|
|
|
41
42
|
@property({ type: Object })
|
|
@@ -101,6 +102,7 @@ export class TileList extends BaseTileComponent {
|
|
|
101
102
|
.isListTile=${true}
|
|
102
103
|
.viewSize=${this.classSize}
|
|
103
104
|
.loggedIn=${this.loggedIn}
|
|
105
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
104
106
|
>
|
|
105
107
|
</image-block>
|
|
106
108
|
</a> `;
|
|
@@ -46,6 +46,7 @@ export class TileDispatcher
|
|
|
46
46
|
* - creatorFilter?: string;
|
|
47
47
|
* - mobileBreakpoint?: number;
|
|
48
48
|
* - loggedIn = false;
|
|
49
|
+
* - suppressTileBlurring = false;
|
|
49
50
|
*/
|
|
50
51
|
|
|
51
52
|
@property({ type: String }) tileDisplayMode?: TileDisplayMode;
|
|
@@ -303,6 +304,7 @@ export class TileDispatcher
|
|
|
303
304
|
.currentWidth=${currentWidth}
|
|
304
305
|
.currentHeight=${currentHeight}
|
|
305
306
|
.creatorFilter=${creatorFilter}
|
|
307
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
306
308
|
.isManageView=${this.isManageView}
|
|
307
309
|
?showInfoButton=${!this.isHoverEnabled}
|
|
308
310
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
@@ -316,6 +318,7 @@ export class TileDispatcher
|
|
|
316
318
|
.currentWidth=${currentWidth}
|
|
317
319
|
.currentHeight=${currentHeight}
|
|
318
320
|
.creatorFilter=${creatorFilter}
|
|
321
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
319
322
|
.isManageView=${this.isManageView}
|
|
320
323
|
?showInfoButton=${!this.isHoverEnabled}
|
|
321
324
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
@@ -329,6 +332,7 @@ export class TileDispatcher
|
|
|
329
332
|
.currentWidth=${currentWidth}
|
|
330
333
|
.currentHeight=${currentHeight}
|
|
331
334
|
.creatorFilter=${creatorFilter}
|
|
335
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
332
336
|
.isManageView=${this.isManageView}
|
|
333
337
|
?showInfoButton=${false}
|
|
334
338
|
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
@@ -345,6 +349,7 @@ export class TileDispatcher
|
|
|
345
349
|
.defaultSortParam=${defaultSortParam}
|
|
346
350
|
.creatorFilter=${creatorFilter}
|
|
347
351
|
.loggedIn=${this.loggedIn}
|
|
352
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
348
353
|
.isManageView=${this.isManageView}
|
|
349
354
|
.simpleLayoutType=${this.simpleLayoutType}
|
|
350
355
|
?showTvClips=${this.showTvClips}
|
|
@@ -366,6 +371,7 @@ export class TileDispatcher
|
|
|
366
371
|
.mobileBreakpoint=${mobileBreakpoint}
|
|
367
372
|
.baseImageUrl=${this.baseImageUrl}
|
|
368
373
|
.loggedIn=${this.loggedIn}
|
|
374
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
369
375
|
>
|
|
370
376
|
</tile-list-compact>`;
|
|
371
377
|
case 'list-detail':
|
|
@@ -382,6 +388,7 @@ export class TileDispatcher
|
|
|
382
388
|
.mobileBreakpoint=${mobileBreakpoint}
|
|
383
389
|
.baseImageUrl=${this.baseImageUrl}
|
|
384
390
|
.loggedIn=${this.loggedIn}
|
|
391
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
385
392
|
>
|
|
386
393
|
</tile-list>`;
|
|
387
394
|
default:
|