@internetarchive/collection-browser 3.4.1-alpha-webdev7761.2 → 3.4.1-alpha-webdev7761.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/app-root.js +19 -28
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.d.ts +14 -10
- package/dist/src/collection-browser.js +870 -886
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.js +3 -4
- 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/more-facets-content.js +145 -156
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.js +6 -10
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +16 -21
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +7 -10
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js +3 -2
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +9 -11
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +7 -7
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +4 -6
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/collection-facets.js +34 -50
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/combo-box/caret-closed.js +5 -11
- package/dist/src/combo-box/caret-closed.js.map +1 -1
- package/dist/src/combo-box/caret-open.js +5 -11
- package/dist/src/combo-box/caret-open.js.map +1 -1
- package/dist/src/combo-box/clear.d.ts +2 -0
- package/dist/src/combo-box/clear.js +11 -0
- package/dist/src/combo-box/clear.js.map +1 -0
- package/dist/src/combo-box/ia-combo-box.d.ts +40 -9
- package/dist/src/combo-box/ia-combo-box.js +363 -272
- package/dist/src/combo-box/ia-combo-box.js.map +1 -1
- package/dist/src/combo-box/models.d.ts +14 -0
- package/dist/src/combo-box/models.js +32 -1
- package/dist/src/combo-box/models.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js +35 -47
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/empty-placeholder.js +19 -18
- package/dist/src/empty-placeholder.js.map +1 -1
- package/dist/src/expanded-date-picker.js +6 -10
- package/dist/src/expanded-date-picker.js.map +1 -1
- package/dist/src/language-code-handler/language-code-handler.js +2 -2
- package/dist/src/language-code-handler/language-code-handler.js.map +1 -1
- package/dist/src/manage/manage-bar.js +86 -92
- package/dist/src/manage/manage-bar.js.map +1 -1
- package/dist/src/manage/remove-items-modal-content.js +2 -2
- package/dist/src/manage/remove-items-modal-content.js.map +1 -1
- package/dist/src/models.js +36 -40
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.js +9 -10
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/sort-filter-bar/alpha-bar.js +9 -14
- package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +14 -24
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/tiles/base-tile-component.js +1 -2
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.js +36 -38
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +79 -82
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +154 -164
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/search-tile.js +42 -43
- 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/src/tiles/grid/tile-stats.js +2 -3
- package/dist/src/tiles/grid/tile-stats.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.js +42 -49
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.js +113 -114
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
- package/dist/src/tiles/image-block.js +5 -8
- package/dist/src/tiles/image-block.js.map +1 -1
- package/dist/src/tiles/item-image.js +12 -19
- package/dist/src/tiles/item-image.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +114 -122
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +326 -347
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/overlay/icon-overlay.js +1 -2
- package/dist/src/tiles/overlay/icon-overlay.js.map +1 -1
- package/dist/src/tiles/overlay/text-overlay.js +2 -4
- package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
- package/dist/src/tiles/text-snippet-block.js +2 -4
- package/dist/src/tiles/text-snippet-block.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +233 -241
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/tiles/tile-display-value-provider.js +5 -9
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/src/tiles/tile-mediatype-icon.js +12 -19
- package/dist/src/tiles/tile-mediatype-icon.js.map +1 -1
- package/dist/src/utils/collapse-repeated-quotes.js +1 -1
- package/dist/src/utils/collapse-repeated-quotes.js.map +1 -1
- package/dist/src/utils/facet-utils.js +3 -5
- package/dist/src/utils/facet-utils.js.map +1 -1
- package/dist/src/utils/format-count.js +10 -10
- package/dist/src/utils/format-count.js.map +1 -1
- package/dist/src/utils/format-date.js.map +1 -1
- package/dist/src/utils/resolve-mediatype.js +2 -3
- package/dist/src/utils/resolve-mediatype.js.map +1 -1
- package/dist/test/collection-browser.test.js +131 -185
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/facet-row.test.js +60 -75
- package/dist/test/collection-facets/facet-row.test.js.map +1 -1
- package/dist/test/collection-facets/facets-template.test.js +17 -23
- package/dist/test/collection-facets/facets-template.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +22 -32
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +16 -22
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
- package/dist/test/collection-facets/toggle-switch.test.js +22 -19
- package/dist/test/collection-facets/toggle-switch.test.js.map +1 -1
- package/dist/test/collection-facets.test.js +80 -97
- package/dist/test/collection-facets.test.js.map +1 -1
- package/dist/test/empty-placeholder.test.js +11 -17
- package/dist/test/empty-placeholder.test.js.map +1 -1
- package/dist/test/expanded-date-picker.test.js +8 -14
- package/dist/test/expanded-date-picker.test.js.map +1 -1
- package/dist/test/icon-overlay.test.js +7 -6
- package/dist/test/icon-overlay.test.js.map +1 -1
- package/dist/test/image-block.test.js +16 -26
- package/dist/test/image-block.test.js.map +1 -1
- package/dist/test/item-image.test.js +23 -32
- package/dist/test/item-image.test.js.map +1 -1
- package/dist/test/manage/manage-bar.test.js +21 -33
- package/dist/test/manage/manage-bar.test.js.map +1 -1
- package/dist/test/manage/remove-items-modal-content.test.js +10 -15
- package/dist/test/manage/remove-items-modal-content.test.js.map +1 -1
- package/dist/test/mocks/mock-search-service.js +2 -3
- package/dist/test/mocks/mock-search-service.js.map +1 -1
- package/dist/test/restoration-state-handler.test.js +13 -21
- package/dist/test/restoration-state-handler.test.js.map +1 -1
- package/dist/test/review-block.test.js +16 -18
- package/dist/test/review-block.test.js.map +1 -1
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +2 -3
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +1 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.js +18 -24
- package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +178 -180
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/dist/test/text-overlay.test.js +16 -15
- package/dist/test/text-overlay.test.js.map +1 -1
- package/dist/test/text-snippet-block.test.js +14 -19
- package/dist/test/text-snippet-block.test.js.map +1 -1
- package/dist/test/tile-stats.test.js +73 -34
- package/dist/test/tile-stats.test.js.map +1 -1
- package/dist/test/tiles/grid/account-tile.test.js +25 -25
- package/dist/test/tiles/grid/account-tile.test.js.map +1 -1
- package/dist/test/tiles/grid/collection-tile.test.js +13 -19
- package/dist/test/tiles/grid/collection-tile.test.js.map +1 -1
- package/dist/test/tiles/grid/item-tile.test.js +141 -168
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
- package/dist/test/tiles/grid/search-tile.test.js +9 -13
- package/dist/test/tiles/grid/search-tile.test.js.map +1 -1
- package/dist/test/tiles/hover/hover-pane-controller.test.js +50 -62
- package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
- package/dist/test/tiles/hover/tile-hover-pane.test.js +12 -16
- package/dist/test/tiles/hover/tile-hover-pane.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list-compact.test.js +104 -118
- package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +202 -231
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/dist/test/tiles/tile-dispatcher.test.js +97 -110
- package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
- package/dist/test/tiles/tile-mediatype-icon.test.js +12 -24
- package/dist/test/tiles/tile-mediatype-icon.test.js.map +1 -1
- package/dist/test/utils/format-date.test.js.map +1 -1
- package/index.html +1 -1
- package/package.json +5 -3
- package/src/collection-browser.ts +3060 -3030
- package/src/collection-facets/models.ts +10 -10
- package/src/collection-facets/more-facets-content.ts +639 -639
- package/src/collection-facets.ts +1 -1
- package/src/combo-box/caret-closed.ts +5 -11
- package/src/combo-box/caret-open.ts +5 -11
- package/src/combo-box/clear.ts +11 -0
- package/src/combo-box/ia-combo-box.ts +1288 -1180
- package/src/combo-box/models.ts +31 -1
- package/src/manage/manage-bar.ts +247 -247
- package/src/restoration-state-handler.ts +5 -1
- package/src/tiles/base-tile-component.ts +65 -65
- package/src/tiles/grid/account-tile.ts +113 -113
- package/src/tiles/grid/collection-tile.ts +163 -163
- package/src/tiles/grid/item-tile.ts +340 -340
- package/src/tiles/grid/search-tile.ts +90 -90
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -130
- package/src/tiles/hover/hover-pane-controller.ts +613 -613
- package/src/tiles/hover/tile-hover-pane.ts +184 -184
- package/src/tiles/list/tile-list-compact.ts +239 -239
- package/src/tiles/list/tile-list.ts +700 -700
- package/src/tiles/tile-dispatcher.ts +517 -517
- package/src/utils/format-date.ts +62 -62
- package/test/collection-facets/facet-row.test.ts +375 -375
- package/test/collection-facets.test.ts +928 -928
- package/test/tiles/grid/item-tile.test.ts +520 -520
- package/test/tiles/hover/hover-pane-controller.test.ts +418 -418
- package/test/tiles/list/tile-list-compact.test.ts +282 -282
- package/test/tiles/list/tile-list.test.ts +552 -552
- package/test/tiles/tile-dispatcher.test.ts +283 -283
- package/test/utils/format-date.test.ts +89 -89
- package/tsconfig.json +8 -3
- package/vite.config.ts +29 -22
|
@@ -15,7 +15,7 @@ import './list/tile-list-compact-header';
|
|
|
15
15
|
import { BaseTileComponent } from './base-tile-component';
|
|
16
16
|
import { HoverPaneController, } from './hover/hover-pane-controller';
|
|
17
17
|
import { srOnlyStyle } from '../styles/sr-only';
|
|
18
|
-
let TileDispatcher =
|
|
18
|
+
let TileDispatcher = class TileDispatcher extends BaseTileComponent {
|
|
19
19
|
constructor() {
|
|
20
20
|
/*
|
|
21
21
|
* Reactive properties inherited from BaseTileComponent:
|
|
@@ -42,25 +42,30 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
42
42
|
this.enableHoverPane = false;
|
|
43
43
|
this.manageCheckTitle = msg('Remove this item from the list');
|
|
44
44
|
}
|
|
45
|
+
static { TileDispatcher_1 = this; }
|
|
45
46
|
acquireFocus() {
|
|
46
|
-
|
|
47
|
-
(_a = this.tileLinkElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
47
|
+
this.tileLinkElement?.focus();
|
|
48
48
|
}
|
|
49
49
|
releaseFocus() {
|
|
50
|
-
|
|
51
|
-
(_a = this.tileLinkElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
50
|
+
this.tileLinkElement?.blur();
|
|
52
51
|
}
|
|
52
|
+
/** Maps each display mode to whether hover panes should appear in that mode */
|
|
53
|
+
static { this.HOVER_PANE_DISPLAY_MODES = {
|
|
54
|
+
grid: true,
|
|
55
|
+
'list-compact': true,
|
|
56
|
+
'list-detail': false,
|
|
57
|
+
'list-header': false,
|
|
58
|
+
}; }
|
|
53
59
|
render() {
|
|
54
|
-
var _a, _b;
|
|
55
60
|
const isGridMode = this.tileDisplayMode === 'grid';
|
|
56
|
-
const hoverPaneTemplate =
|
|
57
|
-
return html `
|
|
58
|
-
<div id="container" class=${isGridMode ? 'hoverable' : ''}>
|
|
61
|
+
const hoverPaneTemplate = this.hoverPaneController?.getTemplate() ?? nothing;
|
|
62
|
+
return html `
|
|
63
|
+
<div id="container" class=${isGridMode ? 'hoverable' : ''}>
|
|
59
64
|
${this.tileDisplayMode === 'list-header'
|
|
60
65
|
? this.headerTemplate
|
|
61
|
-
: this.tileTemplate}
|
|
62
|
-
${this.manageCheckTemplate} ${hoverPaneTemplate}
|
|
63
|
-
</div>
|
|
66
|
+
: this.tileTemplate}
|
|
67
|
+
${this.manageCheckTemplate} ${hoverPaneTemplate}
|
|
68
|
+
</div>
|
|
64
69
|
`;
|
|
65
70
|
}
|
|
66
71
|
firstUpdated() {
|
|
@@ -73,48 +78,46 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
73
78
|
}
|
|
74
79
|
get headerTemplate() {
|
|
75
80
|
const { currentWidth, sortParam, defaultSortParam, mobileBreakpoint } = this;
|
|
76
|
-
return html `
|
|
77
|
-
<tile-list-compact-header
|
|
78
|
-
class="header"
|
|
79
|
-
.currentWidth=${currentWidth}
|
|
80
|
-
.sortParam=${sortParam
|
|
81
|
-
.mobileBreakpoint=${mobileBreakpoint}
|
|
82
|
-
>
|
|
83
|
-
</tile-list-compact-header>
|
|
81
|
+
return html `
|
|
82
|
+
<tile-list-compact-header
|
|
83
|
+
class="header"
|
|
84
|
+
.currentWidth=${currentWidth}
|
|
85
|
+
.sortParam=${sortParam ?? defaultSortParam}
|
|
86
|
+
.mobileBreakpoint=${mobileBreakpoint}
|
|
87
|
+
>
|
|
88
|
+
</tile-list-compact-header>
|
|
84
89
|
`;
|
|
85
90
|
}
|
|
86
91
|
get tileTemplate() {
|
|
87
|
-
return html `
|
|
92
|
+
return html `
|
|
88
93
|
${this.tileDisplayMode === 'list-detail'
|
|
89
94
|
? this.tile
|
|
90
|
-
: this.linkTileTemplate}
|
|
95
|
+
: this.linkTileTemplate}
|
|
91
96
|
`;
|
|
92
97
|
}
|
|
93
98
|
get linkTileTemplate() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
aria-
|
|
99
|
-
aria-
|
|
100
|
-
aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}
|
|
99
|
+
return html `
|
|
100
|
+
<a
|
|
101
|
+
href=${this.linkTileHref}
|
|
102
|
+
aria-label=${this.model?.title ?? 'Untitled item'}
|
|
103
|
+
aria-describedby="link-aria-description"
|
|
104
|
+
aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}
|
|
101
105
|
title=${this.shouldPrepareHoverPane
|
|
102
106
|
? nothing // Don't show title tooltips when we have the tile info popups
|
|
103
|
-
: ifDefined(
|
|
104
|
-
@click=${this.handleLinkClicked}
|
|
105
|
-
@contextmenu=${this.handleLinkContextMenu}
|
|
106
|
-
class="tile-link"
|
|
107
|
-
>
|
|
108
|
-
${this.tile}
|
|
109
|
-
</a>
|
|
110
|
-
<div id="link-aria-description" class="sr-only">
|
|
111
|
-
${msg('Press Down Arrow to preview item details')}
|
|
112
|
-
</div>
|
|
107
|
+
: ifDefined(this.model?.title)}
|
|
108
|
+
@click=${this.handleLinkClicked}
|
|
109
|
+
@contextmenu=${this.handleLinkContextMenu}
|
|
110
|
+
class="tile-link"
|
|
111
|
+
>
|
|
112
|
+
${this.tile}
|
|
113
|
+
</a>
|
|
114
|
+
<div id="link-aria-description" class="sr-only">
|
|
115
|
+
${msg('Press Down Arrow to preview item details')}
|
|
116
|
+
</div>
|
|
113
117
|
`;
|
|
114
118
|
}
|
|
115
119
|
get linkTileHref() {
|
|
116
|
-
|
|
117
|
-
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier) || this.baseNavigationUrl == null)
|
|
120
|
+
if (!this.model?.identifier || this.baseNavigationUrl == null)
|
|
118
121
|
return nothing;
|
|
119
122
|
// Use the server-specified href if available.
|
|
120
123
|
// Otherwise, construct a details page URL from the item identifier.
|
|
@@ -124,18 +127,17 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
124
127
|
return this.displayValueProvider.itemPageUrl(this.model.identifier, this.model.mediatype === 'collection');
|
|
125
128
|
}
|
|
126
129
|
get manageCheckTemplate() {
|
|
127
|
-
var _a;
|
|
128
130
|
if (!this.isManageView || this.tileDisplayMode !== 'grid')
|
|
129
131
|
return nothing;
|
|
130
|
-
return html `
|
|
131
|
-
<div class="manage-check">
|
|
132
|
-
<input
|
|
133
|
-
type="checkbox"
|
|
134
|
-
title=${this.manageCheckTitle}
|
|
135
|
-
?checked=${
|
|
136
|
-
@change=${this.handleLinkClicked}
|
|
137
|
-
/>
|
|
138
|
-
</div>
|
|
132
|
+
return html `
|
|
133
|
+
<div class="manage-check">
|
|
134
|
+
<input
|
|
135
|
+
type="checkbox"
|
|
136
|
+
title=${this.manageCheckTitle}
|
|
137
|
+
?checked=${this.model?.checked}
|
|
138
|
+
@change=${this.handleLinkClicked}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
139
141
|
`;
|
|
140
142
|
}
|
|
141
143
|
/**
|
|
@@ -143,12 +145,11 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
143
145
|
* (e.g., whether mouse listeners should be attached, etc.)
|
|
144
146
|
*/
|
|
145
147
|
get shouldPrepareHoverPane() {
|
|
146
|
-
var _a, _b;
|
|
147
148
|
return (this.enableHoverPane &&
|
|
148
149
|
!!this.tileDisplayMode &&
|
|
149
150
|
TileDispatcher_1.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode] &&
|
|
150
|
-
|
|
151
|
-
!
|
|
151
|
+
this.model?.mediatype !== 'search' && // don't show hover panes on search tiles
|
|
152
|
+
!this.model?.captureDates // don't show hover panes on web archive tiles
|
|
152
153
|
);
|
|
153
154
|
}
|
|
154
155
|
get isHoverEnabled() {
|
|
@@ -170,15 +171,14 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
170
171
|
this.stopResizeObservation(this.resizeObserver);
|
|
171
172
|
}
|
|
172
173
|
stopResizeObservation(observer) {
|
|
173
|
-
observer
|
|
174
|
+
observer?.removeObserver({
|
|
174
175
|
handler: this,
|
|
175
176
|
target: this.container,
|
|
176
177
|
});
|
|
177
178
|
}
|
|
178
179
|
startResizeObservation() {
|
|
179
|
-
var _a;
|
|
180
180
|
this.stopResizeObservation(this.resizeObserver);
|
|
181
|
-
|
|
181
|
+
this.resizeObserver?.addObserver({
|
|
182
182
|
handler: this,
|
|
183
183
|
target: this.container,
|
|
184
184
|
});
|
|
@@ -213,8 +213,7 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
tileInfoButtonPressed(e) {
|
|
216
|
-
|
|
217
|
-
(_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.toggleHoverPane({
|
|
216
|
+
this.hoverPaneController?.toggleHoverPane({
|
|
218
217
|
coords: e.detail,
|
|
219
218
|
enableTouchBackdrop: true,
|
|
220
219
|
});
|
|
@@ -227,102 +226,102 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
227
226
|
case 'grid':
|
|
228
227
|
switch (model.mediatype) {
|
|
229
228
|
case 'collection':
|
|
230
|
-
return html `<collection-tile
|
|
231
|
-
.model=${model}
|
|
232
|
-
.collectionPagePath=${collectionPagePath}
|
|
233
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
234
|
-
.currentWidth=${currentWidth}
|
|
235
|
-
.currentHeight=${currentHeight}
|
|
236
|
-
.creatorFilter=${creatorFilter}
|
|
237
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
238
|
-
.isManageView=${this.isManageView}
|
|
239
|
-
?showInfoButton=${!this.isHoverEnabled}
|
|
240
|
-
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
241
|
-
>
|
|
229
|
+
return html `<collection-tile
|
|
230
|
+
.model=${model}
|
|
231
|
+
.collectionPagePath=${collectionPagePath}
|
|
232
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
233
|
+
.currentWidth=${currentWidth}
|
|
234
|
+
.currentHeight=${currentHeight}
|
|
235
|
+
.creatorFilter=${creatorFilter}
|
|
236
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
237
|
+
.isManageView=${this.isManageView}
|
|
238
|
+
?showInfoButton=${!this.isHoverEnabled}
|
|
239
|
+
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
240
|
+
>
|
|
242
241
|
</collection-tile>`;
|
|
243
242
|
case 'account':
|
|
244
|
-
return html `<account-tile
|
|
245
|
-
.model=${model}
|
|
246
|
-
.collectionPagePath=${collectionPagePath}
|
|
247
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
248
|
-
.currentWidth=${currentWidth}
|
|
249
|
-
.currentHeight=${currentHeight}
|
|
250
|
-
.creatorFilter=${creatorFilter}
|
|
251
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
252
|
-
.isManageView=${this.isManageView}
|
|
253
|
-
?showInfoButton=${!this.isHoverEnabled}
|
|
254
|
-
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
255
|
-
>
|
|
243
|
+
return html `<account-tile
|
|
244
|
+
.model=${model}
|
|
245
|
+
.collectionPagePath=${collectionPagePath}
|
|
246
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
247
|
+
.currentWidth=${currentWidth}
|
|
248
|
+
.currentHeight=${currentHeight}
|
|
249
|
+
.creatorFilter=${creatorFilter}
|
|
250
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
251
|
+
.isManageView=${this.isManageView}
|
|
252
|
+
?showInfoButton=${!this.isHoverEnabled}
|
|
253
|
+
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
254
|
+
>
|
|
256
255
|
</account-tile>`;
|
|
257
256
|
case 'search':
|
|
258
|
-
return html `<search-tile
|
|
259
|
-
.model=${model}
|
|
260
|
-
.collectionPagePath=${collectionPagePath}
|
|
261
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
262
|
-
.currentWidth=${currentWidth}
|
|
263
|
-
.currentHeight=${currentHeight}
|
|
264
|
-
.creatorFilter=${creatorFilter}
|
|
265
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
266
|
-
.isManageView=${this.isManageView}
|
|
267
|
-
?showInfoButton=${false}
|
|
268
|
-
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
269
|
-
>
|
|
257
|
+
return html `<search-tile
|
|
258
|
+
.model=${model}
|
|
259
|
+
.collectionPagePath=${collectionPagePath}
|
|
260
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
261
|
+
.currentWidth=${currentWidth}
|
|
262
|
+
.currentHeight=${currentHeight}
|
|
263
|
+
.creatorFilter=${creatorFilter}
|
|
264
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
265
|
+
.isManageView=${this.isManageView}
|
|
266
|
+
?showInfoButton=${false}
|
|
267
|
+
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
268
|
+
>
|
|
270
269
|
</search-tile>`;
|
|
271
270
|
default:
|
|
272
|
-
return html `<item-tile
|
|
273
|
-
.model=${model}
|
|
274
|
-
.collectionPagePath=${collectionPagePath}
|
|
275
|
-
.currentWidth=${this.currentWidth}
|
|
276
|
-
.currentHeight=${this.currentHeight}
|
|
277
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
278
|
-
.sortParam=${sortParam}
|
|
279
|
-
.defaultSortParam=${defaultSortParam}
|
|
280
|
-
.creatorFilter=${creatorFilter}
|
|
281
|
-
.loggedIn=${this.loggedIn}
|
|
282
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
283
|
-
.isManageView=${this.isManageView}
|
|
284
|
-
.simpleLayoutType=${this.simpleLayoutType}
|
|
285
|
-
?showTvClips=${this.showTvClips}
|
|
286
|
-
?showInfoButton=${!this.isHoverEnabled}
|
|
287
|
-
?useLocalTime=${this.useLocalTime}
|
|
288
|
-
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
289
|
-
>
|
|
271
|
+
return html `<item-tile
|
|
272
|
+
.model=${model}
|
|
273
|
+
.collectionPagePath=${collectionPagePath}
|
|
274
|
+
.currentWidth=${this.currentWidth}
|
|
275
|
+
.currentHeight=${this.currentHeight}
|
|
276
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
277
|
+
.sortParam=${sortParam}
|
|
278
|
+
.defaultSortParam=${defaultSortParam}
|
|
279
|
+
.creatorFilter=${creatorFilter}
|
|
280
|
+
.loggedIn=${this.loggedIn}
|
|
281
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
282
|
+
.isManageView=${this.isManageView}
|
|
283
|
+
.simpleLayoutType=${this.simpleLayoutType}
|
|
284
|
+
?showTvClips=${this.showTvClips}
|
|
285
|
+
?showInfoButton=${!this.isHoverEnabled}
|
|
286
|
+
?useLocalTime=${this.useLocalTime}
|
|
287
|
+
@infoButtonPressed=${this.tileInfoButtonPressed}
|
|
288
|
+
>
|
|
290
289
|
</item-tile>`;
|
|
291
290
|
}
|
|
292
291
|
case 'list-compact':
|
|
293
|
-
return html `<tile-list-compact
|
|
294
|
-
.model=${model}
|
|
295
|
-
.collectionPagePath=${collectionPagePath}
|
|
296
|
-
.currentWidth=${currentWidth}
|
|
297
|
-
.currentHeight=${currentHeight}
|
|
298
|
-
.baseNavigationUrl=${baseNavigationUrl}
|
|
299
|
-
.sortParam=${sortParam}
|
|
300
|
-
.defaultSortParam=${defaultSortParam}
|
|
301
|
-
.creatorFilter=${creatorFilter}
|
|
302
|
-
.mobileBreakpoint=${mobileBreakpoint}
|
|
303
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
304
|
-
.loggedIn=${this.loggedIn}
|
|
305
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
306
|
-
?useLocalTime=${this.useLocalTime}
|
|
307
|
-
>
|
|
292
|
+
return html `<tile-list-compact
|
|
293
|
+
.model=${model}
|
|
294
|
+
.collectionPagePath=${collectionPagePath}
|
|
295
|
+
.currentWidth=${currentWidth}
|
|
296
|
+
.currentHeight=${currentHeight}
|
|
297
|
+
.baseNavigationUrl=${baseNavigationUrl}
|
|
298
|
+
.sortParam=${sortParam}
|
|
299
|
+
.defaultSortParam=${defaultSortParam}
|
|
300
|
+
.creatorFilter=${creatorFilter}
|
|
301
|
+
.mobileBreakpoint=${mobileBreakpoint}
|
|
302
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
303
|
+
.loggedIn=${this.loggedIn}
|
|
304
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
305
|
+
?useLocalTime=${this.useLocalTime}
|
|
306
|
+
>
|
|
308
307
|
</tile-list-compact>`;
|
|
309
308
|
case 'list-detail':
|
|
310
|
-
return html `<tile-list
|
|
311
|
-
.model=${model}
|
|
312
|
-
.collectionPagePath=${collectionPagePath}
|
|
313
|
-
.collectionTitles=${this.collectionTitles}
|
|
314
|
-
.currentWidth=${currentWidth}
|
|
315
|
-
.currentHeight=${currentHeight}
|
|
316
|
-
.baseNavigationUrl=${baseNavigationUrl}
|
|
317
|
-
.sortParam=${sortParam}
|
|
318
|
-
.defaultSortParam=${defaultSortParam}
|
|
319
|
-
.creatorFilter=${creatorFilter}
|
|
320
|
-
.mobileBreakpoint=${mobileBreakpoint}
|
|
321
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
322
|
-
.loggedIn=${this.loggedIn}
|
|
323
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
324
|
-
?useLocalTime=${this.useLocalTime}
|
|
325
|
-
>
|
|
309
|
+
return html `<tile-list
|
|
310
|
+
.model=${model}
|
|
311
|
+
.collectionPagePath=${collectionPagePath}
|
|
312
|
+
.collectionTitles=${this.collectionTitles}
|
|
313
|
+
.currentWidth=${currentWidth}
|
|
314
|
+
.currentHeight=${currentHeight}
|
|
315
|
+
.baseNavigationUrl=${baseNavigationUrl}
|
|
316
|
+
.sortParam=${sortParam}
|
|
317
|
+
.defaultSortParam=${defaultSortParam}
|
|
318
|
+
.creatorFilter=${creatorFilter}
|
|
319
|
+
.mobileBreakpoint=${mobileBreakpoint}
|
|
320
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
321
|
+
.loggedIn=${this.loggedIn}
|
|
322
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
323
|
+
?useLocalTime=${this.useLocalTime}
|
|
324
|
+
>
|
|
326
325
|
</tile-list>`;
|
|
327
326
|
default:
|
|
328
327
|
return nothing;
|
|
@@ -331,107 +330,100 @@ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileCom
|
|
|
331
330
|
static get styles() {
|
|
332
331
|
return [
|
|
333
332
|
srOnlyStyle,
|
|
334
|
-
css `
|
|
335
|
-
:host {
|
|
336
|
-
display: block;
|
|
337
|
-
height: 100%;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
collection-tile {
|
|
341
|
-
--tileBorderColor: #555555;
|
|
342
|
-
--tileBackgroundColor: #666666;
|
|
343
|
-
--imageBlockBackgroundColor: #666666;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
account-tile {
|
|
347
|
-
--tileBorderColor: #dddddd;
|
|
348
|
-
--imageBlockBackgroundColor: #fcf5e6;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
item-tile {
|
|
352
|
-
--tileBorderColor: #dddddd;
|
|
353
|
-
--imageBlockBackgroundColor: #f1f1f4;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
search-tile {
|
|
357
|
-
--tileBorderColor: #555555;
|
|
358
|
-
--tileBackgroundColor: #666666;
|
|
359
|
-
--imageBlockBackgroundColor: #666666;
|
|
360
|
-
--iconFillColor: #2c2c2c;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
#container {
|
|
364
|
-
position: relative;
|
|
365
|
-
height: 100%;
|
|
366
|
-
border-radius: 4px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
#container.hoverable a:focus,
|
|
370
|
-
#container.hoverable a:hover {
|
|
371
|
-
box-shadow: var(
|
|
372
|
-
--tileHoverBoxShadow,
|
|
373
|
-
0 0 6px 2px rgba(8, 8, 32, 0.8)
|
|
374
|
-
);
|
|
375
|
-
transition: box-shadow 0.1s ease;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
a {
|
|
379
|
-
display: block;
|
|
380
|
-
height: 100%;
|
|
381
|
-
color: unset;
|
|
382
|
-
text-decoration: none;
|
|
383
|
-
transition: transform 0.05s ease;
|
|
384
|
-
border-radius: 4px;
|
|
385
|
-
outline: none;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
a :first-child {
|
|
389
|
-
display: block;
|
|
390
|
-
height: 100%;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.manage-check {
|
|
394
|
-
position: absolute;
|
|
395
|
-
right: 0;
|
|
396
|
-
top: 0;
|
|
397
|
-
border: 5px solid #2c2c2c;
|
|
398
|
-
border-radius: 3px;
|
|
399
|
-
background-color: #2c2c2c;
|
|
400
|
-
z-index: 1;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.manage-check > input[type='checkbox'] {
|
|
404
|
-
display: block;
|
|
405
|
-
margin: 0;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
#touch-backdrop {
|
|
409
|
-
position: fixed;
|
|
410
|
-
width: 100vw;
|
|
411
|
-
height: 100vh;
|
|
412
|
-
top: 0;
|
|
413
|
-
left: 0;
|
|
414
|
-
z-index: 2;
|
|
415
|
-
background: transparent;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
tile-hover-pane {
|
|
419
|
-
position: absolute;
|
|
420
|
-
top: 0;
|
|
421
|
-
left: -9999px;
|
|
422
|
-
z-index: 2;
|
|
423
|
-
}
|
|
333
|
+
css `
|
|
334
|
+
:host {
|
|
335
|
+
display: block;
|
|
336
|
+
height: 100%;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
collection-tile {
|
|
340
|
+
--tileBorderColor: #555555;
|
|
341
|
+
--tileBackgroundColor: #666666;
|
|
342
|
+
--imageBlockBackgroundColor: #666666;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
account-tile {
|
|
346
|
+
--tileBorderColor: #dddddd;
|
|
347
|
+
--imageBlockBackgroundColor: #fcf5e6;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
item-tile {
|
|
351
|
+
--tileBorderColor: #dddddd;
|
|
352
|
+
--imageBlockBackgroundColor: #f1f1f4;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
search-tile {
|
|
356
|
+
--tileBorderColor: #555555;
|
|
357
|
+
--tileBackgroundColor: #666666;
|
|
358
|
+
--imageBlockBackgroundColor: #666666;
|
|
359
|
+
--iconFillColor: #2c2c2c;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
#container {
|
|
363
|
+
position: relative;
|
|
364
|
+
height: 100%;
|
|
365
|
+
border-radius: 4px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
#container.hoverable a:focus,
|
|
369
|
+
#container.hoverable a:hover {
|
|
370
|
+
box-shadow: var(
|
|
371
|
+
--tileHoverBoxShadow,
|
|
372
|
+
0 0 6px 2px rgba(8, 8, 32, 0.8)
|
|
373
|
+
);
|
|
374
|
+
transition: box-shadow 0.1s ease;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
a {
|
|
378
|
+
display: block;
|
|
379
|
+
height: 100%;
|
|
380
|
+
color: unset;
|
|
381
|
+
text-decoration: none;
|
|
382
|
+
transition: transform 0.05s ease;
|
|
383
|
+
border-radius: 4px;
|
|
384
|
+
outline: none;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
a :first-child {
|
|
388
|
+
display: block;
|
|
389
|
+
height: 100%;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.manage-check {
|
|
393
|
+
position: absolute;
|
|
394
|
+
right: 0;
|
|
395
|
+
top: 0;
|
|
396
|
+
border: 5px solid #2c2c2c;
|
|
397
|
+
border-radius: 3px;
|
|
398
|
+
background-color: #2c2c2c;
|
|
399
|
+
z-index: 1;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.manage-check > input[type='checkbox'] {
|
|
403
|
+
display: block;
|
|
404
|
+
margin: 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
#touch-backdrop {
|
|
408
|
+
position: fixed;
|
|
409
|
+
width: 100vw;
|
|
410
|
+
height: 100vh;
|
|
411
|
+
top: 0;
|
|
412
|
+
left: 0;
|
|
413
|
+
z-index: 2;
|
|
414
|
+
background: transparent;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
tile-hover-pane {
|
|
418
|
+
position: absolute;
|
|
419
|
+
top: 0;
|
|
420
|
+
left: -9999px;
|
|
421
|
+
z-index: 2;
|
|
422
|
+
}
|
|
424
423
|
`,
|
|
425
424
|
];
|
|
426
425
|
}
|
|
427
426
|
};
|
|
428
|
-
/** Maps each display mode to whether hover panes should appear in that mode */
|
|
429
|
-
TileDispatcher.HOVER_PANE_DISPLAY_MODES = {
|
|
430
|
-
grid: true,
|
|
431
|
-
'list-compact': true,
|
|
432
|
-
'list-detail': false,
|
|
433
|
-
'list-header': false,
|
|
434
|
-
};
|
|
435
427
|
__decorate([
|
|
436
428
|
property({ type: String })
|
|
437
429
|
], TileDispatcher.prototype, "tileDisplayMode", void 0);
|