@internetarchive/collection-browser 1.14.1 → 1.14.2-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +26 -26
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/LICENSE +661 -661
  8. package/README.md +83 -83
  9. package/dist/index.d.ts +9 -9
  10. package/dist/index.js +9 -9
  11. package/dist/src/app-root.d.ts +64 -64
  12. package/dist/src/app-root.js +311 -311
  13. package/dist/src/assets/img/icons/arrow-left.d.ts +2 -2
  14. package/dist/src/assets/img/icons/arrow-left.js +2 -2
  15. package/dist/src/assets/img/icons/arrow-right.d.ts +2 -2
  16. package/dist/src/assets/img/icons/arrow-right.js +2 -2
  17. package/dist/src/assets/img/icons/chevron.d.ts +2 -2
  18. package/dist/src/assets/img/icons/chevron.js +2 -2
  19. package/dist/src/assets/img/icons/contract.d.ts +2 -2
  20. package/dist/src/assets/img/icons/contract.js +2 -2
  21. package/dist/src/assets/img/icons/empty-query.d.ts +2 -2
  22. package/dist/src/assets/img/icons/empty-query.js +2 -2
  23. package/dist/src/assets/img/icons/expand.d.ts +2 -2
  24. package/dist/src/assets/img/icons/expand.js +2 -2
  25. package/dist/src/assets/img/icons/eye-closed.d.ts +2 -2
  26. package/dist/src/assets/img/icons/eye-closed.js +2 -2
  27. package/dist/src/assets/img/icons/eye.d.ts +2 -2
  28. package/dist/src/assets/img/icons/eye.js +2 -2
  29. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  30. package/dist/src/assets/img/icons/favorite-filled.js +2 -2
  31. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  32. package/dist/src/assets/img/icons/login-required.js +2 -2
  33. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  34. package/dist/src/assets/img/icons/mediatype/account.js +2 -2
  35. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  36. package/dist/src/assets/img/icons/mediatype/audio.js +2 -2
  37. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  38. package/dist/src/assets/img/icons/mediatype/collection.js +2 -2
  39. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  40. package/dist/src/assets/img/icons/mediatype/data.js +2 -2
  41. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  42. package/dist/src/assets/img/icons/mediatype/etree.js +2 -2
  43. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  44. package/dist/src/assets/img/icons/mediatype/film.js +2 -2
  45. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  46. package/dist/src/assets/img/icons/mediatype/images.js +2 -2
  47. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  48. package/dist/src/assets/img/icons/mediatype/radio.js +2 -2
  49. package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -0
  50. package/dist/src/assets/img/icons/mediatype/search.js +14 -0
  51. package/dist/src/assets/img/icons/mediatype/search.js.map +1 -0
  52. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  53. package/dist/src/assets/img/icons/mediatype/software.js +2 -2
  54. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  55. package/dist/src/assets/img/icons/mediatype/texts.js +2 -2
  56. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  57. package/dist/src/assets/img/icons/mediatype/tv.js +2 -2
  58. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  59. package/dist/src/assets/img/icons/mediatype/video.js +2 -2
  60. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  61. package/dist/src/assets/img/icons/mediatype/web.js +2 -2
  62. package/dist/src/assets/img/icons/null-result.d.ts +2 -2
  63. package/dist/src/assets/img/icons/null-result.js +2 -2
  64. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  65. package/dist/src/assets/img/icons/restricted.js +2 -2
  66. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  67. package/dist/src/assets/img/icons/reviews.js +2 -2
  68. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  69. package/dist/src/assets/img/icons/upload.js +2 -2
  70. package/dist/src/assets/img/icons/views.d.ts +1 -1
  71. package/dist/src/assets/img/icons/views.js +2 -2
  72. package/dist/src/circular-activity-indicator.d.ts +5 -5
  73. package/dist/src/circular-activity-indicator.js +17 -17
  74. package/dist/src/collection-browser.d.ts +524 -522
  75. package/dist/src/collection-browser.js +1859 -1834
  76. package/dist/src/collection-browser.js.map +1 -1
  77. package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
  78. package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
  79. package/dist/src/collection-facets/facets-template.d.ts +20 -20
  80. package/dist/src/collection-facets/facets-template.js +152 -152
  81. package/dist/src/collection-facets/more-facets-content.d.ts +77 -77
  82. package/dist/src/collection-facets/more-facets-content.js +359 -359
  83. package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
  84. package/dist/src/collection-facets/more-facets-pagination.js +196 -196
  85. package/dist/src/collection-facets/toggle-switch.d.ts +41 -41
  86. package/dist/src/collection-facets/toggle-switch.js +94 -94
  87. package/dist/src/collection-facets.d.ts +104 -104
  88. package/dist/src/collection-facets.js +506 -506
  89. package/dist/src/empty-placeholder.d.ts +23 -23
  90. package/dist/src/empty-placeholder.js +74 -74
  91. package/dist/src/expanded-date-picker.d.ts +43 -43
  92. package/dist/src/expanded-date-picker.js +109 -109
  93. package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
  94. package/dist/src/language-code-handler/language-code-handler.js +26 -26
  95. package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
  96. package/dist/src/language-code-handler/language-code-mapping.js +562 -562
  97. package/dist/src/manage/manage-bar.d.ts +26 -26
  98. package/dist/src/manage/manage-bar.js +53 -53
  99. package/dist/src/mediatype/mediatype-config.d.ts +3 -3
  100. package/dist/src/mediatype/mediatype-config.js +91 -85
  101. package/dist/src/mediatype/mediatype-config.js.map +1 -1
  102. package/dist/src/models.d.ts +164 -164
  103. package/dist/src/models.js +269 -269
  104. package/dist/src/restoration-state-handler.d.ts +70 -70
  105. package/dist/src/restoration-state-handler.js +355 -355
  106. package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +6 -6
  107. package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +24 -24
  108. package/dist/src/sort-filter-bar/alpha-bar.d.ts +21 -21
  109. package/dist/src/sort-filter-bar/alpha-bar.js +128 -128
  110. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
  111. package/dist/src/sort-filter-bar/img/compact.js +2 -2
  112. package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
  113. package/dist/src/sort-filter-bar/img/list.js +2 -2
  114. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -1
  115. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js +2 -2
  116. package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -1
  117. package/dist/src/sort-filter-bar/img/sort-toggle-down.js +2 -2
  118. package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -1
  119. package/dist/src/sort-filter-bar/img/sort-toggle-up.js +2 -2
  120. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
  121. package/dist/src/sort-filter-bar/img/sort-triangle.js +2 -2
  122. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
  123. package/dist/src/sort-filter-bar/img/tile.js +2 -2
  124. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +208 -208
  125. package/dist/src/sort-filter-bar/sort-filter-bar.js +637 -637
  126. package/dist/src/styles/item-image-styles.d.ts +8 -8
  127. package/dist/src/styles/item-image-styles.js +13 -9
  128. package/dist/src/styles/item-image-styles.js.map +1 -1
  129. package/dist/src/styles/sr-only.d.ts +1 -1
  130. package/dist/src/styles/sr-only.js +2 -2
  131. package/dist/src/tiles/base-tile-component.d.ts +18 -18
  132. package/dist/src/tiles/base-tile-component.js +59 -59
  133. package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
  134. package/dist/src/tiles/collection-browser-loading-tile.js +15 -15
  135. package/dist/src/tiles/grid/account-tile.d.ts +18 -18
  136. package/dist/src/tiles/grid/account-tile.js +72 -72
  137. package/dist/src/tiles/grid/collection-tile.d.ts +15 -15
  138. package/dist/src/tiles/grid/collection-tile.js +80 -80
  139. package/dist/src/tiles/grid/item-tile.d.ts +27 -27
  140. package/dist/src/tiles/grid/item-tile.js +134 -134
  141. package/dist/src/tiles/grid/search-tile.d.ts +10 -0
  142. package/dist/src/tiles/grid/search-tile.js +92 -0
  143. package/dist/src/tiles/grid/search-tile.js.map +1 -0
  144. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -1
  145. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +8 -8
  146. package/dist/src/tiles/grid/tile-stats.d.ts +11 -11
  147. package/dist/src/tiles/grid/tile-stats.js +48 -48
  148. package/dist/src/tiles/hover/hover-pane-controller.d.ts +219 -219
  149. package/dist/src/tiles/hover/hover-pane-controller.js +352 -352
  150. package/dist/src/tiles/hover/tile-hover-pane.d.ts +15 -15
  151. package/dist/src/tiles/hover/tile-hover-pane.js +38 -38
  152. package/dist/src/tiles/image-block.d.ts +17 -17
  153. package/dist/src/tiles/image-block.js +75 -73
  154. package/dist/src/tiles/image-block.js.map +1 -1
  155. package/dist/src/tiles/item-image.d.ts +36 -35
  156. package/dist/src/tiles/item-image.js +148 -125
  157. package/dist/src/tiles/item-image.js.map +1 -1
  158. package/dist/src/tiles/list/tile-list-compact-header.d.ts +6 -6
  159. package/dist/src/tiles/list/tile-list-compact-header.js +38 -38
  160. package/dist/src/tiles/list/tile-list-compact.d.ts +15 -15
  161. package/dist/src/tiles/list/tile-list-compact.js +114 -114
  162. package/dist/src/tiles/list/tile-list.d.ts +46 -46
  163. package/dist/src/tiles/list/tile-list.js +302 -298
  164. package/dist/src/tiles/list/tile-list.js.map +1 -1
  165. package/dist/src/tiles/mediatype-icon.d.ts +9 -9
  166. package/dist/src/tiles/mediatype-icon.js +47 -47
  167. package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
  168. package/dist/src/tiles/overlay/icon-overlay.js +40 -40
  169. package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
  170. package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
  171. package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
  172. package/dist/src/tiles/overlay/text-overlay.js +42 -42
  173. package/dist/src/tiles/text-snippet-block.d.ts +27 -27
  174. package/dist/src/tiles/text-snippet-block.js +73 -73
  175. package/dist/src/tiles/tile-dispatcher.d.ts +64 -63
  176. package/dist/src/tiles/tile-dispatcher.js +249 -225
  177. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  178. package/dist/src/tiles/tile-display-value-provider.d.ts +43 -43
  179. package/dist/src/tiles/tile-display-value-provider.js +80 -80
  180. package/dist/src/utils/analytics-events.d.ts +25 -25
  181. package/dist/src/utils/analytics-events.js +27 -27
  182. package/dist/src/utils/array-equals.d.ts +4 -4
  183. package/dist/src/utils/array-equals.js +10 -10
  184. package/dist/src/utils/format-count.d.ts +7 -7
  185. package/dist/src/utils/format-count.js +76 -76
  186. package/dist/src/utils/format-date.d.ts +2 -2
  187. package/dist/src/utils/format-date.js +25 -25
  188. package/dist/src/utils/format-unit-size.d.ts +2 -2
  189. package/dist/src/utils/format-unit-size.js +33 -33
  190. package/dist/src/utils/local-date-from-utc.d.ts +9 -9
  191. package/dist/src/utils/local-date-from-utc.js +15 -15
  192. package/dist/src/utils/sha1.d.ts +2 -2
  193. package/dist/src/utils/sha1.js +8 -8
  194. package/dist/test/collection-browser.test.d.ts +1 -1
  195. package/dist/test/collection-browser.test.js +1098 -1098
  196. package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
  197. package/dist/test/collection-facets/facets-template.test.js +134 -134
  198. package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
  199. package/dist/test/collection-facets/more-facets-content.test.js +133 -133
  200. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
  201. package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
  202. package/dist/test/collection-facets/toggle-switch.test.d.ts +1 -1
  203. package/dist/test/collection-facets/toggle-switch.test.js +73 -73
  204. package/dist/test/collection-facets.test.d.ts +2 -2
  205. package/dist/test/collection-facets.test.js +682 -682
  206. package/dist/test/empty-placeholder.test.d.ts +1 -1
  207. package/dist/test/empty-placeholder.test.js +63 -63
  208. package/dist/test/expanded-date-picker.test.d.ts +1 -1
  209. package/dist/test/expanded-date-picker.test.js +95 -95
  210. package/dist/test/icon-overlay.test.d.ts +1 -1
  211. package/dist/test/icon-overlay.test.js +24 -24
  212. package/dist/test/image-block.test.d.ts +1 -1
  213. package/dist/test/image-block.test.js +48 -48
  214. package/dist/test/item-image.test.d.ts +1 -1
  215. package/dist/test/item-image.test.js +86 -86
  216. package/dist/test/manage/manage-bar.test.d.ts +1 -1
  217. package/dist/test/manage/manage-bar.test.js +72 -72
  218. package/dist/test/mediatype-config.test.d.ts +1 -1
  219. package/dist/test/mediatype-config.test.js +16 -16
  220. package/dist/test/mocks/mock-analytics-handler.d.ts +10 -10
  221. package/dist/test/mocks/mock-analytics-handler.js +15 -15
  222. package/dist/test/mocks/mock-collection-name-cache.d.ts +9 -9
  223. package/dist/test/mocks/mock-collection-name-cache.js +17 -17
  224. package/dist/test/mocks/mock-search-responses.d.ts +21 -21
  225. package/dist/test/mocks/mock-search-responses.js +709 -709
  226. package/dist/test/mocks/mock-search-service.d.ts +15 -15
  227. package/dist/test/mocks/mock-search-service.js +50 -50
  228. package/dist/test/restoration-state-handler.test.d.ts +1 -1
  229. package/dist/test/restoration-state-handler.test.js +270 -270
  230. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +1 -1
  231. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +12 -12
  232. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -1
  233. package/dist/test/sort-filter-bar/alpha-bar.test.js +73 -73
  234. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -1
  235. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +378 -378
  236. package/dist/test/text-overlay.test.d.ts +1 -1
  237. package/dist/test/text-overlay.test.js +48 -48
  238. package/dist/test/text-snippet-block.test.d.ts +1 -1
  239. package/dist/test/text-snippet-block.test.js +57 -57
  240. package/dist/test/tile-stats.test.d.ts +1 -1
  241. package/dist/test/tile-stats.test.js +33 -33
  242. package/dist/test/tiles/grid/account-tile.test.d.ts +1 -1
  243. package/dist/test/tiles/grid/account-tile.test.js +76 -76
  244. package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -1
  245. package/dist/test/tiles/grid/collection-tile.test.js +73 -73
  246. package/dist/test/tiles/grid/item-tile.test.d.ts +1 -1
  247. package/dist/test/tiles/grid/item-tile.test.js +254 -254
  248. package/dist/test/tiles/grid/search-tile.test.d.ts +1 -0
  249. package/dist/test/tiles/grid/search-tile.test.js +67 -0
  250. package/dist/test/tiles/grid/search-tile.test.js.map +1 -0
  251. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -1
  252. package/dist/test/tiles/hover/hover-pane-controller.test.js +258 -258
  253. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -1
  254. package/dist/test/tiles/hover/tile-hover-pane.test.js +13 -13
  255. package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -1
  256. package/dist/test/tiles/list/tile-list-compact.test.js +143 -143
  257. package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
  258. package/dist/test/tiles/list/tile-list.test.js +242 -242
  259. package/dist/test/tiles/tile-dispatcher.test.d.ts +1 -1
  260. package/dist/test/tiles/tile-dispatcher.test.js +94 -94
  261. package/dist/test/tiles/tile-display-value-provider.test.d.ts +1 -1
  262. package/dist/test/tiles/tile-display-value-provider.test.js +141 -141
  263. package/dist/test/utils/array-equals.test.d.ts +1 -1
  264. package/dist/test/utils/array-equals.test.js +26 -26
  265. package/dist/test/utils/format-count.test.d.ts +1 -1
  266. package/dist/test/utils/format-count.test.js +23 -23
  267. package/dist/test/utils/format-date.test.d.ts +1 -1
  268. package/dist/test/utils/format-date.test.js +17 -17
  269. package/dist/test/utils/format-unit-size.test.d.ts +1 -1
  270. package/dist/test/utils/format-unit-size.test.js +17 -17
  271. package/dist/test/utils/local-date-from-utc.test.d.ts +1 -1
  272. package/dist/test/utils/local-date-from-utc.test.js +26 -26
  273. package/local.archive.org.cert +86 -86
  274. package/local.archive.org.key +27 -27
  275. package/package.json +4 -4
  276. package/renovate.json +6 -6
  277. package/src/assets/img/icons/mediatype/search.ts +14 -0
  278. package/src/collection-browser.ts +29 -1
  279. package/src/mediatype/mediatype-config.ts +6 -0
  280. package/src/styles/item-image-styles.ts +4 -0
  281. package/src/tiles/grid/search-tile.ts +87 -0
  282. package/src/tiles/image-block.ts +3 -1
  283. package/src/tiles/item-image.ts +31 -8
  284. package/src/tiles/list/tile-list.ts +5 -0
  285. package/src/tiles/tile-dispatcher.ts +23 -1
  286. package/test/tiles/grid/search-tile.test.ts +76 -0
  287. package/tsconfig.json +21 -21
  288. package/web-dev-server.config.mjs +30 -30
  289. package/web-test-runner.config.mjs +41 -41
@@ -1,50 +1,50 @@
1
- import { __decorate } from "tslib";
2
- import { css, html, nothing } from 'lit';
3
- import { ifDefined } from 'lit/directives/if-defined.js';
4
- import { join } from 'lit/directives/join.js';
5
- import { map } from 'lit/directives/map.js';
6
- import { unsafeHTML } from 'lit/directives/unsafe-html.js';
7
- import { customElement, property, state } from 'lit/decorators.js';
8
- import { msg } from '@lit/localize';
9
- import DOMPurify from 'dompurify';
10
- import { suppressedCollections } from '../../models';
11
- import { BaseTileComponent } from '../base-tile-component';
12
- import { formatCount } from '../../utils/format-count';
13
- import { formatDate } from '../../utils/format-date';
14
- import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
15
- import '../image-block';
16
- import '../mediatype-icon';
17
- let TileList = class TileList extends BaseTileComponent {
18
- constructor() {
19
- /*
20
- * Reactive properties inherited from BaseTileComponent:
21
- * - model?: TileModel;
22
- * - currentWidth?: number;
23
- * - currentHeight?: number;
24
- * - baseNavigationUrl?: string;
25
- * - baseImageUrl?: string;
26
- * - collectionPagePath?: string;
27
- * - sortParam: SortParam | null = null;
28
- * - creatorFilter?: string;
29
- * - mobileBreakpoint?: number;
30
- * - loggedIn = false;
31
- */
32
- super(...arguments);
33
- this.collectionLinks = [];
34
- }
35
- render() {
1
+ import { __decorate } from "tslib";
2
+ import { css, html, nothing } from 'lit';
3
+ import { ifDefined } from 'lit/directives/if-defined.js';
4
+ import { join } from 'lit/directives/join.js';
5
+ import { map } from 'lit/directives/map.js';
6
+ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
7
+ import { customElement, property, state } from 'lit/decorators.js';
8
+ import { msg } from '@lit/localize';
9
+ import DOMPurify from 'dompurify';
10
+ import { suppressedCollections } from '../../models';
11
+ import { BaseTileComponent } from '../base-tile-component';
12
+ import { formatCount } from '../../utils/format-count';
13
+ import { formatDate } from '../../utils/format-date';
14
+ import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
15
+ import '../image-block';
16
+ import '../mediatype-icon';
17
+ let TileList = class TileList extends BaseTileComponent {
18
+ constructor() {
19
+ /*
20
+ * Reactive properties inherited from BaseTileComponent:
21
+ * - model?: TileModel;
22
+ * - currentWidth?: number;
23
+ * - currentHeight?: number;
24
+ * - baseNavigationUrl?: string;
25
+ * - baseImageUrl?: string;
26
+ * - collectionPagePath?: string;
27
+ * - sortParam: SortParam | null = null;
28
+ * - creatorFilter?: string;
29
+ * - mobileBreakpoint?: number;
30
+ * - loggedIn = false;
31
+ */
32
+ super(...arguments);
33
+ this.collectionLinks = [];
34
+ }
35
+ render() {
36
36
  return html `
37
37
  <div id="list-line" class="${this.classSize}">
38
- ${this.classSize === 'mobile'
39
- ? this.mobileTemplate
38
+ ${this.classSize === 'mobile'
39
+ ? this.mobileTemplate
40
40
  : this.desktopTemplate}
41
41
  </div>
42
- `;
43
- }
44
- /**
45
- * Templates
46
- */
47
- get mobileTemplate() {
42
+ `;
43
+ }
44
+ /**
45
+ * Templates
46
+ */
47
+ get mobileTemplate() {
48
48
  return html `
49
49
  <div id="list-line-top">
50
50
  <div id="list-line-left">${this.imageBlockTemplate}</div>
@@ -56,9 +56,9 @@ let TileList = class TileList extends BaseTileComponent {
56
56
  </div>
57
57
  </div>
58
58
  <div id="list-line-bottom">${this.detailsTemplate}</div>
59
- `;
60
- }
61
- get desktopTemplate() {
59
+ `;
60
+ }
61
+ get desktopTemplate() {
62
62
  return html `
63
63
  <div id="list-line-left">${this.imageBlockTemplate}</div>
64
64
  <div id="list-line-right">
@@ -68,13 +68,13 @@ let TileList = class TileList extends BaseTileComponent {
68
68
  </div>
69
69
  ${this.detailsTemplate}
70
70
  </div>
71
- `;
72
- }
73
- get imageBlockTemplate() {
74
- if (!this.model)
75
- return nothing;
76
- const isCollection = this.model.mediatype === 'collection';
77
- const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
71
+ `;
72
+ }
73
+ get imageBlockTemplate() {
74
+ if (!this.model)
75
+ return nothing;
76
+ const isCollection = this.model.mediatype === 'collection';
77
+ const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
78
78
  return html `<a href=${href}>
79
79
  <image-block
80
80
  .model=${this.model}
@@ -85,9 +85,9 @@ let TileList = class TileList extends BaseTileComponent {
85
85
  .loggedIn=${this.loggedIn}
86
86
  >
87
87
  </image-block>
88
- </a> `;
89
- }
90
- get detailsTemplate() {
88
+ </a> `;
89
+ }
90
+ get detailsTemplate() {
91
91
  return html `
92
92
  ${this.itemLineTemplate} ${this.creatorTemplate}
93
93
  <div id="dates-line">
@@ -98,11 +98,11 @@ let TileList = class TileList extends BaseTileComponent {
98
98
  </div>
99
99
  ${this.topicsTemplate} ${this.collectionsTemplate}
100
100
  ${this.descriptionTemplate} ${this.textSnippetsTemplate}
101
- `;
102
- }
103
- // Data templates
104
- get iconRightTemplate() {
105
- var _a, _b;
101
+ `;
102
+ }
103
+ // Data templates
104
+ get iconRightTemplate() {
105
+ var _a, _b;
106
106
  return html `
107
107
  <a id="icon-right" href=${this.mediatypeURL}>
108
108
  <mediatype-icon
@@ -111,270 +111,274 @@ let TileList = class TileList extends BaseTileComponent {
111
111
  >
112
112
  </mediatype-icon>
113
113
  </a>
114
- `;
115
- }
116
- get titleTemplate() {
117
- var _a, _b, _c;
118
- if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.title)) {
119
- return nothing;
120
- }
121
- // If the model has a server-specified href, use it
122
- // Otherwise construct a details link using the identifier
123
- return ((_b = this.model) === null || _b === void 0 ? void 0 : _b.href)
114
+ `;
115
+ }
116
+ get titleTemplate() {
117
+ var _a, _b, _c;
118
+ if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.title)) {
119
+ return nothing;
120
+ }
121
+ // If the model has a server-specified href, use it
122
+ // Otherwise construct a details link using the identifier
123
+ return ((_b = this.model) === null || _b === void 0 ? void 0 : _b.href)
124
124
  ? html `<a href="${this.baseNavigationUrl}${this.model.href}"
125
125
  >${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
126
- >`
127
- : this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
128
- }
129
- get itemLineTemplate() {
130
- const source = this.sourceTemplate;
131
- const volume = this.volumeTemplate;
132
- const issue = this.issueTemplate;
133
- if (!source && !volume && !issue) {
134
- return nothing;
135
- }
136
- return html ` <div id="item-line">${source} ${volume} ${issue}</div> `;
137
- }
138
- get sourceTemplate() {
139
- var _a;
140
- if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
141
- return nothing;
142
- }
126
+ >`
127
+ : this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
128
+ }
129
+ get itemLineTemplate() {
130
+ const source = this.sourceTemplate;
131
+ const volume = this.volumeTemplate;
132
+ const issue = this.issueTemplate;
133
+ if (!source && !volume && !issue) {
134
+ return nothing;
135
+ }
136
+ return html ` <div id="item-line">${source} ${volume} ${issue}</div> `;
137
+ }
138
+ get sourceTemplate() {
139
+ var _a;
140
+ if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
141
+ return nothing;
142
+ }
143
143
  return html `
144
144
  <div id="source" class="metadata">
145
145
  ${this.labelTemplate(msg('Source'))}
146
146
  ${this.searchLink('source', this.model.source)}
147
147
  </div>
148
- `;
149
- }
150
- get volumeTemplate() {
151
- var _a;
152
- return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.volume, msg('Volume'));
153
- }
154
- get issueTemplate() {
155
- var _a;
156
- return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.issue, msg('Issue'));
157
- }
158
- get creatorTemplate() {
159
- var _a, _b, _c;
160
- // "Archivist since" if account
161
- if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account') {
148
+ `;
149
+ }
150
+ get volumeTemplate() {
151
+ var _a;
152
+ return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.volume, msg('Volume'));
153
+ }
154
+ get issueTemplate() {
155
+ var _a;
156
+ return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.issue, msg('Issue'));
157
+ }
158
+ get creatorTemplate() {
159
+ var _a, _b, _c;
160
+ // "Archivist since" if account
161
+ if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account') {
162
162
  return html `
163
163
  <div id="creator" class="metadata">
164
164
  <span class="label"
165
165
  >${(_b = this.displayValueProvider.accountLabel) !== null && _b !== void 0 ? _b : nothing}</span
166
166
  >
167
167
  </div>
168
- `;
169
- }
170
- // "Creator" if not account tile
171
- if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
172
- return nothing;
173
- }
168
+ `;
169
+ }
170
+ // "Creator" if not account tile
171
+ if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
172
+ return nothing;
173
+ }
174
174
  return html `
175
175
  <div id="creator" class="metadata">
176
176
  ${this.labelTemplate(msg('By'))}
177
177
  ${join(map(this.model.creators, id => this.searchLink('creator', id)), ', ')}
178
178
  </div>
179
- `;
180
- }
181
- get datePublishedTemplate() {
182
- var _a;
183
- // If we're showing a date published of Jan 1 at midnight, only show the year.
184
- // This is because items with only a year for their publication date are normalized to
185
- // Jan 1 at midnight timestamps in the search engine documents.
186
- const date = (_a = this.model) === null || _a === void 0 ? void 0 : _a.datePublished;
187
- let format = 'long';
188
- if (isFirstMillisecondOfUTCYear(date)) {
189
- format = 'year-only';
190
- }
191
- return this.metadataTemplate(formatDate(date, format), msg('Published'));
192
- }
193
- // Show date label/value when sorted by date type
194
- // Except datePublished which is always shown
195
- get dateSortByTemplate() {
196
- if (this.sortParam &&
197
- (this.sortParam.field === 'addeddate' ||
198
- this.sortParam.field === 'reviewdate' ||
199
- this.sortParam.field === 'publicdate')) {
200
- return this.metadataTemplate(formatDate(this.date, 'long'), this.displayValueProvider.dateLabel);
201
- }
202
- return nothing;
203
- }
204
- get viewsTemplate() {
205
- var _a, _b, _c;
206
- const viewCount = ((_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field) === 'week'
207
- ? (_b = this.model) === null || _b === void 0 ? void 0 : _b.weeklyViewCount // weekly views
208
- : (_c = this.model) === null || _c === void 0 ? void 0 : _c.viewCount; // all-time views
209
- return this.metadataTemplate(`${formatCount(viewCount !== null && viewCount !== void 0 ? viewCount : 0, this.formatSize)}`, msg('Views'));
210
- }
211
- get ratingTemplate() {
212
- var _a;
213
- return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.averageRating, msg('Avg Rating'));
214
- }
215
- get reviewsTemplate() {
216
- var _a;
217
- return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.commentCount, msg('Reviews'));
218
- }
219
- get topicsTemplate() {
220
- var _a;
221
- if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
222
- return nothing;
223
- }
179
+ `;
180
+ }
181
+ get datePublishedTemplate() {
182
+ var _a;
183
+ // If we're showing a date published of Jan 1 at midnight, only show the year.
184
+ // This is because items with only a year for their publication date are normalized to
185
+ // Jan 1 at midnight timestamps in the search engine documents.
186
+ const date = (_a = this.model) === null || _a === void 0 ? void 0 : _a.datePublished;
187
+ let format = 'long';
188
+ if (isFirstMillisecondOfUTCYear(date)) {
189
+ format = 'year-only';
190
+ }
191
+ return this.metadataTemplate(formatDate(date, format), msg('Published'));
192
+ }
193
+ // Show date label/value when sorted by date type
194
+ // Except datePublished which is always shown
195
+ get dateSortByTemplate() {
196
+ if (this.sortParam &&
197
+ (this.sortParam.field === 'addeddate' ||
198
+ this.sortParam.field === 'reviewdate' ||
199
+ this.sortParam.field === 'publicdate')) {
200
+ return this.metadataTemplate(formatDate(this.date, 'long'), this.displayValueProvider.dateLabel);
201
+ }
202
+ return nothing;
203
+ }
204
+ get viewsTemplate() {
205
+ var _a, _b, _c, _d;
206
+ const viewCount = ((_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field) === 'week'
207
+ ? (_b = this.model) === null || _b === void 0 ? void 0 : _b.weeklyViewCount // weekly views
208
+ : (_c = this.model) === null || _c === void 0 ? void 0 : _c.viewCount; // all-time views
209
+ // when its a search-tile, we don't have any stats to show
210
+ if (((_d = this.model) === null || _d === void 0 ? void 0 : _d.mediatype) === 'search') {
211
+ return this.metadataTemplate('(Favorited search query)', '');
212
+ }
213
+ return this.metadataTemplate(`${formatCount(viewCount !== null && viewCount !== void 0 ? viewCount : 0, this.formatSize)}`, msg('Views'));
214
+ }
215
+ get ratingTemplate() {
216
+ var _a;
217
+ return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.averageRating, msg('Avg Rating'));
218
+ }
219
+ get reviewsTemplate() {
220
+ var _a;
221
+ return this.metadataTemplate((_a = this.model) === null || _a === void 0 ? void 0 : _a.commentCount, msg('Reviews'));
222
+ }
223
+ get topicsTemplate() {
224
+ var _a;
225
+ if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
226
+ return nothing;
227
+ }
224
228
  return html `
225
229
  <div id="topics" class="metadata">
226
230
  ${this.labelTemplate(msg('Topics'))}
227
231
  ${join(map(this.model.subjects, id => this.searchLink('subject', id)), ', ')}
228
232
  </div>
229
- `;
230
- }
231
- get collectionsTemplate() {
232
- if (!this.collectionLinks || this.collectionLinks.length === 0) {
233
- return nothing;
234
- }
233
+ `;
234
+ }
235
+ get collectionsTemplate() {
236
+ if (!this.collectionLinks || this.collectionLinks.length === 0) {
237
+ return nothing;
238
+ }
235
239
  return html `
236
240
  <div id="collections" class="metadata">
237
241
  ${this.labelTemplate(msg('Collections'))}
238
242
  ${join(this.collectionLinks, ', ')}
239
243
  </div>
240
- `;
241
- }
242
- get descriptionTemplate() {
243
- var _a, _b, _c;
244
- return this.metadataTemplate(
245
- // Sanitize away any HTML tags and convert line breaks to spaces.
246
- unsafeHTML(DOMPurify.sanitize((_c = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.description) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, ' ')) !== null && _c !== void 0 ? _c : '')), '', 'description');
247
- }
248
- get textSnippetsTemplate() {
249
- var _a;
250
- if (!this.hasSnippets)
251
- return nothing;
244
+ `;
245
+ }
246
+ get descriptionTemplate() {
247
+ var _a, _b, _c;
248
+ return this.metadataTemplate(
249
+ // Sanitize away any HTML tags and convert line breaks to spaces.
250
+ unsafeHTML(DOMPurify.sanitize((_c = (_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.description) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, ' ')) !== null && _c !== void 0 ? _c : '')), '', 'description');
251
+ }
252
+ get textSnippetsTemplate() {
253
+ var _a;
254
+ if (!this.hasSnippets)
255
+ return nothing;
252
256
  return html `<text-snippet-block
253
257
  viewsize="list"
254
258
  .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}
255
- ></text-snippet-block>`;
256
- }
257
- get hasSnippets() {
258
- var _a, _b;
259
- return !!((_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets) === null || _b === void 0 ? void 0 : _b.length);
260
- }
261
- // Utility functions
262
- // eslint-disable-next-line default-param-last
263
- metadataTemplate(text, label = '', id) {
264
- if (!text)
265
- return nothing;
259
+ ></text-snippet-block>`;
260
+ }
261
+ get hasSnippets() {
262
+ var _a, _b;
263
+ return !!((_b = (_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets) === null || _b === void 0 ? void 0 : _b.length);
264
+ }
265
+ // Utility functions
266
+ // eslint-disable-next-line default-param-last
267
+ metadataTemplate(text, label = '', id) {
268
+ if (!text)
269
+ return nothing;
266
270
  return html `
267
271
  <div id=${ifDefined(id)} class="metadata">
268
272
  ${this.labelTemplate(label)} ${text}
269
273
  </div>
270
- `;
271
- }
272
- labelTemplate(label) {
273
- return html ` ${label
274
- ? html `<span class="label">${label}: </span>`
275
- : nothing}`;
276
- }
277
- searchLink(field, searchTerm) {
278
- if (!field || !searchTerm) {
279
- return nothing;
280
- }
281
- const query = encodeURIComponent(`${field}:"${searchTerm}"`);
282
- // No whitespace after closing tag
283
- // Note: single ' for href='' to wrap " in query var gets changed back by yarn format
284
- /* eslint-disable lit/no-invalid-html */
274
+ `;
275
+ }
276
+ labelTemplate(label) {
277
+ return html ` ${label
278
+ ? html `<span class="label">${label}: </span>`
279
+ : nothing}`;
280
+ }
281
+ searchLink(field, searchTerm) {
282
+ if (!field || !searchTerm) {
283
+ return nothing;
284
+ }
285
+ const query = encodeURIComponent(`${field}:"${searchTerm}"`);
286
+ // No whitespace after closing tag
287
+ // Note: single ' for href='' to wrap " in query var gets changed back by yarn format
288
+ /* eslint-disable lit/no-invalid-html */
285
289
  return html `<a
286
290
  href="${this.baseNavigationUrl}/search?query=${query}"
287
291
  rel="nofollow"
288
292
  >
289
293
  ${DOMPurify.sanitize(searchTerm)}</a
290
- >`;
291
- /* eslint-enable lit/no-invalid-html */
292
- }
293
- detailsLink(identifier, text, isCollection = false) {
294
- const linkText = text !== null && text !== void 0 ? text : identifier;
295
- const linkHref = this.displayValueProvider.itemPageUrl(identifier, isCollection);
296
- return html `<a href=${linkHref}> ${DOMPurify.sanitize(linkText)} </a>`;
297
- }
298
- /** The URL of this item's mediatype collection, if defined. */
299
- get mediatypeURL() {
300
- var _a;
301
- // NB: baseNavigationUrl can be an empty string
302
- if (this.baseNavigationUrl === undefined || !((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype))
303
- return nothing;
304
- // Need special handling for certain mediatypes that don't have a top-level collection page
305
- switch (this.model.mediatype) {
306
- case 'collection':
307
- return `${this.baseNavigationUrl}/search?query=mediatype:collection&sort=-downloads`;
308
- case 'account':
309
- return nothing;
310
- default:
311
- return this.displayValueProvider.itemPageUrl(this.model.mediatype, true);
312
- }
313
- }
314
- updated(changed) {
315
- if (changed.has('model')) {
316
- this.fetchCollectionNames();
317
- }
318
- }
319
- async fetchCollectionNames() {
320
- var _a, _b;
321
- if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.collections) ||
322
- this.model.collections.length === 0 ||
323
- !this.collectionNameCache) {
324
- return;
325
- }
326
- // Note: quirk of Lit: need to replace collectionLinks array,
327
- // otherwise it will not re-render. Can't simply alter the array.
328
- this.collectionLinks = [];
329
- const newCollectionLinks = [];
330
- const promises = [];
331
- for (const collection of this.model.collections) {
332
- // Don't include favorites or collections that are meant to be suppressed
333
- if (!suppressedCollections[collection] &&
334
- !collection.startsWith('fav-')) {
335
- promises.push((_b = this.collectionNameCache) === null || _b === void 0 ? void 0 : _b.collectionNameFor(collection).then(name => {
336
- newCollectionLinks.push(this.detailsLink(collection, name !== null && name !== void 0 ? name : collection, true));
337
- }));
338
- }
339
- }
340
- await Promise.all(promises);
341
- this.collectionLinks = newCollectionLinks;
342
- }
343
- /*
344
- * TODO: fix field names to match model in src/collection-browser.ts
345
- * private get dateSortSelector()
346
- * @see src/models.ts
347
- */
348
- get date() {
349
- var _a, _b, _c, _d, _e;
350
- switch ((_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field) {
351
- case 'date':
352
- return (_b = this.model) === null || _b === void 0 ? void 0 : _b.datePublished;
353
- case 'reviewdate':
354
- return (_c = this.model) === null || _c === void 0 ? void 0 : _c.dateReviewed;
355
- case 'addeddate':
356
- return (_d = this.model) === null || _d === void 0 ? void 0 : _d.dateAdded;
357
- default:
358
- return (_e = this.model) === null || _e === void 0 ? void 0 : _e.dateArchived; // publicdate
359
- }
360
- }
361
- get classSize() {
362
- if (this.mobileBreakpoint &&
363
- this.currentWidth &&
364
- this.currentWidth < this.mobileBreakpoint) {
365
- return 'mobile';
366
- }
367
- return 'desktop';
368
- }
369
- get formatSize() {
370
- if (this.mobileBreakpoint &&
371
- this.currentWidth &&
372
- this.currentWidth < this.mobileBreakpoint) {
373
- return 'short';
374
- }
375
- return 'long';
376
- }
377
- static get styles() {
294
+ >`;
295
+ /* eslint-enable lit/no-invalid-html */
296
+ }
297
+ detailsLink(identifier, text, isCollection = false) {
298
+ const linkText = text !== null && text !== void 0 ? text : identifier;
299
+ const linkHref = this.displayValueProvider.itemPageUrl(identifier, isCollection);
300
+ return html `<a href=${linkHref}> ${DOMPurify.sanitize(linkText)} </a>`;
301
+ }
302
+ /** The URL of this item's mediatype collection, if defined. */
303
+ get mediatypeURL() {
304
+ var _a;
305
+ // NB: baseNavigationUrl can be an empty string
306
+ if (this.baseNavigationUrl === undefined || !((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype))
307
+ return nothing;
308
+ // Need special handling for certain mediatypes that don't have a top-level collection page
309
+ switch (this.model.mediatype) {
310
+ case 'collection':
311
+ return `${this.baseNavigationUrl}/search?query=mediatype:collection&sort=-downloads`;
312
+ case 'account':
313
+ return nothing;
314
+ default:
315
+ return this.displayValueProvider.itemPageUrl(this.model.mediatype, true);
316
+ }
317
+ }
318
+ updated(changed) {
319
+ if (changed.has('model')) {
320
+ this.fetchCollectionNames();
321
+ }
322
+ }
323
+ async fetchCollectionNames() {
324
+ var _a, _b;
325
+ if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.collections) ||
326
+ this.model.collections.length === 0 ||
327
+ !this.collectionNameCache) {
328
+ return;
329
+ }
330
+ // Note: quirk of Lit: need to replace collectionLinks array,
331
+ // otherwise it will not re-render. Can't simply alter the array.
332
+ this.collectionLinks = [];
333
+ const newCollectionLinks = [];
334
+ const promises = [];
335
+ for (const collection of this.model.collections) {
336
+ // Don't include favorites or collections that are meant to be suppressed
337
+ if (!suppressedCollections[collection] &&
338
+ !collection.startsWith('fav-')) {
339
+ promises.push((_b = this.collectionNameCache) === null || _b === void 0 ? void 0 : _b.collectionNameFor(collection).then(name => {
340
+ newCollectionLinks.push(this.detailsLink(collection, name !== null && name !== void 0 ? name : collection, true));
341
+ }));
342
+ }
343
+ }
344
+ await Promise.all(promises);
345
+ this.collectionLinks = newCollectionLinks;
346
+ }
347
+ /*
348
+ * TODO: fix field names to match model in src/collection-browser.ts
349
+ * private get dateSortSelector()
350
+ * @see src/models.ts
351
+ */
352
+ get date() {
353
+ var _a, _b, _c, _d, _e;
354
+ switch ((_a = this.sortParam) === null || _a === void 0 ? void 0 : _a.field) {
355
+ case 'date':
356
+ return (_b = this.model) === null || _b === void 0 ? void 0 : _b.datePublished;
357
+ case 'reviewdate':
358
+ return (_c = this.model) === null || _c === void 0 ? void 0 : _c.dateReviewed;
359
+ case 'addeddate':
360
+ return (_d = this.model) === null || _d === void 0 ? void 0 : _d.dateAdded;
361
+ default:
362
+ return (_e = this.model) === null || _e === void 0 ? void 0 : _e.dateArchived; // publicdate
363
+ }
364
+ }
365
+ get classSize() {
366
+ if (this.mobileBreakpoint &&
367
+ this.currentWidth &&
368
+ this.currentWidth < this.mobileBreakpoint) {
369
+ return 'mobile';
370
+ }
371
+ return 'desktop';
372
+ }
373
+ get formatSize() {
374
+ if (this.mobileBreakpoint &&
375
+ this.currentWidth &&
376
+ this.currentWidth < this.mobileBreakpoint) {
377
+ return 'short';
378
+ }
379
+ return 'long';
380
+ }
381
+ static get styles() {
378
382
  return css `
379
383
  html {
380
384
  font-size: unset;
@@ -545,17 +549,17 @@ let TileList = class TileList extends BaseTileComponent {
545
549
  #views-line {
546
550
  flex-wrap: wrap;
547
551
  }
548
- `;
549
- }
550
- };
551
- __decorate([
552
- property({ type: Object })
553
- ], TileList.prototype, "collectionNameCache", void 0);
554
- __decorate([
555
- state()
556
- ], TileList.prototype, "collectionLinks", void 0);
557
- TileList = __decorate([
558
- customElement('tile-list')
559
- ], TileList);
560
- export { TileList };
552
+ `;
553
+ }
554
+ };
555
+ __decorate([
556
+ property({ type: Object })
557
+ ], TileList.prototype, "collectionNameCache", void 0);
558
+ __decorate([
559
+ state()
560
+ ], TileList.prototype, "collectionLinks", void 0);
561
+ TileList = __decorate([
562
+ customElement('tile-list')
563
+ ], TileList);
564
+ export { TileList };
561
565
  //# sourceMappingURL=tile-list.js.map