@internetarchive/collection-browser 4.8.0 → 4.8.1-webdev-9227.2

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 (401) hide show
  1. package/README.md +33 -0
  2. package/dist/src/collection-browser.d.ts +2 -1
  3. package/dist/src/collection-browser.js +7 -7
  4. package/dist/src/collection-browser.js.map +1 -1
  5. package/dist/src/collection-facets/facet-row-template.d.ts +1 -1
  6. package/dist/src/collection-facets/facet-row-template.js +10 -6
  7. package/dist/src/collection-facets/facet-row-template.js.map +1 -1
  8. package/dist/src/collection-facets/facet-row.js +3 -1
  9. package/dist/src/collection-facets/facet-row.js.map +1 -1
  10. package/dist/src/collection-facets/more-facets-content.js +6 -5
  11. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  12. package/dist/src/collection-facets/more-facets-scroller.js +3 -2
  13. package/dist/src/collection-facets/more-facets-scroller.js.map +1 -1
  14. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js +13 -4
  15. package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js.map +1 -1
  16. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +6 -2
  17. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  18. package/dist/src/collection-facets.js +6 -5
  19. package/dist/src/collection-facets.js.map +1 -1
  20. package/dist/src/empty-placeholder.d.ts +7 -7
  21. package/dist/src/empty-placeholder.js +29 -15
  22. package/dist/src/empty-placeholder.js.map +1 -1
  23. package/dist/src/expanded-date-picker.js +3 -2
  24. package/dist/src/expanded-date-picker.js.map +1 -1
  25. package/dist/src/locales/es.d.ts +205 -0
  26. package/dist/src/locales/es.js +220 -0
  27. package/dist/src/locales/es.js.map +1 -0
  28. package/dist/src/manage/manage-bar.d.ts +3 -2
  29. package/dist/src/manage/manage-bar.js +15 -16
  30. package/dist/src/manage/manage-bar.js.map +1 -1
  31. package/dist/src/manage/remove-items-modal-content.js +3 -2
  32. package/dist/src/manage/remove-items-modal-content.js.map +1 -1
  33. package/dist/src/mediatype/mediatype-config.js +55 -18
  34. package/dist/src/mediatype/mediatype-config.js.map +1 -1
  35. package/dist/src/models.js +120 -40
  36. package/dist/src/models.js.map +1 -1
  37. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +6 -2
  38. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js.map +1 -1
  39. package/dist/src/sort-filter-bar/alpha-bar.js +5 -2
  40. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  41. package/dist/src/sort-filter-bar/sort-filter-bar.js +9 -8
  42. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  43. package/dist/src/tiles/grid/account-tile.js +3 -2
  44. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  45. package/dist/src/tiles/grid/collection-tile.js +9 -6
  46. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  47. package/dist/src/tiles/grid/item-tile.js +8 -7
  48. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  49. package/dist/src/tiles/grid/tile-stats.js +6 -3
  50. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  51. package/dist/src/tiles/list/tile-list-compact-header.js +3 -2
  52. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  53. package/dist/src/tiles/list/tile-list-compact.js +3 -1
  54. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  55. package/dist/src/tiles/list/tile-list.js +4 -3
  56. package/dist/src/tiles/list/tile-list.js.map +1 -1
  57. package/dist/src/tiles/overlay/text-overlay.js +3 -1
  58. package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
  59. package/dist/src/tiles/review-block.js +3 -2
  60. package/dist/src/tiles/review-block.js.map +1 -1
  61. package/dist/src/tiles/tile-dispatcher.d.ts +2 -1
  62. package/dist/src/tiles/tile-dispatcher.js +6 -5
  63. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  64. package/dist/src/tiles/tile-mediatype-icon.js +3 -1
  65. package/dist/src/tiles/tile-mediatype-icon.js.map +1 -1
  66. package/dist/src/utils/format-unit-size.d.ts +1 -1
  67. package/dist/src/utils/format-unit-size.js +20 -18
  68. package/dist/src/utils/format-unit-size.js.map +1 -1
  69. package/locales/es.d.ts +1 -0
  70. package/locales/es.js +1 -0
  71. package/package.json +13 -1
  72. package/.editorconfig +0 -29
  73. package/.github/workflows/ci.yml +0 -29
  74. package/.github/workflows/gh-pages-main.yml +0 -41
  75. package/.github/workflows/npm-publish.yml +0 -42
  76. package/.github/workflows/pr-preview.yml +0 -40
  77. package/.husky/pre-commit +0 -1
  78. package/.prettierignore +0 -1
  79. package/dist/test/collection-browser.test.d.ts +0 -1
  80. package/dist/test/collection-browser.test.js +0 -1815
  81. package/dist/test/collection-browser.test.js.map +0 -1
  82. package/dist/test/collection-facets/facet-row.test.d.ts +0 -1
  83. package/dist/test/collection-facets/facet-row.test.js +0 -291
  84. package/dist/test/collection-facets/facet-row.test.js.map +0 -1
  85. package/dist/test/collection-facets/facets-template.test.d.ts +0 -1
  86. package/dist/test/collection-facets/facets-template.test.js +0 -95
  87. package/dist/test/collection-facets/facets-template.test.js.map +0 -1
  88. package/dist/test/collection-facets/more-facets-content.test.d.ts +0 -1
  89. package/dist/test/collection-facets/more-facets-content.test.js +0 -509
  90. package/dist/test/collection-facets/more-facets-content.test.js.map +0 -1
  91. package/dist/test/collection-facets/more-facets-scroller.test.d.ts +0 -1
  92. package/dist/test/collection-facets/more-facets-scroller.test.js +0 -288
  93. package/dist/test/collection-facets/more-facets-scroller.test.js.map +0 -1
  94. package/dist/test/collection-facets/page-window.test.d.ts +0 -1
  95. package/dist/test/collection-facets/page-window.test.js +0 -175
  96. package/dist/test/collection-facets/page-window.test.js.map +0 -1
  97. package/dist/test/collection-facets/toggle-switch.test.d.ts +0 -1
  98. package/dist/test/collection-facets/toggle-switch.test.js +0 -99
  99. package/dist/test/collection-facets/toggle-switch.test.js.map +0 -1
  100. package/dist/test/collection-facets.test.d.ts +0 -2
  101. package/dist/test/collection-facets.test.js +0 -728
  102. package/dist/test/collection-facets.test.js.map +0 -1
  103. package/dist/test/data-source/collection-browser-data-source.test.d.ts +0 -1
  104. package/dist/test/data-source/collection-browser-data-source.test.js +0 -154
  105. package/dist/test/data-source/collection-browser-data-source.test.js.map +0 -1
  106. package/dist/test/empty-placeholder.test.d.ts +0 -1
  107. package/dist/test/empty-placeholder.test.js +0 -57
  108. package/dist/test/empty-placeholder.test.js.map +0 -1
  109. package/dist/test/expanded-date-picker.test.d.ts +0 -1
  110. package/dist/test/expanded-date-picker.test.js +0 -124
  111. package/dist/test/expanded-date-picker.test.js.map +0 -1
  112. package/dist/test/icon-overlay.test.d.ts +0 -1
  113. package/dist/test/icon-overlay.test.js +0 -31
  114. package/dist/test/icon-overlay.test.js.map +0 -1
  115. package/dist/test/image-block.test.d.ts +0 -1
  116. package/dist/test/image-block.test.js +0 -208
  117. package/dist/test/image-block.test.js.map +0 -1
  118. package/dist/test/item-image.test.d.ts +0 -1
  119. package/dist/test/item-image.test.js +0 -187
  120. package/dist/test/item-image.test.js.map +0 -1
  121. package/dist/test/manage/manage-bar.test.d.ts +0 -3
  122. package/dist/test/manage/manage-bar.test.js +0 -216
  123. package/dist/test/manage/manage-bar.test.js.map +0 -1
  124. package/dist/test/manage/remove-items-modal-content.test.d.ts +0 -1
  125. package/dist/test/manage/remove-items-modal-content.test.js +0 -60
  126. package/dist/test/manage/remove-items-modal-content.test.js.map +0 -1
  127. package/dist/test/mediatype-config.test.d.ts +0 -1
  128. package/dist/test/mediatype-config.test.js +0 -11
  129. package/dist/test/mediatype-config.test.js.map +0 -1
  130. package/dist/test/mocks/mock-analytics-handler.d.ts +0 -10
  131. package/dist/test/mocks/mock-analytics-handler.js +0 -16
  132. package/dist/test/mocks/mock-analytics-handler.js.map +0 -1
  133. package/dist/test/mocks/mock-search-responses.d.ts +0 -37
  134. package/dist/test/mocks/mock-search-responses.js +0 -1293
  135. package/dist/test/mocks/mock-search-responses.js.map +0 -1
  136. package/dist/test/mocks/mock-search-service.d.ts +0 -16
  137. package/dist/test/mocks/mock-search-service.js +0 -65
  138. package/dist/test/mocks/mock-search-service.js.map +0 -1
  139. package/dist/test/restoration-state-handler.test.d.ts +0 -1
  140. package/dist/test/restoration-state-handler.test.js +0 -335
  141. package/dist/test/restoration-state-handler.test.js.map +0 -1
  142. package/dist/test/review-block.test.d.ts +0 -1
  143. package/dist/test/review-block.test.js +0 -46
  144. package/dist/test/review-block.test.js.map +0 -1
  145. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +0 -1
  146. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +0 -12
  147. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +0 -1
  148. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +0 -1
  149. package/dist/test/sort-filter-bar/alpha-bar.test.js +0 -68
  150. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +0 -1
  151. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +0 -1
  152. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +0 -304
  153. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +0 -1
  154. package/dist/test/text-overlay.test.d.ts +0 -1
  155. package/dist/test/text-overlay.test.js +0 -43
  156. package/dist/test/text-overlay.test.js.map +0 -1
  157. package/dist/test/text-snippet-block.test.d.ts +0 -1
  158. package/dist/test/text-snippet-block.test.js +0 -58
  159. package/dist/test/text-snippet-block.test.js.map +0 -1
  160. package/dist/test/tile-stats.test.d.ts +0 -1
  161. package/dist/test/tile-stats.test.js +0 -167
  162. package/dist/test/tile-stats.test.js.map +0 -1
  163. package/dist/test/tiles/grid/account-tile.test.d.ts +0 -1
  164. package/dist/test/tiles/grid/account-tile.test.js +0 -96
  165. package/dist/test/tiles/grid/account-tile.test.js.map +0 -1
  166. package/dist/test/tiles/grid/collection-tile.test.d.ts +0 -1
  167. package/dist/test/tiles/grid/collection-tile.test.js +0 -90
  168. package/dist/test/tiles/grid/collection-tile.test.js.map +0 -1
  169. package/dist/test/tiles/grid/item-tile.test.d.ts +0 -1
  170. package/dist/test/tiles/grid/item-tile.test.js +0 -400
  171. package/dist/test/tiles/grid/item-tile.test.js.map +0 -1
  172. package/dist/test/tiles/grid/search-tile.test.d.ts +0 -1
  173. package/dist/test/tiles/grid/search-tile.test.js +0 -62
  174. package/dist/test/tiles/grid/search-tile.test.js.map +0 -1
  175. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +0 -1
  176. package/dist/test/tiles/hover/hover-pane-controller.test.js +0 -351
  177. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +0 -1
  178. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +0 -1
  179. package/dist/test/tiles/hover/tile-hover-pane.test.js +0 -53
  180. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +0 -1
  181. package/dist/test/tiles/list/tile-list-compact-header.test.d.ts +0 -1
  182. package/dist/test/tiles/list/tile-list-compact-header.test.js +0 -36
  183. package/dist/test/tiles/list/tile-list-compact-header.test.js.map +0 -1
  184. package/dist/test/tiles/list/tile-list-compact.test.d.ts +0 -1
  185. package/dist/test/tiles/list/tile-list-compact.test.js +0 -237
  186. package/dist/test/tiles/list/tile-list-compact.test.js.map +0 -1
  187. package/dist/test/tiles/list/tile-list.test.d.ts +0 -1
  188. package/dist/test/tiles/list/tile-list.test.js +0 -460
  189. package/dist/test/tiles/list/tile-list.test.js.map +0 -1
  190. package/dist/test/tiles/tile-dispatcher.test.d.ts +0 -1
  191. package/dist/test/tiles/tile-dispatcher.test.js +0 -246
  192. package/dist/test/tiles/tile-dispatcher.test.js.map +0 -1
  193. package/dist/test/tiles/tile-display-value-provider.test.d.ts +0 -1
  194. package/dist/test/tiles/tile-display-value-provider.test.js +0 -142
  195. package/dist/test/tiles/tile-display-value-provider.test.js.map +0 -1
  196. package/dist/test/tiles/tile-mediatype-icon.test.d.ts +0 -1
  197. package/dist/test/tiles/tile-mediatype-icon.test.js +0 -133
  198. package/dist/test/tiles/tile-mediatype-icon.test.js.map +0 -1
  199. package/dist/test/utils/array-equals.test.d.ts +0 -1
  200. package/dist/test/utils/array-equals.test.js +0 -27
  201. package/dist/test/utils/array-equals.test.js.map +0 -1
  202. package/dist/test/utils/format-count.test.d.ts +0 -1
  203. package/dist/test/utils/format-count.test.js +0 -24
  204. package/dist/test/utils/format-count.test.js.map +0 -1
  205. package/dist/test/utils/format-date.test.d.ts +0 -1
  206. package/dist/test/utils/format-date.test.js +0 -61
  207. package/dist/test/utils/format-date.test.js.map +0 -1
  208. package/dist/test/utils/format-unit-size.test.d.ts +0 -1
  209. package/dist/test/utils/format-unit-size.test.js +0 -18
  210. package/dist/test/utils/format-unit-size.test.js.map +0 -1
  211. package/dist/test/utils/local-date-from-utc.test.d.ts +0 -1
  212. package/dist/test/utils/local-date-from-utc.test.js +0 -27
  213. package/dist/test/utils/local-date-from-utc.test.js.map +0 -1
  214. package/dist/test/utils/normalize-filter-text.test.d.ts +0 -1
  215. package/dist/test/utils/normalize-filter-text.test.js +0 -69
  216. package/dist/test/utils/normalize-filter-text.test.js.map +0 -1
  217. package/docs/design/column-virtualization.md +0 -214
  218. package/eslint.config.mjs +0 -53
  219. package/index.html +0 -24
  220. package/index.ts +0 -29
  221. package/local.archive.org.cert +0 -86
  222. package/local.archive.org.key +0 -27
  223. package/pnpm-workspace.yaml +0 -30
  224. package/renovate.json +0 -6
  225. package/src/app-root.ts +0 -1282
  226. package/src/assets/img/icons/arrow-left.ts +0 -10
  227. package/src/assets/img/icons/arrow-right.ts +0 -10
  228. package/src/assets/img/icons/check.ts +0 -5
  229. package/src/assets/img/icons/chevron.ts +0 -4
  230. package/src/assets/img/icons/close-circle-dark.ts +0 -5
  231. package/src/assets/img/icons/contract.ts +0 -9
  232. package/src/assets/img/icons/empty-query.ts +0 -5
  233. package/src/assets/img/icons/expand.ts +0 -9
  234. package/src/assets/img/icons/eye-closed.ts +0 -5
  235. package/src/assets/img/icons/eye.ts +0 -5
  236. package/src/assets/img/icons/favorite-filled.ts +0 -10
  237. package/src/assets/img/icons/favorite-unfilled.ts +0 -9
  238. package/src/assets/img/icons/filter.ts +0 -10
  239. package/src/assets/img/icons/login-required.ts +0 -18
  240. package/src/assets/img/icons/mediatype/account.ts +0 -14
  241. package/src/assets/img/icons/mediatype/audio.ts +0 -14
  242. package/src/assets/img/icons/mediatype/collection.ts +0 -12
  243. package/src/assets/img/icons/mediatype/data.ts +0 -15
  244. package/src/assets/img/icons/mediatype/etree.ts +0 -14
  245. package/src/assets/img/icons/mediatype/film.ts +0 -14
  246. package/src/assets/img/icons/mediatype/images.ts +0 -13
  247. package/src/assets/img/icons/mediatype/radio.ts +0 -15
  248. package/src/assets/img/icons/mediatype/search.ts +0 -14
  249. package/src/assets/img/icons/mediatype/software.ts +0 -13
  250. package/src/assets/img/icons/mediatype/texts.ts +0 -13
  251. package/src/assets/img/icons/mediatype/tv-commercial.ts +0 -12
  252. package/src/assets/img/icons/mediatype/tv-fact-check.ts +0 -12
  253. package/src/assets/img/icons/mediatype/tv-quote.ts +0 -12
  254. package/src/assets/img/icons/mediatype/tv.ts +0 -14
  255. package/src/assets/img/icons/mediatype/video.ts +0 -14
  256. package/src/assets/img/icons/mediatype/web.ts +0 -13
  257. package/src/assets/img/icons/null-result.ts +0 -5
  258. package/src/assets/img/icons/quote.ts +0 -7
  259. package/src/assets/img/icons/restricted.ts +0 -13
  260. package/src/assets/img/icons/reviews.ts +0 -11
  261. package/src/assets/img/icons/upload.ts +0 -12
  262. package/src/assets/img/icons/views.ts +0 -11
  263. package/src/circular-activity-indicator.ts +0 -64
  264. package/src/collection-browser.ts +0 -3165
  265. package/src/collection-facets/facet-row-template.ts +0 -242
  266. package/src/collection-facets/facet-row.ts +0 -122
  267. package/src/collection-facets/facet-tombstone-row.ts +0 -40
  268. package/src/collection-facets/facets-template.ts +0 -85
  269. package/src/collection-facets/models.ts +0 -16
  270. package/src/collection-facets/more-facets-content.ts +0 -951
  271. package/src/collection-facets/more-facets-scroller.ts +0 -485
  272. package/src/collection-facets/page-window.ts +0 -247
  273. package/src/collection-facets/smart-facets/dedupe.ts +0 -44
  274. package/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +0 -27
  275. package/src/collection-facets/smart-facets/heuristics/index.ts +0 -3
  276. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +0 -17
  277. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +0 -70
  278. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +0 -79
  279. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +0 -93
  280. package/src/collection-facets/smart-facets/models.ts +0 -36
  281. package/src/collection-facets/smart-facets/smart-facet-bar.ts +0 -437
  282. package/src/collection-facets/smart-facets/smart-facet-button.ts +0 -145
  283. package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +0 -185
  284. package/src/collection-facets/smart-facets/smart-facet-equals.ts +0 -16
  285. package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +0 -26
  286. package/src/collection-facets/toggle-switch.ts +0 -175
  287. package/src/collection-facets.ts +0 -1013
  288. package/src/data-source/collection-browser-data-source-interface.ts +0 -351
  289. package/src/data-source/collection-browser-data-source.ts +0 -1474
  290. package/src/data-source/collection-browser-query-state.ts +0 -60
  291. package/src/data-source/models.ts +0 -56
  292. package/src/empty-placeholder.ts +0 -192
  293. package/src/expanded-date-picker.ts +0 -191
  294. package/src/language-code-handler/language-code-handler.ts +0 -64
  295. package/src/language-code-handler/language-code-mapping.ts +0 -564
  296. package/src/manage/manage-bar.ts +0 -276
  297. package/src/manage/remove-items-modal-content.ts +0 -102
  298. package/src/mediatype/mediatype-config.ts +0 -146
  299. package/src/models.ts +0 -912
  300. package/src/restoration-state-handler.ts +0 -550
  301. package/src/sort-filter-bar/alpha-bar-tooltip.ts +0 -53
  302. package/src/sort-filter-bar/alpha-bar.ts +0 -252
  303. package/src/sort-filter-bar/img/compact.ts +0 -5
  304. package/src/sort-filter-bar/img/list.ts +0 -5
  305. package/src/sort-filter-bar/img/sort-toggle-disabled.ts +0 -15
  306. package/src/sort-filter-bar/img/sort-toggle-down.ts +0 -17
  307. package/src/sort-filter-bar/img/sort-toggle-up.ts +0 -17
  308. package/src/sort-filter-bar/img/sort-triangle.ts +0 -5
  309. package/src/sort-filter-bar/img/tile.ts +0 -5
  310. package/src/sort-filter-bar/sort-filter-bar.ts +0 -733
  311. package/src/styles/ia-button.ts +0 -139
  312. package/src/styles/item-image-styles.ts +0 -124
  313. package/src/styles/sr-only.ts +0 -18
  314. package/src/styles/tile-action-styles.ts +0 -59
  315. package/src/tiles/base-tile-component.ts +0 -124
  316. package/src/tiles/collection-browser-loading-tile.ts +0 -26
  317. package/src/tiles/grid/account-tile.ts +0 -113
  318. package/src/tiles/grid/collection-tile.ts +0 -184
  319. package/src/tiles/grid/item-tile.ts +0 -347
  320. package/src/tiles/grid/search-tile.ts +0 -90
  321. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +0 -130
  322. package/src/tiles/grid/tile-stats.ts +0 -211
  323. package/src/tiles/hover/hover-pane-controller.ts +0 -638
  324. package/src/tiles/hover/tile-hover-pane.ts +0 -184
  325. package/src/tiles/image-block.ts +0 -162
  326. package/src/tiles/item-image.ts +0 -214
  327. package/src/tiles/list/tile-list-compact-header.ts +0 -112
  328. package/src/tiles/list/tile-list-compact.ts +0 -278
  329. package/src/tiles/list/tile-list.ts +0 -718
  330. package/src/tiles/models.ts +0 -21
  331. package/src/tiles/overlay/icon-overlay.ts +0 -57
  332. package/src/tiles/overlay/text-overlay.ts +0 -79
  333. package/src/tiles/review-block.ts +0 -130
  334. package/src/tiles/text-snippet-block.ts +0 -132
  335. package/src/tiles/tile-dispatcher.ts +0 -637
  336. package/src/tiles/tile-display-value-provider.ts +0 -133
  337. package/src/tiles/tile-mediatype-icon.ts +0 -133
  338. package/src/utils/analytics-events.ts +0 -29
  339. package/src/utils/array-equals.ts +0 -8
  340. package/src/utils/collapse-repeated-quotes.ts +0 -13
  341. package/src/utils/date-filter-field.ts +0 -11
  342. package/src/utils/facet-utils.ts +0 -183
  343. package/src/utils/format-count.ts +0 -95
  344. package/src/utils/format-date.ts +0 -62
  345. package/src/utils/format-unit-size.ts +0 -43
  346. package/src/utils/local-date-from-utc.ts +0 -15
  347. package/src/utils/log.ts +0 -14
  348. package/src/utils/normalize-filter-text.ts +0 -54
  349. package/src/utils/resolve-mediatype.ts +0 -26
  350. package/src/utils/sha1.ts +0 -9
  351. package/test/collection-browser.test.ts +0 -2639
  352. package/test/collection-facets/facet-row.test.ts +0 -421
  353. package/test/collection-facets/facets-template.test.ts +0 -139
  354. package/test/collection-facets/more-facets-content.test.ts +0 -716
  355. package/test/collection-facets/more-facets-scroller.test.ts +0 -401
  356. package/test/collection-facets/page-window.test.ts +0 -208
  357. package/test/collection-facets/toggle-switch.test.ts +0 -164
  358. package/test/collection-facets.test.ts +0 -928
  359. package/test/data-source/collection-browser-data-source.test.ts +0 -193
  360. package/test/empty-placeholder.test.ts +0 -88
  361. package/test/expanded-date-picker.test.ts +0 -201
  362. package/test/icon-overlay.test.ts +0 -38
  363. package/test/image-block.test.ts +0 -247
  364. package/test/item-image.test.ts +0 -220
  365. package/test/manage/manage-bar.test.ts +0 -347
  366. package/test/manage/remove-items-modal-content.test.ts +0 -81
  367. package/test/mediatype-config.test.ts +0 -11
  368. package/test/mocks/mock-analytics-handler.ts +0 -30
  369. package/test/mocks/mock-search-responses.ts +0 -1420
  370. package/test/mocks/mock-search-service.ts +0 -136
  371. package/test/restoration-state-handler.test.ts +0 -480
  372. package/test/review-block.test.ts +0 -62
  373. package/test/sort-filter-bar/alpha-bar-tooltip.test.ts +0 -17
  374. package/test/sort-filter-bar/alpha-bar.test.ts +0 -101
  375. package/test/sort-filter-bar/sort-filter-bar.test.ts +0 -443
  376. package/test/text-overlay.test.ts +0 -55
  377. package/test/text-snippet-block.test.ts +0 -85
  378. package/test/tile-stats.test.ts +0 -191
  379. package/test/tiles/grid/account-tile.test.ts +0 -121
  380. package/test/tiles/grid/collection-tile.test.ts +0 -114
  381. package/test/tiles/grid/item-tile.test.ts +0 -520
  382. package/test/tiles/grid/search-tile.test.ts +0 -75
  383. package/test/tiles/hover/hover-pane-controller.test.ts +0 -482
  384. package/test/tiles/hover/tile-hover-pane.test.ts +0 -80
  385. package/test/tiles/list/tile-list-compact-header.test.ts +0 -43
  386. package/test/tiles/list/tile-list-compact.test.ts +0 -282
  387. package/test/tiles/list/tile-list.test.ts +0 -576
  388. package/test/tiles/tile-dispatcher.test.ts +0 -320
  389. package/test/tiles/tile-display-value-provider.test.ts +0 -172
  390. package/test/tiles/tile-mediatype-icon.test.ts +0 -160
  391. package/test/utils/array-equals.test.ts +0 -31
  392. package/test/utils/format-count.test.ts +0 -32
  393. package/test/utils/format-date.test.ts +0 -89
  394. package/test/utils/format-unit-size.test.ts +0 -21
  395. package/test/utils/local-date-from-utc.test.ts +0 -37
  396. package/test/utils/normalize-filter-text.test.ts +0 -87
  397. package/tsconfig.json +0 -25
  398. package/types/dompurify.d.ts +0 -1
  399. package/vite.config.ts +0 -29
  400. package/web-dev-server.config.mjs +0 -30
  401. package/web-test-runner.config.mjs +0 -57
@@ -1,733 +0,0 @@
1
- import {
2
- LitElement,
3
- html,
4
- css,
5
- nothing,
6
- PropertyValues,
7
- TemplateResult,
8
- } from 'lit';
9
- import { customElement, property, query, state } from 'lit/decorators.js';
10
- import { msg, str } from '@lit/localize';
11
- import type { IaDropdown, optionInterface } from '@internetarchive/ia-dropdown';
12
- import type { SortDirection } from '@internetarchive/search-service';
13
- import {
14
- CollectionDisplayMode,
15
- defaultSortAvailability,
16
- PrefixFilterCounts,
17
- PrefixFilterType,
18
- SORT_OPTIONS,
19
- SortField,
20
- SortOption,
21
- } from '../models';
22
-
23
- import { sortUpIcon } from './img/sort-toggle-up';
24
- import { sortDownIcon } from './img/sort-toggle-down';
25
- import { sortDisabledIcon } from './img/sort-toggle-disabled';
26
- import { tileIcon } from './img/tile';
27
- import { listIcon } from './img/list';
28
- import { compactIcon } from './img/compact';
29
- import { srOnlyStyle } from '../styles/sr-only';
30
-
31
- import '@internetarchive/ia-dropdown';
32
- import './alpha-bar';
33
-
34
- type AlphaSelector = 'creator' | 'title';
35
-
36
- @customElement('sort-filter-bar')
37
- export class SortFilterBar extends LitElement {
38
- /** Which display mode the tiles are being rendered with (grid/list-detail/list-compact) */
39
- @property({ type: String }) displayMode?: CollectionDisplayMode;
40
-
41
- /** The default sort direction to use if none is set */
42
- @property({ type: String }) defaultSortDirection: SortDirection | null = null;
43
-
44
- /** The default sort field to use if none is set */
45
- @property({ type: String }) defaultSortField: Exclude<
46
- SortField,
47
- SortField.default
48
- > = SortField.relevance;
49
-
50
- /** The current sort direction (asc/desc), or null if none is set */
51
- @property({ type: String }) sortDirection: SortDirection | null = null;
52
-
53
- /** The field currently being sorted on (e.g., 'title'). Defaults to relevance. */
54
- @property({ type: String }) selectedSort: SortField = SortField.default;
55
-
56
- /** The currently selected title letter filter, or null if none is set */
57
- @property({ type: String }) selectedTitleFilter: string | null = null;
58
-
59
- /** The currently selected creator letter filter, or null if none is set */
60
- @property({ type: String }) selectedCreatorFilter: string | null = null;
61
-
62
- /**
63
- * Map defining which sortable fields should be included on the sort bar.
64
- *
65
- * E.g.,
66
- * ```
67
- * {
68
- * [SortField.relevance]: true,
69
- * [SortField.date]: false,
70
- * [SortField.title]: true,
71
- * ...
72
- * }
73
- * ```
74
- */
75
- @property({ type: Object }) sortFieldAvailability = defaultSortAvailability;
76
-
77
- /** Whether to replace the default sort options with a slot for customization (default `false`) */
78
- @property({ type: Boolean, reflect: true }) enableSortOptionsSlot: boolean =
79
- false;
80
-
81
- /** Whether to suppress showing the three display mode options on the right of the bar (default `false`) */
82
- @property({ type: Boolean, reflect: true })
83
- suppressDisplayModes: boolean = false;
84
-
85
- /** Maps of result counts for letters on the alphabet bar, for each letter filter type */
86
- @property({ type: Object }) prefixFilterCountMap?: Record<
87
- PrefixFilterType,
88
- PrefixFilterCounts
89
- >;
90
-
91
- /**
92
- * Which of the alphabet bars (title/creator) should be shown, or null if one
93
- * should not currently be rendered.
94
- */
95
- @state() alphaSelectorVisible: AlphaSelector | null = null;
96
-
97
- /**
98
- * Whether the transparent backdrop to catch clicks outside the dropdown menu
99
- * should be rendered.
100
- */
101
- @state() dropdownBackdropVisible = false;
102
-
103
- /** The single, consolidated dropdown component containing all available options */
104
- @query('#sort-dropdown')
105
- private sortOptionsDropdown!: IaDropdown;
106
-
107
- render() {
108
- return html`
109
- <div id="container">
110
- <section id="sort-bar" aria-label="Sorting options">
111
- <slot name="sort-options-left"></slot>
112
- <div id="sort-options">
113
- ${!this.enableSortOptionsSlot
114
- ? html`
115
- <div class="sort-direction-container">
116
- ${this.sortDirectionSelectorTemplate}
117
- </div>
118
- <span class="sort-by-text">${msg('Sort by:')}</span>
119
- <div id="sort-selector-container">
120
- ${this.sortSelectorTemplate}
121
- </div>
122
- `
123
- : html`<slot name="sort-options"></slot>`}
124
- </div>
125
- <slot name="sort-options-right"></slot>
126
-
127
- ${this.suppressDisplayModes
128
- ? nothing
129
- : html`<div id="display-style-selector">
130
- ${this.displayOptionTemplate}
131
- </div>`}
132
- </section>
133
-
134
- ${this.dropdownBackdropVisible ? this.dropdownBackdrop : nothing}
135
- ${this.alphaBarTemplate}
136
- </div>
137
- `;
138
- }
139
-
140
- willUpdate(changed: PropertyValues) {
141
- if (changed.has('selectedSort') || changed.has('defaultSortField')) {
142
- // If the sort is changed from its default without a direction set,
143
- // we adopt the default sort direction for that sort type.
144
- if (
145
- this.selectedSort &&
146
- this.selectedSort !== SortField.default &&
147
- this.sortDirection === null
148
- ) {
149
- const sortOption = SORT_OPTIONS[this.finalizedSortField];
150
- this.sortDirection = sortOption.defaultSortDirection;
151
- }
152
- }
153
- }
154
-
155
- updated(changed: PropertyValues) {
156
- if (changed.has('displayMode')) {
157
- this.displayModeChanged();
158
- }
159
-
160
- if (changed.has('selectedTitleFilter') && this.selectedTitleFilter) {
161
- this.alphaSelectorVisible = 'title';
162
- }
163
-
164
- if (changed.has('selectedCreatorFilter') && this.selectedCreatorFilter) {
165
- this.alphaSelectorVisible = 'creator';
166
- }
167
-
168
- if (changed.has('dropdownBackdropVisible')) {
169
- this.setupEscapeListeners();
170
- }
171
- }
172
-
173
- private setupEscapeListeners() {
174
- if (this.dropdownBackdropVisible) {
175
- document.addEventListener(
176
- 'keydown',
177
- this.boundSortBarSelectorEscapeListener,
178
- );
179
- } else {
180
- document.removeEventListener(
181
- 'keydown',
182
- this.boundSortBarSelectorEscapeListener,
183
- );
184
- }
185
- }
186
-
187
- private boundSortBarSelectorEscapeListener = (e: KeyboardEvent) => {
188
- if (e.key === 'Escape') {
189
- this.closeDropdown();
190
- }
191
- };
192
-
193
- /**
194
- * Template to render the alphabet bar, or `nothing` if it should not be rendered
195
- * for the current sort
196
- */
197
- private get alphaBarTemplate(): TemplateResult | typeof nothing {
198
- if (!['title', 'creator'].includes(this.selectedSort)) return nothing;
199
-
200
- if (this.alphaSelectorVisible === null) {
201
- if (this.selectedSort === 'creator') return this.creatorSelectorBar;
202
- if (this.selectedSort === 'title') return this.titleSelectorBar;
203
- } else {
204
- return this.alphaSelectorVisible === 'creator'
205
- ? this.creatorSelectorBar
206
- : this.titleSelectorBar;
207
- }
208
-
209
- return nothing;
210
- }
211
-
212
- /** Template to render the sort direction toggle button */
213
- private get sortDirectionSelectorTemplate(): TemplateResult {
214
- const oppositeSortDirectionReadable =
215
- this.sortDirection === 'asc' ? msg('descending') : msg('ascending');
216
- const buttonLabel = this.canChangeSortDirection
217
- ? msg(str`Change to ${oppositeSortDirectionReadable} sort`)
218
- : msg('Directions are not available for the current sort option');
219
-
220
- return html`
221
- <button
222
- class="sort-direction-selector"
223
- title=${buttonLabel}
224
- ?disabled=${!this.canChangeSortDirection}
225
- @click=${this.handleSortDirectionClicked}
226
- >
227
- <span class="sr-only">${buttonLabel}</span>
228
- ${this.sortDirectionIcon}
229
- </button>
230
- `;
231
- }
232
-
233
- /** Template to render the sort direction button's icon in the correct current state */
234
- private get sortDirectionIcon(): TemplateResult {
235
- // Show a fully disabled icon for sort options without direction support
236
- if (!this.canChangeSortDirection) {
237
- return html`<div class="sort-direction-icon">${sortDisabledIcon}</div>`;
238
- }
239
-
240
- // For all other sorts, show the ascending/descending direction
241
- return html`
242
- <div class="sort-direction-icon">
243
- ${this.finalizedSortDirection === 'asc' ? sortUpIcon : sortDownIcon}
244
- </div>
245
- `;
246
- }
247
-
248
- /** The template to render all the sort options in a single dropdown */
249
- private get sortSelectorTemplate() {
250
- const displayedOptions = Object.values(SORT_OPTIONS).filter(
251
- opt => opt.shownInSortBar && this.sortFieldAvailability[opt.field],
252
- );
253
-
254
- return html`
255
- <div id="sort-dropdown-container">
256
- ${this.getSortDropdown({
257
- displayName: SORT_OPTIONS[this.finalizedSortField].displayName,
258
- id: 'sort-dropdown',
259
- selected: true,
260
- dropdownOptions: displayedOptions.map(opt =>
261
- this.getDropdownOption(opt.field),
262
- ),
263
- selectedOption: this.finalizedSortField,
264
- onOptionSelected: this.sortOptionSelected,
265
- onDropdownClick: () => {
266
- this.dropdownBackdropVisible = this.sortOptionsDropdown.open;
267
- this.sortOptionsDropdown.classList.toggle(
268
- 'open',
269
- this.sortOptionsDropdown.open,
270
- );
271
- },
272
- })}
273
- </div>
274
- `;
275
- }
276
-
277
- /**
278
- * Generates a dropdown component containing multiple grouped sort options.
279
- *
280
- * @param options.displayName The name to use for the dropdown's visible label
281
- * @param options.id The id to apply to the dropdown element
282
- * @param options.dropdownOptions An array of option objects used to populate the dropdown
283
- * @param options.selectedOption The id of the option that should be initially selected
284
- * @param options.selected A boolean indicating whether this dropdown should use its
285
- * selected appearance
286
- * @param options.onOptionSelected A handler for optionSelected events coming from the dropdown
287
- * @param options.onDropdownClick A handler for click events on the dropdown
288
- */
289
- private getSortDropdown(options: {
290
- displayName: string;
291
- id: string;
292
- dropdownOptions: optionInterface[];
293
- selectedOption?: string;
294
- selected: boolean;
295
- onOptionSelected?: (e: CustomEvent<{ option: optionInterface }>) => void;
296
- onDropdownClick?: (e: PointerEvent) => void;
297
- }): TemplateResult {
298
- return html`
299
- <ia-dropdown
300
- id=${options.id}
301
- class=${options.selected ? 'selected' : ''}
302
- displayCaret
303
- closeOnSelect
304
- includeSelectedOption
305
- .openViaButton=${options.selected}
306
- .options=${options.dropdownOptions}
307
- .selectedOption=${options.selectedOption ?? ''}
308
- @optionSelected=${options.onOptionSelected ?? nothing}
309
- @click=${options.onDropdownClick ?? nothing}
310
- >
311
- <span
312
- class="dropdown-label"
313
- slot="dropdown-label"
314
- data-title=${options.displayName}
315
- >
316
- ${options.displayName}
317
- </span>
318
- </ia-dropdown>
319
- `;
320
- }
321
-
322
- /** Generates a single dropdown option object for the given sort field */
323
- private getDropdownOption(sortField: SortField): optionInterface {
324
- return {
325
- id: sortField,
326
- label: html`
327
- <span class="dropdown-option-label">
328
- ${SORT_OPTIONS[sortField].displayName}
329
- </span>
330
- `,
331
- };
332
- }
333
-
334
- /** Handler for when a new sort dropdown option is selected */
335
- private sortOptionSelected(e: CustomEvent<{ option: optionInterface }>) {
336
- this.dropdownBackdropVisible = false;
337
-
338
- const sortField = e.detail.option.id as SortField;
339
- this.setSelectedSort(sortField);
340
-
341
- this.alphaSelectorVisible = null;
342
- if (sortField !== 'title' && this.selectedTitleFilter) {
343
- this.selectedTitleFilter = null;
344
- this.emitTitleLetterChangedEvent();
345
- }
346
- if (sortField !== 'creator' && this.selectedCreatorFilter) {
347
- this.selectedCreatorFilter = null;
348
- this.emitCreatorLetterChangedEvent();
349
- }
350
- }
351
-
352
- /** Template for rendering the three display mode options */
353
- /** Added data-testid for Playwright testing * */
354
- private get displayOptionTemplate() {
355
- return html`
356
- <ul>
357
- <li>
358
- <button
359
- id="grid-button"
360
- @click=${() => {
361
- this.displayMode = 'grid';
362
- }}
363
- class=${this.displayMode === 'grid' ? 'active' : ''}
364
- title="Tile view"
365
- data-testid="grid-button"
366
- >
367
- ${tileIcon}
368
- </button>
369
- </li>
370
- <li>
371
- <button
372
- id="list-detail-button"
373
- @click=${() => {
374
- this.displayMode = 'list-detail';
375
- }}
376
- class=${this.displayMode === 'list-detail' ? 'active' : ''}
377
- title="List view"
378
- data-testid="list-detail-button"
379
- >
380
- ${listIcon}
381
- </button>
382
- </li>
383
- <li>
384
- <button
385
- id="list-compact-button"
386
- @click=${() => {
387
- this.displayMode = 'list-compact';
388
- }}
389
- class=${this.displayMode === 'list-compact' ? 'active' : ''}
390
- title="Compact list view"
391
- data-testid="list-compact-button"
392
- >
393
- ${compactIcon}
394
- </button>
395
- </li>
396
- </ul>
397
- `;
398
- }
399
-
400
- /**
401
- * Template for rendering the transparent backdrop to capture clicks outside the
402
- * dropdown menu while it is open.
403
- */
404
- private get dropdownBackdrop() {
405
- return html`
406
- <div
407
- id="sort-selector-backdrop"
408
- @keyup=${this.closeDropdown}
409
- @click=${this.closeDropdown}
410
- ></div>
411
- `;
412
- }
413
-
414
- /** Closes the sorting dropdown component's menus */
415
- private closeDropdown() {
416
- this.dropdownBackdropVisible = false;
417
-
418
- if (!this.sortOptionsDropdown) return;
419
- this.sortOptionsDropdown.open = false;
420
- this.sortOptionsDropdown.classList.remove('open');
421
- }
422
-
423
- setSortDirection(sortDirection: SortDirection) {
424
- this.sortDirection = sortDirection;
425
- this.emitSortChangedEvent();
426
- }
427
-
428
- /** Toggles the current sort direction between 'asc' and 'desc' */
429
- private toggleSortDirection() {
430
- this.setSortDirection(
431
- this.finalizedSortDirection === 'desc' ? 'asc' : 'desc',
432
- );
433
- }
434
-
435
- private handleSortDirectionClicked(): void {
436
- if (
437
- !this.sortDirection &&
438
- this.defaultSortField &&
439
- this.defaultSortDirection
440
- ) {
441
- // When the sort direction is merely defaulted (not set by the user), clicking
442
- // the toggled button should "promote" the default sort to an explicitly-set one
443
- // and then toggle it as usual.
444
- this.selectedSort = this.defaultSortField;
445
- this.sortDirection = this.defaultSortDirection;
446
- }
447
-
448
- this.toggleSortDirection();
449
- }
450
-
451
- setSelectedSort(sort: SortField) {
452
- this.selectedSort = sort;
453
- // Apply this field's default sort direction
454
- const sortOption = SORT_OPTIONS[sort];
455
- this.sortDirection = sortOption.defaultSortDirection;
456
- this.emitSortChangedEvent();
457
- }
458
-
459
- /** The current sort field, or the default one if no explicit sort is set */
460
- private get finalizedSortField(): SortField {
461
- const resolvedField =
462
- this.selectedSort === SortField.default
463
- ? this.defaultSortField
464
- : this.selectedSort;
465
- if (this.sortFieldAvailability[resolvedField]) return resolvedField;
466
-
467
- // Fall back to the first available sort option shown in the sort bar, if
468
- // the requested one isn't available
469
- return this.firstAvailableOption?.field ?? resolvedField;
470
- }
471
-
472
- /** The current sort direction, or the default one if no explicit direction is set */
473
- private get finalizedSortDirection(): SortDirection | null {
474
- return this.sortDirection === null
475
- ? this.defaultSortDirection
476
- : this.sortDirection;
477
- }
478
-
479
- /** The first option shown in the sort dropdown, or undefined if none are available */
480
- private get firstAvailableOption(): SortOption | undefined {
481
- return Object.values(SORT_OPTIONS).find(
482
- opt => opt.shownInSortBar && this.sortFieldAvailability[opt.field],
483
- );
484
- }
485
-
486
- /** Whether the sort direction button should be enabled for the current sort */
487
- private get canChangeSortDirection(): boolean {
488
- return SORT_OPTIONS[this.finalizedSortField].canSetDirection;
489
- }
490
-
491
- private get titleSelectorBar() {
492
- return html` <alpha-bar
493
- .selectedLetter=${this.selectedTitleFilter}
494
- .letterCounts=${this.prefixFilterCountMap?.title}
495
- ariaLandmarkLabel="Filter by title letter"
496
- @letterChanged=${this.titleLetterChanged}
497
- ></alpha-bar>`;
498
- }
499
-
500
- private get creatorSelectorBar() {
501
- return html` <alpha-bar
502
- .selectedLetter=${this.selectedCreatorFilter}
503
- .letterCounts=${this.prefixFilterCountMap?.creator}
504
- ariaLandmarkLabel="Filter by creator letter"
505
- @letterChanged=${this.creatorLetterChanged}
506
- ></alpha-bar>`;
507
- }
508
-
509
- private titleLetterChanged(
510
- e: CustomEvent<{ selectedLetter: string | undefined }>,
511
- ) {
512
- this.selectedTitleFilter = e.detail.selectedLetter ?? null;
513
- this.emitTitleLetterChangedEvent();
514
- }
515
-
516
- private creatorLetterChanged(
517
- e: CustomEvent<{ selectedLetter: string | undefined }>,
518
- ) {
519
- this.selectedCreatorFilter = e.detail.selectedLetter ?? null;
520
- this.emitCreatorLetterChangedEvent();
521
- }
522
-
523
- private emitTitleLetterChangedEvent() {
524
- const event = new CustomEvent<{ selectedLetter: string | null }>(
525
- 'titleLetterChanged',
526
- {
527
- detail: { selectedLetter: this.selectedTitleFilter },
528
- },
529
- );
530
- this.dispatchEvent(event);
531
- }
532
-
533
- private emitCreatorLetterChangedEvent() {
534
- const event = new CustomEvent<{ selectedLetter: string | null }>(
535
- 'creatorLetterChanged',
536
- {
537
- detail: { selectedLetter: this.selectedCreatorFilter },
538
- },
539
- );
540
- this.dispatchEvent(event);
541
- }
542
-
543
- private displayModeChanged() {
544
- const event = new CustomEvent<{
545
- displayMode?: CollectionDisplayMode;
546
- }>('displayModeChanged', {
547
- detail: { displayMode: this.displayMode },
548
- });
549
- this.dispatchEvent(event);
550
- }
551
-
552
- private emitSortChangedEvent() {
553
- const event = new CustomEvent<{
554
- selectedSort: SortField;
555
- sortDirection: SortDirection | null;
556
- }>('sortChanged', {
557
- detail: {
558
- selectedSort: this.selectedSort,
559
- sortDirection: this.sortDirection,
560
- },
561
- });
562
- this.dispatchEvent(event);
563
- }
564
-
565
- static get styles() {
566
- const disabledIconColor = css`#bbbbbb`;
567
-
568
- return [
569
- srOnlyStyle,
570
- css`
571
- #container {
572
- position: relative;
573
- }
574
-
575
- #sort-bar {
576
- display: flex;
577
- justify-content: flex-start;
578
- align-items: center;
579
- padding-bottom: 1px;
580
- border-bottom: 1px solid #2c2c2c;
581
- font-size: 1.4rem;
582
- }
583
-
584
- #sort-options {
585
- display: flex;
586
- align-items: center;
587
- flex-grow: 1;
588
- }
589
-
590
- ul {
591
- list-style: none;
592
- display: flex;
593
- align-items: center;
594
- margin: 0;
595
- padding: 0;
596
- }
597
-
598
- li {
599
- padding: 0;
600
- }
601
-
602
- .sort-by-text {
603
- margin-right: 5px;
604
- font-weight: bold;
605
- white-space: nowrap;
606
- }
607
-
608
- .sort-direction-container {
609
- display: flex;
610
- align-self: stretch;
611
- flex: 0;
612
- margin: 0 3px;
613
- }
614
-
615
- .sort-direction-selector {
616
- display: flex;
617
- justify-content: center;
618
- width: 30px;
619
- margin: 0 5px 0 0;
620
- padding: 7px 8px;
621
- max-height: fit-content;
622
- border-radius: 5px;
623
- background: white;
624
- border: 1px solid rgb(25, 72, 128);
625
- appearance: none;
626
- cursor: pointer;
627
- }
628
-
629
- .sort-direction-selector:disabled {
630
- cursor: not-allowed;
631
- border-color: ${disabledIconColor};
632
- }
633
-
634
- .sort-direction-icon {
635
- display: flex;
636
- align-items: center;
637
- background: none;
638
- color: inherit;
639
- border: none;
640
- padding: 0;
641
- outline: inherit;
642
- width: 12px;
643
- height: 12px;
644
- }
645
-
646
- .sort-direction-icon > svg {
647
- flex: 1;
648
- }
649
-
650
- #sort-selector-container {
651
- flex: 1;
652
- display: flex;
653
- justify-content: flex-start;
654
- align-items: center;
655
- }
656
-
657
- #sort-dropdown-container {
658
- display: flex;
659
- justify-content: flex-start;
660
- align-items: center;
661
- }
662
-
663
- #sort-selector-backdrop {
664
- position: fixed;
665
- top: 0;
666
- left: 0;
667
- width: 100vw;
668
- height: 100vh;
669
- z-index: 1;
670
- background-color: transparent;
671
- }
672
-
673
- #display-style-selector {
674
- flex: 0;
675
- }
676
-
677
- #display-style-selector button {
678
- background: none;
679
- color: inherit;
680
- border: none;
681
- appearance: none;
682
- cursor: pointer;
683
- -webkit-appearance: none;
684
- fill: ${disabledIconColor};
685
- }
686
-
687
- #display-style-selector button.active {
688
- fill: var(--ia-theme-primary-text-color, #2c2c2c);
689
- }
690
-
691
- #display-style-selector button svg {
692
- width: 24px;
693
- height: 24px;
694
- }
695
-
696
- ia-dropdown {
697
- --dropdownTextColor: white;
698
- --dropdownOffsetTop: 0;
699
- --dropdownBorderTopWidth: 0;
700
- --dropdownBorderTopLeftRadius: 0;
701
- --dropdownBorderTopRightRadius: 0;
702
- --dropdownWhiteSpace: nowrap;
703
- --dropdownListZIndex: 2;
704
- --dropdownCaretColor: var(--ia-theme-primary-text-color, #2c2c2c);
705
- --dropdownSelectedTextColor: white;
706
- --dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
707
- --dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
708
- --caretHeight: 9px;
709
- --caretWidth: 12px;
710
- --caretPadding: 0 5px 0 0;
711
- }
712
- ia-dropdown.selected .dropdown-label {
713
- font-weight: bold;
714
- }
715
- ia-dropdown.open {
716
- z-index: 2;
717
- }
718
-
719
- .dropdown-label {
720
- display: inline-block;
721
- height: 100%;
722
- padding-left: 5px;
723
- font-size: 1.4rem;
724
- font-family: var(--ia-theme-base-font-family);
725
- line-height: 2;
726
- color: var(--ia-theme-primary-text-color, #2c2c2c);
727
- white-space: nowrap;
728
- user-select: none;
729
- }
730
- `,
731
- ];
732
- }
733
- }