@internetarchive/collection-browser 3.5.1 → 3.5.2-alpha-webdev8164.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/src/app-root.js +606 -606
  2. package/dist/src/app-root.js.map +1 -1
  3. package/dist/src/collection-browser.js +764 -764
  4. package/dist/src/collection-browser.js.map +1 -1
  5. package/dist/src/collection-facets/facet-row.js +140 -140
  6. package/dist/src/collection-facets/facet-row.js.map +1 -1
  7. package/dist/src/collection-facets/facets-template.js +28 -23
  8. package/dist/src/collection-facets/facets-template.js.map +1 -1
  9. package/dist/src/collection-facets/more-facets-content.d.ts +34 -8
  10. package/dist/src/collection-facets/more-facets-content.js +358 -159
  11. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  12. package/dist/src/collection-facets.js +267 -267
  13. package/dist/src/collection-facets.js.map +1 -1
  14. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  15. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  16. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  17. package/dist/src/data-source/models.js.map +1 -1
  18. package/dist/src/models.js.map +1 -1
  19. package/dist/src/restoration-state-handler.js.map +1 -1
  20. package/dist/src/tiles/grid/collection-tile.js +77 -77
  21. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  22. package/dist/src/tiles/grid/item-tile.js +137 -137
  23. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  24. package/dist/src/tiles/models.js.map +1 -1
  25. package/dist/src/tiles/tile-dispatcher.js +215 -215
  26. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  27. package/dist/test/collection-browser.test.js +189 -189
  28. package/dist/test/collection-browser.test.js.map +1 -1
  29. package/dist/test/collection-facets/more-facets-content.test.js +137 -31
  30. package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
  31. package/dist/test/restoration-state-handler.test.js.map +1 -1
  32. package/package.json +1 -1
  33. package/src/app-root.ts +1140 -1140
  34. package/src/collection-browser.ts +3075 -3075
  35. package/src/collection-facets/facet-row.ts +299 -299
  36. package/src/collection-facets/facets-template.ts +88 -83
  37. package/src/collection-facets/more-facets-content.ts +856 -642
  38. package/src/collection-facets.ts +1010 -1010
  39. package/src/data-source/collection-browser-data-source-interface.ts +345 -345
  40. package/src/data-source/collection-browser-data-source.ts +1441 -1441
  41. package/src/data-source/collection-browser-query-state.ts +59 -59
  42. package/src/data-source/models.ts +56 -56
  43. package/src/models.ts +864 -864
  44. package/src/restoration-state-handler.ts +546 -546
  45. package/src/tiles/grid/collection-tile.ts +163 -163
  46. package/src/tiles/grid/item-tile.ts +340 -340
  47. package/src/tiles/models.ts +1 -1
  48. package/src/tiles/tile-dispatcher.ts +517 -517
  49. package/test/collection-browser.test.ts +2413 -2413
  50. package/test/collection-facets/more-facets-content.test.ts +378 -231
  51. package/test/restoration-state-handler.test.ts +480 -480
  52. package/vite.config.ts +29 -29
@@ -79,384 +79,384 @@ let AppRoot = class AppRoot extends LitElement {
79
79
  return searchParams.get('hide-dev-tools') ? 'hidden' : '';
80
80
  }
81
81
  render() {
82
- return html `
83
- <div class="dev-tool-container">
84
- <div id="dev-tools" class=${this.getClass}>
85
- <div id="search-and-page-inputs">
86
- <form @submit=${this.searchPressed}>
87
- <label for="base-query-field"> Query: </label>
88
- <input
89
- type="text"
90
- id="base-query-field"
91
- .value=${this.searchQuery ?? ''}
92
- />
93
- <input type="submit" value="Search" />
94
- </form>
95
- <form @submit=${this.changePagePressed}>
96
- <label for="page-number-input"> Page: </label>
97
- <input type="number" value="1" id="page-number-input" />
98
- <input type="submit" value="Go" />
99
- </form>
100
- </div>
101
- <div>
102
- <form @submit=${this.collectionChanged}>
103
- <label for="base-collection-field"> Within collection: </label>
104
- <input
105
- type="text"
106
- id="base-collection-field"
107
- .value=${this.withinCollection ?? ''}
108
- />
109
- <input type="submit" value="Search" />
110
- </form>
111
- </div>
112
-
113
- <div id="search-types">
114
- Search type:
115
- <span class="search-type">
116
- <input
117
- type="radio"
118
- id="default-search"
119
- name="search-type"
120
- value="default"
121
- .checked=${this.searchType === SearchType.DEFAULT}
122
- @click=${this.searchTypeSelected}
123
- />
124
- <label for="default-search">Default</label>
125
- </span>
126
- <span class="search-type">
127
- <input
128
- type="radio"
129
- id="metadata-search"
130
- name="search-type"
131
- value="metadata"
132
- .checked=${this.searchType === SearchType.METADATA}
133
- @click=${this.searchTypeSelected}
134
- />
135
- <label for="metadata-search">Metadata</label>
136
- </span>
137
- <span class="search-type">
138
- <input
139
- type="radio"
140
- id="fulltext-search"
141
- name="search-type"
142
- value="fulltext"
143
- .checked=${this.searchType === SearchType.FULLTEXT}
144
- @click=${this.searchTypeSelected}
145
- />
146
- <label for="fulltext-search">Full text</label>
147
- </span>
148
- <span class="search-type">
149
- <input
150
- type="radio"
151
- id="tv-search"
152
- name="search-type"
153
- value="tv"
154
- .checked=${this.searchType === SearchType.TV}
155
- @click=${this.searchTypeSelected}
156
- />
157
- <label for="tv-search">TV</label>
158
- </span>
159
- <span class="search-type">
160
- <input
161
- type="radio"
162
- id="radio-search"
163
- name="search-type"
164
- value="radio"
165
- .checked=${this.searchType === SearchType.RADIO}
166
- @click=${this.searchTypeSelected}
167
- />
168
- <label for="radio-search">Radio</label>
169
- </span>
170
- </div>
171
-
172
- <div id="toggle-controls">
173
- <button
82
+ return html `
83
+ <div class="dev-tool-container">
84
+ <div id="dev-tools" class=${this.getClass}>
85
+ <div id="search-and-page-inputs">
86
+ <form @submit=${this.searchPressed}>
87
+ <label for="base-query-field"> Query: </label>
88
+ <input
89
+ type="text"
90
+ id="base-query-field"
91
+ .value=${this.searchQuery ?? ''}
92
+ />
93
+ <input type="submit" value="Search" />
94
+ </form>
95
+ <form @submit=${this.changePagePressed}>
96
+ <label for="page-number-input"> Page: </label>
97
+ <input type="number" value="1" id="page-number-input" />
98
+ <input type="submit" value="Go" />
99
+ </form>
100
+ </div>
101
+ <div>
102
+ <form @submit=${this.collectionChanged}>
103
+ <label for="base-collection-field"> Within collection: </label>
104
+ <input
105
+ type="text"
106
+ id="base-collection-field"
107
+ .value=${this.withinCollection ?? ''}
108
+ />
109
+ <input type="submit" value="Search" />
110
+ </form>
111
+ </div>
112
+
113
+ <div id="search-types">
114
+ Search type:
115
+ <span class="search-type">
116
+ <input
117
+ type="radio"
118
+ id="default-search"
119
+ name="search-type"
120
+ value="default"
121
+ .checked=${this.searchType === SearchType.DEFAULT}
122
+ @click=${this.searchTypeSelected}
123
+ />
124
+ <label for="default-search">Default</label>
125
+ </span>
126
+ <span class="search-type">
127
+ <input
128
+ type="radio"
129
+ id="metadata-search"
130
+ name="search-type"
131
+ value="metadata"
132
+ .checked=${this.searchType === SearchType.METADATA}
133
+ @click=${this.searchTypeSelected}
134
+ />
135
+ <label for="metadata-search">Metadata</label>
136
+ </span>
137
+ <span class="search-type">
138
+ <input
139
+ type="radio"
140
+ id="fulltext-search"
141
+ name="search-type"
142
+ value="fulltext"
143
+ .checked=${this.searchType === SearchType.FULLTEXT}
144
+ @click=${this.searchTypeSelected}
145
+ />
146
+ <label for="fulltext-search">Full text</label>
147
+ </span>
148
+ <span class="search-type">
149
+ <input
150
+ type="radio"
151
+ id="tv-search"
152
+ name="search-type"
153
+ value="tv"
154
+ .checked=${this.searchType === SearchType.TV}
155
+ @click=${this.searchTypeSelected}
156
+ />
157
+ <label for="tv-search">TV</label>
158
+ </span>
159
+ <span class="search-type">
160
+ <input
161
+ type="radio"
162
+ id="radio-search"
163
+ name="search-type"
164
+ value="radio"
165
+ .checked=${this.searchType === SearchType.RADIO}
166
+ @click=${this.searchTypeSelected}
167
+ />
168
+ <label for="radio-search">Radio</label>
169
+ </span>
170
+ </div>
171
+
172
+ <div id="toggle-controls">
173
+ <button
174
174
  @click=${() => {
175
175
  const details = this.shadowRoot?.getElementById('cell-size-control');
176
176
  details?.classList.toggle('hidden');
177
177
  const rowGapControls = this.shadowRoot?.getElementById('cell-gap-control');
178
178
  rowGapControls?.classList.toggle('hidden');
179
- }}
180
- >
181
- Toggle Cell Controls
182
- </button>
183
- <button
179
+ }}
180
+ >
181
+ Toggle Cell Controls
182
+ </button>
183
+ <button
184
184
  @click=${() => {
185
185
  const details = this.shadowRoot?.getElementById('latest-event-details');
186
186
  details?.classList.toggle('hidden');
187
- }}
188
- >
189
- Last Event Captured
190
- </button>
191
- </div>
192
-
193
- <div id="last-event">
194
- <pre id="latest-event-details" class="hidden">
195
- ${JSON.stringify(this.latestAction, null, 2)}
196
- </pre
197
- >
198
- </div>
199
-
200
- <fieldset class="cell-controls">
201
- <legend>Cell Controls</legend>
202
- <div>
203
- <label for="cell-width-slider">Cell width:</label>
204
- <input
205
- type="range"
206
- min="10"
207
- max="100"
208
- value="18"
209
- step="0.1"
210
- id="cell-width-slider"
211
- @input=${this.widthChanged}
212
- />
213
- <span>${this.cellWidth}rem</span>
214
- </div>
215
- <div>
216
- <label for="cell-height-slider">Cell height:</label>
217
- <input
218
- type="range"
219
- min="10"
220
- max="100"
221
- value="29"
222
- step="0.1"
223
- id="cell-height-slider"
224
- @input=${this.heightChanged}
225
- />
226
- <span>${this.cellHeight}rem</span>
227
- </div>
228
- <div>
229
- <label for="cell-row-gap-slider">Row gap:</label>
230
- <input
231
- type="range"
232
- min="0"
233
- max="5"
234
- value="1.7"
235
- step="0.1"
236
- id="cell-row-gap-slider"
237
- @input=${this.rowGapChanged}
238
- />
239
- <span>${this.rowGap}rem</span>
240
- </div>
241
- <div>
242
- <label for="cell-col-gap-slider">Col gap:</label>
243
- <input
244
- type="range"
245
- min="0"
246
- max="5"
247
- value="1.7"
248
- step="0.1"
249
- id="cell-col-gap-slider"
250
- @input=${this.colGapChanged}
251
- />
252
- <span>${this.colGap}rem</span>
253
- </div>
254
- </fieldset>
255
-
256
- <fieldset class="other-controls">
257
- <legend>Other Controls</legend>
258
- <div class="checkbox-control">
259
- <input
260
- type="checkbox"
261
- id="simulate-login"
262
- @click=${this.loginChanged}
263
- />
264
- <label for="simulate-login">Simulate login</label>
265
- </div>
266
- <div class="checkbox-control">
267
- <input
268
- type="checkbox"
269
- id="enable-date-picker"
270
- checked
271
- @click=${this.datePickerChanged}
272
- />
273
- <label for="enable-date-picker">Enable date picker</label>
274
- </div>
275
- <div class="checkbox-control">
276
- <input
277
- type="checkbox"
278
- id="enable-facets"
279
- checked
280
- @click=${this.facetsChanged}
281
- />
282
- <label for="enable-facets">Enable facets</label>
283
- </div>
284
- <div class="checkbox-control indent">
285
- <input
286
- type="checkbox"
287
- id="lazy-load-facets"
288
- ?disabled=${this.suppressFacets}
289
- @click=${this.lazyLoadFacetsChanged}
290
- />
291
- <label for="lazy-load-facets">Lazy load facets</label>
292
- </div>
293
- <div class="checkbox-control">
294
- <input
295
- type="checkbox"
296
- id="enable-management"
297
- @click=${this.manageModeCheckboxChanged}
298
- />
299
- <label for="enable-management">Enable manage mode</label>
300
- </div>
301
- <div class="checkbox-control indent">
302
- <input
303
- type="checkbox"
304
- id="enable-search-management"
305
- @click=${this.SearchManageModeCheckboxChanged}
306
- />
307
- <label for="enable-search-management">Search</label>
308
- </div>
309
- <div class="checkbox-control">
310
- <input
311
- type="checkbox"
312
- id="enable-smart-facet-bar"
313
- @click=${this.smartFacetBarCheckboxChanged}
314
- />
315
- <label for="enable-smart-facet-bar">Enable smart facet bar</label>
316
- </div>
317
- </fieldset>
318
-
319
- <fieldset class="cb-visual-appearance">
320
- <legend>CB Visual Appearance</legend>
321
- <div class="checkbox-control">
322
- <input
323
- type="checkbox"
324
- id="show-facet-group-outline-check"
325
- @click=${this.toggleFacetGroupOutline}
326
- />
327
- <label for="show-facet-group-outline-check">
328
- Show facet group outlines
329
- </label>
330
- </div>
331
- <div class="checkbox-control">
332
- <input
333
- type="checkbox"
334
- id="show-outline-check"
335
- @click=${this.outlineChanged}
336
- />
337
- <label for="show-outline-check">Show cell outlines</label>
338
- </div>
339
- </fieldset>
340
-
341
- <fieldset class="user-profile-controls">
342
- <legend>User Profile Controls</legend>
343
- <div class="checkbox-control">
344
- <input
345
- type="checkbox"
346
- id="enable-facet-top-slot"
347
- @click=${this.facetTopSlotCheckboxChanged}
348
- />
349
- <label for="enable-facet-top-slot">Show facet top slot</label>
350
- </div>
351
- <div class="checkbox-control">
352
- <input
353
- type="checkbox"
354
- id="enable-cb-top-slot"
355
- @click=${this.cbTopSlotCheckboxChanged}
356
- />
357
- <label for="enable-cb-top-slot">Show CB top slot</label>
358
- </div>
359
- <div class="checkbox-control">
360
- <input
361
- type="checkbox"
362
- id="enable-sortbar-left-slot"
363
- @click=${this.sortBarLeftSlotCheckboxChanged}
364
- />
365
- <label for="enable-sortbar-left-slot"
366
- >Show sortbar left slot</label
367
- >
368
- </div>
369
- <div class="checkbox-control">
370
- <input
371
- type="checkbox"
372
- id="enable-sortbar-right-slot"
373
- @click=${this.sortBarRightSlotCheckboxChanged}
374
- />
375
- <label for="enable-sortbar-right-slot"
376
- >Show sortbar right slot</label
377
- >
378
- </div>
379
- <div class="checkbox-control">
380
- <input
381
- type="checkbox"
382
- id="enable-result-last-tile-slot"
383
- @click=${this.resultLastTileSlotCheckboxChanged}
384
- />
385
- <label for="enable-result-last-tile-slot">
386
- Show result last tile slot
387
- </label>
388
- </div>
389
- <div class="checkbox-control">
390
- <input
391
- type="checkbox"
392
- id="enable-replaced-sort-options"
393
- @click=${this.replaceSortOptionsChanged}
394
- />
395
- <label for="enable-replaced-sort-options">
396
- Show replaced sort options
397
- </label>
398
- </div>
399
- </fieldset>
400
-
401
- <fieldset class="user-profile-controls">
402
- <legend>Set Placeholder Types</legend>
403
- <div class="checkbox-control">
404
- <input
405
- id="enable-loading-placeholder"
406
- type="radio"
407
- @click=${() => this.setPlaceholderType('loading-placeholder')}
408
- name="placeholder-radio"
409
- />
410
- <label for="enable-loading-placeholder"
411
- >Loading Placeholder</label
412
- >
413
- </div>
414
- <div class="checkbox-control">
415
- <input
416
- id="enable-empty-placeholder"
417
- type="radio"
418
- @click=${() => this.setPlaceholderType('error-placeholder')}
419
- value="empty-placeholder"
420
- name="placeholder-radio"
421
- />
422
- <label for="enable-empty-placeholder">Empty Placeholder</label>
423
- </div>
424
- </fieldset>
425
- </div>
426
- <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
427
- Toggle Search Controls
428
- </button>
429
- </div>
430
- <div id="collection-browser-container">
431
- <collection-browser
432
- facetPaneVisible
433
- .baseNavigationUrl=${'https://archive.org'}
434
- .baseImageUrl=${'https://archive.org'}
435
- .searchService=${this.searchService}
436
- .resizeObserver=${this.resizeObserver}
437
- .showHistogramDatePicker=${true}
438
- .suppressFacets=${this.suppressFacets}
439
- .lazyLoadFacets=${this.lazyLoadFacets}
440
- .loggedIn=${this.loggedIn}
441
- .modalManager=${this.modalManager}
442
- .analyticsHandler=${this.analyticsHandler}
443
- .pageContext=${'search'}
444
- @visiblePageChanged=${this.visiblePageChanged}
445
- @baseQueryChanged=${this.baseQueryChanged}
446
- @searchTypeChanged=${this.searchTypeChanged}
447
- @manageModeChanged=${this.manageModeChanged}
448
- @itemRemovalRequested=${this.handleItemRemovalRequest}
449
- @itemManagerRequested=${this.handleItemManagerRequest}
450
- >
187
+ }}
188
+ >
189
+ Last Event Captured
190
+ </button>
191
+ </div>
192
+
193
+ <div id="last-event">
194
+ <pre id="latest-event-details" class="hidden">
195
+ ${JSON.stringify(this.latestAction, null, 2)}
196
+ </pre
197
+ >
198
+ </div>
199
+
200
+ <fieldset class="cell-controls">
201
+ <legend>Cell Controls</legend>
202
+ <div>
203
+ <label for="cell-width-slider">Cell width:</label>
204
+ <input
205
+ type="range"
206
+ min="10"
207
+ max="100"
208
+ value="18"
209
+ step="0.1"
210
+ id="cell-width-slider"
211
+ @input=${this.widthChanged}
212
+ />
213
+ <span>${this.cellWidth}rem</span>
214
+ </div>
215
+ <div>
216
+ <label for="cell-height-slider">Cell height:</label>
217
+ <input
218
+ type="range"
219
+ min="10"
220
+ max="100"
221
+ value="29"
222
+ step="0.1"
223
+ id="cell-height-slider"
224
+ @input=${this.heightChanged}
225
+ />
226
+ <span>${this.cellHeight}rem</span>
227
+ </div>
228
+ <div>
229
+ <label for="cell-row-gap-slider">Row gap:</label>
230
+ <input
231
+ type="range"
232
+ min="0"
233
+ max="5"
234
+ value="1.7"
235
+ step="0.1"
236
+ id="cell-row-gap-slider"
237
+ @input=${this.rowGapChanged}
238
+ />
239
+ <span>${this.rowGap}rem</span>
240
+ </div>
241
+ <div>
242
+ <label for="cell-col-gap-slider">Col gap:</label>
243
+ <input
244
+ type="range"
245
+ min="0"
246
+ max="5"
247
+ value="1.7"
248
+ step="0.1"
249
+ id="cell-col-gap-slider"
250
+ @input=${this.colGapChanged}
251
+ />
252
+ <span>${this.colGap}rem</span>
253
+ </div>
254
+ </fieldset>
255
+
256
+ <fieldset class="other-controls">
257
+ <legend>Other Controls</legend>
258
+ <div class="checkbox-control">
259
+ <input
260
+ type="checkbox"
261
+ id="simulate-login"
262
+ @click=${this.loginChanged}
263
+ />
264
+ <label for="simulate-login">Simulate login</label>
265
+ </div>
266
+ <div class="checkbox-control">
267
+ <input
268
+ type="checkbox"
269
+ id="enable-date-picker"
270
+ checked
271
+ @click=${this.datePickerChanged}
272
+ />
273
+ <label for="enable-date-picker">Enable date picker</label>
274
+ </div>
275
+ <div class="checkbox-control">
276
+ <input
277
+ type="checkbox"
278
+ id="enable-facets"
279
+ checked
280
+ @click=${this.facetsChanged}
281
+ />
282
+ <label for="enable-facets">Enable facets</label>
283
+ </div>
284
+ <div class="checkbox-control indent">
285
+ <input
286
+ type="checkbox"
287
+ id="lazy-load-facets"
288
+ ?disabled=${this.suppressFacets}
289
+ @click=${this.lazyLoadFacetsChanged}
290
+ />
291
+ <label for="lazy-load-facets">Lazy load facets</label>
292
+ </div>
293
+ <div class="checkbox-control">
294
+ <input
295
+ type="checkbox"
296
+ id="enable-management"
297
+ @click=${this.manageModeCheckboxChanged}
298
+ />
299
+ <label for="enable-management">Enable manage mode</label>
300
+ </div>
301
+ <div class="checkbox-control indent">
302
+ <input
303
+ type="checkbox"
304
+ id="enable-search-management"
305
+ @click=${this.SearchManageModeCheckboxChanged}
306
+ />
307
+ <label for="enable-search-management">Search</label>
308
+ </div>
309
+ <div class="checkbox-control">
310
+ <input
311
+ type="checkbox"
312
+ id="enable-smart-facet-bar"
313
+ @click=${this.smartFacetBarCheckboxChanged}
314
+ />
315
+ <label for="enable-smart-facet-bar">Enable smart facet bar</label>
316
+ </div>
317
+ </fieldset>
318
+
319
+ <fieldset class="cb-visual-appearance">
320
+ <legend>CB Visual Appearance</legend>
321
+ <div class="checkbox-control">
322
+ <input
323
+ type="checkbox"
324
+ id="show-facet-group-outline-check"
325
+ @click=${this.toggleFacetGroupOutline}
326
+ />
327
+ <label for="show-facet-group-outline-check">
328
+ Show facet group outlines
329
+ </label>
330
+ </div>
331
+ <div class="checkbox-control">
332
+ <input
333
+ type="checkbox"
334
+ id="show-outline-check"
335
+ @click=${this.outlineChanged}
336
+ />
337
+ <label for="show-outline-check">Show cell outlines</label>
338
+ </div>
339
+ </fieldset>
340
+
341
+ <fieldset class="user-profile-controls">
342
+ <legend>User Profile Controls</legend>
343
+ <div class="checkbox-control">
344
+ <input
345
+ type="checkbox"
346
+ id="enable-facet-top-slot"
347
+ @click=${this.facetTopSlotCheckboxChanged}
348
+ />
349
+ <label for="enable-facet-top-slot">Show facet top slot</label>
350
+ </div>
351
+ <div class="checkbox-control">
352
+ <input
353
+ type="checkbox"
354
+ id="enable-cb-top-slot"
355
+ @click=${this.cbTopSlotCheckboxChanged}
356
+ />
357
+ <label for="enable-cb-top-slot">Show CB top slot</label>
358
+ </div>
359
+ <div class="checkbox-control">
360
+ <input
361
+ type="checkbox"
362
+ id="enable-sortbar-left-slot"
363
+ @click=${this.sortBarLeftSlotCheckboxChanged}
364
+ />
365
+ <label for="enable-sortbar-left-slot"
366
+ >Show sortbar left slot</label
367
+ >
368
+ </div>
369
+ <div class="checkbox-control">
370
+ <input
371
+ type="checkbox"
372
+ id="enable-sortbar-right-slot"
373
+ @click=${this.sortBarRightSlotCheckboxChanged}
374
+ />
375
+ <label for="enable-sortbar-right-slot"
376
+ >Show sortbar right slot</label
377
+ >
378
+ </div>
379
+ <div class="checkbox-control">
380
+ <input
381
+ type="checkbox"
382
+ id="enable-result-last-tile-slot"
383
+ @click=${this.resultLastTileSlotCheckboxChanged}
384
+ />
385
+ <label for="enable-result-last-tile-slot">
386
+ Show result last tile slot
387
+ </label>
388
+ </div>
389
+ <div class="checkbox-control">
390
+ <input
391
+ type="checkbox"
392
+ id="enable-replaced-sort-options"
393
+ @click=${this.replaceSortOptionsChanged}
394
+ />
395
+ <label for="enable-replaced-sort-options">
396
+ Show replaced sort options
397
+ </label>
398
+ </div>
399
+ </fieldset>
400
+
401
+ <fieldset class="user-profile-controls">
402
+ <legend>Set Placeholder Types</legend>
403
+ <div class="checkbox-control">
404
+ <input
405
+ id="enable-loading-placeholder"
406
+ type="radio"
407
+ @click=${() => this.setPlaceholderType('loading-placeholder')}
408
+ name="placeholder-radio"
409
+ />
410
+ <label for="enable-loading-placeholder"
411
+ >Loading Placeholder</label
412
+ >
413
+ </div>
414
+ <div class="checkbox-control">
415
+ <input
416
+ id="enable-empty-placeholder"
417
+ type="radio"
418
+ @click=${() => this.setPlaceholderType('error-placeholder')}
419
+ value="empty-placeholder"
420
+ name="placeholder-radio"
421
+ />
422
+ <label for="enable-empty-placeholder">Empty Placeholder</label>
423
+ </div>
424
+ </fieldset>
425
+ </div>
426
+ <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
427
+ Toggle Search Controls
428
+ </button>
429
+ </div>
430
+ <div id="collection-browser-container">
431
+ <collection-browser
432
+ facetPaneVisible
433
+ .baseNavigationUrl=${'https://archive.org'}
434
+ .baseImageUrl=${'https://archive.org'}
435
+ .searchService=${this.searchService}
436
+ .resizeObserver=${this.resizeObserver}
437
+ .showHistogramDatePicker=${true}
438
+ .suppressFacets=${this.suppressFacets}
439
+ .lazyLoadFacets=${this.lazyLoadFacets}
440
+ .loggedIn=${this.loggedIn}
441
+ .modalManager=${this.modalManager}
442
+ .analyticsHandler=${this.analyticsHandler}
443
+ .pageContext=${'search'}
444
+ @visiblePageChanged=${this.visiblePageChanged}
445
+ @baseQueryChanged=${this.baseQueryChanged}
446
+ @searchTypeChanged=${this.searchTypeChanged}
447
+ @manageModeChanged=${this.manageModeChanged}
448
+ @itemRemovalRequested=${this.handleItemRemovalRequest}
449
+ @itemManagerRequested=${this.handleItemManagerRequest}
450
+ >
451
451
  ${this.toggleSlots
452
452
  ? html `<div slot="sortbar-left-slot">Sort Slot</div>`
453
- : nothing}
453
+ : nothing}
454
454
  ${this.toggleSlots
455
455
  ? html `<div slot="facet-top-slot">Facet Slot</div>`
456
- : nothing}
457
- </collection-browser>
458
- </div>
459
- <modal-manager></modal-manager>
456
+ : nothing}
457
+ </collection-browser>
458
+ </div>
459
+ <modal-manager></modal-manager>
460
460
  `;
461
461
  }
462
462
  async setPlaceholderType(type) {
@@ -764,246 +764,246 @@ let AppRoot = class AppRoot extends LitElement {
764
764
  this.collectionBrowser.enableSortOptionsSlot = false;
765
765
  }
766
766
  }
767
- static { this.styles = css `
768
- :host {
769
- display: block;
770
- --primaryButtonBGColor: #194880;
771
- --ia-theme-link-color: #4b64ff;
772
- }
773
-
774
- /* add the following styles to ensure proper modal visibility */
775
- body.modal-manager-open {
776
- overflow: hidden;
777
- }
778
- modal-manager {
779
- display: none;
780
- }
781
- modal-manager[mode='open'] {
782
- display: block;
783
- }
784
- modal-manager.remove-items {
785
- --modalWidth: 58rem;
786
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
787
- --modalTitleLineHeight: 4rem;
788
- --modalTitleFontSize: 1.8rem;
789
- }
790
- modal-manager.more-search-facets {
791
- --modalWidth: 85rem;
792
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
793
- --modalTitleLineHeight: 4rem;
794
- --modalTitleFontSize: 1.8rem;
795
- --modalCornerRadius: 0;
796
- --modalBottomPadding: 0;
797
- --modalBottomMargin: 0;
798
- --modalScrollOffset: 0;
799
- --modalCornerRadius: 0.5rem;
800
- }
801
- modal-manager.expanded-date-picker {
802
- --modalWidth: 58rem;
803
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
804
- --modalTitleLineHeight: 4rem;
805
- --modalTitleFontSize: 1.8rem;
806
- --modalCornerRadius: 0;
807
- --modalBottomPadding: 0;
808
- --modalBottomMargin: 0;
809
- --modalScrollOffset: 0;
810
- --modalCornerRadius: 0.5rem;
811
- }
812
-
813
- input,
814
- button {
815
- font-size: 1.6rem;
816
- }
817
-
818
- modal-manager.showFacetGroupOutlines,
819
- collection-browser.showFacetGroupOutlines {
820
- --facet-row-border-top: 1px solid red;
821
- --facet-row-border-bottom: 1px solid blue;
822
- }
823
-
824
- collection-browser {
825
- /* Same as production */
826
- max-width: 135rem;
827
- margin: auto;
828
- }
829
-
830
- #collection-browser-container {
831
- /* Same as production */
832
- padding-left: 0.5rem;
833
- margin-bottom: 2rem;
834
- }
835
-
836
- #base-query-field {
837
- width: 300px;
838
- }
839
-
840
- .dev-tool-container {
841
- position: relative;
842
- }
843
- #dev-tools {
844
- position: relative;
845
- top: 0;
846
- left: 0;
847
- z-index: 1;
848
- -webkit-backdrop-filter: blur(10px);
849
- backdrop-filter: blur(10px);
850
- padding: 0.5rem 1rem;
851
- border: 1px solid black;
852
- font-size: 1.4rem;
853
- background: #ffffffb3;
854
- }
855
-
856
- #dev-tools > * {
857
- display: flex;
858
- }
859
-
860
- #toggle-dev-tools-btn {
861
- position: fixed;
862
- left: 77.4%;
863
- top: 0;
864
- background: red;
865
- padding: 5px;
866
- color: white;
867
- font-size: 1.4rem;
868
- margin: 0;
869
- z-index: 1;
870
- cursor: pointer;
871
- }
872
-
873
- #search-and-page-inputs {
874
- flex-wrap: wrap;
875
- row-gap: 2px;
876
- }
877
-
878
- #search-and-page-inputs > form {
879
- margin-right: 1rem;
880
- }
881
-
882
- #search-and-page-inputs label {
883
- display: inline-block;
884
- min-width: 50px;
885
- }
886
-
887
- #page-number-input {
888
- width: 75px;
889
- }
890
-
891
- .search-type {
892
- margin-right: 1rem;
893
- }
894
-
895
- .cell-controls {
896
- display: flex;
897
- flex-wrap: wrap;
898
- }
899
- .cell-controls div {
900
- display: flex;
901
- align-items: center;
902
- }
903
- .cell-controls input[type='range'] {
904
- width: 120px;
905
- }
906
- #cell-controls label {
907
- display: inline-block;
908
- width: 10rem;
909
- }
910
-
911
- #cell-size-control,
912
- #cell-gap-control {
913
- flex-basis: calc(50% - 1rem);
914
- flex-grow: 1;
915
- }
916
-
917
- #cell-gap-control {
918
- margin-left: 1rem;
919
- }
920
-
921
- #checkbox-controls {
922
- padding-top: 0.5rem;
923
- flex-wrap: wrap;
924
- }
925
-
926
- .checkbox-control {
927
- flex-basis: 50%;
928
- }
929
- .checkbox-control.indent {
930
- margin-left: 10px;
931
- }
932
- .checkbox-control label {
933
- user-select: none;
934
- }
935
-
936
- #last-event {
937
- background-color: aliceblue;
938
- padding: 5px;
939
- margin: 5px auto;
940
- }
941
-
942
- .hidden {
943
- display: none;
944
- }
945
-
946
- #toggle-controls {
947
- background-color: lightskyblue;
948
- padding: 5px;
949
- margin: 5px auto;
950
- }
951
-
952
- #search-types {
953
- margin: 5px auto;
954
- background-color: aliceblue;
955
- font-size: 1.6rem;
956
- }
957
-
958
- // slots
959
- div[slot='cb-top-slot'] {
960
- height: 50px;
961
- border: 1px solid red;
962
- background: bisque;
963
- }
964
- div[slot='facet-top-slot'] {
965
- border: 1px solid red;
966
- width: 100%;
967
- height: 150px;
968
- background-color: darkseagreen;
969
- }
970
- div[slot='sort-slot-left'] {
971
- height: 50px;
972
- border: 1px solid red;
973
- background: bisque;
974
- }
975
-
976
- /* user profile controls */
977
- .user-profile-controls {
978
- width: fit-content;
979
- }
980
-
981
- fieldset {
982
- display: inline-block !important;
983
- }
984
-
985
- .result-last-tile {
986
- border-radius: 4px;
987
- background-color: white;
988
- border: 3px dashed #555;
989
- box-shadow: none;
990
- display: grid;
991
- align-content: center;
992
- }
993
- .result-last-tile:hover {
994
- box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
995
- transition: box-shadow 0.1s ease 0s;
996
- cursor: pointer;
997
- border: 3px dashed #4b64ff;
998
- }
999
- .result-last-tile h3 {
1000
- margin-bottom: 4rem;
1001
- margin: 0px auto;
1002
- font-size: 2.8rem;
1003
- color: rgb(44, 44, 44);
1004
- font-weight: 200;
1005
- text-align: center;
1006
- }
767
+ static { this.styles = css `
768
+ :host {
769
+ display: block;
770
+ --primaryButtonBGColor: #194880;
771
+ --ia-theme-link-color: #4b64ff;
772
+ }
773
+
774
+ /* add the following styles to ensure proper modal visibility */
775
+ body.modal-manager-open {
776
+ overflow: hidden;
777
+ }
778
+ modal-manager {
779
+ display: none;
780
+ }
781
+ modal-manager[mode='open'] {
782
+ display: block;
783
+ }
784
+ modal-manager.remove-items {
785
+ --modalWidth: 58rem;
786
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
787
+ --modalTitleLineHeight: 4rem;
788
+ --modalTitleFontSize: 1.8rem;
789
+ }
790
+ modal-manager.more-search-facets {
791
+ --modalWidth: 85rem;
792
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
793
+ --modalTitleLineHeight: 4rem;
794
+ --modalTitleFontSize: 1.8rem;
795
+ --modalCornerRadius: 0;
796
+ --modalBottomPadding: 0;
797
+ --modalBottomMargin: 0;
798
+ --modalScrollOffset: 0;
799
+ --modalCornerRadius: 0.5rem;
800
+ }
801
+ modal-manager.expanded-date-picker {
802
+ --modalWidth: 58rem;
803
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
804
+ --modalTitleLineHeight: 4rem;
805
+ --modalTitleFontSize: 1.8rem;
806
+ --modalCornerRadius: 0;
807
+ --modalBottomPadding: 0;
808
+ --modalBottomMargin: 0;
809
+ --modalScrollOffset: 0;
810
+ --modalCornerRadius: 0.5rem;
811
+ }
812
+
813
+ input,
814
+ button {
815
+ font-size: 1.6rem;
816
+ }
817
+
818
+ modal-manager.showFacetGroupOutlines,
819
+ collection-browser.showFacetGroupOutlines {
820
+ --facet-row-border-top: 1px solid red;
821
+ --facet-row-border-bottom: 1px solid blue;
822
+ }
823
+
824
+ collection-browser {
825
+ /* Same as production */
826
+ max-width: 135rem;
827
+ margin: auto;
828
+ }
829
+
830
+ #collection-browser-container {
831
+ /* Same as production */
832
+ padding-left: 0.5rem;
833
+ margin-bottom: 2rem;
834
+ }
835
+
836
+ #base-query-field {
837
+ width: 300px;
838
+ }
839
+
840
+ .dev-tool-container {
841
+ position: relative;
842
+ }
843
+ #dev-tools {
844
+ position: relative;
845
+ top: 0;
846
+ left: 0;
847
+ z-index: 1;
848
+ -webkit-backdrop-filter: blur(10px);
849
+ backdrop-filter: blur(10px);
850
+ padding: 0.5rem 1rem;
851
+ border: 1px solid black;
852
+ font-size: 1.4rem;
853
+ background: #ffffffb3;
854
+ }
855
+
856
+ #dev-tools > * {
857
+ display: flex;
858
+ }
859
+
860
+ #toggle-dev-tools-btn {
861
+ position: fixed;
862
+ left: 77.4%;
863
+ top: 0;
864
+ background: red;
865
+ padding: 5px;
866
+ color: white;
867
+ font-size: 1.4rem;
868
+ margin: 0;
869
+ z-index: 1;
870
+ cursor: pointer;
871
+ }
872
+
873
+ #search-and-page-inputs {
874
+ flex-wrap: wrap;
875
+ row-gap: 2px;
876
+ }
877
+
878
+ #search-and-page-inputs > form {
879
+ margin-right: 1rem;
880
+ }
881
+
882
+ #search-and-page-inputs label {
883
+ display: inline-block;
884
+ min-width: 50px;
885
+ }
886
+
887
+ #page-number-input {
888
+ width: 75px;
889
+ }
890
+
891
+ .search-type {
892
+ margin-right: 1rem;
893
+ }
894
+
895
+ .cell-controls {
896
+ display: flex;
897
+ flex-wrap: wrap;
898
+ }
899
+ .cell-controls div {
900
+ display: flex;
901
+ align-items: center;
902
+ }
903
+ .cell-controls input[type='range'] {
904
+ width: 120px;
905
+ }
906
+ #cell-controls label {
907
+ display: inline-block;
908
+ width: 10rem;
909
+ }
910
+
911
+ #cell-size-control,
912
+ #cell-gap-control {
913
+ flex-basis: calc(50% - 1rem);
914
+ flex-grow: 1;
915
+ }
916
+
917
+ #cell-gap-control {
918
+ margin-left: 1rem;
919
+ }
920
+
921
+ #checkbox-controls {
922
+ padding-top: 0.5rem;
923
+ flex-wrap: wrap;
924
+ }
925
+
926
+ .checkbox-control {
927
+ flex-basis: 50%;
928
+ }
929
+ .checkbox-control.indent {
930
+ margin-left: 10px;
931
+ }
932
+ .checkbox-control label {
933
+ user-select: none;
934
+ }
935
+
936
+ #last-event {
937
+ background-color: aliceblue;
938
+ padding: 5px;
939
+ margin: 5px auto;
940
+ }
941
+
942
+ .hidden {
943
+ display: none;
944
+ }
945
+
946
+ #toggle-controls {
947
+ background-color: lightskyblue;
948
+ padding: 5px;
949
+ margin: 5px auto;
950
+ }
951
+
952
+ #search-types {
953
+ margin: 5px auto;
954
+ background-color: aliceblue;
955
+ font-size: 1.6rem;
956
+ }
957
+
958
+ // slots
959
+ div[slot='cb-top-slot'] {
960
+ height: 50px;
961
+ border: 1px solid red;
962
+ background: bisque;
963
+ }
964
+ div[slot='facet-top-slot'] {
965
+ border: 1px solid red;
966
+ width: 100%;
967
+ height: 150px;
968
+ background-color: darkseagreen;
969
+ }
970
+ div[slot='sort-slot-left'] {
971
+ height: 50px;
972
+ border: 1px solid red;
973
+ background: bisque;
974
+ }
975
+
976
+ /* user profile controls */
977
+ .user-profile-controls {
978
+ width: fit-content;
979
+ }
980
+
981
+ fieldset {
982
+ display: inline-block !important;
983
+ }
984
+
985
+ .result-last-tile {
986
+ border-radius: 4px;
987
+ background-color: white;
988
+ border: 3px dashed #555;
989
+ box-shadow: none;
990
+ display: grid;
991
+ align-content: center;
992
+ }
993
+ .result-last-tile:hover {
994
+ box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
995
+ transition: box-shadow 0.1s ease 0s;
996
+ cursor: pointer;
997
+ border: 3px dashed #4b64ff;
998
+ }
999
+ .result-last-tile h3 {
1000
+ margin-bottom: 4rem;
1001
+ margin: 0px auto;
1002
+ font-size: 2.8rem;
1003
+ color: rgb(44, 44, 44);
1004
+ font-weight: 200;
1005
+ text-align: center;
1006
+ }
1007
1007
  `; }
1008
1008
  };
1009
1009
  __decorate([