@internetarchive/collection-browser 4.4.1 → 4.5.1-alpha-webdev8221.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/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +1 -1
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +8 -0
- package/dist/src/app-root.js +26 -0
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/collection-browser.d.ts +8 -4
- package/dist/src/collection-browser.js +20 -11
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.d.ts +6 -0
- package/dist/src/collection-facets/facet-row.js +19 -1
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +2 -0
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +5 -0
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.d.ts +1 -1
- package/dist/src/data-source/collection-browser-data-source.js +8 -6
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/restoration-state-handler.js +2 -4
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/styles/tile-action-styles.d.ts +14 -0
- package/dist/src/styles/tile-action-styles.js +59 -0
- package/dist/src/styles/tile-action-styles.js.map +1 -0
- package/dist/src/tiles/base-tile-component.d.ts +17 -1
- package/dist/src/tiles/base-tile-component.js +50 -1
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +1 -0
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +27 -2
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +113 -75
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.d.ts +1 -1
- package/dist/src/tiles/list/tile-list.js +164 -146
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/models.d.ts +11 -0
- package/dist/src/tiles/models.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.d.ts +14 -0
- package/dist/src/tiles/tile-dispatcher.js +107 -4
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/utils/date-filter-field.d.ts +6 -0
- package/dist/src/utils/date-filter-field.js +9 -0
- package/dist/src/utils/date-filter-field.js.map +1 -0
- package/dist/test/collection-browser.test.js +81 -0
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/facet-row.test.js +32 -0
- package/dist/test/collection-facets/facet-row.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/index.ts +1 -0
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +120 -120
- package/renovate.json +6 -6
- package/src/app-root.ts +30 -0
- package/src/collection-browser.ts +17 -13
- package/src/collection-facets/facet-row.ts +11 -1
- package/src/collection-facets/facets-template.ts +2 -0
- package/src/data-source/collection-browser-data-source-interface.ts +6 -0
- package/src/data-source/collection-browser-data-source.ts +16 -7
- package/src/restoration-state-handler.ts +5 -5
- package/src/styles/tile-action-styles.ts +59 -0
- package/src/tiles/base-tile-component.ts +60 -1
- package/src/tiles/grid/item-tile.ts +1 -0
- package/src/tiles/list/tile-list-compact-header.ts +28 -2
- package/src/tiles/list/tile-list-compact.ts +114 -75
- package/src/tiles/list/tile-list.ts +190 -172
- package/src/tiles/models.ts +13 -0
- package/src/tiles/tile-dispatcher.ts +114 -4
- package/src/utils/date-filter-field.ts +11 -0
- package/test/collection-browser.test.ts +132 -0
- package/test/collection-facets/facet-row.test.ts +46 -0
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -52
|
@@ -124,6 +124,13 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
124
124
|
* If item management UI active
|
|
125
125
|
*/
|
|
126
126
|
this.isManageView = false;
|
|
127
|
+
/** Action buttons to display on each tile */
|
|
128
|
+
this.tileActions = [];
|
|
129
|
+
/**
|
|
130
|
+
* The simplified layout to apply to grid-mode tiles, if any. See
|
|
131
|
+
* `LayoutType` for available options. Has no effect on list display modes.
|
|
132
|
+
*/
|
|
133
|
+
this.tileLayoutType = 'default';
|
|
127
134
|
this.manageViewLabel = 'Select items to remove';
|
|
128
135
|
/** Whether to replace the default sort options with a slot for customization (default: false) */
|
|
129
136
|
this.enableSortOptionsSlot = false;
|
|
@@ -1289,6 +1296,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1289
1296
|
.mobileBreakpoint=${this.mobileBreakpoint}
|
|
1290
1297
|
.loggedIn=${this.loggedIn}
|
|
1291
1298
|
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
1299
|
+
.tileActions=${this.tileActions}
|
|
1292
1300
|
>
|
|
1293
1301
|
</tile-dispatcher>
|
|
1294
1302
|
</div>
|
|
@@ -1303,18 +1311,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1303
1311
|
this.analyticsHandler?.sendEvent({
|
|
1304
1312
|
category: this.searchContext,
|
|
1305
1313
|
action: analyticsActions.histogramChanged,
|
|
1306
|
-
label: this.dateRangeQueryClause,
|
|
1314
|
+
label: this.dataSource.dateRangeQueryClause,
|
|
1307
1315
|
});
|
|
1308
1316
|
}
|
|
1309
|
-
/**
|
|
1310
|
-
* The Lucene query corresponding to the current date range.
|
|
1311
|
-
*/
|
|
1312
|
-
get dateRangeQueryClause() {
|
|
1313
|
-
if (!this.minSelectedDate || !this.maxSelectedDate) {
|
|
1314
|
-
return undefined;
|
|
1315
|
-
}
|
|
1316
|
-
return `year:[${this.minSelectedDate} TO ${this.maxSelectedDate}]`;
|
|
1317
|
-
}
|
|
1318
1317
|
/**
|
|
1319
1318
|
* Emits an event indicating a change in whether the manage mode is shown.
|
|
1320
1319
|
*/
|
|
@@ -1411,7 +1410,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
1411
1410
|
if (changed.has('displayMode') ||
|
|
1412
1411
|
changed.has('baseNavigationUrl') ||
|
|
1413
1412
|
changed.has('baseImageUrl') ||
|
|
1414
|
-
changed.has('loggedIn')
|
|
1413
|
+
changed.has('loggedIn') ||
|
|
1414
|
+
changed.has('tileActions') ||
|
|
1415
|
+
changed.has('tileLayoutType')) {
|
|
1415
1416
|
this.infiniteScroller?.reload();
|
|
1416
1417
|
}
|
|
1417
1418
|
if (changed.has('profileElement')) {
|
|
@@ -2065,6 +2066,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
|
|
|
2065
2066
|
.loggedIn=${this.loggedIn}
|
|
2066
2067
|
.suppressBlurring=${this.shouldSuppressTileBlurring}
|
|
2067
2068
|
.isManageView=${this.isManageView}
|
|
2069
|
+
.tileActions=${this.tileActions}
|
|
2070
|
+
.layoutType=${this.tileLayoutType}
|
|
2068
2071
|
?showTvClips=${isTVSearch || isTVCollection}
|
|
2069
2072
|
?enableHoverPane=${true}
|
|
2070
2073
|
?useLocalTime=${shouldUseLocalTime}
|
|
@@ -2726,6 +2729,12 @@ __decorate([
|
|
|
2726
2729
|
__decorate([
|
|
2727
2730
|
property({ type: Boolean })
|
|
2728
2731
|
], CollectionBrowser.prototype, "isManageView", void 0);
|
|
2732
|
+
__decorate([
|
|
2733
|
+
property({ type: Array })
|
|
2734
|
+
], CollectionBrowser.prototype, "tileActions", void 0);
|
|
2735
|
+
__decorate([
|
|
2736
|
+
property({ type: String })
|
|
2737
|
+
], CollectionBrowser.prototype, "tileLayoutType", void 0);
|
|
2729
2738
|
__decorate([
|
|
2730
2739
|
property({ type: String })
|
|
2731
2740
|
], CollectionBrowser.prototype, "manageViewLabel", void 0);
|