@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.
- package/.claude/settings.local.json +11 -0
- package/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +1 -1
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/app-root.js +1 -4
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.js +2 -11
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/models.js +0 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.js +30 -29
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +6 -0
- package/dist/src/tiles/tile-dispatcher.js +224 -216
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/tiles/grid/item-tile.test.js +77 -77
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +126 -126
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/dist/test/tiles/tile-dispatcher.test.js +94 -80
- package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
- package/dist/test/tiles/tile-display-value-provider.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +120 -121
- package/renovate.json +6 -6
- package/src/app-root.ts +1 -4
- package/src/collection-browser.ts +2 -12
- package/src/data-source/collection-browser-data-source.ts +1 -1
- package/src/models.ts +0 -1
- package/src/tiles/hover/hover-pane-controller.ts +628 -627
- package/src/tiles/tile-dispatcher.ts +527 -518
- package/src/tiles/tile-display-value-provider.ts +124 -124
- package/test/mocks/mock-search-responses.ts +1364 -1364
- package/test/tiles/grid/item-tile.test.ts +520 -520
- package/test/tiles/list/tile-list.test.ts +552 -552
- package/test/tiles/tile-dispatcher.test.ts +300 -283
- package/test/tiles/tile-display-value-provider.test.ts +172 -172
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- 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=${'
|
|
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-')
|
|
864
|
-
// When viewing a fav- collection
|
|
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
|
|
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) */
|