@internetarchive/collection-browser 2.7.2-alpha.2 → 2.7.2
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 +2 -0
- package/dist/src/collection-browser.js +59 -11
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/dedupe.d.ts +10 -0
- package/dist/src/collection-facets/smart-facets/dedupe.js +34 -0
- package/dist/src/collection-facets/smart-facets/dedupe.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.d.ts +5 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.js +24 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js +40 -2
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/models.d.ts +2 -0
- package/dist/src/collection-facets/smart-facets/models.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.d.ts +3 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +82 -40
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js +10 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +4 -2
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.d.ts +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js +3 -5
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +1 -9
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +9 -20
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -1
- package/package.json +4 -4
- package/src/collection-browser.ts +60 -14
- package/src/collection-facets/smart-facets/dedupe.ts +43 -0
- package/src/collection-facets/smart-facets/heuristics/browser-language-heuristic.ts +27 -0
- package/src/collection-facets/smart-facets/heuristics/wikidata-heuristic.ts +40 -2
- package/src/collection-facets/smart-facets/models.ts +2 -0
- package/src/collection-facets/smart-facets/smart-facet-bar.ts +97 -48
- package/src/collection-facets/smart-facets/smart-facet-button.ts +11 -2
- package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +20 -12
- package/src/collection-facets/smart-facets/smart-facet-equals.ts +8 -8
- package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +12 -22
|
@@ -129,6 +129,8 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
|
|
|
129
129
|
manageViewLabel: string;
|
|
130
130
|
/** Whether to replace the default sort options with a slot for customization (default: false) */
|
|
131
131
|
enableSortOptionsSlot: boolean;
|
|
132
|
+
/** Whether to display a smart results carousel above the full results */
|
|
133
|
+
showSmartResults: boolean;
|
|
132
134
|
/**
|
|
133
135
|
* The results per page so we can paginate.
|
|
134
136
|
*
|
|
@@ -109,6 +109,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
109
109
|
this.manageViewLabel = 'Select items to remove';
|
|
110
110
|
/** Whether to replace the default sort options with a slot for customization (default: false) */
|
|
111
111
|
this.enableSortOptionsSlot = false;
|
|
112
|
+
/** Whether to display a smart results carousel above the full results */
|
|
113
|
+
this.showSmartResults = false;
|
|
112
114
|
/**
|
|
113
115
|
* The results per page so we can paginate.
|
|
114
116
|
*
|
|
@@ -434,7 +436,11 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
434
436
|
*/
|
|
435
437
|
get desktopLeftColumnTemplate() {
|
|
436
438
|
return html `
|
|
437
|
-
<div
|
|
439
|
+
<div
|
|
440
|
+
id="left-column"
|
|
441
|
+
class="column"
|
|
442
|
+
?hidden=${this.showSmartFacetBar && !this.facetPaneVisible}
|
|
443
|
+
>
|
|
438
444
|
${this.facetTopViewSlot}
|
|
439
445
|
<div id="facets-header-container">
|
|
440
446
|
<h2 id="facets-header" class="sr-only">Filters</h2>
|
|
@@ -486,18 +492,31 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
486
492
|
*/
|
|
487
493
|
get rightColumnTemplate() {
|
|
488
494
|
return html `
|
|
489
|
-
<div
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
${this.
|
|
495
|
+
<div
|
|
496
|
+
id="right-column"
|
|
497
|
+
class="column ${this.showSmartResults ? 'smart-results-spacing' : ''}"
|
|
498
|
+
>
|
|
499
|
+
${this.showSmartResults
|
|
500
|
+
? html `<slot name="smart-results"></slot>`
|
|
501
|
+
: nothing}
|
|
502
|
+
<section id="results">
|
|
503
|
+
${this.showSmartResults
|
|
504
|
+
? html `<h2 class="results-section-heading">
|
|
505
|
+
${msg('All results')}
|
|
506
|
+
</h2>`
|
|
507
|
+
: nothing}
|
|
508
|
+
<div id="cb-top-view">
|
|
509
|
+
<slot name="cb-top-slot"></slot>
|
|
510
|
+
</div>
|
|
511
|
+
${this.isManageView
|
|
494
512
|
? this.manageBarTemplate
|
|
495
513
|
: this.sortFilterBarTemplate}
|
|
496
|
-
|
|
497
|
-
|
|
514
|
+
<slot name="cb-results"></slot>
|
|
515
|
+
${this.displayMode === `list-compact` && this.totalResults
|
|
498
516
|
? this.listHeaderTemplate
|
|
499
517
|
: nothing}
|
|
500
|
-
|
|
518
|
+
${this.suppressResultTiles ? nothing : this.infiniteScrollerTemplate}
|
|
519
|
+
</section>
|
|
501
520
|
</div>
|
|
502
521
|
`;
|
|
503
522
|
}
|
|
@@ -1694,14 +1713,34 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1694
1713
|
min-height: 90vh;
|
|
1695
1714
|
border-left: 1px solid rgb(232, 232, 232);
|
|
1696
1715
|
border-right: 1px solid rgb(232, 232, 232);
|
|
1697
|
-
padding-left: 1rem;
|
|
1698
|
-
padding-right: 1rem;
|
|
1699
1716
|
margin-top: var(--rightColumnMarginTop, 0);
|
|
1700
1717
|
background: #fff;
|
|
1701
1718
|
}
|
|
1702
1719
|
|
|
1720
|
+
#right-column.smart-results-spacing {
|
|
1721
|
+
padding-top: 0.5rem;
|
|
1722
|
+
border-right: none;
|
|
1723
|
+
background: transparent;
|
|
1724
|
+
min-width: 0;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
#results {
|
|
1728
|
+
background: #fff;
|
|
1729
|
+
padding-left: 1rem;
|
|
1730
|
+
padding-right: 1rem;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
#right-column.smart-results-spacing #results {
|
|
1734
|
+
border-radius: 10px 10px 0px 0px;
|
|
1735
|
+
padding-top: 0.5rem;
|
|
1736
|
+
margin-top: 1rem;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1703
1739
|
.mobile #right-column {
|
|
1704
1740
|
border-left: none;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.mobile #results {
|
|
1705
1744
|
padding: 5px 5px 0;
|
|
1706
1745
|
}
|
|
1707
1746
|
|
|
@@ -1890,6 +1929,12 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1890
1929
|
max-height: 2000px;
|
|
1891
1930
|
}
|
|
1892
1931
|
|
|
1932
|
+
.results-section-heading {
|
|
1933
|
+
margin: 0.5rem 0.3rem;
|
|
1934
|
+
font-size: 2rem;
|
|
1935
|
+
line-height: 25px;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1893
1938
|
#results-total {
|
|
1894
1939
|
display: flex;
|
|
1895
1940
|
align-items: baseline;
|
|
@@ -2148,6 +2193,9 @@ __decorate([
|
|
|
2148
2193
|
__decorate([
|
|
2149
2194
|
property({ type: Boolean })
|
|
2150
2195
|
], CollectionBrowser.prototype, "enableSortOptionsSlot", void 0);
|
|
2196
|
+
__decorate([
|
|
2197
|
+
property({ type: Boolean, reflect: true })
|
|
2198
|
+
], CollectionBrowser.prototype, "showSmartResults", void 0);
|
|
2151
2199
|
__decorate([
|
|
2152
2200
|
property({ type: Object })
|
|
2153
2201
|
], CollectionBrowser.prototype, "dataSource", void 0);
|