@internetarchive/collection-browser 4.1.2-alpha9 → 4.1.2

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 (53) hide show
  1. package/.claude/settings.local.json +11 -0
  2. package/.editorconfig +29 -29
  3. package/.github/workflows/ci.yml +27 -27
  4. package/.github/workflows/gh-pages-main.yml +39 -39
  5. package/.github/workflows/npm-publish.yml +39 -39
  6. package/.github/workflows/pr-preview.yml +38 -38
  7. package/.husky/pre-commit +1 -1
  8. package/.prettierignore +1 -1
  9. package/LICENSE +661 -661
  10. package/README.md +83 -83
  11. package/dist/src/app-root.js +1 -4
  12. package/dist/src/app-root.js.map +1 -1
  13. package/dist/src/collection-browser.js +2 -11
  14. package/dist/src/collection-browser.js.map +1 -1
  15. package/dist/src/data-source/collection-browser-data-source.js +1 -1
  16. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  17. package/dist/src/models.js +0 -1
  18. package/dist/src/models.js.map +1 -1
  19. package/dist/src/tiles/hover/hover-pane-controller.js +30 -29
  20. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  21. package/dist/src/tiles/tile-dispatcher.d.ts +6 -0
  22. package/dist/src/tiles/tile-dispatcher.js +224 -216
  23. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  24. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  25. package/dist/test/mocks/mock-search-responses.js.map +1 -1
  26. package/dist/test/tiles/grid/item-tile.test.js +77 -77
  27. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  28. package/dist/test/tiles/list/tile-list.test.js +126 -126
  29. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  30. package/dist/test/tiles/tile-dispatcher.test.js +94 -80
  31. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  32. package/dist/test/tiles/tile-display-value-provider.test.js.map +1 -1
  33. package/eslint.config.mjs +53 -53
  34. package/index.html +24 -24
  35. package/local.archive.org.cert +86 -86
  36. package/local.archive.org.key +27 -27
  37. package/package.json +120 -121
  38. package/renovate.json +6 -6
  39. package/src/app-root.ts +1 -4
  40. package/src/collection-browser.ts +2 -12
  41. package/src/data-source/collection-browser-data-source.ts +1 -1
  42. package/src/models.ts +0 -1
  43. package/src/tiles/hover/hover-pane-controller.ts +628 -627
  44. package/src/tiles/tile-dispatcher.ts +527 -518
  45. package/src/tiles/tile-display-value-provider.ts +124 -124
  46. package/test/mocks/mock-search-responses.ts +1364 -1364
  47. package/test/tiles/grid/item-tile.test.ts +520 -520
  48. package/test/tiles/list/tile-list.test.ts +552 -552
  49. package/test/tiles/tile-dispatcher.test.ts +300 -283
  50. package/test/tiles/tile-display-value-provider.test.ts +172 -172
  51. package/tsconfig.json +25 -25
  52. package/web-dev-server.config.mjs +30 -30
  53. package/web-test-runner.config.mjs +52 -52
package/src/app-root.ts CHANGED
@@ -510,10 +510,7 @@ export class AppRoot extends LitElement {
510
510
  .loggedIn=${this.loggedIn}
511
511
  .modalManager=${this.modalManager}
512
512
  .analyticsHandler=${this.analyticsHandler}
513
- .pageContext=${'profile'}
514
- .pageType=${'account_details'}
515
- .pageTarget=${'fav-neeraj_archive341'}
516
- .profileElement=${'favorites'}
513
+ .pageContext=${'search'}
517
514
  @visiblePageChanged=${this.visiblePageChanged}
518
515
  @baseQueryChanged=${this.baseQueryChanged}
519
516
  @searchTypeChanged=${this.searchTypeChanged}
@@ -860,9 +860,8 @@ export class CollectionBrowser
860
860
  let sortFieldAvailability = defaultSortAvailability;
861
861
 
862
862
  // We adjust the available sort options for a couple of special cases...
863
- if (this.withinCollection?.startsWith('fav-') || this.profileElement === 'favorites') {
864
- // When viewing a fav- collection or the favorites profile tab,
865
- // we include the Date Favorited option as the default
863
+ if (this.withinCollection?.startsWith('fav-')) {
864
+ // When viewing a fav- collection, we include the Date Favorited option as the default
866
865
  sortFieldAvailability = favoritesSortAvailability;
867
866
  } else if (!this.withinCollection && this.searchType === SearchType.TV) {
868
867
  // When viewing TV search results, we exclude several of the usual date sort options.
@@ -1638,7 +1637,6 @@ export class CollectionBrowser
1638
1637
  this.addController(this.dataSource);
1639
1638
 
1640
1639
  this.baseQuery = queryState.baseQuery;
1641
- this.withinProfile = queryState.withinProfile;
1642
1640
  this.profileElement = queryState.profileElement;
1643
1641
  this.searchType = queryState.searchType;
1644
1642
  this.selectedFacets =
@@ -1651,14 +1649,6 @@ export class CollectionBrowser
1651
1649
  this.selectedTitleFilter = queryState.selectedTitleFilter;
1652
1650
  this.selectedCreatorFilter = queryState.selectedCreatorFilter;
1653
1651
 
1654
- // Apply the correct default sort for the new profile element immediately,
1655
- // so it is in place before hostUpdate() fires on the data source.
1656
- // Without this, a stale defaultSortField from a previously-active tab
1657
- // could be used in the first fetch for the incoming tab.
1658
- if (this.profileElement) {
1659
- this.applyDefaultProfileSort();
1660
- }
1661
-
1662
1652
  this.pagesToRender = this.initialPageNumber;
1663
1653
 
1664
1654
  // We set this flag during the update to prevent the URL state persistence
@@ -1127,7 +1127,7 @@ export class CollectionBrowserDataSource
1127
1127
  this.host.defaultSortField
1128
1128
  ) {
1129
1129
  const sortOption = SORT_OPTIONS[this.host.defaultSortField];
1130
- if (sortOption.searchServiceKey && sortOption.handledBySearchService) {
1130
+ if (sortOption.searchServiceKey) {
1131
1131
  sortParams = [
1132
1132
  {
1133
1133
  field: sortOption.searchServiceKey,
package/src/models.ts CHANGED
@@ -588,7 +588,6 @@ export const defaultProfileElementSorts: Record<
588
588
  reviews: SortField.datereviewed,
589
589
  collections: SortField.datearchived,
590
590
  web_archives: SortField.datearchived,
591
- favorites: SortField.datefavorited,
592
591
  };
593
592
 
594
593
  /** A union of the fields that permit prefix filtering (e.g., alphabetical filtering) */