@internetarchive/collection-browser 4.7.1-alpha-webdev9189.0 → 4.8.1-alpha-webdev9189.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 (351) hide show
  1. package/dist/src/app-root.js +0 -2
  2. package/dist/src/app-root.js.map +1 -1
  3. package/dist/src/assets/img/icons/check.d.ts +2 -0
  4. package/dist/src/assets/img/icons/check.js +5 -0
  5. package/dist/src/assets/img/icons/check.js.map +1 -0
  6. package/dist/src/collection-facets/facet-row-template.d.ts +38 -0
  7. package/dist/src/collection-facets/facet-row-template.js +200 -0
  8. package/dist/src/collection-facets/facet-row-template.js.map +1 -0
  9. package/dist/src/collection-facets/facet-row.js +11 -186
  10. package/dist/src/collection-facets/facet-row.js.map +1 -1
  11. package/dist/src/collection-facets/models.d.ts +7 -2
  12. package/dist/src/collection-facets/models.js +7 -2
  13. package/dist/src/collection-facets/models.js.map +1 -1
  14. package/dist/src/collection-facets/more-facets-content.d.ts +87 -21
  15. package/dist/src/collection-facets/more-facets-content.js +477 -200
  16. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  17. package/dist/src/collection-facets/more-facets-scroller.d.ts +85 -0
  18. package/dist/src/collection-facets/more-facets-scroller.js +428 -0
  19. package/dist/src/collection-facets/more-facets-scroller.js.map +1 -0
  20. package/dist/src/collection-facets/page-window.d.ts +73 -0
  21. package/dist/src/collection-facets/page-window.js +202 -0
  22. package/dist/src/collection-facets/page-window.js.map +1 -0
  23. package/dist/src/collection-facets/toggle-switch.js +1 -0
  24. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  25. package/dist/src/models.d.ts +4 -0
  26. package/dist/src/models.js +16 -0
  27. package/dist/src/models.js.map +1 -1
  28. package/dist/src/utils/normalize-filter-text.d.ts +28 -0
  29. package/dist/src/utils/normalize-filter-text.js +35 -0
  30. package/dist/src/utils/normalize-filter-text.js.map +1 -0
  31. package/package.json +7 -1
  32. package/.editorconfig +0 -29
  33. package/.github/workflows/ci.yml +0 -29
  34. package/.github/workflows/gh-pages-main.yml +0 -41
  35. package/.github/workflows/npm-publish.yml +0 -42
  36. package/.github/workflows/pr-preview.yml +0 -40
  37. package/.husky/pre-commit +0 -1
  38. package/.prettierignore +0 -1
  39. package/dist/src/collection-facets/more-facets-pagination.d.ts +0 -36
  40. package/dist/src/collection-facets/more-facets-pagination.js +0 -260
  41. package/dist/src/collection-facets/more-facets-pagination.js.map +0 -1
  42. package/dist/test/collection-browser.test.d.ts +0 -1
  43. package/dist/test/collection-browser.test.js +0 -1849
  44. package/dist/test/collection-browser.test.js.map +0 -1
  45. package/dist/test/collection-facets/facet-row.test.d.ts +0 -1
  46. package/dist/test/collection-facets/facet-row.test.js +0 -291
  47. package/dist/test/collection-facets/facet-row.test.js.map +0 -1
  48. package/dist/test/collection-facets/facets-template.test.d.ts +0 -1
  49. package/dist/test/collection-facets/facets-template.test.js +0 -95
  50. package/dist/test/collection-facets/facets-template.test.js.map +0 -1
  51. package/dist/test/collection-facets/more-facets-content.test.d.ts +0 -1
  52. package/dist/test/collection-facets/more-facets-content.test.js +0 -159
  53. package/dist/test/collection-facets/more-facets-content.test.js.map +0 -1
  54. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +0 -1
  55. package/dist/test/collection-facets/more-facets-pagination.test.js +0 -126
  56. package/dist/test/collection-facets/more-facets-pagination.test.js.map +0 -1
  57. package/dist/test/collection-facets/toggle-switch.test.d.ts +0 -1
  58. package/dist/test/collection-facets/toggle-switch.test.js +0 -99
  59. package/dist/test/collection-facets/toggle-switch.test.js.map +0 -1
  60. package/dist/test/collection-facets.test.d.ts +0 -2
  61. package/dist/test/collection-facets.test.js +0 -728
  62. package/dist/test/collection-facets.test.js.map +0 -1
  63. package/dist/test/data-source/collection-browser-data-source.test.d.ts +0 -1
  64. package/dist/test/data-source/collection-browser-data-source.test.js +0 -154
  65. package/dist/test/data-source/collection-browser-data-source.test.js.map +0 -1
  66. package/dist/test/empty-placeholder.test.d.ts +0 -1
  67. package/dist/test/empty-placeholder.test.js +0 -57
  68. package/dist/test/empty-placeholder.test.js.map +0 -1
  69. package/dist/test/expanded-date-picker.test.d.ts +0 -1
  70. package/dist/test/expanded-date-picker.test.js +0 -124
  71. package/dist/test/expanded-date-picker.test.js.map +0 -1
  72. package/dist/test/icon-overlay.test.d.ts +0 -1
  73. package/dist/test/icon-overlay.test.js +0 -31
  74. package/dist/test/icon-overlay.test.js.map +0 -1
  75. package/dist/test/image-block.test.d.ts +0 -1
  76. package/dist/test/image-block.test.js +0 -208
  77. package/dist/test/image-block.test.js.map +0 -1
  78. package/dist/test/item-image.test.d.ts +0 -1
  79. package/dist/test/item-image.test.js +0 -187
  80. package/dist/test/item-image.test.js.map +0 -1
  81. package/dist/test/manage/manage-bar.test.d.ts +0 -3
  82. package/dist/test/manage/manage-bar.test.js +0 -216
  83. package/dist/test/manage/manage-bar.test.js.map +0 -1
  84. package/dist/test/manage/remove-items-modal-content.test.d.ts +0 -1
  85. package/dist/test/manage/remove-items-modal-content.test.js +0 -60
  86. package/dist/test/manage/remove-items-modal-content.test.js.map +0 -1
  87. package/dist/test/mediatype-config.test.d.ts +0 -1
  88. package/dist/test/mediatype-config.test.js +0 -11
  89. package/dist/test/mediatype-config.test.js.map +0 -1
  90. package/dist/test/mocks/mock-analytics-handler.d.ts +0 -10
  91. package/dist/test/mocks/mock-analytics-handler.js +0 -16
  92. package/dist/test/mocks/mock-analytics-handler.js.map +0 -1
  93. package/dist/test/mocks/mock-search-responses.d.ts +0 -31
  94. package/dist/test/mocks/mock-search-responses.js +0 -1241
  95. package/dist/test/mocks/mock-search-responses.js.map +0 -1
  96. package/dist/test/mocks/mock-search-service.d.ts +0 -16
  97. package/dist/test/mocks/mock-search-service.js +0 -64
  98. package/dist/test/mocks/mock-search-service.js.map +0 -1
  99. package/dist/test/restoration-state-handler.test.d.ts +0 -1
  100. package/dist/test/restoration-state-handler.test.js +0 -335
  101. package/dist/test/restoration-state-handler.test.js.map +0 -1
  102. package/dist/test/review-block.test.d.ts +0 -1
  103. package/dist/test/review-block.test.js +0 -46
  104. package/dist/test/review-block.test.js.map +0 -1
  105. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +0 -1
  106. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +0 -12
  107. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +0 -1
  108. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +0 -1
  109. package/dist/test/sort-filter-bar/alpha-bar.test.js +0 -68
  110. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +0 -1
  111. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +0 -1
  112. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +0 -326
  113. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +0 -1
  114. package/dist/test/text-overlay.test.d.ts +0 -1
  115. package/dist/test/text-overlay.test.js +0 -43
  116. package/dist/test/text-overlay.test.js.map +0 -1
  117. package/dist/test/text-snippet-block.test.d.ts +0 -1
  118. package/dist/test/text-snippet-block.test.js +0 -58
  119. package/dist/test/text-snippet-block.test.js.map +0 -1
  120. package/dist/test/tile-stats.test.d.ts +0 -1
  121. package/dist/test/tile-stats.test.js +0 -167
  122. package/dist/test/tile-stats.test.js.map +0 -1
  123. package/dist/test/tiles/grid/account-tile.test.d.ts +0 -1
  124. package/dist/test/tiles/grid/account-tile.test.js +0 -96
  125. package/dist/test/tiles/grid/account-tile.test.js.map +0 -1
  126. package/dist/test/tiles/grid/collection-tile.test.d.ts +0 -1
  127. package/dist/test/tiles/grid/collection-tile.test.js +0 -90
  128. package/dist/test/tiles/grid/collection-tile.test.js.map +0 -1
  129. package/dist/test/tiles/grid/item-tile.test.d.ts +0 -1
  130. package/dist/test/tiles/grid/item-tile.test.js +0 -400
  131. package/dist/test/tiles/grid/item-tile.test.js.map +0 -1
  132. package/dist/test/tiles/grid/search-tile.test.d.ts +0 -1
  133. package/dist/test/tiles/grid/search-tile.test.js +0 -62
  134. package/dist/test/tiles/grid/search-tile.test.js.map +0 -1
  135. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +0 -1
  136. package/dist/test/tiles/hover/hover-pane-controller.test.js +0 -351
  137. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +0 -1
  138. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +0 -1
  139. package/dist/test/tiles/hover/tile-hover-pane.test.js +0 -53
  140. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +0 -1
  141. package/dist/test/tiles/list/tile-list-compact-header.test.d.ts +0 -1
  142. package/dist/test/tiles/list/tile-list-compact-header.test.js +0 -36
  143. package/dist/test/tiles/list/tile-list-compact-header.test.js.map +0 -1
  144. package/dist/test/tiles/list/tile-list-compact.test.d.ts +0 -1
  145. package/dist/test/tiles/list/tile-list-compact.test.js +0 -237
  146. package/dist/test/tiles/list/tile-list-compact.test.js.map +0 -1
  147. package/dist/test/tiles/list/tile-list.test.d.ts +0 -1
  148. package/dist/test/tiles/list/tile-list.test.js +0 -460
  149. package/dist/test/tiles/list/tile-list.test.js.map +0 -1
  150. package/dist/test/tiles/tile-dispatcher.test.d.ts +0 -1
  151. package/dist/test/tiles/tile-dispatcher.test.js +0 -246
  152. package/dist/test/tiles/tile-dispatcher.test.js.map +0 -1
  153. package/dist/test/tiles/tile-display-value-provider.test.d.ts +0 -1
  154. package/dist/test/tiles/tile-display-value-provider.test.js +0 -142
  155. package/dist/test/tiles/tile-display-value-provider.test.js.map +0 -1
  156. package/dist/test/tiles/tile-mediatype-icon.test.d.ts +0 -1
  157. package/dist/test/tiles/tile-mediatype-icon.test.js +0 -133
  158. package/dist/test/tiles/tile-mediatype-icon.test.js.map +0 -1
  159. package/dist/test/utils/array-equals.test.d.ts +0 -1
  160. package/dist/test/utils/array-equals.test.js +0 -27
  161. package/dist/test/utils/array-equals.test.js.map +0 -1
  162. package/dist/test/utils/format-count.test.d.ts +0 -1
  163. package/dist/test/utils/format-count.test.js +0 -24
  164. package/dist/test/utils/format-count.test.js.map +0 -1
  165. package/dist/test/utils/format-date.test.d.ts +0 -1
  166. package/dist/test/utils/format-date.test.js +0 -61
  167. package/dist/test/utils/format-date.test.js.map +0 -1
  168. package/dist/test/utils/format-unit-size.test.d.ts +0 -1
  169. package/dist/test/utils/format-unit-size.test.js +0 -18
  170. package/dist/test/utils/format-unit-size.test.js.map +0 -1
  171. package/dist/test/utils/local-date-from-utc.test.d.ts +0 -1
  172. package/dist/test/utils/local-date-from-utc.test.js +0 -27
  173. package/dist/test/utils/local-date-from-utc.test.js.map +0 -1
  174. package/eslint.config.mjs +0 -53
  175. package/index.html +0 -24
  176. package/index.ts +0 -29
  177. package/local.archive.org.cert +0 -86
  178. package/local.archive.org.key +0 -27
  179. package/pnpm-workspace.yaml +0 -30
  180. package/renovate.json +0 -6
  181. package/src/app-root.ts +0 -1284
  182. package/src/assets/img/icons/arrow-left.ts +0 -10
  183. package/src/assets/img/icons/arrow-right.ts +0 -10
  184. package/src/assets/img/icons/chevron.ts +0 -4
  185. package/src/assets/img/icons/close-circle-dark.ts +0 -5
  186. package/src/assets/img/icons/contract.ts +0 -9
  187. package/src/assets/img/icons/empty-query.ts +0 -5
  188. package/src/assets/img/icons/expand.ts +0 -9
  189. package/src/assets/img/icons/eye-closed.ts +0 -5
  190. package/src/assets/img/icons/eye.ts +0 -5
  191. package/src/assets/img/icons/favorite-filled.ts +0 -10
  192. package/src/assets/img/icons/favorite-unfilled.ts +0 -9
  193. package/src/assets/img/icons/filter.ts +0 -10
  194. package/src/assets/img/icons/login-required.ts +0 -18
  195. package/src/assets/img/icons/mediatype/account.ts +0 -14
  196. package/src/assets/img/icons/mediatype/audio.ts +0 -14
  197. package/src/assets/img/icons/mediatype/collection.ts +0 -12
  198. package/src/assets/img/icons/mediatype/data.ts +0 -15
  199. package/src/assets/img/icons/mediatype/etree.ts +0 -14
  200. package/src/assets/img/icons/mediatype/film.ts +0 -14
  201. package/src/assets/img/icons/mediatype/images.ts +0 -13
  202. package/src/assets/img/icons/mediatype/radio.ts +0 -15
  203. package/src/assets/img/icons/mediatype/search.ts +0 -14
  204. package/src/assets/img/icons/mediatype/software.ts +0 -13
  205. package/src/assets/img/icons/mediatype/texts.ts +0 -13
  206. package/src/assets/img/icons/mediatype/tv-commercial.ts +0 -12
  207. package/src/assets/img/icons/mediatype/tv-fact-check.ts +0 -12
  208. package/src/assets/img/icons/mediatype/tv-quote.ts +0 -12
  209. package/src/assets/img/icons/mediatype/tv.ts +0 -14
  210. package/src/assets/img/icons/mediatype/video.ts +0 -14
  211. package/src/assets/img/icons/mediatype/web.ts +0 -13
  212. package/src/assets/img/icons/null-result.ts +0 -5
  213. package/src/assets/img/icons/quote.ts +0 -7
  214. package/src/assets/img/icons/restricted.ts +0 -13
  215. package/src/assets/img/icons/reviews.ts +0 -11
  216. package/src/assets/img/icons/upload.ts +0 -12
  217. package/src/assets/img/icons/views.ts +0 -11
  218. package/src/circular-activity-indicator.ts +0 -64
  219. package/src/collection-browser.ts +0 -3187
  220. package/src/collection-facets/facet-row.ts +0 -309
  221. package/src/collection-facets/facet-tombstone-row.ts +0 -40
  222. package/src/collection-facets/facets-template.ts +0 -85
  223. package/src/collection-facets/models.ts +0 -10
  224. package/src/collection-facets/more-facets-content.ts +0 -644
  225. package/src/collection-facets/more-facets-pagination.ts +0 -294
  226. package/src/collection-facets/smart-facets/dedupe.ts +0 -44
  227. package/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +0 -27
  228. package/src/collection-facets/smart-facets/heuristics/index.ts +0 -3
  229. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +0 -17
  230. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +0 -70
  231. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +0 -79
  232. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +0 -93
  233. package/src/collection-facets/smart-facets/models.ts +0 -36
  234. package/src/collection-facets/smart-facets/smart-facet-bar.ts +0 -437
  235. package/src/collection-facets/smart-facets/smart-facet-button.ts +0 -145
  236. package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +0 -185
  237. package/src/collection-facets/smart-facets/smart-facet-equals.ts +0 -16
  238. package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +0 -26
  239. package/src/collection-facets/toggle-switch.ts +0 -174
  240. package/src/collection-facets.ts +0 -1013
  241. package/src/data-source/collection-browser-data-source-interface.ts +0 -351
  242. package/src/data-source/collection-browser-data-source.ts +0 -1474
  243. package/src/data-source/collection-browser-query-state.ts +0 -60
  244. package/src/data-source/models.ts +0 -56
  245. package/src/empty-placeholder.ts +0 -192
  246. package/src/expanded-date-picker.ts +0 -191
  247. package/src/language-code-handler/language-code-handler.ts +0 -64
  248. package/src/language-code-handler/language-code-mapping.ts +0 -564
  249. package/src/manage/manage-bar.ts +0 -276
  250. package/src/manage/remove-items-modal-content.ts +0 -102
  251. package/src/mediatype/mediatype-config.ts +0 -146
  252. package/src/models.ts +0 -895
  253. package/src/restoration-state-handler.ts +0 -550
  254. package/src/sort-filter-bar/alpha-bar-tooltip.ts +0 -53
  255. package/src/sort-filter-bar/alpha-bar.ts +0 -252
  256. package/src/sort-filter-bar/img/compact.ts +0 -5
  257. package/src/sort-filter-bar/img/list.ts +0 -5
  258. package/src/sort-filter-bar/img/sort-toggle-disabled.ts +0 -15
  259. package/src/sort-filter-bar/img/sort-toggle-down.ts +0 -17
  260. package/src/sort-filter-bar/img/sort-toggle-up.ts +0 -17
  261. package/src/sort-filter-bar/img/sort-triangle.ts +0 -5
  262. package/src/sort-filter-bar/img/tile.ts +0 -5
  263. package/src/sort-filter-bar/sort-filter-bar.ts +0 -734
  264. package/src/styles/ia-button.ts +0 -139
  265. package/src/styles/item-image-styles.ts +0 -124
  266. package/src/styles/sr-only.ts +0 -18
  267. package/src/styles/tile-action-styles.ts +0 -59
  268. package/src/tiles/base-tile-component.ts +0 -124
  269. package/src/tiles/collection-browser-loading-tile.ts +0 -26
  270. package/src/tiles/grid/account-tile.ts +0 -113
  271. package/src/tiles/grid/collection-tile.ts +0 -184
  272. package/src/tiles/grid/item-tile.ts +0 -347
  273. package/src/tiles/grid/search-tile.ts +0 -90
  274. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +0 -130
  275. package/src/tiles/grid/tile-stats.ts +0 -211
  276. package/src/tiles/hover/hover-pane-controller.ts +0 -638
  277. package/src/tiles/hover/tile-hover-pane.ts +0 -184
  278. package/src/tiles/image-block.ts +0 -162
  279. package/src/tiles/item-image.ts +0 -214
  280. package/src/tiles/list/tile-list-compact-header.ts +0 -112
  281. package/src/tiles/list/tile-list-compact.ts +0 -278
  282. package/src/tiles/list/tile-list.ts +0 -718
  283. package/src/tiles/models.ts +0 -21
  284. package/src/tiles/overlay/icon-overlay.ts +0 -57
  285. package/src/tiles/overlay/text-overlay.ts +0 -79
  286. package/src/tiles/review-block.ts +0 -130
  287. package/src/tiles/text-snippet-block.ts +0 -132
  288. package/src/tiles/tile-dispatcher.ts +0 -637
  289. package/src/tiles/tile-display-value-provider.ts +0 -133
  290. package/src/tiles/tile-mediatype-icon.ts +0 -133
  291. package/src/utils/analytics-events.ts +0 -29
  292. package/src/utils/array-equals.ts +0 -8
  293. package/src/utils/collapse-repeated-quotes.ts +0 -13
  294. package/src/utils/date-filter-field.ts +0 -11
  295. package/src/utils/facet-utils.ts +0 -183
  296. package/src/utils/format-count.ts +0 -95
  297. package/src/utils/format-date.ts +0 -62
  298. package/src/utils/format-unit-size.ts +0 -43
  299. package/src/utils/local-date-from-utc.ts +0 -15
  300. package/src/utils/log.ts +0 -14
  301. package/src/utils/resolve-mediatype.ts +0 -26
  302. package/src/utils/sha1.ts +0 -9
  303. package/test/collection-browser.test.ts +0 -2694
  304. package/test/collection-facets/facet-row.test.ts +0 -421
  305. package/test/collection-facets/facets-template.test.ts +0 -139
  306. package/test/collection-facets/more-facets-content.test.ts +0 -231
  307. package/test/collection-facets/more-facets-pagination.test.ts +0 -201
  308. package/test/collection-facets/toggle-switch.test.ts +0 -164
  309. package/test/collection-facets.test.ts +0 -928
  310. package/test/data-source/collection-browser-data-source.test.ts +0 -193
  311. package/test/empty-placeholder.test.ts +0 -88
  312. package/test/expanded-date-picker.test.ts +0 -201
  313. package/test/icon-overlay.test.ts +0 -38
  314. package/test/image-block.test.ts +0 -247
  315. package/test/item-image.test.ts +0 -220
  316. package/test/manage/manage-bar.test.ts +0 -347
  317. package/test/manage/remove-items-modal-content.test.ts +0 -81
  318. package/test/mediatype-config.test.ts +0 -11
  319. package/test/mocks/mock-analytics-handler.ts +0 -30
  320. package/test/mocks/mock-search-responses.ts +0 -1364
  321. package/test/mocks/mock-search-service.ts +0 -134
  322. package/test/restoration-state-handler.test.ts +0 -480
  323. package/test/review-block.test.ts +0 -62
  324. package/test/sort-filter-bar/alpha-bar-tooltip.test.ts +0 -17
  325. package/test/sort-filter-bar/alpha-bar.test.ts +0 -101
  326. package/test/sort-filter-bar/sort-filter-bar.test.ts +0 -472
  327. package/test/text-overlay.test.ts +0 -55
  328. package/test/text-snippet-block.test.ts +0 -85
  329. package/test/tile-stats.test.ts +0 -191
  330. package/test/tiles/grid/account-tile.test.ts +0 -121
  331. package/test/tiles/grid/collection-tile.test.ts +0 -114
  332. package/test/tiles/grid/item-tile.test.ts +0 -520
  333. package/test/tiles/grid/search-tile.test.ts +0 -75
  334. package/test/tiles/hover/hover-pane-controller.test.ts +0 -482
  335. package/test/tiles/hover/tile-hover-pane.test.ts +0 -80
  336. package/test/tiles/list/tile-list-compact-header.test.ts +0 -43
  337. package/test/tiles/list/tile-list-compact.test.ts +0 -282
  338. package/test/tiles/list/tile-list.test.ts +0 -576
  339. package/test/tiles/tile-dispatcher.test.ts +0 -320
  340. package/test/tiles/tile-display-value-provider.test.ts +0 -172
  341. package/test/tiles/tile-mediatype-icon.test.ts +0 -160
  342. package/test/utils/array-equals.test.ts +0 -31
  343. package/test/utils/format-count.test.ts +0 -32
  344. package/test/utils/format-date.test.ts +0 -89
  345. package/test/utils/format-unit-size.test.ts +0 -21
  346. package/test/utils/local-date-from-utc.test.ts +0 -37
  347. package/tsconfig.json +0 -25
  348. package/types/dompurify.d.ts +0 -1
  349. package/vite.config.ts +0 -29
  350. package/web-dev-server.config.mjs +0 -30
  351. package/web-test-runner.config.mjs +0 -52
@@ -1,130 +0,0 @@
1
- import { css } from 'lit';
2
- import { srOnlyStyle } from '../../../styles/sr-only';
3
-
4
- /**
5
- * Base tile styles
6
- */
7
-
8
- const tileBackgroundColor = css`var(--tileBackgroundColor, #ffffff)`;
9
- const tileCornerRadius = css`var(--tileCornerRadius, 4px)`;
10
-
11
- export const baseTileStyles = css`
12
- /* Include .sr-only styles for all tiles */
13
- ${srOnlyStyle}
14
-
15
- .container {
16
- background-color: ${tileBackgroundColor};
17
- border: 1px #2c2c2c;
18
- border-radius: ${tileCornerRadius};
19
- box-shadow: var(--tileBoxShadow, 1px 1px 2px 0);
20
- box-sizing: border-box;
21
- height: 100%;
22
- display: flex;
23
- flex-direction: column;
24
- width: 100%;
25
- }
26
-
27
- image-block {
28
- display: block;
29
- position: relative;
30
- text-align: center;
31
- }
32
-
33
- .tile-details {
34
- display: flex;
35
- flex-direction: column;
36
- height: 100%;
37
- row-gap: 10px;
38
- font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;
39
- }
40
-
41
- .item-info {
42
- display: flex;
43
- flex-direction: column;
44
- row-gap: 5px;
45
- flex-grow: 1;
46
- }
47
-
48
- #title {
49
- padding: 0 5px;
50
- }
51
-
52
- .created-by,
53
- .date-sorted-by,
54
- .volume-issue,
55
- .archivist-since {
56
- display: flex;
57
- justify-content: left;
58
- align-items: flex-start;
59
- padding: 0 5px;
60
- }
61
-
62
- .truncated {
63
- flex: 1;
64
- color: #2c2c2c;
65
- min-width: 0; /* Important for long words! */
66
- text-align: left;
67
- line-height: 15px;
68
- text-overflow: ellipsis;
69
- overflow: hidden;
70
- word-wrap: break-word;
71
- -webkit-line-clamp: 3;
72
- -webkit-box-orient: vertical;
73
- }
74
-
75
- h4.truncated,
76
- h3.truncated {
77
- display: -webkit-box;
78
- margin: 0px;
79
- line-height: 15px;
80
- font-size: 14px;
81
- font-weight: 500;
82
- padding-bottom: 1px;
83
- }
84
-
85
- span {
86
- display: -webkit-box;
87
- font-size: 1.4rem;
88
- line-height: 15px;
89
- overflow: hidden;
90
- word-wrap: break-word;
91
- -webkit-line-clamp: 1;
92
- -webkit-box-orient: vertical;
93
- padding-bottom: 1px;
94
- }
95
-
96
- .container:hover > .tile-details > .item-info > #title > .truncated {
97
- text-decoration: underline;
98
- }
99
-
100
- /** this is a workaround for Safari 15 where the hover effects are not working */
101
- #title:hover > .truncated {
102
- text-decoration: underline;
103
- }
104
-
105
- .info-button {
106
- position: absolute;
107
- right: 10px;
108
- top: 10px;
109
- margin: 0;
110
- padding: 0;
111
- border: none;
112
- border-radius: 50%;
113
- display: flex;
114
- justify-content: center;
115
- align-items: center;
116
- background: rgba(220, 220, 220, 0.5);
117
- color: white;
118
- font-size: 2.4rem;
119
- font-weight: bold;
120
- line-height: 1;
121
- text-shadow: black 1px 1px 3px;
122
- overflow: visible;
123
- aspect-ratio: 1 / 1;
124
- z-index: 1;
125
- }
126
-
127
- .hidden {
128
- display: none;
129
- }
130
- `;
@@ -1,211 +0,0 @@
1
- import { css, CSSResultGroup, html, LitElement, TemplateResult } from 'lit';
2
- import { customElement, property } from 'lit/decorators.js';
3
-
4
- import { msg, str } from '@lit/localize';
5
- import { favoriteFilledIcon as favIcon } from '../../assets/img/icons/favorite-filled';
6
- import { reviewsIcon } from '../../assets/img/icons/reviews';
7
- import { uploadIcon } from '../../assets/img/icons/upload';
8
- import { viewsIcon } from '../../assets/img/icons/views';
9
- import { quoteIcon } from '../../assets/img/icons/quote';
10
- import { srOnlyStyle } from '../../styles/sr-only';
11
-
12
- import { formatCount } from '../../utils/format-count';
13
- import { TileModel } from '../../models';
14
-
15
- @customElement('tile-stats')
16
- export class TileStats extends LitElement {
17
- /** The tile model these stats represent */
18
- @property({ type: Object }) model?: TileModel;
19
-
20
- /** The mediatype of the item these stats represent */
21
- @property({ type: String }) mediatype?: string;
22
-
23
- /** The number of uploaded items, if representing an account */
24
- @property({ type: Number }) itemCount?: number;
25
-
26
- /** The number of times the item has been viewed */
27
- @property({ type: Number }) viewCount?: number;
28
-
29
- /** The text label describing the type of views (default "all-time views") */
30
- @property({ type: String }) viewLabel?: string;
31
-
32
- /** The number of times the item has been favorited */
33
- @property({ type: Number }) favCount?: number;
34
-
35
- /** The number of times the item has been reviewed */
36
- @property({ type: Number }) commentCount?: number;
37
-
38
- /** Whether to show the number of TV clips in place of reviews */
39
- @property({ type: Boolean }) showTvClips = false;
40
-
41
- /** The number of times the TV item has been clipped */
42
- @property({ type: Number }) tvClipCount?: number;
43
-
44
- render() {
45
- return html`
46
- <div class="item-stats">
47
- <p class="sr-only">
48
- ${this.mediatype === 'account' ? 'Account Stats' : 'Item Stats'}
49
- </p>
50
- <ul id="stats-row">
51
- ${this.mediatypeIconColumnTemplate}
52
- ${this.mediatype === 'account'
53
- ? this.uploadsColumnTemplate
54
- : this.viewsColumnTemplate}
55
- ${this.favoritesColumnTemplate}
56
- ${this.showTvClips
57
- ? this.tvClipsColumnTemplate
58
- : this.reviewsColumnTemplate}
59
- </ul>
60
- </div>
61
- `;
62
- }
63
-
64
- /**
65
- * Template for the mediatype icon column.
66
- */
67
- private get mediatypeIconColumnTemplate(): TemplateResult {
68
- return html`
69
- <li class="col">
70
- <p class="sr-only">${msg('Mediatype:')}</p>
71
- <tile-mediatype-icon .model=${this.model}></tile-mediatype-icon>
72
- </li>
73
- `;
74
- }
75
-
76
- /**
77
- * Helper method to construct a template for one of the tile stat columns,
78
- * given its stat count, labels, and icon.
79
- *
80
- * @param count The numeric count to show for the stat. If undefined, will be treated as 0.
81
- * @param label The textual label describing the stat (used in the title and screenreader text).
82
- * @param icon The icon visually representing the stat.
83
- * @param classes Any additional CSS classes the stat column should have (optional).
84
- */
85
- private columnTemplate(
86
- count: number | undefined,
87
- label: string,
88
- icon: TemplateResult,
89
- classes: string[] = [],
90
- ): TemplateResult {
91
- const formattedCount = formatCount(count ?? 0, 'short', 'short');
92
- const title = msg(str`${formattedCount} ${label}`);
93
- const srLabel = label + ':';
94
-
95
- return html`
96
- <li class="col ${classes.join(' ')}" title=${title}>
97
- ${icon}
98
- <p class="status-text">
99
- <span class="sr-only">${srLabel}</span>
100
- ${formattedCount}
101
- </p>
102
- </li>
103
- `;
104
- }
105
-
106
- /**
107
- * Template for the views count column.
108
- */
109
- private get viewsColumnTemplate(): TemplateResult {
110
- const label = this.viewLabel ?? msg('all-time views');
111
- return this.columnTemplate(this.viewCount, label, viewsIcon);
112
- }
113
-
114
- /**
115
- * Template for the uploads count column (replaces views for account tiles).
116
- */
117
- private get uploadsColumnTemplate(): TemplateResult {
118
- return this.columnTemplate(this.itemCount, msg('uploads'), uploadIcon);
119
- }
120
-
121
- /**
122
- * Template for the favorites count column.
123
- */
124
- private get favoritesColumnTemplate(): TemplateResult {
125
- return this.columnTemplate(this.favCount, msg('favorites'), favIcon);
126
- }
127
-
128
- /**
129
- * Template for the reviews count column.
130
- */
131
- private get reviewsColumnTemplate(): TemplateResult {
132
- return this.columnTemplate(this.commentCount, msg('reviews'), reviewsIcon, [
133
- 'reviews',
134
- ]);
135
- }
136
-
137
- /**
138
- * Template for the TV clips count column (replaces reviews for TV tiles).
139
- */
140
- private get tvClipsColumnTemplate(): TemplateResult {
141
- return this.columnTemplate(this.tvClipCount, msg('clips'), quoteIcon);
142
- }
143
-
144
- static get styles(): CSSResultGroup {
145
- return [
146
- srOnlyStyle,
147
- css`
148
- tile-mediatype-icon {
149
- --iconHeight: 25px;
150
- --iconWidth: 25px;
151
- }
152
-
153
- ul {
154
- all: unset;
155
- list-style-type: none;
156
- }
157
-
158
- li {
159
- list-style-type: none;
160
- }
161
-
162
- svg {
163
- height: 13px;
164
- width: 13px;
165
- display: block;
166
- margin: auto;
167
- pointer-events: none;
168
- }
169
-
170
- /* Make the reviews icon slightly smaller/lower, for even visual weight */
171
- .reviews svg {
172
- height: 11px;
173
- width: 11px;
174
- margin-top: 2px;
175
- }
176
-
177
- .item-stats {
178
- height: 30px;
179
- padding-left: 5px;
180
- padding-right: 5px;
181
- font-family: 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;
182
- text-align: center;
183
- }
184
-
185
- #stats-row {
186
- display: flex;
187
- justify-content: space-between;
188
- flex-wrap: wrap;
189
- width: 100%;
190
- padding-bottom: 5px;
191
- }
192
-
193
- .col {
194
- min-width: 15px;
195
- max-width: 25%;
196
- height: 25px;
197
- }
198
-
199
- .status-text {
200
- font-size: 14px;
201
- height: 15px;
202
- color: #2c2c2c;
203
- line-height: 17px;
204
- margin: auto;
205
- display: block;
206
- text-align: center;
207
- }
208
- `,
209
- ];
210
- }
211
- }