@internetarchive/collection-browser 2.22.1-webdev-7936.0 → 3.0.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 (83) 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.d.ts +5 -2
  11. package/dist/src/collection-browser.js +699 -690
  12. package/dist/src/collection-browser.js.map +1 -1
  13. package/dist/src/collection-facets/facet-row.js +130 -130
  14. package/dist/src/collection-facets/facet-row.js.map +1 -1
  15. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +75 -75
  16. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  17. package/dist/src/collection-facets.js +263 -264
  18. package/dist/src/collection-facets.js.map +1 -1
  19. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  20. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  21. package/dist/src/data-source/models.js.map +1 -1
  22. package/dist/src/models.js.map +1 -1
  23. package/dist/src/restoration-state-handler.js.map +1 -1
  24. package/dist/src/tiles/base-tile-component.js.map +1 -1
  25. package/dist/src/tiles/grid/collection-tile.js +2 -3
  26. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  27. package/dist/src/tiles/grid/item-tile.js +139 -139
  28. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  29. package/dist/src/tiles/grid/search-tile.js +2 -3
  30. package/dist/src/tiles/grid/search-tile.js.map +1 -1
  31. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +1 -2
  32. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  33. package/dist/src/tiles/hover/hover-pane-controller.js +21 -21
  34. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  35. package/dist/src/tiles/hover/tile-hover-pane.js +108 -108
  36. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
  37. package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
  38. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  39. package/dist/src/tiles/list/tile-list-compact.js +97 -97
  40. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  41. package/dist/src/tiles/list/tile-list.js +289 -295
  42. package/dist/src/tiles/list/tile-list.js.map +1 -1
  43. package/dist/src/tiles/tile-dispatcher.js +200 -200
  44. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  45. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  46. package/dist/test/collection-browser.test.js +183 -197
  47. package/dist/test/collection-browser.test.js.map +1 -1
  48. package/dist/test/restoration-state-handler.test.js.map +1 -1
  49. package/dist/test/tiles/list/tile-list.test.js +0 -1
  50. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  51. package/eslint.config.mjs +53 -53
  52. package/index.html +24 -24
  53. package/local.archive.org.cert +86 -86
  54. package/local.archive.org.key +27 -27
  55. package/package.json +117 -117
  56. package/renovate.json +6 -6
  57. package/src/collection-browser.ts +2775 -2756
  58. package/src/collection-facets/facet-row.ts +282 -282
  59. package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
  60. package/src/collection-facets.ts +990 -991
  61. package/src/data-source/collection-browser-data-source.ts +1390 -1390
  62. package/src/data-source/collection-browser-query-state.ts +63 -63
  63. package/src/data-source/models.ts +43 -43
  64. package/src/models.ts +870 -870
  65. package/src/restoration-state-handler.ts +544 -544
  66. package/src/tiles/base-tile-component.ts +53 -53
  67. package/src/tiles/grid/collection-tile.ts +2 -3
  68. package/src/tiles/grid/item-tile.ts +339 -339
  69. package/src/tiles/grid/search-tile.ts +2 -3
  70. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +1 -2
  71. package/src/tiles/hover/hover-pane-controller.ts +517 -517
  72. package/src/tiles/hover/tile-hover-pane.ts +180 -180
  73. package/src/tiles/list/tile-list-compact-header.ts +86 -86
  74. package/src/tiles/list/tile-list-compact.ts +236 -236
  75. package/src/tiles/list/tile-list.ts +688 -692
  76. package/src/tiles/tile-dispatcher.ts +486 -486
  77. package/src/tiles/tile-display-value-provider.ts +124 -124
  78. package/test/collection-browser.test.ts +2340 -2359
  79. package/test/restoration-state-handler.test.ts +510 -510
  80. package/test/tiles/list/tile-list.test.ts +0 -1
  81. package/tsconfig.json +20 -20
  82. package/web-dev-server.config.mjs +30 -30
  83. package/web-test-runner.config.mjs +41 -41
package/README.md CHANGED
@@ -1,84 +1,84 @@
1
- ![Build Status](https://github.com/internetarchive/iaux-collection-browser/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/internetarchive/iaux-collection-browser/branch/main/graph/badge.svg?token=CLWEGO4RMQ)](https://codecov.io/gh/internetarchive/iaux-collection-browser)
2
-
3
-
4
- # Internet Archive Collection Browser
5
-
6
- This is the main collection browser for the Internet Archive website.
7
-
8
- [Review app URL](https://internetarchive.github.io/iaux-collection-browser/main)
9
- ## Usage
10
-
11
- ```ts
12
- import '@internetarchive/collection-browser';
13
-
14
- <collection-browser>
15
- </collection-browser>
16
- ```
17
-
18
- ## Local Demo with `web-dev-server`
19
- ```bash
20
- yarn install
21
- yarn start
22
- ```
23
- To run a local development server that serves the basic demo located in `index.html`
24
-
25
- ## Testing with Web Test Runner
26
- To run the suite of Web Test Runner tests, run
27
- ```bash
28
- yarn run test
29
- ```
30
-
31
- To run the tests in watch mode (for &lt;abbr title=&#34;test driven development&#34;&gt;TDD&lt;/abbr&gt;, for example), run
32
-
33
- ```bash
34
- yarn run test:watch
35
- ```
36
-
37
- ## Linting with ESLint, Prettier, and Types
38
- To scan the project for linting errors, run
39
- ```bash
40
- yarn run lint
41
- ```
42
-
43
- You can lint with ESLint and Prettier individually as well
44
- ```bash
45
- yarn run lint:eslint
46
- ```
47
- ```bash
48
- yarn run lint:prettier
49
- ```
50
-
51
- To automatically fix many linting errors, run
52
- ```bash
53
- yarn run format
54
- ```
55
-
56
- You can format using ESLint and Prettier individually as well
57
- ```bash
58
- yarn run format:eslint
59
- ```
60
- ```bash
61
- yarn run format:prettier
62
- ```
63
-
64
- ## Tooling configs
65
-
66
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
67
-
68
- If you customize the configuration a lot, you can consider moving them to individual files.
69
-
70
- ## Manual Deploy using `gh-pages`
71
-
72
- Live demo app from current main branch: [https://internetarchive.github.io/iaux-collection-browser](https://internetarchive.github.io/iaux-collection-browser)
73
-
74
- ```
75
- yarn run deploy
76
- ```
77
-
78
- ## Automatic Deploy of Demo App
79
-
80
- When you create a Pull Request, if your code passes codecov unit tests, it will be always served live at base url / pull request number. For this demo app, you must create a Pull Request, nothing will be created from a simple branch.
81
-
82
- This URL will be removed when the Pull Request is merged/closed.
83
-
1
+ ![Build Status](https://github.com/internetarchive/iaux-collection-browser/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/internetarchive/iaux-collection-browser/branch/main/graph/badge.svg?token=CLWEGO4RMQ)](https://codecov.io/gh/internetarchive/iaux-collection-browser)
2
+
3
+
4
+ # Internet Archive Collection Browser
5
+
6
+ This is the main collection browser for the Internet Archive website.
7
+
8
+ [Review app URL](https://internetarchive.github.io/iaux-collection-browser/main)
9
+ ## Usage
10
+
11
+ ```ts
12
+ import '@internetarchive/collection-browser';
13
+
14
+ <collection-browser>
15
+ </collection-browser>
16
+ ```
17
+
18
+ ## Local Demo with `web-dev-server`
19
+ ```bash
20
+ yarn install
21
+ yarn start
22
+ ```
23
+ To run a local development server that serves the basic demo located in `index.html`
24
+
25
+ ## Testing with Web Test Runner
26
+ To run the suite of Web Test Runner tests, run
27
+ ```bash
28
+ yarn run test
29
+ ```
30
+
31
+ To run the tests in watch mode (for &lt;abbr title=&#34;test driven development&#34;&gt;TDD&lt;/abbr&gt;, for example), run
32
+
33
+ ```bash
34
+ yarn run test:watch
35
+ ```
36
+
37
+ ## Linting with ESLint, Prettier, and Types
38
+ To scan the project for linting errors, run
39
+ ```bash
40
+ yarn run lint
41
+ ```
42
+
43
+ You can lint with ESLint and Prettier individually as well
44
+ ```bash
45
+ yarn run lint:eslint
46
+ ```
47
+ ```bash
48
+ yarn run lint:prettier
49
+ ```
50
+
51
+ To automatically fix many linting errors, run
52
+ ```bash
53
+ yarn run format
54
+ ```
55
+
56
+ You can format using ESLint and Prettier individually as well
57
+ ```bash
58
+ yarn run format:eslint
59
+ ```
60
+ ```bash
61
+ yarn run format:prettier
62
+ ```
63
+
64
+ ## Tooling configs
65
+
66
+ For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
67
+
68
+ If you customize the configuration a lot, you can consider moving them to individual files.
69
+
70
+ ## Manual Deploy using `gh-pages`
71
+
72
+ Live demo app from current main branch: [https://internetarchive.github.io/iaux-collection-browser](https://internetarchive.github.io/iaux-collection-browser)
73
+
74
+ ```
75
+ yarn run deploy
76
+ ```
77
+
78
+ ## Automatic Deploy of Demo App
79
+
80
+ When you create a Pull Request, if your code passes codecov unit tests, it will be always served live at base url / pull request number. For this demo app, you must create a Pull Request, nothing will be created from a simple branch.
81
+
82
+ This URL will be removed when the Pull Request is merged/closed.
83
+
84
84
  Example: `https://internetarchive.github.io/iaux-collection-browser/pr/<pr-number>`
@@ -158,9 +158,8 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
158
158
  manageViewLabel: string;
159
159
  /** Whether to replace the default sort options with a slot for customization (default: false) */
160
160
  enableSortOptionsSlot: boolean;
161
- /** Whether to display a smart results carousel above the full results */
161
+ /** Whether to expose a slot for a smart results carousel above the full results */
162
162
  showSmartResults: boolean;
163
- resultsHeader?: string;
164
163
  /**
165
164
  * The maximum number of pages we will load when a privileged user clicks
166
165
  * the "Manage" button on the search page. Limited to 15 pages.
@@ -351,6 +350,10 @@ export declare class CollectionBrowser extends LitElement implements InfiniteScr
351
350
  * sensitive content in result tiles.
352
351
  */
353
352
  private get tileBlurCheckboxTemplate();
353
+ /**
354
+ * Message to show in the manage view modal, depending on context.
355
+ */
356
+ private get manageViewModalMsg();
354
357
  /**
355
358
  * Template for the manage bar UI that appears atop the search results when we are
356
359
  * showing the management view. This generally replaces the sort bar when present.