@internetarchive/collection-browser 4.5.0 → 4.5.1-alpha-webdev8221.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 (70) hide show
  1. package/dist/index.js.map +1 -1
  2. package/dist/src/app-root.js +683 -683
  3. package/dist/src/app-root.js.map +1 -1
  4. package/dist/src/collection-browser.d.ts +0 -4
  5. package/dist/src/collection-browser.js +767 -776
  6. package/dist/src/collection-browser.js.map +1 -1
  7. package/dist/src/collection-facets/facet-row.js +143 -143
  8. package/dist/src/collection-facets/facet-row.js.map +1 -1
  9. package/dist/src/collection-facets/facets-template.js +24 -24
  10. package/dist/src/collection-facets/facets-template.js.map +1 -1
  11. package/dist/src/data-source/collection-browser-data-source-interface.d.ts +5 -0
  12. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  13. package/dist/src/data-source/collection-browser-data-source.d.ts +1 -1
  14. package/dist/src/data-source/collection-browser-data-source.js +8 -6
  15. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  16. package/dist/src/restoration-state-handler.js +2 -4
  17. package/dist/src/restoration-state-handler.js.map +1 -1
  18. package/dist/src/styles/tile-action-styles.js +43 -43
  19. package/dist/src/styles/tile-action-styles.js.map +1 -1
  20. package/dist/src/tiles/base-tile-component.js +11 -11
  21. package/dist/src/tiles/base-tile-component.js.map +1 -1
  22. package/dist/src/tiles/grid/item-tile.js +138 -138
  23. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  24. package/dist/src/tiles/list/tile-list-compact-header.js +62 -62
  25. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  26. package/dist/src/tiles/list/tile-list-compact.js +123 -123
  27. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  28. package/dist/src/tiles/list/tile-list.js +310 -310
  29. package/dist/src/tiles/list/tile-list.js.map +1 -1
  30. package/dist/src/tiles/models.js.map +1 -1
  31. package/dist/src/tiles/tile-dispatcher.js +286 -286
  32. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  33. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  34. package/dist/src/utils/date-filter-field.d.ts +6 -0
  35. package/dist/src/utils/date-filter-field.js +9 -0
  36. package/dist/src/utils/date-filter-field.js.map +1 -0
  37. package/dist/test/collection-browser.test.js +81 -0
  38. package/dist/test/collection-browser.test.js.map +1 -1
  39. package/dist/test/collection-facets/facet-row.test.js +31 -31
  40. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  41. package/dist/test/tiles/grid/item-tile.test.js +77 -77
  42. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  43. package/dist/test/tiles/list/tile-list.test.js +134 -134
  44. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  45. package/dist/test/tiles/tile-dispatcher.test.js +92 -92
  46. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  47. package/index.ts +29 -29
  48. package/package.json +1 -1
  49. package/src/app-root.ts +1284 -1284
  50. package/src/collection-browser.ts +3165 -3176
  51. package/src/collection-facets/facet-row.ts +309 -309
  52. package/src/collection-facets/facets-template.ts +85 -85
  53. package/src/data-source/collection-browser-data-source-interface.ts +6 -0
  54. package/src/data-source/collection-browser-data-source.ts +16 -7
  55. package/src/restoration-state-handler.ts +5 -5
  56. package/src/styles/tile-action-styles.ts +59 -59
  57. package/src/tiles/base-tile-component.ts +124 -124
  58. package/src/tiles/grid/item-tile.ts +347 -347
  59. package/src/tiles/list/tile-list-compact-header.ts +112 -112
  60. package/src/tiles/list/tile-list-compact.ts +278 -278
  61. package/src/tiles/list/tile-list.ts +718 -718
  62. package/src/tiles/models.ts +21 -21
  63. package/src/tiles/tile-dispatcher.ts +637 -637
  64. package/src/tiles/tile-display-value-provider.ts +133 -133
  65. package/src/utils/date-filter-field.ts +11 -0
  66. package/test/collection-browser.test.ts +132 -0
  67. package/test/collection-facets/facet-row.test.ts +421 -421
  68. package/test/tiles/grid/item-tile.test.ts +520 -520
  69. package/test/tiles/list/tile-list.test.ts +576 -576
  70. package/test/tiles/tile-dispatcher.test.ts +320 -320
@@ -83,372 +83,372 @@ 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
- <div class="checkbox-control">
322
- <input
323
- type="checkbox"
324
- id="enable-tile-actions"
325
- @click=${this.tileActionsCheckboxChanged}
326
- />
327
- <label for="enable-tile-actions"
328
- >Enable tile action buttons</label
329
- >
330
- </div>
331
- </fieldset>
332
-
333
- <fieldset class="cb-visual-appearance">
334
- <legend>CB Visual Appearance</legend>
335
- <div class="checkbox-control">
336
- <input
337
- type="checkbox"
338
- id="show-facet-group-outline-check"
339
- @click=${this.toggleFacetGroupOutline}
340
- />
341
- <label for="show-facet-group-outline-check">
342
- Show facet group outlines
343
- </label>
344
- </div>
345
- <div class="checkbox-control">
346
- <input
347
- type="checkbox"
348
- id="show-outline-check"
349
- @click=${this.outlineChanged}
350
- />
351
- <label for="show-outline-check">Show cell outlines</label>
352
- </div>
353
- <div class="checkbox-control">
354
- <input
355
- type="checkbox"
356
- id="minimal-tiles-check"
357
- @click=${this.minimalTilesChanged}
358
- />
359
- <label for="minimal-tiles-check">Minimal tile layouts</label>
360
- </div>
361
- </fieldset>
362
-
363
- <fieldset class="user-profile-controls">
364
- <legend>User Profile Controls</legend>
365
- <div class="checkbox-control">
366
- <input
367
- type="checkbox"
368
- id="enable-facet-top-slot"
369
- @click=${this.facetTopSlotCheckboxChanged}
370
- />
371
- <label for="enable-facet-top-slot">Show facet top slot</label>
372
- </div>
373
- <div class="checkbox-control">
374
- <input
375
- type="checkbox"
376
- id="enable-cb-top-slot"
377
- @click=${this.cbTopSlotCheckboxChanged}
378
- />
379
- <label for="enable-cb-top-slot">Show CB top slot</label>
380
- </div>
381
- <div class="checkbox-control">
382
- <input
383
- type="checkbox"
384
- id="enable-sortbar-left-slot"
385
- @click=${this.sortBarLeftSlotCheckboxChanged}
386
- />
387
- <label for="enable-sortbar-left-slot"
388
- >Show sortbar left slot</label
389
- >
390
- </div>
391
- <div class="checkbox-control">
392
- <input
393
- type="checkbox"
394
- id="enable-sortbar-right-slot"
395
- @click=${this.sortBarRightSlotCheckboxChanged}
396
- />
397
- <label for="enable-sortbar-right-slot"
398
- >Show sortbar right slot</label
399
- >
400
- </div>
401
- <div class="checkbox-control">
402
- <input
403
- type="checkbox"
404
- id="enable-result-last-tile-slot"
405
- @click=${this.resultLastTileSlotCheckboxChanged}
406
- />
407
- <label for="enable-result-last-tile-slot">
408
- Show result last tile slot
409
- </label>
410
- </div>
411
- <div class="checkbox-control">
412
- <input
413
- type="checkbox"
414
- id="enable-replaced-sort-options"
415
- @click=${this.replaceSortOptionsChanged}
416
- />
417
- <label for="enable-replaced-sort-options">
418
- Show replaced sort options
419
- </label>
420
- </div>
421
- <div class="text-input-control">
422
- <label for="within-profile-input">withinProfile</label>
423
- <input
424
- type="text"
425
- id="within-profile-input"
426
- 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
+ <div class="checkbox-control">
322
+ <input
323
+ type="checkbox"
324
+ id="enable-tile-actions"
325
+ @click=${this.tileActionsCheckboxChanged}
326
+ />
327
+ <label for="enable-tile-actions"
328
+ >Enable tile action buttons</label
329
+ >
330
+ </div>
331
+ </fieldset>
332
+
333
+ <fieldset class="cb-visual-appearance">
334
+ <legend>CB Visual Appearance</legend>
335
+ <div class="checkbox-control">
336
+ <input
337
+ type="checkbox"
338
+ id="show-facet-group-outline-check"
339
+ @click=${this.toggleFacetGroupOutline}
340
+ />
341
+ <label for="show-facet-group-outline-check">
342
+ Show facet group outlines
343
+ </label>
344
+ </div>
345
+ <div class="checkbox-control">
346
+ <input
347
+ type="checkbox"
348
+ id="show-outline-check"
349
+ @click=${this.outlineChanged}
350
+ />
351
+ <label for="show-outline-check">Show cell outlines</label>
352
+ </div>
353
+ <div class="checkbox-control">
354
+ <input
355
+ type="checkbox"
356
+ id="minimal-tiles-check"
357
+ @click=${this.minimalTilesChanged}
358
+ />
359
+ <label for="minimal-tiles-check">Minimal tile layouts</label>
360
+ </div>
361
+ </fieldset>
362
+
363
+ <fieldset class="user-profile-controls">
364
+ <legend>User Profile Controls</legend>
365
+ <div class="checkbox-control">
366
+ <input
367
+ type="checkbox"
368
+ id="enable-facet-top-slot"
369
+ @click=${this.facetTopSlotCheckboxChanged}
370
+ />
371
+ <label for="enable-facet-top-slot">Show facet top slot</label>
372
+ </div>
373
+ <div class="checkbox-control">
374
+ <input
375
+ type="checkbox"
376
+ id="enable-cb-top-slot"
377
+ @click=${this.cbTopSlotCheckboxChanged}
378
+ />
379
+ <label for="enable-cb-top-slot">Show CB top slot</label>
380
+ </div>
381
+ <div class="checkbox-control">
382
+ <input
383
+ type="checkbox"
384
+ id="enable-sortbar-left-slot"
385
+ @click=${this.sortBarLeftSlotCheckboxChanged}
386
+ />
387
+ <label for="enable-sortbar-left-slot"
388
+ >Show sortbar left slot</label
389
+ >
390
+ </div>
391
+ <div class="checkbox-control">
392
+ <input
393
+ type="checkbox"
394
+ id="enable-sortbar-right-slot"
395
+ @click=${this.sortBarRightSlotCheckboxChanged}
396
+ />
397
+ <label for="enable-sortbar-right-slot"
398
+ >Show sortbar right slot</label
399
+ >
400
+ </div>
401
+ <div class="checkbox-control">
402
+ <input
403
+ type="checkbox"
404
+ id="enable-result-last-tile-slot"
405
+ @click=${this.resultLastTileSlotCheckboxChanged}
406
+ />
407
+ <label for="enable-result-last-tile-slot">
408
+ Show result last tile slot
409
+ </label>
410
+ </div>
411
+ <div class="checkbox-control">
412
+ <input
413
+ type="checkbox"
414
+ id="enable-replaced-sort-options"
415
+ @click=${this.replaceSortOptionsChanged}
416
+ />
417
+ <label for="enable-replaced-sort-options">
418
+ Show replaced sort options
419
+ </label>
420
+ </div>
421
+ <div class="text-input-control">
422
+ <label for="within-profile-input">withinProfile</label>
423
+ <input
424
+ type="text"
425
+ id="within-profile-input"
426
+ placeholder="e.g. @foobar"
427
427
  @change=${(e) => {
428
428
  const val = e.target.value.trim();
429
429
  this.withinProfile = val || undefined;
430
- }}
431
- />
432
- </div>
433
- <details class="profile-element-controls">
434
- <summary>
435
- Profile tab
430
+ }}
431
+ />
432
+ </div>
433
+ <details class="profile-element-controls">
434
+ <summary>
435
+ Profile tab
436
436
  (profileElement)${this.profileElement
437
437
  ? html `: <strong>${this.profileElement}</strong>`
438
- : ''}
439
- </summary>
440
- <div class="profile-element-options">
441
- <div class="checkbox-control">
442
- <input
443
- type="radio"
444
- id="profile-none"
445
- name="profile-element"
446
- value=""
447
- checked
448
- @click=${this.profileElementChanged}
449
- />
450
- <label for="profile-none">None</label>
451
- </div>
438
+ : ''}
439
+ </summary>
440
+ <div class="profile-element-options">
441
+ <div class="checkbox-control">
442
+ <input
443
+ type="radio"
444
+ id="profile-none"
445
+ name="profile-element"
446
+ value=""
447
+ checked
448
+ @click=${this.profileElementChanged}
449
+ />
450
+ <label for="profile-none">None</label>
451
+ </div>
452
452
  ${[
453
453
  'uploads',
454
454
  'favorites',
@@ -457,84 +457,84 @@ let AppRoot = class AppRoot extends LitElement {
457
457
  'lending',
458
458
  'web_archives',
459
459
  'forum_posts',
460
- ].map(tab => html `
461
- <div class="checkbox-control">
462
- <input
463
- type="radio"
464
- id="profile-${tab}"
465
- name="profile-element"
466
- value="${tab}"
467
- @click=${this.profileElementChanged}
468
- />
469
- <label for="profile-${tab}">${tab}</label>
470
- </div>
471
- `)}
472
- </div>
473
- </details>
474
- </fieldset>
475
-
476
- <fieldset class="user-profile-controls">
477
- <legend>Set Placeholder Types</legend>
478
- <div class="checkbox-control">
479
- <input
480
- id="enable-loading-placeholder"
481
- type="radio"
482
- @click=${() => this.setPlaceholderType('loading-placeholder')}
483
- name="placeholder-radio"
484
- />
485
- <label for="enable-loading-placeholder"
486
- >Loading Placeholder</label
487
- >
488
- </div>
489
- <div class="checkbox-control">
490
- <input
491
- id="enable-empty-placeholder"
492
- type="radio"
493
- @click=${() => this.setPlaceholderType('error-placeholder')}
494
- value="empty-placeholder"
495
- name="placeholder-radio"
496
- />
497
- <label for="enable-empty-placeholder">Empty Placeholder</label>
498
- </div>
499
- </fieldset>
500
- </div>
501
- <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
502
- Toggle Search Controls
503
- </button>
504
- </div>
505
- <div id="collection-browser-container">
506
- <collection-browser
507
- facetPaneVisible
508
- .baseNavigationUrl=${'https://archive.org'}
509
- .baseImageUrl=${'https://archive.org'}
510
- .searchService=${this.searchService}
511
- .resizeObserver=${this.resizeObserver}
512
- .showHistogramDatePicker=${true}
513
- .suppressFacets=${this.suppressFacets}
514
- .lazyLoadFacets=${this.lazyLoadFacets}
515
- .loggedIn=${this.loggedIn}
516
- .modalManager=${this.modalManager}
517
- .analyticsHandler=${this.analyticsHandler}
518
- .withinProfile=${this.withinProfile}
519
- .profileElement=${this.profileElement}
520
- .pageContext=${'search'}
521
- @visiblePageChanged=${this.visiblePageChanged}
522
- @baseQueryChanged=${this.baseQueryChanged}
523
- @searchTypeChanged=${this.searchTypeChanged}
524
- @manageModeChanged=${this.manageModeChanged}
525
- @itemRemovalRequested=${this.handleItemRemovalRequest}
526
- @itemManagerRequested=${this.handleItemManagerRequest}
527
- @tileActionClicked=${this.handleTileActionClicked}
528
- >
460
+ ].map(tab => html `
461
+ <div class="checkbox-control">
462
+ <input
463
+ type="radio"
464
+ id="profile-${tab}"
465
+ name="profile-element"
466
+ value="${tab}"
467
+ @click=${this.profileElementChanged}
468
+ />
469
+ <label for="profile-${tab}">${tab}</label>
470
+ </div>
471
+ `)}
472
+ </div>
473
+ </details>
474
+ </fieldset>
475
+
476
+ <fieldset class="user-profile-controls">
477
+ <legend>Set Placeholder Types</legend>
478
+ <div class="checkbox-control">
479
+ <input
480
+ id="enable-loading-placeholder"
481
+ type="radio"
482
+ @click=${() => this.setPlaceholderType('loading-placeholder')}
483
+ name="placeholder-radio"
484
+ />
485
+ <label for="enable-loading-placeholder"
486
+ >Loading Placeholder</label
487
+ >
488
+ </div>
489
+ <div class="checkbox-control">
490
+ <input
491
+ id="enable-empty-placeholder"
492
+ type="radio"
493
+ @click=${() => this.setPlaceholderType('error-placeholder')}
494
+ value="empty-placeholder"
495
+ name="placeholder-radio"
496
+ />
497
+ <label for="enable-empty-placeholder">Empty Placeholder</label>
498
+ </div>
499
+ </fieldset>
500
+ </div>
501
+ <button id="toggle-dev-tools-btn" @click=${this.toggleDevTools}>
502
+ Toggle Search Controls
503
+ </button>
504
+ </div>
505
+ <div id="collection-browser-container">
506
+ <collection-browser
507
+ facetPaneVisible
508
+ .baseNavigationUrl=${'https://archive.org'}
509
+ .baseImageUrl=${'https://archive.org'}
510
+ .searchService=${this.searchService}
511
+ .resizeObserver=${this.resizeObserver}
512
+ .showHistogramDatePicker=${true}
513
+ .suppressFacets=${this.suppressFacets}
514
+ .lazyLoadFacets=${this.lazyLoadFacets}
515
+ .loggedIn=${this.loggedIn}
516
+ .modalManager=${this.modalManager}
517
+ .analyticsHandler=${this.analyticsHandler}
518
+ .withinProfile=${this.withinProfile}
519
+ .profileElement=${this.profileElement}
520
+ .pageContext=${'search'}
521
+ @visiblePageChanged=${this.visiblePageChanged}
522
+ @baseQueryChanged=${this.baseQueryChanged}
523
+ @searchTypeChanged=${this.searchTypeChanged}
524
+ @manageModeChanged=${this.manageModeChanged}
525
+ @itemRemovalRequested=${this.handleItemRemovalRequest}
526
+ @itemManagerRequested=${this.handleItemManagerRequest}
527
+ @tileActionClicked=${this.handleTileActionClicked}
528
+ >
529
529
  ${this.toggleSlots
530
530
  ? html `<div slot="sortbar-left-slot">Sort Slot</div>`
531
- : nothing}
531
+ : nothing}
532
532
  ${this.toggleSlots
533
533
  ? html `<div slot="facet-top-slot">Facet Slot</div>`
534
- : nothing}
535
- </collection-browser>
536
- </div>
537
- <modal-manager></modal-manager>
534
+ : nothing}
535
+ </collection-browser>
536
+ </div>
537
+ <modal-manager></modal-manager>
538
538
  `;
539
539
  }
540
540
  async setPlaceholderType(type) {
@@ -874,262 +874,262 @@ let AppRoot = class AppRoot extends LitElement {
874
874
  const input = e.target;
875
875
  this.profileElement = input.value || undefined;
876
876
  }
877
- static { this.styles = css `
878
- :host {
879
- display: block;
880
- --primaryButtonBGColor: #194880;
881
- --ia-theme-link-color: #4b64ff;
882
- }
883
-
884
- /* add the following styles to ensure proper modal visibility */
885
- body.modal-manager-open {
886
- overflow: hidden;
887
- }
888
- modal-manager {
889
- display: none;
890
- }
891
- modal-manager[mode='open'] {
892
- display: block;
893
- }
894
- modal-manager.remove-items {
895
- --modalWidth: 58rem;
896
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
897
- --modalTitleLineHeight: 4rem;
898
- --modalTitleFontSize: 1.8rem;
899
- }
900
- modal-manager.more-search-facets {
901
- --modalWidth: 85rem;
902
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
903
- --modalTitleLineHeight: 4rem;
904
- --modalTitleFontSize: 1.8rem;
905
- --modalCornerRadius: 0;
906
- --modalBottomPadding: 0;
907
- --modalBottomMargin: 0;
908
- --modalScrollOffset: 0;
909
- --modalCornerRadius: 0.5rem;
910
- }
911
- modal-manager.expanded-date-picker {
912
- --modalWidth: 58rem;
913
- --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
914
- --modalTitleLineHeight: 4rem;
915
- --modalTitleFontSize: 1.8rem;
916
- --modalCornerRadius: 0;
917
- --modalBottomPadding: 0;
918
- --modalBottomMargin: 0;
919
- --modalScrollOffset: 0;
920
- --modalCornerRadius: 0.5rem;
921
- }
922
-
923
- input,
924
- button {
925
- font-size: 1.6rem;
926
- }
927
-
928
- modal-manager.showFacetGroupOutlines,
929
- collection-browser.showFacetGroupOutlines {
930
- --facet-row-border-top: 1px solid red;
931
- --facet-row-border-bottom: 1px solid blue;
932
- }
933
-
934
- collection-browser {
935
- /* Same as production */
936
- max-width: 135rem;
937
- margin: auto;
938
- }
939
-
940
- #collection-browser-container {
941
- /* Same as production */
942
- padding-left: 0.5rem;
943
- margin-bottom: 2rem;
944
- }
945
-
946
- #base-query-field {
947
- width: 300px;
948
- }
949
-
950
- .dev-tool-container {
951
- position: relative;
952
- }
953
- #dev-tools {
954
- position: relative;
955
- top: 0;
956
- left: 0;
957
- z-index: 1;
958
- -webkit-backdrop-filter: blur(10px);
959
- backdrop-filter: blur(10px);
960
- padding: 0.5rem 1rem;
961
- border: 1px solid black;
962
- font-size: 1.4rem;
963
- background: #ffffffb3;
964
- }
965
-
966
- #dev-tools > * {
967
- display: flex;
968
- }
969
-
970
- #toggle-dev-tools-btn {
971
- position: fixed;
972
- left: 77.4%;
973
- top: 0;
974
- background: red;
975
- padding: 5px;
976
- color: white;
977
- font-size: 1.4rem;
978
- margin: 0;
979
- z-index: 1;
980
- cursor: pointer;
981
- }
982
-
983
- #search-and-page-inputs {
984
- flex-wrap: wrap;
985
- row-gap: 2px;
986
- }
987
-
988
- #search-and-page-inputs > form {
989
- margin-right: 1rem;
990
- }
991
-
992
- #search-and-page-inputs label {
993
- display: inline-block;
994
- min-width: 50px;
995
- }
996
-
997
- #page-number-input {
998
- width: 75px;
999
- }
1000
-
1001
- .search-type {
1002
- margin-right: 1rem;
1003
- }
1004
-
1005
- .cell-controls {
1006
- display: flex;
1007
- flex-wrap: wrap;
1008
- }
1009
- .cell-controls div {
1010
- display: flex;
1011
- align-items: center;
1012
- }
1013
- .cell-controls input[type='range'] {
1014
- width: 120px;
1015
- }
1016
- #cell-controls label {
1017
- display: inline-block;
1018
- width: 10rem;
1019
- }
1020
-
1021
- #cell-size-control,
1022
- #cell-gap-control {
1023
- flex-basis: calc(50% - 1rem);
1024
- flex-grow: 1;
1025
- }
1026
-
1027
- #cell-gap-control {
1028
- margin-left: 1rem;
1029
- }
1030
-
1031
- #checkbox-controls {
1032
- padding-top: 0.5rem;
1033
- flex-wrap: wrap;
1034
- }
1035
-
1036
- .checkbox-control {
1037
- flex-basis: 50%;
1038
- }
1039
- .checkbox-control.indent {
1040
- margin-left: 10px;
1041
- }
1042
- .checkbox-control label {
1043
- user-select: none;
1044
- }
1045
-
1046
- #last-event {
1047
- background-color: aliceblue;
1048
- padding: 5px;
1049
- margin: 5px auto;
1050
- }
1051
-
1052
- .hidden {
1053
- display: none;
1054
- }
1055
-
1056
- #toggle-controls {
1057
- background-color: lightskyblue;
1058
- padding: 5px;
1059
- margin: 5px auto;
1060
- }
1061
-
1062
- #search-types {
1063
- margin: 5px auto;
1064
- background-color: aliceblue;
1065
- font-size: 1.6rem;
1066
- }
1067
-
1068
- // slots
1069
- div[slot='cb-top-slot'] {
1070
- height: 50px;
1071
- border: 1px solid red;
1072
- background: bisque;
1073
- }
1074
- div[slot='facet-top-slot'] {
1075
- border: 1px solid red;
1076
- width: 100%;
1077
- height: 150px;
1078
- background-color: darkseagreen;
1079
- }
1080
- div[slot='sort-slot-left'] {
1081
- height: 50px;
1082
- border: 1px solid red;
1083
- background: bisque;
1084
- }
1085
-
1086
- /* user profile controls */
1087
- .user-profile-controls {
1088
- width: fit-content;
1089
- }
1090
-
1091
- .profile-element-controls {
1092
- margin-top: 4px;
1093
- }
1094
-
1095
- .profile-element-controls summary {
1096
- cursor: pointer;
1097
- user-select: none;
1098
- }
1099
-
1100
- .profile-element-options {
1101
- display: grid;
1102
- grid-template-columns: 1fr 1fr;
1103
- column-gap: 8px;
1104
- margin-top: 4px;
1105
- }
1106
-
1107
- fieldset {
1108
- display: inline-block !important;
1109
- }
1110
-
1111
- .result-last-tile {
1112
- border-radius: 4px;
1113
- background-color: white;
1114
- border: 3px dashed #555;
1115
- box-shadow: none;
1116
- display: grid;
1117
- align-content: center;
1118
- }
1119
- .result-last-tile:hover {
1120
- box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
1121
- transition: box-shadow 0.1s ease 0s;
1122
- cursor: pointer;
1123
- border: 3px dashed #4b64ff;
1124
- }
1125
- .result-last-tile h3 {
1126
- margin-bottom: 4rem;
1127
- margin: 0px auto;
1128
- font-size: 2.8rem;
1129
- color: rgb(44, 44, 44);
1130
- font-weight: 200;
1131
- text-align: center;
1132
- }
877
+ static { this.styles = css `
878
+ :host {
879
+ display: block;
880
+ --primaryButtonBGColor: #194880;
881
+ --ia-theme-link-color: #4b64ff;
882
+ }
883
+
884
+ /* add the following styles to ensure proper modal visibility */
885
+ body.modal-manager-open {
886
+ overflow: hidden;
887
+ }
888
+ modal-manager {
889
+ display: none;
890
+ }
891
+ modal-manager[mode='open'] {
892
+ display: block;
893
+ }
894
+ modal-manager.remove-items {
895
+ --modalWidth: 58rem;
896
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
897
+ --modalTitleLineHeight: 4rem;
898
+ --modalTitleFontSize: 1.8rem;
899
+ }
900
+ modal-manager.more-search-facets {
901
+ --modalWidth: 85rem;
902
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
903
+ --modalTitleLineHeight: 4rem;
904
+ --modalTitleFontSize: 1.8rem;
905
+ --modalCornerRadius: 0;
906
+ --modalBottomPadding: 0;
907
+ --modalBottomMargin: 0;
908
+ --modalScrollOffset: 0;
909
+ --modalCornerRadius: 0.5rem;
910
+ }
911
+ modal-manager.expanded-date-picker {
912
+ --modalWidth: 58rem;
913
+ --modalBorder: 2px solid var(--primaryButtonBGColor, #194880);
914
+ --modalTitleLineHeight: 4rem;
915
+ --modalTitleFontSize: 1.8rem;
916
+ --modalCornerRadius: 0;
917
+ --modalBottomPadding: 0;
918
+ --modalBottomMargin: 0;
919
+ --modalScrollOffset: 0;
920
+ --modalCornerRadius: 0.5rem;
921
+ }
922
+
923
+ input,
924
+ button {
925
+ font-size: 1.6rem;
926
+ }
927
+
928
+ modal-manager.showFacetGroupOutlines,
929
+ collection-browser.showFacetGroupOutlines {
930
+ --facet-row-border-top: 1px solid red;
931
+ --facet-row-border-bottom: 1px solid blue;
932
+ }
933
+
934
+ collection-browser {
935
+ /* Same as production */
936
+ max-width: 135rem;
937
+ margin: auto;
938
+ }
939
+
940
+ #collection-browser-container {
941
+ /* Same as production */
942
+ padding-left: 0.5rem;
943
+ margin-bottom: 2rem;
944
+ }
945
+
946
+ #base-query-field {
947
+ width: 300px;
948
+ }
949
+
950
+ .dev-tool-container {
951
+ position: relative;
952
+ }
953
+ #dev-tools {
954
+ position: relative;
955
+ top: 0;
956
+ left: 0;
957
+ z-index: 1;
958
+ -webkit-backdrop-filter: blur(10px);
959
+ backdrop-filter: blur(10px);
960
+ padding: 0.5rem 1rem;
961
+ border: 1px solid black;
962
+ font-size: 1.4rem;
963
+ background: #ffffffb3;
964
+ }
965
+
966
+ #dev-tools > * {
967
+ display: flex;
968
+ }
969
+
970
+ #toggle-dev-tools-btn {
971
+ position: fixed;
972
+ left: 77.4%;
973
+ top: 0;
974
+ background: red;
975
+ padding: 5px;
976
+ color: white;
977
+ font-size: 1.4rem;
978
+ margin: 0;
979
+ z-index: 1;
980
+ cursor: pointer;
981
+ }
982
+
983
+ #search-and-page-inputs {
984
+ flex-wrap: wrap;
985
+ row-gap: 2px;
986
+ }
987
+
988
+ #search-and-page-inputs > form {
989
+ margin-right: 1rem;
990
+ }
991
+
992
+ #search-and-page-inputs label {
993
+ display: inline-block;
994
+ min-width: 50px;
995
+ }
996
+
997
+ #page-number-input {
998
+ width: 75px;
999
+ }
1000
+
1001
+ .search-type {
1002
+ margin-right: 1rem;
1003
+ }
1004
+
1005
+ .cell-controls {
1006
+ display: flex;
1007
+ flex-wrap: wrap;
1008
+ }
1009
+ .cell-controls div {
1010
+ display: flex;
1011
+ align-items: center;
1012
+ }
1013
+ .cell-controls input[type='range'] {
1014
+ width: 120px;
1015
+ }
1016
+ #cell-controls label {
1017
+ display: inline-block;
1018
+ width: 10rem;
1019
+ }
1020
+
1021
+ #cell-size-control,
1022
+ #cell-gap-control {
1023
+ flex-basis: calc(50% - 1rem);
1024
+ flex-grow: 1;
1025
+ }
1026
+
1027
+ #cell-gap-control {
1028
+ margin-left: 1rem;
1029
+ }
1030
+
1031
+ #checkbox-controls {
1032
+ padding-top: 0.5rem;
1033
+ flex-wrap: wrap;
1034
+ }
1035
+
1036
+ .checkbox-control {
1037
+ flex-basis: 50%;
1038
+ }
1039
+ .checkbox-control.indent {
1040
+ margin-left: 10px;
1041
+ }
1042
+ .checkbox-control label {
1043
+ user-select: none;
1044
+ }
1045
+
1046
+ #last-event {
1047
+ background-color: aliceblue;
1048
+ padding: 5px;
1049
+ margin: 5px auto;
1050
+ }
1051
+
1052
+ .hidden {
1053
+ display: none;
1054
+ }
1055
+
1056
+ #toggle-controls {
1057
+ background-color: lightskyblue;
1058
+ padding: 5px;
1059
+ margin: 5px auto;
1060
+ }
1061
+
1062
+ #search-types {
1063
+ margin: 5px auto;
1064
+ background-color: aliceblue;
1065
+ font-size: 1.6rem;
1066
+ }
1067
+
1068
+ // slots
1069
+ div[slot='cb-top-slot'] {
1070
+ height: 50px;
1071
+ border: 1px solid red;
1072
+ background: bisque;
1073
+ }
1074
+ div[slot='facet-top-slot'] {
1075
+ border: 1px solid red;
1076
+ width: 100%;
1077
+ height: 150px;
1078
+ background-color: darkseagreen;
1079
+ }
1080
+ div[slot='sort-slot-left'] {
1081
+ height: 50px;
1082
+ border: 1px solid red;
1083
+ background: bisque;
1084
+ }
1085
+
1086
+ /* user profile controls */
1087
+ .user-profile-controls {
1088
+ width: fit-content;
1089
+ }
1090
+
1091
+ .profile-element-controls {
1092
+ margin-top: 4px;
1093
+ }
1094
+
1095
+ .profile-element-controls summary {
1096
+ cursor: pointer;
1097
+ user-select: none;
1098
+ }
1099
+
1100
+ .profile-element-options {
1101
+ display: grid;
1102
+ grid-template-columns: 1fr 1fr;
1103
+ column-gap: 8px;
1104
+ margin-top: 4px;
1105
+ }
1106
+
1107
+ fieldset {
1108
+ display: inline-block !important;
1109
+ }
1110
+
1111
+ .result-last-tile {
1112
+ border-radius: 4px;
1113
+ background-color: white;
1114
+ border: 3px dashed #555;
1115
+ box-shadow: none;
1116
+ display: grid;
1117
+ align-content: center;
1118
+ }
1119
+ .result-last-tile:hover {
1120
+ box-shadow: rgba(8, 8, 32, 0.8) 0 0 6px 2px;
1121
+ transition: box-shadow 0.1s ease 0s;
1122
+ cursor: pointer;
1123
+ border: 3px dashed #4b64ff;
1124
+ }
1125
+ .result-last-tile h3 {
1126
+ margin-bottom: 4rem;
1127
+ margin: 0px auto;
1128
+ font-size: 2.8rem;
1129
+ color: rgb(44, 44, 44);
1130
+ font-weight: 200;
1131
+ text-align: center;
1132
+ }
1133
1133
  `; }
1134
1134
  };
1135
1135
  __decorate([