@internetarchive/collection-browser 3.3.2 → 3.3.4-alpha-webdev7761.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/index.d.ts +16 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/src/app-root.d.ts +105 -0
  13. package/dist/src/app-root.js +1076 -0
  14. package/dist/src/app-root.js.map +1 -0
  15. package/dist/src/assets/img/icons/arrow-left.d.ts +2 -0
  16. package/dist/src/assets/img/icons/arrow-left.js +10 -0
  17. package/dist/src/assets/img/icons/arrow-left.js.map +1 -0
  18. package/dist/src/assets/img/icons/arrow-right.d.ts +2 -0
  19. package/dist/src/assets/img/icons/arrow-right.js +10 -0
  20. package/dist/src/assets/img/icons/arrow-right.js.map +1 -0
  21. package/dist/src/assets/img/icons/chevron.d.ts +2 -0
  22. package/dist/src/assets/img/icons/chevron.js +4 -0
  23. package/dist/src/assets/img/icons/chevron.js.map +1 -0
  24. package/dist/src/assets/img/icons/close-circle-dark.d.ts +2 -0
  25. package/dist/src/assets/img/icons/close-circle-dark.js +5 -0
  26. package/dist/src/assets/img/icons/close-circle-dark.js.map +1 -0
  27. package/dist/src/assets/img/icons/contract.d.ts +2 -0
  28. package/dist/src/assets/img/icons/contract.js +9 -0
  29. package/dist/src/assets/img/icons/contract.js.map +1 -0
  30. package/dist/src/assets/img/icons/empty-query.d.ts +2 -0
  31. package/dist/src/assets/img/icons/empty-query.js +5 -0
  32. package/dist/src/assets/img/icons/empty-query.js.map +1 -0
  33. package/dist/src/assets/img/icons/expand.d.ts +2 -0
  34. package/dist/src/assets/img/icons/expand.js +9 -0
  35. package/dist/src/assets/img/icons/expand.js.map +1 -0
  36. package/dist/src/assets/img/icons/eye-closed.d.ts +2 -0
  37. package/dist/src/assets/img/icons/eye-closed.js +5 -0
  38. package/dist/src/assets/img/icons/eye-closed.js.map +1 -0
  39. package/dist/src/assets/img/icons/eye.d.ts +2 -0
  40. package/dist/src/assets/img/icons/eye.js +5 -0
  41. package/dist/src/assets/img/icons/eye.js.map +1 -0
  42. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -0
  43. package/dist/src/assets/img/icons/favorite-filled.js +10 -0
  44. package/dist/src/assets/img/icons/favorite-filled.js.map +1 -0
  45. package/dist/src/assets/img/icons/favorite-unfilled.d.ts +1 -0
  46. package/dist/src/assets/img/icons/favorite-unfilled.js +9 -0
  47. package/dist/src/assets/img/icons/favorite-unfilled.js.map +1 -0
  48. package/dist/src/assets/img/icons/filter.d.ts +2 -0
  49. package/dist/src/assets/img/icons/filter.js +10 -0
  50. package/dist/src/assets/img/icons/filter.js.map +1 -0
  51. package/dist/src/assets/img/icons/login-required.d.ts +1 -0
  52. package/dist/src/assets/img/icons/login-required.js +18 -0
  53. package/dist/src/assets/img/icons/login-required.js.map +1 -0
  54. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -0
  55. package/dist/src/assets/img/icons/mediatype/account.js +14 -0
  56. package/dist/src/assets/img/icons/mediatype/account.js.map +1 -0
  57. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -0
  58. package/dist/src/assets/img/icons/mediatype/audio.js +14 -0
  59. package/dist/src/assets/img/icons/mediatype/audio.js.map +1 -0
  60. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -0
  61. package/dist/src/assets/img/icons/mediatype/collection.js +12 -0
  62. package/dist/src/assets/img/icons/mediatype/collection.js.map +1 -0
  63. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -0
  64. package/dist/src/assets/img/icons/mediatype/data.js +15 -0
  65. package/dist/src/assets/img/icons/mediatype/data.js.map +1 -0
  66. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -0
  67. package/dist/src/assets/img/icons/mediatype/etree.js +14 -0
  68. package/dist/src/assets/img/icons/mediatype/etree.js.map +1 -0
  69. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -0
  70. package/dist/src/assets/img/icons/mediatype/film.js +14 -0
  71. package/dist/src/assets/img/icons/mediatype/film.js.map +1 -0
  72. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -0
  73. package/dist/src/assets/img/icons/mediatype/images.js +13 -0
  74. package/dist/src/assets/img/icons/mediatype/images.js.map +1 -0
  75. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -0
  76. package/dist/src/assets/img/icons/mediatype/radio.js +15 -0
  77. package/dist/src/assets/img/icons/mediatype/radio.js.map +1 -0
  78. package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -0
  79. package/dist/src/assets/img/icons/mediatype/search.js +14 -0
  80. package/dist/src/assets/img/icons/mediatype/search.js.map +1 -0
  81. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -0
  82. package/dist/src/assets/img/icons/mediatype/software.js +13 -0
  83. package/dist/src/assets/img/icons/mediatype/software.js.map +1 -0
  84. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -0
  85. package/dist/src/assets/img/icons/mediatype/texts.js +13 -0
  86. package/dist/src/assets/img/icons/mediatype/texts.js.map +1 -0
  87. package/dist/src/assets/img/icons/mediatype/tv-commercial.d.ts +1 -0
  88. package/dist/src/assets/img/icons/mediatype/tv-commercial.js +12 -0
  89. package/dist/src/assets/img/icons/mediatype/tv-commercial.js.map +1 -0
  90. package/dist/src/assets/img/icons/mediatype/tv-fact-check.d.ts +1 -0
  91. package/dist/src/assets/img/icons/mediatype/tv-fact-check.js +12 -0
  92. package/dist/src/assets/img/icons/mediatype/tv-fact-check.js.map +1 -0
  93. package/dist/src/assets/img/icons/mediatype/tv-quote.d.ts +1 -0
  94. package/dist/src/assets/img/icons/mediatype/tv-quote.js +12 -0
  95. package/dist/src/assets/img/icons/mediatype/tv-quote.js.map +1 -0
  96. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -0
  97. package/dist/src/assets/img/icons/mediatype/tv.js +14 -0
  98. package/dist/src/assets/img/icons/mediatype/tv.js.map +1 -0
  99. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -0
  100. package/dist/src/assets/img/icons/mediatype/video.js +14 -0
  101. package/dist/src/assets/img/icons/mediatype/video.js.map +1 -0
  102. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -0
  103. package/dist/src/assets/img/icons/mediatype/web.js +13 -0
  104. package/dist/src/assets/img/icons/mediatype/web.js.map +1 -0
  105. package/dist/src/assets/img/icons/null-result.d.ts +2 -0
  106. package/dist/src/assets/img/icons/null-result.js +5 -0
  107. package/dist/src/assets/img/icons/null-result.js.map +1 -0
  108. package/dist/src/assets/img/icons/quote.d.ts +1 -0
  109. package/dist/src/assets/img/icons/quote.js +7 -0
  110. package/dist/src/assets/img/icons/quote.js.map +1 -0
  111. package/dist/src/assets/img/icons/restricted.d.ts +1 -0
  112. package/dist/src/assets/img/icons/restricted.js +13 -0
  113. package/dist/src/assets/img/icons/restricted.js.map +1 -0
  114. package/dist/src/assets/img/icons/reviews.d.ts +1 -0
  115. package/dist/src/assets/img/icons/reviews.js +11 -0
  116. package/dist/src/assets/img/icons/reviews.js.map +1 -0
  117. package/dist/src/assets/img/icons/upload.d.ts +1 -0
  118. package/dist/src/assets/img/icons/upload.js +12 -0
  119. package/dist/src/assets/img/icons/upload.js.map +1 -0
  120. package/dist/src/assets/img/icons/views.d.ts +1 -0
  121. package/dist/src/assets/img/icons/views.js +11 -0
  122. package/dist/src/assets/img/icons/views.js.map +1 -0
  123. package/dist/src/circular-activity-indicator.d.ts +5 -0
  124. package/dist/src/circular-activity-indicator.js +66 -0
  125. package/dist/src/circular-activity-indicator.js.map +1 -0
  126. package/dist/src/collection-browser.d.ts +692 -0
  127. package/dist/src/collection-browser.js +2669 -0
  128. package/dist/src/collection-browser.js.map +1 -0
  129. package/dist/src/collection-facets/facet-row.d.ts +30 -0
  130. package/dist/src/collection-facets/facet-row.js +266 -0
  131. package/dist/src/collection-facets/facet-row.js.map +1 -0
  132. package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -0
  133. package/dist/src/collection-facets/facet-tombstone-row.js +43 -0
  134. package/dist/src/collection-facets/facet-tombstone-row.js.map +1 -0
  135. package/dist/src/collection-facets/facets-template.d.ts +13 -0
  136. package/dist/src/collection-facets/facets-template.js +68 -0
  137. package/dist/src/collection-facets/facets-template.js.map +1 -0
  138. package/dist/src/collection-facets/models.d.ts +9 -0
  139. package/dist/src/collection-facets/models.js +10 -0
  140. package/dist/src/collection-facets/models.js.map +1 -0
  141. package/dist/src/collection-facets/more-facets-content.d.ts +109 -0
  142. package/dist/src/collection-facets/more-facets-content.js +547 -0
  143. package/dist/src/collection-facets/more-facets-content.js.map +1 -0
  144. package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -0
  145. package/dist/src/collection-facets/more-facets-pagination.js +264 -0
  146. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -0
  147. package/dist/src/collection-facets/smart-facets/dedupe.d.ts +10 -0
  148. package/dist/src/collection-facets/smart-facets/dedupe.js +35 -0
  149. package/dist/src/collection-facets/smart-facets/dedupe.js.map +1 -0
  150. package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.d.ts +5 -0
  151. package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js +24 -0
  152. package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js.map +1 -0
  153. package/dist/src/collection-facets/smart-facets/heuristics/index.d.ts +3 -0
  154. package/dist/src/collection-facets/smart-facets/heuristics/index.js +4 -0
  155. package/dist/src/collection-facets/smart-facets/heuristics/index.js.map +1 -0
  156. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.d.ts +4 -0
  157. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js +14 -0
  158. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js.map +1 -0
  159. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.d.ts +6 -0
  160. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js +68 -0
  161. package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js.map +1 -0
  162. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.d.ts +9 -0
  163. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js +69 -0
  164. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js.map +1 -0
  165. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.d.ts +21 -0
  166. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +76 -0
  167. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +1 -0
  168. package/dist/src/collection-facets/smart-facets/models.d.ts +30 -0
  169. package/dist/src/collection-facets/smart-facets/models.js +2 -0
  170. package/dist/src/collection-facets/smart-facets/models.js.map +1 -0
  171. package/dist/src/collection-facets/smart-facets/smart-facet-bar.d.ts +54 -0
  172. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +383 -0
  173. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -0
  174. package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +11 -0
  175. package/dist/src/collection-facets/smart-facets/smart-facet-button.js +133 -0
  176. package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -0
  177. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +28 -0
  178. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +172 -0
  179. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -0
  180. package/dist/src/collection-facets/smart-facets/smart-facet-equals.d.ts +2 -0
  181. package/dist/src/collection-facets/smart-facets/smart-facet-equals.js +13 -0
  182. package/dist/src/collection-facets/smart-facets/smart-facet-equals.js.map +1 -0
  183. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +5 -0
  184. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +18 -0
  185. package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -0
  186. package/dist/src/collection-facets/toggle-switch.d.ts +41 -0
  187. package/dist/src/collection-facets/toggle-switch.js +174 -0
  188. package/dist/src/collection-facets/toggle-switch.js.map +1 -0
  189. package/dist/src/collection-facets.d.ts +113 -0
  190. package/dist/src/collection-facets.js +884 -0
  191. package/dist/src/collection-facets.js.map +1 -0
  192. package/dist/src/data-source/collection-browser-data-source-interface.d.ts +270 -0
  193. package/dist/src/data-source/collection-browser-data-source-interface.js +2 -0
  194. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -0
  195. package/dist/src/data-source/collection-browser-data-source.d.ts +418 -0
  196. package/dist/src/data-source/collection-browser-data-source.js +1121 -0
  197. package/dist/src/data-source/collection-browser-data-source.js.map +1 -0
  198. package/dist/src/data-source/collection-browser-query-state.d.ts +48 -0
  199. package/dist/src/data-source/collection-browser-query-state.js +2 -0
  200. package/dist/src/data-source/collection-browser-query-state.js.map +1 -0
  201. package/dist/src/data-source/models.d.ts +43 -0
  202. package/dist/src/data-source/models.js +9 -0
  203. package/dist/src/data-source/models.js.map +1 -0
  204. package/dist/src/empty-placeholder.d.ts +23 -0
  205. package/dist/src/empty-placeholder.js +165 -0
  206. package/dist/src/empty-placeholder.js.map +1 -0
  207. package/dist/src/expanded-date-picker.d.ts +50 -0
  208. package/dist/src/expanded-date-picker.js +182 -0
  209. package/dist/src/expanded-date-picker.js.map +1 -0
  210. package/dist/src/language-code-handler/language-code-handler.d.ts +37 -0
  211. package/dist/src/language-code-handler/language-code-handler.js +27 -0
  212. package/dist/src/language-code-handler/language-code-handler.js.map +1 -0
  213. package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -0
  214. package/dist/src/language-code-handler/language-code-mapping.js +563 -0
  215. package/dist/src/language-code-handler/language-code-mapping.js.map +1 -0
  216. package/dist/src/manage/manage-bar.d.ts +58 -0
  217. package/dist/src/manage/manage-bar.js +237 -0
  218. package/dist/src/manage/manage-bar.js.map +1 -0
  219. package/dist/src/manage/remove-items-modal-content.d.ts +9 -0
  220. package/dist/src/manage/remove-items-modal-content.js +104 -0
  221. package/dist/src/manage/remove-items-modal-content.js.map +1 -0
  222. package/dist/src/mediatype/mediatype-config.d.ts +11 -0
  223. package/dist/src/mediatype/mediatype-config.js +116 -0
  224. package/dist/src/mediatype/mediatype-config.js.map +1 -0
  225. package/dist/src/models.d.ts +298 -0
  226. package/dist/src/models.js +507 -0
  227. package/dist/src/models.js.map +1 -0
  228. package/dist/src/restoration-state-handler.d.ts +74 -0
  229. package/dist/src/restoration-state-handler.js +397 -0
  230. package/dist/src/restoration-state-handler.js.map +1 -0
  231. package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +6 -0
  232. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +60 -0
  233. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js.map +1 -0
  234. package/dist/src/sort-filter-bar/alpha-bar.d.ts +21 -0
  235. package/dist/src/sort-filter-bar/alpha-bar.js +241 -0
  236. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -0
  237. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -0
  238. package/dist/src/sort-filter-bar/img/compact.js +5 -0
  239. package/dist/src/sort-filter-bar/img/compact.js.map +1 -0
  240. package/dist/src/sort-filter-bar/img/list.d.ts +1 -0
  241. package/dist/src/sort-filter-bar/img/list.js +5 -0
  242. package/dist/src/sort-filter-bar/img/list.js.map +1 -0
  243. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -0
  244. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js +15 -0
  245. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js.map +1 -0
  246. package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -0
  247. package/dist/src/sort-filter-bar/img/sort-toggle-down.js +17 -0
  248. package/dist/src/sort-filter-bar/img/sort-toggle-down.js.map +1 -0
  249. package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -0
  250. package/dist/src/sort-filter-bar/img/sort-toggle-up.js +17 -0
  251. package/dist/src/sort-filter-bar/img/sort-toggle-up.js.map +1 -0
  252. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -0
  253. package/dist/src/sort-filter-bar/img/sort-triangle.js +5 -0
  254. package/dist/src/sort-filter-bar/img/sort-triangle.js.map +1 -0
  255. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -0
  256. package/dist/src/sort-filter-bar/img/tile.js +5 -0
  257. package/dist/src/sort-filter-bar/img/tile.js.map +1 -0
  258. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +278 -0
  259. package/dist/src/sort-filter-bar/sort-filter-bar.js +1161 -0
  260. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -0
  261. package/dist/src/styles/ia-button.d.ts +2 -0
  262. package/dist/src/styles/ia-button.js +134 -0
  263. package/dist/src/styles/ia-button.js.map +1 -0
  264. package/dist/src/styles/item-image-styles.d.ts +8 -0
  265. package/dist/src/styles/item-image-styles.js +123 -0
  266. package/dist/src/styles/item-image-styles.js.map +1 -0
  267. package/dist/src/styles/sr-only.d.ts +1 -0
  268. package/dist/src/styles/sr-only.js +18 -0
  269. package/dist/src/styles/sr-only.js.map +1 -0
  270. package/dist/src/tiles/base-tile-component.d.ts +27 -0
  271. package/dist/src/tiles/base-tile-component.js +82 -0
  272. package/dist/src/tiles/base-tile-component.js.map +1 -0
  273. package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -0
  274. package/dist/src/tiles/collection-browser-loading-tile.js +29 -0
  275. package/dist/src/tiles/collection-browser-loading-tile.js.map +1 -0
  276. package/dist/src/tiles/grid/account-tile.d.ts +18 -0
  277. package/dist/src/tiles/grid/account-tile.js +111 -0
  278. package/dist/src/tiles/grid/account-tile.js.map +1 -0
  279. package/dist/src/tiles/grid/collection-tile.d.ts +15 -0
  280. package/dist/src/tiles/grid/collection-tile.js +160 -0
  281. package/dist/src/tiles/grid/collection-tile.js.map +1 -0
  282. package/dist/src/tiles/grid/item-tile.d.ts +41 -0
  283. package/dist/src/tiles/grid/item-tile.js +321 -0
  284. package/dist/src/tiles/grid/item-tile.js.map +1 -0
  285. package/dist/src/tiles/grid/search-tile.d.ts +10 -0
  286. package/dist/src/tiles/grid/search-tile.js +95 -0
  287. package/dist/src/tiles/grid/search-tile.js.map +1 -0
  288. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -0
  289. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +128 -0
  290. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -0
  291. package/dist/src/tiles/grid/tile-stats.d.ts +58 -0
  292. package/dist/src/tiles/grid/tile-stats.js +204 -0
  293. package/dist/src/tiles/grid/tile-stats.js.map +1 -0
  294. package/dist/src/tiles/hover/hover-pane-controller.d.ts +228 -0
  295. package/dist/src/tiles/hover/hover-pane-controller.js +446 -0
  296. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -0
  297. package/dist/src/tiles/hover/tile-hover-pane.d.ts +20 -0
  298. package/dist/src/tiles/hover/tile-hover-pane.js +185 -0
  299. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -0
  300. package/dist/src/tiles/image-block.d.ts +19 -0
  301. package/dist/src/tiles/image-block.js +175 -0
  302. package/dist/src/tiles/image-block.js.map +1 -0
  303. package/dist/src/tiles/item-image.d.ts +40 -0
  304. package/dist/src/tiles/item-image.js +191 -0
  305. package/dist/src/tiles/item-image.js.map +1 -0
  306. package/dist/src/tiles/list/tile-list-compact-header.d.ts +6 -0
  307. package/dist/src/tiles/list/tile-list-compact-header.js +85 -0
  308. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -0
  309. package/dist/src/tiles/list/tile-list-compact.d.ts +19 -0
  310. package/dist/src/tiles/list/tile-list-compact.js +223 -0
  311. package/dist/src/tiles/list/tile-list-compact.js.map +1 -0
  312. package/dist/src/tiles/list/tile-list.d.ts +54 -0
  313. package/dist/src/tiles/list/tile-list.js +621 -0
  314. package/dist/src/tiles/list/tile-list.js.map +1 -0
  315. package/dist/src/tiles/models.d.ts +1 -0
  316. package/dist/src/tiles/models.js +2 -0
  317. package/dist/src/tiles/models.js.map +1 -0
  318. package/dist/src/tiles/overlay/icon-overlay.d.ts +8 -0
  319. package/dist/src/tiles/overlay/icon-overlay.js +55 -0
  320. package/dist/src/tiles/overlay/icon-overlay.js.map +1 -0
  321. package/dist/src/tiles/overlay/text-overlay.d.ts +9 -0
  322. package/dist/src/tiles/overlay/text-overlay.js +74 -0
  323. package/dist/src/tiles/overlay/text-overlay.js.map +1 -0
  324. package/dist/src/tiles/review-block.d.ts +12 -0
  325. package/dist/src/tiles/review-block.js +134 -0
  326. package/dist/src/tiles/review-block.js.map +1 -0
  327. package/dist/src/tiles/text-snippet-block.d.ts +27 -0
  328. package/dist/src/tiles/text-snippet-block.js +132 -0
  329. package/dist/src/tiles/text-snippet-block.js.map +1 -0
  330. package/dist/src/tiles/tile-dispatcher.d.ts +71 -0
  331. package/dist/src/tiles/tile-dispatcher.js +472 -0
  332. package/dist/src/tiles/tile-dispatcher.js.map +1 -0
  333. package/dist/src/tiles/tile-display-value-provider.d.ts +47 -0
  334. package/dist/src/tiles/tile-display-value-provider.js +95 -0
  335. package/dist/src/tiles/tile-display-value-provider.js.map +1 -0
  336. package/dist/src/tiles/tile-mediatype-icon.d.ts +27 -0
  337. package/dist/src/tiles/tile-mediatype-icon.js +130 -0
  338. package/dist/src/tiles/tile-mediatype-icon.js.map +1 -0
  339. package/dist/src/utils/analytics-events.d.ts +28 -0
  340. package/dist/src/utils/analytics-events.js +31 -0
  341. package/dist/src/utils/analytics-events.js.map +1 -0
  342. package/dist/src/utils/array-equals.d.ts +4 -0
  343. package/dist/src/utils/array-equals.js +11 -0
  344. package/dist/src/utils/array-equals.js.map +1 -0
  345. package/dist/src/utils/collapse-repeated-quotes.d.ts +11 -0
  346. package/dist/src/utils/collapse-repeated-quotes.js +14 -0
  347. package/dist/src/utils/collapse-repeated-quotes.js.map +1 -0
  348. package/dist/src/utils/facet-utils.d.ts +83 -0
  349. package/dist/src/utils/facet-utils.js +152 -0
  350. package/dist/src/utils/facet-utils.js.map +1 -0
  351. package/dist/src/utils/format-count.d.ts +7 -0
  352. package/dist/src/utils/format-count.js +76 -0
  353. package/dist/src/utils/format-count.js.map +1 -0
  354. package/dist/src/utils/format-date.d.ts +16 -0
  355. package/dist/src/utils/format-date.js +33 -0
  356. package/dist/src/utils/format-date.js.map +1 -0
  357. package/dist/src/utils/format-unit-size.d.ts +2 -0
  358. package/dist/src/utils/format-unit-size.js +34 -0
  359. package/dist/src/utils/format-unit-size.js.map +1 -0
  360. package/dist/src/utils/local-date-from-utc.d.ts +9 -0
  361. package/dist/src/utils/local-date-from-utc.js +16 -0
  362. package/dist/src/utils/local-date-from-utc.js.map +1 -0
  363. package/dist/src/utils/log.d.ts +7 -0
  364. package/dist/src/utils/log.js +14 -0
  365. package/dist/src/utils/log.js.map +1 -0
  366. package/dist/src/utils/resolve-mediatype.d.ts +8 -0
  367. package/dist/src/utils/resolve-mediatype.js +24 -0
  368. package/dist/src/utils/resolve-mediatype.js.map +1 -0
  369. package/dist/src/utils/sha1.d.ts +2 -0
  370. package/dist/src/utils/sha1.js +9 -0
  371. package/dist/src/utils/sha1.js.map +1 -0
  372. package/dist/test/collection-browser.test.d.ts +1 -0
  373. package/dist/test/collection-browser.test.js +1721 -0
  374. package/dist/test/collection-browser.test.js.map +1 -0
  375. package/dist/test/collection-facets/facet-row.test.d.ts +1 -0
  376. package/dist/test/collection-facets/facet-row.test.js +274 -0
  377. package/dist/test/collection-facets/facet-row.test.js.map +1 -0
  378. package/dist/test/collection-facets/facets-template.test.d.ts +1 -0
  379. package/dist/test/collection-facets/facets-template.test.js +101 -0
  380. package/dist/test/collection-facets/facets-template.test.js.map +1 -0
  381. package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -0
  382. package/dist/test/collection-facets/more-facets-content.test.js +169 -0
  383. package/dist/test/collection-facets/more-facets-content.test.js.map +1 -0
  384. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -0
  385. package/dist/test/collection-facets/more-facets-pagination.test.js +132 -0
  386. package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -0
  387. package/dist/test/collection-facets/toggle-switch.test.d.ts +1 -0
  388. package/dist/test/collection-facets/toggle-switch.test.js +96 -0
  389. package/dist/test/collection-facets/toggle-switch.test.js.map +1 -0
  390. package/dist/test/collection-facets.test.d.ts +2 -0
  391. package/dist/test/collection-facets.test.js +745 -0
  392. package/dist/test/collection-facets.test.js.map +1 -0
  393. package/dist/test/data-source/collection-browser-data-source.test.d.ts +1 -0
  394. package/dist/test/data-source/collection-browser-data-source.test.js +102 -0
  395. package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -0
  396. package/dist/test/empty-placeholder.test.d.ts +1 -0
  397. package/dist/test/empty-placeholder.test.js +63 -0
  398. package/dist/test/empty-placeholder.test.js.map +1 -0
  399. package/dist/test/expanded-date-picker.test.d.ts +1 -0
  400. package/dist/test/expanded-date-picker.test.js +130 -0
  401. package/dist/test/expanded-date-picker.test.js.map +1 -0
  402. package/dist/test/icon-overlay.test.d.ts +1 -0
  403. package/dist/test/icon-overlay.test.js +30 -0
  404. package/dist/test/icon-overlay.test.js.map +1 -0
  405. package/dist/test/image-block.test.d.ts +1 -0
  406. package/dist/test/image-block.test.js +218 -0
  407. package/dist/test/image-block.test.js.map +1 -0
  408. package/dist/test/item-image.test.d.ts +1 -0
  409. package/dist/test/item-image.test.js +196 -0
  410. package/dist/test/item-image.test.js.map +1 -0
  411. package/dist/test/manage/manage-bar.test.d.ts +2 -0
  412. package/dist/test/manage/manage-bar.test.js +106 -0
  413. package/dist/test/manage/manage-bar.test.js.map +1 -0
  414. package/dist/test/manage/remove-items-modal-content.test.d.ts +1 -0
  415. package/dist/test/manage/remove-items-modal-content.test.js +65 -0
  416. package/dist/test/manage/remove-items-modal-content.test.js.map +1 -0
  417. package/dist/test/mediatype-config.test.d.ts +1 -0
  418. package/dist/test/mediatype-config.test.js +11 -0
  419. package/dist/test/mediatype-config.test.js.map +1 -0
  420. package/dist/test/mocks/mock-analytics-handler.d.ts +10 -0
  421. package/dist/test/mocks/mock-analytics-handler.js +16 -0
  422. package/dist/test/mocks/mock-analytics-handler.js.map +1 -0
  423. package/dist/test/mocks/mock-search-responses.d.ts +31 -0
  424. package/dist/test/mocks/mock-search-responses.js +1241 -0
  425. package/dist/test/mocks/mock-search-responses.js.map +1 -0
  426. package/dist/test/mocks/mock-search-service.d.ts +16 -0
  427. package/dist/test/mocks/mock-search-service.js +65 -0
  428. package/dist/test/mocks/mock-search-service.js.map +1 -0
  429. package/dist/test/restoration-state-handler.test.d.ts +1 -0
  430. package/dist/test/restoration-state-handler.test.js +343 -0
  431. package/dist/test/restoration-state-handler.test.js.map +1 -0
  432. package/dist/test/review-block.test.d.ts +1 -0
  433. package/dist/test/review-block.test.js +48 -0
  434. package/dist/test/review-block.test.js.map +1 -0
  435. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +1 -0
  436. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +13 -0
  437. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +1 -0
  438. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -0
  439. package/dist/test/sort-filter-bar/alpha-bar.test.js +74 -0
  440. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -0
  441. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -0
  442. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +609 -0
  443. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -0
  444. package/dist/test/text-overlay.test.d.ts +1 -0
  445. package/dist/test/text-overlay.test.js +42 -0
  446. package/dist/test/text-overlay.test.js.map +1 -0
  447. package/dist/test/text-snippet-block.test.d.ts +1 -0
  448. package/dist/test/text-snippet-block.test.js +63 -0
  449. package/dist/test/text-snippet-block.test.js.map +1 -0
  450. package/dist/test/tile-stats.test.d.ts +1 -0
  451. package/dist/test/tile-stats.test.js +128 -0
  452. package/dist/test/tile-stats.test.js.map +1 -0
  453. package/dist/test/tiles/grid/account-tile.test.d.ts +1 -0
  454. package/dist/test/tiles/grid/account-tile.test.js +96 -0
  455. package/dist/test/tiles/grid/account-tile.test.js.map +1 -0
  456. package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -0
  457. package/dist/test/tiles/grid/collection-tile.test.js +96 -0
  458. package/dist/test/tiles/grid/collection-tile.test.js.map +1 -0
  459. package/dist/test/tiles/grid/item-tile.test.d.ts +1 -0
  460. package/dist/test/tiles/grid/item-tile.test.js +427 -0
  461. package/dist/test/tiles/grid/item-tile.test.js.map +1 -0
  462. package/dist/test/tiles/grid/search-tile.test.d.ts +1 -0
  463. package/dist/test/tiles/grid/search-tile.test.js +66 -0
  464. package/dist/test/tiles/grid/search-tile.test.js.map +1 -0
  465. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -0
  466. package/dist/test/tiles/hover/hover-pane-controller.test.js +329 -0
  467. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -0
  468. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -0
  469. package/dist/test/tiles/hover/tile-hover-pane.test.js +57 -0
  470. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +1 -0
  471. package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -0
  472. package/dist/test/tiles/list/tile-list-compact.test.js +251 -0
  473. package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -0
  474. package/dist/test/tiles/list/tile-list.test.d.ts +1 -0
  475. package/dist/test/tiles/list/tile-list.test.js +469 -0
  476. package/dist/test/tiles/list/tile-list.test.js.map +1 -0
  477. package/dist/test/tiles/tile-dispatcher.test.d.ts +1 -0
  478. package/dist/test/tiles/tile-dispatcher.test.js +231 -0
  479. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -0
  480. package/dist/test/tiles/tile-display-value-provider.test.d.ts +1 -0
  481. package/dist/test/tiles/tile-display-value-provider.test.js +142 -0
  482. package/dist/test/tiles/tile-display-value-provider.test.js.map +1 -0
  483. package/dist/test/tiles/tile-mediatype-icon.test.d.ts +1 -0
  484. package/dist/test/tiles/tile-mediatype-icon.test.js +145 -0
  485. package/dist/test/tiles/tile-mediatype-icon.test.js.map +1 -0
  486. package/dist/test/utils/array-equals.test.d.ts +1 -0
  487. package/dist/test/utils/array-equals.test.js +27 -0
  488. package/dist/test/utils/array-equals.test.js.map +1 -0
  489. package/dist/test/utils/format-count.test.d.ts +1 -0
  490. package/dist/test/utils/format-count.test.js +24 -0
  491. package/dist/test/utils/format-count.test.js.map +1 -0
  492. package/dist/test/utils/format-date.test.d.ts +1 -0
  493. package/dist/test/utils/format-date.test.js +61 -0
  494. package/dist/test/utils/format-date.test.js.map +1 -0
  495. package/dist/test/utils/format-unit-size.test.d.ts +1 -0
  496. package/dist/test/utils/format-unit-size.test.js +18 -0
  497. package/dist/test/utils/format-unit-size.test.js.map +1 -0
  498. package/dist/test/utils/local-date-from-utc.test.d.ts +1 -0
  499. package/dist/test/utils/local-date-from-utc.test.js +27 -0
  500. package/dist/test/utils/local-date-from-utc.test.js.map +1 -0
  501. package/eslint.config.mjs +53 -53
  502. package/index.html +24 -24
  503. package/local.archive.org.cert +86 -86
  504. package/local.archive.org.key +27 -27
  505. package/package.json +118 -117
  506. package/renovate.json +6 -6
  507. package/src/collection-browser.ts +2954 -2829
  508. package/src/collection-facets/facet-row.ts +299 -296
  509. package/src/collection-facets/models.ts +10 -10
  510. package/src/collection-facets/more-facets-content.ts +639 -639
  511. package/src/collection-facets.ts +1005 -995
  512. package/src/data-source/collection-browser-data-source-interface.ts +345 -333
  513. package/src/data-source/collection-browser-data-source.ts +1441 -1401
  514. package/src/data-source/collection-browser-query-state.ts +59 -65
  515. package/src/data-source/models.ts +56 -43
  516. package/src/manage/manage-bar.ts +247 -247
  517. package/src/models.ts +866 -870
  518. package/src/restoration-state-handler.ts +542 -544
  519. package/src/tiles/base-tile-component.ts +65 -65
  520. package/src/tiles/grid/account-tile.ts +113 -113
  521. package/src/tiles/grid/collection-tile.ts +163 -163
  522. package/src/tiles/grid/item-tile.ts +340 -340
  523. package/src/tiles/grid/search-tile.ts +90 -90
  524. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -130
  525. package/src/tiles/hover/hover-pane-controller.ts +613 -517
  526. package/src/tiles/hover/tile-hover-pane.ts +184 -180
  527. package/src/tiles/list/tile-list-compact.ts +239 -239
  528. package/src/tiles/list/tile-list.ts +700 -700
  529. package/src/tiles/tile-dispatcher.ts +517 -490
  530. package/src/utils/format-date.ts +62 -62
  531. package/test/collection-browser.test.ts +2413 -2403
  532. package/test/collection-facets/facet-row.test.ts +375 -375
  533. package/test/collection-facets.test.ts +928 -928
  534. package/test/restoration-state-handler.test.ts +480 -510
  535. package/test/tiles/grid/item-tile.test.ts +520 -520
  536. package/test/tiles/hover/hover-pane-controller.test.ts +418 -353
  537. package/test/tiles/list/tile-list-compact.test.ts +282 -282
  538. package/test/tiles/list/tile-list.test.ts +552 -552
  539. package/test/tiles/tile-dispatcher.test.ts +283 -187
  540. package/test/utils/format-date.test.ts +89 -89
  541. package/tsconfig.json +20 -20
  542. package/web-dev-server.config.mjs +30 -30
  543. package/web-test-runner.config.mjs +41 -41
@@ -0,0 +1,71 @@
1
+ import { PropertyValues } from 'lit';
2
+ import type { SharedResizeObserverInterface, SharedResizeObserverResizeHandlerInterface } from '@internetarchive/shared-resize-observer';
3
+ import type { TileDisplayMode } from '../models';
4
+ import type { CollectionTitles } from '../data-source/models';
5
+ import './grid/collection-tile';
6
+ import './grid/item-tile';
7
+ import './grid/account-tile';
8
+ import './grid/search-tile';
9
+ import './hover/tile-hover-pane';
10
+ import './list/tile-list';
11
+ import './list/tile-list-compact';
12
+ import './list/tile-list-compact-header';
13
+ import type { TileHoverPane } from './hover/tile-hover-pane';
14
+ import { BaseTileComponent } from './base-tile-component';
15
+ import { SimpleLayoutType } from './models';
16
+ import { HoverPaneProperties, HoverPaneProviderInterface } from './hover/hover-pane-controller';
17
+ export declare class TileDispatcher extends BaseTileComponent implements SharedResizeObserverResizeHandlerInterface, HoverPaneProviderInterface {
18
+ tileDisplayMode?: TileDisplayMode;
19
+ isManageView: boolean;
20
+ resizeObserver?: SharedResizeObserverInterface;
21
+ collectionTitles?: CollectionTitles;
22
+ showTvClips: boolean;
23
+ /** What type of simple layout to use in grid mode, if any */
24
+ simpleLayoutType: SimpleLayoutType;
25
+ /** Whether this tile should include a hover pane at all (for applicable tile modes) */
26
+ enableHoverPane: boolean;
27
+ manageCheckTitle: string;
28
+ private hoverPaneController?;
29
+ private container;
30
+ private hoverPane?;
31
+ private tileLinkElement?;
32
+ acquireFocus(): void;
33
+ releaseFocus(): void;
34
+ /** Maps each display mode to whether hover panes should appear in that mode */
35
+ private static readonly HOVER_PANE_DISPLAY_MODES;
36
+ render(): import("lit").TemplateResult<1>;
37
+ protected firstUpdated(): void;
38
+ private get headerTemplate();
39
+ private get tileTemplate();
40
+ private get linkTileTemplate();
41
+ private get linkTileHref();
42
+ private get manageCheckTemplate();
43
+ /**
44
+ * Whether hover pane behavior should be prepared for this tile
45
+ * (e.g., whether mouse listeners should be attached, etc.)
46
+ */
47
+ private get shouldPrepareHoverPane();
48
+ private get isHoverEnabled();
49
+ /** @inheritdoc */
50
+ getHoverPane(): TileHoverPane | undefined;
51
+ /** @inheritdoc */
52
+ getHoverPaneProps(): HoverPaneProperties;
53
+ handleResize(entry: ResizeObserverEntry): void;
54
+ disconnectedCallback(): void;
55
+ private stopResizeObservation;
56
+ private startResizeObservation;
57
+ updated(props: PropertyValues): void;
58
+ /**
59
+ * Handler for when the tile link is left-clicked. Emits the `resultSelected` event.
60
+ * In manage view, it also checks/unchecks the tile.
61
+ */
62
+ private handleLinkClicked;
63
+ /**
64
+ * Handler for when the tile link is right-clicked.
65
+ * In manage view, it opens the item in a new tab. Otherwise, does nothing.
66
+ */
67
+ private handleLinkContextMenu;
68
+ private tileInfoButtonPressed;
69
+ private get tile();
70
+ static get styles(): import("lit").CSSResult[];
71
+ }
@@ -0,0 +1,472 @@
1
+ var TileDispatcher_1;
2
+ import { __decorate } from "tslib";
3
+ import { css, html, nothing } from 'lit';
4
+ import { customElement, property, query } from 'lit/decorators.js';
5
+ import { ifDefined } from 'lit/directives/if-defined.js';
6
+ import { msg } from '@lit/localize';
7
+ import './grid/collection-tile';
8
+ import './grid/item-tile';
9
+ import './grid/account-tile';
10
+ import './grid/search-tile';
11
+ import './hover/tile-hover-pane';
12
+ import './list/tile-list';
13
+ import './list/tile-list-compact';
14
+ import './list/tile-list-compact-header';
15
+ import { BaseTileComponent } from './base-tile-component';
16
+ import { HoverPaneController, } from './hover/hover-pane-controller';
17
+ import { srOnlyStyle } from '../styles/sr-only';
18
+ let TileDispatcher = TileDispatcher_1 = class TileDispatcher extends BaseTileComponent {
19
+ constructor() {
20
+ /*
21
+ * Reactive properties inherited from BaseTileComponent:
22
+ * - model?: TileModel;
23
+ * - currentWidth?: number;
24
+ * - currentHeight?: number;
25
+ * - baseNavigationUrl?: string;
26
+ * - baseImageUrl?: string;
27
+ * - collectionPagePath?: string;
28
+ * - sortParam: SortParam | null = null;
29
+ * - defaultSortParam: SortParam | null = null;
30
+ * - creatorFilter?: string;
31
+ * - mobileBreakpoint?: number;
32
+ * - loggedIn = false;
33
+ * - suppressTileBlurring = false;
34
+ * - useLocalTime = false;
35
+ */
36
+ super(...arguments);
37
+ this.isManageView = false;
38
+ this.showTvClips = false;
39
+ /** What type of simple layout to use in grid mode, if any */
40
+ this.simpleLayoutType = 'none';
41
+ /** Whether this tile should include a hover pane at all (for applicable tile modes) */
42
+ this.enableHoverPane = false;
43
+ this.manageCheckTitle = msg('Remove this item from the list');
44
+ }
45
+ acquireFocus() {
46
+ var _a;
47
+ (_a = this.tileLinkElement) === null || _a === void 0 ? void 0 : _a.focus();
48
+ }
49
+ releaseFocus() {
50
+ var _a;
51
+ (_a = this.tileLinkElement) === null || _a === void 0 ? void 0 : _a.blur();
52
+ }
53
+ render() {
54
+ var _a, _b;
55
+ const isGridMode = this.tileDisplayMode === 'grid';
56
+ const hoverPaneTemplate = (_b = (_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.getTemplate()) !== null && _b !== void 0 ? _b : nothing;
57
+ return html `
58
+ <div id="container" class=${isGridMode ? 'hoverable' : ''}>
59
+ ${this.tileDisplayMode === 'list-header'
60
+ ? this.headerTemplate
61
+ : this.tileTemplate}
62
+ ${this.manageCheckTemplate} ${hoverPaneTemplate}
63
+ </div>
64
+ `;
65
+ }
66
+ firstUpdated() {
67
+ if (this.shouldPrepareHoverPane) {
68
+ this.hoverPaneController = new HoverPaneController(this, {
69
+ mobileBreakpoint: this.mobileBreakpoint,
70
+ enableLongPress: false,
71
+ });
72
+ }
73
+ }
74
+ get headerTemplate() {
75
+ const { currentWidth, sortParam, defaultSortParam, mobileBreakpoint } = this;
76
+ return html `
77
+ <tile-list-compact-header
78
+ class="header"
79
+ .currentWidth=${currentWidth}
80
+ .sortParam=${sortParam !== null && sortParam !== void 0 ? sortParam : defaultSortParam}
81
+ .mobileBreakpoint=${mobileBreakpoint}
82
+ >
83
+ </tile-list-compact-header>
84
+ `;
85
+ }
86
+ get tileTemplate() {
87
+ return html `
88
+ ${this.tileDisplayMode === 'list-detail'
89
+ ? this.tile
90
+ : this.linkTileTemplate}
91
+ `;
92
+ }
93
+ get linkTileTemplate() {
94
+ var _a, _b, _c;
95
+ return html `
96
+ <a
97
+ href=${this.linkTileHref}
98
+ aria-label=${(_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'Untitled item'}
99
+ aria-describedby="link-aria-description"
100
+ aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}
101
+ title=${this.shouldPrepareHoverPane
102
+ ? nothing // Don't show title tooltips when we have the tile info popups
103
+ : ifDefined((_c = this.model) === null || _c === void 0 ? void 0 : _c.title)}
104
+ @click=${this.handleLinkClicked}
105
+ @contextmenu=${this.handleLinkContextMenu}
106
+ class="tile-link"
107
+ >
108
+ ${this.tile}
109
+ </a>
110
+ <div id="link-aria-description" class="sr-only">
111
+ ${msg('Press Down Arrow to preview item details')}
112
+ </div>
113
+ `;
114
+ }
115
+ get linkTileHref() {
116
+ var _a;
117
+ if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.identifier) || this.baseNavigationUrl == null)
118
+ return nothing;
119
+ // Use the server-specified href if available.
120
+ // Otherwise, construct a details page URL from the item identifier.
121
+ if (this.model.href) {
122
+ return `${this.baseNavigationUrl}${this.model.href}`;
123
+ }
124
+ return this.displayValueProvider.itemPageUrl(this.model.identifier, this.model.mediatype === 'collection');
125
+ }
126
+ get manageCheckTemplate() {
127
+ var _a;
128
+ if (!this.isManageView || this.tileDisplayMode !== 'grid')
129
+ return nothing;
130
+ return html `
131
+ <div class="manage-check">
132
+ <input
133
+ type="checkbox"
134
+ title=${this.manageCheckTitle}
135
+ ?checked=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.checked}
136
+ @change=${this.handleLinkClicked}
137
+ />
138
+ </div>
139
+ `;
140
+ }
141
+ /**
142
+ * Whether hover pane behavior should be prepared for this tile
143
+ * (e.g., whether mouse listeners should be attached, etc.)
144
+ */
145
+ get shouldPrepareHoverPane() {
146
+ var _a, _b;
147
+ return (this.enableHoverPane &&
148
+ !!this.tileDisplayMode &&
149
+ TileDispatcher_1.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode] &&
150
+ ((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) !== 'search' && // don't show hover panes on search tiles
151
+ !((_b = this.model) === null || _b === void 0 ? void 0 : _b.captureDates) // don't show hover panes on web archive tiles
152
+ );
153
+ }
154
+ get isHoverEnabled() {
155
+ return window.matchMedia('(hover: hover)').matches;
156
+ }
157
+ /** @inheritdoc */
158
+ getHoverPane() {
159
+ return this.hoverPane;
160
+ }
161
+ /** @inheritdoc */
162
+ getHoverPaneProps() {
163
+ return this;
164
+ }
165
+ handleResize(entry) {
166
+ this.currentWidth = entry.contentRect.width;
167
+ this.currentHeight = entry.contentRect.height;
168
+ }
169
+ disconnectedCallback() {
170
+ this.stopResizeObservation(this.resizeObserver);
171
+ }
172
+ stopResizeObservation(observer) {
173
+ observer === null || observer === void 0 ? void 0 : observer.removeObserver({
174
+ handler: this,
175
+ target: this.container,
176
+ });
177
+ }
178
+ startResizeObservation() {
179
+ var _a;
180
+ this.stopResizeObservation(this.resizeObserver);
181
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.addObserver({
182
+ handler: this,
183
+ target: this.container,
184
+ });
185
+ }
186
+ updated(props) {
187
+ if (props.has('resizeObserver')) {
188
+ const previousObserver = props.get('resizeObserver');
189
+ this.stopResizeObservation(previousObserver);
190
+ this.startResizeObservation();
191
+ }
192
+ }
193
+ /**
194
+ * Handler for when the tile link is left-clicked. Emits the `resultSelected` event.
195
+ * In manage view, it also checks/unchecks the tile.
196
+ */
197
+ handleLinkClicked(e) {
198
+ if (this.isManageView) {
199
+ e.preventDefault();
200
+ if (this.model)
201
+ this.model.checked = !this.model.checked;
202
+ }
203
+ this.dispatchEvent(new CustomEvent('resultSelected', { detail: this.model }));
204
+ }
205
+ /**
206
+ * Handler for when the tile link is right-clicked.
207
+ * In manage view, it opens the item in a new tab. Otherwise, does nothing.
208
+ */
209
+ handleLinkContextMenu(e) {
210
+ if (this.isManageView && this.linkTileHref !== nothing) {
211
+ e.preventDefault();
212
+ window.open(this.linkTileHref, '_blank');
213
+ }
214
+ }
215
+ tileInfoButtonPressed(e) {
216
+ var _a;
217
+ (_a = this.hoverPaneController) === null || _a === void 0 ? void 0 : _a.toggleHoverPane({
218
+ coords: e.detail,
219
+ enableTouchBackdrop: true,
220
+ });
221
+ }
222
+ get tile() {
223
+ const { model, collectionPagePath, baseNavigationUrl, currentWidth, currentHeight, sortParam, creatorFilter, mobileBreakpoint, defaultSortParam, } = this;
224
+ if (!model)
225
+ return nothing;
226
+ switch (this.tileDisplayMode) {
227
+ case 'grid':
228
+ switch (model.mediatype) {
229
+ case 'collection':
230
+ return html `<collection-tile
231
+ .model=${model}
232
+ .collectionPagePath=${collectionPagePath}
233
+ .baseImageUrl=${this.baseImageUrl}
234
+ .currentWidth=${currentWidth}
235
+ .currentHeight=${currentHeight}
236
+ .creatorFilter=${creatorFilter}
237
+ .suppressBlurring=${this.suppressBlurring}
238
+ .isManageView=${this.isManageView}
239
+ ?showInfoButton=${!this.isHoverEnabled}
240
+ @infoButtonPressed=${this.tileInfoButtonPressed}
241
+ >
242
+ </collection-tile>`;
243
+ case 'account':
244
+ return html `<account-tile
245
+ .model=${model}
246
+ .collectionPagePath=${collectionPagePath}
247
+ .baseImageUrl=${this.baseImageUrl}
248
+ .currentWidth=${currentWidth}
249
+ .currentHeight=${currentHeight}
250
+ .creatorFilter=${creatorFilter}
251
+ .suppressBlurring=${this.suppressBlurring}
252
+ .isManageView=${this.isManageView}
253
+ ?showInfoButton=${!this.isHoverEnabled}
254
+ @infoButtonPressed=${this.tileInfoButtonPressed}
255
+ >
256
+ </account-tile>`;
257
+ case 'search':
258
+ return html `<search-tile
259
+ .model=${model}
260
+ .collectionPagePath=${collectionPagePath}
261
+ .baseImageUrl=${this.baseImageUrl}
262
+ .currentWidth=${currentWidth}
263
+ .currentHeight=${currentHeight}
264
+ .creatorFilter=${creatorFilter}
265
+ .suppressBlurring=${this.suppressBlurring}
266
+ .isManageView=${this.isManageView}
267
+ ?showInfoButton=${false}
268
+ @infoButtonPressed=${this.tileInfoButtonPressed}
269
+ >
270
+ </search-tile>`;
271
+ default:
272
+ return html `<item-tile
273
+ .model=${model}
274
+ .collectionPagePath=${collectionPagePath}
275
+ .currentWidth=${this.currentWidth}
276
+ .currentHeight=${this.currentHeight}
277
+ .baseImageUrl=${this.baseImageUrl}
278
+ .sortParam=${sortParam}
279
+ .defaultSortParam=${defaultSortParam}
280
+ .creatorFilter=${creatorFilter}
281
+ .loggedIn=${this.loggedIn}
282
+ .suppressBlurring=${this.suppressBlurring}
283
+ .isManageView=${this.isManageView}
284
+ .simpleLayoutType=${this.simpleLayoutType}
285
+ ?showTvClips=${this.showTvClips}
286
+ ?showInfoButton=${!this.isHoverEnabled}
287
+ ?useLocalTime=${this.useLocalTime}
288
+ @infoButtonPressed=${this.tileInfoButtonPressed}
289
+ >
290
+ </item-tile>`;
291
+ }
292
+ case 'list-compact':
293
+ return html `<tile-list-compact
294
+ .model=${model}
295
+ .collectionPagePath=${collectionPagePath}
296
+ .currentWidth=${currentWidth}
297
+ .currentHeight=${currentHeight}
298
+ .baseNavigationUrl=${baseNavigationUrl}
299
+ .sortParam=${sortParam}
300
+ .defaultSortParam=${defaultSortParam}
301
+ .creatorFilter=${creatorFilter}
302
+ .mobileBreakpoint=${mobileBreakpoint}
303
+ .baseImageUrl=${this.baseImageUrl}
304
+ .loggedIn=${this.loggedIn}
305
+ .suppressBlurring=${this.suppressBlurring}
306
+ ?useLocalTime=${this.useLocalTime}
307
+ >
308
+ </tile-list-compact>`;
309
+ case 'list-detail':
310
+ return html `<tile-list
311
+ .model=${model}
312
+ .collectionPagePath=${collectionPagePath}
313
+ .collectionTitles=${this.collectionTitles}
314
+ .currentWidth=${currentWidth}
315
+ .currentHeight=${currentHeight}
316
+ .baseNavigationUrl=${baseNavigationUrl}
317
+ .sortParam=${sortParam}
318
+ .defaultSortParam=${defaultSortParam}
319
+ .creatorFilter=${creatorFilter}
320
+ .mobileBreakpoint=${mobileBreakpoint}
321
+ .baseImageUrl=${this.baseImageUrl}
322
+ .loggedIn=${this.loggedIn}
323
+ .suppressBlurring=${this.suppressBlurring}
324
+ ?useLocalTime=${this.useLocalTime}
325
+ >
326
+ </tile-list>`;
327
+ default:
328
+ return nothing;
329
+ }
330
+ }
331
+ static get styles() {
332
+ return [
333
+ srOnlyStyle,
334
+ css `
335
+ :host {
336
+ display: block;
337
+ height: 100%;
338
+ }
339
+
340
+ collection-tile {
341
+ --tileBorderColor: #555555;
342
+ --tileBackgroundColor: #666666;
343
+ --imageBlockBackgroundColor: #666666;
344
+ }
345
+
346
+ account-tile {
347
+ --tileBorderColor: #dddddd;
348
+ --imageBlockBackgroundColor: #fcf5e6;
349
+ }
350
+
351
+ item-tile {
352
+ --tileBorderColor: #dddddd;
353
+ --imageBlockBackgroundColor: #f1f1f4;
354
+ }
355
+
356
+ search-tile {
357
+ --tileBorderColor: #555555;
358
+ --tileBackgroundColor: #666666;
359
+ --imageBlockBackgroundColor: #666666;
360
+ --iconFillColor: #2c2c2c;
361
+ }
362
+
363
+ #container {
364
+ position: relative;
365
+ height: 100%;
366
+ border-radius: 4px;
367
+ }
368
+
369
+ #container.hoverable a:focus,
370
+ #container.hoverable a:hover {
371
+ box-shadow: var(
372
+ --tileHoverBoxShadow,
373
+ 0 0 6px 2px rgba(8, 8, 32, 0.8)
374
+ );
375
+ transition: box-shadow 0.1s ease;
376
+ }
377
+
378
+ a {
379
+ display: block;
380
+ height: 100%;
381
+ color: unset;
382
+ text-decoration: none;
383
+ transition: transform 0.05s ease;
384
+ border-radius: 4px;
385
+ outline: none;
386
+ }
387
+
388
+ a :first-child {
389
+ display: block;
390
+ height: 100%;
391
+ }
392
+
393
+ .manage-check {
394
+ position: absolute;
395
+ right: 0;
396
+ top: 0;
397
+ border: 5px solid #2c2c2c;
398
+ border-radius: 3px;
399
+ background-color: #2c2c2c;
400
+ z-index: 1;
401
+ }
402
+
403
+ .manage-check > input[type='checkbox'] {
404
+ display: block;
405
+ margin: 0;
406
+ }
407
+
408
+ #touch-backdrop {
409
+ position: fixed;
410
+ width: 100vw;
411
+ height: 100vh;
412
+ top: 0;
413
+ left: 0;
414
+ z-index: 2;
415
+ background: transparent;
416
+ }
417
+
418
+ tile-hover-pane {
419
+ position: absolute;
420
+ top: 0;
421
+ left: -9999px;
422
+ z-index: 2;
423
+ }
424
+ `,
425
+ ];
426
+ }
427
+ };
428
+ /** Maps each display mode to whether hover panes should appear in that mode */
429
+ TileDispatcher.HOVER_PANE_DISPLAY_MODES = {
430
+ grid: true,
431
+ 'list-compact': true,
432
+ 'list-detail': false,
433
+ 'list-header': false,
434
+ };
435
+ __decorate([
436
+ property({ type: String })
437
+ ], TileDispatcher.prototype, "tileDisplayMode", void 0);
438
+ __decorate([
439
+ property({ type: Boolean })
440
+ ], TileDispatcher.prototype, "isManageView", void 0);
441
+ __decorate([
442
+ property({ type: Object })
443
+ ], TileDispatcher.prototype, "resizeObserver", void 0);
444
+ __decorate([
445
+ property({ type: Object })
446
+ ], TileDispatcher.prototype, "collectionTitles", void 0);
447
+ __decorate([
448
+ property({ type: Boolean })
449
+ ], TileDispatcher.prototype, "showTvClips", void 0);
450
+ __decorate([
451
+ property({ type: String })
452
+ ], TileDispatcher.prototype, "simpleLayoutType", void 0);
453
+ __decorate([
454
+ property({ type: Boolean })
455
+ ], TileDispatcher.prototype, "enableHoverPane", void 0);
456
+ __decorate([
457
+ property({ type: String })
458
+ ], TileDispatcher.prototype, "manageCheckTitle", void 0);
459
+ __decorate([
460
+ query('#container')
461
+ ], TileDispatcher.prototype, "container", void 0);
462
+ __decorate([
463
+ query('tile-hover-pane')
464
+ ], TileDispatcher.prototype, "hoverPane", void 0);
465
+ __decorate([
466
+ query('.tile-link')
467
+ ], TileDispatcher.prototype, "tileLinkElement", void 0);
468
+ TileDispatcher = TileDispatcher_1 = __decorate([
469
+ customElement('tile-dispatcher')
470
+ ], TileDispatcher);
471
+ export { TileDispatcher };
472
+ //# sourceMappingURL=tile-dispatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-dispatcher.js","sourceRo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AAC;mDAAqB;AAGrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAA6C;AAG3C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDAAyB;AAEzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAEzB;AAKM;IADP,KAAK,CAAC,YAAY,CAAC;iDACe;AAG3B;IADP,KAAK,CAAC,iBAAiB,CAAC;iDACS;AAG1B;IADP,KAAK,CAAC,YAAY,CAAC;uDACwB;AArDjC,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAse1B","sourcesContent":["import { css, html, nothing, PropertyValues } from 'lit';\r\nimport { customElement, property, query } from 'lit/decorators.js';\r\nimport { ifDefined } from 'lit/directives/if-defined.js';\r\nimport { msg } from '@lit/localize';\r\nimport type {\r\n SharedResizeObserverInterface,\r\n SharedResizeObserverResizeHandlerInterface,\r\n} from '@internetarchive/shared-resize-observer';\r\nimport type { TileDisplayMode } from '../models';\r\nimport type { CollectionTitles } from '../data-source/models';\r\nimport './grid/collection-tile';\r\nimport './grid/item-tile';\r\nimport './grid/account-tile';\r\nimport './grid/search-tile';\r\nimport './hover/tile-hover-pane';\r\nimport './list/tile-list';\r\nimport './list/tile-list-compact';\r\nimport './list/tile-list-compact-header';\r\nimport type { TileHoverPane } from './hover/tile-hover-pane';\r\nimport { BaseTileComponent } from './base-tile-component';\r\nimport { SimpleLayoutType } from './models';\r\nimport {\r\n HoverPaneController,\r\n HoverPaneControllerInterface,\r\n HoverPaneProperties,\r\n HoverPaneProviderInterface,\r\n} from './hover/hover-pane-controller';\r\nimport { srOnlyStyle } from '../styles/sr-only';\r\n\r\n@customElement('tile-dispatcher')\r\nexport class TileDispatcher\r\n extends BaseTileComponent\r\n implements\r\n SharedResizeObserverResizeHandlerInterface,\r\n HoverPaneProviderInterface\r\n{\r\n /*\r\n * Reactive properties inherited from BaseTileComponent:\r\n * - model?: TileModel;\r\n * - currentWidth?: number;\r\n * - currentHeight?: number;\r\n * - baseNavigationUrl?: string;\r\n * - baseImageUrl?: string;\r\n * - collectionPagePath?: string;\r\n * - sortParam: SortParam | null = null;\r\n * - defaultSortParam: SortParam | null = null;\r\n * - creatorFilter?: string;\r\n * - mobileBreakpoint?: number;\r\n * - loggedIn = false;\r\n * - suppressTileBlurring = false;\r\n * - useLocalTime = false;\r\n */\r\n\r\n @property({ type: String }) tileDisplayMode?: TileDisplayMode;\r\n\r\n @property({ type: Boolean }) isManageView = false;\r\n\r\n @property({ type: Object }) resizeObserver?: SharedResizeObserverInterface;\r\n\r\n @property({ type: Object })\r\n collectionTitles?: CollectionTitles;\r\n\r\n @property({ type: Boolean }) showTvClips = false;\r\n\r\n /** What type of simple layout to use in grid mode, if any */\r\n @property({ type: String }) simpleLayoutType: SimpleLayoutType = 'none';\r\n\r\n /** Whether this tile should include a hover pane at all (for applicable tile modes) */\r\n @property({ type: Boolean }) enableHoverPane = false;\r\n\r\n @property({ type: String }) manageCheckTitle = msg(\r\n 'Remove this item from the list',\r\n );\r\n\r\n private hoverPaneController?: HoverPaneControllerInterface;\r\n\r\n @query('#container')\r\n private container!: HTMLDivElement;\r\n\r\n @query('tile-hover-pane')\r\n private hoverPane?: TileHoverPane;\r\n\r\n @query('.tile-link')\r\n private tileLinkElement?: HTMLAnchorElement;\r\n\r\n acquireFocus(): void {\r\n this.tileLinkElement?.focus();\r\n }\r\n\r\n releaseFocus(): void {\r\n this.tileLinkElement?.blur();\r\n }\r\n\r\n /** Maps each display mode to whether hover panes should appear in that mode */\r\n private static readonly HOVER_PANE_DISPLAY_MODES: Record<\r\n TileDisplayMode,\r\n boolean\r\n > = {\r\n grid: true,\r\n 'list-compact': true,\r\n 'list-detail': false,\r\n 'list-header': false,\r\n };\r\n\r\n render() {\r\n const isGridMode = this.tileDisplayMode === 'grid';\r\n const hoverPaneTemplate =\r\n this.hoverPaneController?.getTemplate() ?? nothing;\r\n return html`\r\n <div id=\"container\" class=${isGridMode ? 'hoverable' : ''}>\r\n ${this.tileDisplayMode === 'list-header'\r\n ? this.headerTemplate\r\n : this.tileTemplate}\r\n ${this.manageCheckTemplate} ${hoverPaneTemplate}\r\n </div>\r\n `;\r\n }\r\n\r\n protected firstUpdated(): void {\r\n if (this.shouldPrepareHoverPane) {\r\n this.hoverPaneController = new HoverPaneController(this, {\r\n mobileBreakpoint: this.mobileBreakpoint,\r\n enableLongPress: false,\r\n });\r\n }\r\n }\r\n\r\n private get headerTemplate() {\r\n const { currentWidth, sortParam, defaultSortParam, mobileBreakpoint } =\r\n this;\r\n return html`\r\n <tile-list-compact-header\r\n class=\"header\"\r\n .currentWidth=${currentWidth}\r\n .sortParam=${sortParam ?? defaultSortParam}\r\n .mobileBreakpoint=${mobileBreakpoint}\r\n >\r\n </tile-list-compact-header>\r\n `;\r\n }\r\n\r\n private get tileTemplate() {\r\n return html`\r\n ${this.tileDisplayMode === 'list-detail'\r\n ? this.tile\r\n : this.linkTileTemplate}\r\n `;\r\n }\r\n\r\n private get linkTileTemplate() {\r\n return html`\r\n <a\r\n href=${this.linkTileHref}\r\n aria-label=${this.model?.title ?? 'Untitled item'}\r\n aria-describedby=\"link-aria-description\"\r\n aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}\r\n title=${this.shouldPrepareHoverPane\r\n ? nothing // Don't show title tooltips when we have the tile info popups\r\n : ifDefined(this.model?.title)}\r\n @click=${this.handleLinkClicked}\r\n @contextmenu=${this.handleLinkContextMenu}\r\n class=\"tile-link\"\r\n >\r\n ${this.tile}\r\n </a>\r\n <div id=\"link-aria-description\" class=\"sr-only\">\r\n ${msg('Press Down Arrow to preview item details')}\r\n </div>\r\n `;\r\n }\r\n\r\n private get linkTileHref(): string | typeof nothing {\r\n if (!this.model?.identifier || this.baseNavigationUrl == null)\r\n return nothing;\r\n\r\n // Use the server-specified href if available.\r\n // Otherwise, construct a details page URL from the item identifier.\r\n if (this.model.href) {\r\n return `${this.baseNavigationUrl}${this.model.href}`;\r\n }\r\n\r\n return this.displayValueProvider.itemPageUrl(\r\n this.model.identifier,\r\n this.model.mediatype === 'collection',\r\n );\r\n }\r\n\r\n private get manageCheckTemplate() {\r\n if (!this.isManageView || this.tileDisplayMode !== 'grid') return nothing;\r\n\r\n return html`\r\n <div class=\"manage-check\">\r\n <input\r\n type=\"checkbox\"\r\n title=${this.manageCheckTitle}\r\n ?checked=${this.model?.checked}\r\n @change=${this.handleLinkClicked}\r\n />\r\n </div>\r\n `;\r\n }\r\n\r\n /**\r\n * Whether hover pane behavior should be prepared for this tile\r\n * (e.g., whether mouse listeners should be attached, etc.)\r\n */\r\n private get shouldPrepareHoverPane(): boolean {\r\n return (\r\n this.enableHoverPane &&\r\n !!this.tileDisplayMode &&\r\n TileDispatcher.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode] &&\r\n this.model?.mediatype !== 'search' && // don't show hover panes on search tiles\r\n !this.model?.captureDates // don't show hover panes on web archive tiles\r\n );\r\n }\r\n\r\n private get isHoverEnabled(): boolean {\r\n return window.matchMedia('(hover: hover)').matches;\r\n }\r\n\r\n /** @inheritdoc */\r\n getHoverPane(): TileHoverPane | undefined {\r\n return this.hoverPane;\r\n }\r\n\r\n /** @inheritdoc */\r\n getHoverPaneProps(): HoverPaneProperties {\r\n return this;\r\n }\r\n\r\n handleResize(entry: ResizeObserverEntry): void {\r\n this.currentWidth = entry.contentRect.width;\r\n this.currentHeight = entry.contentRect.height;\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.stopResizeObservation(this.resizeObserver);\r\n }\r\n\r\n private stopResizeObservation(observer?: SharedResizeObserverInterface) {\r\n observer?.removeObserver({\r\n handler: this,\r\n target: this.container,\r\n });\r\n }\r\n\r\n private startResizeObservation() {\r\n this.stopResizeObservation(this.resizeObserver);\r\n this.resizeObserver?.addObserver({\r\n handler: this,\r\n target: this.container,\r\n });\r\n }\r\n\r\n updated(props: PropertyValues) {\r\n if (props.has('resizeObserver')) {\r\n const previousObserver = props.get(\r\n 'resizeObserver',\r\n ) as SharedResizeObserverInterface;\r\n this.stopResizeObservation(previousObserver);\r\n this.startResizeObservation();\r\n }\r\n }\r\n\r\n /**\r\n * Handler for when the tile link is left-clicked. Emits the `resultSelected` event.\r\n * In manage view, it also checks/unchecks the tile.\r\n */\r\n private handleLinkClicked(e: Event): void {\r\n if (this.isManageView) {\r\n e.preventDefault();\r\n if (this.model) this.model.checked = !this.model.checked;\r\n }\r\n\r\n this.dispatchEvent(\r\n new CustomEvent('resultSelected', { detail: this.model }),\r\n );\r\n }\r\n\r\n /**\r\n * Handler for when the tile link is right-clicked.\r\n * In manage view, it opens the item in a new tab. Otherwise, does nothing.\r\n */\r\n private handleLinkContextMenu(e: Event): void {\r\n if (this.isManageView && this.linkTileHref !== nothing) {\r\n e.preventDefault();\r\n window.open(this.linkTileHref, '_blank');\r\n }\r\n }\r\n\r\n private tileInfoButtonPressed(\r\n e: CustomEvent<{ x: number; y: number }>,\r\n ): void {\r\n this.hoverPaneController?.toggleHoverPane({\r\n coords: e.detail,\r\n enableTouchBackdrop: true,\r\n });\r\n }\r\n\r\n private get tile() {\r\n const {\r\n model,\r\n collectionPagePath,\r\n baseNavigationUrl,\r\n currentWidth,\r\n currentHeight,\r\n sortParam,\r\n creatorFilter,\r\n mobileBreakpoint,\r\n defaultSortParam,\r\n } = this;\r\n\r\n if (!model) return nothing;\r\n\r\n switch (this.tileDisplayMode) {\r\n case 'grid':\r\n switch (model.mediatype) {\r\n case 'collection':\r\n return html`<collection-tile\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .currentWidth=${currentWidth}\r\n .currentHeight=${currentHeight}\r\n .creatorFilter=${creatorFilter}\r\n .suppressBlurring=${this.suppressBlurring}\r\n .isManageView=${this.isManageView}\r\n ?showInfoButton=${!this.isHoverEnabled}\r\n @infoButtonPressed=${this.tileInfoButtonPressed}\r\n >\r\n </collection-tile>`;\r\n case 'account':\r\n return html`<account-tile\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .currentWidth=${currentWidth}\r\n .currentHeight=${currentHeight}\r\n .creatorFilter=${creatorFilter}\r\n .suppressBlurring=${this.suppressBlurring}\r\n .isManageView=${this.isManageView}\r\n ?showInfoButton=${!this.isHoverEnabled}\r\n @infoButtonPressed=${this.tileInfoButtonPressed}\r\n >\r\n </account-tile>`;\r\n case 'search':\r\n return html`<search-tile\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .currentWidth=${currentWidth}\r\n .currentHeight=${currentHeight}\r\n .creatorFilter=${creatorFilter}\r\n .suppressBlurring=${this.suppressBlurring}\r\n .isManageView=${this.isManageView}\r\n ?showInfoButton=${false}\r\n @infoButtonPressed=${this.tileInfoButtonPressed}\r\n >\r\n </search-tile>`;\r\n default:\r\n return html`<item-tile\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .currentWidth=${this.currentWidth}\r\n .currentHeight=${this.currentHeight}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .sortParam=${sortParam}\r\n .defaultSortParam=${defaultSortParam}\r\n .creatorFilter=${creatorFilter}\r\n .loggedIn=${this.loggedIn}\r\n .suppressBlurring=${this.suppressBlurring}\r\n .isManageView=${this.isManageView}\r\n .simpleLayoutType=${this.simpleLayoutType}\r\n ?showTvClips=${this.showTvClips}\r\n ?showInfoButton=${!this.isHoverEnabled}\r\n ?useLocalTime=${this.useLocalTime}\r\n @infoButtonPressed=${this.tileInfoButtonPressed}\r\n >\r\n </item-tile>`;\r\n }\r\n case 'list-compact':\r\n return html`<tile-list-compact\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .currentWidth=${currentWidth}\r\n .currentHeight=${currentHeight}\r\n .baseNavigationUrl=${baseNavigationUrl}\r\n .sortParam=${sortParam}\r\n .defaultSortParam=${defaultSortParam}\r\n .creatorFilter=${creatorFilter}\r\n .mobileBreakpoint=${mobileBreakpoint}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .loggedIn=${this.loggedIn}\r\n .suppressBlurring=${this.suppressBlurring}\r\n ?useLocalTime=${this.useLocalTime}\r\n >\r\n </tile-list-compact>`;\r\n case 'list-detail':\r\n return html`<tile-list\r\n .model=${model}\r\n .collectionPagePath=${collectionPagePath}\r\n .collectionTitles=${this.collectionTitles}\r\n .currentWidth=${currentWidth}\r\n .currentHeight=${currentHeight}\r\n .baseNavigationUrl=${baseNavigationUrl}\r\n .sortParam=${sortParam}\r\n .defaultSortParam=${defaultSortParam}\r\n .creatorFilter=${creatorFilter}\r\n .mobileBreakpoint=${mobileBreakpoint}\r\n .baseImageUrl=${this.baseImageUrl}\r\n .loggedIn=${this.loggedIn}\r\n .suppressBlurring=${this.suppressBlurring}\r\n ?useLocalTime=${this.useLocalTime}\r\n >\r\n </tile-list>`;\r\n default:\r\n return nothing;\r\n }\r\n }\r\n\r\n static get styles() {\r\n return [\r\n srOnlyStyle,\r\n css`\r\n :host {\r\n display: block;\r\n height: 100%;\r\n }\r\n\r\n collection-tile {\r\n --tileBorderColor: #555555;\r\n --tileBackgroundColor: #666666;\r\n --imageBlockBackgroundColor: #666666;\r\n }\r\n\r\n account-tile {\r\n --tileBorderColor: #dddddd;\r\n --imageBlockBackgroundColor: #fcf5e6;\r\n }\r\n\r\n item-tile {\r\n --tileBorderColor: #dddddd;\r\n --imageBlockBackgroundColor: #f1f1f4;\r\n }\r\n\r\n search-tile {\r\n --tileBorderColor: #555555;\r\n --tileBackgroundColor: #666666;\r\n --imageBlockBackgroundColor: #666666;\r\n --iconFillColor: #2c2c2c;\r\n }\r\n\r\n #container {\r\n position: relative;\r\n height: 100%;\r\n border-radius: 4px;\r\n }\r\n\r\n #container.hoverable a:focus,\r\n #container.hoverable a:hover {\r\n box-shadow: var(\r\n --tileHoverBoxShadow,\r\n 0 0 6px 2px rgba(8, 8, 32, 0.8)\r\n );\r\n transition: box-shadow 0.1s ease;\r\n }\r\n\r\n a {\r\n display: block;\r\n height: 100%;\r\n color: unset;\r\n text-decoration: none;\r\n transition: transform 0.05s ease;\r\n border-radius: 4px;\r\n outline: none;\r\n }\r\n\r\n a :first-child {\r\n display: block;\r\n height: 100%;\r\n }\r\n\r\n .manage-check {\r\n position: absolute;\r\n right: 0;\r\n top: 0;\r\n border: 5px solid #2c2c2c;\r\n border-radius: 3px;\r\n background-color: #2c2c2c;\r\n z-index: 1;\r\n }\r\n\r\n .manage-check > input[type='checkbox'] {\r\n display: block;\r\n margin: 0;\r\n }\r\n\r\n #touch-backdrop {\r\n position: fixed;\r\n width: 100vw;\r\n height: 100vh;\r\n top: 0;\r\n left: 0;\r\n z-index: 2;\r\n background: transparent;\r\n }\r\n\r\n tile-hover-pane {\r\n position: absolute;\r\n top: 0;\r\n left: -9999px;\r\n z-index: 2;\r\n }\r\n `,\r\n ];\r\n }\r\n}\r\n"]}
@@ -0,0 +1,47 @@
1
+ import { TemplateResult, nothing } from 'lit';
2
+ import type { SortParam } from '@internetarchive/search-service';
3
+ import type { TileModel } from '../models';
4
+ /**
5
+ * A class encapsulating shared logic for converting model values into display values
6
+ * across different types of tiles.
7
+ */
8
+ export declare class TileDisplayValueProvider {
9
+ private model?;
10
+ private baseNavigationUrl?;
11
+ private collectionPagePath?;
12
+ private sortParam?;
13
+ private creatorFilter?;
14
+ constructor(options?: {
15
+ model?: TileModel;
16
+ baseNavigationUrl?: string;
17
+ collectionPagePath?: string;
18
+ sortParam?: SortParam;
19
+ creatorFilter?: string;
20
+ });
21
+ /**
22
+ * Examines the creator(s) for the given tile model, returning
23
+ * the first creator whose name matches the provided filter
24
+ * (or simply the first creator overall if no filter is provided).
25
+ */
26
+ get firstCreatorMatchingFilter(): string | undefined;
27
+ /**
28
+ * The label indicating what year an account item was created.
29
+ * E.g., "Archivist since 2015"
30
+ */
31
+ get accountLabel(): string;
32
+ /**
33
+ * The readable label for the current sort if it is a type of date sort,
34
+ * or the empty string otherwise.
35
+ */
36
+ get dateLabel(): string;
37
+ /**
38
+ * Produces a URL pointing at the item page for the given identifier,
39
+ * using the current base URL and the correct path based on whether the
40
+ * item is specified to be a collection (default false).
41
+ */
42
+ itemPageUrl(identifier?: string, isCollection?: boolean): string | typeof nothing;
43
+ /**
44
+ * Produces a template for a link to a single web capture of the given URL and date
45
+ */
46
+ webArchivesCaptureLink(url: string, date: Date): TemplateResult;
47
+ }