@internetarchive/collection-browser 4.1.0-alpha-webdev8164.0 → 4.1.0-alpha-webdev8186.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/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/collection-browser.js +3 -13
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +0 -5
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +8 -47
- package/dist/src/collection-facets/more-facets-content.js +83 -382
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +0 -10
- package/dist/src/collection-facets/more-facets-pagination.js +1 -64
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +13 -172
- package/dist/src/sort-filter-bar/sort-filter-bar.js +37 -546
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/test/collection-browser.test.js +8 -13
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +3 -154
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +0 -60
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +86 -401
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/index.ts +1 -0
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +121 -121
- package/renovate.json +6 -6
- package/src/collection-browser.ts +3 -13
- package/src/collection-facets/facets-template.ts +0 -5
- package/src/collection-facets/more-facets-content.ts +94 -411
- package/src/collection-facets/more-facets-pagination.ts +1 -73
- package/src/sort-filter-bar/sort-filter-bar.ts +42 -603
- package/test/collection-browser.test.ts +9 -20
- package/test/collection-facets/more-facets-content.test.ts +3 -218
- package/test/collection-facets/more-facets-pagination.test.ts +0 -84
- package/test/sort-filter-bar/sort-filter-bar.test.ts +110 -566
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -52
package/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/collection-browser",
|
|
3
|
-
"description": "The Internet Archive Collection Browser.",
|
|
4
|
-
"license": "AGPL-3.0-only",
|
|
5
|
-
"author": "Internet Archive",
|
|
6
|
-
"version": "4.1.0-alpha-
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "vite",
|
|
11
|
-
"prepare:ghpages": "rimraf ghpages && yarn run prepare && vite build",
|
|
12
|
-
"prepare": "rimraf dist && tsc && husky install",
|
|
13
|
-
"lint": "eslint . && prettier \"**/*.ts\" --check",
|
|
14
|
-
"format": "eslint . --fix && prettier \"**/*.ts\" --write",
|
|
15
|
-
"circular": "madge --circular --extensions ts .",
|
|
16
|
-
"test": "tsc && yarn run lint && yarn run circular && wtr --coverage",
|
|
17
|
-
"test:fast": "tsc && wtr --coverage",
|
|
18
|
-
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
19
|
-
"deploy": "yarn run deploy:run -e $(git branch --show-current)",
|
|
20
|
-
"deploy:run": "yarn run prepare:ghpages && touch ghpages/.nojekyll && yarn run deploy:gh",
|
|
21
|
-
"deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\"",
|
|
22
|
-
"typecheck": "yarn tsc --noEmit"
|
|
23
|
-
},
|
|
24
|
-
"types": "dist/index.d.ts",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@a11y/focus-trap": "^1.0.5",
|
|
27
|
-
"@internetarchive/analytics-manager": "^0.1.4",
|
|
28
|
-
"@internetarchive/elements": "^0.2.2",
|
|
29
|
-
"@internetarchive/feature-feedback": "^1.0.0",
|
|
30
|
-
"@internetarchive/field-parsers": "^1.0.0",
|
|
31
|
-
"@internetarchive/histogram-date-range": "^1.4.1",
|
|
32
|
-
"@internetarchive/ia-dropdown": "^2.0.0",
|
|
33
|
-
"@internetarchive/iaux-item-metadata": "^1.0.5",
|
|
34
|
-
"@internetarchive/infinite-scroller": "^1.0.1",
|
|
35
|
-
"@internetarchive/modal-manager": "^2.0.5",
|
|
36
|
-
"@internetarchive/search-service": "^2.7.0",
|
|
37
|
-
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
38
|
-
"@lit/localize": "^0.12.2",
|
|
39
|
-
"dompurify": "^3.2.4",
|
|
40
|
-
"lit": "^2.8.0 || ^3.3.2",
|
|
41
|
-
"typescript-cookie": "^1.0.6"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@internetarchive/result-type": "^0.0.1",
|
|
45
|
-
"@open-wc/eslint-config": "^12.0.3",
|
|
46
|
-
"@open-wc/testing": "^4.0.0",
|
|
47
|
-
"@rollup/plugin-image": "^3.0.3",
|
|
48
|
-
"@types/dompurify": "^3.2.0",
|
|
49
|
-
"@types/mocha": "^10.0.10",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
51
|
-
"@typescript-eslint/parser": "^8.27.0",
|
|
52
|
-
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
53
|
-
"@web/dev-server": "^0.4.6",
|
|
54
|
-
"@web/dev-server-rollup": "^0.6.4",
|
|
55
|
-
"@web/test-runner": "^0.20.0",
|
|
56
|
-
"concurrently": "^9.1.2",
|
|
57
|
-
"eslint": "^9.22.0",
|
|
58
|
-
"eslint-config-prettier": "^10.1.1",
|
|
59
|
-
"eslint-plugin-html": "^8.1.2",
|
|
60
|
-
"eslint-plugin-import": "^2.31.0",
|
|
61
|
-
"eslint-plugin-lit": "^2.0.0",
|
|
62
|
-
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
63
|
-
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
64
|
-
"eslint-plugin-wc": "^3.0.0",
|
|
65
|
-
"gh-pages": "^6.3.0",
|
|
66
|
-
"husky": "^9.1.7",
|
|
67
|
-
"madge": "^8.0.0",
|
|
68
|
-
"prettier": "^3.5.3",
|
|
69
|
-
"rimraf": "^6.0.1",
|
|
70
|
-
"sinon": "^19.0.4",
|
|
71
|
-
"tslib": "^2.8.1",
|
|
72
|
-
"typescript": "^5.8.2",
|
|
73
|
-
"vite": "^6.2.2"
|
|
74
|
-
},
|
|
75
|
-
"publishConfig": {
|
|
76
|
-
"access": "public"
|
|
77
|
-
},
|
|
78
|
-
"eslintConfig": {
|
|
79
|
-
"parser": "@typescript-eslint/parser",
|
|
80
|
-
"extends": [
|
|
81
|
-
"@open-wc",
|
|
82
|
-
"prettier"
|
|
83
|
-
],
|
|
84
|
-
"plugins": [
|
|
85
|
-
"@typescript-eslint"
|
|
86
|
-
],
|
|
87
|
-
"rules": {
|
|
88
|
-
"no-unused-vars": "off",
|
|
89
|
-
"@typescript-eslint/no-unused-vars": [
|
|
90
|
-
"error"
|
|
91
|
-
],
|
|
92
|
-
"no-shadow": "off",
|
|
93
|
-
"@typescript-eslint/no-shadow": [
|
|
94
|
-
"error"
|
|
95
|
-
],
|
|
96
|
-
"class-methods-use-this": "off",
|
|
97
|
-
"import/no-unresolved": "off",
|
|
98
|
-
"import/extensions": [
|
|
99
|
-
"off",
|
|
100
|
-
"ignorePackages",
|
|
101
|
-
{
|
|
102
|
-
"js": "never",
|
|
103
|
-
"ts": "never"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"no-unsafe-optional-chaining": "warn",
|
|
107
|
-
"default-param-last": "warn"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"prettier": {
|
|
111
|
-
"singleQuote": true,
|
|
112
|
-
"arrowParens": "avoid"
|
|
113
|
-
},
|
|
114
|
-
"lint-staged": {
|
|
115
|
-
"*.ts": [
|
|
116
|
-
"eslint --fix",
|
|
117
|
-
"prettier --write",
|
|
118
|
-
"git add"
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@internetarchive/collection-browser",
|
|
3
|
+
"description": "The Internet Archive Collection Browser.",
|
|
4
|
+
"license": "AGPL-3.0-only",
|
|
5
|
+
"author": "Internet Archive",
|
|
6
|
+
"version": "4.1.0-alpha-webdev8186.0",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "vite",
|
|
11
|
+
"prepare:ghpages": "rimraf ghpages && yarn run prepare && vite build",
|
|
12
|
+
"prepare": "rimraf dist && tsc && husky install",
|
|
13
|
+
"lint": "eslint . && prettier \"**/*.ts\" --check",
|
|
14
|
+
"format": "eslint . --fix && prettier \"**/*.ts\" --write",
|
|
15
|
+
"circular": "madge --circular --extensions ts .",
|
|
16
|
+
"test": "tsc && yarn run lint && yarn run circular && wtr --coverage",
|
|
17
|
+
"test:fast": "tsc && wtr --coverage",
|
|
18
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
19
|
+
"deploy": "yarn run deploy:run -e $(git branch --show-current)",
|
|
20
|
+
"deploy:run": "yarn run prepare:ghpages && touch ghpages/.nojekyll && yarn run deploy:gh",
|
|
21
|
+
"deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\"",
|
|
22
|
+
"typecheck": "yarn tsc --noEmit"
|
|
23
|
+
},
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@a11y/focus-trap": "^1.0.5",
|
|
27
|
+
"@internetarchive/analytics-manager": "^0.1.4",
|
|
28
|
+
"@internetarchive/elements": "^0.2.2",
|
|
29
|
+
"@internetarchive/feature-feedback": "^1.0.0",
|
|
30
|
+
"@internetarchive/field-parsers": "^1.0.0",
|
|
31
|
+
"@internetarchive/histogram-date-range": "^1.4.1",
|
|
32
|
+
"@internetarchive/ia-dropdown": "^2.0.0",
|
|
33
|
+
"@internetarchive/iaux-item-metadata": "^1.0.5",
|
|
34
|
+
"@internetarchive/infinite-scroller": "^1.0.1",
|
|
35
|
+
"@internetarchive/modal-manager": "^2.0.5",
|
|
36
|
+
"@internetarchive/search-service": "^2.7.0",
|
|
37
|
+
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
38
|
+
"@lit/localize": "^0.12.2",
|
|
39
|
+
"dompurify": "^3.2.4",
|
|
40
|
+
"lit": "^2.8.0 || ^3.3.2",
|
|
41
|
+
"typescript-cookie": "^1.0.6"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@internetarchive/result-type": "^0.0.1",
|
|
45
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
46
|
+
"@open-wc/testing": "^4.0.0",
|
|
47
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
48
|
+
"@types/dompurify": "^3.2.0",
|
|
49
|
+
"@types/mocha": "^10.0.10",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.27.0",
|
|
52
|
+
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
53
|
+
"@web/dev-server": "^0.4.6",
|
|
54
|
+
"@web/dev-server-rollup": "^0.6.4",
|
|
55
|
+
"@web/test-runner": "^0.20.0",
|
|
56
|
+
"concurrently": "^9.1.2",
|
|
57
|
+
"eslint": "^9.22.0",
|
|
58
|
+
"eslint-config-prettier": "^10.1.1",
|
|
59
|
+
"eslint-plugin-html": "^8.1.2",
|
|
60
|
+
"eslint-plugin-import": "^2.31.0",
|
|
61
|
+
"eslint-plugin-lit": "^2.0.0",
|
|
62
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
63
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
64
|
+
"eslint-plugin-wc": "^3.0.0",
|
|
65
|
+
"gh-pages": "^6.3.0",
|
|
66
|
+
"husky": "^9.1.7",
|
|
67
|
+
"madge": "^8.0.0",
|
|
68
|
+
"prettier": "^3.5.3",
|
|
69
|
+
"rimraf": "^6.0.1",
|
|
70
|
+
"sinon": "^19.0.4",
|
|
71
|
+
"tslib": "^2.8.1",
|
|
72
|
+
"typescript": "^5.8.2",
|
|
73
|
+
"vite": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"eslintConfig": {
|
|
79
|
+
"parser": "@typescript-eslint/parser",
|
|
80
|
+
"extends": [
|
|
81
|
+
"@open-wc",
|
|
82
|
+
"prettier"
|
|
83
|
+
],
|
|
84
|
+
"plugins": [
|
|
85
|
+
"@typescript-eslint"
|
|
86
|
+
],
|
|
87
|
+
"rules": {
|
|
88
|
+
"no-unused-vars": "off",
|
|
89
|
+
"@typescript-eslint/no-unused-vars": [
|
|
90
|
+
"error"
|
|
91
|
+
],
|
|
92
|
+
"no-shadow": "off",
|
|
93
|
+
"@typescript-eslint/no-shadow": [
|
|
94
|
+
"error"
|
|
95
|
+
],
|
|
96
|
+
"class-methods-use-this": "off",
|
|
97
|
+
"import/no-unresolved": "off",
|
|
98
|
+
"import/extensions": [
|
|
99
|
+
"off",
|
|
100
|
+
"ignorePackages",
|
|
101
|
+
{
|
|
102
|
+
"js": "never",
|
|
103
|
+
"ts": "never"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"no-unsafe-optional-chaining": "warn",
|
|
107
|
+
"default-param-last": "warn"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"prettier": {
|
|
111
|
+
"singleQuote": true,
|
|
112
|
+
"arrowParens": "avoid"
|
|
113
|
+
},
|
|
114
|
+
"lint-staged": {
|
|
115
|
+
"*.ts": [
|
|
116
|
+
"eslint --fix",
|
|
117
|
+
"prettier --write",
|
|
118
|
+
"git add"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
package/renovate.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"config:base",
|
|
4
|
-
":preserveSemverRanges"
|
|
5
|
-
]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"config:base",
|
|
4
|
+
":preserveSemverRanges"
|
|
5
|
+
]
|
|
6
|
+
}
|
|
@@ -858,21 +858,14 @@ export class CollectionBrowser
|
|
|
858
858
|
if (this.suppressSortBar) return nothing;
|
|
859
859
|
|
|
860
860
|
// Determine the set of sortable fields that should be shown in the sort bar
|
|
861
|
-
let defaultViewSort = SortField.weeklyview;
|
|
862
|
-
let defaultDateSort = SortField.date;
|
|
863
861
|
let sortFieldAvailability = defaultSortAvailability;
|
|
864
862
|
|
|
865
|
-
// We adjust the sort options for a couple of special cases...
|
|
863
|
+
// We adjust the available sort options for a couple of special cases...
|
|
866
864
|
if (this.withinCollection?.startsWith('fav-')) {
|
|
867
|
-
// When viewing a fav- collection, we include the Date Favorited option
|
|
868
|
-
// it as the default in the date dropdown.
|
|
869
|
-
defaultDateSort = SortField.datefavorited;
|
|
865
|
+
// When viewing a fav- collection, we include the Date Favorited option as the default
|
|
870
866
|
sortFieldAvailability = favoritesSortAvailability;
|
|
871
867
|
} else if (!this.withinCollection && this.searchType === SearchType.TV) {
|
|
872
|
-
// When viewing TV search results, we
|
|
873
|
-
// and exclude several of the usual date sort options.
|
|
874
|
-
defaultViewSort = SortField.alltimeview;
|
|
875
|
-
defaultDateSort = SortField.datearchived;
|
|
868
|
+
// When viewing TV search results, we exclude several of the usual date sort options.
|
|
876
869
|
sortFieldAvailability = tvSortAvailability;
|
|
877
870
|
}
|
|
878
871
|
|
|
@@ -883,8 +876,6 @@ export class CollectionBrowser
|
|
|
883
876
|
<sort-filter-bar
|
|
884
877
|
.defaultSortField=${this.defaultSortField}
|
|
885
878
|
.defaultSortDirection=${this.defaultSortDirection}
|
|
886
|
-
.defaultViewSort=${defaultViewSort}
|
|
887
|
-
.defaultDateSort=${defaultDateSort}
|
|
888
879
|
.selectedSort=${this.selectedSort}
|
|
889
880
|
.sortDirection=${this.sortDirection}
|
|
890
881
|
.sortFieldAvailability=${sortFieldAvailability}
|
|
@@ -892,7 +883,6 @@ export class CollectionBrowser
|
|
|
892
883
|
.selectedTitleFilter=${this.selectedTitleFilter}
|
|
893
884
|
.selectedCreatorFilter=${this.selectedCreatorFilter}
|
|
894
885
|
.prefixFilterCountMap=${this.dataSource.prefixFilterCountMap}
|
|
895
|
-
.resizeObserver=${this.resizeObserver}
|
|
896
886
|
.enableSortOptionsSlot=${this.enableSortOptionsSlot}
|
|
897
887
|
.suppressDisplayModes=${this.suppressDisplayModes}
|
|
898
888
|
@sortChanged=${this.userChangedSort}
|
|
@@ -63,16 +63,11 @@ export class FacetsTemplate extends LitElement {
|
|
|
63
63
|
static get styles(): CSSResultGroup {
|
|
64
64
|
const columnCount = css`var(--facetsColumnCount, 1)`;
|
|
65
65
|
const columnGap = css`var(--facetsColumnGap, 15px)`;
|
|
66
|
-
const columnWidth = css`var(--facetsColumnWidth, auto)`;
|
|
67
|
-
const maxHeight = css`var(--facetsMaxHeight, none)`;
|
|
68
66
|
|
|
69
67
|
return css`
|
|
70
68
|
.facet-rows {
|
|
71
69
|
column-count: ${columnCount};
|
|
72
70
|
column-gap: ${columnGap};
|
|
73
|
-
column-width: ${columnWidth};
|
|
74
|
-
max-height: ${maxHeight};
|
|
75
|
-
column-fill: auto;
|
|
76
71
|
}
|
|
77
72
|
|
|
78
73
|
a:link,
|