@internetarchive/collection-browser 2.7.3-alpha.3 → 2.7.4
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/collection-browser.d.ts +6 -0
- package/dist/src/collection-browser.js +14 -0
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +9 -8
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +3 -2
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js +6 -8
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/package.json +1 -1
- package/src/collection-browser.ts +20 -0
- package/src/collection-facets/smart-facets/smart-facet-bar.ts +16 -13
- package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +6 -6
- package/src/data-source/collection-browser-data-source.ts +13 -10
|
@@ -434,6 +434,12 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
434
434
|
connectedCallback(): void;
|
|
435
435
|
disconnectedCallback(): void;
|
|
436
436
|
handleResize(entry: ResizeObserverEntry): void;
|
|
437
|
+
/**
|
|
438
|
+
* Ensures that if we have new results from the data source that are not yet
|
|
439
|
+
* displayed in the infinite scroller, that they are immediately reflected
|
|
440
|
+
* in the tile count.
|
|
441
|
+
*/
|
|
442
|
+
private ensureAvailableTilesDisplayed;
|
|
437
443
|
/**
|
|
438
444
|
* Updates the data source with the current state of facet readiness for loading,
|
|
439
445
|
* so that they will begin to load in at the appropriate time according to the
|
|
@@ -1137,6 +1137,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1137
1137
|
this.disconnectResizeObserver(oldObserver);
|
|
1138
1138
|
this.setupResizeObserver();
|
|
1139
1139
|
}
|
|
1140
|
+
this.ensureAvailableTilesDisplayed();
|
|
1140
1141
|
}
|
|
1141
1142
|
connectedCallback() {
|
|
1142
1143
|
var _a;
|
|
@@ -1170,6 +1171,19 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1170
1171
|
// Ensure the facet sidebar remains sized correctly
|
|
1171
1172
|
this.updateLeftColumnHeight();
|
|
1172
1173
|
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Ensures that if we have new results from the data source that are not yet
|
|
1176
|
+
* displayed in the infinite scroller, that they are immediately reflected
|
|
1177
|
+
* in the tile count.
|
|
1178
|
+
*/
|
|
1179
|
+
ensureAvailableTilesDisplayed() {
|
|
1180
|
+
if (this.infiniteScroller &&
|
|
1181
|
+
this.infiniteScroller.itemCount < this.dataSource.size) {
|
|
1182
|
+
this.setTileCount(this.dataSource.endOfDataReached
|
|
1183
|
+
? this.dataSource.size
|
|
1184
|
+
: this.estimatedTileCount);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1173
1187
|
/**
|
|
1174
1188
|
* Updates the data source with the current state of facet readiness for loading,
|
|
1175
1189
|
* so that they will begin to load in at the appropriate time according to the
|