@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.
Files changed (63) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/app-root.d.ts +11 -0
  4. package/dist/src/app-root.js +107 -0
  5. package/dist/src/app-root.js.map +1 -1
  6. package/dist/src/collection-browser.d.ts +8 -4
  7. package/dist/src/collection-browser.js +19 -20
  8. package/dist/src/collection-browser.js.map +1 -1
  9. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  10. package/dist/src/manage/manage-bar.d.ts +7 -2
  11. package/dist/src/manage/manage-bar.js +25 -3
  12. package/dist/src/manage/manage-bar.js.map +1 -1
  13. package/dist/src/styles/tile-action-styles.d.ts +14 -0
  14. package/dist/src/styles/tile-action-styles.js +52 -0
  15. package/dist/src/styles/tile-action-styles.js.map +1 -0
  16. package/dist/src/tiles/base-tile-component.d.ts +17 -1
  17. package/dist/src/tiles/base-tile-component.js +48 -1
  18. package/dist/src/tiles/base-tile-component.js.map +1 -1
  19. package/dist/src/tiles/grid/item-tile.js +1 -0
  20. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  21. package/dist/src/tiles/list/tile-list-compact-header.js +66 -46
  22. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  23. package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
  24. package/dist/src/tiles/list/tile-list-compact.js +132 -100
  25. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  26. package/dist/src/tiles/list/tile-list.d.ts +1 -1
  27. package/dist/src/tiles/list/tile-list.js +316 -298
  28. package/dist/src/tiles/list/tile-list.js.map +1 -1
  29. package/dist/src/tiles/models.d.ts +14 -0
  30. package/dist/src/tiles/models.js.map +1 -1
  31. package/dist/src/tiles/tile-dispatcher.d.ts +14 -0
  32. package/dist/src/tiles/tile-dispatcher.js +107 -4
  33. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  34. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  35. package/dist/test/data-source/collection-browser-data-source.test.js +2 -2
  36. package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -1
  37. package/dist/test/manage/manage-bar.test.d.ts +1 -0
  38. package/dist/test/manage/manage-bar.test.js +123 -1
  39. package/dist/test/manage/manage-bar.test.js.map +1 -1
  40. package/dist/test/tiles/list/tile-list-compact-header.test.js +12 -12
  41. package/dist/test/tiles/list/tile-list-compact-header.test.js.map +1 -1
  42. package/dist/test/tiles/list/tile-list.test.js +134 -134
  43. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  44. package/index.ts +1 -0
  45. package/package.json +1 -1
  46. package/src/app-root.ts +115 -0
  47. package/src/collection-browser.ts +16 -30
  48. package/src/data-source/collection-browser-data-source.ts +1465 -1465
  49. package/src/manage/manage-bar.ts +33 -4
  50. package/src/styles/tile-action-styles.ts +52 -0
  51. package/src/tiles/base-tile-component.ts +57 -1
  52. package/src/tiles/grid/item-tile.ts +1 -0
  53. package/src/tiles/list/tile-list-compact-header.ts +106 -86
  54. package/src/tiles/list/tile-list-compact.ts +273 -239
  55. package/src/tiles/list/tile-list.ts +718 -700
  56. package/src/tiles/models.ts +16 -0
  57. package/src/tiles/tile-dispatcher.ts +114 -4
  58. package/src/tiles/tile-display-value-provider.ts +134 -134
  59. package/test/data-source/collection-browser-data-source.test.ts +193 -193
  60. package/test/manage/manage-bar.test.ts +192 -2
  61. package/test/tiles/list/tile-list-compact-header.test.ts +43 -43
  62. package/test/tiles/list/tile-list.test.ts +576 -576
  63. 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
+ });