@internetarchive/collection-browser 3.0.0 → 3.0.1-webdev-7936.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 +4 -4
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-browser.js +681 -680
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.js +131 -130
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +75 -75
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
- package/dist/src/collection-facets.js +264 -263
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +3 -2
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +139 -139
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/search-tile.js +3 -2
- package/dist/src/tiles/grid/search-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +2 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.js +21 -21
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.js +108 -108
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +97 -97
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +300 -290
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +200 -200
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/test/collection-browser.test.js +183 -183
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/restoration-state-handler.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +13 -0
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +117 -117
- package/renovate.json +6 -6
- package/src/collection-browser.ts +2776 -2775
- package/src/collection-facets/facet-row.ts +283 -282
- package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
- package/src/collection-facets.ts +991 -990
- package/src/data-source/collection-browser-data-source.ts +1390 -1390
- package/src/data-source/collection-browser-query-state.ts +63 -63
- package/src/data-source/models.ts +43 -43
- package/src/models.ts +870 -870
- package/src/restoration-state-handler.ts +544 -544
- package/src/sort-filter-bar/sort-filter-bar.ts +1 -1
- package/src/tiles/base-tile-component.ts +53 -53
- package/src/tiles/grid/collection-tile.ts +3 -2
- package/src/tiles/grid/item-tile.ts +339 -339
- package/src/tiles/grid/search-tile.ts +3 -2
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +2 -1
- package/src/tiles/hover/hover-pane-controller.ts +517 -517
- package/src/tiles/hover/tile-hover-pane.ts +180 -180
- package/src/tiles/list/tile-list-compact-header.ts +86 -86
- package/src/tiles/list/tile-list-compact.ts +236 -236
- package/src/tiles/list/tile-list.ts +696 -688
- package/src/tiles/tile-dispatcher.ts +486 -486
- package/src/tiles/tile-display-value-provider.ts +124 -124
- package/test/collection-browser.test.ts +2340 -2340
- package/test/restoration-state-handler.test.ts +510 -510
- package/test/tiles/list/tile-list.test.ts +15 -0
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -1256,7 +1256,7 @@ export class SortFilterBar
|
|
|
1256
1256
|
--dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
|
|
1257
1257
|
--dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
|
|
1258
1258
|
--caretHeight: 9px;
|
|
1259
|
-
--caretWidth:
|
|
1259
|
+
--caretWidth: 15px;
|
|
1260
1260
|
--caretPadding: 0 5px 0 0;
|
|
1261
1261
|
}
|
|
1262
1262
|
ia-dropdown.selected .dropdown-label {
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import type { SortParam } from '@internetarchive/search-service';
|
|
4
|
-
import { TileDisplayValueProvider } from './tile-display-value-provider';
|
|
5
|
-
import type { TileModel } from '../models';
|
|
6
|
-
|
|
7
|
-
export abstract class BaseTileComponent extends LitElement {
|
|
8
|
-
@property({ type: Object }) model?: TileModel;
|
|
9
|
-
|
|
10
|
-
@property({ type: Number }) currentWidth?: number;
|
|
11
|
-
|
|
12
|
-
@property({ type: Number }) currentHeight?: number;
|
|
13
|
-
|
|
14
|
-
@property({ type: String }) baseNavigationUrl?: string;
|
|
15
|
-
|
|
16
|
-
@property({ type: String }) baseImageUrl?: string;
|
|
17
|
-
|
|
18
|
-
@property({ type: String }) collectionPagePath?: string;
|
|
19
|
-
|
|
20
|
-
@property({ type: Object }) sortParam: SortParam | null = null;
|
|
21
|
-
|
|
22
|
-
@property({ type: Object }) defaultSortParam: SortParam | null = null;
|
|
23
|
-
|
|
24
|
-
@property({ type: String }) creatorFilter?: string;
|
|
25
|
-
|
|
26
|
-
@property({ type: Number }) mobileBreakpoint?: number;
|
|
27
|
-
|
|
28
|
-
@property({ type: Boolean }) loggedIn = false;
|
|
29
|
-
|
|
30
|
-
@property({ type: Boolean }) suppressBlurring = false;
|
|
31
|
-
|
|
32
|
-
protected displayValueProvider = new TileDisplayValueProvider();
|
|
33
|
-
|
|
34
|
-
protected willUpdate(changed: PropertyValues<this>) {
|
|
35
|
-
// Ensure the TileDisplayValueProvider stays up-to-date as properties change
|
|
36
|
-
if (
|
|
37
|
-
changed.has('model') ||
|
|
38
|
-
changed.has('baseNavigationUrl') ||
|
|
39
|
-
changed.has('collectionPagePath') ||
|
|
40
|
-
changed.has('sortParam') ||
|
|
41
|
-
changed.has('defaultSortParam') ||
|
|
42
|
-
changed.has('creatorFilter')
|
|
43
|
-
) {
|
|
44
|
-
this.displayValueProvider = new TileDisplayValueProvider({
|
|
45
|
-
model: this.model,
|
|
46
|
-
baseNavigationUrl: this.baseNavigationUrl,
|
|
47
|
-
collectionPagePath: this.collectionPagePath,
|
|
48
|
-
sortParam: this.sortParam ?? this.defaultSortParam ?? undefined,
|
|
49
|
-
creatorFilter: this.creatorFilter,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import type { SortParam } from '@internetarchive/search-service';
|
|
4
|
+
import { TileDisplayValueProvider } from './tile-display-value-provider';
|
|
5
|
+
import type { TileModel } from '../models';
|
|
6
|
+
|
|
7
|
+
export abstract class BaseTileComponent extends LitElement {
|
|
8
|
+
@property({ type: Object }) model?: TileModel;
|
|
9
|
+
|
|
10
|
+
@property({ type: Number }) currentWidth?: number;
|
|
11
|
+
|
|
12
|
+
@property({ type: Number }) currentHeight?: number;
|
|
13
|
+
|
|
14
|
+
@property({ type: String }) baseNavigationUrl?: string;
|
|
15
|
+
|
|
16
|
+
@property({ type: String }) baseImageUrl?: string;
|
|
17
|
+
|
|
18
|
+
@property({ type: String }) collectionPagePath?: string;
|
|
19
|
+
|
|
20
|
+
@property({ type: Object }) sortParam: SortParam | null = null;
|
|
21
|
+
|
|
22
|
+
@property({ type: Object }) defaultSortParam: SortParam | null = null;
|
|
23
|
+
|
|
24
|
+
@property({ type: String }) creatorFilter?: string;
|
|
25
|
+
|
|
26
|
+
@property({ type: Number }) mobileBreakpoint?: number;
|
|
27
|
+
|
|
28
|
+
@property({ type: Boolean }) loggedIn = false;
|
|
29
|
+
|
|
30
|
+
@property({ type: Boolean }) suppressBlurring = false;
|
|
31
|
+
|
|
32
|
+
protected displayValueProvider = new TileDisplayValueProvider();
|
|
33
|
+
|
|
34
|
+
protected willUpdate(changed: PropertyValues<this>) {
|
|
35
|
+
// Ensure the TileDisplayValueProvider stays up-to-date as properties change
|
|
36
|
+
if (
|
|
37
|
+
changed.has('model') ||
|
|
38
|
+
changed.has('baseNavigationUrl') ||
|
|
39
|
+
changed.has('collectionPagePath') ||
|
|
40
|
+
changed.has('sortParam') ||
|
|
41
|
+
changed.has('defaultSortParam') ||
|
|
42
|
+
changed.has('creatorFilter')
|
|
43
|
+
) {
|
|
44
|
+
this.displayValueProvider = new TileDisplayValueProvider({
|
|
45
|
+
model: this.model,
|
|
46
|
+
baseNavigationUrl: this.baseNavigationUrl,
|
|
47
|
+
collectionPagePath: this.collectionPagePath,
|
|
48
|
+
sortParam: this.sortParam ?? this.defaultSortParam ?? undefined,
|
|
49
|
+
creatorFilter: this.creatorFilter,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -55,7 +55,7 @@ export class CollectionTile extends BaseTileComponent {
|
|
|
55
55
|
|
|
56
56
|
private get getTitleTemplate() {
|
|
57
57
|
return html`<div id="title">
|
|
58
|
-
<
|
|
58
|
+
<h3 class="truncated">${this.model?.title}</h3>
|
|
59
59
|
</div>`;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -123,7 +123,8 @@ export class CollectionTile extends BaseTileComponent {
|
|
|
123
123
|
flex-grow: initial;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
h4.truncated
|
|
126
|
+
h4.truncated,
|
|
127
|
+
h3.truncated {
|
|
127
128
|
color: ${whiteColor};
|
|
128
129
|
}
|
|
129
130
|
|