@internetarchive/collection-browser 3.0.1-webdev-7936.0 → 3.0.2-alpha-webdev7960.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 (72) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/src/collection-browser.js +680 -681
  11. package/dist/src/collection-browser.js.map +1 -1
  12. package/dist/src/collection-facets/facet-row.js +130 -131
  13. package/dist/src/collection-facets/facet-row.js.map +1 -1
  14. package/dist/src/collection-facets/models.d.ts +9 -0
  15. package/dist/src/collection-facets/models.js +10 -0
  16. package/dist/src/collection-facets/models.js.map +1 -0
  17. package/dist/src/collection-facets/more-facets-content.js +121 -120
  18. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  19. package/dist/src/collection-facets.js +263 -264
  20. package/dist/src/collection-facets.js.map +1 -1
  21. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  22. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  23. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  24. package/dist/src/data-source/models.js.map +1 -1
  25. package/dist/src/models.js.map +1 -1
  26. package/dist/src/restoration-state-handler.js.map +1 -1
  27. package/dist/src/sort-filter-bar/sort-filter-bar.js +1 -1
  28. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  29. package/dist/src/tiles/grid/collection-tile.js +2 -3
  30. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  31. package/dist/src/tiles/grid/item-tile.js +2 -2
  32. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  33. package/dist/src/tiles/grid/search-tile.js +2 -3
  34. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  35. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +1 -2
  36. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  37. package/dist/src/tiles/list/tile-list.js +3 -13
  38. package/dist/src/tiles/list/tile-list.js.map +1 -1
  39. package/dist/test/collection-browser.test.js +183 -183
  40. package/dist/test/collection-browser.test.js.map +1 -1
  41. package/dist/test/restoration-state-handler.test.js.map +1 -1
  42. package/dist/test/tiles/list/tile-list.test.js +0 -13
  43. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  44. package/eslint.config.mjs +53 -53
  45. package/index.html +24 -24
  46. package/local.archive.org.cert +86 -86
  47. package/local.archive.org.key +27 -27
  48. package/package.json +117 -117
  49. package/renovate.json +6 -6
  50. package/src/collection-browser.ts +2775 -2776
  51. package/src/collection-facets/facet-row.ts +282 -283
  52. package/src/collection-facets/models.ts +10 -0
  53. package/src/collection-facets/more-facets-content.ts +636 -632
  54. package/src/collection-facets.ts +990 -991
  55. package/src/data-source/collection-browser-data-source-interface.ts +333 -333
  56. package/src/data-source/collection-browser-data-source.ts +1390 -1390
  57. package/src/data-source/collection-browser-query-state.ts +63 -63
  58. package/src/data-source/models.ts +43 -43
  59. package/src/models.ts +870 -870
  60. package/src/restoration-state-handler.ts +544 -544
  61. package/src/sort-filter-bar/sort-filter-bar.ts +1 -1
  62. package/src/tiles/grid/collection-tile.ts +2 -3
  63. package/src/tiles/grid/item-tile.ts +2 -2
  64. package/src/tiles/grid/search-tile.ts +2 -3
  65. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +1 -2
  66. package/src/tiles/list/tile-list.ts +3 -11
  67. package/test/collection-browser.test.ts +2340 -2340
  68. package/test/restoration-state-handler.test.ts +510 -510
  69. package/test/tiles/list/tile-list.test.ts +0 -15
  70. package/tsconfig.json +20 -20
  71. package/web-dev-server.config.mjs +30 -30
  72. package/web-test-runner.config.mjs +41 -41
@@ -49,20 +49,6 @@ describe('List Tile', () => {
49
49
  expect(title?.getAttribute('href')).to.equal('/foo/bar');
50
50
  });
51
51
 
52
- it('should add title to image link if provided', async () => {
53
- const el = await fixture<TileList>(html`
54
- <tile-list
55
- .baseNavigationUrl=${''}
56
- .model=${{ title: 'foo', href: '/foo/bar' }}
57
- ></tile-list>
58
- `);
59
-
60
- const imageLink = el.shadowRoot?.querySelector('#image-link');
61
-
62
- expect(imageLink).to.exist;
63
- expect(imageLink?.getAttribute('title')).to.equal('View foo');
64
- });
65
-
66
52
  it('should render with creator element but not dates', async () => {
67
53
  const el = await fixture<TileList>(html`
68
54
  <tile-list .model=${{ creators: ['someone'] }}></tile-list>
@@ -338,7 +324,6 @@ describe('List Tile', () => {
338
324
  expect(mediatypeLink?.getAttribute('href')).to.equal(
339
325
  `https://archive.org/details/texts`,
340
326
  );
341
- expect(mediatypeLink?.getAttribute('title')).to.equal('See more: texts');
342
327
  });
343
328
 
344
329
  it('should render mediatype icon as link even with empty baseNavigationUrl', async () => {
package/tsconfig.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2017", "dom", "dom.iterable"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowSyntheticDefaultImports": true,
11
- "experimentalDecorators": true,
12
- "importHelpers": true,
13
- "outDir": "dist",
14
- "sourceMap": true,
15
- "inlineSources": true,
16
- "rootDir": "./",
17
- "declaration": true,
18
- },
19
- "include": ["src", "test", "index.ts", "types"],
20
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2018",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "noEmitOnError": true,
7
+ "lib": ["es2017", "dom", "dom.iterable"],
8
+ "strict": true,
9
+ "esModuleInterop": false,
10
+ "allowSyntheticDefaultImports": true,
11
+ "experimentalDecorators": true,
12
+ "importHelpers": true,
13
+ "outDir": "dist",
14
+ "sourceMap": true,
15
+ "inlineSources": true,
16
+ "rootDir": "./",
17
+ "declaration": true,
18
+ },
19
+ "include": ["src", "test", "index.ts", "types"],
20
+ }
@@ -1,30 +1,30 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- nodeResolve: true,
8
- open: '/',
9
- watch: !hmr,
10
-
11
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
- // esbuildTarget: 'auto'
13
-
14
- /** Set appIndex to enable SPA routing */
15
- // appIndex: 'demo/index.html',
16
-
17
- /** Confgure bare import resolve plugin */
18
- // nodeResolve: {
19
- // exportConditions: ['browser', 'development']
20
- // },
21
-
22
- plugins: [
23
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
- ],
26
-
27
- http2: true,
28
- sslCert: './local.archive.org.cert',
29
- sslKey: './local.archive.org.key',
30
- });
1
+ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
+
3
+ /** Use Hot Module replacement by adding --hmr to the start command */
4
+ const hmr = process.argv.includes('--hmr');
5
+
6
+ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
+ nodeResolve: true,
8
+ open: '/',
9
+ watch: !hmr,
10
+
11
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
+ // esbuildTarget: 'auto'
13
+
14
+ /** Set appIndex to enable SPA routing */
15
+ // appIndex: 'demo/index.html',
16
+
17
+ /** Confgure bare import resolve plugin */
18
+ // nodeResolve: {
19
+ // exportConditions: ['browser', 'development']
20
+ // },
21
+
22
+ plugins: [
23
+ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
+ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
+ ],
26
+
27
+ http2: true,
28
+ sslCert: './local.archive.org.cert',
29
+ sslKey: './local.archive.org.key',
30
+ });
@@ -1,41 +1,41 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });
1
+ // import { playwrightLauncher } from '@web/test-runner-playwright';
2
+
3
+ const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
+
5
+ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
+ /** Test files to run */
7
+ files: 'dist/test/**/*.test.js',
8
+
9
+ /** Resolve bare module imports */
10
+ nodeResolve: {
11
+ exportConditions: ['browser', 'development'],
12
+ },
13
+
14
+ /** Filter out lit dev mode logs */
15
+ filterBrowserLogs(log) {
16
+ for (const arg of log.args) {
17
+ if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
+ return false;
19
+ }
20
+ }
21
+ return true;
22
+ },
23
+
24
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
+ // esbuildTarget: 'auto',
26
+
27
+ /** Amount of browsers to run concurrently */
28
+ // concurrentBrowsers: 2,
29
+
30
+ /** Amount of test files per browser to test concurrently */
31
+ // concurrency: 1,
32
+
33
+ /** Browsers to run tests on */
34
+ // browsers: [
35
+ // playwrightLauncher({ product: 'chromium' }),
36
+ // playwrightLauncher({ product: 'firefox' }),
37
+ // playwrightLauncher({ product: 'webkit' }),
38
+ // ],
39
+
40
+ // See documentation for all available options
41
+ });