@internetarchive/collection-browser 3.1.1-alpha-webdev6778.11 → 3.2.0
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.js +4 -2
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/test/collection-browser.test.js +217 -187
- package/dist/test/collection-browser.test.js.map +1 -1
- package/package.json +2 -2
- package/src/collection-browser.ts +3 -1
- package/test/collection-browser.test.ts +2403 -2359
|
@@ -395,11 +395,13 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
395
395
|
* - An error occurred on the most recent search attempt
|
|
396
396
|
*/
|
|
397
397
|
setPlaceholderType() {
|
|
398
|
-
var _a;
|
|
398
|
+
var _a, _b;
|
|
399
399
|
const isInitialized = this.dataSource.queryInitialized;
|
|
400
400
|
const hasQuery = !!((_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim());
|
|
401
|
+
const hasIdentifiers = !!((_b = this.identifiers) === null || _b === void 0 ? void 0 : _b.length);
|
|
401
402
|
const isCollection = !!this.withinCollection;
|
|
402
403
|
const isProfile = !!this.withinProfile;
|
|
404
|
+
const isSearchResults = !isCollection && !isProfile;
|
|
403
405
|
const noResults = !this.searchResultsLoading &&
|
|
404
406
|
(this.dataSource.size === 0 || !this.searchService);
|
|
405
407
|
this.placeholderType = null;
|
|
@@ -408,7 +410,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
408
410
|
if (!isInitialized) {
|
|
409
411
|
this.placeholderType = 'empty-query';
|
|
410
412
|
}
|
|
411
|
-
else if (
|
|
413
|
+
else if (isSearchResults && !hasQuery && !hasIdentifiers) {
|
|
412
414
|
this.placeholderType = 'empty-query';
|
|
413
415
|
}
|
|
414
416
|
else if (noResults) {
|