@internetarchive/collection-browser 0.4.19 → 1.0.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 (60) hide show
  1. package/dist/src/collection-browser.d.ts +22 -1
  2. package/dist/src/collection-browser.js +405 -291
  3. package/dist/src/collection-browser.js.map +1 -1
  4. package/dist/src/collection-facets/facets-template.js +2 -0
  5. package/dist/src/collection-facets/facets-template.js.map +1 -1
  6. package/dist/src/collection-facets/more-facets-content.js +63 -70
  7. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  8. package/dist/src/collection-facets/more-facets-pagination.js +49 -55
  9. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
  10. package/dist/src/collection-facets/toggle-switch.js +46 -56
  11. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  12. package/dist/src/collection-facets.d.ts +1 -1
  13. package/dist/src/collection-facets.js +98 -84
  14. package/dist/src/collection-facets.js.map +1 -1
  15. package/dist/src/sort-filter-bar/alpha-bar.d.ts +2 -1
  16. package/dist/src/sort-filter-bar/alpha-bar.js +33 -25
  17. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  18. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
  19. package/dist/src/sort-filter-bar/sort-filter-bar.js +198 -186
  20. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  21. package/dist/src/styles/sr-only.d.ts +1 -0
  22. package/dist/src/styles/sr-only.js +18 -0
  23. package/dist/src/styles/sr-only.js.map +1 -0
  24. package/dist/src/tiles/grid/account-tile.js +1 -1
  25. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  26. package/dist/src/tiles/grid/collection-tile.js +2 -2
  27. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  28. package/dist/src/tiles/grid/item-tile.js +2 -2
  29. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  30. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +5 -15
  31. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  32. package/dist/src/tiles/grid/tile-stats.js +58 -65
  33. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  34. package/dist/src/tiles/tile-dispatcher.js +3 -2
  35. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  36. package/dist/test/collection-facets.test.js +8 -5
  37. package/dist/test/collection-facets.test.js.map +1 -1
  38. package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
  39. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  40. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
  41. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  42. package/package.json +3 -3
  43. package/src/collection-browser.ts +416 -293
  44. package/src/collection-facets/facets-template.ts +2 -0
  45. package/src/collection-facets/more-facets-content.ts +63 -70
  46. package/src/collection-facets/more-facets-pagination.ts +49 -55
  47. package/src/collection-facets/toggle-switch.ts +51 -61
  48. package/src/collection-facets.ts +99 -85
  49. package/src/sort-filter-bar/alpha-bar.ts +26 -18
  50. package/src/sort-filter-bar/sort-filter-bar.ts +200 -186
  51. package/src/styles/sr-only.ts +18 -0
  52. package/src/tiles/grid/account-tile.ts +1 -1
  53. package/src/tiles/grid/collection-tile.ts +2 -2
  54. package/src/tiles/grid/item-tile.ts +2 -2
  55. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +5 -15
  56. package/src/tiles/grid/tile-stats.ts +66 -73
  57. package/src/tiles/tile-dispatcher.ts +1 -0
  58. package/test/collection-facets.test.ts +10 -2
  59. package/test/sort-filter-bar/alpha-bar.test.ts +16 -12
  60. package/test/sort-filter-bar/sort-filter-bar.test.ts +2 -2
@@ -133,6 +133,13 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
133
133
  * any facet buckets than have been selected or negated, or false otherwise.
134
134
  */
135
135
  private get hasCheckedFacets();
136
+ /**
137
+ * Returns true if there are any currently selected/negated facet buckets,
138
+ * any selected date range, or any selected letter filters. False otherwise.
139
+ *
140
+ * Ignores sorting options.
141
+ */
142
+ private get hasActiveFilters();
136
143
  render(): TemplateResult<1>;
137
144
  private setPlaceholderType;
138
145
  private get emptyPlaceholderTemplate();
@@ -172,8 +179,22 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
172
179
  * Handler for changes to which letter is selected in the creator alphabet bar.
173
180
  */
174
181
  private creatorLetterSelected;
182
+ /**
183
+ * The full template for how the facets should be structured in mobile view,
184
+ * including the collapsible container (with header) and the facets themselves.
185
+ */
175
186
  private get mobileFacetsTemplate();
187
+ /**
188
+ * The template for the facets component alone, without any surrounding wrappers.
189
+ */
176
190
  private get facetsTemplate();
191
+ /**
192
+ * The HTML template for the "Clear all filters" button, or `nothing` if no
193
+ * filters are currently active.
194
+ *
195
+ * @param mobile Whether to style/shorten the button for mobile view
196
+ */
197
+ private clearFiltersBtnTemplate;
177
198
  private get loadingTemplate();
178
199
  private get listHeaderTemplate();
179
200
  private histogramDateRangeUpdated;
@@ -340,5 +361,5 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
340
361
  * increase the number of pages to render and start fetching data for the new page
341
362
  */
342
363
  private scrollThresholdReached;
343
- static styles: import("lit").CSSResult;
364
+ static get styles(): import("lit").CSSResult[];
344
365
  }