@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,351 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { expect, fixture, waitUntil } from '@open-wc/testing';
3
- import { html, LitElement, nothing } from 'lit';
4
- import { customElement, property, query } from 'lit/decorators.js';
5
- import { HoverPaneController, } from '../../../src/tiles/hover/hover-pane-controller';
6
- import { TileModel } from '../../../src/models';
7
- import sinon from 'sinon';
8
- let HostElement = class HostElement extends LitElement {
9
- constructor() {
10
- super(...arguments);
11
- this.suppressHoverPane = false;
12
- }
13
- render() {
14
- return html ` ${this.controller?.getTemplate()} `;
15
- }
16
- firstUpdated() {
17
- this.controller = new HoverPaneController(this, this.controllerOptions);
18
- }
19
- acquireFocus() { }
20
- releaseFocus() { }
21
- getHoverPane() {
22
- return this.suppressHoverPane ? undefined : this.hoverPane;
23
- }
24
- getHoverPaneProps() {
25
- const tileModel = new TileModel({});
26
- tileModel.checked = false;
27
- tileModel.collectionFilesCount = 1;
28
- tileModel.collections = ['foo', 'bar'];
29
- tileModel.collectionSize = 1;
30
- tileModel.commentCount = 1;
31
- tileModel.contentWarning = false;
32
- tileModel.creators = ['foo', 'bar'];
33
- tileModel.favCount = 1;
34
- tileModel.identifier = 'foo';
35
- tileModel.itemCount = 1;
36
- tileModel.loginRequired = false;
37
- tileModel.mediatype = 'data';
38
- tileModel.subjects = ['foo', 'bar'];
39
- tileModel.title = 'foo';
40
- tileModel.viewCount = 1;
41
- return {
42
- model: tileModel,
43
- loggedIn: false,
44
- suppressBlurring: false,
45
- sortParam: null,
46
- };
47
- }
48
- };
49
- __decorate([
50
- property({ type: Object })
51
- ], HostElement.prototype, "controllerOptions", void 0);
52
- __decorate([
53
- property({ type: Boolean })
54
- ], HostElement.prototype, "suppressHoverPane", void 0);
55
- __decorate([
56
- query('tile-hover-pane')
57
- ], HostElement.prototype, "hoverPane", void 0);
58
- HostElement = __decorate([
59
- customElement('host-element')
60
- ], HostElement);
61
- describe('Hover Pane Controller', () => {
62
- let oldMatchMedia;
63
- let oldOnTouchStart;
64
- before(() => {
65
- oldMatchMedia = window.matchMedia;
66
- oldOnTouchStart = window.ontouchstart;
67
- window.matchMedia = () => ({ matches: true });
68
- window.ontouchstart = () => { };
69
- });
70
- after(() => {
71
- window.matchMedia = oldMatchMedia;
72
- window.ontouchstart = oldOnTouchStart;
73
- });
74
- it('should initially provide empty template', async () => {
75
- const host = await fixture(html `<host-element></host-element>`);
76
- expect(host.controller?.getTemplate()).to.equal(nothing);
77
- });
78
- it('should produce a hover pane template after mousemove, and hide it after mouseleave', async () => {
79
- const host = await fixture(html `<host-element
80
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
81
- ></host-element>`);
82
- host.dispatchEvent(new MouseEvent('mousemove'));
83
- // Need to wait a tick for the event handlers to run
84
- await new Promise(resolve => {
85
- setTimeout(resolve, 0);
86
- });
87
- expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult
88
- host.dispatchEvent(new MouseEvent('mouseleave'));
89
- // Need to wait for the fade out transition
90
- await new Promise(resolve => {
91
- setTimeout(resolve, 150);
92
- });
93
- expect(host.controller?.getTemplate()).to.equal(nothing);
94
- });
95
- it('should produce a hover pane template after mouseenter, even without mousemove', async () => {
96
- const host = await fixture(html `<host-element
97
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
98
- ></host-element>`);
99
- host.dispatchEvent(new MouseEvent('mouseenter'));
100
- // Need to wait a tick for the event handlers to run
101
- await new Promise(resolve => {
102
- setTimeout(resolve, 0);
103
- });
104
- expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult
105
- });
106
- it('should immediately fade back in if mouse enters while fading out', async () => {
107
- const host = await fixture(html `<host-element
108
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
109
- ></host-element>`);
110
- // Enter the host element and wait for the show handlers to run
111
- host.dispatchEvent(new MouseEvent('mousemove'));
112
- await new Promise(resolve => {
113
- setTimeout(resolve, 0);
114
- });
115
- // Leave the host element so it begins fading out, but not all the way
116
- host.dispatchEvent(new MouseEvent('mouseleave'));
117
- await new Promise(resolve => {
118
- setTimeout(resolve, 20);
119
- });
120
- // Re-enter the host element and wait long enough that it would disappear
121
- // if the hide were not cancelled
122
- host.dispatchEvent(new MouseEvent('mousemove'));
123
- await new Promise(resolve => {
124
- setTimeout(resolve, 150);
125
- });
126
- expect(host.controller?.getTemplate()).not.to.equal(nothing);
127
- });
128
- it('should flip hover pane if it would overflow the viewport', async () => {
129
- const host = await fixture(html `<host-element
130
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
131
- ></host-element>`);
132
- host.dispatchEvent(new MouseEvent('mousemove', { clientX: 800, clientY: 600 }));
133
- // Need to wait a tick for the event handlers to run
134
- await new Promise(resolve => {
135
- setTimeout(resolve, 0);
136
- });
137
- await host.updateComplete;
138
- expect(host.controller?.getTemplate()).not.to.equal(nothing);
139
- expect(host.getHoverPane()?.getBoundingClientRect()?.right).to.be.lessThan(window.innerWidth);
140
- expect(host.getHoverPane()?.getBoundingClientRect()?.bottom).to.be.lessThan(window.innerHeight);
141
- });
142
- it('should not call showPopover when the hover pane is already open', async () => {
143
- const host = await fixture(html `<host-element
144
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
145
- ></host-element>`);
146
- // Show the pane and confirm the :popover-open state
147
- host.dispatchEvent(new MouseEvent('mousemove'));
148
- await new Promise(resolve => {
149
- setTimeout(resolve, 0);
150
- });
151
- await host.updateComplete;
152
- const pane = host.getHoverPane();
153
- expect(pane?.matches(':popover-open')).to.be.true;
154
- const showPopoverSpy = sinon.spy(pane, 'showPopover');
155
- // Simulate the condition where the hover pane has finished its fade out
156
- // but its popover has not yet been hidden.
157
- host.controller.hoverPaneState =
158
- 'hidden';
159
- // Subsequent mousemove tries to re-show the hover pane...
160
- host.dispatchEvent(new MouseEvent('mousemove'));
161
- await new Promise(resolve => {
162
- setTimeout(resolve, 10);
163
- });
164
- await host.updateComplete;
165
- // ...but should NOT call showPopover() again
166
- expect(showPopoverSpy.called).to.be.false;
167
- expect(host.getHoverPane()?.matches(':popover-open')).to.be.true;
168
- });
169
- it('should gracefully handle undefined hover pane from host element', async () => {
170
- const host = await fixture(html `<host-element
171
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
172
- ?suppressHoverPane=${true}
173
- ></host-element>`);
174
- host.dispatchEvent(new MouseEvent('mousemove'));
175
- // Need to wait a tick for the event handlers to run
176
- await new Promise(resolve => {
177
- setTimeout(resolve, 0);
178
- });
179
- expect(host.controller?.getTemplate()).not.to.equal(nothing);
180
- host.dispatchEvent(new MouseEvent('mouseleave'));
181
- await new Promise(resolve => {
182
- setTimeout(resolve, 20);
183
- });
184
- host.dispatchEvent(new MouseEvent('mousemove'));
185
- await new Promise(resolve => {
186
- setTimeout(resolve, 0);
187
- });
188
- host.dispatchEvent(new MouseEvent('mouseleave'));
189
- // Need to wait for the fade out transition
190
- await new Promise(resolve => {
191
- setTimeout(resolve, 150);
192
- });
193
- expect(host.controller?.getTemplate()).to.equal(nothing);
194
- });
195
- describe('Touch & long-press', () => {
196
- const getTouchStartEvent = (host) => new TouchEvent('touchstart', {
197
- touches: [new Touch({ identifier: 0, target: host })],
198
- });
199
- it('should produce a hover pane after long press', async () => {
200
- const host = await fixture(html `<host-element
201
- .controllerOptions=${{
202
- showDelay: 0,
203
- longPressDelay: 0,
204
- enableLongPress: true,
205
- }}
206
- ></host-element>`);
207
- // Touch the host element and wait for the long press handlers to run
208
- host.dispatchEvent(getTouchStartEvent(host));
209
- await new Promise(resolve => {
210
- setTimeout(resolve, 0);
211
- });
212
- expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult
213
- });
214
- it('should cancel a long press by moving', async () => {
215
- const host = await fixture(html `<host-element
216
- .controllerOptions=${{
217
- showDelay: 0,
218
- longPressDelay: 100,
219
- enableLongPress: true,
220
- }}
221
- ></host-element>`);
222
- // Touch the host element
223
- host.dispatchEvent(getTouchStartEvent(host));
224
- await new Promise(resolve => {
225
- setTimeout(resolve, 0);
226
- });
227
- // Move the touch point, cancelling the long press
228
- host.dispatchEvent(new TouchEvent('touchmove'));
229
- await new Promise(resolve => {
230
- setTimeout(resolve, 150);
231
- });
232
- expect(host.controller?.getTemplate()).to.equal(nothing);
233
- });
234
- it('should cancel a long press by ending touch', async () => {
235
- const host = await fixture(html `<host-element
236
- .controllerOptions=${{
237
- showDelay: 0,
238
- longPressDelay: 100,
239
- enableLongPress: true,
240
- }}
241
- ></host-element>`);
242
- // Touch the host element
243
- host.dispatchEvent(getTouchStartEvent(host));
244
- await new Promise(resolve => {
245
- setTimeout(resolve, 0);
246
- });
247
- // Lift the touch point, cancelling the long press
248
- host.dispatchEvent(new TouchEvent('touchend'));
249
- await new Promise(resolve => {
250
- setTimeout(resolve, 150);
251
- });
252
- expect(host.controller?.getTemplate()).to.equal(nothing);
253
- });
254
- it('should cancel a long press by cancelling touch (e.g., too many touch points)', async () => {
255
- const host = await fixture(html `<host-element
256
- .controllerOptions=${{
257
- showDelay: 0,
258
- longPressDelay: 100,
259
- enableLongPress: true,
260
- }}
261
- ></host-element>`);
262
- // Touch the host element
263
- host.dispatchEvent(getTouchStartEvent(host));
264
- await new Promise(resolve => {
265
- setTimeout(resolve, 0);
266
- });
267
- // Cancel the touch point, also cancelling the long press
268
- host.dispatchEvent(new TouchEvent('touchcancel'));
269
- await new Promise(resolve => {
270
- setTimeout(resolve, 150);
271
- });
272
- expect(host.controller?.getTemplate()).to.equal(nothing);
273
- });
274
- it('should close the hover pane on mobile when touching the backdrop', async () => {
275
- const host = await fixture(html `<host-element
276
- .controllerOptions=${{
277
- showDelay: 0,
278
- hideDelay: 0,
279
- longPressDelay: 0,
280
- enableLongPress: true,
281
- mobileBreakpoint: 9999, // Ensure we get the mobile view
282
- }}
283
- ></host-element>`);
284
- // Touch the host element
285
- host.dispatchEvent(getTouchStartEvent(host));
286
- await new Promise(resolve => {
287
- setTimeout(resolve, 0);
288
- });
289
- expect(host.controller?.getTemplate()).not.to.equal(nothing);
290
- await host.updateComplete;
291
- // Touch the backdrop
292
- host.shadowRoot
293
- ?.querySelector('#touch-backdrop')
294
- ?.dispatchEvent(new TouchEvent('touchstart'));
295
- await new Promise(resolve => {
296
- setTimeout(resolve, 150);
297
- });
298
- expect(host.controller?.getTemplate()).to.equal(nothing);
299
- });
300
- });
301
- describe('keyboard accessibility', () => {
302
- it('should call host getBoundingClientRect if anchor is host', async () => {
303
- const host = await fixture(html `<host-element
304
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
305
- ></host-element>`);
306
- const getBoundingClientRectSpy = sinon.spy(host, 'getBoundingClientRect');
307
- host.dispatchEvent(new FocusEvent('focus'));
308
- await waitUntil(() => getBoundingClientRectSpy.called, 'host getBoundingClientRect was never consulted for positioning');
309
- });
310
- it('should show hover pane on focus', async () => {
311
- const host = await fixture(html `<host-element
312
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
313
- ></host-element>`);
314
- host.dispatchEvent(new FocusEvent('focus'));
315
- // The controller template becomes available synchronously with the focus event
316
- expect(host.controller?.getTemplate()).not.to.equal(nothing);
317
- // The pane element then renders and opens as a popover
318
- await waitUntil(() => host.getHoverPane()?.matches(':popover-open') ?? false, 'Hover pane never opened as a popover');
319
- });
320
- it('should hide hover pane on blur', async () => {
321
- const host = await fixture(html `<host-element
322
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
323
- ></host-element>`);
324
- host.dispatchEvent(new FocusEvent('focus'));
325
- await waitUntil(() => host.getHoverPane()?.matches(':popover-open') ?? false, 'Hover pane never opened as a popover');
326
- host.dispatchEvent(new FocusEvent('blur'));
327
- await waitUntil(() => !host.getHoverPane(), 'Hover pane was not removed after blur');
328
- });
329
- });
330
- describe('frame-starved environments', () => {
331
- let realRaf;
332
- before(() => {
333
- realRaf = window.requestAnimationFrame;
334
- // Simulate an environment that never produces rendering frames:
335
- // callbacks are accepted but never invoked.
336
- window.requestAnimationFrame = () => 0;
337
- });
338
- after(() => {
339
- window.requestAnimationFrame = realRaf;
340
- });
341
- it('should position the hover pane even when animation frames never fire', async () => {
342
- const host = await fixture(html `<host-element
343
- .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}
344
- ></host-element>`);
345
- const getBoundingClientRectSpy = sinon.spy(host, 'getBoundingClientRect');
346
- host.dispatchEvent(new FocusEvent('focus'));
347
- await waitUntil(() => getBoundingClientRectSpy.called, 'host getBoundingClientRect was never consulted for positioning');
348
- });
349
- });
350
- });
351
- //# sourceMappingURL=hover-pane-controller.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hover-pane-controller.test.js","sourceRoot":"","sources":["../../../../test/tiles/hover/hover-pane-controller.test.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,mBAAmB,GAKpB,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAG+B,sBAAiB,GAAY,KAAK,CAAC;IA+ClE,CAAC;IAzCC,MAAM;QACJ,OAAO,IAAI,CAAA,IAAI,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,GAAG,CAAC;IACnD,CAAC;IAES,YAAY;QACpB,IAAI,CAAC,UAAU,GAAG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L,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, waitUntil } from '@open-wc/testing';\nimport { html, LitElement, nothing, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport {\n HoverPaneController,\n HoverPaneControllerInterface,\n HoverPaneControllerOptions,\n HoverPaneProperties,\n HoverPaneProviderInterface,\n} from '../../../src/tiles/hover/hover-pane-controller';\nimport type { TileHoverPane } from '../../../src/tiles/hover/tile-hover-pane';\nimport { TileModel } from '../../../src/models';\nimport sinon from 'sinon';\n\n@customElement('host-element')\nclass HostElement extends LitElement implements HoverPaneProviderInterface {\n @property({ type: Object }) controllerOptions?: HoverPaneControllerOptions;\n\n @property({ type: Boolean }) suppressHoverPane: boolean = false;\n\n @query('tile-hover-pane') hoverPane?: TileHoverPane;\n\n controller?: HoverPaneControllerInterface;\n\n render(): TemplateResult {\n return html` ${this.controller?.getTemplate()} `;\n }\n\n protected firstUpdated(): void {\n this.controller = new HoverPaneController(this, this.controllerOptions);\n }\n\n acquireFocus(): void {}\n\n releaseFocus(): void {}\n\n getHoverPane(): HTMLElement | undefined {\n return this.suppressHoverPane ? undefined : this.hoverPane;\n }\n\n getHoverPaneProps(): HoverPaneProperties {\n const tileModel = new TileModel({});\n tileModel.checked = false;\n tileModel.collectionFilesCount = 1;\n tileModel.collections = ['foo', 'bar'];\n tileModel.collectionSize = 1;\n tileModel.commentCount = 1;\n tileModel.contentWarning = false;\n tileModel.creators = ['foo', 'bar'];\n tileModel.favCount = 1;\n tileModel.identifier = 'foo';\n tileModel.itemCount = 1;\n tileModel.loginRequired = false;\n tileModel.mediatype = 'data';\n tileModel.subjects = ['foo', 'bar'];\n tileModel.title = 'foo';\n tileModel.viewCount = 1;\n\n return {\n model: tileModel,\n loggedIn: false,\n suppressBlurring: false,\n sortParam: null,\n };\n }\n}\n\ndescribe('Hover Pane Controller', () => {\n let oldMatchMedia: typeof window.matchMedia;\n let oldOnTouchStart: typeof window.ontouchstart;\n\n before(() => {\n oldMatchMedia = window.matchMedia;\n oldOnTouchStart = window.ontouchstart;\n window.matchMedia = () => ({ matches: true }) as MediaQueryList;\n window.ontouchstart = () => {};\n });\n\n after(() => {\n window.matchMedia = oldMatchMedia;\n window.ontouchstart = oldOnTouchStart;\n });\n\n it('should initially provide empty template', async () => {\n const host = await fixture<HostElement>(\n html`<host-element></host-element>`,\n );\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n it('should produce a hover pane template after mousemove, and hide it after mouseleave', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n host.dispatchEvent(new MouseEvent('mousemove'));\n // Need to wait a tick for the event handlers to run\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult\n\n host.dispatchEvent(new MouseEvent('mouseleave'));\n // Need to wait for the fade out transition\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n it('should produce a hover pane template after mouseenter, even without mousemove', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n host.dispatchEvent(new MouseEvent('mouseenter'));\n // Need to wait a tick for the event handlers to run\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult\n });\n\n it('should immediately fade back in if mouse enters while fading out', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n // Enter the host element and wait for the show handlers to run\n host.dispatchEvent(new MouseEvent('mousemove'));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n // Leave the host element so it begins fading out, but not all the way\n host.dispatchEvent(new MouseEvent('mouseleave'));\n await new Promise(resolve => {\n setTimeout(resolve, 20);\n });\n\n // Re-enter the host element and wait long enough that it would disappear\n // if the hide were not cancelled\n host.dispatchEvent(new MouseEvent('mousemove'));\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing);\n });\n\n it('should flip hover pane if it would overflow the viewport', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n host.dispatchEvent(\n new MouseEvent('mousemove', { clientX: 800, clientY: 600 }),\n );\n // Need to wait a tick for the event handlers to run\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n await host.updateComplete;\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing);\n expect(host.getHoverPane()?.getBoundingClientRect()?.right).to.be.lessThan(\n window.innerWidth,\n );\n expect(host.getHoverPane()?.getBoundingClientRect()?.bottom).to.be.lessThan(\n window.innerHeight,\n );\n });\n\n it('should not call showPopover when the hover pane is already open', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n // Show the pane and confirm the :popover-open state\n host.dispatchEvent(new MouseEvent('mousemove'));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n await host.updateComplete;\n\n const pane = host.getHoverPane() as TileHoverPane;\n expect(pane?.matches(':popover-open')).to.be.true;\n\n const showPopoverSpy = sinon.spy(pane, 'showPopover');\n\n // Simulate the condition where the hover pane has finished its fade out\n // but its popover has not yet been hidden.\n (host.controller as unknown as { hoverPaneState: string }).hoverPaneState =\n 'hidden';\n\n // Subsequent mousemove tries to re-show the hover pane...\n host.dispatchEvent(new MouseEvent('mousemove'));\n await new Promise(resolve => {\n setTimeout(resolve, 10);\n });\n await host.updateComplete;\n\n // ...but should NOT call showPopover() again\n expect(showPopoverSpy.called).to.be.false;\n expect(host.getHoverPane()?.matches(':popover-open')).to.be.true;\n });\n\n it('should gracefully handle undefined hover pane from host element', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ?suppressHoverPane=${true}\n ></host-element>`,\n );\n\n host.dispatchEvent(new MouseEvent('mousemove'));\n // Need to wait a tick for the event handlers to run\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing);\n\n host.dispatchEvent(new MouseEvent('mouseleave'));\n await new Promise(resolve => {\n setTimeout(resolve, 20);\n });\n\n host.dispatchEvent(new MouseEvent('mousemove'));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n host.dispatchEvent(new MouseEvent('mouseleave'));\n // Need to wait for the fade out transition\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n describe('Touch & long-press', () => {\n const getTouchStartEvent = (host: EventTarget) =>\n new TouchEvent('touchstart', {\n touches: [new Touch({ identifier: 0, target: host })],\n });\n\n it('should produce a hover pane after long press', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{\n showDelay: 0,\n longPressDelay: 0,\n enableLongPress: true,\n }}\n ></host-element>`,\n );\n\n // Touch the host element and wait for the long press handlers to run\n host.dispatchEvent(getTouchStartEvent(host));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing); // Is a TemplateResult\n });\n\n it('should cancel a long press by moving', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{\n showDelay: 0,\n longPressDelay: 100,\n enableLongPress: true,\n }}\n ></host-element>`,\n );\n\n // Touch the host element\n host.dispatchEvent(getTouchStartEvent(host));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n // Move the touch point, cancelling the long press\n host.dispatchEvent(new TouchEvent('touchmove'));\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n it('should cancel a long press by ending touch', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{\n showDelay: 0,\n longPressDelay: 100,\n enableLongPress: true,\n }}\n ></host-element>`,\n );\n\n // Touch the host element\n host.dispatchEvent(getTouchStartEvent(host));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n // Lift the touch point, cancelling the long press\n host.dispatchEvent(new TouchEvent('touchend'));\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n it('should cancel a long press by cancelling touch (e.g., too many touch points)', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{\n showDelay: 0,\n longPressDelay: 100,\n enableLongPress: true,\n }}\n ></host-element>`,\n );\n\n // Touch the host element\n host.dispatchEvent(getTouchStartEvent(host));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n // Cancel the touch point, also cancelling the long press\n host.dispatchEvent(new TouchEvent('touchcancel'));\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n\n it('should close the hover pane on mobile when touching the backdrop', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{\n showDelay: 0,\n hideDelay: 0,\n longPressDelay: 0,\n enableLongPress: true,\n mobileBreakpoint: 9999, // Ensure we get the mobile view\n }}\n ></host-element>`,\n );\n\n // Touch the host element\n host.dispatchEvent(getTouchStartEvent(host));\n await new Promise(resolve => {\n setTimeout(resolve, 0);\n });\n\n expect(host.controller?.getTemplate()).not.to.equal(nothing);\n\n await host.updateComplete;\n\n // Touch the backdrop\n host.shadowRoot\n ?.querySelector('#touch-backdrop')\n ?.dispatchEvent(new TouchEvent('touchstart'));\n await new Promise(resolve => {\n setTimeout(resolve, 150);\n });\n\n expect(host.controller?.getTemplate()).to.equal(nothing);\n });\n });\n\n describe('keyboard accessibility', () => {\n it('should call host getBoundingClientRect if anchor is host', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n const getBoundingClientRectSpy = sinon.spy(host, 'getBoundingClientRect');\n\n host.dispatchEvent(new FocusEvent('focus'));\n await waitUntil(\n () => getBoundingClientRectSpy.called,\n 'host getBoundingClientRect was never consulted for positioning',\n );\n });\n\n it('should show hover pane on focus', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n host.dispatchEvent(new FocusEvent('focus'));\n\n // The controller template becomes available synchronously with the focus event\n expect(host.controller?.getTemplate()).not.to.equal(nothing);\n\n // The pane element then renders and opens as a popover\n await waitUntil(\n () => host.getHoverPane()?.matches(':popover-open') ?? false,\n 'Hover pane never opened as a popover',\n );\n });\n\n it('should hide hover pane on blur', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n host.dispatchEvent(new FocusEvent('focus'));\n await waitUntil(\n () => host.getHoverPane()?.matches(':popover-open') ?? false,\n 'Hover pane never opened as a popover',\n );\n\n host.dispatchEvent(new FocusEvent('blur'));\n await waitUntil(\n () => !host.getHoverPane(),\n 'Hover pane was not removed after blur',\n );\n });\n });\n\n describe('frame-starved environments', () => {\n let realRaf: typeof window.requestAnimationFrame;\n\n before(() => {\n realRaf = window.requestAnimationFrame;\n // Simulate an environment that never produces rendering frames:\n // callbacks are accepted but never invoked.\n window.requestAnimationFrame = () => 0;\n });\n\n after(() => {\n window.requestAnimationFrame = realRaf;\n });\n\n it('should position the hover pane even when animation frames never fire', async () => {\n const host = await fixture<HostElement>(\n html`<host-element\n .controllerOptions=${{ showDelay: 0, hideDelay: 0 }}\n ></host-element>`,\n );\n\n const getBoundingClientRectSpy = sinon.spy(host, 'getBoundingClientRect');\n\n host.dispatchEvent(new FocusEvent('focus'));\n await waitUntil(\n () => getBoundingClientRectSpy.called,\n 'host getBoundingClientRect was never consulted for positioning',\n );\n });\n });\n});\n"]}
@@ -1 +0,0 @@
1
- import '../../../src/tiles/hover/tile-hover-pane';
@@ -1,53 +0,0 @@
1
- import { expect, fixture } from '@open-wc/testing';
2
- import { html } from 'lit';
3
- import '../../../src/tiles/hover/tile-hover-pane';
4
- describe('Tile Hover Pane', () => {
5
- it('should render initial component', async () => {
6
- const el = await fixture(html `<tile-hover-pane></tile-hover-pane>`);
7
- const container = el.shadowRoot?.querySelector('#container');
8
- const listView = el.shadowRoot?.querySelector('tile-list');
9
- expect(container).to.exist;
10
- expect(listView).to.exist;
11
- });
12
- it('should render component with header element', async () => {
13
- const model = {
14
- mediatype: 'texts',
15
- collections: ['collection1', 'fav-jack-sparrow'],
16
- };
17
- const el = await fixture(html `<tile-hover-pane .model=${model}></tile-hover-pane>`);
18
- const container = el.shadowRoot?.querySelector('#container');
19
- const listView = container?.querySelector('tile-list');
20
- const headerElement = container?.querySelector('#list-line-header');
21
- expect(container).to.exist;
22
- expect(listView).to.exist;
23
- expect(headerElement).to.exist;
24
- expect(headerElement?.querySelector('a')?.getAttribute('href')).contains('/details/collection1');
25
- });
26
- it('should NOT render header element when fav- collection', async () => {
27
- const model = {
28
- mediatype: 'texts',
29
- collections: ['fav-jack-sparrow'],
30
- };
31
- const el = await fixture(html `<tile-hover-pane .model=${model}></tile-hover-pane>`);
32
- const container = el.shadowRoot?.querySelector('#container');
33
- const listView = container?.querySelector('tile-list');
34
- const headerElement = container?.querySelector('#list-line-header');
35
- expect(container).to.exist;
36
- expect(listView).to.exist;
37
- expect(headerElement).not.exist;
38
- });
39
- it('should NOT render header element when no collections', async () => {
40
- const model = {
41
- mediatype: 'texts',
42
- collections: [],
43
- };
44
- const el = await fixture(html `<tile-hover-pane .model=${model}></tile-hover-pane>`);
45
- const container = el.shadowRoot?.querySelector('#container');
46
- const listView = container?.querySelector('tile-list');
47
- const headerElement = container?.querySelector('#list-line-header');
48
- expect(container).to.exist;
49
- expect(listView).to.exist;
50
- expect(headerElement).not.exist;
51
- });
52
- });
53
- //# sourceMappingURL=tile-hover-pane.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tile-hover-pane.test.js","sourceRoot":"","sources":["../../../../test/tiles/hover/tile-hover-pane.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAI3B,OAAO,0CAA0C,CAAC;AAElD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,qCAAqC,CAC1C,CAAC;QAEF,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;QAE3D,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,KAAK,GAAuB;YAChC,SAAS,EAAE,OAAO;YAClB,WAAW,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC;SACjD,CAAC;QAEF,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,2BAA2B,KAAK,qBAAqB,CAC1D,CAAC;QAEF,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,SAAS,EAAE,aAAa,CAAC,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F,MAAM,EAAE,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA,2BAA2B,KAAK,qBAAqB,CAC1D,CAAC;QAEF,MAAM,SAAS,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;QAEpE,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC1B,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture } from '@open-wc/testing';\nimport { html } from 'lit';\nimport type { TileModel } from '../../../src/models';\nimport type { TileHoverPane } from '../../../src/tiles/hover/tile-hover-pane';\n\nimport '../../../src/tiles/hover/tile-hover-pane';\n\ndescribe('Tile Hover Pane', () => {\n it('should render initial component', async () => {\n const el = await fixture<TileHoverPane>(\n html`<tile-hover-pane></tile-hover-pane>`,\n );\n\n const container = el.shadowRoot?.querySelector('#container');\n const listView = el.shadowRoot?.querySelector('tile-list');\n\n expect(container).to.exist;\n expect(listView).to.exist;\n });\n\n it('should render component with header element', async () => {\n const model: Partial<TileModel> = {\n mediatype: 'texts',\n collections: ['collection1', 'fav-jack-sparrow'],\n };\n\n const el = await fixture<TileHoverPane>(\n html`<tile-hover-pane .model=${model}></tile-hover-pane>`,\n );\n\n const container = el.shadowRoot?.querySelector('#container');\n const listView = container?.querySelector('tile-list');\n const headerElement = container?.querySelector('#list-line-header');\n\n expect(container).to.exist;\n expect(listView).to.exist;\n expect(headerElement).to.exist;\n expect(headerElement?.querySelector('a')?.getAttribute('href')).contains(\n '/details/collection1',\n );\n });\n\n it('should NOT render header element when fav- collection', async () => {\n const model: Partial<TileModel> = {\n mediatype: 'texts',\n collections: ['fav-jack-sparrow'],\n };\n\n const el = await fixture<TileHoverPane>(\n html`<tile-hover-pane .model=${model}></tile-hover-pane>`,\n );\n\n const container = el.shadowRoot?.querySelector('#container');\n const listView = container?.querySelector('tile-list');\n const headerElement = container?.querySelector('#list-line-header');\n\n expect(container).to.exist;\n expect(listView).to.exist;\n expect(headerElement).not.exist;\n });\n\n it('should NOT render header element when no collections', async () => {\n const model: Partial<TileModel> = {\n mediatype: 'texts',\n collections: [],\n };\n\n const el = await fixture<TileHoverPane>(\n html`<tile-hover-pane .model=${model}></tile-hover-pane>`,\n );\n\n const container = el.shadowRoot?.querySelector('#container');\n const listView = container?.querySelector('tile-list');\n const headerElement = container?.querySelector('#list-line-header');\n\n expect(container).to.exist;\n expect(listView).to.exist;\n expect(headerElement).not.exist;\n });\n});\n"]}
@@ -1 +0,0 @@
1
- import '../../../src/tiles/list/tile-list-compact-header';
@@ -1,36 +0,0 @@
1
- import { expect, fixture } from '@open-wc/testing';
2
- import { html } from 'lit';
3
- import '../../../src/tiles/list/tile-list-compact-header';
4
- describe('List Tile Compact Header', () => {
5
- it('should render Weekly views header when sorting by week', async () => {
6
- const el = await fixture(html `
7
- <tile-list-compact-header
8
- .sortParam=${{ field: 'week', direction: 'desc' }}
9
- >
10
- </tile-list-compact-header>
11
- `);
12
- const viewsColumn = el.shadowRoot?.getElementById('views');
13
- expect(viewsColumn).to.exist;
14
- expect(viewsColumn?.textContent?.trim()).to.equal('Weekly views');
15
- });
16
- it('should render All-time views header when sorting by non-week field', async () => {
17
- const el = await fixture(html `
18
- <tile-list-compact-header
19
- .sortParam=${{ field: 'downloads', direction: 'desc' }}
20
- >
21
- </tile-list-compact-header>
22
- `);
23
- const viewsColumn = el.shadowRoot?.getElementById('views');
24
- expect(viewsColumn).to.exist;
25
- expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
26
- });
27
- it('should render All-time views header with no sort param', async () => {
28
- const el = await fixture(html `
29
- <tile-list-compact-header> </tile-list-compact-header>
30
- `);
31
- const viewsColumn = el.shadowRoot?.getElementById('views');
32
- expect(viewsColumn).to.exist;
33
- expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
34
- });
35
- });
36
- //# sourceMappingURL=tile-list-compact-header.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tile-list-compact-header.test.js","sourceRoot":"","sources":["../../../../test/tiles/list/tile-list-compact-header.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,kDAAkD,CAAC;AAE1D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAwB,IAAI,CAAA;;qBAEnC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE;;;KAGpD,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oEAAoE,EAAE,KAAK,IAAI,EAAE;QAClF,MAAM,EAAE,GAAG,MAAM,OAAO,CAAwB,IAAI,CAAA;;qBAEnC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE;;;KAGzD,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAwB,IAAI,CAAA;;KAEnD,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture } from '@open-wc/testing';\nimport { html } from 'lit';\nimport type { TileListCompactHeader } from '../../../src/tiles/list/tile-list-compact-header';\n\nimport '../../../src/tiles/list/tile-list-compact-header';\n\ndescribe('List Tile Compact Header', () => {\n it('should render Weekly views header when sorting by week', async () => {\n const el = await fixture<TileListCompactHeader>(html`\n <tile-list-compact-header\n .sortParam=${{ field: 'week', direction: 'desc' }}\n >\n </tile-list-compact-header>\n `);\n\n const viewsColumn = el.shadowRoot?.getElementById('views');\n expect(viewsColumn).to.exist;\n expect(viewsColumn?.textContent?.trim()).to.equal('Weekly views');\n });\n\n it('should render All-time views header when sorting by non-week field', async () => {\n const el = await fixture<TileListCompactHeader>(html`\n <tile-list-compact-header\n .sortParam=${{ field: 'downloads', direction: 'desc' }}\n >\n </tile-list-compact-header>\n `);\n\n const viewsColumn = el.shadowRoot?.getElementById('views');\n expect(viewsColumn).to.exist;\n expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');\n });\n\n it('should render All-time views header with no sort param', async () => {\n const el = await fixture<TileListCompactHeader>(html`\n <tile-list-compact-header> </tile-list-compact-header>\n `);\n\n const viewsColumn = el.shadowRoot?.getElementById('views');\n expect(viewsColumn).to.exist;\n expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');\n });\n});\n"]}
@@ -1 +0,0 @@
1
- import '../../../src/tiles/list/tile-list-compact';