@internetarchive/collection-browser 2.20.1-alpha-webdev7822.0 → 2.21.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/app-root.js +606 -606
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.js +685 -681
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +376 -376
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/test/collection-browser.test.js +19 -0
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +37 -37
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/package.json +1 -1
- package/src/app-root.ts +1140 -1140
- package/src/collection-browser.ts +2756 -2753
- package/src/models.ts +870 -870
- package/src/sort-filter-bar/sort-filter-bar.ts +1283 -1283
- package/test/collection-browser.test.ts +27 -0
- package/test/sort-filter-bar/sort-filter-bar.test.ts +885 -885
|
@@ -495,6 +495,33 @@ describe('Collection Browser', () => {
|
|
|
495
495
|
expect(el.searchType).to.equal(SearchType.FULLTEXT);
|
|
496
496
|
});
|
|
497
497
|
|
|
498
|
+
it('does not persist or restore search type from URL param if suppressed', async () => {
|
|
499
|
+
// Add a sin=TXT param to the URL
|
|
500
|
+
let url = new URL(window.location.href);
|
|
501
|
+
url.searchParams.append('sin', 'TXT');
|
|
502
|
+
window.history.replaceState({}, '', url);
|
|
503
|
+
|
|
504
|
+
const searchService = new MockSearchService();
|
|
505
|
+
|
|
506
|
+
const el = await fixture<CollectionBrowser>(
|
|
507
|
+
html`<collection-browser
|
|
508
|
+
.searchService=${searchService}
|
|
509
|
+
suppressURLSinParam
|
|
510
|
+
>
|
|
511
|
+
</collection-browser>`,
|
|
512
|
+
);
|
|
513
|
+
|
|
514
|
+
url = new URL(window.location.href);
|
|
515
|
+
expect(el.searchType).to.equal(SearchType.DEFAULT);
|
|
516
|
+
expect(url.searchParams.has('sin')).to.be.false; // Removes existing sin param
|
|
517
|
+
|
|
518
|
+
el.searchType = SearchType.RADIO;
|
|
519
|
+
await el.updateComplete;
|
|
520
|
+
|
|
521
|
+
url = new URL(window.location.href);
|
|
522
|
+
expect(url.searchParams.has('sin')).to.be.false; // Doesn't add sin param
|
|
523
|
+
});
|
|
524
|
+
|
|
498
525
|
it('can construct tile models with many fields present', async () => {
|
|
499
526
|
const searchService = new MockSearchService();
|
|
500
527
|
|