@internetarchive/collection-browser 0.4.3-alpha.9 → 0.4.4-alpha

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 (250) 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 +50 -48
  12. package/dist/src/app-root.js +449 -412
  13. package/dist/src/app-root.js.map +1 -1
  14. package/dist/src/assets/img/icons/arrow-left.d.ts +2 -2
  15. package/dist/src/assets/img/icons/arrow-left.js +2 -2
  16. package/dist/src/assets/img/icons/arrow-right.d.ts +2 -2
  17. package/dist/src/assets/img/icons/arrow-right.js +2 -2
  18. package/dist/src/assets/img/icons/chevron.d.ts +2 -2
  19. package/dist/src/assets/img/icons/chevron.js +2 -2
  20. package/dist/src/assets/img/icons/empty-query.d.ts +2 -2
  21. package/dist/src/assets/img/icons/empty-query.js +2 -2
  22. package/dist/src/assets/img/icons/eye-closed.d.ts +2 -2
  23. package/dist/src/assets/img/icons/eye-closed.js +2 -2
  24. package/dist/src/assets/img/icons/eye.d.ts +2 -2
  25. package/dist/src/assets/img/icons/eye.js +2 -2
  26. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  27. package/dist/src/assets/img/icons/favorite-filled.js +2 -2
  28. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  29. package/dist/src/assets/img/icons/login-required.js +2 -2
  30. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  31. package/dist/src/assets/img/icons/mediatype/account.js +2 -2
  32. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  33. package/dist/src/assets/img/icons/mediatype/audio.js +2 -2
  34. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  35. package/dist/src/assets/img/icons/mediatype/collection.js +2 -2
  36. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  37. package/dist/src/assets/img/icons/mediatype/data.js +2 -2
  38. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  39. package/dist/src/assets/img/icons/mediatype/etree.js +2 -2
  40. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  41. package/dist/src/assets/img/icons/mediatype/film.js +2 -2
  42. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  43. package/dist/src/assets/img/icons/mediatype/images.js +2 -2
  44. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  45. package/dist/src/assets/img/icons/mediatype/radio.js +2 -2
  46. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  47. package/dist/src/assets/img/icons/mediatype/software.js +2 -2
  48. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  49. package/dist/src/assets/img/icons/mediatype/texts.js +2 -2
  50. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  51. package/dist/src/assets/img/icons/mediatype/tv.js +2 -2
  52. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  53. package/dist/src/assets/img/icons/mediatype/video.js +2 -2
  54. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  55. package/dist/src/assets/img/icons/mediatype/web.js +2 -2
  56. package/dist/src/assets/img/icons/null-result.d.ts +2 -2
  57. package/dist/src/assets/img/icons/null-result.js +2 -2
  58. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  59. package/dist/src/assets/img/icons/restricted.js +2 -2
  60. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  61. package/dist/src/assets/img/icons/reviews.js +2 -2
  62. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  63. package/dist/src/assets/img/icons/upload.js +2 -2
  64. package/dist/src/assets/img/icons/views.d.ts +1 -1
  65. package/dist/src/assets/img/icons/views.js +2 -2
  66. package/dist/src/circular-activity-indicator.d.ts +5 -5
  67. package/dist/src/circular-activity-indicator.js +17 -17
  68. package/dist/src/collection-browser.d.ts +315 -276
  69. package/dist/src/collection-browser.js +1276 -1179
  70. package/dist/src/collection-browser.js.map +1 -1
  71. package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -5
  72. package/dist/src/collection-facets/facet-tombstone-row.js +15 -15
  73. package/dist/src/collection-facets/facets-template.d.ts +16 -16
  74. package/dist/src/collection-facets/facets-template.js +125 -125
  75. package/dist/src/collection-facets/more-facets-content.d.ts +77 -77
  76. package/dist/src/collection-facets/more-facets-content.js +357 -357
  77. package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -36
  78. package/dist/src/collection-facets/more-facets-pagination.js +192 -192
  79. package/dist/src/collection-facets.d.ts +78 -78
  80. package/dist/src/collection-facets.js +391 -391
  81. package/dist/src/empty-placeholder.d.ts +11 -11
  82. package/dist/src/empty-placeholder.js +42 -42
  83. package/dist/src/language-code-handler/language-code-handler.d.ts +37 -37
  84. package/dist/src/language-code-handler/language-code-handler.js +26 -26
  85. package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -1
  86. package/dist/src/language-code-handler/language-code-mapping.js +562 -562
  87. package/dist/src/mediatype/mediatype-config.d.ts +3 -3
  88. package/dist/src/mediatype/mediatype-config.js +85 -85
  89. package/dist/src/models.d.ts +114 -112
  90. package/dist/src/models.js +125 -125
  91. package/dist/src/models.js.map +1 -1
  92. package/dist/src/restoration-state-handler.d.ts +45 -45
  93. package/dist/src/restoration-state-handler.js +230 -230
  94. package/dist/src/sort-filter-bar/alpha-bar.d.ts +12 -12
  95. package/dist/src/sort-filter-bar/alpha-bar.js +52 -52
  96. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
  97. package/dist/src/sort-filter-bar/img/compact.js +2 -2
  98. package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
  99. package/dist/src/sort-filter-bar/img/list.js +2 -2
  100. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
  101. package/dist/src/sort-filter-bar/img/sort-triangle.js +2 -2
  102. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
  103. package/dist/src/sort-filter-bar/img/tile.js +2 -2
  104. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +108 -108
  105. package/dist/src/sort-filter-bar/sort-filter-bar.js +428 -428
  106. package/dist/src/styles/item-image-styles.d.ts +8 -8
  107. package/dist/src/styles/item-image-styles.js +22 -12
  108. package/dist/src/styles/item-image-styles.js.map +1 -1
  109. package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -5
  110. package/dist/src/tiles/collection-browser-loading-tile.js +16 -16
  111. package/dist/src/tiles/collection-browser-loading-tile.js.map +1 -1
  112. package/dist/src/tiles/grid/account-tile.d.ts +17 -17
  113. package/dist/src/tiles/grid/account-tile.js +48 -47
  114. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  115. package/dist/src/tiles/grid/collection-tile.d.ts +14 -7
  116. package/dist/src/tiles/grid/collection-tile.js +112 -146
  117. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  118. package/dist/src/tiles/grid/item-tile.d.ts +29 -29
  119. package/dist/src/tiles/grid/item-tile.js +110 -105
  120. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  121. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -1
  122. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +12 -8
  123. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  124. package/dist/src/tiles/grid/tile-stats.d.ts +10 -10
  125. package/dist/src/tiles/grid/tile-stats.js +41 -40
  126. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  127. package/dist/src/tiles/image-block.d.ts +17 -17
  128. package/dist/src/tiles/image-block.js +76 -72
  129. package/dist/src/tiles/image-block.js.map +1 -1
  130. package/dist/src/tiles/item-image.d.ts +35 -35
  131. package/dist/src/tiles/item-image.js +117 -116
  132. package/dist/src/tiles/item-image.js.map +1 -1
  133. package/dist/src/tiles/list/account-label.d.ts +1 -1
  134. package/dist/src/tiles/list/account-label.js +6 -6
  135. package/dist/src/tiles/list/date-label.d.ts +1 -1
  136. package/dist/src/tiles/list/date-label.js +12 -12
  137. package/dist/src/tiles/list/tile-list-compact-header.d.ts +12 -12
  138. package/dist/src/tiles/list/tile-list-compact-header.js +41 -41
  139. package/dist/src/tiles/list/tile-list-compact.d.ts +21 -21
  140. package/dist/src/tiles/list/tile-list-compact.js +93 -93
  141. package/dist/src/tiles/list/tile-list.d.ts +53 -53
  142. package/dist/src/tiles/list/tile-list.js +279 -279
  143. package/dist/src/tiles/mediatype-icon.d.ts +9 -9
  144. package/dist/src/tiles/mediatype-icon.js +47 -47
  145. package/dist/src/tiles/overlay/icon-overlay.d.ts +10 -10
  146. package/dist/src/tiles/overlay/icon-overlay.js +40 -40
  147. package/dist/src/tiles/overlay/icon-text-overlay.d.ts +9 -9
  148. package/dist/src/tiles/overlay/icon-text-overlay.js +38 -38
  149. package/dist/src/tiles/overlay/text-overlay.d.ts +10 -10
  150. package/dist/src/tiles/overlay/text-overlay.js +42 -42
  151. package/dist/src/tiles/text-snippet-block.d.ts +27 -27
  152. package/dist/src/tiles/text-snippet-block.js +73 -73
  153. package/dist/src/tiles/tile-dispatcher.d.ts +36 -36
  154. package/dist/src/tiles/tile-dispatcher.js +145 -128
  155. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  156. package/dist/src/utils/analytics-events.d.ts +22 -22
  157. package/dist/src/utils/analytics-events.js +24 -24
  158. package/dist/src/utils/format-count.d.ts +7 -7
  159. package/dist/src/utils/format-count.js +76 -76
  160. package/dist/src/utils/format-date.d.ts +2 -2
  161. package/dist/src/utils/format-date.js +23 -23
  162. package/dist/src/utils/format-unit-size.d.ts +2 -0
  163. package/dist/src/utils/format-unit-size.js +34 -0
  164. package/dist/src/utils/format-unit-size.js.map +1 -0
  165. package/dist/test/collection-browser.test.d.ts +1 -1
  166. package/dist/test/collection-browser.test.js +646 -646
  167. package/dist/test/collection-facets/facets-template.test.d.ts +1 -1
  168. package/dist/test/collection-facets/facets-template.test.js +62 -62
  169. package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -1
  170. package/dist/test/collection-facets/more-facets-content.test.js +114 -114
  171. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -1
  172. package/dist/test/collection-facets/more-facets-pagination.test.js +117 -117
  173. package/dist/test/collection-facets.test.d.ts +2 -2
  174. package/dist/test/collection-facets.test.js +544 -544
  175. package/dist/test/empty-placeholder.test.d.ts +1 -1
  176. package/dist/test/empty-placeholder.test.js +33 -33
  177. package/dist/test/icon-overlay.test.d.ts +1 -1
  178. package/dist/test/icon-overlay.test.js +24 -24
  179. package/dist/test/image-block.test.d.ts +1 -1
  180. package/dist/test/image-block.test.js +48 -48
  181. package/dist/test/item-image.test.d.ts +1 -1
  182. package/dist/test/item-image.test.js +84 -80
  183. package/dist/test/item-image.test.js.map +1 -1
  184. package/dist/test/mediatype-config.test.d.ts +1 -1
  185. package/dist/test/mediatype-config.test.js +16 -16
  186. package/dist/test/mocks/mock-analytics-handler.d.ts +10 -10
  187. package/dist/test/mocks/mock-analytics-handler.js +15 -15
  188. package/dist/test/mocks/mock-collection-name-cache.d.ts +7 -7
  189. package/dist/test/mocks/mock-collection-name-cache.js +13 -13
  190. package/dist/test/mocks/mock-search-responses.d.ts +12 -12
  191. package/dist/test/mocks/mock-search-responses.js +341 -341
  192. package/dist/test/mocks/mock-search-service.d.ts +13 -13
  193. package/dist/test/mocks/mock-search-service.js +40 -40
  194. package/dist/test/restoration-state-handler.test.d.ts +1 -1
  195. package/dist/test/restoration-state-handler.test.js +125 -125
  196. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -1
  197. package/dist/test/sort-filter-bar/alpha-bar.test.js +43 -43
  198. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -1
  199. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +141 -141
  200. package/dist/test/text-overlay.test.d.ts +1 -1
  201. package/dist/test/text-overlay.test.js +48 -48
  202. package/dist/test/text-snippet-block.test.d.ts +1 -1
  203. package/dist/test/text-snippet-block.test.js +57 -57
  204. package/dist/test/tile-stats.test.d.ts +1 -1
  205. package/dist/test/tile-stats.test.js +33 -33
  206. package/dist/test/tiles/grid/account-tile.test.d.ts +1 -1
  207. package/dist/test/tiles/grid/account-tile.test.js +60 -60
  208. package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -0
  209. package/dist/test/tiles/grid/collection-tile.test.js +73 -0
  210. package/dist/test/tiles/grid/collection-tile.test.js.map +1 -0
  211. package/dist/test/tiles/grid/item-tile.test.d.ts +1 -1
  212. package/dist/test/tiles/grid/item-tile.test.js +142 -129
  213. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  214. package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -1
  215. package/dist/test/tiles/list/tile-list-compact.test.js +92 -92
  216. package/dist/test/tiles/list/tile-list.test.d.ts +1 -1
  217. package/dist/test/tiles/list/tile-list.test.js +123 -123
  218. package/dist/test/utils/format-count.test.d.ts +1 -1
  219. package/dist/test/utils/format-count.test.js +23 -23
  220. package/dist/test/utils/format-date.test.d.ts +1 -1
  221. package/dist/test/utils/format-date.test.js +17 -17
  222. package/dist/test/utils/format-unit-size.test.d.ts +1 -0
  223. package/dist/test/utils/format-unit-size.test.js +18 -0
  224. package/dist/test/utils/format-unit-size.test.js.map +1 -0
  225. package/index.html +24 -24
  226. package/local.archive.org.cert +86 -86
  227. package/local.archive.org.key +27 -27
  228. package/package.json +2 -2
  229. package/renovate.json +6 -6
  230. package/src/app-root.ts +214 -169
  231. package/src/collection-browser.ts +122 -3
  232. package/src/models.ts +2 -0
  233. package/src/styles/item-image-styles.ts +13 -3
  234. package/src/tiles/collection-browser-loading-tile.ts +1 -1
  235. package/src/tiles/grid/account-tile.ts +4 -2
  236. package/src/tiles/grid/collection-tile.ts +106 -136
  237. package/src/tiles/grid/item-tile.ts +8 -2
  238. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +6 -2
  239. package/src/tiles/grid/tile-stats.ts +1 -0
  240. package/src/tiles/image-block.ts +5 -2
  241. package/src/tiles/item-image.ts +4 -3
  242. package/src/tiles/tile-dispatcher.ts +17 -0
  243. package/src/utils/format-unit-size.ts +43 -0
  244. package/test/item-image.test.ts +4 -0
  245. package/test/tiles/grid/collection-tile.test.ts +85 -0
  246. package/test/tiles/grid/item-tile.test.ts +30 -4
  247. package/test/utils/format-unit-size.test.ts +21 -0
  248. package/tsconfig.json +21 -21
  249. package/web-dev-server.config.mjs +30 -30
  250. package/web-test-runner.config.mjs +41 -41
@@ -1,257 +1,265 @@
1
- import { __decorate } from "tslib";
2
- /* eslint-disable no-console */
3
- import { AnalyticsManager, } from '@internetarchive/analytics-manager';
4
- import { SearchService, SearchType, StringField, } from '@internetarchive/search-service';
5
- import { LocalCache } from '@internetarchive/local-cache';
6
- import { html, css, LitElement } from 'lit';
7
- import { customElement, property, query, state } from 'lit/decorators.js';
8
- import { SharedResizeObserver } from '@internetarchive/shared-resize-observer';
9
- import { CollectionNameCache } from '@internetarchive/collection-name-cache';
10
- import '../src/collection-browser';
11
- let AppRoot = class AppRoot extends LitElement {
12
- constructor() {
13
- super(...arguments);
14
- this.searchService = this.initSearchServiceFromUrlParams();
15
- this.resizeObserver = new SharedResizeObserver();
16
- this.localCache = new LocalCache();
17
- this.collectionNameCache = new CollectionNameCache({
18
- searchService: this.searchService,
19
- localCache: this.localCache,
20
- });
21
- this.cellWidth = 18;
22
- this.cellHeight = 29;
23
- this.rowGap = 1.7;
24
- this.colGap = 1.7;
25
- this.loggedIn = false;
26
- this.searchType = SearchType.METADATA;
27
- this.analyticsManager = new AnalyticsManager();
28
- this.analyticsHandler = {
29
- sendPing: this.sendAnalytics.bind(this),
30
- sendEvent: this.sendAnalytics.bind(this),
31
- sendEventNoSampling: this.sendAnalytics.bind(this),
32
- };
33
- }
34
- sendAnalytics(ae) {
35
- var _a;
36
- console.log('Analytics Received ----', ae);
37
- this.latestAction = ae;
38
- (_a = this.analyticsManager) === null || _a === void 0 ? void 0 : _a.sendEvent(ae);
39
- }
40
- initSearchServiceFromUrlParams() {
41
- var _a, _b, _c;
42
- const params = new URL(window.location.href).searchParams;
43
- return new SearchService({
44
- includeCredentials: false,
45
- baseUrl: (_a = params.get('search_base_url')) !== null && _a !== void 0 ? _a : undefined,
46
- servicePath: (_b = params.get('search_service_path')) !== null && _b !== void 0 ? _b : undefined,
47
- debuggingEnabled: (_c = !!params.get('debugging')) !== null && _c !== void 0 ? _c : undefined,
48
- });
49
- }
50
- searchPressed(e) {
51
- var _a, _b;
52
- e.preventDefault();
53
- this.searchQuery = this.baseQueryField.value;
54
- if (((_a = this.currentPage) !== null && _a !== void 0 ? _a : 1) > 1) {
55
- this.collectionBrowser.goToPage((_b = this.currentPage) !== null && _b !== void 0 ? _b : 1);
56
- }
57
- }
58
- changePagePressed(e) {
59
- e.preventDefault();
60
- this.currentPage = this.pageNumberInput.valueAsNumber;
61
- this.collectionBrowser.goToPage(this.currentPage);
62
- }
63
- updated(changed) {
64
- if (changed.has('currentPage') && this.currentPage) {
65
- this.pageNumberInput.value = this.currentPage.toString();
66
- }
67
- if (changed.has('searchQuery')) {
68
- this.queryUpdated();
69
- }
70
- }
71
- queryUpdated() {
72
- this.collectionBrowser.baseQuery = this.searchQuery;
73
- }
74
- render() {
75
- var _a;
1
+ import { __decorate } from "tslib";
2
+ /* eslint-disable no-console */
3
+ import { AnalyticsManager, } from '@internetarchive/analytics-manager';
4
+ import { SearchService, SearchType, StringField, } from '@internetarchive/search-service';
5
+ import { LocalCache } from '@internetarchive/local-cache';
6
+ import { html, css, LitElement } from 'lit';
7
+ import { customElement, property, query, state } from 'lit/decorators.js';
8
+ import { SharedResizeObserver } from '@internetarchive/shared-resize-observer';
9
+ import { CollectionNameCache } from '@internetarchive/collection-name-cache';
10
+ import '../src/collection-browser';
11
+ let AppRoot = class AppRoot extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.searchService = this.initSearchServiceFromUrlParams();
15
+ this.resizeObserver = new SharedResizeObserver();
16
+ this.localCache = new LocalCache();
17
+ this.collectionNameCache = new CollectionNameCache({
18
+ searchService: this.searchService,
19
+ localCache: this.localCache,
20
+ });
21
+ this.cellWidth = 18;
22
+ this.cellHeight = 29;
23
+ this.rowGap = 1.7;
24
+ this.colGap = 1.7;
25
+ this.loggedIn = false;
26
+ this.searchType = SearchType.METADATA;
27
+ this.analyticsManager = new AnalyticsManager();
28
+ this.analyticsHandler = {
29
+ sendPing: this.sendAnalytics.bind(this),
30
+ sendEvent: this.sendAnalytics.bind(this),
31
+ sendEventNoSampling: this.sendAnalytics.bind(this),
32
+ };
33
+ }
34
+ sendAnalytics(ae) {
35
+ var _a;
36
+ console.log('Analytics Received ----', ae);
37
+ this.latestAction = ae;
38
+ (_a = this.analyticsManager) === null || _a === void 0 ? void 0 : _a.sendEvent(ae);
39
+ }
40
+ initSearchServiceFromUrlParams() {
41
+ var _a, _b, _c;
42
+ const params = new URL(window.location.href).searchParams;
43
+ return new SearchService({
44
+ includeCredentials: false,
45
+ baseUrl: (_a = params.get('search_base_url')) !== null && _a !== void 0 ? _a : undefined,
46
+ servicePath: (_b = params.get('search_service_path')) !== null && _b !== void 0 ? _b : undefined,
47
+ debuggingEnabled: (_c = !!params.get('debugging')) !== null && _c !== void 0 ? _c : undefined,
48
+ });
49
+ }
50
+ searchPressed(e) {
51
+ var _a, _b;
52
+ e.preventDefault();
53
+ this.searchQuery = this.baseQueryField.value;
54
+ if (((_a = this.currentPage) !== null && _a !== void 0 ? _a : 1) > 1) {
55
+ this.collectionBrowser.goToPage((_b = this.currentPage) !== null && _b !== void 0 ? _b : 1);
56
+ }
57
+ }
58
+ changePagePressed(e) {
59
+ e.preventDefault();
60
+ this.currentPage = this.pageNumberInput.valueAsNumber;
61
+ this.collectionBrowser.goToPage(this.currentPage);
62
+ }
63
+ updated(changed) {
64
+ if (changed.has('currentPage') && this.currentPage) {
65
+ this.pageNumberInput.value = this.currentPage.toString();
66
+ }
67
+ if (changed.has('searchQuery')) {
68
+ this.queryUpdated();
69
+ }
70
+ }
71
+ queryUpdated() {
72
+ this.collectionBrowser.baseQuery = this.searchQuery;
73
+ }
74
+ get getClass() {
75
+ const searchParams = new URLSearchParams(window.location.search);
76
+ return searchParams.get('hide-dev-tools') ? 'hidden' : '';
77
+ }
78
+ render() {
79
+ var _a;
76
80
  return html `
77
- <div id="dev-tools">
78
- <div id="search-and-page-inputs">
79
- <form @submit=${this.searchPressed}>
80
- Query:
81
- <input
82
- type="text"
83
- id="base-query-field"
84
- .value=${(_a = this.searchQuery) !== null && _a !== void 0 ? _a : ''}
85
- />
86
- <input type="submit" value="Search" />
87
- </form>
88
- <form @submit=${this.changePagePressed}>
89
- Page: <input type="number" value="1" id="page-number-input" />
90
- <input type="submit" value="Go" />
91
- </form>
92
- </div>
81
+ <div class="dev-tool-container">
82
+ <div id="dev-tools" class=${this.getClass}>
83
+ <div id="search-and-page-inputs">
84
+ <form @submit=${this.searchPressed}>
85
+ Query:
86
+ <input
87
+ type="text"
88
+ id="base-query-field"
89
+ .value=${(_a = this.searchQuery) !== null && _a !== void 0 ? _a : ''}
90
+ />
91
+ <input type="submit" value="Search" />
92
+ </form>
93
+ <form @submit=${this.changePagePressed}>
94
+ Page: <input type="number" value="1" id="page-number-input" />
95
+ <input type="submit" value="Go" />
96
+ </form>
97
+ </div>
93
98
 
94
- <div id="search-types">
95
- Search type:
96
- <span class="search-type">
97
- <input
98
- type="radio"
99
- id="metadata-search"
100
- name="search-type"
101
- value="metadata"
102
- ?checked=${this.searchType === SearchType.METADATA}
103
- @click=${this.searchTypeSelected}
104
- />
105
- <label for="metadata-search">Metadata</label>
106
- </span>
107
- <span class="search-type">
108
- <input
109
- type="radio"
110
- id="fulltext-search"
111
- name="search-type"
112
- value="fulltext"
113
- ?checked=${this.searchType === SearchType.FULLTEXT}
114
- @click=${this.searchTypeSelected}
115
- />
116
- <label for="fulltext-search">Full text</label>
117
- </span>
118
- </div>
99
+ <div id="search-types">
100
+ Search type:
101
+ <span class="search-type">
102
+ <input
103
+ type="radio"
104
+ id="metadata-search"
105
+ name="search-type"
106
+ value="metadata"
107
+ ?checked=${this.searchType === SearchType.METADATA}
108
+ @click=${this.searchTypeSelected}
109
+ />
110
+ <label for="metadata-search">Metadata</label>
111
+ </span>
112
+ <span class="search-type">
113
+ <input
114
+ type="radio"
115
+ id="fulltext-search"
116
+ name="search-type"
117
+ value="fulltext"
118
+ ?checked=${this.searchType === SearchType.FULLTEXT}
119
+ @click=${this.searchTypeSelected}
120
+ />
121
+ <label for="fulltext-search">Full text</label>
122
+ </span>
123
+ </div>
119
124
 
120
- <div id="toggle-controls">
121
- <button
122
- @click=${() => {
123
- var _a, _b;
124
- const cellControls = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('cell-controls');
125
- cellControls === null || cellControls === void 0 ? void 0 : cellControls.classList.toggle('hidden');
126
- const checkboxControls = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.getElementById('checkbox-controls');
127
- checkboxControls === null || checkboxControls === void 0 ? void 0 : checkboxControls.classList.toggle('hidden');
125
+ <div id="toggle-controls">
126
+ <button
127
+ @click=${() => {
128
+ var _a, _b;
129
+ const details = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('cell-size-control');
130
+ details === null || details === void 0 ? void 0 : details.classList.toggle('hidden');
131
+ const rowGapControls = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.getElementById('cell-gap-control');
132
+ rowGapControls === null || rowGapControls === void 0 ? void 0 : rowGapControls.classList.toggle('hidden');
128
133
  }}
129
- >
130
- Toggle Controls
131
- </button>
132
- <button
133
- @click=${() => {
134
- var _a;
135
- const details = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('latest-event-details');
136
- details === null || details === void 0 ? void 0 : details.classList.toggle('hidden');
134
+ >
135
+ Toggle Cell Controls
136
+ </button>
137
+ <button
138
+ @click=${() => {
139
+ var _a;
140
+ const details = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('latest-event-details');
141
+ details === null || details === void 0 ? void 0 : details.classList.toggle('hidden');
137
142
  }}
138
- >
139
- Last Event Captured
140
- </button>
141
- </div>
143
+ >
144
+ Last Event Captured
145
+ </button>
146
+ </div>
142
147
 
143
- <div id="last-event">
144
- <pre id="latest-event-details" class="hidden">
145
- ${JSON.stringify(this.latestAction, null, 2)}
146
- </pre
147
- >
148
- </div>
148
+ <div id="last-event">
149
+ <pre id="latest-event-details" class="hidden">
150
+ ${JSON.stringify(this.latestAction, null, 2)}
151
+ </pre
152
+ >
153
+ </div>
149
154
 
150
- <div id="cell-controls">
151
- <div id="cell-size-control">
152
- <div>
153
- <label for="cell-width-slider">Min cell width:</label>
155
+ <div id="cell-controls" class="hidden">
156
+ <div id="cell-size-control">
157
+ <div>
158
+ <label for="cell-width-slider">Min cell width:</label>
159
+ <input
160
+ type="range"
161
+ min="10"
162
+ max="100"
163
+ value="18"
164
+ step="0.1"
165
+ id="cell-width-slider"
166
+ @input=${this.widthChanged}
167
+ />
168
+ <span>${this.cellWidth}rem</span>
169
+ </div>
170
+ <div>
171
+ <label for="cell-height-slider">Cell height:</label>
172
+ <input
173
+ type="range"
174
+ min="10"
175
+ max="100"
176
+ value="29"
177
+ step="0.1"
178
+ id="cell-height-slider"
179
+ @input=${this.heightChanged}
180
+ />
181
+ <span>${this.cellHeight}rem</span>
182
+ </div>
183
+ </div>
184
+ <div id="cell-gap-control">
185
+ <div>
186
+ <label for="cell-row-gap-slider">Row gap:</label>
187
+ <input
188
+ type="range"
189
+ min="0"
190
+ max="5"
191
+ value="1.7"
192
+ step="0.1"
193
+ id="cell-row-gap-slider"
194
+ @input=${this.rowGapChanged}
195
+ />
196
+ <span>${this.rowGap}rem</span>
197
+ </div>
198
+ <div>
199
+ <label for="cell-col-gap-slider">Col gap:</label>
200
+ <input
201
+ type="range"
202
+ min="0"
203
+ max="5"
204
+ value="1.7"
205
+ step="0.1"
206
+ id="cell-col-gap-slider"
207
+ @input=${this.colGapChanged}
208
+ />
209
+ <span>${this.colGap}rem</span>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ <div id="checkbox-controls">
214
+ <div class="checkbox-control">
154
215
  <input
155
- type="range"
156
- min="10"
157
- max="100"
158
- value="18"
159
- step="0.1"
160
- id="cell-width-slider"
161
- @input=${this.widthChanged}
216
+ type="checkbox"
217
+ id="show-outline-check"
218
+ @click=${this.outlineChanged}
162
219
  />
163
- <span>${this.cellWidth}rem</span>
220
+ <label for="show-outline-check">Show cell outlines</label>
164
221
  </div>
165
- <div>
166
- <label for="cell-height-slider">Cell height:</label>
222
+ <div class="checkbox-control">
167
223
  <input
168
- type="range"
169
- min="10"
170
- max="100"
171
- value="29"
172
- step="0.1"
173
- id="cell-height-slider"
174
- @input=${this.heightChanged}
224
+ type="checkbox"
225
+ id="show-facet-group-outline-check"
226
+ @click=${this.toggleFacetGroupOutline}
175
227
  />
176
- <span>${this.cellHeight}rem</span>
228
+ <label for="show-facet-group-outline-check">
229
+ Show facet group outlines
230
+ </label>
177
231
  </div>
178
- </div>
179
- <div id="cell-gap-control">
180
- <div>
181
- <label for="cell-row-gap-slider">Row gap:</label>
232
+ <div class="checkbox-control">
182
233
  <input
183
- type="range"
184
- min="0"
185
- max="5"
186
- value="1.7"
187
- step="0.1"
188
- id="cell-row-gap-slider"
189
- @input=${this.rowGapChanged}
234
+ type="checkbox"
235
+ id="simulate-login"
236
+ @click=${this.loginChanged}
190
237
  />
191
- <span>${this.rowGap}rem</span>
238
+ <label for="simulate-login">Simulate login</label>
192
239
  </div>
193
- <div>
194
- <label for="cell-col-gap-slider">Col gap:</label>
240
+ <div class="checkbox-control">
195
241
  <input
196
- type="range"
197
- min="0"
198
- max="5"
199
- value="1.7"
200
- step="0.1"
201
- id="cell-col-gap-slider"
202
- @input=${this.colGapChanged}
242
+ type="checkbox"
243
+ id="show-dummy-snippets"
244
+ @click=${this.snippetsChanged}
203
245
  />
204
- <span>${this.colGap}rem</span>
246
+ <label for="show-dummy-snippets">Show dummy snippets</label>
247
+ </div>
248
+ <div class="checkbox-control">
249
+ <input
250
+ type="checkbox"
251
+ id="enable-date-picker"
252
+ checked
253
+ @click=${this.datePickerChanged}
254
+ />
255
+ <label for="enable-date-picker">Enable date picker</label>
205
256
  </div>
206
257
  </div>
207
258
  </div>
208
- <div id="checkbox-controls">
209
- <div class="checkbox-control">
210
- <input
211
- type="checkbox"
212
- id="show-outline-check"
213
- @click=${this.outlineChanged}
214
- />
215
- <label for="show-outline-check">Show cell outlines</label>
216
- </div>
217
- <div class="checkbox-control">
218
- <input
219
- type="checkbox"
220
- id="show-facet-group-outline-check"
221
- @click=${this.toggleFacetGroupOutline}
222
- />
223
- <label for="show-facet-group-outline-check">
224
- Show facet group outlines
225
- </label>
226
- </div>
227
- <div class="checkbox-control">
228
- <input
229
- type="checkbox"
230
- id="simulate-login"
231
- @click=${this.loginChanged}
232
- />
233
- <label for="simulate-login">Simulate login</label>
234
- </div>
235
- <div class="checkbox-control">
236
- <input
237
- type="checkbox"
238
- id="show-dummy-snippets"
239
- @click=${this.snippetsChanged}
240
- />
241
- <label for="show-dummy-snippets">Show dummy snippets</label>
242
- </div>
243
- <div class="checkbox-control">
244
- <input
245
- type="checkbox"
246
- id="enable-date-picker"
247
- checked
248
- @click=${this.datePickerChanged}
249
- />
250
- <label for="enable-date-picker">Enable date picker</label>
251
- </div>
252
- </div>
259
+ <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
260
+ Toggle Search Controls
261
+ </button>
253
262
  </div>
254
-
255
263
  <div id="collection-browser-container">
256
264
  <collection-browser
257
265
  .baseNavigationUrl=${'https://archive.org'}
@@ -271,135 +279,151 @@ let AppRoot = class AppRoot extends LitElement {
271
279
  </collection-browser>
272
280
  </div>
273
281
  <modal-manager></modal-manager>
274
- `;
275
- }
276
- baseQueryChanged(e) {
277
- this.searchQuery = e.detail.baseQuery;
278
- this.collectionBrowser.clearFilters();
279
- }
280
- /** Handler for search type changes coming from collection browser */
281
- searchTypeChanged(e) {
282
- this.searchType = e.detail;
283
- }
284
- /** Handler for user input selecting a search type */
285
- searchTypeSelected(e) {
286
- const target = e.target;
287
- this.searchType =
288
- target.value === 'fulltext' ? SearchType.FULLTEXT : SearchType.METADATA;
289
- // Re-perform the current search with the new search target
290
- this.reperformCurrentSearch();
291
- }
292
- loginChanged(e) {
293
- const target = e.target;
294
- if (target.checked) {
295
- this.loggedIn = true;
296
- }
297
- else {
298
- this.loggedIn = false;
299
- }
300
- }
301
- outlineChanged(e) {
302
- const target = e.target;
303
- if (target.checked) {
304
- this.collectionBrowser.style.setProperty('--infiniteScrollerCellOutline', '1px solid #33D1FF');
305
- }
306
- else {
307
- this.collectionBrowser.style.removeProperty('--infiniteScrollerCellOutline');
308
- }
309
- }
310
- toggleFacetGroupOutline(e) {
311
- const target = e.target;
312
- if (target.checked) {
313
- this.collectionBrowser.classList.add('showFacetGroupOutlines');
314
- this.modalManager.classList.add('showFacetGroupOutlines');
315
- }
316
- else {
317
- this.collectionBrowser.classList.remove('showFacetGroupOutlines');
318
- this.modalManager.classList.remove('showFacetGroupOutlines');
319
- }
320
- }
321
- async snippetsChanged(e) {
322
- const target = e.target;
323
- if (target.checked) {
324
- // Decorate the default search service with a wrapper that adds
325
- // dummy snippets to any successful searches
326
- this.searchService = {
327
- async search(params, searchType) {
328
- var _a;
329
- const searchResponse = await SearchService.default.search(params, searchType);
330
- (_a = searchResponse.success) === null || _a === void 0 ? void 0 : _a.response.results.forEach(result => {
331
- Object.defineProperty(result, 'highlight', {
332
- value: new StringField([
333
- 'this is a text {{{snippet}}} block with potentially',
334
- 'multiple {{{snippets}}} and such',
335
- 'but the {{{snippet}}} block may be quite long perhaps',
336
- 'depending on how many {{{snippet}}} matches there are',
337
- 'there may be multiple lines of {{{snippets}}} to show',
338
- 'but each {{{snippet}}} should be relatively short',
339
- 'and {{{snippets}}} are each a {{{snippet}}} of text',
340
- 'but every {{{snippet}}} might have multiple matches',
341
- 'the {{{snippets}}} should be separated and surrounded by ellipses',
342
- ]),
343
- });
344
- });
345
- return searchResponse;
346
- },
347
- };
348
- }
349
- else {
350
- // Restore the default seach service
351
- this.searchService = SearchService.default;
352
- }
353
- // Re-perform the current search to show/hide the snippets immediately
354
- this.reperformCurrentSearch();
355
- }
356
- async reperformCurrentSearch() {
357
- const oldQuery = this.searchQuery;
358
- this.searchQuery = ''; // Should just reset to the placeholder
359
- await this.updateComplete;
360
- // For unclear reasons, Safari refuses to re-apply the old query until the next tick, hence:
361
- await new Promise(res => {
362
- setTimeout(res, 0);
363
- });
364
- this.searchQuery = oldQuery; // Re-apply the original query
365
- }
366
- datePickerChanged(e) {
367
- const target = e.target;
368
- this.collectionBrowser.showHistogramDatePicker = target.checked;
369
- // When disabling the date picker from the demo app, also clear any existing date range params
370
- if (!this.collectionBrowser.showHistogramDatePicker) {
371
- this.collectionBrowser.minSelectedDate = undefined;
372
- this.collectionBrowser.maxSelectedDate = undefined;
373
- }
374
- }
375
- rowGapChanged(e) {
376
- const input = e.target;
377
- this.rowGap = parseFloat(input.value);
378
- this.collectionBrowser.style.setProperty('--collectionBrowserRowGap', `${input.value}rem`);
379
- }
380
- colGapChanged(e) {
381
- const input = e.target;
382
- this.colGap = parseFloat(input.value);
383
- this.collectionBrowser.style.setProperty('--collectionBrowserColGap', `${input.value}rem`);
384
- }
385
- widthChanged(e) {
386
- const input = e.target;
387
- this.cellWidth = parseFloat(input.value);
388
- this.collectionBrowser.style.setProperty('--collectionBrowserCellMinWidth', `${input.value}rem`);
389
- }
390
- heightChanged(e) {
391
- const input = e.target;
392
- this.cellHeight = parseFloat(input.value);
393
- this.collectionBrowser.style.setProperty('--collectionBrowserCellMinHeight', `${input.value}rem`);
394
- this.collectionBrowser.style.setProperty('--collectionBrowserCellMaxHeight', `${input.value}rem`);
395
- }
396
- visiblePageChanged(e) {
397
- const { pageNumber } = e.detail;
398
- if (pageNumber === this.currentPage)
399
- return;
400
- this.currentPage = pageNumber;
401
- }
402
- };
282
+ `;
283
+ }
284
+ baseQueryChanged(e) {
285
+ this.searchQuery = e.detail.baseQuery;
286
+ }
287
+ /** Handler for search type changes coming from collection browser */
288
+ searchTypeChanged(e) {
289
+ this.searchType = e.detail;
290
+ }
291
+ /** Handler for user input selecting a search type */
292
+ searchTypeSelected(e) {
293
+ const target = e.target;
294
+ this.searchType =
295
+ target.value === 'fulltext' ? SearchType.FULLTEXT : SearchType.METADATA;
296
+ // Re-perform the current search with the new search target
297
+ this.reperformCurrentSearch();
298
+ }
299
+ loginChanged(e) {
300
+ const target = e.target;
301
+ if (target.checked) {
302
+ this.loggedIn = true;
303
+ }
304
+ else {
305
+ this.loggedIn = false;
306
+ }
307
+ }
308
+ outlineChanged(e) {
309
+ const target = e.target;
310
+ if (target.checked) {
311
+ this.collectionBrowser.style.setProperty('--infiniteScrollerCellOutline', '1px solid #33D1FF');
312
+ }
313
+ else {
314
+ this.collectionBrowser.style.removeProperty('--infiniteScrollerCellOutline');
315
+ }
316
+ }
317
+ toggleDevTools() {
318
+ var _a, _b;
319
+ const pageUrl = new URL(window.location.href);
320
+ const { searchParams } = pageUrl;
321
+ if (searchParams.get('hide-dev-tools')) {
322
+ searchParams.delete('hide-dev-tools');
323
+ }
324
+ else {
325
+ searchParams.set('hide-dev-tools', 'true');
326
+ }
327
+ (_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('dev-tools')) === null || _b === void 0 ? void 0 : _b.classList.toggle('hidden');
328
+ if (window.history.replaceState) {
329
+ window.history.replaceState({
330
+ path: pageUrl.toString(),
331
+ }, '', pageUrl.toString());
332
+ }
333
+ }
334
+ toggleFacetGroupOutline(e) {
335
+ const target = e.target;
336
+ if (target.checked) {
337
+ this.collectionBrowser.classList.add('showFacetGroupOutlines');
338
+ this.modalManager.classList.add('showFacetGroupOutlines');
339
+ }
340
+ else {
341
+ this.collectionBrowser.classList.remove('showFacetGroupOutlines');
342
+ this.modalManager.classList.remove('showFacetGroupOutlines');
343
+ }
344
+ }
345
+ async snippetsChanged(e) {
346
+ const target = e.target;
347
+ if (target.checked) {
348
+ // Decorate the default search service with a wrapper that adds
349
+ // dummy snippets to any successful searches
350
+ this.searchService = {
351
+ async search(params, searchType) {
352
+ var _a;
353
+ const searchResponse = await SearchService.default.search(params, searchType);
354
+ (_a = searchResponse.success) === null || _a === void 0 ? void 0 : _a.response.results.forEach(result => {
355
+ Object.defineProperty(result, 'highlight', {
356
+ value: new StringField([
357
+ 'this is a text {{{snippet}}} block with potentially',
358
+ 'multiple {{{snippets}}} and such',
359
+ 'but the {{{snippet}}} block may be quite long perhaps',
360
+ 'depending on how many {{{snippet}}} matches there are',
361
+ 'there may be multiple lines of {{{snippets}}} to show',
362
+ 'but each {{{snippet}}} should be relatively short',
363
+ 'and {{{snippets}}} are each a {{{snippet}}} of text',
364
+ 'but every {{{snippet}}} might have multiple matches',
365
+ 'the {{{snippets}}} should be separated and surrounded by ellipses',
366
+ ]),
367
+ });
368
+ });
369
+ return searchResponse;
370
+ },
371
+ };
372
+ }
373
+ else {
374
+ // Restore the default seach service
375
+ this.searchService = SearchService.default;
376
+ }
377
+ // Re-perform the current search to show/hide the snippets immediately
378
+ this.reperformCurrentSearch();
379
+ }
380
+ async reperformCurrentSearch() {
381
+ const oldQuery = this.searchQuery;
382
+ this.searchQuery = ''; // Should just reset to the placeholder
383
+ await this.updateComplete;
384
+ // For unclear reasons, Safari refuses to re-apply the old query until the next tick, hence:
385
+ await new Promise(res => {
386
+ setTimeout(res, 0);
387
+ });
388
+ this.searchQuery = oldQuery; // Re-apply the original query
389
+ }
390
+ datePickerChanged(e) {
391
+ const target = e.target;
392
+ this.collectionBrowser.showHistogramDatePicker = target.checked;
393
+ // When disabling the date picker from the demo app, also clear any existing date range params
394
+ if (!this.collectionBrowser.showHistogramDatePicker) {
395
+ this.collectionBrowser.minSelectedDate = undefined;
396
+ this.collectionBrowser.maxSelectedDate = undefined;
397
+ }
398
+ }
399
+ rowGapChanged(e) {
400
+ const input = e.target;
401
+ this.rowGap = parseFloat(input.value);
402
+ this.collectionBrowser.style.setProperty('--collectionBrowserRowGap', `${input.value}rem`);
403
+ }
404
+ colGapChanged(e) {
405
+ const input = e.target;
406
+ this.colGap = parseFloat(input.value);
407
+ this.collectionBrowser.style.setProperty('--collectionBrowserColGap', `${input.value}rem`);
408
+ }
409
+ widthChanged(e) {
410
+ const input = e.target;
411
+ this.cellWidth = parseFloat(input.value);
412
+ this.collectionBrowser.style.setProperty('--collectionBrowserCellMinWidth', `${input.value}rem`);
413
+ }
414
+ heightChanged(e) {
415
+ const input = e.target;
416
+ this.cellHeight = parseFloat(input.value);
417
+ this.collectionBrowser.style.setProperty('--collectionBrowserCellMinHeight', `${input.value}rem`);
418
+ this.collectionBrowser.style.setProperty('--collectionBrowserCellMaxHeight', `${input.value}rem`);
419
+ }
420
+ visiblePageChanged(e) {
421
+ const { pageNumber } = e.detail;
422
+ if (pageNumber === this.currentPage)
423
+ return;
424
+ this.currentPage = pageNumber;
425
+ }
426
+ };
403
427
  AppRoot.styles = css `
404
428
  :host {
405
429
  display: block;
@@ -434,10 +458,6 @@ AppRoot.styles = css `
434
458
  font-size: 1.6rem;
435
459
  }
436
460
 
437
- collection-browser {
438
- margin-top: 20rem;
439
- }
440
-
441
461
  modal-manager.showFacetGroupOutlines,
442
462
  collection-browser.showFacetGroupOutlines {
443
463
  --facet-row-border-top: 1px solid red;
@@ -448,8 +468,11 @@ AppRoot.styles = css `
448
468
  width: 300px;
449
469
  }
450
470
 
471
+ .dev-tool-container {
472
+ position: relative;
473
+ }
451
474
  #dev-tools {
452
- position: fixed;
475
+ position: relative;
453
476
  top: 0;
454
477
  left: 0;
455
478
  z-index: 1;
@@ -458,12 +481,27 @@ AppRoot.styles = css `
458
481
  padding: 0.5rem 1rem;
459
482
  border: 1px solid black;
460
483
  font-size: 1.4rem;
484
+ width: 75%;
485
+ background: #ffffffb3;
461
486
  }
462
487
 
463
488
  #dev-tools > * {
464
489
  display: flex;
465
490
  }
466
491
 
492
+ #toggle-dev-tools-btn {
493
+ position: fixed;
494
+ left: 77.4%;
495
+ top: 0;
496
+ background: red;
497
+ padding: 5px;
498
+ color: white;
499
+ font-size: 1.4rem;
500
+ margin: 0;
501
+ z-index: 1;
502
+ cursor: pointer;
503
+ }
504
+
467
505
  #search-and-page-inputs > form {
468
506
  margin-right: 1rem;
469
507
  }
@@ -508,8 +546,7 @@ AppRoot.styles = css `
508
546
  }
509
547
 
510
548
  .hidden {
511
- /* If this class is present, we want the element hidden regardless of specificity */
512
- display: none !important;
549
+ display: none;
513
550
  }
514
551
 
515
552
  #toggle-controls {
@@ -523,48 +560,48 @@ AppRoot.styles = css `
523
560
  background-color: aliceblue;
524
561
  font-size: 1.6rem;
525
562
  }
526
- `;
527
- __decorate([
528
- state()
529
- ], AppRoot.prototype, "currentPage", void 0);
530
- __decorate([
531
- state()
532
- ], AppRoot.prototype, "searchQuery", void 0);
533
- __decorate([
534
- state()
535
- ], AppRoot.prototype, "cellWidth", void 0);
536
- __decorate([
537
- state()
538
- ], AppRoot.prototype, "cellHeight", void 0);
539
- __decorate([
540
- state()
541
- ], AppRoot.prototype, "rowGap", void 0);
542
- __decorate([
543
- state()
544
- ], AppRoot.prototype, "colGap", void 0);
545
- __decorate([
546
- state()
547
- ], AppRoot.prototype, "loggedIn", void 0);
548
- __decorate([
549
- state()
550
- ], AppRoot.prototype, "searchType", void 0);
551
- __decorate([
552
- property({ type: Object, reflect: false })
553
- ], AppRoot.prototype, "latestAction", void 0);
554
- __decorate([
555
- query('#base-query-field')
556
- ], AppRoot.prototype, "baseQueryField", void 0);
557
- __decorate([
558
- query('#page-number-input')
559
- ], AppRoot.prototype, "pageNumberInput", void 0);
560
- __decorate([
561
- query('collection-browser')
562
- ], AppRoot.prototype, "collectionBrowser", void 0);
563
- __decorate([
564
- query('modal-manager')
565
- ], AppRoot.prototype, "modalManager", void 0);
566
- AppRoot = __decorate([
567
- customElement('app-root')
568
- ], AppRoot);
569
- export { AppRoot };
563
+ `;
564
+ __decorate([
565
+ state()
566
+ ], AppRoot.prototype, "currentPage", void 0);
567
+ __decorate([
568
+ state()
569
+ ], AppRoot.prototype, "searchQuery", void 0);
570
+ __decorate([
571
+ state()
572
+ ], AppRoot.prototype, "cellWidth", void 0);
573
+ __decorate([
574
+ state()
575
+ ], AppRoot.prototype, "cellHeight", void 0);
576
+ __decorate([
577
+ state()
578
+ ], AppRoot.prototype, "rowGap", void 0);
579
+ __decorate([
580
+ state()
581
+ ], AppRoot.prototype, "colGap", void 0);
582
+ __decorate([
583
+ state()
584
+ ], AppRoot.prototype, "loggedIn", void 0);
585
+ __decorate([
586
+ state()
587
+ ], AppRoot.prototype, "searchType", void 0);
588
+ __decorate([
589
+ property({ type: Object, reflect: false })
590
+ ], AppRoot.prototype, "latestAction", void 0);
591
+ __decorate([
592
+ query('#base-query-field')
593
+ ], AppRoot.prototype, "baseQueryField", void 0);
594
+ __decorate([
595
+ query('#page-number-input')
596
+ ], AppRoot.prototype, "pageNumberInput", void 0);
597
+ __decorate([
598
+ query('collection-browser')
599
+ ], AppRoot.prototype, "collectionBrowser", void 0);
600
+ __decorate([
601
+ query('modal-manager')
602
+ ], AppRoot.prototype, "modalManager", void 0);
603
+ AppRoot = __decorate([
604
+ customElement('app-root')
605
+ ], AppRoot);
606
+ export { AppRoot };
570
607
  //# sourceMappingURL=app-root.js.map