@internetarchive/collection-browser 4.4.0 → 4.4.1

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 (41) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  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 +1 -1
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/src/app-root.js +672 -672
  11. package/dist/src/app-root.js.map +1 -1
  12. package/dist/src/collection-browser.js +763 -763
  13. package/dist/src/collection-browser.js.map +1 -1
  14. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  15. package/dist/src/tiles/item-image.js +28 -28
  16. package/dist/src/tiles/item-image.js.map +1 -1
  17. package/dist/src/tiles/tile-display-value-provider.js +2 -1
  18. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  19. package/dist/test/tiles/grid/item-tile.test.js +2 -2
  20. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  21. package/dist/test/tiles/list/tile-list.test.js +2 -2
  22. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  23. package/dist/test/tiles/tile-dispatcher.test.js +14 -0
  24. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  25. package/eslint.config.mjs +53 -53
  26. package/index.html +24 -24
  27. package/local.archive.org.cert +86 -86
  28. package/local.archive.org.key +27 -27
  29. package/package.json +120 -120
  30. package/renovate.json +6 -6
  31. package/src/app-root.ts +1254 -1254
  32. package/src/collection-browser.ts +3161 -3161
  33. package/src/data-source/collection-browser-data-source.ts +1465 -1465
  34. package/src/tiles/item-image.ts +214 -214
  35. package/src/tiles/tile-display-value-provider.ts +2 -3
  36. package/test/tiles/grid/item-tile.test.ts +2 -2
  37. package/test/tiles/list/tile-list.test.ts +2 -2
  38. package/test/tiles/tile-dispatcher.test.ts +20 -0
  39. package/tsconfig.json +25 -25
  40. package/web-dev-server.config.mjs +30 -30
  41. package/web-test-runner.config.mjs +52 -52
@@ -83,362 +83,362 @@ let AppRoot = class AppRoot extends LitElement {
83
83
  return searchParams.get('hide-dev-tools') ? 'hidden' : '';
84
84
  }
85
85
  render() {
86
- return html `
87
- <div class="dev-tool-container">
88
- <div id="dev-tools" class=${this.getClass}>
89
- <div id="search-and-page-inputs">
90
- <form @submit=${this.searchPressed}>
91
- <label for="base-query-field"> Query: </label>
92
- <input
93
- type="text"
94
- id="base-query-field"
95
- .value=${this.searchQuery ?? ''}
96
- />
97
- <input type="submit" value="Search" />
98
- </form>
99
- <form @submit=${this.changePagePressed}>
100
- <label for="page-number-input"> Page: </label>
101
- <input type="number" value="1" id="page-number-input" />
102
- <input type="submit" value="Go" />
103
- </form>
104
- </div>
105
- <div>
106
- <form @submit=${this.collectionChanged}>
107
- <label for="base-collection-field"> Within collection: </label>
108
- <input
109
- type="text"
110
- id="base-collection-field"
111
- .value=${this.withinCollection ?? ''}
112
- />
113
- <input type="submit" value="Search" />
114
- </form>
115
- </div>
116
-
117
- <div id="search-types">
118
- Search type:
119
- <span class="search-type">
120
- <input
121
- type="radio"
122
- id="default-search"
123
- name="search-type"
124
- value="default"
125
- .checked=${this.searchType === SearchType.DEFAULT}
126
- @click=${this.searchTypeSelected}
127
- />
128
- <label for="default-search">Default</label>
129
- </span>
130
- <span class="search-type">
131
- <input
132
- type="radio"
133
- id="metadata-search"
134
- name="search-type"
135
- value="metadata"
136
- .checked=${this.searchType === SearchType.METADATA}
137
- @click=${this.searchTypeSelected}
138
- />
139
- <label for="metadata-search">Metadata</label>
140
- </span>
141
- <span class="search-type">
142
- <input
143
- type="radio"
144
- id="fulltext-search"
145
- name="search-type"
146
- value="fulltext"
147
- .checked=${this.searchType === SearchType.FULLTEXT}
148
- @click=${this.searchTypeSelected}
149
- />
150
- <label for="fulltext-search">Full text</label>
151
- </span>
152
- <span class="search-type">
153
- <input
154
- type="radio"
155
- id="tv-search"
156
- name="search-type"
157
- value="tv"
158
- .checked=${this.searchType === SearchType.TV}
159
- @click=${this.searchTypeSelected}
160
- />
161
- <label for="tv-search">TV</label>
162
- </span>
163
- <span class="search-type">
164
- <input
165
- type="radio"
166
- id="radio-search"
167
- name="search-type"
168
- value="radio"
169
- .checked=${this.searchType === SearchType.RADIO}
170
- @click=${this.searchTypeSelected}
171
- />
172
- <label for="radio-search">Radio</label>
173
- </span>
174
- </div>
175
-
176
- <div id="toggle-controls">
177
- <button
86
+ return html `
87
+ <div class="dev-tool-container">
88
+ <div id="dev-tools" class=${this.getClass}>
89
+ <div id="search-and-page-inputs">
90
+ <form @submit=${this.searchPressed}>
91
+ <label for="base-query-field"> Query: </label>
92
+ <input
93
+ type="text"
94
+ id="base-query-field"
95
+ .value=${this.searchQuery ?? ''}
96
+ />
97
+ <input type="submit" value="Search" />
98
+ </form>
99
+ <form @submit=${this.changePagePressed}>
100
+ <label for="page-number-input"> Page: </label>
101
+ <input type="number" value="1" id="page-number-input" />
102
+ <input type="submit" value="Go" />
103
+ </form>
104
+ </div>
105
+ <div>
106
+ <form @submit=${this.collectionChanged}>
107
+ <label for="base-collection-field"> Within collection: </label>
108
+ <input
109
+ type="text"
110
+ id="base-collection-field"
111
+ .value=${this.withinCollection ?? ''}
112
+ />
113
+ <input type="submit" value="Search" />
114
+ </form>
115
+ </div>
116
+
117
+ <div id="search-types">
118
+ Search type:
119
+ <span class="search-type">
120
+ <input
121
+ type="radio"
122
+ id="default-search"
123
+ name="search-type"
124
+ value="default"
125
+ .checked=${this.searchType === SearchType.DEFAULT}
126
+ @click=${this.searchTypeSelected}
127
+ />
128
+ <label for="default-search">Default</label>
129
+ </span>
130
+ <span class="search-type">
131
+ <input
132
+ type="radio"
133
+ id="metadata-search"
134
+ name="search-type"
135
+ value="metadata"
136
+ .checked=${this.searchType === SearchType.METADATA}
137
+ @click=${this.searchTypeSelected}
138
+ />
139
+ <label for="metadata-search">Metadata</label>
140
+ </span>
141
+ <span class="search-type">
142
+ <input
143
+ type="radio"
144
+ id="fulltext-search"
145
+ name="search-type"
146
+ value="fulltext"
147
+ .checked=${this.searchType === SearchType.FULLTEXT}
148
+ @click=${this.searchTypeSelected}
149
+ />
150
+ <label for="fulltext-search">Full text</label>
151
+ </span>
152
+ <span class="search-type">
153
+ <input
154
+ type="radio"
155
+ id="tv-search"
156
+ name="search-type"
157
+ value="tv"
158
+ .checked=${this.searchType === SearchType.TV}
159
+ @click=${this.searchTypeSelected}
160
+ />
161
+ <label for="tv-search">TV</label>
162
+ </span>
163
+ <span class="search-type">
164
+ <input
165
+ type="radio"
166
+ id="radio-search"
167
+ name="search-type"
168
+ value="radio"
169
+ .checked=${this.searchType === SearchType.RADIO}
170
+ @click=${this.searchTypeSelected}
171
+ />
172
+ <label for="radio-search">Radio</label>
173
+ </span>
174
+ </div>
175
+
176
+ <div id="toggle-controls">
177
+ <button
178
178
  @click=${() => {
179
179
  const details = this.shadowRoot?.getElementById('cell-size-control');
180
180
  details?.classList.toggle('hidden');
181
181
  const rowGapControls = this.shadowRoot?.getElementById('cell-gap-control');
182
182
  rowGapControls?.classList.toggle('hidden');
183
- }}
184
- >
185
- Toggle Cell Controls
186
- </button>
187
- <button
183
+ }}
184
+ >
185
+ Toggle Cell Controls
186
+ </button>
187
+ <button
188
188
  @click=${() => {
189
189
  const details = this.shadowRoot?.getElementById('latest-event-details');
190
190
  details?.classList.toggle('hidden');
191
- }}
192
- >
193
- Last Event Captured
194
- </button>
195
- </div>
196
-
197
- <div id="last-event">
198
- <pre id="latest-event-details" class="hidden">
199
- ${JSON.stringify(this.latestAction, null, 2)}
200
- </pre
201
- >
202
- </div>
203
-
204
- <fieldset class="cell-controls">
205
- <legend>Cell Controls</legend>
206
- <div>
207
- <label for="cell-width-slider">Cell width:</label>
208
- <input
209
- type="range"
210
- min="10"
211
- max="100"
212
- value="18"
213
- step="0.1"
214
- id="cell-width-slider"
215
- @input=${this.widthChanged}
216
- />
217
- <span>${this.cellWidth}rem</span>
218
- </div>
219
- <div>
220
- <label for="cell-height-slider">Cell height:</label>
221
- <input
222
- type="range"
223
- min="10"
224
- max="100"
225
- value="29"
226
- step="0.1"
227
- id="cell-height-slider"
228
- @input=${this.heightChanged}
229
- />
230
- <span>${this.cellHeight}rem</span>
231
- </div>
232
- <div>
233
- <label for="cell-row-gap-slider">Row gap:</label>
234
- <input
235
- type="range"
236
- min="0"
237
- max="5"
238
- value="1.7"
239
- step="0.1"
240
- id="cell-row-gap-slider"
241
- @input=${this.rowGapChanged}
242
- />
243
- <span>${this.rowGap}rem</span>
244
- </div>
245
- <div>
246
- <label for="cell-col-gap-slider">Col gap:</label>
247
- <input
248
- type="range"
249
- min="0"
250
- max="5"
251
- value="1.7"
252
- step="0.1"
253
- id="cell-col-gap-slider"
254
- @input=${this.colGapChanged}
255
- />
256
- <span>${this.colGap}rem</span>
257
- </div>
258
- </fieldset>
259
-
260
- <fieldset class="other-controls">
261
- <legend>Other Controls</legend>
262
- <div class="checkbox-control">
263
- <input
264
- type="checkbox"
265
- id="simulate-login"
266
- @click=${this.loginChanged}
267
- />
268
- <label for="simulate-login">Simulate login</label>
269
- </div>
270
- <div class="checkbox-control">
271
- <input
272
- type="checkbox"
273
- id="enable-date-picker"
274
- checked
275
- @click=${this.datePickerChanged}
276
- />
277
- <label for="enable-date-picker">Enable date picker</label>
278
- </div>
279
- <div class="checkbox-control">
280
- <input
281
- type="checkbox"
282
- id="enable-facets"
283
- checked
284
- @click=${this.facetsChanged}
285
- />
286
- <label for="enable-facets">Enable facets</label>
287
- </div>
288
- <div class="checkbox-control indent">
289
- <input
290
- type="checkbox"
291
- id="lazy-load-facets"
292
- ?disabled=${this.suppressFacets}
293
- @click=${this.lazyLoadFacetsChanged}
294
- />
295
- <label for="lazy-load-facets">Lazy load facets</label>
296
- </div>
297
- <div class="checkbox-control">
298
- <input
299
- type="checkbox"
300
- id="enable-management"
301
- @click=${this.manageModeCheckboxChanged}
302
- />
303
- <label for="enable-management">Enable manage mode</label>
304
- </div>
305
- <div class="checkbox-control indent">
306
- <input
307
- type="checkbox"
308
- id="enable-search-management"
309
- @click=${this.SearchManageModeCheckboxChanged}
310
- />
311
- <label for="enable-search-management">Search</label>
312
- </div>
313
- <div class="checkbox-control">
314
- <input
315
- type="checkbox"
316
- id="enable-smart-facet-bar"
317
- @click=${this.smartFacetBarCheckboxChanged}
318
- />
319
- <label for="enable-smart-facet-bar">Enable smart facet bar</label>
320
- </div>
321
- </fieldset>
322
-
323
- <fieldset class="cb-visual-appearance">
324
- <legend>CB Visual Appearance</legend>
325
- <div class="checkbox-control">
326
- <input
327
- type="checkbox"
328
- id="show-facet-group-outline-check"
329
- @click=${this.toggleFacetGroupOutline}
330
- />
331
- <label for="show-facet-group-outline-check">
332
- Show facet group outlines
333
- </label>
334
- </div>
335
- <div class="checkbox-control">
336
- <input
337
- type="checkbox"
338
- id="show-outline-check"
339
- @click=${this.outlineChanged}
340
- />
341
- <label for="show-outline-check">Show cell outlines</label>
342
- </div>
343
- <div class="checkbox-control">
344
- <input
345
- type="checkbox"
346
- id="minimal-tiles-check"
347
- @click=${this.minimalTilesChanged}
348
- />
349
- <label for="minimal-tiles-check">Minimal tile layouts</label>
350
- </div>
351
- </fieldset>
352
-
353
- <fieldset class="user-profile-controls">
354
- <legend>User Profile Controls</legend>
355
- <div class="checkbox-control">
356
- <input
357
- type="checkbox"
358
- id="enable-facet-top-slot"
359
- @click=${this.facetTopSlotCheckboxChanged}
360
- />
361
- <label for="enable-facet-top-slot">Show facet top slot</label>
362
- </div>
363
- <div class="checkbox-control">
364
- <input
365
- type="checkbox"
366
- id="enable-cb-top-slot"
367
- @click=${this.cbTopSlotCheckboxChanged}
368
- />
369
- <label for="enable-cb-top-slot">Show CB top slot</label>
370
- </div>
371
- <div class="checkbox-control">
372
- <input
373
- type="checkbox"
374
- id="enable-sortbar-left-slot"
375
- @click=${this.sortBarLeftSlotCheckboxChanged}
376
- />
377
- <label for="enable-sortbar-left-slot"
378
- >Show sortbar left slot</label
379
- >
380
- </div>
381
- <div class="checkbox-control">
382
- <input
383
- type="checkbox"
384
- id="enable-sortbar-right-slot"
385
- @click=${this.sortBarRightSlotCheckboxChanged}
386
- />
387
- <label for="enable-sortbar-right-slot"
388
- >Show sortbar right slot</label
389
- >
390
- </div>
391
- <div class="checkbox-control">
392
- <input
393
- type="checkbox"
394
- id="enable-result-last-tile-slot"
395
- @click=${this.resultLastTileSlotCheckboxChanged}
396
- />
397
- <label for="enable-result-last-tile-slot">
398
- Show result last tile slot
399
- </label>
400
- </div>
401
- <div class="checkbox-control">
402
- <input
403
- type="checkbox"
404
- id="enable-replaced-sort-options"
405
- @click=${this.replaceSortOptionsChanged}
406
- />
407
- <label for="enable-replaced-sort-options">
408
- Show replaced sort options
409
- </label>
410
- </div>
411
- <div class="text-input-control">
412
- <label for="within-profile-input">withinProfile</label>
413
- <input
414
- type="text"
415
- id="within-profile-input"
416
- placeholder="e.g. @foobar"
191
+ }}
192
+ >
193
+ Last Event Captured
194
+ </button>
195
+ </div>
196
+
197
+ <div id="last-event">
198
+ <pre id="latest-event-details" class="hidden">
199
+ ${JSON.stringify(this.latestAction, null, 2)}
200
+ </pre
201
+ >
202
+ </div>
203
+
204
+ <fieldset class="cell-controls">
205
+ <legend>Cell Controls</legend>
206
+ <div>
207
+ <label for="cell-width-slider">Cell width:</label>
208
+ <input
209
+ type="range"
210
+ min="10"
211
+ max="100"
212
+ value="18"
213
+ step="0.1"
214
+ id="cell-width-slider"
215
+ @input=${this.widthChanged}
216
+ />
217
+ <span>${this.cellWidth}rem</span>
218
+ </div>
219
+ <div>
220
+ <label for="cell-height-slider">Cell height:</label>
221
+ <input
222
+ type="range"
223
+ min="10"
224
+ max="100"
225
+ value="29"
226
+ step="0.1"
227
+ id="cell-height-slider"
228
+ @input=${this.heightChanged}
229
+ />
230
+ <span>${this.cellHeight}rem</span>
231
+ </div>
232
+ <div>
233
+ <label for="cell-row-gap-slider">Row gap:</label>
234
+ <input
235
+ type="range"
236
+ min="0"
237
+ max="5"
238
+ value="1.7"
239
+ step="0.1"
240
+ id="cell-row-gap-slider"
241
+ @input=${this.rowGapChanged}
242
+ />
243
+ <span>${this.rowGap}rem</span>
244
+ </div>
245
+ <div>
246
+ <label for="cell-col-gap-slider">Col gap:</label>
247
+ <input
248
+ type="range"
249
+ min="0"
250
+ max="5"
251
+ value="1.7"
252
+ step="0.1"
253
+ id="cell-col-gap-slider"
254
+ @input=${this.colGapChanged}
255
+ />
256
+ <span>${this.colGap}rem</span>
257
+ </div>
258
+ </fieldset>
259
+
260
+ <fieldset class="other-controls">
261
+ <legend>Other Controls</legend>
262
+ <div class="checkbox-control">
263
+ <input
264
+ type="checkbox"
265
+ id="simulate-login"
266
+ @click=${this.loginChanged}
267
+ />
268
+ <label for="simulate-login">Simulate login</label>
269
+ </div>
270
+ <div class="checkbox-control">
271
+ <input
272
+ type="checkbox"
273
+ id="enable-date-picker"
274
+ checked
275
+ @click=${this.datePickerChanged}
276
+ />
277
+ <label for="enable-date-picker">Enable date picker</label>
278
+ </div>
279
+ <div class="checkbox-control">
280
+ <input
281
+ type="checkbox"
282
+ id="enable-facets"
283
+ checked
284
+ @click=${this.facetsChanged}
285
+ />
286
+ <label for="enable-facets">Enable facets</label>
287
+ </div>
288
+ <div class="checkbox-control indent">
289
+ <input
290
+ type="checkbox"
291
+ id="lazy-load-facets"
292
+ ?disabled=${this.suppressFacets}
293
+ @click=${this.lazyLoadFacetsChanged}
294
+ />
295
+ <label for="lazy-load-facets">Lazy load facets</label>
296
+ </div>
297
+ <div class="checkbox-control">
298
+ <input
299
+ type="checkbox"
300
+ id="enable-management"
301
+ @click=${this.manageModeCheckboxChanged}
302
+ />
303
+ <label for="enable-management">Enable manage mode</label>
304
+ </div>
305
+ <div class="checkbox-control indent">
306
+ <input
307
+ type="checkbox"
308
+ id="enable-search-management"
309
+ @click=${this.SearchManageModeCheckboxChanged}
310
+ />
311
+ <label for="enable-search-management">Search</label>
312
+ </div>
313
+ <div class="checkbox-control">
314
+ <input
315
+ type="checkbox"
316
+ id="enable-smart-facet-bar"
317
+ @click=${this.smartFacetBarCheckboxChanged}
318
+ />
319
+ <label for="enable-smart-facet-bar">Enable smart facet bar</label>
320
+ </div>
321
+ </fieldset>
322
+
323
+ <fieldset class="cb-visual-appearance">
324
+ <legend>CB Visual Appearance</legend>
325
+ <div class="checkbox-control">
326
+ <input
327
+ type="checkbox"
328
+ id="show-facet-group-outline-check"
329
+ @click=${this.toggleFacetGroupOutline}
330
+ />
331
+ <label for="show-facet-group-outline-check">
332
+ Show facet group outlines
333
+ </label>
334
+ </div>
335
+ <div class="checkbox-control">
336
+ <input
337
+ type="checkbox"
338
+ id="show-outline-check"
339
+ @click=${this.outlineChanged}
340
+ />
341
+ <label for="show-outline-check">Show cell outlines</label>
342
+ </div>
343
+ <div class="checkbox-control">
344
+ <input
345
+ type="checkbox"
346
+ id="minimal-tiles-check"
347
+ @click=${this.minimalTilesChanged}
348
+ />
349
+ <label for="minimal-tiles-check">Minimal tile layouts</label>
350
+ </div>
351
+ </fieldset>
352
+
353
+ <fieldset class="user-profile-controls">
354
+ <legend>User Profile Controls</legend>
355
+ <div class="checkbox-control">
356
+ <input
357
+ type="checkbox"
358
+ id="enable-facet-top-slot"
359
+ @click=${this.facetTopSlotCheckboxChanged}
360
+ />
361
+ <label for="enable-facet-top-slot">Show facet top slot</label>
362
+ </div>
363
+ <div class="checkbox-control">
364
+ <input
365
+ type="checkbox"
366
+ id="enable-cb-top-slot"
367
+ @click=${this.cbTopSlotCheckboxChanged}
368
+ />
369
+ <label for="enable-cb-top-slot">Show CB top slot</label>
370
+ </div>
371
+ <div class="checkbox-control">
372
+ <input
373
+ type="checkbox"
374
+ id="enable-sortbar-left-slot"
375
+ @click=${this.sortBarLeftSlotCheckboxChanged}
376
+ />
377
+ <label for="enable-sortbar-left-slot"
378
+ >Show sortbar left slot</label
379
+ >
380
+ </div>
381
+ <div class="checkbox-control">
382
+ <input
383
+ type="checkbox"
384
+ id="enable-sortbar-right-slot"
385
+ @click=${this.sortBarRightSlotCheckboxChanged}
386
+ />
387
+ <label for="enable-sortbar-right-slot"
388
+ >Show sortbar right slot</label
389
+ >
390
+ </div>
391
+ <div class="checkbox-control">
392
+ <input
393
+ type="checkbox"
394
+ id="enable-result-last-tile-slot"
395
+ @click=${this.resultLastTileSlotCheckboxChanged}
396
+ />
397
+ <label for="enable-result-last-tile-slot">
398
+ Show result last tile slot
399
+ </label>
400
+ </div>
401
+ <div class="checkbox-control">
402
+ <input
403
+ type="checkbox"
404
+ id="enable-replaced-sort-options"
405
+ @click=${this.replaceSortOptionsChanged}
406
+ />
407
+ <label for="enable-replaced-sort-options">
408
+ Show replaced sort options
409
+ </label>
410
+ </div>
411
+ <div class="text-input-control">
412
+ <label for="within-profile-input">withinProfile</label>
413
+ <input
414
+ type="text"
415
+ id="within-profile-input"
416
+ placeholder="e.g. @foobar"
417
417
  @change=${(e) => {
418
418
  const val = e.target.value.trim();
419
419
  this.withinProfile = val || undefined;
420
- }}
421
- />
422
- </div>
423
- <details class="profile-element-controls">
424
- <summary>
425
- Profile tab
420
+ }}
421
+ />
422
+ </div>
423
+ <details class="profile-element-controls">
424
+ <summary>
425
+ Profile tab
426
426
  (profileElement)${this.profileElement
427
427
  ? html `: <strong>${this.profileElement}</strong>`
428
- : ''}
429
- </summary>
430
- <div class="profile-element-options">
431
- <div class="checkbox-control">
432
- <input
433
- type="radio"
434
- id="profile-none"
435
- name="profile-element"
436
- value=""
437
- checked
438
- @click=${this.profileElementChanged}
439
- />
440
- <label for="profile-none">None</label>
441
- </div>
428
+ : ''}
429
+ </summary>
430
+ <div class="profile-element-options">
431
+ <div class="checkbox-control">
432
+ <input
433
+ type="radio"
434
+ id="profile-none"
435
+ name="profile-element"
436
+ value=""
437
+ checked
438
+ @click=${this.profileElementChanged}
439
+ />
440
+ <label for="profile-none">None</label>
441
+ </div>
442
442
  ${[
443
443
  'uploads',
444
444
  'favorites',
@@ -447,83 +447,83 @@ let AppRoot = class AppRoot extends LitElement {
447
447
  'lending',
448
448
  'web_archives',
449
449
  'forum_posts',
450
- ].map(tab => html `
451
- <div class="checkbox-control">
452
- <input
453
- type="radio"
454
- id="profile-${tab}"
455
- name="profile-element"
456
- value="${tab}"
457
- @click=${this.profileElementChanged}
458
- />
459
- <label for="profile-${tab}">${tab}</label>
460
- </div>
461
- `)}
462
- </div>
463
- </details>
464
- </fieldset>
465
-
466
- <fieldset class="user-profile-controls">
467
- <legend>Set Placeholder Types</legend>
468
- <div class="checkbox-control">
469
- <input
470
- id="enable-loading-placeholder"
471
- type="radio"
472
- @click=${() => this.setPlaceholderType('loading-placeholder')}
473
- name="placeholder-radio"
474
- />
475
- <label for="enable-loading-placeholder"
476
- >Loading Placeholder</label
477
- >
478
- </div>
479
- <div class="checkbox-control">
480
- <input
481
- id="enable-empty-placeholder"
482
- type="radio"
483
- @click=${() => this.setPlaceholderType('error-placeholder')}
484
- value="empty-placeholder"
485
- name="placeholder-radio"
486
- />
487
- <label for="enable-empty-placeholder">Empty Placeholder</label>
488
- </div>
489
- </fieldset>
490
- </div>
491
- <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
492
- Toggle Search Controls
493
- </button>
494
- </div>
495
- <div id="collection-browser-container">
496
- <collection-browser
497
- facetPaneVisible
498
- .baseNavigationUrl=${'https://archive.org'}
499
- .baseImageUrl=${'https://archive.org'}
500
- .searchService=${this.searchService}
501
- .resizeObserver=${this.resizeObserver}
502
- .showHistogramDatePicker=${true}
503
- .suppressFacets=${this.suppressFacets}
504
- .lazyLoadFacets=${this.lazyLoadFacets}
505
- .loggedIn=${this.loggedIn}
506
- .modalManager=${this.modalManager}
507
- .analyticsHandler=${this.analyticsHandler}
508
- .withinProfile=${this.withinProfile}
509
- .profileElement=${this.profileElement}
510
- .pageContext=${'search'}
511
- @visiblePageChanged=${this.visiblePageChanged}
512
- @baseQueryChanged=${this.baseQueryChanged}
513
- @searchTypeChanged=${this.searchTypeChanged}
514
- @manageModeChanged=${this.manageModeChanged}
515
- @itemRemovalRequested=${this.handleItemRemovalRequest}
516
- @itemManagerRequested=${this.handleItemManagerRequest}
517
- >
450
+ ].map(tab => html `
451
+ <div class="checkbox-control">
452
+ <input
453
+ type="radio"
454
+ id="profile-${tab}"
455
+ name="profile-element"
456
+ value="${tab}"
457
+ @click=${this.profileElementChanged}
458
+ />
459
+ <label for="profile-${tab}">${tab}</label>
460
+ </div>
461
+ `)}
462
+ </div>
463
+ </details>
464
+ </fieldset>
465
+
466
+ <fieldset class="user-profile-controls">
467
+ <legend>Set Placeholder Types</legend>
468
+ <div class="checkbox-control">
469
+ <input
470
+ id="enable-loading-placeholder"
471
+ type="radio"
472
+ @click=${() => this.setPlaceholderType('loading-placeholder')}
473
+ name="placeholder-radio"
474
+ />
475
+ <label for="enable-loading-placeholder"
476
+ >Loading Placeholder</label
477
+ >
478
+ </div>
479
+ <div class="checkbox-control">
480
+ <input
481
+ id="enable-empty-placeholder"
482
+ type="radio"
483
+ @click=${() => this.setPlaceholderType('error-placeholder')}
484
+ value="empty-placeholder"
485
+ name="placeholder-radio"
486
+ />
487
+ <label for="enable-empty-placeholder">Empty Placeholder</label>
488
+ </div>
489
+ </fieldset>
490
+ </div>
491
+ <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
492
+ Toggle Search Controls
493
+ </button>
494
+ </div>
495
+ <div id="collection-browser-container">
496
+ <collection-browser
497
+ facetPaneVisible
498
+ .baseNavigationUrl=${'https://archive.org'}
499
+ .baseImageUrl=${'https://archive.org'}
500
+ .searchService=${this.searchService}
501
+ .resizeObserver=${this.resizeObserver}
502
+ .showHistogramDatePicker=${true}
503
+ .suppressFacets=${this.suppressFacets}
504
+ .lazyLoadFacets=${this.lazyLoadFacets}
505
+ .loggedIn=${this.loggedIn}
506
+ .modalManager=${this.modalManager}
507
+ .analyticsHandler=${this.analyticsHandler}
508
+ .withinProfile=${this.withinProfile}
509
+ .profileElement=${this.profileElement}
510
+ .pageContext=${'search'}
511
+ @visiblePageChanged=${this.visiblePageChanged}
512
+ @baseQueryChanged=${this.baseQueryChanged}
513
+ @searchTypeChanged=${this.searchTypeChanged}
514
+ @manageModeChanged=${this.manageModeChanged}
515
+ @itemRemovalRequested=${this.handleItemRemovalRequest}
516
+ @itemManagerRequested=${this.handleItemManagerRequest}
517
+ >
518
518
  ${this.toggleSlots
519
519
  ? html `<div slot="sortbar-left-slot">Sort Slot</div>`
520
- : nothing}
520
+ : nothing}
521
521
  ${this.toggleSlots
522
522
  ? html `<div slot="facet-top-slot">Facet Slot</div>`
523
- : nothing}
524
- </collection-browser>
525
- </div>
526
- <modal-manager></modal-manager>
523
+ : nothing}
524
+ </collection-browser>
525
+ </div>
526
+ <modal-manager></modal-manager>
527
527
  `;
528
528
  }
529
529
  async setPlaceholderType(type) {
@@ -848,262 +848,262 @@ let AppRoot = class AppRoot extends LitElement {
848
848
  const input = e.target;
849
849
  this.profileElement = input.value || undefined;
850
850
  }
851
- static { this.styles = css `
852
- :host {
853
- display: block;
854
- --primaryButtonBGColor: #194880;
855
- --ia-theme-link-color: #4b64ff;
856
- }
857
-
858
- /* add the following styles to ensure proper modal visibility */
859
- body.modal-manager-open {
860
- overflow: hidden;
861
- }
862
- modal-manager {
863
- display: none;
864
- }
865
- modal-manager[mode='open'] {
866
- display: block;
867
- }
868
- modal-manager.remove-items {
869
- --modalWidth: 58rem;
870
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
871
- --modalTitleLineHeight: 4rem;
872
- --modalTitleFontSize: 1.8rem;
873
- }
874
- modal-manager.more-search-facets {
875
- --modalWidth: 85rem;
876
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
877
- --modalTitleLineHeight: 4rem;
878
- --modalTitleFontSize: 1.8rem;
879
- --modalCornerRadius: 0;
880
- --modalBottomPadding: 0;
881
- --modalBottomMargin: 0;
882
- --modalScrollOffset: 0;
883
- --modalCornerRadius: 0.5rem;
884
- }
885
- modal-manager.expanded-date-picker {
886
- --modalWidth: 58rem;
887
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
888
- --modalTitleLineHeight: 4rem;
889
- --modalTitleFontSize: 1.8rem;
890
- --modalCornerRadius: 0;
891
- --modalBottomPadding: 0;
892
- --modalBottomMargin: 0;
893
- --modalScrollOffset: 0;
894
- --modalCornerRadius: 0.5rem;
895
- }
896
-
897
- input,
898
- button {
899
- font-size: 1.6rem;
900
- }
901
-
902
- modal-manager.showFacetGroupOutlines,
903
- collection-browser.showFacetGroupOutlines {
904
- --facet-row-border-top: 1px solid red;
905
- --facet-row-border-bottom: 1px solid blue;
906
- }
907
-
908
- collection-browser {
909
- /* Same as production */
910
- max-width: 135rem;
911
- margin: auto;
912
- }
913
-
914
- #collection-browser-container {
915
- /* Same as production */
916
- padding-left: 0.5rem;
917
- margin-bottom: 2rem;
918
- }
919
-
920
- #base-query-field {
921
- width: 300px;
922
- }
923
-
924
- .dev-tool-container {
925
- position: relative;
926
- }
927
- #dev-tools {
928
- position: relative;
929
- top: 0;
930
- left: 0;
931
- z-index: 1;
932
- -webkit-backdrop-filter: blur(10px);
933
- backdrop-filter: blur(10px);
934
- padding: 0.5rem 1rem;
935
- border: 1px solid black;
936
- font-size: 1.4rem;
937
- background: #ffffffb3;
938
- }
939
-
940
- #dev-tools > * {
941
- display: flex;
942
- }
943
-
944
- #toggle-dev-tools-btn {
945
- position: fixed;
946
- left: 77.4%;
947
- top: 0;
948
- background: red;
949
- padding: 5px;
950
- color: white;
951
- font-size: 1.4rem;
952
- margin: 0;
953
- z-index: 1;
954
- cursor: pointer;
955
- }
956
-
957
- #search-and-page-inputs {
958
- flex-wrap: wrap;
959
- row-gap: 2px;
960
- }
961
-
962
- #search-and-page-inputs > form {
963
- margin-right: 1rem;
964
- }
965
-
966
- #search-and-page-inputs label {
967
- display: inline-block;
968
- min-width: 50px;
969
- }
970
-
971
- #page-number-input {
972
- width: 75px;
973
- }
974
-
975
- .search-type {
976
- margin-right: 1rem;
977
- }
978
-
979
- .cell-controls {
980
- display: flex;
981
- flex-wrap: wrap;
982
- }
983
- .cell-controls div {
984
- display: flex;
985
- align-items: center;
986
- }
987
- .cell-controls input[type='range'] {
988
- width: 120px;
989
- }
990
- #cell-controls label {
991
- display: inline-block;
992
- width: 10rem;
993
- }
994
-
995
- #cell-size-control,
996
- #cell-gap-control {
997
- flex-basis: calc(50% - 1rem);
998
- flex-grow: 1;
999
- }
1000
-
1001
- #cell-gap-control {
1002
- margin-left: 1rem;
1003
- }
1004
-
1005
- #checkbox-controls {
1006
- padding-top: 0.5rem;
1007
- flex-wrap: wrap;
1008
- }
1009
-
1010
- .checkbox-control {
1011
- flex-basis: 50%;
1012
- }
1013
- .checkbox-control.indent {
1014
- margin-left: 10px;
1015
- }
1016
- .checkbox-control label {
1017
- user-select: none;
1018
- }
1019
-
1020
- #last-event {
1021
- background-color: aliceblue;
1022
- padding: 5px;
1023
- margin: 5px auto;
1024
- }
1025
-
1026
- .hidden {
1027
- display: none;
1028
- }
1029
-
1030
- #toggle-controls {
1031
- background-color: lightskyblue;
1032
- padding: 5px;
1033
- margin: 5px auto;
1034
- }
1035
-
1036
- #search-types {
1037
- margin: 5px auto;
1038
- background-color: aliceblue;
1039
- font-size: 1.6rem;
1040
- }
1041
-
1042
- // slots
1043
- div[slot='cb-top-slot'] {
1044
- height: 50px;
1045
- border: 1px solid red;
1046
- background: bisque;
1047
- }
1048
- div[slot='facet-top-slot'] {
1049
- border: 1px solid red;
1050
- width: 100%;
1051
- height: 150px;
1052
- background-color: darkseagreen;
1053
- }
1054
- div[slot='sort-slot-left'] {
1055
- height: 50px;
1056
- border: 1px solid red;
1057
- background: bisque;
1058
- }
1059
-
1060
- /* user profile controls */
1061
- .user-profile-controls {
1062
- width: fit-content;
1063
- }
1064
-
1065
- .profile-element-controls {
1066
- margin-top: 4px;
1067
- }
1068
-
1069
- .profile-element-controls summary {
1070
- cursor: pointer;
1071
- user-select: none;
1072
- }
1073
-
1074
- .profile-element-options {
1075
- display: grid;
1076
- grid-template-columns: 1fr 1fr;
1077
- column-gap: 8px;
1078
- margin-top: 4px;
1079
- }
1080
-
1081
- fieldset {
1082
- display: inline-block !important;
1083
- }
1084
-
1085
- .result-last-tile {
1086
- border-radius: 4px;
1087
- background-color: white;
1088
- border: 3px dashed #555;
1089
- box-shadow: none;
1090
- display: grid;
1091
- align-content: center;
1092
- }
1093
- .result-last-tile:hover {
1094
- box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
1095
- transition: box-shadow 0.1s ease 0s;
1096
- cursor: pointer;
1097
- border: 3px dashed #4b64ff;
1098
- }
1099
- .result-last-tile h3 {
1100
- margin-bottom: 4rem;
1101
- margin: 0px auto;
1102
- font-size: 2.8rem;
1103
- color: rgb(44, 44, 44);
1104
- font-weight: 200;
1105
- text-align: center;
1106
- }
851
+ static { this.styles = css `
852
+ :host {
853
+ display: block;
854
+ --primaryButtonBGColor: #194880;
855
+ --ia-theme-link-color: #4b64ff;
856
+ }
857
+
858
+ /* add the following styles to ensure proper modal visibility */
859
+ body.modal-manager-open {
860
+ overflow: hidden;
861
+ }
862
+ modal-manager {
863
+ display: none;
864
+ }
865
+ modal-manager[mode='open'] {
866
+ display: block;
867
+ }
868
+ modal-manager.remove-items {
869
+ --modalWidth: 58rem;
870
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
871
+ --modalTitleLineHeight: 4rem;
872
+ --modalTitleFontSize: 1.8rem;
873
+ }
874
+ modal-manager.more-search-facets {
875
+ --modalWidth: 85rem;
876
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
877
+ --modalTitleLineHeight: 4rem;
878
+ --modalTitleFontSize: 1.8rem;
879
+ --modalCornerRadius: 0;
880
+ --modalBottomPadding: 0;
881
+ --modalBottomMargin: 0;
882
+ --modalScrollOffset: 0;
883
+ --modalCornerRadius: 0.5rem;
884
+ }
885
+ modal-manager.expanded-date-picker {
886
+ --modalWidth: 58rem;
887
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
888
+ --modalTitleLineHeight: 4rem;
889
+ --modalTitleFontSize: 1.8rem;
890
+ --modalCornerRadius: 0;
891
+ --modalBottomPadding: 0;
892
+ --modalBottomMargin: 0;
893
+ --modalScrollOffset: 0;
894
+ --modalCornerRadius: 0.5rem;
895
+ }
896
+
897
+ input,
898
+ button {
899
+ font-size: 1.6rem;
900
+ }
901
+
902
+ modal-manager.showFacetGroupOutlines,
903
+ collection-browser.showFacetGroupOutlines {
904
+ --facet-row-border-top: 1px solid red;
905
+ --facet-row-border-bottom: 1px solid blue;
906
+ }
907
+
908
+ collection-browser {
909
+ /* Same as production */
910
+ max-width: 135rem;
911
+ margin: auto;
912
+ }
913
+
914
+ #collection-browser-container {
915
+ /* Same as production */
916
+ padding-left: 0.5rem;
917
+ margin-bottom: 2rem;
918
+ }
919
+
920
+ #base-query-field {
921
+ width: 300px;
922
+ }
923
+
924
+ .dev-tool-container {
925
+ position: relative;
926
+ }
927
+ #dev-tools {
928
+ position: relative;
929
+ top: 0;
930
+ left: 0;
931
+ z-index: 1;
932
+ -webkit-backdrop-filter: blur(10px);
933
+ backdrop-filter: blur(10px);
934
+ padding: 0.5rem 1rem;
935
+ border: 1px solid black;
936
+ font-size: 1.4rem;
937
+ background: #ffffffb3;
938
+ }
939
+
940
+ #dev-tools > * {
941
+ display: flex;
942
+ }
943
+
944
+ #toggle-dev-tools-btn {
945
+ position: fixed;
946
+ left: 77.4%;
947
+ top: 0;
948
+ background: red;
949
+ padding: 5px;
950
+ color: white;
951
+ font-size: 1.4rem;
952
+ margin: 0;
953
+ z-index: 1;
954
+ cursor: pointer;
955
+ }
956
+
957
+ #search-and-page-inputs {
958
+ flex-wrap: wrap;
959
+ row-gap: 2px;
960
+ }
961
+
962
+ #search-and-page-inputs > form {
963
+ margin-right: 1rem;
964
+ }
965
+
966
+ #search-and-page-inputs label {
967
+ display: inline-block;
968
+ min-width: 50px;
969
+ }
970
+
971
+ #page-number-input {
972
+ width: 75px;
973
+ }
974
+
975
+ .search-type {
976
+ margin-right: 1rem;
977
+ }
978
+
979
+ .cell-controls {
980
+ display: flex;
981
+ flex-wrap: wrap;
982
+ }
983
+ .cell-controls div {
984
+ display: flex;
985
+ align-items: center;
986
+ }
987
+ .cell-controls input[type='range'] {
988
+ width: 120px;
989
+ }
990
+ #cell-controls label {
991
+ display: inline-block;
992
+ width: 10rem;
993
+ }
994
+
995
+ #cell-size-control,
996
+ #cell-gap-control {
997
+ flex-basis: calc(50% - 1rem);
998
+ flex-grow: 1;
999
+ }
1000
+
1001
+ #cell-gap-control {
1002
+ margin-left: 1rem;
1003
+ }
1004
+
1005
+ #checkbox-controls {
1006
+ padding-top: 0.5rem;
1007
+ flex-wrap: wrap;
1008
+ }
1009
+
1010
+ .checkbox-control {
1011
+ flex-basis: 50%;
1012
+ }
1013
+ .checkbox-control.indent {
1014
+ margin-left: 10px;
1015
+ }
1016
+ .checkbox-control label {
1017
+ user-select: none;
1018
+ }
1019
+
1020
+ #last-event {
1021
+ background-color: aliceblue;
1022
+ padding: 5px;
1023
+ margin: 5px auto;
1024
+ }
1025
+
1026
+ .hidden {
1027
+ display: none;
1028
+ }
1029
+
1030
+ #toggle-controls {
1031
+ background-color: lightskyblue;
1032
+ padding: 5px;
1033
+ margin: 5px auto;
1034
+ }
1035
+
1036
+ #search-types {
1037
+ margin: 5px auto;
1038
+ background-color: aliceblue;
1039
+ font-size: 1.6rem;
1040
+ }
1041
+
1042
+ // slots
1043
+ div[slot='cb-top-slot'] {
1044
+ height: 50px;
1045
+ border: 1px solid red;
1046
+ background: bisque;
1047
+ }
1048
+ div[slot='facet-top-slot'] {
1049
+ border: 1px solid red;
1050
+ width: 100%;
1051
+ height: 150px;
1052
+ background-color: darkseagreen;
1053
+ }
1054
+ div[slot='sort-slot-left'] {
1055
+ height: 50px;
1056
+ border: 1px solid red;
1057
+ background: bisque;
1058
+ }
1059
+
1060
+ /* user profile controls */
1061
+ .user-profile-controls {
1062
+ width: fit-content;
1063
+ }
1064
+
1065
+ .profile-element-controls {
1066
+ margin-top: 4px;
1067
+ }
1068
+
1069
+ .profile-element-controls summary {
1070
+ cursor: pointer;
1071
+ user-select: none;
1072
+ }
1073
+
1074
+ .profile-element-options {
1075
+ display: grid;
1076
+ grid-template-columns: 1fr 1fr;
1077
+ column-gap: 8px;
1078
+ margin-top: 4px;
1079
+ }
1080
+
1081
+ fieldset {
1082
+ display: inline-block !important;
1083
+ }
1084
+
1085
+ .result-last-tile {
1086
+ border-radius: 4px;
1087
+ background-color: white;
1088
+ border: 3px dashed #555;
1089
+ box-shadow: none;
1090
+ display: grid;
1091
+ align-content: center;
1092
+ }
1093
+ .result-last-tile:hover {
1094
+ box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
1095
+ transition: box-shadow 0.1s ease 0s;
1096
+ cursor: pointer;
1097
+ border: 3px dashed #4b64ff;
1098
+ }
1099
+ .result-last-tile h3 {
1100
+ margin-bottom: 4rem;
1101
+ margin: 0px auto;
1102
+ font-size: 2.8rem;
1103
+ color: rgb(44, 44, 44);
1104
+ font-weight: 200;
1105
+ text-align: center;
1106
+ }
1107
1107
  `; }
1108
1108
  };
1109
1109
  __decorate([