@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.
Files changed (208) hide show
  1. package/dist/src/app-root.js +19 -28
  2. package/dist/src/app-root.js.map +1 -1
  3. package/dist/src/collection-browser.d.ts +14 -10
  4. package/dist/src/collection-browser.js +870 -886
  5. package/dist/src/collection-browser.js.map +1 -1
  6. package/dist/src/collection-facets/facet-row.js +3 -4
  7. package/dist/src/collection-facets/facet-row.js.map +1 -1
  8. package/dist/src/collection-facets/models.js.map +1 -1
  9. package/dist/src/collection-facets/more-facets-content.js +145 -156
  10. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  11. package/dist/src/collection-facets/more-facets-pagination.js +6 -10
  12. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
  13. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +16 -21
  14. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +1 -1
  15. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +7 -10
  16. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  17. package/dist/src/collection-facets/smart-facets/smart-facet-button.js +3 -2
  18. package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -1
  19. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +9 -11
  20. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -1
  21. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +7 -7
  22. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -1
  23. package/dist/src/collection-facets/toggle-switch.js +4 -6
  24. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  25. package/dist/src/collection-facets.js +34 -50
  26. package/dist/src/collection-facets.js.map +1 -1
  27. package/dist/src/combo-box/caret-closed.js +5 -11
  28. package/dist/src/combo-box/caret-closed.js.map +1 -1
  29. package/dist/src/combo-box/caret-open.js +5 -11
  30. package/dist/src/combo-box/caret-open.js.map +1 -1
  31. package/dist/src/combo-box/clear.d.ts +2 -0
  32. package/dist/src/combo-box/clear.js +11 -0
  33. package/dist/src/combo-box/clear.js.map +1 -0
  34. package/dist/src/combo-box/ia-combo-box.d.ts +40 -9
  35. package/dist/src/combo-box/ia-combo-box.js +363 -272
  36. package/dist/src/combo-box/ia-combo-box.js.map +1 -1
  37. package/dist/src/combo-box/models.d.ts +14 -0
  38. package/dist/src/combo-box/models.js +32 -1
  39. package/dist/src/combo-box/models.js.map +1 -1
  40. package/dist/src/data-source/collection-browser-data-source.js +35 -47
  41. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  42. package/dist/src/empty-placeholder.js +19 -18
  43. package/dist/src/empty-placeholder.js.map +1 -1
  44. package/dist/src/expanded-date-picker.js +6 -10
  45. package/dist/src/expanded-date-picker.js.map +1 -1
  46. package/dist/src/language-code-handler/language-code-handler.js +2 -2
  47. package/dist/src/language-code-handler/language-code-handler.js.map +1 -1
  48. package/dist/src/manage/manage-bar.js +86 -92
  49. package/dist/src/manage/manage-bar.js.map +1 -1
  50. package/dist/src/manage/remove-items-modal-content.js +2 -2
  51. package/dist/src/manage/remove-items-modal-content.js.map +1 -1
  52. package/dist/src/models.js +36 -40
  53. package/dist/src/models.js.map +1 -1
  54. package/dist/src/restoration-state-handler.js +9 -10
  55. package/dist/src/restoration-state-handler.js.map +1 -1
  56. package/dist/src/sort-filter-bar/alpha-bar.js +9 -14
  57. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  58. package/dist/src/sort-filter-bar/sort-filter-bar.js +14 -24
  59. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  60. package/dist/src/tiles/base-tile-component.js +1 -2
  61. package/dist/src/tiles/base-tile-component.js.map +1 -1
  62. package/dist/src/tiles/grid/account-tile.js +36 -38
  63. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  64. package/dist/src/tiles/grid/collection-tile.js +79 -82
  65. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  66. package/dist/src/tiles/grid/item-tile.js +154 -164
  67. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  68. package/dist/src/tiles/grid/search-tile.js +42 -43
  69. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  70. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +119 -119
  71. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  72. package/dist/src/tiles/grid/tile-stats.js +2 -3
  73. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  74. package/dist/src/tiles/hover/hover-pane-controller.js +42 -49
  75. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  76. package/dist/src/tiles/hover/tile-hover-pane.js +113 -114
  77. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
  78. package/dist/src/tiles/image-block.js +5 -8
  79. package/dist/src/tiles/image-block.js.map +1 -1
  80. package/dist/src/tiles/item-image.js +12 -19
  81. package/dist/src/tiles/item-image.js.map +1 -1
  82. package/dist/src/tiles/list/tile-list-compact.js +114 -122
  83. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  84. package/dist/src/tiles/list/tile-list.js +326 -347
  85. package/dist/src/tiles/list/tile-list.js.map +1 -1
  86. package/dist/src/tiles/overlay/icon-overlay.js +1 -2
  87. package/dist/src/tiles/overlay/icon-overlay.js.map +1 -1
  88. package/dist/src/tiles/overlay/text-overlay.js +2 -4
  89. package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
  90. package/dist/src/tiles/text-snippet-block.js +2 -4
  91. package/dist/src/tiles/text-snippet-block.js.map +1 -1
  92. package/dist/src/tiles/tile-dispatcher.js +233 -241
  93. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  94. package/dist/src/tiles/tile-display-value-provider.js +5 -9
  95. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  96. package/dist/src/tiles/tile-mediatype-icon.js +12 -19
  97. package/dist/src/tiles/tile-mediatype-icon.js.map +1 -1
  98. package/dist/src/utils/collapse-repeated-quotes.js +1 -1
  99. package/dist/src/utils/collapse-repeated-quotes.js.map +1 -1
  100. package/dist/src/utils/facet-utils.js +3 -5
  101. package/dist/src/utils/facet-utils.js.map +1 -1
  102. package/dist/src/utils/format-count.js +10 -10
  103. package/dist/src/utils/format-count.js.map +1 -1
  104. package/dist/src/utils/format-date.js.map +1 -1
  105. package/dist/src/utils/resolve-mediatype.js +2 -3
  106. package/dist/src/utils/resolve-mediatype.js.map +1 -1
  107. package/dist/test/collection-browser.test.js +131 -185
  108. package/dist/test/collection-browser.test.js.map +1 -1
  109. package/dist/test/collection-facets/facet-row.test.js +60 -75
  110. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  111. package/dist/test/collection-facets/facets-template.test.js +17 -23
  112. package/dist/test/collection-facets/facets-template.test.js.map +1 -1
  113. package/dist/test/collection-facets/more-facets-content.test.js +22 -32
  114. package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
  115. package/dist/test/collection-facets/more-facets-pagination.test.js +16 -22
  116. package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
  117. package/dist/test/collection-facets/toggle-switch.test.js +22 -19
  118. package/dist/test/collection-facets/toggle-switch.test.js.map +1 -1
  119. package/dist/test/collection-facets.test.js +80 -97
  120. package/dist/test/collection-facets.test.js.map +1 -1
  121. package/dist/test/empty-placeholder.test.js +11 -17
  122. package/dist/test/empty-placeholder.test.js.map +1 -1
  123. package/dist/test/expanded-date-picker.test.js +8 -14
  124. package/dist/test/expanded-date-picker.test.js.map +1 -1
  125. package/dist/test/icon-overlay.test.js +7 -6
  126. package/dist/test/icon-overlay.test.js.map +1 -1
  127. package/dist/test/image-block.test.js +16 -26
  128. package/dist/test/image-block.test.js.map +1 -1
  129. package/dist/test/item-image.test.js +23 -32
  130. package/dist/test/item-image.test.js.map +1 -1
  131. package/dist/test/manage/manage-bar.test.js +21 -33
  132. package/dist/test/manage/manage-bar.test.js.map +1 -1
  133. package/dist/test/manage/remove-items-modal-content.test.js +10 -15
  134. package/dist/test/manage/remove-items-modal-content.test.js.map +1 -1
  135. package/dist/test/mocks/mock-search-service.js +2 -3
  136. package/dist/test/mocks/mock-search-service.js.map +1 -1
  137. package/dist/test/restoration-state-handler.test.js +13 -21
  138. package/dist/test/restoration-state-handler.test.js.map +1 -1
  139. package/dist/test/review-block.test.js +16 -18
  140. package/dist/test/review-block.test.js.map +1 -1
  141. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +2 -3
  142. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +1 -1
  143. package/dist/test/sort-filter-bar/alpha-bar.test.js +18 -24
  144. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  145. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +178 -180
  146. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  147. package/dist/test/text-overlay.test.js +16 -15
  148. package/dist/test/text-overlay.test.js.map +1 -1
  149. package/dist/test/text-snippet-block.test.js +14 -19
  150. package/dist/test/text-snippet-block.test.js.map +1 -1
  151. package/dist/test/tile-stats.test.js +73 -34
  152. package/dist/test/tile-stats.test.js.map +1 -1
  153. package/dist/test/tiles/grid/account-tile.test.js +25 -25
  154. package/dist/test/tiles/grid/account-tile.test.js.map +1 -1
  155. package/dist/test/tiles/grid/collection-tile.test.js +13 -19
  156. package/dist/test/tiles/grid/collection-tile.test.js.map +1 -1
  157. package/dist/test/tiles/grid/item-tile.test.js +141 -168
  158. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  159. package/dist/test/tiles/grid/search-tile.test.js +9 -13
  160. package/dist/test/tiles/grid/search-tile.test.js.map +1 -1
  161. package/dist/test/tiles/hover/hover-pane-controller.test.js +50 -62
  162. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
  163. package/dist/test/tiles/hover/tile-hover-pane.test.js +12 -16
  164. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +1 -1
  165. package/dist/test/tiles/list/tile-list-compact.test.js +104 -118
  166. package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
  167. package/dist/test/tiles/list/tile-list.test.js +202 -231
  168. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  169. package/dist/test/tiles/tile-dispatcher.test.js +97 -110
  170. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  171. package/dist/test/tiles/tile-mediatype-icon.test.js +12 -24
  172. package/dist/test/tiles/tile-mediatype-icon.test.js.map +1 -1
  173. package/dist/test/utils/format-date.test.js.map +1 -1
  174. package/index.html +1 -1
  175. package/package.json +5 -3
  176. package/src/collection-browser.ts +3060 -3030
  177. package/src/collection-facets/models.ts +10 -10
  178. package/src/collection-facets/more-facets-content.ts +639 -639
  179. package/src/collection-facets.ts +1 -1
  180. package/src/combo-box/caret-closed.ts +5 -11
  181. package/src/combo-box/caret-open.ts +5 -11
  182. package/src/combo-box/clear.ts +11 -0
  183. package/src/combo-box/ia-combo-box.ts +1288 -1180
  184. package/src/combo-box/models.ts +31 -1
  185. package/src/manage/manage-bar.ts +247 -247
  186. package/src/restoration-state-handler.ts +5 -1
  187. package/src/tiles/base-tile-component.ts +65 -65
  188. package/src/tiles/grid/account-tile.ts +113 -113
  189. package/src/tiles/grid/collection-tile.ts +163 -163
  190. package/src/tiles/grid/item-tile.ts +340 -340
  191. package/src/tiles/grid/search-tile.ts +90 -90
  192. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -130
  193. package/src/tiles/hover/hover-pane-controller.ts +613 -613
  194. package/src/tiles/hover/tile-hover-pane.ts +184 -184
  195. package/src/tiles/list/tile-list-compact.ts +239 -239
  196. package/src/tiles/list/tile-list.ts +700 -700
  197. package/src/tiles/tile-dispatcher.ts +517 -517
  198. package/src/utils/format-date.ts +62 -62
  199. package/test/collection-facets/facet-row.test.ts +375 -375
  200. package/test/collection-facets.test.ts +928 -928
  201. package/test/tiles/grid/item-tile.test.ts +520 -520
  202. package/test/tiles/hover/hover-pane-controller.test.ts +418 -418
  203. package/test/tiles/list/tile-list-compact.test.ts +282 -282
  204. package/test/tiles/list/tile-list.test.ts +552 -552
  205. package/test/tiles/tile-dispatcher.test.ts +283 -283
  206. package/test/utils/format-date.test.ts +89 -89
  207. package/tsconfig.json +8 -3
  208. package/vite.config.ts +29 -22
@@ -10,11 +10,12 @@ import { RestorationStateHandler, } from './restoration-state-handler';
10
10
  import { CollectionBrowserDataSource } from './data-source/collection-browser-data-source';
11
11
  import { FACETLESS_PAGE_ELEMENTS } from './data-source/models';
12
12
  import { analyticsActions, analyticsCategories, } from './utils/analytics-events';
13
+ import { updateSelectedFacetBucket } from './utils/facet-utils';
13
14
  import chevronIcon from './assets/img/icons/chevron';
14
15
  import { srOnlyStyle } from './styles/sr-only';
15
16
  import { sha1 } from './utils/sha1';
16
17
  import { log } from './utils/log';
17
- import { updateSelectedFacetBucket } from './utils/facet-utils';
18
+ import '@internetarchive/elements/ia-combo-box/ia-combo-box';
18
19
  import './empty-placeholder';
19
20
  import './tiles/tile-dispatcher';
20
21
  import './tiles/collection-browser-loading-tile';
@@ -23,7 +24,6 @@ import './manage/manage-bar';
23
24
  import './collection-facets';
24
25
  import './circular-activity-indicator';
25
26
  import './collection-facets/smart-facets/smart-facet-bar';
26
- import './combo-box/ia-combo-box';
27
27
  let CollectionBrowser = class CollectionBrowser extends LitElement {
28
28
  constructor() {
29
29
  super();
@@ -165,6 +165,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
165
165
  this.tileBlurOverrideState = 'no-override';
166
166
  this.collapsibleFacetsVisible = false;
167
167
  this.placeholderType = null;
168
+ this.selectedTVNetwork = undefined;
169
+ this.selectedTVShow = undefined;
170
+ this.tvMapsPopulated = false;
171
+ this.loadingNetworks = false;
172
+ this.loadingShows = false;
168
173
  /** Whether layout size analytics have been sent already. */
169
174
  this.layoutSizeAnalyticsSent = false;
170
175
  /**
@@ -184,28 +189,22 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
184
189
  */
185
190
  this.dataSourceInstallInProgress = false;
186
191
  this.placeholderCellTemplate = html `<collection-browser-loading-tile></collection-browser-loading-tile>`;
187
- this.selectedTVNetwork = undefined;
188
- this.selectedTVShow = undefined;
189
- this.tvMapsPopulated = false;
190
- this.loadingNetworks = false;
191
- this.loadingShows = false;
192
192
  /**
193
193
  * Updates the height of the left column according to its position on the page.
194
194
  * Arrow function ensures proper `this` binding.
195
195
  */
196
196
  this.updateLeftColumnHeight = () => {
197
- var _a, _b, _c, _d, _e;
198
197
  if (this.mobileView) {
199
- (_b = (_a = this.leftColumn) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.removeProperty('height');
198
+ this.leftColumn?.style?.removeProperty('height');
200
199
  }
201
200
  else {
202
- const clientTop = (_c = this.leftColumn) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect().top;
203
- const columnHeight = window.innerHeight - (clientTop !== null && clientTop !== void 0 ? clientTop : 0);
201
+ const clientTop = this.leftColumn?.getBoundingClientRect().top;
202
+ const columnHeight = window.innerHeight - (clientTop ?? 0);
204
203
  const cssHeightValue = clientTop === 0
205
204
  ? null
206
205
  : // Subtract off the column's top padding so that it doesn't overflow
207
206
  `calc(${columnHeight}px - var(--leftColumnPaddingTop, 2rem))`;
208
- (_e = (_d = this.leftColumn) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.setProperty('height', cssHeightValue);
207
+ this.leftColumn?.style?.setProperty('height', cssHeightValue);
209
208
  }
210
209
  };
211
210
  /**
@@ -214,9 +213,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
214
213
  * Arrow function ensures proper `this` binding.
215
214
  */
216
215
  this.updateFacetFadeOut = (entries) => {
217
- var _a, _b;
218
- const fadeElmt = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('facets-bottom-fade');
219
- fadeElmt === null || fadeElmt === void 0 ? void 0 : fadeElmt.classList.toggle('hidden', (_b = entries === null || entries === void 0 ? void 0 : entries[0]) === null || _b === void 0 ? void 0 : _b.isIntersecting);
216
+ const fadeElmt = this.shadowRoot?.getElementById('facets-bottom-fade');
217
+ fadeElmt?.classList.toggle('hidden', entries?.[0]?.isIntersecting);
220
218
  };
221
219
  // we only want to scroll on the very first query change
222
220
  // so this keeps track of whether we've already set the initial query
@@ -253,7 +251,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
253
251
  */
254
252
  async getSessionId() {
255
253
  try {
256
- const storedSessionId = sessionStorage === null || sessionStorage === void 0 ? void 0 : sessionStorage.getItem('cb-session');
254
+ const storedSessionId = sessionStorage?.getItem('cb-session');
257
255
  if (storedSessionId) {
258
256
  return storedSessionId;
259
257
  }
@@ -264,10 +262,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
264
262
  }
265
263
  this.sessionIdGenPromise = sha1(Math.random().toString());
266
264
  const newSessionId = await this.sessionIdGenPromise;
267
- sessionStorage === null || sessionStorage === void 0 ? void 0 : sessionStorage.setItem('cb-session', newSessionId);
265
+ sessionStorage?.setItem('cb-session', newSessionId);
268
266
  return newSessionId;
269
267
  }
270
- catch (_a) {
268
+ catch {
271
269
  // Either we can't generate the hash or we're restricted from accessing sessionStorage
272
270
  return '';
273
271
  }
@@ -378,32 +376,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
378
376
  this.setPlaceholderType();
379
377
  }
380
378
  render() {
381
- return html `
379
+ return html `
382
380
  ${this.showSmartFacetBar && this.placeholderType === null
383
- ? html `<smart-facet-bar
384
- .query=${this.baseQuery}
385
- .aggregations=${this.dataSource.aggregations}
386
- .selectedFacets=${this.selectedFacets}
387
- .collectionTitles=${this.dataSource.collectionTitles}
388
- .filterToggleShown=${!this.mobileView}
389
- .filterToggleActive=${this.facetPaneVisible}
390
- .label=${this.smartFacetBarLabel}
391
- @facetsChanged=${this.facetsChanged}
381
+ ? html `<smart-facet-bar
382
+ .query=${this.baseQuery}
383
+ .aggregations=${this.dataSource.aggregations}
384
+ .selectedFacets=${this.selectedFacets}
385
+ .collectionTitles=${this.dataSource.collectionTitles}
386
+ .filterToggleShown=${!this.mobileView}
387
+ .filterToggleActive=${this.facetPaneVisible}
388
+ .label=${this.smartFacetBarLabel}
389
+ @facetsChanged=${this.facetsChanged}
392
390
  @filtersToggled=${() => {
393
391
  this.facetPaneVisible = !this.facetPaneVisible;
394
392
  this.emitFacetPaneVisibilityChanged();
395
- }}
393
+ }}
396
394
  ></smart-facet-bar>`
397
- : nothing}
398
-
399
- <div
400
- id="content-container"
401
- class=${this.mobileView ? 'mobile' : 'desktop'}
402
- >
395
+ : nothing}
396
+
397
+ <div
398
+ id="content-container"
399
+ class=${this.mobileView ? 'mobile' : 'desktop'}
400
+ >
403
401
  ${this.placeholderType
404
402
  ? this.emptyPlaceholderTemplate
405
- : this.collectionBrowserTemplate}
406
- </div>
403
+ : this.collectionBrowserTemplate}
404
+ </div>
407
405
  `;
408
406
  }
409
407
  /**
@@ -415,10 +413,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
415
413
  * - An error occurred on the most recent search attempt
416
414
  */
417
415
  setPlaceholderType() {
418
- var _a, _b;
419
416
  const isInitialized = this.dataSource.queryInitialized;
420
- const hasQuery = !!((_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim());
421
- const hasIdentifiers = !!((_b = this.identifiers) === null || _b === void 0 ? void 0 : _b.length);
417
+ const hasQuery = !!this.baseQuery?.trim();
418
+ const hasIdentifiers = !!this.identifiers?.length;
422
419
  const isCollection = !!this.withinCollection;
423
420
  const isProfile = !!this.withinProfile;
424
421
  const isSearchResults = !isCollection && !isProfile;
@@ -448,24 +445,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
448
445
  * Template for the placeholder content to show when no results are available.
449
446
  */
450
447
  get emptyPlaceholderTemplate() {
451
- var _a;
452
- return html `
453
- <empty-placeholder
454
- .placeholderType=${this.placeholderType}
455
- ?isMobileView=${this.mobileView}
456
- ?isCollection=${!!this.withinCollection}
457
- .detailMessage=${(_a = this.dataSource.queryErrorMessage) !== null && _a !== void 0 ? _a : ''}
458
- .baseNavigationUrl=${this.baseNavigationUrl}
459
- ></empty-placeholder>
448
+ return html `
449
+ <empty-placeholder
450
+ .placeholderType=${this.placeholderType}
451
+ ?isMobileView=${this.mobileView}
452
+ ?isCollection=${!!this.withinCollection}
453
+ .detailMessage=${this.dataSource.queryErrorMessage ?? ''}
454
+ .baseNavigationUrl=${this.baseNavigationUrl}
455
+ ></empty-placeholder>
460
456
  `;
461
457
  }
462
458
  /**
463
459
  * Top-level template for rendering the left (facets) and right (results) columns.
464
460
  */
465
461
  get collectionBrowserTemplate() {
466
- return html `
467
- <div id="left-column-scroll-sentinel"></div>
468
- ${this.leftColumnTemplate} ${this.rightColumnTemplate}
462
+ return html `
463
+ <div id="left-column-scroll-sentinel"></div>
464
+ ${this.leftColumnTemplate} ${this.rightColumnTemplate}
469
465
  `;
470
466
  }
471
467
  /**
@@ -484,33 +480,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
484
480
  * accordion-style facets.
485
481
  */
486
482
  get mobileLeftColumnTemplate() {
487
- return html `
488
- <div
489
- id="left-column"
490
- class="column${this.isResizeToMobile ? ' preload' : ''}"
491
- >
492
- ${this.facetTopViewSlot} ${this.resultsCountTemplate}
493
- <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
494
- </div>
483
+ return html `
484
+ <div
485
+ id="left-column"
486
+ class="column${this.isResizeToMobile ? ' preload' : ''}"
487
+ >
488
+ ${this.facetTopViewSlot} ${this.resultsCountTemplate}
489
+ <div id="facets-header-container">${this.mobileFacetsTemplate}</div>
490
+ </div>
495
491
  `;
496
492
  }
497
493
  /**
498
494
  * Template for the desktop version of the left column, displaying the facets sidebar.
499
495
  */
500
496
  get desktopLeftColumnTemplate() {
501
- return html `
502
- <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
503
- ${this.facetTopViewSlot}
504
- <div id="facets-header-container">
505
- <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
506
- ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
507
- </div>
508
- <div id="facets-container" aria-labelledby="facets-header">
509
- ${this.facetsTemplate}
510
- <div id="facets-scroll-sentinel"></div>
511
- </div>
512
- <div id="facets-bottom-fade"></div>
513
- </div>
497
+ return html `
498
+ <div id="left-column" class="column" ?hidden=${!this.facetPaneVisible}>
499
+ ${this.facetTopViewSlot}
500
+ <div id="facets-header-container">
501
+ <h2 id="facets-header" class="sr-only">${msg('Filters')}</h2>
502
+ ${this.resultsCountTemplate} ${this.clearFiltersBtnTemplate(false)}
503
+ </div>
504
+ <div id="facets-container" aria-labelledby="facets-header">
505
+ ${this.facetsTemplate}
506
+ <div id="facets-scroll-sentinel"></div>
507
+ </div>
508
+ <div id="facets-bottom-fade"></div>
509
+ </div>
514
510
  `;
515
511
  }
516
512
  /**
@@ -518,8 +514,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
518
514
  * - mainly used to render userlists
519
515
  */
520
516
  get facetTopViewSlot() {
521
- return html `<div id="facet-top-view">
522
- <slot name="facet-top-slot"></slot>
517
+ return html `<div id="facet-top-view">
518
+ <slot name="facet-top-slot"></slot>
523
519
  </div>`;
524
520
  }
525
521
  /**
@@ -527,22 +523,22 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
527
523
  * Changes to the "Searching..." label if the search results are still loading.
528
524
  */
529
525
  get resultsCountTemplate() {
530
- var _a;
531
526
  if (this.suppressResultCount)
532
527
  return nothing;
533
528
  const shouldShowSearching = this.searchResultsLoading || this.totalResults === undefined;
534
- const resultsCount = (_a = this.totalResults) === null || _a === void 0 ? void 0 : _a.toLocaleString();
529
+ const classes = classMap({ filtered: this.hasActiveFilters });
530
+ const resultsCount = this.totalResults?.toLocaleString();
535
531
  const resultsLabel = this.totalResults === 1 ? 'Result' : 'Results';
536
532
  // Added data-testid for Playwright testing
537
- return html `
538
- <div id="results-total" data-testid="results-total">
539
- <span id="big-results-count">
540
- ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
541
- </span>
542
- <span id="big-results-label">
543
- ${shouldShowSearching ? nothing : resultsLabel}
544
- </span>
545
- </div>
533
+ return html `
534
+ <div id="results-total" class=${classes} data-testid="results-total">
535
+ <span id="big-results-count">
536
+ ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
537
+ </span>
538
+ <span id="big-results-label">
539
+ ${shouldShowSearching ? nothing : resultsLabel}
540
+ </span>
541
+ </div>
546
542
  `;
547
543
  }
548
544
  /**
@@ -555,45 +551,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
555
551
  'full-width': !this.facetPaneVisible,
556
552
  'smart-results-spacing': !!this.showSmartResults,
557
553
  });
558
- return html `
559
- <div id="right-column" class=${rightColumnClasses}>
554
+ return html `
555
+ <div id="right-column" class=${rightColumnClasses}>
560
556
  ${this.showSmartResults
561
557
  ? html `<slot name="smart-results"></slot>`
562
- : nothing}
563
- <section id="results">
564
- <h2 class="results-section-heading">
565
- <slot name="results-heading"></slot>
566
- </h2>
567
- <div id="cb-top-view">
568
- <slot name="cb-top-slot"></slot>
569
- </div>
558
+ : nothing}
559
+ <section id="results">
560
+ <h2 class="results-section-heading">
561
+ <slot name="results-heading"></slot>
562
+ </h2>
563
+ <div id="cb-top-view">
564
+ <slot name="cb-top-slot"></slot>
565
+ </div>
570
566
  ${this.isManageView
571
567
  ? this.manageBarTemplate
572
- : this.sortFilterBarTemplate}
573
- <slot name="cb-results"></slot>
568
+ : this.sortFilterBarTemplate}
569
+ <slot name="cb-results"></slot>
574
570
  ${this.displayMode === `list-compact` && this.totalResults
575
571
  ? this.listHeaderTemplate
576
- : nothing}
577
- ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
578
- </section>
579
- </div>
572
+ : nothing}
573
+ ${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
574
+ </section>
575
+ </div>
580
576
  `;
581
577
  }
582
578
  /**
583
579
  * Template for the infinite scroller widget that contains the result tiles.
584
580
  */
585
581
  get infiniteScrollerTemplate() {
586
- return html `<infinite-scroller
587
- class=${this.infiniteScrollerClasses}
588
- itemCount=${this.placeholderType ? 0 : nothing}
589
- ariaLandmarkLabel="Search results"
590
- .cellProvider=${this}
591
- .placeholderCellTemplate=${this.placeholderCellTemplate}
592
- @scrollThresholdReached=${this.scrollThresholdReached}
593
- @visibleCellsChanged=${this.visibleCellsChanged}
582
+ return html `<infinite-scroller
583
+ class=${this.infiniteScrollerClasses}
584
+ itemCount=${this.placeholderType ? 0 : nothing}
585
+ ariaLandmarkLabel="Search results"
586
+ .cellProvider=${this}
587
+ .placeholderCellTemplate=${this.placeholderCellTemplate}
588
+ @scrollThresholdReached=${this.scrollThresholdReached}
589
+ @visibleCellsChanged=${this.visibleCellsChanged}
594
590
  >${this.displayMode === 'grid'
595
591
  ? html `<slot name="result-last-tile" slot="result-last-tile"></slot>`
596
- : nothing}
592
+ : nothing}
597
593
  </infinite-scroller>`;
598
594
  }
599
595
  /**
@@ -601,9 +597,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
601
597
  * given the current display mode & placeholder case.
602
598
  */
603
599
  get infiniteScrollerClasses() {
604
- var _a;
605
600
  return classMap({
606
- [(_a = this.displayMode) !== null && _a !== void 0 ? _a : '']: !!this.displayMode,
601
+ [this.displayMode ?? '']: !!this.displayMode,
607
602
  hidden: !!this.placeholderType,
608
603
  });
609
604
  }
@@ -611,7 +606,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
611
606
  * Template for the sort & filtering bar that appears atop the search results.
612
607
  */
613
608
  get sortFilterBarTemplate() {
614
- var _a;
615
609
  if (this.suppressSortBar)
616
610
  return nothing;
617
611
  // Determine the set of sortable fields that should be shown in the sort bar
@@ -619,7 +613,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
619
613
  let defaultDateSort = SortField.date;
620
614
  let sortFieldAvailability = defaultSortAvailability;
621
615
  // We adjust the sort options for a couple of special cases...
622
- if ((_a = this.withinCollection) === null || _a === void 0 ? void 0 : _a.startsWith('fav-')) {
616
+ if (this.withinCollection?.startsWith('fav-')) {
623
617
  // When viewing a fav- collection, we include the Date Favorited option and show
624
618
  // it as the default in the date dropdown.
625
619
  defaultDateSort = SortField.datefavorited;
@@ -634,32 +628,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
634
628
  }
635
629
  // We only show relevance sort if a search query is currently defined
636
630
  sortFieldAvailability.relevance = this.isRelevanceSortAvailable;
637
- return html `
638
- <sort-filter-bar
639
- .defaultSortField=${this.defaultSortField}
640
- .defaultSortDirection=${this.defaultSortDirection}
641
- .defaultViewSort=${defaultViewSort}
642
- .defaultDateSort=${defaultDateSort}
643
- .selectedSort=${this.selectedSort}
644
- .sortDirection=${this.sortDirection}
645
- .sortFieldAvailability=${sortFieldAvailability}
646
- .displayMode=${this.displayMode}
647
- .selectedTitleFilter=${this.selectedTitleFilter}
648
- .selectedCreatorFilter=${this.selectedCreatorFilter}
649
- .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
650
- .resizeObserver=${this.resizeObserver}
651
- .enableSortOptionsSlot=${this.enableSortOptionsSlot}
652
- .suppressDisplayModes=${this.suppressDisplayModes}
653
- @sortChanged=${this.userChangedSort}
654
- @displayModeChanged=${this.displayModeChanged}
655
- @titleLetterChanged=${this.titleLetterSelected}
656
- @creatorLetterChanged=${this.creatorLetterSelected}
657
- >
658
- ${this.tileBlurCheckboxTemplate}
659
- <slot name="sort-options-left" slot="sort-options-left"></slot>
660
- <slot name="sort-options" slot="sort-options"></slot>
661
- <slot name="sort-options-right" slot="sort-options-right"></slot>
662
- </sort-filter-bar>
631
+ return html `
632
+ <sort-filter-bar
633
+ .defaultSortField=${this.defaultSortField}
634
+ .defaultSortDirection=${this.defaultSortDirection}
635
+ .defaultViewSort=${defaultViewSort}
636
+ .defaultDateSort=${defaultDateSort}
637
+ .selectedSort=${this.selectedSort}
638
+ .sortDirection=${this.sortDirection}
639
+ .sortFieldAvailability=${sortFieldAvailability}
640
+ .displayMode=${this.displayMode}
641
+ .selectedTitleFilter=${this.selectedTitleFilter}
642
+ .selectedCreatorFilter=${this.selectedCreatorFilter}
643
+ .prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
644
+ .resizeObserver=${this.resizeObserver}
645
+ .enableSortOptionsSlot=${this.enableSortOptionsSlot}
646
+ .suppressDisplayModes=${this.suppressDisplayModes}
647
+ @sortChanged=${this.userChangedSort}
648
+ @displayModeChanged=${this.displayModeChanged}
649
+ @titleLetterChanged=${this.titleLetterSelected}
650
+ @creatorLetterChanged=${this.creatorLetterSelected}
651
+ >
652
+ ${this.tileBlurCheckboxTemplate}
653
+ <slot name="sort-options-left" slot="sort-options-left"></slot>
654
+ <slot name="sort-options" slot="sort-options"></slot>
655
+ <slot name="sort-options-right" slot="sort-options-right"></slot>
656
+ </sort-filter-bar>
663
657
  `;
664
658
  }
665
659
  /**
@@ -667,24 +661,23 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
667
661
  * sensitive content in result tiles.
668
662
  */
669
663
  get tileBlurCheckboxTemplate() {
670
- var _a;
671
664
  // Only show the checkbox for @archive.org users
672
- if (!((_a = this.dataSource.sessionContext) === null || _a === void 0 ? void 0 : _a.is_archive_user))
665
+ if (!this.dataSource.sessionContext?.is_archive_user)
673
666
  return nothing;
674
- return html `
675
- <label
676
- id="tile-blur-label"
677
- for="tile-blur-check"
678
- slot="sort-options-right"
679
- >
680
- ${msg('Blurring')}
681
- <input
682
- id="tile-blur-check"
683
- type="checkbox"
684
- ?checked=${!this.shouldSuppressTileBlurring}
685
- @change=${this.tileBlurCheckboxChanged}
686
- />
687
- </label>
667
+ return html `
668
+ <label
669
+ id="tile-blur-label"
670
+ for="tile-blur-check"
671
+ slot="sort-options-right"
672
+ >
673
+ ${msg('Blurring')}
674
+ <input
675
+ id="tile-blur-check"
676
+ type="checkbox"
677
+ ?checked=${!this.shouldSuppressTileBlurring}
678
+ @change=${this.tileBlurCheckboxChanged}
679
+ />
680
+ </label>
688
681
  `;
689
682
  }
690
683
  /**
@@ -710,27 +703,27 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
710
703
  * showing the management view. This generally replaces the sort bar when present.
711
704
  */
712
705
  get manageBarTemplate() {
713
- return html `
714
- <manage-bar
715
- .label=${this.manageViewLabel}
716
- .modalManager=${this.modalManager}
717
- .selectedItems=${this.dataSource.checkedTileModels}
718
- .manageViewModalMsg=${this.manageViewModalMsg}
719
- showSelectAll
720
- showUnselectAll
721
- ?showItemManageButton=${this.pageContext === 'search'}
722
- ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
723
- @removeItems=${this.handleRemoveItems}
724
- @manageItems=${this.handleManageItems}
725
- @selectAll=${() => this.dataSource.checkAllTiles()}
726
- @unselectAll=${() => this.dataSource.uncheckAllTiles()}
706
+ return html `
707
+ <manage-bar
708
+ .label=${this.manageViewLabel}
709
+ .modalManager=${this.modalManager}
710
+ .selectedItems=${this.dataSource.checkedTileModels}
711
+ .manageViewModalMsg=${this.manageViewModalMsg}
712
+ showSelectAll
713
+ showUnselectAll
714
+ ?showItemManageButton=${this.pageContext === 'search'}
715
+ ?removeAllowed=${this.dataSource.checkedTileModels.length !== 0}
716
+ @removeItems=${this.handleRemoveItems}
717
+ @manageItems=${this.handleManageItems}
718
+ @selectAll=${() => this.dataSource.checkAllTiles()}
719
+ @unselectAll=${() => this.dataSource.uncheckAllTiles()}
727
720
  @cancel=${() => {
728
721
  this.isManageView = false;
729
722
  this.dataSource.uncheckAllTiles();
730
723
  if (this.searchResultsLoading)
731
724
  this.dataSource.resetPages();
732
- }}
733
- ></manage-bar>
725
+ }}
726
+ ></manage-bar>
734
727
  `;
735
728
  }
736
729
  /**
@@ -741,10 +734,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
741
734
  this.dispatchEvent(new CustomEvent('itemRemovalRequested', {
742
735
  detail: {
743
736
  items: this.dataSource.checkedTileModels.map(model => {
744
- var _a;
745
737
  // For favorited searches, we attach a search: prefix to differentiate it from an item
746
- const searchPrefix = (model === null || model === void 0 ? void 0 : model.mediatype) === 'search' ? 'search:' : '';
747
- const identifier = (_a = model === null || model === void 0 ? void 0 : model.identifier) !== null && _a !== void 0 ? _a : '';
738
+ const searchPrefix = model?.mediatype === 'search' ? 'search:' : '';
739
+ const identifier = model?.identifier ?? '';
748
740
  return `${searchPrefix}${identifier}`;
749
741
  }),
750
742
  },
@@ -756,27 +748,24 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
756
748
  handleManageItems() {
757
749
  this.dispatchEvent(new CustomEvent('itemManagerRequested', {
758
750
  detail: {
759
- items: this.dataSource.checkedTileModels.map(model => (model === null || model === void 0 ? void 0 : model.identifier) ? model.identifier : ''),
751
+ items: this.dataSource.checkedTileModels.map(model => model?.identifier ? model.identifier : ''),
760
752
  },
761
753
  }));
762
754
  }
763
755
  refreshSmartFacets() {
764
- var _a;
765
- (_a = this.smartFacetBar) === null || _a === void 0 ? void 0 : _a.refresh();
756
+ this.smartFacetBar?.refresh();
766
757
  }
767
758
  /**
768
759
  * Handler to show processing modal while removing item
769
760
  */
770
761
  showRemoveItemsProcessingModal() {
771
- var _a;
772
- (_a = this.manageBar) === null || _a === void 0 ? void 0 : _a.showRemoveItemsProcessingModal();
762
+ this.manageBar?.showRemoveItemsProcessingModal();
773
763
  }
774
764
  /**
775
765
  * Handler to show error modal when item removal failed
776
766
  */
777
767
  showRemoveItemsErrorModal() {
778
- var _a;
779
- (_a = this.manageBar) === null || _a === void 0 ? void 0 : _a.showRemoveItemsErrorModal();
768
+ this.manageBar?.showRemoveItemsErrorModal();
780
769
  }
781
770
  /**
782
771
  * Removes all tile models that are currently checked & adjusts the paging
@@ -789,10 +778,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
789
778
  * Handler for when the tile blurring checkbox state is toggled
790
779
  */
791
780
  tileBlurCheckboxChanged(e) {
792
- var _a;
793
781
  const { checked } = e.target;
794
782
  this.tileBlurOverrideState = checked ? 'on' : 'off';
795
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.refreshAllVisibleCells();
783
+ this.infiniteScroller?.refreshAllVisibleCells();
796
784
  }
797
785
  /**
798
786
  * Whether result tiles should have the default blurring of sensitive content suppressed.
@@ -807,8 +795,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
807
795
  }
808
796
  // Not overriding, so use the preference from session context
809
797
  const { sessionContext } = this.dataSource;
810
- const userPrefs = sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.pps_relevant_user_preferences;
811
- const blurringPref = userPrefs === null || userPrefs === void 0 ? void 0 : userPrefs.display__blur_moderated_content;
798
+ const userPrefs = sessionContext?.pps_relevant_user_preferences;
799
+ const blurringPref = userPrefs?.display__blur_moderated_content;
812
800
  // Only suppress blurring if the preference is disabled.
813
801
  // If enabled or missing, tile blurring remains on.
814
802
  return blurringPref === 'off';
@@ -817,11 +805,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
817
805
  * Handler for when the user changes the selected sort option or direction.
818
806
  */
819
807
  userChangedSort(e) {
820
- var _a;
821
808
  const { selectedSort, sortDirection } = e.detail;
822
809
  this.selectedSort = selectedSort;
823
810
  this.sortDirection = sortDirection;
824
- if (((_a = this.currentPage) !== null && _a !== void 0 ? _a : 1) > 1) {
811
+ if ((this.currentPage ?? 1) > 1) {
825
812
  this.goToPage(1);
826
813
  }
827
814
  this.currentPage = 1;
@@ -831,9 +818,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
831
818
  * @param prevSortDirection Which sort direction was previously set.
832
819
  */
833
820
  sendSortByAnalytics(prevSortDirection) {
834
- var _a;
835
821
  const directionCleared = prevSortDirection && !this.sortDirection;
836
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
822
+ this.analyticsHandler?.sendEvent({
837
823
  category: this.searchContext,
838
824
  action: analyticsActions.sortBy,
839
825
  label: `${this.selectedSort}${this.sortDirection || directionCleared ? `-${this.sortDirection}` : ''}`,
@@ -851,14 +837,13 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
851
837
  * An object representing the current sort field & direction.
852
838
  */
853
839
  get sortParam() {
854
- var _a;
855
840
  const sortOption = SORT_OPTIONS[this.selectedSort];
856
- if (!(sortOption === null || sortOption === void 0 ? void 0 : sortOption.handledBySearchService)) {
841
+ if (!sortOption?.handledBySearchService) {
857
842
  return null;
858
843
  }
859
844
  // If the sort option specified in the URL is unrecognized, we just use it as-is
860
845
  const urlSortParam = new URL(window.location.href).searchParams.get('sort');
861
- const sortField = (_a = sortOption.searchServiceKey) !== null && _a !== void 0 ? _a : urlSortParam === null || urlSortParam === void 0 ? void 0 : urlSortParam.replace(/^-/, '');
846
+ const sortField = sortOption.searchServiceKey ?? urlSortParam?.replace(/^-/, '');
862
847
  // If the sort direction is still null at this point, then we assume ascending
863
848
  // (i.e., it was unrecognized and had no directional flag)
864
849
  if (!this.sortDirection)
@@ -871,8 +856,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
871
856
  * An object representing the default sort field & direction, if none are explicitly set.
872
857
  */
873
858
  get defaultSortParam() {
874
- var _a;
875
- const direction = (_a = this.defaultSortDirection) !== null && _a !== void 0 ? _a : 'asc';
859
+ const direction = this.defaultSortDirection ?? 'asc';
876
860
  const field = SORT_OPTIONS[this.defaultSortField].searchServiceKey;
877
861
  if (!field)
878
862
  return null;
@@ -882,10 +866,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
882
866
  * Handler for when the display mode option is changed (grid/list/compact-list views).
883
867
  */
884
868
  displayModeChanged(e) {
885
- var _a;
886
869
  this.displayMode = e.detail.displayMode;
887
870
  if (this.displayMode) {
888
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
871
+ this.analyticsHandler?.sendEvent({
889
872
  category: this.searchContext,
890
873
  action: analyticsActions.displayMode,
891
874
  label: this.displayMode,
@@ -915,12 +898,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
915
898
  * labels: 'start-<ToLetter>' | 'clear-<FromLetter>' | '<FromLetter>-<ToLetter>'
916
899
  */
917
900
  sendFilterByTitleAnalytics(prevSelectedLetter) {
918
- var _a;
919
901
  if (!prevSelectedLetter && !this.selectedTitleFilter) {
920
902
  return;
921
903
  }
922
904
  const cleared = prevSelectedLetter && !this.selectedTitleFilter;
923
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
905
+ this.analyticsHandler?.sendEvent({
924
906
  category: this.searchContext,
925
907
  action: analyticsActions.filterByTitle,
926
908
  label: cleared
@@ -933,12 +915,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
933
915
  * labels: 'start-<ToLetter>' | 'clear-<FromLetter>' | '<FromLetter>-<ToLetter>'
934
916
  */
935
917
  sendFilterByCreatorAnalytics(prevSelectedLetter) {
936
- var _a;
937
918
  if (!prevSelectedLetter && !this.selectedCreatorFilter) {
938
919
  return;
939
920
  }
940
921
  const cleared = prevSelectedLetter && !this.selectedCreatorFilter;
941
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
922
+ this.analyticsHandler?.sendEvent({
942
923
  category: this.searchContext,
943
924
  action: analyticsActions.filterByCreator,
944
925
  label: cleared
@@ -968,25 +949,24 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
968
949
  if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
969
950
  return nothing;
970
951
  const toggleFacetsVisible = (e) => {
971
- var _a;
972
952
  const target = e.target;
973
953
  this.isResizeToMobile = false;
974
954
  this.collapsibleFacetsVisible = target.open;
975
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
955
+ this.analyticsHandler?.sendEvent({
976
956
  category: this.searchContext,
977
957
  action: analyticsActions.mobileFacetsToggled,
978
958
  label: target.open ? 'open' : 'closed',
979
959
  });
980
960
  };
981
- return html `
982
- <details id="mobile-filter-collapse" @toggle=${toggleFacetsVisible}>
983
- <summary>
984
- <span class="collapser-icon">${chevronIcon}</span>
985
- <h2>${msg('Filters')}</h2>
986
- ${this.clearFiltersBtnTemplate(true)}
987
- </summary>
988
- ${this.facetsTemplate}
989
- </details>
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>
990
970
  `;
991
971
  }
992
972
  async networksDropdownToggled() {
@@ -1006,10 +986,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1006
986
  this.tvMapsPopulated = true;
1007
987
  }
1008
988
  async networksDropdownChanged() {
1009
- var _a;
1010
989
  const previousNetwork = this.selectedTVNetwork;
1011
- const newNetwork = (_a = this.tvNetworksDropdown.selectedOption) === null || _a === void 0 ? void 0 : _a.text;
1012
- this.selectedTVNetwork = newNetwork !== null && newNetwork !== void 0 ? newNetwork : undefined;
990
+ const newNetwork = this.tvNetworksDropdown.selectedOption?.text;
991
+ this.selectedTVNetwork = newNetwork ?? undefined;
1013
992
  const entries = this.dataSource.tvChannelMaps.channelToNetwork.entries();
1014
993
  for (const [channel, network] of entries) {
1015
994
  if (network === previousNetwork) {
@@ -1032,10 +1011,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1032
1011
  }
1033
1012
  }
1034
1013
  async showsDropdownChanged() {
1035
- var _a;
1036
1014
  const previousShow = this.selectedTVShow;
1037
- const newShow = (_a = this.tvShowsDropdown.selectedOption) === null || _a === void 0 ? void 0 : _a.text;
1038
- this.selectedTVShow = newShow !== null && newShow !== void 0 ? newShow : undefined;
1015
+ const newShow = this.tvShowsDropdown.selectedOption?.text;
1016
+ this.selectedTVShow = newShow ?? undefined;
1039
1017
  // Remove any previously-applied shows filter
1040
1018
  if (previousShow !== undefined) {
1041
1019
  const removedBucket = {
@@ -1057,7 +1035,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1057
1035
  get tvDropdownFiltersTemplate() {
1058
1036
  if (this.searchType !== SearchType.TV)
1059
1037
  return nothing;
1060
- log('start filters template preprocess', Date.now());
1061
1038
  const { channelToNetwork, programToChannels } = this.dataSource.tvChannelMaps;
1062
1039
  const networks = channelToNetwork
1063
1040
  ? [...new Set(channelToNetwork.values())]
@@ -1067,44 +1044,45 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1067
1044
  showEntries = showEntries.filter(([, channels]) => Object.keys(channels).some(c => channelToNetwork.get(c) === this.selectedTVNetwork));
1068
1045
  }
1069
1046
  const shows = showEntries.map(([show]) => show);
1070
- log('end filters template preprocess', Date.now());
1071
- const loadingIndicator = html `
1072
- <img src="https://archive.org/images/loading.gif" />
1047
+ const loadingIndicator = html `
1048
+ <img src="https://archive.org/images/loading.gif" />
1073
1049
  `;
1074
- return html `
1075
- <div id="tv-filters" slot="facets-top">
1076
- <ia-combo-box
1077
- id="tv-networks"
1078
- class="tv-filter-dropdown"
1079
- placeholder="Filter by Network"
1080
- wrap-arrow-keys
1081
- sort
1082
- .options=${networks.map((n, i) => ({ id: `network-${i}`, text: n }))}
1083
- @toggle=${this.networksDropdownToggled}
1084
- @change=${this.networksDropdownChanged}
1085
- >
1086
- <span class="sr-only">${msg('Filter by Network')}</span>
1050
+ return html `
1051
+ <div id="tv-filters" slot="facets-top">
1052
+ <ia-combo-box
1053
+ id="tv-networks"
1054
+ class="tv-filter-dropdown"
1055
+ placeholder="Filter by Network"
1056
+ clearable
1057
+ wrap-arrow-keys
1058
+ sort
1059
+ .options=${networks.map((n, i) => ({ id: `network-${i}`, text: n }))}
1060
+ @toggle=${this.networksDropdownToggled}
1061
+ @change=${this.networksDropdownChanged}
1062
+ >
1063
+ <span slot="label" class="sr-only">${msg('Filter by Network')}</span>
1087
1064
  ${this.loadingNetworks
1088
1065
  ? html `<span slot="empty-options">${loadingIndicator}</span>`
1089
- : nothing}
1090
- </ia-combo-box>
1091
- <ia-combo-box
1092
- id="tv-shows"
1093
- class="tv-filter-dropdown"
1094
- placeholder="Filter by Show"
1095
- max-autocomplete-entries="500"
1096
- wrap-arrow-keys
1097
- sort
1098
- .options=${shows.map((s, i) => ({ id: `show-${i}`, text: s }))}
1099
- @toggle=${this.showsDropdownToggled}
1100
- @change=${this.showsDropdownChanged}
1101
- >
1102
- <span class="sr-only">${msg('Filter by Show')}</span>
1066
+ : nothing}
1067
+ </ia-combo-box>
1068
+ <ia-combo-box
1069
+ id="tv-shows"
1070
+ class="tv-filter-dropdown"
1071
+ placeholder="Filter by Show"
1072
+ max-autocomplete-entries="500"
1073
+ clearable
1074
+ wrap-arrow-keys
1075
+ sort
1076
+ .options=${shows.map((s, i) => ({ id: `show-${i}`, text: s }))}
1077
+ @toggle=${this.showsDropdownToggled}
1078
+ @change=${this.showsDropdownChanged}
1079
+ >
1080
+ <span slot="label" class="sr-only">${msg('Filter by Show')}</span>
1103
1081
  ${this.loadingShows
1104
1082
  ? html `<span slot="empty-options">${loadingIndicator}</span>`
1105
- : nothing}
1106
- </ia-combo-box>
1107
- </div>
1083
+ : nothing}
1084
+ </ia-combo-box>
1085
+ </div>
1108
1086
  `;
1109
1087
  }
1110
1088
  /**
@@ -1114,10 +1092,10 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1114
1092
  if (FACETLESS_PAGE_ELEMENTS.includes(this.profileElement))
1115
1093
  return nothing;
1116
1094
  if (this.facetLoadStrategy === 'off') {
1117
- return html `
1118
- <p class="facets-message">
1119
- ${msg('Facets are temporarily unavailable.')}
1120
- </p>
1095
+ return html `
1096
+ <p class="facets-message">
1097
+ ${msg('Facets are temporarily unavailable.')}
1098
+ </p>
1121
1099
  `;
1122
1100
  }
1123
1101
  // We switch to TV facet ordering & date picker if we are in a TV collection or showing TV search results
@@ -1126,46 +1104,46 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1126
1104
  const facetDisplayOrder = shouldUseTvInterface
1127
1105
  ? tvFacetDisplayOrder
1128
1106
  : defaultFacetDisplayOrder;
1129
- const facets = html `
1130
- <collection-facets
1131
- .collectionPagePath=${this.collectionPagePath}
1132
- .parentCollections=${this.dataSource.parentCollections}
1133
- .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
1134
- .searchService=${this.searchService}
1135
- .featureFeedbackService=${this.featureFeedbackService}
1136
- .recaptchaManager=${this.recaptchaManager}
1137
- .resizeObserver=${this.resizeObserver}
1138
- .searchType=${this.searchType}
1139
- .aggregations=${this.dataSource.aggregations}
1140
- .histogramAggregation=${this.dataSource.histogramAggregation}
1141
- .minSelectedDate=${this.minSelectedDate}
1142
- .maxSelectedDate=${this.maxSelectedDate}
1143
- .selectedFacets=${this.selectedFacets}
1144
- .baseNavigationUrl=${this.baseNavigationUrl}
1145
- .collectionTitles=${this.dataSource.collectionTitles}
1146
- .tvChannelAliases=${this.dataSource.tvChannelAliases}
1147
- .showHistogramDatePicker=${this.showHistogramDatePicker}
1148
- .allowExpandingDatePicker=${!this.mobileView}
1149
- .allowDatePickerMonths=${shouldUseTvInterface}
1150
- .contentWidth=${this.contentWidth}
1151
- .query=${this.baseQuery}
1152
- .identifiers=${this.identifiers}
1153
- .filterMap=${this.dataSource.filterMap}
1154
- .isManageView=${this.isManageView}
1155
- .modalManager=${this.modalManager}
1156
- .analyticsHandler=${this.analyticsHandler}
1157
- .facetDisplayOrder=${facetDisplayOrder}
1158
- .isTvSearch=${shouldUseTvInterface}
1159
- ?collapsableFacets=${this.mobileView}
1160
- ?facetsLoading=${this.facetsLoading}
1161
- ?histogramAggregationLoading=${this.facetsLoading}
1162
- ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1163
- @facetClick=${this.facetClickHandler}
1164
- @facetsChanged=${this.facetsChanged}
1165
- @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1166
- >
1167
- ${this.tvDropdownFiltersTemplate}
1168
- </collection-facets>
1107
+ const facets = html `
1108
+ <collection-facets
1109
+ .collectionPagePath=${this.collectionPagePath}
1110
+ .parentCollections=${this.dataSource.parentCollections}
1111
+ .pageSpecifierParams=${this.dataSource.pageSpecifierParams}
1112
+ .searchService=${this.searchService}
1113
+ .featureFeedbackService=${this.featureFeedbackService}
1114
+ .recaptchaManager=${this.recaptchaManager}
1115
+ .resizeObserver=${this.resizeObserver}
1116
+ .searchType=${this.searchType}
1117
+ .aggregations=${this.dataSource.aggregations}
1118
+ .histogramAggregation=${this.dataSource.histogramAggregation}
1119
+ .minSelectedDate=${this.minSelectedDate}
1120
+ .maxSelectedDate=${this.maxSelectedDate}
1121
+ .selectedFacets=${this.selectedFacets}
1122
+ .baseNavigationUrl=${this.baseNavigationUrl}
1123
+ .collectionTitles=${this.dataSource.collectionTitles}
1124
+ .tvChannelAliases=${this.dataSource.tvChannelAliases}
1125
+ .showHistogramDatePicker=${this.showHistogramDatePicker}
1126
+ .allowExpandingDatePicker=${!this.mobileView}
1127
+ .allowDatePickerMonths=${shouldUseTvInterface}
1128
+ .contentWidth=${this.contentWidth}
1129
+ .query=${this.baseQuery}
1130
+ .identifiers=${this.identifiers}
1131
+ .filterMap=${this.dataSource.filterMap}
1132
+ .isManageView=${this.isManageView}
1133
+ .modalManager=${this.modalManager}
1134
+ .analyticsHandler=${this.analyticsHandler}
1135
+ .facetDisplayOrder=${facetDisplayOrder}
1136
+ .isTvSearch=${shouldUseTvInterface}
1137
+ ?collapsableFacets=${this.mobileView}
1138
+ ?facetsLoading=${this.facetsLoading}
1139
+ ?histogramAggregationLoading=${this.facetsLoading}
1140
+ ?suppressMediatypeFacets=${this.suppressMediatypeFacets}
1141
+ @facetClick=${this.facetClickHandler}
1142
+ @facetsChanged=${this.facetsChanged}
1143
+ @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}
1144
+ >
1145
+ ${this.tvDropdownFiltersTemplate}
1146
+ </collection-facets>
1169
1147
  `;
1170
1148
  // If we are using one of the opt-in facet load strategies, we may need to wrap the
1171
1149
  // desktop view facets in a <details> widget so that patrons can opt into loading them.
@@ -1173,20 +1151,20 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1173
1151
  const showDesktopOptInWidget = this.facetLoadStrategy === 'opt-in' ||
1174
1152
  (this.facetLoadStrategy === 'opt-in-or-login' && !this.loggedIn);
1175
1153
  if (showDesktopOptInWidget && !this.mobileView) {
1176
- return html `
1177
- <details
1178
- class="desktop-facets-dropdown"
1154
+ return html `
1155
+ <details
1156
+ class="desktop-facets-dropdown"
1179
1157
  @toggle=${(e) => {
1180
1158
  const target = e.target;
1181
1159
  this.collapsibleFacetsVisible = target.open;
1182
- }}
1183
- >
1184
- <summary>
1185
- <span class="collapser-icon">${chevronIcon}</span>
1186
- <h2>${msg('Filters')}</h2>
1187
- </summary>
1188
- ${facets}
1189
- </details>
1160
+ }}
1161
+ >
1162
+ <summary>
1163
+ <span class="collapser-icon">${chevronIcon}</span>
1164
+ <h2>${msg('Filters')}</h2>
1165
+ </summary>
1166
+ ${facets}
1167
+ </details>
1190
1168
  `;
1191
1169
  }
1192
1170
  // Otherwise, just render the facets component bare
@@ -1206,44 +1184,43 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1206
1184
  mobile,
1207
1185
  });
1208
1186
  const buttonText = mobile ? 'Clear all' : 'Clear all filters';
1209
- return html `
1210
- <div class="clear-filters-btn-row">
1187
+ return html `
1188
+ <div class="clear-filters-btn-row">
1211
1189
  ${mobile
1212
1190
  ? html `<span class="clear-filters-btn-separator">&nbsp;</span>`
1213
- : nothing}
1214
- <button class=${buttonClasses} @click=${this.clearFilters}>
1215
- ${buttonText}
1216
- </button>
1217
- </div>
1191
+ : nothing}
1192
+ <button class=${buttonClasses} @click=${this.clearFilters}>
1193
+ ${buttonText}
1194
+ </button>
1195
+ </div>
1218
1196
  `;
1219
1197
  }
1220
1198
  /**
1221
1199
  * Template for the table header content that appears atop the compact list view.
1222
1200
  */
1223
1201
  get listHeaderTemplate() {
1224
- return html `
1225
- <div id="list-header">
1226
- <tile-dispatcher
1227
- .tileDisplayMode=${'list-header'}
1228
- .resizeObserver=${this.resizeObserver}
1229
- .sortParam=${this.sortParam}
1230
- .defaultSortParam=${this.defaultSortParam}
1231
- .mobileBreakpoint=${this.mobileBreakpoint}
1232
- .loggedIn=${this.loggedIn}
1233
- .suppressBlurring=${this.shouldSuppressTileBlurring}
1234
- >
1235
- </tile-dispatcher>
1236
- </div>
1202
+ return html `
1203
+ <div id="list-header">
1204
+ <tile-dispatcher
1205
+ .tileDisplayMode=${'list-header'}
1206
+ .resizeObserver=${this.resizeObserver}
1207
+ .sortParam=${this.sortParam}
1208
+ .defaultSortParam=${this.defaultSortParam}
1209
+ .mobileBreakpoint=${this.mobileBreakpoint}
1210
+ .loggedIn=${this.loggedIn}
1211
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1212
+ >
1213
+ </tile-dispatcher>
1214
+ </div>
1237
1215
  `;
1238
1216
  }
1239
1217
  /**
1240
1218
  * Handler for when the date picker's date range is changed.
1241
1219
  */
1242
1220
  histogramDateRangeUpdated(e) {
1243
- var _a;
1244
1221
  const { minDate, maxDate } = e.detail;
1245
1222
  [this.minSelectedDate, this.maxSelectedDate] = [minDate, maxDate];
1246
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
1223
+ this.analyticsHandler?.sendEvent({
1247
1224
  category: this.searchContext,
1248
1225
  action: analyticsActions.histogramChanged,
1249
1226
  label: this.dateRangeQueryClause,
@@ -1280,7 +1257,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1280
1257
  * represent, such as the search query, sort option, and any filters applied.
1281
1258
  */
1282
1259
  async installDataSourceAndQueryState(dataSource, queryState) {
1283
- var _a, _b;
1284
1260
  log('Installing data source & query state in CB:', dataSource, queryState);
1285
1261
  if (this.dataSource)
1286
1262
  this.removeController(this.dataSource);
@@ -1290,11 +1266,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1290
1266
  this.profileElement = queryState.profileElement;
1291
1267
  this.searchType = queryState.searchType;
1292
1268
  this.selectedFacets =
1293
- (_a = queryState.selectedFacets) !== null && _a !== void 0 ? _a : getDefaultSelectedFacets();
1269
+ queryState.selectedFacets ?? getDefaultSelectedFacets();
1294
1270
  this.internalFilters = queryState.internalFilters;
1295
1271
  this.minSelectedDate = queryState.minSelectedDate;
1296
1272
  this.maxSelectedDate = queryState.maxSelectedDate;
1297
- this.selectedSort = (_b = queryState.selectedSort) !== null && _b !== void 0 ? _b : SortField.default;
1273
+ this.selectedSort = queryState.selectedSort ?? SortField.default;
1298
1274
  this.sortDirection = queryState.sortDirection;
1299
1275
  this.selectedTitleFilter = queryState.selectedTitleFilter;
1300
1276
  this.selectedCreatorFilter = queryState.selectedCreatorFilter;
@@ -1341,7 +1317,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1341
1317
  }
1342
1318
  }
1343
1319
  updated(changed) {
1344
- var _a, _b, _c;
1345
1320
  if (changed.has('placeholderType') && this.placeholderType === null) {
1346
1321
  if (!this.leftColIntersectionObserver) {
1347
1322
  this.setupLeftColumnScrollListeners();
@@ -1358,7 +1333,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1358
1333
  changed.has('baseNavigationUrl') ||
1359
1334
  changed.has('baseImageUrl') ||
1360
1335
  changed.has('loggedIn')) {
1361
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.reload();
1336
+ this.infiniteScroller?.reload();
1362
1337
  }
1363
1338
  if (changed.has('baseQuery') ||
1364
1339
  changed.has('identifiers') ||
@@ -1385,6 +1360,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1385
1360
  });
1386
1361
  }
1387
1362
  }
1363
+ if (changed.has('searchType') && this.searchType === SearchType.TV) {
1364
+ this.applyDefaultTVSearchSort();
1365
+ }
1388
1366
  if (changed.has('profileElement')) {
1389
1367
  this.applyDefaultProfileSort();
1390
1368
  }
@@ -1456,8 +1434,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1456
1434
  this.fetchManageableSearchResults();
1457
1435
  }
1458
1436
  else if (this.pageContext === 'search')
1459
- (_b = this.infiniteScroller) === null || _b === void 0 ? void 0 : _b.reload();
1460
- (_c = this.infiniteScroller) === null || _c === void 0 ? void 0 : _c.refreshAllVisibleCells();
1437
+ this.infiniteScroller?.reload();
1438
+ this.infiniteScroller?.refreshAllVisibleCells();
1461
1439
  // Only emit change event if changing b/w true & false, not on initial value set.
1462
1440
  if (changed.get('isManageView') !== undefined) {
1463
1441
  this.emitManageModeChangedEvent();
@@ -1472,21 +1450,19 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1472
1450
  this.ensureAvailableTilesDisplayed();
1473
1451
  }
1474
1452
  connectedCallback() {
1475
- var _a;
1476
- (_a = super.connectedCallback) === null || _a === void 0 ? void 0 : _a.call(this);
1453
+ super.connectedCallback?.();
1477
1454
  this.setupStateRestorationObserver();
1478
1455
  this.setupResizeObserver();
1479
1456
  }
1480
1457
  disconnectedCallback() {
1481
- var _a, _b;
1482
1458
  if (this.resizeObserver) {
1483
1459
  this.disconnectResizeObserver(this.resizeObserver);
1484
1460
  }
1485
1461
  if (this.boundNavigationHandler) {
1486
1462
  window.removeEventListener('popstate', this.boundNavigationHandler);
1487
1463
  }
1488
- (_a = this.leftColIntersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1489
- (_b = this.facetsIntersectionObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
1464
+ this.leftColIntersectionObserver?.disconnect();
1465
+ this.facetsIntersectionObserver?.disconnect();
1490
1466
  window.removeEventListener('resize', this.updateLeftColumnHeight);
1491
1467
  }
1492
1468
  handleResize(entry) {
@@ -1540,12 +1516,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1540
1516
  * Sets up listeners for events that may require updating the left column height.
1541
1517
  */
1542
1518
  setupLeftColumnScrollListeners() {
1543
- var _a;
1544
1519
  // We observe intersections between the left column's scroll sentinel and
1545
1520
  // the viewport, so that we can ensure the left column is always sized to
1546
1521
  // match the _available_ viewport height. This should generally be more
1547
1522
  // performant than listening to scroll events on the page or column.
1548
- const leftColumnSentinel = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#left-column-scroll-sentinel');
1523
+ const leftColumnSentinel = this.shadowRoot?.querySelector('#left-column-scroll-sentinel');
1549
1524
  if (leftColumnSentinel) {
1550
1525
  this.leftColIntersectionObserver = new IntersectionObserver(this.updateLeftColumnHeight, {
1551
1526
  threshold: [...Array(201).keys()].map(n => n / 200), // Threshold every 0.5%
@@ -1562,8 +1537,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1562
1537
  * don't need granular intersection thresholds for this.
1563
1538
  */
1564
1539
  setupFacetsScrollListeners() {
1565
- var _a;
1566
- const facetsSentinel = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#facets-scroll-sentinel');
1540
+ const facetsSentinel = this.shadowRoot?.querySelector('#facets-scroll-sentinel');
1567
1541
  if (facetsSentinel) {
1568
1542
  this.facetsIntersectionObserver = new IntersectionObserver(this.updateFacetFadeOut);
1569
1543
  this.facetsIntersectionObserver.observe(facetsSentinel);
@@ -1694,7 +1668,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1694
1668
  * fetching new results.
1695
1669
  */
1696
1670
  async handleQueryChange() {
1697
- var _a;
1698
1671
  // only reset if the query has actually changed
1699
1672
  if (!this.searchService ||
1700
1673
  this.dataSource.pageFetchQueryKey === this.previousQueryKey) {
@@ -1716,7 +1689,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1716
1689
  this.infiniteScroller.itemCount = this.estimatedTileCount;
1717
1690
  this.infiniteScroller.reload();
1718
1691
  }
1719
- if (this.withinCollection && ((_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim())) {
1692
+ if (this.withinCollection && this.baseQuery?.trim()) {
1720
1693
  this.defaultSortField = SortField.relevance;
1721
1694
  this.defaultSortDirection = null;
1722
1695
  }
@@ -1743,19 +1716,18 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1743
1716
  this.restoreState();
1744
1717
  }
1745
1718
  restoreState() {
1746
- var _a, _b, _c, _d, _e;
1747
1719
  const restorationState = this.restorationStateHandler.getRestorationState();
1748
1720
  this.displayMode = restorationState.displayMode;
1749
1721
  if (!this.suppressURLSinParam && restorationState.searchType != null)
1750
1722
  this.searchType = restorationState.searchType;
1751
- this.selectedSort = (_a = restorationState.selectedSort) !== null && _a !== void 0 ? _a : SortField.default;
1752
- this.sortDirection = (_b = restorationState.sortDirection) !== null && _b !== void 0 ? _b : null;
1753
- this.selectedTitleFilter = (_c = restorationState.selectedTitleFilter) !== null && _c !== void 0 ? _c : null;
1754
- this.selectedCreatorFilter = (_d = restorationState.selectedCreatorFilter) !== null && _d !== void 0 ? _d : null;
1723
+ this.selectedSort = restorationState.selectedSort ?? SortField.default;
1724
+ this.sortDirection = restorationState.sortDirection ?? null;
1725
+ this.selectedTitleFilter = restorationState.selectedTitleFilter ?? null;
1726
+ this.selectedCreatorFilter = restorationState.selectedCreatorFilter ?? null;
1755
1727
  this.selectedFacets = restorationState.selectedFacets;
1756
1728
  if (!this.suppressURLQuery)
1757
1729
  this.baseQuery = restorationState.baseQuery;
1758
- this.currentPage = (_e = restorationState.currentPage) !== null && _e !== void 0 ? _e : 1;
1730
+ this.currentPage = restorationState.currentPage ?? 1;
1759
1731
  this.minSelectedDate = restorationState.minSelectedDate;
1760
1732
  this.maxSelectedDate = restorationState.maxSelectedDate;
1761
1733
  if (this.currentPage > 1) {
@@ -1763,21 +1735,21 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1763
1735
  }
1764
1736
  }
1765
1737
  persistState() {
1766
- var _a, _b, _c, _d;
1738
+ const isDefaultSort = this.selectedSort === this.defaultSortField;
1767
1739
  const restorationState = {
1768
1740
  displayMode: this.displayMode,
1769
1741
  searchType: this.suppressURLSinParam ? undefined : this.searchType,
1770
- selectedSort: this.selectedSort,
1771
- sortDirection: (_a = this.sortDirection) !== null && _a !== void 0 ? _a : undefined,
1772
- selectedFacets: (_b = this.selectedFacets) !== null && _b !== void 0 ? _b : getDefaultSelectedFacets(),
1742
+ selectedSort: isDefaultSort ? SortField.default : this.selectedSort,
1743
+ sortDirection: this.sortDirection ?? undefined,
1744
+ selectedFacets: this.selectedFacets ?? getDefaultSelectedFacets(),
1773
1745
  baseQuery: this.suppressURLQuery ? undefined : this.baseQuery,
1774
1746
  currentPage: this.currentPage,
1775
1747
  titleQuery: this.titleQuery,
1776
1748
  creatorQuery: this.creatorQuery,
1777
1749
  minSelectedDate: this.minSelectedDate,
1778
1750
  maxSelectedDate: this.maxSelectedDate,
1779
- selectedTitleFilter: (_c = this.selectedTitleFilter) !== null && _c !== void 0 ? _c : undefined,
1780
- selectedCreatorFilter: (_d = this.selectedCreatorFilter) !== null && _d !== void 0 ? _d : undefined,
1751
+ selectedTitleFilter: this.selectedTitleFilter ?? undefined,
1752
+ selectedCreatorFilter: this.selectedCreatorFilter ?? undefined,
1781
1753
  };
1782
1754
  const persistOptions = {
1783
1755
  forceReplace: this.dataSourceInstallInProgress,
@@ -1807,7 +1779,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1807
1779
  * Fires analytics indicating the type of facet event that took place.
1808
1780
  */
1809
1781
  facetClickHandler({ detail: { facetType, bucket, negative }, }) {
1810
- var _a;
1811
1782
  let action;
1812
1783
  if (negative) {
1813
1784
  action =
@@ -1821,7 +1792,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1821
1792
  ? analyticsActions.facetSelected
1822
1793
  : analyticsActions.facetDeselected;
1823
1794
  }
1824
- (_a = this.analyticsHandler) === null || _a === void 0 ? void 0 : _a.sendEvent({
1795
+ this.analyticsHandler?.sendEvent({
1825
1796
  category: this.searchContext,
1826
1797
  action,
1827
1798
  label: facetType,
@@ -1833,17 +1804,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1833
1804
  // without this setTimeout, Safari just pauses until the `fetchPage` is complete
1834
1805
  // then scrolls to the cell
1835
1806
  setTimeout(() => {
1836
- var _a;
1837
1807
  this.isScrollingToCell = true;
1838
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.scrollToCell(cellIndexToScrollTo, true);
1808
+ this.infiniteScroller?.scrollToCell(cellIndexToScrollTo, true);
1839
1809
  // This timeout is to give the scroll animation time to finish
1840
1810
  // then updating the infinite scroller once we're done scrolling
1841
1811
  // There's no scroll animation completion callback so we're
1842
1812
  // giving it 0.5s to finish.
1843
1813
  setTimeout(() => {
1844
- var _a;
1845
1814
  this.isScrollingToCell = false;
1846
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.refreshAllVisibleCells();
1815
+ this.infiniteScroller?.refreshAllVisibleCells();
1847
1816
  resolve();
1848
1817
  }, 500);
1849
1818
  }, 0);
@@ -1854,8 +1823,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1854
1823
  * Currently equivalent to having a non-empty query.
1855
1824
  */
1856
1825
  get isRelevanceSortAvailable() {
1857
- var _a;
1858
- return !!((_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim());
1826
+ return !!this.baseQuery?.trim();
1859
1827
  }
1860
1828
  /**
1861
1829
  * Sets the total number of tiles displayed in the infinite scroller.
@@ -1865,6 +1833,13 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1865
1833
  this.infiniteScroller.itemCount = count;
1866
1834
  }
1867
1835
  }
1836
+ /**
1837
+ * Applies the default sort options for the TV search results page
1838
+ */
1839
+ applyDefaultTVSearchSort() {
1840
+ this.defaultSortField = SortField.datearchived;
1841
+ this.defaultSortDirection = 'desc';
1842
+ }
1868
1843
  /**
1869
1844
  * Applies any default sort option for the current collection, by checking
1870
1845
  * for one in the collection's metadata. If none is found, defaults to sorting
@@ -1873,7 +1848,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1873
1848
  * - Weekly views for all other collections
1874
1849
  */
1875
1850
  applyDefaultCollectionSort(collectionInfo) {
1876
- var _a, _b, _c;
1877
1851
  if (this.baseQuery) {
1878
1852
  // If there's a query set, then we default to relevance sorting regardless of
1879
1853
  // the collection metadata-specified sort.
@@ -1883,13 +1857,13 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1883
1857
  }
1884
1858
  // Favorite collections sort on Date Favorited by default.
1885
1859
  // Other collections fall back to sorting on weekly views.
1886
- const baseDefaultSort = ((_b = (_a = collectionInfo === null || collectionInfo === void 0 ? void 0 : collectionInfo.public_metadata) === null || _a === void 0 ? void 0 : _a.identifier) === null || _b === void 0 ? void 0 : _b.startsWith('fav-'))
1860
+ const baseDefaultSort = collectionInfo?.public_metadata?.identifier?.startsWith('fav-')
1887
1861
  ? '-favoritedate'
1888
1862
  : '-week';
1889
1863
  // The collection metadata may override the default sorting with something else
1890
- const metadataSort = (_c = collectionInfo === null || collectionInfo === void 0 ? void 0 : collectionInfo.public_metadata) === null || _c === void 0 ? void 0 : _c['sort-by'];
1864
+ const metadataSort = collectionInfo?.public_metadata?.['sort-by'];
1891
1865
  // Prefer the metadata-specified sort if one exists
1892
- const defaultSortToApply = metadataSort !== null && metadataSort !== void 0 ? metadataSort : baseDefaultSort;
1866
+ const defaultSortToApply = metadataSort ?? baseDefaultSort;
1893
1867
  // Account for both -field and field:dir formats
1894
1868
  let [field, dir] = defaultSortToApply.split(':');
1895
1869
  if (field.startsWith('-')) {
@@ -1912,7 +1886,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1912
1886
  applyDefaultProfileSort() {
1913
1887
  if (this.profileElement) {
1914
1888
  const defaultSortField = defaultProfileElementSorts[this.profileElement];
1915
- this.defaultSortField = defaultSortField !== null && defaultSortField !== void 0 ? defaultSortField : SortField.weeklyview;
1889
+ this.defaultSortField = defaultSortField ?? SortField.weeklyview;
1916
1890
  }
1917
1891
  else {
1918
1892
  this.defaultSortField = SortField.weeklyview;
@@ -1926,8 +1900,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1926
1900
  * page are visible, but if the page is not currenlty visible, we don't need to reload
1927
1901
  */
1928
1902
  get currentVisiblePageNumbers() {
1929
- var _a, _b;
1930
- const visibleCells = (_b = (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.getVisibleCellIndices()) !== null && _b !== void 0 ? _b : [];
1903
+ const visibleCells = this.infiniteScroller?.getVisibleCellIndices() ?? [];
1931
1904
  const visiblePages = new Set();
1932
1905
  visibleCells.forEach(cellIndex => {
1933
1906
  const visiblePage = Math.floor(cellIndex / this.pageSize) + 1;
@@ -1942,35 +1915,33 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1942
1915
  const { withinCollection } = this;
1943
1916
  const topCollections = ['radio'];
1944
1917
  const isTopCollection = topCollections.includes(withinCollection);
1945
- const isSubCollection = topCollections.some(topCollxn => { var _a; return (_a = this.dataSource.parentCollections) === null || _a === void 0 ? void 0 : _a.includes(topCollxn); });
1918
+ const isSubCollection = topCollections.some(topCollxn => this.dataSource.parentCollections?.includes(topCollxn));
1946
1919
  return isTopCollection || isSubCollection;
1947
1920
  }
1948
1921
  /**
1949
1922
  * Refreshes all visible result cells in the infinite scroller.
1950
1923
  */
1951
1924
  refreshVisibleResults() {
1952
- var _a;
1953
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.refreshAllVisibleCells();
1925
+ this.infiniteScroller?.refreshAllVisibleCells();
1954
1926
  }
1955
1927
  /**
1956
1928
  * Callback when a result is selected
1957
1929
  */
1958
1930
  resultSelected(event) {
1959
- var _a, _b, _c;
1960
1931
  if (this.isManageView) {
1961
1932
  // Checked/unchecked state change -- rerender to ensure it propagates
1962
1933
  // this.mapDataSource(model => ({ ...model }));
1963
1934
  const cellIndex = this.dataSource.indexOf(event.detail);
1964
1935
  if (cellIndex >= 0)
1965
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.refreshCell(cellIndex);
1936
+ this.infiniteScroller?.refreshCell(cellIndex);
1966
1937
  this.requestUpdate();
1967
1938
  }
1968
- (_b = this.analyticsHandler) === null || _b === void 0 ? void 0 : _b.sendEvent({
1939
+ this.analyticsHandler?.sendEvent({
1969
1940
  category: this.searchContext,
1970
1941
  action: analyticsActions.resultSelected,
1971
1942
  label: event.detail.mediatype,
1972
1943
  });
1973
- (_c = this.analyticsHandler) === null || _c === void 0 ? void 0 : _c.sendEvent({
1944
+ this.analyticsHandler?.sendEvent({
1974
1945
  category: this.searchContext,
1975
1946
  action: analyticsActions.resultSelected,
1976
1947
  label: `page-${this.currentPage}`,
@@ -1989,28 +1960,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1989
1960
  const isRadioSearch = this.searchType === SearchType.RADIO;
1990
1961
  const { isTVCollection, isRadioCollection } = this;
1991
1962
  const shouldUseLocalTime = isTVSearch || isRadioSearch || isTVCollection || isRadioCollection;
1992
- return html `
1993
- <tile-dispatcher
1994
- .collectionPagePath=${this.collectionPagePath}
1995
- .baseNavigationUrl=${this.baseNavigationUrl}
1996
- .baseImageUrl=${this.baseImageUrl}
1997
- .model=${model}
1998
- .tileDisplayMode=${this.displayMode}
1999
- .resizeObserver=${this.resizeObserver}
2000
- .collectionTitles=${this.dataSource.collectionTitles}
2001
- .sortParam=${this.sortParam}
2002
- .defaultSortParam=${this.defaultSortParam}
2003
- .creatorFilter=${this.selectedCreatorFilter}
2004
- .mobileBreakpoint=${this.mobileBreakpoint}
2005
- .loggedIn=${this.loggedIn}
2006
- .suppressBlurring=${this.shouldSuppressTileBlurring}
2007
- .isManageView=${this.isManageView}
2008
- ?showTvClips=${isTVSearch || isTVCollection}
2009
- ?enableHoverPane=${true}
2010
- ?useLocalTime=${shouldUseLocalTime}
2011
- @resultSelected=${(e) => this.resultSelected(e)}
2012
- >
2013
- </tile-dispatcher>
1963
+ return html `
1964
+ <tile-dispatcher
1965
+ .collectionPagePath=${this.collectionPagePath}
1966
+ .baseNavigationUrl=${this.baseNavigationUrl}
1967
+ .baseImageUrl=${this.baseImageUrl}
1968
+ .model=${model}
1969
+ .tileDisplayMode=${this.displayMode}
1970
+ .resizeObserver=${this.resizeObserver}
1971
+ .collectionTitles=${this.dataSource.collectionTitles}
1972
+ .sortParam=${this.sortParam}
1973
+ .defaultSortParam=${this.defaultSortParam}
1974
+ .creatorFilter=${this.selectedCreatorFilter}
1975
+ .mobileBreakpoint=${this.mobileBreakpoint}
1976
+ .loggedIn=${this.loggedIn}
1977
+ .suppressBlurring=${this.shouldSuppressTileBlurring}
1978
+ .isManageView=${this.isManageView}
1979
+ ?showTvClips=${isTVSearch || isTVCollection}
1980
+ ?enableHoverPane=${true}
1981
+ ?useLocalTime=${shouldUseLocalTime}
1982
+ @resultSelected=${(e) => this.resultSelected(e)}
1983
+ >
1984
+ </tile-dispatcher>
2014
1985
  `;
2015
1986
  }
2016
1987
  /**
@@ -2033,478 +2004,491 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
2033
2004
  * 4. Reloads the infinite scroller to display new results
2034
2005
  */
2035
2006
  fetchManageableSearchResults() {
2036
- var _a;
2037
2007
  const hasNotLoadedInitialResults = !this.dataSource.totalResults;
2038
2008
  const hasLoadedWithMoreResultsAvailable = !this.searchResultsLoading && this.dataSource.totalResults > 100;
2039
2009
  if (this.pageContext === 'search' &&
2040
2010
  (hasNotLoadedInitialResults || hasLoadedWithMoreResultsAvailable)) {
2041
2011
  this.dataSource.resetPages();
2042
2012
  this.dataSource.fetchPage(1, this.maxPagesToManage);
2043
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.reload();
2013
+ this.infiniteScroller?.reload();
2044
2014
  }
2045
2015
  }
2046
2016
  static get styles() {
2047
2017
  return [
2048
2018
  srOnlyStyle,
2049
- css `
2050
- :host {
2051
- display: block;
2052
- --leftColumnWidth: 18rem;
2053
- --leftColumnPaddingTop: 2rem;
2054
- --leftColumnPaddingRight: 2.5rem;
2055
- }
2056
-
2057
- #facet-top-view {
2058
- display: flex;
2059
- }
2060
-
2061
- /**
2062
- * When page width resizes from desktop to mobile, use this class to
2063
- * disable expand/collapse transition when loading.
2064
- */
2065
- .preload * {
2066
- transition: none !important;
2067
- -webkit-transition: none !important;
2068
- -moz-transition: none !important;
2069
- -ms-transition: none !important;
2070
- -o-transition: none !important;
2071
- }
2072
-
2073
- #content-container {
2074
- display: flex;
2075
- }
2076
-
2077
- empty-placeholder {
2078
- margin-top: var(--placeholderMarginTop, 0);
2079
- }
2080
-
2081
- .collapser-icon {
2082
- display: inline-block;
2083
- }
2084
-
2085
- .collapser-icon svg {
2086
- display: inline-block;
2087
- width: 12px;
2088
- height: 12px;
2089
- transition: transform 0.2s ease-out;
2090
- }
2091
-
2092
- #mobile-filter-collapse {
2093
- width: 100%;
2094
- }
2095
-
2096
- #mobile-filter-collapse > summary {
2097
- cursor: pointer;
2098
- list-style: none;
2099
- }
2100
-
2101
- #mobile-filter-collapse[open] > summary {
2102
- margin-bottom: 10px;
2103
- }
2104
-
2105
- #mobile-filter-collapse h2 {
2106
- display: inline-block;
2107
- margin: 0;
2108
- font-size: 2rem;
2109
- }
2110
-
2111
- #mobile-filter-collapse[open] svg {
2112
- transform: rotate(90deg);
2113
- }
2114
-
2115
- #content-container.mobile {
2116
- display: block;
2117
- }
2118
-
2119
- #right-column {
2120
- flex: 1;
2121
- position: relative;
2122
- min-height: 90vh;
2123
- border-right: 1px solid rgb(232, 232, 232);
2124
- margin-top: var(--rightColumnMarginTop, 0);
2125
- padding-top: var(--rightColumnPaddingTop, 2rem);
2126
- background: #fff;
2127
- }
2128
-
2129
- #left-column:not([hidden]) + #right-column {
2130
- border-left: 1px solid rgb(232, 232, 232);
2131
- }
2132
-
2133
- #right-column.smart-results-spacing {
2134
- padding-top: 0.5rem;
2135
- border-right: none;
2136
- background: transparent;
2137
- min-width: 0;
2138
- }
2139
-
2140
- #results {
2141
- background: #fff;
2142
- padding-left: 1rem;
2143
- padding-right: 1rem;
2144
- }
2145
-
2146
- #right-column.smart-results-spacing #results {
2147
- border-radius: 10px 10px 0px 0px;
2148
- padding-top: 0.5rem;
2149
- margin-top: 1rem;
2150
- }
2151
-
2152
- .mobile #right-column {
2153
- border-left: none;
2154
- }
2155
-
2156
- .mobile #results {
2157
- padding: 5px 5px 0;
2158
- }
2159
-
2160
- #left-column {
2161
- width: var(--leftColumnWidth, 18rem);
2162
- /* Prevents Safari from shrinking col at first draw */
2163
- min-width: var(--leftColumnWidth, 18rem);
2164
- padding-top: var(--leftColumnPaddingTop, 2rem);
2165
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
2166
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
2167
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
2168
- z-index: 1;
2169
- }
2170
-
2171
- .desktop #left-column {
2172
- top: 0;
2173
- position: sticky;
2174
- height: calc(100vh - 2rem);
2175
- max-height: calc(100vh - 2rem);
2176
- overflow-x: hidden;
2177
- overflow-y: scroll;
2178
-
2179
- /*
2180
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
2181
- * does at least give us a tiny bit of control over width & color.
2182
- */
2183
- scrollbar-width: thin;
2184
- scrollbar-color: transparent transparent;
2185
- }
2186
- .desktop #left-column:hover {
2187
- scrollbar-color: auto;
2188
- }
2189
- .desktop #left-column::-webkit-scrollbar {
2190
- appearance: none;
2191
- width: 6px;
2192
- }
2193
- .desktop #left-column::-webkit-scrollbar-button {
2194
- height: 3px;
2195
- background: transparent;
2196
- }
2197
- .desktop #left-column::-webkit-scrollbar-corner {
2198
- background: transparent;
2199
- }
2200
- .desktop #left-column::-webkit-scrollbar-thumb {
2201
- border-radius: 4px;
2202
- }
2203
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
2204
- background: rgba(0, 0, 0, 0.15);
2205
- }
2206
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2207
- background: rgba(0, 0, 0, 0.2);
2208
- }
2209
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2210
- background: rgba(0, 0, 0, 0.3);
2211
- }
2212
-
2213
- #facets-bottom-fade {
2214
- background: linear-gradient(
2215
- to bottom,
2216
- #fbfbfd00 0%,
2217
- #fbfbfdc0 50%,
2218
- #fbfbfd 80%,
2219
- #fbfbfd 100%
2220
- );
2221
- position: fixed;
2222
- bottom: 0;
2223
- height: 50px;
2224
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
2225
- width: calc(
2226
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2227
- );
2228
- z-index: 2;
2229
- pointer-events: none;
2230
- transition: height 0.1s ease;
2231
- }
2232
- #facets-bottom-fade.hidden {
2233
- height: 0;
2234
- }
2235
-
2236
- .facets-message {
2237
- font-size: 1.4rem;
2238
- }
2239
-
2240
- .desktop-facets-dropdown > summary {
2241
- cursor: pointer;
2242
- list-style: none;
2243
- }
2244
-
2245
- .desktop-facets-dropdown h2 {
2246
- display: inline-block;
2247
- margin: 0;
2248
- font-size: 1.6rem;
2249
- }
2250
-
2251
- .desktop-facets-dropdown[open] > summary {
2252
- margin-bottom: 10px;
2253
- }
2254
-
2255
- .desktop-facets-dropdown[open] svg {
2256
- transform: rotate(90deg);
2257
- }
2258
-
2259
- .desktop #left-column-scroll-sentinel {
2260
- width: 1px;
2261
- height: 100vh;
2262
- background: transparent;
2263
- }
2264
-
2265
- .desktop #facets-scroll-sentinel {
2266
- width: 1px;
2267
- height: 1px;
2268
- background: transparent;
2269
- }
2270
-
2271
- #facets-header-container {
2272
- display: flex;
2273
- justify-content: space-between;
2274
- align-items: flex-start;
2275
- clear: both;
2276
- }
2277
-
2278
- .desktop #facets-header-container {
2279
- flex-wrap: wrap;
2280
- }
2281
-
2282
- .mobile #left-column {
2283
- width: 100%;
2284
- min-width: 0;
2285
- padding: 5px 0;
2286
- border: 0;
2287
- }
2288
-
2289
- .clear-filters-btn-row {
2290
- display: inline-block;
2291
- }
2292
-
2293
- .desktop .clear-filters-btn-row {
2294
- width: 100%;
2295
- }
2296
-
2297
- .clear-filters-btn {
2298
- display: inline-block;
2299
- appearance: none;
2300
- margin: 0;
2301
- padding: 0;
2302
- border: 0;
2303
- background: none;
2304
- color: var(--ia-theme-link-color);
2305
- font-size: 1.4rem;
2306
- font-family: inherit;
2307
- cursor: pointer;
2308
- }
2309
-
2310
- .clear-filters-btn:hover {
2311
- text-decoration: underline;
2312
- }
2313
-
2314
- .clear-filters-btn-separator {
2315
- display: inline-block;
2316
- margin-left: 5px;
2317
- border-left: 1px solid #2c2c2c;
2318
- font-size: 1.4rem;
2319
- line-height: 1.3rem;
2320
- }
2321
-
2322
- #tv-filters {
2323
- margin-bottom: 15px;
2324
- }
2325
-
2326
- #tv-shows {
2327
- --comboBoxListWidth: 300px;
2328
- }
2329
-
2330
- .tv-filter-dropdown {
2331
- display: block;
2332
- font-size: 14px;
2333
- margin-left: 1px;
2334
- margin-bottom: 5px;
2335
- }
2336
-
2337
- .tv-filter-dropdown::part(combo-box) {
2338
- outline-offset: 1px;
2339
- }
2340
-
2341
- .tv-filter-dropdown::part(option) {
2342
- line-height: 1.1;
2343
- padding: 7px;
2344
- }
2345
-
2346
- #facets-container {
2347
- position: relative;
2348
- max-height: 0;
2349
- transition: max-height 0.2s ease-in-out;
2350
- z-index: 1;
2351
- margin-top: var(--facetsContainerMarginTop, 5rem);
2352
- padding-bottom: 2rem;
2353
- }
2354
-
2355
- .desktop #facets-container {
2356
- width: 18rem;
2357
- }
2358
-
2359
- .mobile #facets-container {
2360
- overflow: hidden;
2361
- padding-bottom: 0;
2362
- padding-left: 10px;
2363
- padding-right: 10px;
2364
- }
2365
-
2366
- #facets-container.expanded {
2367
- max-height: 2000px;
2368
- }
2369
-
2370
- .results-section-heading {
2371
- margin: 0.5rem 0.3rem;
2372
- font-size: 2rem;
2373
- line-height: 25px;
2374
- }
2375
-
2376
- #results-total {
2377
- display: flex;
2378
- align-items: baseline;
2379
- }
2380
-
2381
- .mobile #results-total {
2382
- position: absolute;
2383
- right: 10px;
2384
- }
2385
-
2386
- #big-results-count {
2387
- font-size: 2.4rem;
2388
- font-weight: 500;
2389
- margin-right: 5px;
2390
- }
2391
-
2392
- .mobile #big-results-count {
2393
- font-size: 2rem;
2394
- }
2395
-
2396
- #big-results-label {
2397
- font-size: 1.4rem;
2398
- font-weight: 200;
2399
- }
2400
-
2401
- #list-header {
2402
- max-height: 4.2rem;
2403
- }
2404
-
2405
- .loading-cover {
2406
- position: absolute;
2407
- top: 0;
2408
- left: 0;
2409
- width: 100%;
2410
- height: 100%;
2411
- display: flex;
2412
- justify-content: center;
2413
- z-index: 1;
2414
- padding-top: 50px;
2415
- }
2416
-
2417
- #tile-blur-label {
2418
- display: flex;
2419
- align-items: center;
2420
- column-gap: 5px;
2421
- }
2422
-
2423
- #tile-blur-check {
2424
- margin: 0 5px 0 0;
2425
- width: 15px;
2426
- }
2427
-
2428
- circular-activity-indicator {
2429
- width: 30px;
2430
- height: 30px;
2431
- }
2432
-
2433
- sort-filter-bar {
2434
- display: block;
2435
- margin-bottom: 4rem;
2436
- }
2437
-
2438
- infinite-scroller {
2439
- display: block;
2440
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2441
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2442
- }
2443
-
2444
- infinite-scroller.list-compact {
2445
- --infiniteScrollerCellMinWidth: var(
2446
- --collectionBrowserCellMinWidth,
2447
- 100%
2448
- );
2449
- --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2450
- --infiniteScrollerCellMaxHeight: 56px;
2451
- --infiniteScrollerRowGap: 10px;
2452
- }
2453
-
2454
- infinite-scroller.list-detail {
2455
- --infiniteScrollerCellMinWidth: var(
2456
- --collectionBrowserCellMinWidth,
2457
- 100%
2458
- );
2459
- --infiniteScrollerCellMinHeight: var(
2460
- --collectionBrowserCellMinHeight,
2461
- 5rem
2462
- );
2463
- /*
2464
- 30px in spec, compensating for a -4px margin
2465
- to align title with top of item image
2466
- src/tiles/list/tile-list.ts
2467
- */
2468
- --infiniteScrollerRowGap: 34px;
2469
- }
2470
-
2471
- .mobile infinite-scroller.list-detail {
2472
- --infiniteScrollerRowGap: 24px;
2473
- }
2474
-
2475
- infinite-scroller.grid {
2476
- --infiniteScrollerCellMinWidth: var(
2477
- --collectionBrowserCellMinWidth,
2478
- 17rem
2479
- );
2480
- --infiniteScrollerCellMaxWidth: var(
2481
- --collectionBrowserCellMaxWidth,
2482
- 1fr
2483
- );
2484
- }
2485
-
2486
- /* Allow tiles to shrink a bit further at smaller viewport widths */
2487
- @media screen and (max-width: 880px) {
2488
- infinite-scroller.grid {
2489
- --infiniteScrollerCellMinWidth: var(
2490
- --collectionBrowserCellMinWidth,
2491
- 15rem
2492
- );
2493
- }
2494
- }
2495
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2496
- @media screen and (max-width: 360px) {
2497
- infinite-scroller.grid {
2498
- --infiniteScrollerCellMinWidth: var(
2499
- --collectionBrowserCellMinWidth,
2500
- 12rem
2501
- );
2502
- }
2503
- }
2504
-
2505
- infinite-scroller.hidden {
2506
- display: none;
2507
- }
2019
+ css `
2020
+ :host {
2021
+ display: block;
2022
+ --leftColumnWidth: 18rem;
2023
+ --leftColumnPaddingTop: 2rem;
2024
+ --leftColumnPaddingRight: 2.5rem;
2025
+ }
2026
+
2027
+ #facet-top-view {
2028
+ display: flex;
2029
+ }
2030
+
2031
+ /**
2032
+ * When page width resizes from desktop to mobile, use this class to
2033
+ * disable expand/collapse transition when loading.
2034
+ */
2035
+ .preload * {
2036
+ transition: none !important;
2037
+ -webkit-transition: none !important;
2038
+ -moz-transition: none !important;
2039
+ -ms-transition: none !important;
2040
+ -o-transition: none !important;
2041
+ }
2042
+
2043
+ #content-container {
2044
+ display: flex;
2045
+ }
2046
+
2047
+ empty-placeholder {
2048
+ margin-top: var(--placeholderMarginTop, 0);
2049
+ }
2050
+
2051
+ .collapser-icon {
2052
+ display: inline-block;
2053
+ }
2054
+
2055
+ .collapser-icon svg {
2056
+ display: inline-block;
2057
+ width: 12px;
2058
+ height: 12px;
2059
+ transition: transform 0.2s ease-out;
2060
+ }
2061
+
2062
+ #mobile-filter-collapse {
2063
+ width: 100%;
2064
+ }
2065
+
2066
+ #mobile-filter-collapse > summary {
2067
+ cursor: pointer;
2068
+ list-style: none;
2069
+ }
2070
+
2071
+ #mobile-filter-collapse[open] > summary {
2072
+ margin-bottom: 10px;
2073
+ }
2074
+
2075
+ #mobile-filter-collapse h2 {
2076
+ display: inline-block;
2077
+ margin: 0;
2078
+ font-size: 2rem;
2079
+ }
2080
+
2081
+ #mobile-filter-collapse[open] svg {
2082
+ transform: rotate(90deg);
2083
+ }
2084
+
2085
+ #content-container.mobile {
2086
+ display: block;
2087
+ }
2088
+
2089
+ #right-column {
2090
+ flex: 1;
2091
+ position: relative;
2092
+ min-height: 90vh;
2093
+ border-right: 1px solid rgb(232, 232, 232);
2094
+ margin-top: var(--rightColumnMarginTop, 0);
2095
+ padding-top: var(--rightColumnPaddingTop, 2rem);
2096
+ background: #fff;
2097
+ }
2098
+
2099
+ #left-column:not([hidden]) + #right-column {
2100
+ border-left: 1px solid rgb(232, 232, 232);
2101
+ }
2102
+
2103
+ #right-column.smart-results-spacing {
2104
+ padding-top: 0.5rem;
2105
+ border-right: none;
2106
+ background: transparent;
2107
+ min-width: 0;
2108
+ }
2109
+
2110
+ #results {
2111
+ background: #fff;
2112
+ padding-left: 1rem;
2113
+ padding-right: 1rem;
2114
+ }
2115
+
2116
+ #right-column.smart-results-spacing #results {
2117
+ border-radius: 10px 10px 0px 0px;
2118
+ padding-top: 0.5rem;
2119
+ margin-top: 1rem;
2120
+ }
2121
+
2122
+ .mobile #right-column {
2123
+ border-left: none;
2124
+ }
2125
+
2126
+ .mobile #results {
2127
+ padding: 5px 5px 0;
2128
+ }
2129
+
2130
+ #left-column {
2131
+ width: var(--leftColumnWidth, 18rem);
2132
+ /* Prevents Safari from shrinking col at first draw */
2133
+ min-width: var(--leftColumnWidth, 18rem);
2134
+ padding-top: var(--leftColumnPaddingTop, 2rem);
2135
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
2136
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
2137
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
2138
+ z-index: 1;
2139
+ }
2140
+
2141
+ .desktop #left-column {
2142
+ top: 0;
2143
+ position: sticky;
2144
+ height: calc(100vh - 2rem);
2145
+ max-height: calc(100vh - 2rem);
2146
+ overflow-x: hidden;
2147
+ overflow-y: scroll;
2148
+
2149
+ /*
2150
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
2151
+ * does at least give us a tiny bit of control over width & color.
2152
+ */
2153
+ scrollbar-width: thin;
2154
+ scrollbar-color: transparent transparent;
2155
+ }
2156
+ .desktop #left-column:hover {
2157
+ scrollbar-color: auto;
2158
+ }
2159
+ .desktop #left-column::-webkit-scrollbar {
2160
+ appearance: none;
2161
+ width: 6px;
2162
+ }
2163
+ .desktop #left-column::-webkit-scrollbar-button {
2164
+ height: 3px;
2165
+ background: transparent;
2166
+ }
2167
+ .desktop #left-column::-webkit-scrollbar-corner {
2168
+ background: transparent;
2169
+ }
2170
+ .desktop #left-column::-webkit-scrollbar-thumb {
2171
+ border-radius: 4px;
2172
+ }
2173
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
2174
+ background: rgba(0, 0, 0, 0.15);
2175
+ }
2176
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
2177
+ background: rgba(0, 0, 0, 0.2);
2178
+ }
2179
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
2180
+ background: rgba(0, 0, 0, 0.3);
2181
+ }
2182
+
2183
+ #facets-bottom-fade {
2184
+ background: linear-gradient(
2185
+ to bottom,
2186
+ #fbfbfd00 0%,
2187
+ #fbfbfdc0 50%,
2188
+ #fbfbfd 80%,
2189
+ #fbfbfd 100%
2190
+ );
2191
+ position: fixed;
2192
+ bottom: 0;
2193
+ height: 50px;
2194
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
2195
+ width: calc(
2196
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
2197
+ );
2198
+ z-index: 2;
2199
+ pointer-events: none;
2200
+ transition: height 0.1s ease;
2201
+ }
2202
+ #facets-bottom-fade.hidden {
2203
+ height: 0;
2204
+ }
2205
+
2206
+ .facets-message {
2207
+ font-size: 1.4rem;
2208
+ }
2209
+
2210
+ .desktop-facets-dropdown > summary {
2211
+ cursor: pointer;
2212
+ list-style: none;
2213
+ }
2214
+
2215
+ .desktop-facets-dropdown h2 {
2216
+ display: inline-block;
2217
+ margin: 0;
2218
+ font-size: 1.6rem;
2219
+ }
2220
+
2221
+ .desktop-facets-dropdown[open] > summary {
2222
+ margin-bottom: 10px;
2223
+ }
2224
+
2225
+ .desktop-facets-dropdown[open] svg {
2226
+ transform: rotate(90deg);
2227
+ }
2228
+
2229
+ .desktop #left-column-scroll-sentinel {
2230
+ width: 1px;
2231
+ height: 100vh;
2232
+ background: transparent;
2233
+ }
2234
+
2235
+ .desktop #facets-scroll-sentinel {
2236
+ width: 1px;
2237
+ height: 1px;
2238
+ background: transparent;
2239
+ }
2240
+
2241
+ #facets-header-container {
2242
+ display: flex;
2243
+ justify-content: space-between;
2244
+ align-items: flex-start;
2245
+ clear: both;
2246
+ }
2247
+
2248
+ .desktop #facets-header-container {
2249
+ flex-wrap: wrap;
2250
+ }
2251
+
2252
+ .mobile #left-column {
2253
+ width: 100%;
2254
+ min-width: 0;
2255
+ padding: 5px 0;
2256
+ border: 0;
2257
+ }
2258
+
2259
+ .clear-filters-btn-row {
2260
+ display: inline-block;
2261
+ }
2262
+
2263
+ .desktop .clear-filters-btn-row {
2264
+ width: 100%;
2265
+ }
2266
+
2267
+ .clear-filters-btn {
2268
+ display: inline-block;
2269
+ appearance: none;
2270
+ margin: 0;
2271
+ padding: 0;
2272
+ border: 0;
2273
+ background: none;
2274
+ color: var(--ia-theme-link-color);
2275
+ font-size: 1.4rem;
2276
+ font-family: inherit;
2277
+ cursor: pointer;
2278
+ }
2279
+
2280
+ .clear-filters-btn:hover {
2281
+ text-decoration: underline;
2282
+ }
2283
+
2284
+ .clear-filters-btn-separator {
2285
+ display: inline-block;
2286
+ margin-left: 5px;
2287
+ border-left: 1px solid #2c2c2c;
2288
+ font-size: 1.4rem;
2289
+ line-height: 1.3rem;
2290
+ }
2291
+
2292
+ #tv-filters {
2293
+ margin-bottom: 15px;
2294
+ }
2295
+
2296
+ #tv-shows {
2297
+ --comboBoxListWidth: 300px;
2298
+ }
2299
+
2300
+ .tv-filter-dropdown {
2301
+ display: block;
2302
+ font-size: 14px;
2303
+ margin-left: 1px;
2304
+ margin-bottom: 5px;
2305
+ }
2306
+
2307
+ .tv-filter-dropdown::part(combo-box) {
2308
+ outline-offset: 1px;
2309
+ }
2310
+
2311
+ .tv-filter-dropdown::part(option) {
2312
+ line-height: 1.1;
2313
+ padding: 7px;
2314
+ }
2315
+
2316
+ .tv-filter-dropdown::part(clear-button) {
2317
+ flex: 0 0 26px;
2318
+ --combo-box-clear-icon-size: 14px;
2319
+ }
2320
+
2321
+ .tv-filter-dropdown::part(icon) {
2322
+ width: 1.4rem;
2323
+ height: 1.4rem;
2324
+ }
2325
+
2326
+ #facets-container {
2327
+ position: relative;
2328
+ max-height: 0;
2329
+ transition: max-height 0.2s ease-in-out;
2330
+ z-index: 1;
2331
+ margin-top: var(--facetsContainerMarginTop, 3rem);
2332
+ padding-bottom: 2rem;
2333
+ }
2334
+
2335
+ .desktop #facets-container {
2336
+ width: 18rem;
2337
+ }
2338
+
2339
+ .mobile #facets-container {
2340
+ overflow: hidden;
2341
+ padding-bottom: 0;
2342
+ padding-left: 10px;
2343
+ padding-right: 10px;
2344
+ }
2345
+
2346
+ #facets-container.expanded {
2347
+ max-height: 2000px;
2348
+ }
2349
+
2350
+ .results-section-heading {
2351
+ margin: 0.5rem 0.3rem;
2352
+ font-size: 2rem;
2353
+ line-height: 25px;
2354
+ }
2355
+
2356
+ #results-total {
2357
+ display: flex;
2358
+ align-items: baseline;
2359
+ }
2360
+
2361
+ #results-total:not(.filtered) {
2362
+ padding-bottom: 2rem;
2363
+ }
2364
+
2365
+ .mobile #results-total {
2366
+ position: absolute;
2367
+ right: 10px;
2368
+ }
2369
+
2370
+ #big-results-count {
2371
+ font-size: 2.4rem;
2372
+ font-weight: 500;
2373
+ margin-right: 5px;
2374
+ }
2375
+
2376
+ .mobile #big-results-count {
2377
+ font-size: 2rem;
2378
+ }
2379
+
2380
+ #big-results-label {
2381
+ font-size: 1.4rem;
2382
+ font-weight: 200;
2383
+ }
2384
+
2385
+ #list-header {
2386
+ max-height: 4.2rem;
2387
+ }
2388
+
2389
+ .loading-cover {
2390
+ position: absolute;
2391
+ top: 0;
2392
+ left: 0;
2393
+ width: 100%;
2394
+ height: 100%;
2395
+ display: flex;
2396
+ justify-content: center;
2397
+ z-index: 1;
2398
+ padding-top: 50px;
2399
+ }
2400
+
2401
+ #tile-blur-label {
2402
+ display: flex;
2403
+ align-items: center;
2404
+ column-gap: 5px;
2405
+ }
2406
+
2407
+ #tile-blur-check {
2408
+ margin: 0 5px 0 0;
2409
+ width: 15px;
2410
+ }
2411
+
2412
+ circular-activity-indicator {
2413
+ width: 30px;
2414
+ height: 30px;
2415
+ }
2416
+
2417
+ sort-filter-bar {
2418
+ display: block;
2419
+ margin-bottom: 4rem;
2420
+ }
2421
+
2422
+ infinite-scroller {
2423
+ display: block;
2424
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
2425
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
2426
+ }
2427
+
2428
+ infinite-scroller.list-compact {
2429
+ --infiniteScrollerCellMinWidth: var(
2430
+ --collectionBrowserCellMinWidth,
2431
+ 100%
2432
+ );
2433
+ --infiniteScrollerCellMinHeight: 45px; /* override infinite scroller component */
2434
+ --infiniteScrollerCellMaxHeight: 56px;
2435
+ --infiniteScrollerRowGap: 10px;
2436
+ }
2437
+
2438
+ infinite-scroller.list-detail {
2439
+ --infiniteScrollerCellMinWidth: var(
2440
+ --collectionBrowserCellMinWidth,
2441
+ 100%
2442
+ );
2443
+ --infiniteScrollerCellMinHeight: var(
2444
+ --collectionBrowserCellMinHeight,
2445
+ 5rem
2446
+ );
2447
+ /*
2448
+ 30px in spec, compensating for a -4px margin
2449
+ to align title with top of item image
2450
+ src/tiles/list/tile-list.ts
2451
+ */
2452
+ --infiniteScrollerRowGap: 34px;
2453
+ }
2454
+
2455
+ .mobile infinite-scroller.list-detail {
2456
+ --infiniteScrollerRowGap: 24px;
2457
+ }
2458
+
2459
+ infinite-scroller.grid {
2460
+ --infiniteScrollerCellMinWidth: var(
2461
+ --collectionBrowserCellMinWidth,
2462
+ 17rem
2463
+ );
2464
+ --infiniteScrollerCellMaxWidth: var(
2465
+ --collectionBrowserCellMaxWidth,
2466
+ 1fr
2467
+ );
2468
+ }
2469
+
2470
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
2471
+ @media screen and (max-width: 880px) {
2472
+ infinite-scroller.grid {
2473
+ --infiniteScrollerCellMinWidth: var(
2474
+ --collectionBrowserCellMinWidth,
2475
+ 15rem
2476
+ );
2477
+ }
2478
+ }
2479
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
2480
+ @media screen and (max-width: 360px) {
2481
+ infinite-scroller.grid {
2482
+ --infiniteScrollerCellMinWidth: var(
2483
+ --collectionBrowserCellMinWidth,
2484
+ 12rem
2485
+ );
2486
+ }
2487
+ }
2488
+
2489
+ infinite-scroller.hidden {
2490
+ display: none;
2491
+ }
2508
2492
  `,
2509
2493
  ];
2510
2494
  }
@@ -2695,27 +2679,6 @@ __decorate([
2695
2679
  __decorate([
2696
2680
  state()
2697
2681
  ], CollectionBrowser.prototype, "placeholderType", void 0);
2698
- __decorate([
2699
- query('#content-container')
2700
- ], CollectionBrowser.prototype, "contentContainer", void 0);
2701
- __decorate([
2702
- query('#left-column')
2703
- ], CollectionBrowser.prototype, "leftColumn", void 0);
2704
- __decorate([
2705
- query('collection-facets')
2706
- ], CollectionBrowser.prototype, "collectionFacets", void 0);
2707
- __decorate([
2708
- query('manage-bar')
2709
- ], CollectionBrowser.prototype, "manageBar", void 0);
2710
- __decorate([
2711
- query('smart-facet-bar')
2712
- ], CollectionBrowser.prototype, "smartFacetBar", void 0);
2713
- __decorate([
2714
- property({ type: Object, attribute: false })
2715
- ], CollectionBrowser.prototype, "analyticsHandler", void 0);
2716
- __decorate([
2717
- query('infinite-scroller')
2718
- ], CollectionBrowser.prototype, "infiniteScroller", void 0);
2719
2682
  __decorate([
2720
2683
  state()
2721
2684
  ], CollectionBrowser.prototype, "selectedTVNetwork", void 0);
@@ -2731,12 +2694,33 @@ __decorate([
2731
2694
  __decorate([
2732
2695
  state()
2733
2696
  ], CollectionBrowser.prototype, "loadingShows", void 0);
2697
+ __decorate([
2698
+ query('#content-container')
2699
+ ], CollectionBrowser.prototype, "contentContainer", void 0);
2700
+ __decorate([
2701
+ query('#left-column')
2702
+ ], CollectionBrowser.prototype, "leftColumn", void 0);
2703
+ __decorate([
2704
+ query('collection-facets')
2705
+ ], CollectionBrowser.prototype, "collectionFacets", void 0);
2706
+ __decorate([
2707
+ query('manage-bar')
2708
+ ], CollectionBrowser.prototype, "manageBar", void 0);
2709
+ __decorate([
2710
+ query('smart-facet-bar')
2711
+ ], CollectionBrowser.prototype, "smartFacetBar", void 0);
2734
2712
  __decorate([
2735
2713
  query('#tv-networks')
2736
2714
  ], CollectionBrowser.prototype, "tvNetworksDropdown", void 0);
2737
2715
  __decorate([
2738
2716
  query('#tv-shows')
2739
2717
  ], CollectionBrowser.prototype, "tvShowsDropdown", void 0);
2718
+ __decorate([
2719
+ property({ type: Object, attribute: false })
2720
+ ], CollectionBrowser.prototype, "analyticsHandler", void 0);
2721
+ __decorate([
2722
+ query('infinite-scroller')
2723
+ ], CollectionBrowser.prototype, "infiniteScroller", void 0);
2740
2724
  CollectionBrowser = __decorate([
2741
2725
  customElement('collection-browser')
2742
2726
  ], CollectionBrowser);