@internetarchive/collection-browser 2.7.8-alpha1 → 2.7.8

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.
@@ -139,11 +139,6 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
139
139
  * for the previous/next page, we'll fetch the next/previous page to populate it
140
140
  */
141
141
  dataSource: CollectionBrowserDataSourceInterface;
142
- /**
143
- * The maximum number of pages we will load when a privileged user clicks
144
- * the "Manage" button on the search page. Limited to 15 pages.
145
- */
146
- maxPagesToManage: number;
147
142
  /**
148
143
  * The page that the consumer wants to load.
149
144
  */
@@ -592,11 +587,5 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
592
587
  * increase the number of pages to render and start fetching data for the new page
593
588
  */
594
589
  private scrollThresholdReached;
595
- /**
596
- * Fetches search results for privileged users when in manage view
597
- * If total results exceed the threshold, partially resets the datasource pages
598
- * and fetches the first page with a limit based on the threshold
599
- */
600
- private fetchManagableSearchResults;
601
590
  static get styles(): import("lit").CSSResult[];
602
591
  }
@@ -118,11 +118,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
118
118
  * for the previous/next page, we'll fetch the next/previous page to populate it
119
119
  */
120
120
  this.dataSource = new CollectionBrowserDataSource(this, this.pageSize);
121
- /**
122
- * The maximum number of pages we will load when a privileged user clicks
123
- * the "Manage" button on the search page. Limited to 15 pages.
124
- */
125
- this.maxPagesToManage = 15;
126
121
  /**
127
122
  * The page that the consumer wants to load.
128
123
  */
@@ -610,8 +605,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
610
605
  @cancel=${() => {
611
606
  this.isManageView = false;
612
607
  this.dataSource.uncheckAllTiles();
613
- if (this.searchResultsLoading)
614
- this.dataSource.resetPages();
615
608
  }}
616
609
  ></manage-bar>
617
610
  `;
@@ -1053,7 +1046,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1053
1046
  }
1054
1047
  }
1055
1048
  updated(changed) {
1056
- var _a, _b, _c;
1049
+ var _a, _b;
1057
1050
  if (changed.has('placeholderType') && this.placeholderType === null) {
1058
1051
  if (!this.leftColIntersectionObserver) {
1059
1052
  this.setupLeftColumnScrollListeners();
@@ -1160,13 +1153,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1160
1153
  }
1161
1154
  }
1162
1155
  if (changed.has('isManageView')) {
1163
- if (this.isManageView) {
1156
+ if (this.isManageView)
1164
1157
  this.displayMode = 'grid';
1165
- this.fetchManagableSearchResults();
1166
- }
1167
- else if (this.pageContext === 'search')
1168
- (_b = this.infiniteScroller) === null || _b === void 0 ? void 0 : _b.reload();
1169
- (_c = this.infiniteScroller) === null || _c === void 0 ? void 0 : _c.refreshAllVisibleCells();
1158
+ (_b = this.infiniteScroller) === null || _b === void 0 ? void 0 : _b.refreshAllVisibleCells();
1170
1159
  this.emitManageModeChangedEvent();
1171
1160
  }
1172
1161
  if (changed.has('resizeObserver')) {
@@ -1684,22 +1673,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1684
1673
  this.dataSource.fetchPage(this.pagesToRender);
1685
1674
  }
1686
1675
  }
1687
- /**
1688
- * Fetches search results for privileged users when in manage view
1689
- * If total results exceed the threshold, partially resets the datasource pages
1690
- * and fetches the first page with a limit based on the threshold
1691
- */
1692
- fetchManagableSearchResults() {
1693
- var _a;
1694
- const maxAllowedResults = this.maxPagesToManage * this.pageSize;
1695
- if (this.pageContext === 'search' &&
1696
- this.dataSource.totalResults > maxAllowedResults &&
1697
- !this.searchResultsLoading) {
1698
- this.dataSource.resetPages();
1699
- this.dataSource.fetchPage(1, this.maxPagesToManage); // will fetch 750 results
1700
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.reload();
1701
- }
1702
- }
1703
1676
  static get styles() {
1704
1677
  return [
1705
1678
  srOnlyStyle,