@internetarchive/collection-browser 2.7.7-alpha.2 → 2.7.8-alpha1

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 (304) hide show
  1. package/.github/workflows/ci.yml +3 -3
  2. package/dist/index.js +2 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/src/app-root.d.ts +9 -1
  5. package/dist/src/app-root.js +40 -6
  6. package/dist/src/app-root.js.map +1 -1
  7. package/dist/src/assets/img/icons/arrow-left.d.ts +1 -1
  8. package/dist/src/assets/img/icons/arrow-right.d.ts +1 -1
  9. package/dist/src/assets/img/icons/chevron.d.ts +1 -1
  10. package/dist/src/assets/img/icons/contract.d.ts +1 -1
  11. package/dist/src/assets/img/icons/empty-query.d.ts +1 -1
  12. package/dist/src/assets/img/icons/expand.d.ts +1 -1
  13. package/dist/src/assets/img/icons/eye-closed.d.ts +1 -1
  14. package/dist/src/assets/img/icons/eye.d.ts +1 -1
  15. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  16. package/dist/src/assets/img/icons/favorite-unfilled.d.ts +1 -1
  17. package/dist/src/assets/img/icons/filter.d.ts +1 -1
  18. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  19. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  20. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  21. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  22. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  23. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  24. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  25. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  26. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  27. package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -1
  28. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  29. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  30. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  31. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  32. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  33. package/dist/src/assets/img/icons/null-result.d.ts +1 -1
  34. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  35. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  36. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  37. package/dist/src/assets/img/icons/views.d.ts +1 -1
  38. package/dist/src/circular-activity-indicator.d.ts +1 -1
  39. package/dist/src/circular-activity-indicator.js.map +1 -1
  40. package/dist/src/collection-browser.d.ts +21 -1
  41. package/dist/src/collection-browser.js +60 -17
  42. package/dist/src/collection-browser.js.map +1 -1
  43. package/dist/src/collection-facets/facet-row.js.map +1 -1
  44. package/dist/src/collection-facets/facet-tombstone-row.d.ts +1 -1
  45. package/dist/src/collection-facets/facet-tombstone-row.js.map +1 -1
  46. package/dist/src/collection-facets/facets-template.js +5 -5
  47. package/dist/src/collection-facets/facets-template.js.map +1 -1
  48. package/dist/src/collection-facets/more-facets-content.d.ts +1 -1
  49. package/dist/src/collection-facets/more-facets-content.js +4 -2
  50. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  51. package/dist/src/collection-facets/more-facets-pagination.js +0 -1
  52. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
  53. package/dist/src/collection-facets/smart-facets/dedupe.js.map +1 -1
  54. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.js.map +1 -1
  55. package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js +1 -1
  56. package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js.map +1 -1
  57. package/dist/src/collection-facets/smart-facets/models.d.ts +2 -2
  58. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +4 -1
  59. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  60. package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +1 -1
  61. package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -1
  62. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +1 -1
  63. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -1
  64. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -1
  65. package/dist/src/collection-facets/toggle-switch.d.ts +2 -2
  66. package/dist/src/collection-facets/toggle-switch.js +2 -2
  67. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  68. package/dist/src/collection-facets.js +3 -2
  69. package/dist/src/collection-facets.js.map +1 -1
  70. package/dist/src/data-source/collection-browser-data-source-interface.d.ts +4 -0
  71. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  72. package/dist/src/data-source/collection-browser-data-source.d.ts +4 -0
  73. package/dist/src/data-source/collection-browser-data-source.js +22 -8
  74. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  75. package/dist/src/data-source/collection-browser-query-state.d.ts +1 -0
  76. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  77. package/dist/src/data-source/models.d.ts +2 -2
  78. package/dist/src/empty-placeholder.d.ts +1 -1
  79. package/dist/src/empty-placeholder.js +11 -10
  80. package/dist/src/empty-placeholder.js.map +1 -1
  81. package/dist/src/expanded-date-picker.js.map +1 -1
  82. package/dist/src/language-code-handler/language-code-handler.js.map +1 -1
  83. package/dist/src/language-code-handler/language-code-mapping.js +86 -86
  84. package/dist/src/language-code-handler/language-code-mapping.js.map +1 -1
  85. package/dist/src/manage/manage-bar.d.ts +32 -9
  86. package/dist/src/manage/manage-bar.js +121 -27
  87. package/dist/src/manage/manage-bar.js.map +1 -1
  88. package/dist/src/manage/remove-items-modal-content.d.ts +9 -0
  89. package/dist/src/manage/remove-items-modal-content.js +104 -0
  90. package/dist/src/manage/remove-items-modal-content.js.map +1 -0
  91. package/dist/src/mediatype/mediatype-config.js +0 -1
  92. package/dist/src/mediatype/mediatype-config.js.map +1 -1
  93. package/dist/src/models.d.ts +24 -15
  94. package/dist/src/models.js +3 -3
  95. package/dist/src/models.js.map +1 -1
  96. package/dist/src/restoration-state-handler.js +1 -0
  97. package/dist/src/restoration-state-handler.js.map +1 -1
  98. package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +1 -1
  99. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js.map +1 -1
  100. package/dist/src/sort-filter-bar/alpha-bar.js +9 -9
  101. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  102. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
  103. package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
  104. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -1
  105. package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -1
  106. package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -1
  107. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
  108. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
  109. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
  110. package/dist/src/sort-filter-bar/sort-filter-bar.js +2 -1
  111. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  112. package/dist/src/tiles/base-tile-component.js.map +1 -1
  113. package/dist/src/tiles/collection-browser-loading-tile.d.ts +1 -1
  114. package/dist/src/tiles/collection-browser-loading-tile.js.map +1 -1
  115. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  116. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  117. package/dist/src/tiles/grid/item-tile.js +3 -2
  118. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  119. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  120. package/dist/src/tiles/grid/tile-stats.d.ts +1 -1
  121. package/dist/src/tiles/grid/tile-stats.js +2 -2
  122. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  123. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  124. package/dist/src/tiles/hover/tile-hover-pane.d.ts +1 -1
  125. package/dist/src/tiles/hover/tile-hover-pane.js +1 -3
  126. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
  127. package/dist/src/tiles/image-block.d.ts +1 -1
  128. package/dist/src/tiles/image-block.js +1 -1
  129. package/dist/src/tiles/image-block.js.map +1 -1
  130. package/dist/src/tiles/item-image.d.ts +1 -1
  131. package/dist/src/tiles/item-image.js +2 -2
  132. package/dist/src/tiles/item-image.js.map +1 -1
  133. package/dist/src/tiles/list/tile-list-compact-header.d.ts +1 -1
  134. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  135. package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
  136. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  137. package/dist/src/tiles/list/tile-list.js +6 -4
  138. package/dist/src/tiles/list/tile-list.js.map +1 -1
  139. package/dist/src/tiles/mediatype-icon.d.ts +1 -1
  140. package/dist/src/tiles/mediatype-icon.js.map +1 -1
  141. package/dist/src/tiles/overlay/icon-overlay.js.map +1 -1
  142. package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
  143. package/dist/src/tiles/review-block.js.map +1 -1
  144. package/dist/src/tiles/text-snippet-block.js.map +1 -1
  145. package/dist/src/tiles/tile-dispatcher.d.ts +1 -1
  146. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  147. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  148. package/dist/src/utils/facet-utils.js.map +1 -1
  149. package/dist/src/utils/format-count.d.ts +2 -2
  150. package/dist/src/utils/format-count.js +1 -0
  151. package/dist/src/utils/format-count.js.map +1 -1
  152. package/dist/src/utils/format-date.d.ts +1 -1
  153. package/dist/src/utils/format-date.js.map +1 -1
  154. package/dist/src/utils/format-unit-size.js.map +1 -1
  155. package/dist/src/utils/log.js +3 -1
  156. package/dist/src/utils/log.js.map +1 -1
  157. package/dist/src/utils/resolve-mediatype.js.map +1 -1
  158. package/dist/test/collection-browser.test.js +17 -2
  159. package/dist/test/collection-browser.test.js.map +1 -1
  160. package/dist/test/collection-facets/facet-row.test.js +1 -4
  161. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  162. package/dist/test/collection-facets/facets-template.test.js.map +1 -1
  163. package/dist/test/collection-facets/more-facets-content.test.js +1 -0
  164. package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
  165. package/dist/test/collection-facets/more-facets-pagination.test.js +1 -0
  166. package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
  167. package/dist/test/collection-facets/toggle-switch.test.js +3 -12
  168. package/dist/test/collection-facets/toggle-switch.test.js.map +1 -1
  169. package/dist/test/collection-facets.test.js +1 -0
  170. package/dist/test/collection-facets.test.js.map +1 -1
  171. package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -1
  172. package/dist/test/empty-placeholder.test.js +1 -0
  173. package/dist/test/empty-placeholder.test.js.map +1 -1
  174. package/dist/test/expanded-date-picker.test.js.map +1 -1
  175. package/dist/test/icon-overlay.test.js +1 -0
  176. package/dist/test/icon-overlay.test.js.map +1 -1
  177. package/dist/test/image-block.test.js +1 -0
  178. package/dist/test/image-block.test.js.map +1 -1
  179. package/dist/test/item-image.test.js +1 -0
  180. package/dist/test/item-image.test.js.map +1 -1
  181. package/dist/test/manage/manage-bar.test.d.ts +1 -0
  182. package/dist/test/manage/manage-bar.test.js +26 -10
  183. package/dist/test/manage/manage-bar.test.js.map +1 -1
  184. package/dist/test/manage/remove-items-modal-content.test.d.ts +1 -0
  185. package/dist/test/manage/remove-items-modal-content.test.js +66 -0
  186. package/dist/test/manage/remove-items-modal-content.test.js.map +1 -0
  187. package/dist/test/mocks/mock-search-responses.js.map +1 -1
  188. package/dist/test/mocks/mock-search-service.js.map +1 -1
  189. package/dist/test/restoration-state-handler.test.js.map +1 -1
  190. package/dist/test/review-block.test.js +1 -0
  191. package/dist/test/review-block.test.js.map +1 -1
  192. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +1 -1
  193. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  194. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +1 -0
  195. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  196. package/dist/test/text-overlay.test.js +1 -0
  197. package/dist/test/text-overlay.test.js.map +1 -1
  198. package/dist/test/text-snippet-block.test.js +1 -0
  199. package/dist/test/text-snippet-block.test.js.map +1 -1
  200. package/dist/test/tile-stats.test.js +23 -22
  201. package/dist/test/tile-stats.test.js.map +1 -1
  202. package/dist/test/tiles/grid/account-tile.test.js +1 -0
  203. package/dist/test/tiles/grid/account-tile.test.js.map +1 -1
  204. package/dist/test/tiles/grid/collection-tile.test.js +1 -0
  205. package/dist/test/tiles/grid/collection-tile.test.js.map +1 -1
  206. package/dist/test/tiles/grid/item-tile.test.js +1 -0
  207. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  208. package/dist/test/tiles/grid/search-tile.test.js +1 -0
  209. package/dist/test/tiles/grid/search-tile.test.js.map +1 -1
  210. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
  211. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +1 -1
  212. package/dist/test/tiles/list/tile-list-compact.test.js +1 -0
  213. package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
  214. package/dist/test/tiles/list/tile-list.test.js +1 -0
  215. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  216. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  217. package/dist/test/utils/format-count.test.js.map +1 -1
  218. package/dist/test/utils/format-date.test.js.map +1 -1
  219. package/dist/test/utils/local-date-from-utc.test.js.map +1 -1
  220. package/index.html +3 -0
  221. package/package.json +38 -40
  222. package/src/app-root.ts +60 -25
  223. package/src/collection-browser.ts +101 -50
  224. package/src/collection-facets/facets-template.ts +6 -7
  225. package/src/collection-facets/more-facets-content.ts +13 -11
  226. package/src/collection-facets/more-facets-pagination.ts +2 -3
  227. package/src/collection-facets/smart-facets/dedupe.ts +2 -2
  228. package/src/collection-facets/smart-facets/heuristics/query-keywords-heuristic.ts +1 -1
  229. package/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.ts +6 -6
  230. package/src/collection-facets/smart-facets/smart-facet-bar.ts +8 -6
  231. package/src/collection-facets/smart-facets/smart-facet-button.ts +3 -5
  232. package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +4 -4
  233. package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +1 -1
  234. package/src/collection-facets/toggle-switch.ts +2 -2
  235. package/src/collection-facets.ts +19 -18
  236. package/src/data-source/collection-browser-data-source-interface.ts +6 -5
  237. package/src/data-source/collection-browser-data-source.ts +48 -37
  238. package/src/data-source/collection-browser-query-state.ts +1 -0
  239. package/src/empty-placeholder.ts +16 -19
  240. package/src/expanded-date-picker.ts +1 -1
  241. package/src/language-code-handler/language-code-handler.ts +1 -1
  242. package/src/manage/manage-bar.ts +132 -38
  243. package/src/manage/remove-items-modal-content.ts +102 -0
  244. package/src/mediatype/mediatype-config.ts +0 -1
  245. package/src/models.ts +13 -3
  246. package/src/restoration-state-handler.ts +15 -14
  247. package/src/sort-filter-bar/alpha-bar.ts +17 -16
  248. package/src/sort-filter-bar/sort-filter-bar.ts +15 -14
  249. package/src/tiles/grid/account-tile.ts +1 -1
  250. package/src/tiles/grid/collection-tile.ts +1 -1
  251. package/src/tiles/grid/item-tile.ts +9 -9
  252. package/src/tiles/grid/tile-stats.ts +4 -4
  253. package/src/tiles/hover/hover-pane-controller.ts +1 -1
  254. package/src/tiles/hover/tile-hover-pane.ts +2 -4
  255. package/src/tiles/item-image.ts +1 -1
  256. package/src/tiles/list/tile-list-compact.ts +2 -2
  257. package/src/tiles/list/tile-list.ts +24 -22
  258. package/src/tiles/tile-dispatcher.ts +5 -5
  259. package/src/tiles/tile-display-value-provider.ts +4 -4
  260. package/src/utils/facet-utils.ts +6 -6
  261. package/src/utils/format-count.ts +3 -2
  262. package/src/utils/format-date.ts +1 -1
  263. package/src/utils/format-unit-size.ts +1 -1
  264. package/src/utils/log.ts +3 -1
  265. package/test/collection-browser.test.ts +145 -123
  266. package/test/collection-facets/facet-row.test.ts +28 -31
  267. package/test/collection-facets/facets-template.test.ts +9 -9
  268. package/test/collection-facets/more-facets-content.test.ts +15 -14
  269. package/test/collection-facets/more-facets-pagination.test.ts +19 -18
  270. package/test/collection-facets/toggle-switch.test.ts +18 -28
  271. package/test/collection-facets.test.ts +37 -36
  272. package/test/data-source/collection-browser-data-source.test.ts +2 -2
  273. package/test/empty-placeholder.test.ts +7 -6
  274. package/test/expanded-date-picker.test.ts +18 -17
  275. package/test/icon-overlay.test.ts +1 -0
  276. package/test/image-block.test.ts +7 -6
  277. package/test/item-image.test.ts +1 -0
  278. package/test/manage/manage-bar.test.ts +52 -28
  279. package/test/manage/remove-items-modal-content.test.ts +82 -0
  280. package/test/mocks/mock-search-responses.ts +1 -2
  281. package/test/mocks/mock-search-service.ts +1 -1
  282. package/test/restoration-state-handler.test.ts +12 -12
  283. package/test/review-block.test.ts +2 -1
  284. package/test/sort-filter-bar/alpha-bar-tooltip.test.ts +1 -1
  285. package/test/sort-filter-bar/alpha-bar.test.ts +5 -5
  286. package/test/sort-filter-bar/sort-filter-bar.test.ts +39 -38
  287. package/test/text-overlay.test.ts +1 -0
  288. package/test/text-snippet-block.test.ts +6 -5
  289. package/test/tile-stats.test.ts +35 -26
  290. package/test/tiles/grid/account-tile.test.ts +3 -2
  291. package/test/tiles/grid/collection-tile.test.ts +4 -3
  292. package/test/tiles/grid/item-tile.test.ts +14 -13
  293. package/test/tiles/grid/search-tile.test.ts +2 -1
  294. package/test/tiles/hover/hover-pane-controller.test.ts +15 -15
  295. package/test/tiles/hover/tile-hover-pane.test.ts +5 -5
  296. package/test/tiles/list/tile-list-compact.test.ts +2 -1
  297. package/test/tiles/list/tile-list.test.ts +11 -10
  298. package/test/tiles/tile-dispatcher.test.ts +5 -5
  299. package/test/utils/format-count.test.ts +1 -1
  300. package/test/utils/format-date.test.ts +1 -1
  301. package/test/utils/local-date-from-utc.test.ts +1 -1
  302. package/tsconfig.json +1 -0
  303. package/.prettierignore +0 -1
  304. package/eslint.config.mjs +0 -53
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-continue */
2
+
1
3
  import {
2
4
  css,
3
5
  html,
@@ -66,7 +68,7 @@ export class SmartFacetBar extends LitElement {
66
68
  this.smartFacets,
67
69
  f =>
68
70
  `${f[0].label}|${f[0].facets[0].facetType}|${f[0].facets[0].bucketKey}`,
69
- facet => this.makeSmartFacet(facet),
71
+ facet => this.makeSmartFacet(facet)
70
72
  )}
71
73
  </div>
72
74
  `;
@@ -188,7 +190,7 @@ export class SmartFacetBar extends LitElement {
188
190
  key === 'mediatype' &&
189
191
  this.selectedFacets &&
190
192
  Object.values(this.selectedFacets.mediatype).some(
191
- bucket => bucket.state !== 'none',
193
+ bucket => bucket.state !== 'none'
192
194
  )
193
195
  ) {
194
196
  continue;
@@ -208,7 +210,7 @@ export class SmartFacetBar extends LitElement {
208
210
  if (facetType === 'mediatype') {
209
211
  facets.push(
210
212
  [this.toSmartFacet(facetType, [unusedBuckets[0]])],
211
- [this.toSmartFacet(facetType, [unusedBuckets[1]])],
213
+ [this.toSmartFacet(facetType, [unusedBuckets[1]])]
212
214
  );
213
215
  } else if (facetType === 'collection' || facetType === 'subject') {
214
216
  const topBuckets = unusedBuckets.slice(0, 5);
@@ -224,7 +226,7 @@ export class SmartFacetBar extends LitElement {
224
226
 
225
227
  private toSmartFacet(
226
228
  facetType: FacetOption,
227
- buckets: Bucket[],
229
+ buckets: Bucket[]
228
230
  // prefix = true
229
231
  ): SmartFacet {
230
232
  return {
@@ -257,7 +259,7 @@ export class SmartFacetBar extends LitElement {
257
259
  this.selectedFacets,
258
260
  facet.facetType,
259
261
  facet.bucket,
260
- true,
262
+ true
261
263
  );
262
264
  }
263
265
 
@@ -284,7 +286,7 @@ export class SmartFacetBar extends LitElement {
284
286
  this.selectedFacets,
285
287
  facet.facetType,
286
288
  facet.bucket,
287
- true,
289
+ true
288
290
  );
289
291
  }
290
292
 
@@ -28,9 +28,7 @@ export class SmartFacetButton extends LitElement {
28
28
 
29
29
  const displayText = capitalize(
30
30
  (this.labelPrefix ? `${this.labelPrefix} ` : '') +
31
- (this.facetInfo.label ??
32
- firstFacet.displayText ??
33
- firstFacet.bucketKey),
31
+ (this.facetInfo.label ?? firstFacet.displayText ?? firstFacet.bucketKey)
34
32
  );
35
33
  if (!displayText) return nothing;
36
34
 
@@ -63,7 +61,7 @@ export class SmartFacetButton extends LitElement {
63
61
  for (const facet of this.facetInfo.facets) {
64
62
  url.searchParams.append(
65
63
  'and[]',
66
- encodeURIComponent(`${facet.facetType}:"${facet.bucketKey}"`),
64
+ encodeURIComponent(`${facet.facetType}:"${facet.bucketKey}"`)
67
65
  );
68
66
  }
69
67
  }
@@ -90,7 +88,7 @@ export class SmartFacetButton extends LitElement {
90
88
  negative: false,
91
89
  })),
92
90
  },
93
- }),
91
+ })
94
92
  );
95
93
  }
96
94
 
@@ -67,7 +67,7 @@ export class SmartFacetDropdown extends LitElement {
67
67
  private get activeDropdownOption(): optionInterface | undefined {
68
68
  if (!this.activeFacetRef) return undefined;
69
69
  return this.dropdownOptions.find(
70
- opt => opt.id === this.activeFacetRef?.bucketKey,
70
+ opt => opt.id === this.activeFacetRef?.bucketKey
71
71
  );
72
72
  }
73
73
 
@@ -77,7 +77,7 @@ export class SmartFacetDropdown extends LitElement {
77
77
  let selectedSmartFacet;
78
78
  for (const smartFacet of this.facetInfo) {
79
79
  const selectedRef = smartFacet.facets.find(
80
- b => b.bucketKey === e.detail.option.id,
80
+ b => b.bucketKey === e.detail.option.id
81
81
  );
82
82
  if (selectedRef) {
83
83
  this.activeFacetRef = selectedRef;
@@ -103,14 +103,14 @@ export class SmartFacetDropdown extends LitElement {
103
103
  },
104
104
  ],
105
105
  },
106
- }),
106
+ })
107
107
  );
108
108
  }
109
109
 
110
110
  private onDropdownClick(): void {
111
111
  log('smart dropdown: onDropdownClick', this);
112
112
  this.dispatchEvent(
113
- new CustomEvent<SmartFacetDropdown>('dropdownClick', { detail: this }),
113
+ new CustomEvent<SmartFacetDropdown>('dropdownClick', { detail: this })
114
114
  );
115
115
  }
116
116
 
@@ -13,7 +13,7 @@ export class SmartQueryHeuristicGroup implements SmartQueryHeuristic {
13
13
 
14
14
  async getRecommendedFacets(query: string): Promise<SmartFacet[]> {
15
15
  const promises = SmartQueryHeuristicGroup.HEURISTICS.map(HeuristicCtor =>
16
- new HeuristicCtor().getRecommendedFacets(query),
16
+ new HeuristicCtor().getRecommendedFacets(query)
17
17
  );
18
18
 
19
19
  return dedupe((await Promise.all(promises)).flat());
@@ -84,8 +84,8 @@ export class ToggleSwitch extends LitElement {
84
84
  */
85
85
  get selectedLabel(): string {
86
86
  return this.side === 'left'
87
- ? (this.leftLabel ?? this.leftValue)
88
- : (this.rightLabel ?? this.rightValue);
87
+ ? this.leftLabel ?? this.leftValue
88
+ : this.rightLabel ?? this.rightValue;
89
89
  }
90
90
 
91
91
  private handleClick(): void {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-duplicates */
1
2
  import {
2
3
  css,
3
4
  html,
@@ -170,7 +171,7 @@ export class CollectionFacets extends LitElement {
170
171
  : nothing}
171
172
  ${this.collectionPartOfTemplate}
172
173
  ${this.mergedFacets.map(facetGroup =>
173
- this.getFacetGroupTemplate(facetGroup),
174
+ this.getFacetGroupTemplate(facetGroup)
174
175
  )}
175
176
  </div>
176
177
  `;
@@ -348,7 +349,7 @@ export class CollectionFacets extends LitElement {
348
349
  e: CustomEvent<{
349
350
  minDate: string;
350
351
  maxDate: string;
351
- }>,
352
+ }>
352
353
  ): void => {
353
354
  const { minDate, maxDate } = e.detail;
354
355
  const event = new CustomEvent('histogramDateRangeUpdated', {
@@ -365,10 +366,10 @@ export class CollectionFacets extends LitElement {
365
366
 
366
367
  facetDisplayOrder.forEach(facetKey => {
367
368
  const selectedFacetGroup = this.selectedFacetGroups.find(
368
- group => group.key === facetKey,
369
+ group => group.key === facetKey
369
370
  );
370
371
  const aggregateFacetGroup = this.aggregationFacetGroups.find(
371
- group => group.key === facetKey,
372
+ group => group.key === facetKey
372
373
  );
373
374
 
374
375
  // if the user selected a facet, but it's not in the aggregation, we add it as-is
@@ -387,7 +388,7 @@ export class CollectionFacets extends LitElement {
387
388
  let bucketsWithCount =
388
389
  selectedFacetGroup?.buckets.map(bucket => {
389
390
  const selectedBucket = aggregateFacetGroup.buckets.find(
390
- b => b.key === bucket.key,
391
+ b => b.key === bucket.key
391
392
  );
392
393
  return selectedBucket
393
394
  ? {
@@ -411,7 +412,7 @@ export class CollectionFacets extends LitElement {
411
412
  * - additionally want to show all items (selected/suppressed) in page facet area
412
413
  */
413
414
  let allowedFacetCount = Object.keys(
414
- (selectedFacetGroup?.buckets as []) || [],
415
+ (selectedFacetGroup?.buckets as []) || []
415
416
  )?.length;
416
417
  if (allowedFacetCount < this.allowedFacetCount) {
417
418
  allowedFacetCount = this.allowedFacetCount; // splice start index from 0th
@@ -420,7 +421,7 @@ export class CollectionFacets extends LitElement {
420
421
  // For lending facets, only include a specific subset of buckets
421
422
  if (facetKey === 'lending') {
422
423
  bucketsWithCount = bucketsWithCount.filter(
423
- bucket => lendingFacetKeysVisibility[bucket.key as LendingFacetKey],
424
+ bucket => lendingFacetKeysVisibility[bucket.key as LendingFacetKey]
424
425
  );
425
426
  }
426
427
 
@@ -430,13 +431,13 @@ export class CollectionFacets extends LitElement {
430
431
  // For mediatype facets, ensure the collection bucket is always shown if present
431
432
  if (facetKey === 'mediatype') {
432
433
  const collectionIndex = bucketsWithCount.findIndex(
433
- bucket => bucket.key === 'collection',
434
+ bucket => bucket.key === 'collection'
434
435
  );
435
436
 
436
437
  if (collectionIndex >= allowedFacetCount) {
437
438
  const [collectionBucket] = bucketsWithCount.splice(
438
439
  collectionIndex,
439
- 1,
440
+ 1
440
441
  );
441
442
 
442
443
  // If we're showing lots of selected facets, ensure we're not cutting off the last one
@@ -483,7 +484,7 @@ export class CollectionFacets extends LitElement {
483
484
  count: facetData.count,
484
485
  state: facetData.state,
485
486
  };
486
- },
487
+ }
487
488
  );
488
489
 
489
490
  return {
@@ -491,7 +492,7 @@ export class CollectionFacets extends LitElement {
491
492
  key: option,
492
493
  buckets,
493
494
  };
494
- },
495
+ }
495
496
  );
496
497
 
497
498
  return facetGroups;
@@ -511,7 +512,7 @@ export class CollectionFacets extends LitElement {
511
512
  if (!title) return;
512
513
 
513
514
  let castedBuckets = aggregation.getSortedBuckets(
514
- defaultFacetSort[option],
515
+ defaultFacetSort[option]
515
516
  ) as Bucket[];
516
517
 
517
518
  if (option === 'collection') {
@@ -555,7 +556,7 @@ export class CollectionFacets extends LitElement {
555
556
  * chevron for the mobile view
556
557
  */
557
558
  private getFacetGroupTemplate(
558
- facetGroup: FacetGroup,
559
+ facetGroup: FacetGroup
559
560
  ): TemplateResult | typeof nothing {
560
561
  if (!this.facetsLoading && facetGroup.buckets.length === 0) return nothing;
561
562
 
@@ -610,7 +611,7 @@ export class CollectionFacets extends LitElement {
610
611
  return html`
611
612
  ${map(
612
613
  Array(5).fill(null),
613
- () => html`<facet-tombstone-row></facet-tombstone-row>`,
614
+ () => html`<facet-tombstone-row></facet-tombstone-row>`
614
615
  )}
615
616
  `;
616
617
  }
@@ -621,7 +622,7 @@ export class CollectionFacets extends LitElement {
621
622
  * TODO: want to fire analytics?
622
623
  */
623
624
  private searchMoreFacetsLink(
624
- facetGroup: FacetGroup,
625
+ facetGroup: FacetGroup
625
626
  ): TemplateResult | typeof nothing {
626
627
  // Don't render More... links for FTS searches
627
628
  if (!this.moreLinksVisible) {
@@ -653,7 +654,7 @@ export class CollectionFacets extends LitElement {
653
654
  label: facetGroup.key,
654
655
  });
655
656
  this.dispatchEvent(
656
- new CustomEvent('showMoreFacets', { detail: facetGroup.key }),
657
+ new CustomEvent('showMoreFacets', { detail: facetGroup.key })
657
658
  );
658
659
  }}
659
660
  data-testid="more-link-btn"
@@ -664,7 +665,7 @@ export class CollectionFacets extends LitElement {
664
665
 
665
666
  async showMoreFacetsModal(
666
667
  facetGroup: FacetGroup,
667
- sortedBy: AggregationSortType,
668
+ sortedBy: AggregationSortType
668
669
  ): Promise<void> {
669
670
  const customModalContent = html`
670
671
  <more-facets-content
@@ -723,7 +724,7 @@ export class CollectionFacets extends LitElement {
723
724
  this.selectedFacets,
724
725
  facetGroup.key,
725
726
  e.detail.bucket,
726
- true,
727
+ true
727
728
  );
728
729
 
729
730
  const event = new CustomEvent<SelectedFacets>('facetsChanged', {
@@ -155,6 +155,11 @@ export interface CollectionBrowserDataSourceInterface
155
155
  */
156
156
  reset(): void;
157
157
 
158
+ /**
159
+ * Resets the data source to its pages.
160
+ */
161
+ resetPages(): void;
162
+
158
163
  /**
159
164
  * Adds the given page of tile models to the data source.
160
165
  * If the given page number already exists, that page will be overwritten.
@@ -280,11 +285,7 @@ export interface CollectionBrowserDataSourceInterface
280
285
  * @param callback A callback function to apply on each tile model, as with Array.map
281
286
  */
282
287
  map(
283
- callback: (
284
- model: TileModel,
285
- index: number,
286
- array: TileModel[],
287
- ) => TileModel,
288
+ callback: (model: TileModel, index: number, array: TileModel[]) => TileModel
288
289
  ): void;
289
290
 
290
291
  /**
@@ -162,12 +162,13 @@ export class CollectionBrowserDataSource
162
162
  return this._initialSearchCompletePromise;
163
163
  }
164
164
 
165
+ // eslint-disable-next-line no-useless-constructor
165
166
  constructor(
166
167
  /** The host element to which this controller should attach listeners */
167
168
  private readonly host: ReactiveControllerHost &
168
169
  CollectionBrowserSearchInterface,
169
170
  /** Default size of result pages */
170
- private pageSize: number = 50,
171
+ private pageSize: number = 50
171
172
  ) {
172
173
  // Just setting some property values
173
174
  }
@@ -245,6 +246,19 @@ export class CollectionBrowserDataSource
245
246
  this.requestHostUpdate();
246
247
  }
247
248
 
249
+ /**
250
+ * @inheritdoc
251
+ */
252
+ resetPages(): void {
253
+ if (Object.keys(this.pages).length !== this.host.maxPagesToManage) {
254
+ this.pages = {};
255
+ }
256
+
257
+ // Invalidate any fetches in progress
258
+ this.fetchesInProgress.clear();
259
+ this.requestHostUpdate();
260
+ }
261
+
248
262
  /**
249
263
  * @inheritdoc
250
264
  */
@@ -263,13 +277,13 @@ export class CollectionBrowserDataSource
263
277
  const pageStartIndex = this.pageSize * i;
264
278
  this.addPage(
265
279
  firstPageNum + i,
266
- tiles.slice(pageStartIndex, pageStartIndex + this.pageSize),
280
+ tiles.slice(pageStartIndex, pageStartIndex + this.pageSize)
267
281
  );
268
282
  }
269
283
 
270
284
  const visiblePages = this.host.currentVisiblePageNumbers;
271
285
  const needsReload = visiblePages.some(
272
- page => page >= firstPageNum && page <= firstPageNum + numPages,
286
+ page => page >= firstPageNum && page <= firstPageNum + numPages
273
287
  );
274
288
  if (needsReload) {
275
289
  this.refreshVisibleResults();
@@ -430,19 +444,16 @@ export class CollectionBrowserDataSource
430
444
  * @inheritdoc
431
445
  */
432
446
  map(
433
- callback: (
434
- model: TileModel,
435
- index: number,
436
- array: TileModel[],
437
- ) => TileModel,
447
+ callback: (model: TileModel, index: number, array: TileModel[]) => TileModel
438
448
  ): void {
449
+ if (!Object.keys(this.pages).length) return;
439
450
  this.pages = Object.fromEntries(
440
451
  Object.entries(this.pages).map(([page, tileModels]) => [
441
452
  page,
442
453
  tileModels.map((model, index, array) =>
443
- model ? callback(model, index, array) : model,
454
+ model ? callback(model, index, array) : model
444
455
  ),
445
- ]),
456
+ ])
446
457
  );
447
458
  this.requestHostUpdate();
448
459
  this.refreshVisibleResults();
@@ -539,12 +550,12 @@ export class CollectionBrowserDataSource
539
550
  * @returns A filtered array of tile models satisfying the predicate
540
551
  */
541
552
  private getFilteredTileModels(
542
- predicate: (model: TileModel, index: number, array: TileModel[]) => unknown,
553
+ predicate: (model: TileModel, index: number, array: TileModel[]) => unknown
543
554
  ): TileModel[] {
544
555
  return Object.values(this.pages)
545
556
  .flat()
546
557
  .filter((model, index, array) =>
547
- model ? predicate(model, index, array) : false,
558
+ model ? predicate(model, index, array) : false
548
559
  );
549
560
  }
550
561
 
@@ -656,25 +667,25 @@ export class CollectionBrowserDataSource
656
667
  builder.addFilter(
657
668
  'year',
658
669
  this.host.minSelectedDate,
659
- FilterConstraint.GREATER_OR_EQUAL,
670
+ FilterConstraint.GREATER_OR_EQUAL
660
671
  );
661
672
  }
662
673
  if (this.host.maxSelectedDate) {
663
674
  builder.addFilter(
664
675
  'year',
665
676
  this.host.maxSelectedDate,
666
- FilterConstraint.LESS_OR_EQUAL,
677
+ FilterConstraint.LESS_OR_EQUAL
667
678
  );
668
679
  }
669
680
 
670
681
  // Add any selected facets
671
682
  if (this.host.selectedFacets) {
672
683
  for (const [facetName, facetValues] of Object.entries(
673
- this.host.selectedFacets,
684
+ this.host.selectedFacets
674
685
  )) {
675
686
  const { name, values } = this.prepareFacetForFetch(
676
687
  facetName,
677
- facetValues,
688
+ facetValues
678
689
  );
679
690
  for (const [value, bucket] of Object.entries(values)) {
680
691
  let constraint;
@@ -696,14 +707,14 @@ export class CollectionBrowserDataSource
696
707
  builder.addFilter(
697
708
  'firstTitle',
698
709
  this.host.selectedTitleFilter,
699
- FilterConstraint.INCLUDE,
710
+ FilterConstraint.INCLUDE
700
711
  );
701
712
  }
702
713
  if (this.host.selectedCreatorFilter) {
703
714
  builder.addFilter(
704
715
  'firstCreator',
705
716
  this.host.selectedCreatorFilter,
706
- FilterConstraint.INCLUDE,
717
+ FilterConstraint.INCLUDE
707
718
  );
708
719
  }
709
720
 
@@ -791,7 +802,7 @@ export class CollectionBrowserDataSource
791
802
  if (!this.host.selectedFacets) return undefined;
792
803
  const facetClauses = [];
793
804
  for (const [facetName, facetValues] of Object.entries(
794
- this.host.selectedFacets,
805
+ this.host.selectedFacets
795
806
  )) {
796
807
  facetClauses.push(this.buildFacetClause(facetName, facetValues));
797
808
  }
@@ -844,11 +855,11 @@ export class CollectionBrowserDataSource
844
855
  */
845
856
  private buildFacetClause(
846
857
  facetName: string,
847
- facetValues: Record<string, FacetBucket>,
858
+ facetValues: Record<string, FacetBucket>
848
859
  ): string {
849
860
  const { name: facetQueryName, values } = this.prepareFacetForFetch(
850
861
  facetName,
851
- facetValues,
862
+ facetValues
852
863
  );
853
864
  const facetEntries = Object.entries(values);
854
865
  if (facetEntries.length === 0) return '';
@@ -872,7 +883,7 @@ export class CollectionBrowserDataSource
872
883
  */
873
884
  private prepareFacetForFetch(
874
885
  facetName: string,
875
- facetValues: Record<string, FacetBucket>,
886
+ facetValues: Record<string, FacetBucket>
876
887
  ): { name: string; values: Record<string, FacetBucket> } {
877
888
  // eslint-disable-next-line prefer-const
878
889
  let [normalizedName, normalizedValues] = [facetName, facetValues];
@@ -894,7 +905,7 @@ export class CollectionBrowserDataSource
894
905
  */
895
906
  private joinFacetClauses(facetClauses: string[]): string | undefined {
896
907
  const nonEmptyFacetClauses = facetClauses.filter(
897
- clause => clause.length > 0,
908
+ clause => clause.length > 0
898
909
  );
899
910
  return nonEmptyFacetClauses.length > 0
900
911
  ? `(${nonEmptyFacetClauses.join(' AND ')})`
@@ -928,12 +939,12 @@ export class CollectionBrowserDataSource
928
939
  };
929
940
  params.uid = await this.requestUID(
930
941
  { ...params, sort: sortParams },
931
- 'aggregations',
942
+ 'aggregations'
932
943
  );
933
944
 
934
945
  const searchResponse = await this.host.searchService?.search(
935
946
  params,
936
- this.host.searchType,
947
+ this.host.searchType
937
948
  );
938
949
  const success = searchResponse?.success;
939
950
 
@@ -950,10 +961,10 @@ export class CollectionBrowserDataSource
950
961
  const detailMsg = searchResponse?.error?.details?.message;
951
962
 
952
963
  if (!errorMsg && !detailMsg) {
953
- // @ts-expect-error: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
964
+ // @ts-ignore: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
954
965
  window?.Sentry?.captureMessage?.(
955
966
  'Missing or malformed facet response from backend',
956
- 'error',
967
+ 'error'
957
968
  );
958
969
  }
959
970
 
@@ -1048,7 +1059,7 @@ export class CollectionBrowserDataSource
1048
1059
  // log('=== FIRING PAGE REQUEST ===', params);
1049
1060
  const searchResponse = await this.host.searchService?.search(
1050
1061
  params,
1051
- this.host.searchType,
1062
+ this.host.searchType
1052
1063
  );
1053
1064
  // log('=== RECEIVED PAGE RESPONSE IN CB ===', searchResponse);
1054
1065
  const success = searchResponse?.success;
@@ -1070,7 +1081,7 @@ export class CollectionBrowserDataSource
1070
1081
 
1071
1082
  if (!this.queryErrorMessage) {
1072
1083
  this.queryErrorMessage = 'Missing or malformed response from backend';
1073
- // @ts-expect-error: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
1084
+ // @ts-ignore: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
1074
1085
  window?.Sentry?.captureMessage?.(this.queryErrorMessage, 'error');
1075
1086
  }
1076
1087
 
@@ -1097,7 +1108,7 @@ export class CollectionBrowserDataSource
1097
1108
 
1098
1109
  if (this.collectionExtraInfo) {
1099
1110
  this.parentCollections = [].concat(
1100
- this.collectionExtraInfo.public_metadata?.collection ?? [],
1111
+ this.collectionExtraInfo.public_metadata?.collection ?? []
1101
1112
  );
1102
1113
  }
1103
1114
  } else if (this.host.withinProfile) {
@@ -1118,7 +1129,7 @@ export class CollectionBrowserDataSource
1118
1129
  // Update the data source for each returned page.
1119
1130
  // For loans and web archives, we must account for receiving more pages than we asked for.
1120
1131
  const isUnpagedElement = ['lending', 'web_archives'].includes(
1121
- this.host.profileElement!,
1132
+ this.host.profileElement!
1122
1133
  );
1123
1134
  if (isUnpagedElement) {
1124
1135
  numPages = Math.ceil(results.length / this.pageSize);
@@ -1131,7 +1142,7 @@ export class CollectionBrowserDataSource
1131
1142
  this.addFetchedResultsToDataSource(
1132
1143
  pageNumber + i,
1133
1144
  results.slice(pageStartIndex, pageStartIndex + this.pageSize),
1134
- !isUnpagedElement || i === numPages - 1,
1145
+ !isUnpagedElement || i === numPages - 1
1135
1146
  );
1136
1147
  }
1137
1148
  }
@@ -1157,7 +1168,7 @@ export class CollectionBrowserDataSource
1157
1168
  private addFetchedResultsToDataSource(
1158
1169
  pageNumber: number,
1159
1170
  results: SearchResult[],
1160
- needsReload = true,
1171
+ needsReload = true
1161
1172
  ): void {
1162
1173
  const tiles: TileModel[] = [];
1163
1174
  results?.forEach(result => {
@@ -1176,7 +1187,7 @@ export class CollectionBrowserDataSource
1176
1187
  * Fetches the aggregation buckets for the given prefix filter type.
1177
1188
  */
1178
1189
  private async fetchPrefixFilterBuckets(
1179
- filterType: PrefixFilterType,
1190
+ filterType: PrefixFilterType
1180
1191
  ): Promise<Bucket[]> {
1181
1192
  const trimmedQuery = this.host.baseQuery?.trim();
1182
1193
  if (!this.canPerformSearch) return [];
@@ -1196,12 +1207,12 @@ export class CollectionBrowserDataSource
1196
1207
  };
1197
1208
  params.uid = await this.requestUID(
1198
1209
  { ...params, sort: sortParams },
1199
- 'aggregations',
1210
+ 'aggregations'
1200
1211
  );
1201
1212
 
1202
1213
  const searchResponse = await this.host.searchService?.search(
1203
1214
  params,
1204
- this.host.searchType,
1215
+ this.host.searchType
1205
1216
  );
1206
1217
 
1207
1218
  return (searchResponse?.success?.response?.aggregations?.[
@@ -1229,7 +1240,7 @@ export class CollectionBrowserDataSource
1229
1240
  acc[(bucket.key as string).toUpperCase()] = bucket.doc_count;
1230
1241
  return acc;
1231
1242
  },
1232
- {},
1243
+ {}
1233
1244
  );
1234
1245
 
1235
1246
  this.requestHostUpdate();
@@ -38,6 +38,7 @@ export interface CollectionBrowserSearchInterface
38
38
  readonly defaultSortField: SortField | null;
39
39
  readonly facetLoadStrategy: FacetLoadStrategy;
40
40
  readonly initialPageNumber: number;
41
+ readonly maxPagesToManage: number;
41
42
  readonly currentVisiblePageNumbers: number[];
42
43
  readonly clearResultsOnEmptyQuery?: boolean;
43
44
  readonly dataSource?: CollectionBrowserDataSourceInterface;
@@ -23,38 +23,35 @@ export type PlaceholderType =
23
23
  @customElement('empty-placeholder')
24
24
  export class EmptyPlaceholder extends LitElement {
25
25
  private static readonly MESSAGE_EMPTY_QUERY = msg(
26
- 'To begin searching, enter a search term in the box above and hit "Go".',
26
+ 'To begin searching, enter a search term in the box above and hit "Go".'
27
27
  );
28
28
 
29
29
  private static readonly MESSAGE_NO_SEARCH_RESULTS = msg(
30
30
  'Your search did not match any items in the Archive. ' +
31
- 'Try different keywords or a more general search.',
31
+ 'Try different keywords or a more general search.'
32
32
  );
33
33
 
34
34
  private static readonly MESSAGE_NO_COLLECTION_RESULTS = msg(
35
35
  'Your search did not match any items in this collection. ' +
36
- 'Try different keywords or a more general search.',
36
+ 'Try different keywords or a more general search.'
37
37
  );
38
38
 
39
39
  private static readonly MESSAGE_NO_VIEWABLE_MEMBERS = msg(
40
- 'This collection contains no viewable items.',
40
+ 'This collection contains no viewable items.'
41
41
  );
42
42
 
43
- private static readonly MESSAGE_QUERY_ERROR = msg(
44
- html`The search engine encountered an error, which might be related to your
45
- search query.
46
- <a
47
- href="https://help.archive.org/help/search-building-powerful-complex-queries/"
48
- >
49
- Tips for constructing search queries.
50
- </a> `,
51
- );
52
-
53
- private static readonly MESSAGE_COLLECTION_ERROR = msg(
54
- html`The search engine encountered an error while loading this collection.
55
- If the problem persists, please let us know at
56
- <a href="mailto:info@archive.org">info@archive.org</a>.`,
57
- );
43
+ private static readonly MESSAGE_QUERY_ERROR = msg(html`The search engine
44
+ encountered an error, which might be related to your search query.
45
+ <a
46
+ href="https://help.archive.org/help/search-building-powerful-complex-queries/"
47
+ >
48
+ Tips for constructing search queries.
49
+ </a> `);
50
+
51
+ private static readonly MESSAGE_COLLECTION_ERROR = msg(html`The search engine
52
+ encountered an error while loading this collection. If the problem persists,
53
+ please let us know at
54
+ <a href="mailto:info@archive.org">info@archive.org</a>.`);
58
55
 
59
56
  private static readonly QUERY_ERROR_DETAILS_MESSAGE = msg('Error details:');
60
57
 
@@ -96,7 +96,7 @@ export class ExpandedDatePicker extends LitElement {
96
96
  e: CustomEvent<{
97
97
  minDate: string;
98
98
  maxDate: string;
99
- }>,
99
+ }>
100
100
  ): void {
101
101
  this.minSelectedDate = e.detail.minDate;
102
102
  this.maxSelectedDate = e.detail.maxDate;