@internetarchive/collection-browser 4.3.0 → 4.3.1-alpha-webdev8257.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/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/app-root.d.ts +11 -0
- package/dist/src/app-root.js +107 -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 +19 -20
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/manage/manage-bar.d.ts +7 -2
- package/dist/src/manage/manage-bar.js +25 -3
- package/dist/src/manage/manage-bar.js.map +1 -1
- package/dist/src/styles/tile-action-styles.d.ts +14 -0
- package/dist/src/styles/tile-action-styles.js +52 -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 +48 -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 +66 -46
- 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 +132 -100
- 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 +316 -298
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/models.d.ts +14 -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/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/test/data-source/collection-browser-data-source.test.js +2 -2
- package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -1
- package/dist/test/manage/manage-bar.test.d.ts +1 -0
- package/dist/test/manage/manage-bar.test.js +123 -1
- package/dist/test/manage/manage-bar.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list-compact-header.test.js +12 -12
- package/dist/test/tiles/list/tile-list-compact-header.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +134 -134
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/app-root.ts +115 -0
- package/src/collection-browser.ts +16 -30
- package/src/data-source/collection-browser-data-source.ts +1465 -1465
- package/src/manage/manage-bar.ts +33 -4
- package/src/styles/tile-action-styles.ts +52 -0
- package/src/tiles/base-tile-component.ts +57 -1
- package/src/tiles/grid/item-tile.ts +1 -0
- package/src/tiles/list/tile-list-compact-header.ts +106 -86
- package/src/tiles/list/tile-list-compact.ts +273 -239
- package/src/tiles/list/tile-list.ts +718 -700
- package/src/tiles/models.ts +16 -0
- package/src/tiles/tile-dispatcher.ts +114 -4
- package/src/tiles/tile-display-value-provider.ts +134 -134
- package/test/data-source/collection-browser-data-source.test.ts +193 -193
- package/test/manage/manage-bar.test.ts +192 -2
- package/test/tiles/list/tile-list-compact-header.test.ts +43 -43
- package/test/tiles/list/tile-list.test.ts +576 -576
- package/.claude/settings.local.json +0 -11
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { expect, fixture } from '@open-wc/testing';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import type { TileListCompactHeader } from '../../../src/tiles/list/tile-list-compact-header';
|
|
4
|
-
|
|
5
|
-
import '../../../src/tiles/list/tile-list-compact-header';
|
|
6
|
-
|
|
7
|
-
describe('List Tile Compact Header', () => {
|
|
8
|
-
it('should render Weekly views header when sorting by week', async () => {
|
|
9
|
-
const el = await fixture<TileListCompactHeader>(html`
|
|
10
|
-
<tile-list-compact-header
|
|
11
|
-
.sortParam=${{ field: 'week', direction: 'desc' }}
|
|
12
|
-
>
|
|
13
|
-
</tile-list-compact-header>
|
|
14
|
-
`);
|
|
15
|
-
|
|
16
|
-
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
17
|
-
expect(viewsColumn).to.exist;
|
|
18
|
-
expect(viewsColumn?.textContent?.trim()).to.equal('Weekly views');
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('should render All-time views header when sorting by non-week field', async () => {
|
|
22
|
-
const el = await fixture<TileListCompactHeader>(html`
|
|
23
|
-
<tile-list-compact-header
|
|
24
|
-
.sortParam=${{ field: 'downloads', direction: 'desc' }}
|
|
25
|
-
>
|
|
26
|
-
</tile-list-compact-header>
|
|
27
|
-
`);
|
|
28
|
-
|
|
29
|
-
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
30
|
-
expect(viewsColumn).to.exist;
|
|
31
|
-
expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('should render All-time views header with no sort param', async () => {
|
|
35
|
-
const el = await fixture<TileListCompactHeader>(html`
|
|
36
|
-
<tile-list-compact-header> </tile-list-compact-header>
|
|
37
|
-
`);
|
|
38
|
-
|
|
39
|
-
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
40
|
-
expect(viewsColumn).to.exist;
|
|
41
|
-
expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
|
|
42
|
-
});
|
|
43
|
-
});
|
|
1
|
+
import { expect, fixture } from '@open-wc/testing';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import type { TileListCompactHeader } from '../../../src/tiles/list/tile-list-compact-header';
|
|
4
|
+
|
|
5
|
+
import '../../../src/tiles/list/tile-list-compact-header';
|
|
6
|
+
|
|
7
|
+
describe('List Tile Compact Header', () => {
|
|
8
|
+
it('should render Weekly views header when sorting by week', async () => {
|
|
9
|
+
const el = await fixture<TileListCompactHeader>(html`
|
|
10
|
+
<tile-list-compact-header
|
|
11
|
+
.sortParam=${{ field: 'week', direction: 'desc' }}
|
|
12
|
+
>
|
|
13
|
+
</tile-list-compact-header>
|
|
14
|
+
`);
|
|
15
|
+
|
|
16
|
+
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
17
|
+
expect(viewsColumn).to.exist;
|
|
18
|
+
expect(viewsColumn?.textContent?.trim()).to.equal('Weekly views');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should render All-time views header when sorting by non-week field', async () => {
|
|
22
|
+
const el = await fixture<TileListCompactHeader>(html`
|
|
23
|
+
<tile-list-compact-header
|
|
24
|
+
.sortParam=${{ field: 'downloads', direction: 'desc' }}
|
|
25
|
+
>
|
|
26
|
+
</tile-list-compact-header>
|
|
27
|
+
`);
|
|
28
|
+
|
|
29
|
+
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
30
|
+
expect(viewsColumn).to.exist;
|
|
31
|
+
expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('should render All-time views header with no sort param', async () => {
|
|
35
|
+
const el = await fixture<TileListCompactHeader>(html`
|
|
36
|
+
<tile-list-compact-header> </tile-list-compact-header>
|
|
37
|
+
`);
|
|
38
|
+
|
|
39
|
+
const viewsColumn = el.shadowRoot?.getElementById('views');
|
|
40
|
+
expect(viewsColumn).to.exist;
|
|
41
|
+
expect(viewsColumn?.textContent?.trim()).to.equal('All-time views');
|
|
42
|
+
});
|
|
43
|
+
});
|