@internetarchive/collection-browser 4.1.2-alpha1 → 4.1.2-alpha11
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/dist/src/app-root.js +4 -1
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.js +8 -2
- 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 +1 -0
- package/dist/src/models.js.map +1 -1
- package/package.json +3 -2
- package/src/app-root.ts +4 -1
- package/src/collection-browser.ts +9 -4
- package/src/data-source/collection-browser-data-source.ts +1 -1
- package/src/models.ts +1 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The Internet Archive Collection Browser.",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"author": "Internet Archive",
|
|
6
|
-
"version": "4.1.2-
|
|
6
|
+
"version": "4.1.2-alpha11",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
"@internetarchive/field-parsers": "^1.0.0",
|
|
31
31
|
"@internetarchive/histogram-date-range": "^1.4.1",
|
|
32
32
|
"@internetarchive/ia-dropdown": "^2.0.0",
|
|
33
|
+
"@internetarchive/ia-userlist-settings": "^1.1.3-alpha3",
|
|
33
34
|
"@internetarchive/iaux-item-metadata": "^1.0.5",
|
|
34
35
|
"@internetarchive/infinite-scroller": "^1.0.1",
|
|
35
36
|
"@internetarchive/modal-manager": "^2.0.5",
|
|
36
|
-
"@internetarchive/search-service": "^2.7.
|
|
37
|
+
"@internetarchive/search-service": "^2.7.1-alpha3",
|
|
37
38
|
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
38
39
|
"@lit/localize": "^0.12.2",
|
|
39
40
|
"dompurify": "^3.2.4",
|
package/src/app-root.ts
CHANGED
|
@@ -510,7 +510,10 @@ export class AppRoot extends LitElement {
|
|
|
510
510
|
.loggedIn=${this.loggedIn}
|
|
511
511
|
.modalManager=${this.modalManager}
|
|
512
512
|
.analyticsHandler=${this.analyticsHandler}
|
|
513
|
-
.pageContext=${'
|
|
513
|
+
.pageContext=${'profile'}
|
|
514
|
+
.pageType=${'account_details'}
|
|
515
|
+
.pageTarget=${'fav-neeraj_archive341'}
|
|
516
|
+
.profileElement=${'favorites'}
|
|
514
517
|
@visiblePageChanged=${this.visiblePageChanged}
|
|
515
518
|
@baseQueryChanged=${this.baseQueryChanged}
|
|
516
519
|
@searchTypeChanged=${this.searchTypeChanged}
|
|
@@ -860,10 +860,7 @@ 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 (
|
|
864
|
-
this.withinCollection?.startsWith('fav-') ||
|
|
865
|
-
(this.profileElement as string) === 'favorites'
|
|
866
|
-
) {
|
|
863
|
+
if (this.withinCollection?.startsWith('fav-') || this.profileElement === 'favorites') {
|
|
867
864
|
// When viewing a fav- collection or the favorites profile tab,
|
|
868
865
|
// we include the Date Favorited option as the default
|
|
869
866
|
sortFieldAvailability = favoritesSortAvailability;
|
|
@@ -1653,6 +1650,14 @@ export class CollectionBrowser
|
|
|
1653
1650
|
this.selectedTitleFilter = queryState.selectedTitleFilter;
|
|
1654
1651
|
this.selectedCreatorFilter = queryState.selectedCreatorFilter;
|
|
1655
1652
|
|
|
1653
|
+
// Apply the correct default sort for the new profile element immediately,
|
|
1654
|
+
// so it is in place before hostUpdate() fires on the data source.
|
|
1655
|
+
// Without this, a stale defaultSortField from a previously-active tab
|
|
1656
|
+
// could be used in the first fetch for the incoming tab.
|
|
1657
|
+
if (this.profileElement) {
|
|
1658
|
+
this.applyDefaultProfileSort();
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1656
1661
|
this.pagesToRender = this.initialPageNumber;
|
|
1657
1662
|
|
|
1658
1663
|
// 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 && sortOption.handledBySearchService) {
|
|
1131
1131
|
sortParams = [
|
|
1132
1132
|
{
|
|
1133
1133
|
field: sortOption.searchServiceKey,
|
package/src/models.ts
CHANGED
|
@@ -588,6 +588,7 @@ export const defaultProfileElementSorts: Record<
|
|
|
588
588
|
reviews: SortField.datereviewed,
|
|
589
589
|
collections: SortField.datearchived,
|
|
590
590
|
web_archives: SortField.datearchived,
|
|
591
|
+
favorites: SortField.datefavorited,
|
|
591
592
|
};
|
|
592
593
|
|
|
593
594
|
/** A union of the fields that permit prefix filtering (e.g., alphabetical filtering) */
|