@internetarchive/collection-browser 3.3.0 → 3.3.1-alpha1
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/src/collection-browser.js +683 -683
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.js +118 -118
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets.js +266 -266
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.js +36 -36
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +77 -77
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +137 -137
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +99 -99
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +297 -297
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +203 -203
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/utils/format-date.js.map +1 -1
- package/dist/test/collection-browser.test.js +189 -189
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/tiles/grid/item-tile.test.js +77 -77
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list-compact.test.js +70 -70
- package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +126 -126
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/dist/test/utils/format-date.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +117 -117
- package/renovate.json +6 -6
- package/src/collection-browser.ts +2829 -2829
- package/src/collection-facets/more-facets-content.ts +639 -639
- package/src/collection-facets.ts +995 -995
- package/src/data-source/collection-browser-data-source.ts +1401 -1401
- package/src/data-source/collection-browser-query-state.ts +65 -65
- package/src/data-source/models.ts +43 -43
- package/src/tiles/base-tile-component.ts +65 -65
- package/src/tiles/grid/account-tile.ts +113 -113
- package/src/tiles/grid/collection-tile.ts +163 -163
- package/src/tiles/grid/item-tile.ts +340 -340
- package/src/tiles/list/tile-list-compact.ts +239 -239
- package/src/tiles/list/tile-list.ts +700 -700
- package/src/tiles/tile-dispatcher.ts +490 -490
- package/src/utils/format-date.ts +62 -62
- package/test/collection-browser.test.ts +2403 -2403
- package/test/tiles/grid/item-tile.test.ts +520 -520
- package/test/tiles/list/tile-list-compact.test.ts +282 -282
- package/test/tiles/list/tile-list.test.ts +552 -552
- package/test/utils/format-date.test.ts +89 -89
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
package/.editorconfig
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[*]
|
|
9
|
-
|
|
10
|
-
# Change these settings to your own preference
|
|
11
|
-
indent_style = space
|
|
12
|
-
indent_size = 2
|
|
13
|
-
|
|
14
|
-
# We recommend you to keep these unchanged
|
|
15
|
-
end_of_line = lf
|
|
16
|
-
charset = utf-8
|
|
17
|
-
trim_trailing_whitespace = true
|
|
18
|
-
insert_final_newline = true
|
|
19
|
-
|
|
20
|
-
[*.md]
|
|
21
|
-
trim_trailing_whitespace = false
|
|
22
|
-
|
|
23
|
-
[*.json]
|
|
24
|
-
indent_size = 2
|
|
25
|
-
|
|
26
|
-
[*.{html,js,md}]
|
|
27
|
-
block_comment_start = /**
|
|
28
|
-
block_comment = *
|
|
29
|
-
block_comment_end = */
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
[*]
|
|
9
|
+
|
|
10
|
+
# Change these settings to your own preference
|
|
11
|
+
indent_style = space
|
|
12
|
+
indent_size = 2
|
|
13
|
+
|
|
14
|
+
# We recommend you to keep these unchanged
|
|
15
|
+
end_of_line = lf
|
|
16
|
+
charset = utf-8
|
|
17
|
+
trim_trailing_whitespace = true
|
|
18
|
+
insert_final_newline = true
|
|
19
|
+
|
|
20
|
+
[*.md]
|
|
21
|
+
trim_trailing_whitespace = false
|
|
22
|
+
|
|
23
|
+
[*.json]
|
|
24
|
+
indent_size = 2
|
|
25
|
+
|
|
26
|
+
[*.{html,js,md}]
|
|
27
|
+
block_comment_start = /**
|
|
28
|
+
block_comment = *
|
|
29
|
+
block_comment_end = */
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
name: App CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ main ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ main ]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: latest
|
|
18
|
-
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: yarn install
|
|
21
|
-
|
|
22
|
-
- name: Run tests
|
|
23
|
-
run: yarn run test
|
|
24
|
-
|
|
25
|
-
- uses: codecov/codecov-action@v4
|
|
26
|
-
with:
|
|
27
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
1
|
+
name: App CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: latest
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: yarn install
|
|
21
|
+
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: yarn run test
|
|
24
|
+
|
|
25
|
+
- uses: codecov/codecov-action@v4
|
|
26
|
+
with:
|
|
27
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
|
|
2
|
-
|
|
3
|
-
# This workflow will run every time new changes were pushed to the `main` branch
|
|
4
|
-
|
|
5
|
-
name: App build CI/CD to main branch
|
|
6
|
-
|
|
7
|
-
on:
|
|
8
|
-
push:
|
|
9
|
-
branches: [ main ]
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
with:
|
|
18
|
-
persist-credentials: false
|
|
19
|
-
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: latest
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: yarn install
|
|
26
|
-
|
|
27
|
-
- name: Create build files for gh-pages deploy
|
|
28
|
-
run: yarn prepare:ghpages
|
|
29
|
-
|
|
30
|
-
# Reference: https://github.com/JamesIves/github-pages-deploy-action
|
|
31
|
-
- name: Deploy 🚀
|
|
32
|
-
uses: JamesIves/github-pages-deploy-action@v4.4.3
|
|
33
|
-
with:
|
|
34
|
-
branch: gh-pages
|
|
35
|
-
folder: ghpages
|
|
36
|
-
clean-exclude: pr/
|
|
37
|
-
force: false
|
|
38
|
-
target-folder: main
|
|
39
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
1
|
+
# This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
|
|
2
|
+
|
|
3
|
+
# This workflow will run every time new changes were pushed to the `main` branch
|
|
4
|
+
|
|
5
|
+
name: App build CI/CD to main branch
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: latest
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: yarn install
|
|
26
|
+
|
|
27
|
+
- name: Create build files for gh-pages deploy
|
|
28
|
+
run: yarn prepare:ghpages
|
|
29
|
+
|
|
30
|
+
# Reference: https://github.com/JamesIves/github-pages-deploy-action
|
|
31
|
+
- name: Deploy 🚀
|
|
32
|
+
uses: JamesIves/github-pages-deploy-action@v4.4.3
|
|
33
|
+
with:
|
|
34
|
+
branch: gh-pages
|
|
35
|
+
folder: ghpages
|
|
36
|
+
clean-exclude: pr/
|
|
37
|
+
force: false
|
|
38
|
+
target-folder: main
|
|
39
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# This workflow will be triggered if there's a new release tag created/pushed in Github repo
|
|
2
|
-
|
|
3
|
-
# This workflow will do the following:
|
|
4
|
-
# - run tests using node
|
|
5
|
-
# - publish a package to GitHub Packages when a release is created
|
|
6
|
-
|
|
7
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
8
|
-
|
|
9
|
-
name: Node.js Package
|
|
10
|
-
|
|
11
|
-
on:
|
|
12
|
-
release:
|
|
13
|
-
types: [created]
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: 16
|
|
23
|
-
- run: npm ci
|
|
24
|
-
- run: npm prepare
|
|
25
|
-
- run: npm test
|
|
26
|
-
|
|
27
|
-
publish-npm:
|
|
28
|
-
needs: build
|
|
29
|
-
runs-on: ubuntu-latest
|
|
30
|
-
steps:
|
|
31
|
-
- uses: actions/checkout@v4
|
|
32
|
-
- uses: actions/setup-node@v3
|
|
33
|
-
with:
|
|
34
|
-
node-version: 16
|
|
35
|
-
registry-url: https://registry.npmjs.org/
|
|
36
|
-
- run: npm ci
|
|
37
|
-
- run: npm publish --tag next
|
|
38
|
-
env:
|
|
39
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
1
|
+
# This workflow will be triggered if there's a new release tag created/pushed in Github repo
|
|
2
|
+
|
|
3
|
+
# This workflow will do the following:
|
|
4
|
+
# - run tests using node
|
|
5
|
+
# - publish a package to GitHub Packages when a release is created
|
|
6
|
+
|
|
7
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
8
|
+
|
|
9
|
+
name: Node.js Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [created]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: 16
|
|
23
|
+
- run: npm ci
|
|
24
|
+
- run: npm prepare
|
|
25
|
+
- run: npm test
|
|
26
|
+
|
|
27
|
+
publish-npm:
|
|
28
|
+
needs: build
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-node@v3
|
|
33
|
+
with:
|
|
34
|
+
node-version: 16
|
|
35
|
+
registry-url: https://registry.npmjs.org/
|
|
36
|
+
- run: npm ci
|
|
37
|
+
- run: npm publish --tag next
|
|
38
|
+
env:
|
|
39
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
|
|
2
|
-
|
|
3
|
-
# This workflow will run every time there's a PR opened, reopened, synchronize, or closed
|
|
4
|
-
|
|
5
|
-
name: Deploy PR previews
|
|
6
|
-
|
|
7
|
-
on:
|
|
8
|
-
pull_request:
|
|
9
|
-
types:
|
|
10
|
-
- opened
|
|
11
|
-
- reopened
|
|
12
|
-
- synchronize
|
|
13
|
-
- closed
|
|
14
|
-
|
|
15
|
-
concurrency: preview-${{ github.ref }}
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
deploy-preview:
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout
|
|
22
|
-
uses: actions/checkout@v4
|
|
23
|
-
|
|
24
|
-
- uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: latest
|
|
27
|
-
|
|
28
|
-
- name: Install and Build
|
|
29
|
-
run: |
|
|
30
|
-
yarn install
|
|
31
|
-
yarn prepare:ghpages
|
|
32
|
-
|
|
33
|
-
# Reference: https://github.com/rossjrw/pr-preview-action
|
|
34
|
-
- name: Deploy preview
|
|
35
|
-
uses: rossjrw/pr-preview-action@v1
|
|
36
|
-
with:
|
|
37
|
-
source-dir: ./ghpages/
|
|
38
|
-
umbrella-dir: pr
|
|
1
|
+
# This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
|
|
2
|
+
|
|
3
|
+
# This workflow will run every time there's a PR opened, reopened, synchronize, or closed
|
|
4
|
+
|
|
5
|
+
name: Deploy PR previews
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
pull_request:
|
|
9
|
+
types:
|
|
10
|
+
- opened
|
|
11
|
+
- reopened
|
|
12
|
+
- synchronize
|
|
13
|
+
- closed
|
|
14
|
+
|
|
15
|
+
concurrency: preview-${{ github.ref }}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy-preview:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: latest
|
|
27
|
+
|
|
28
|
+
- name: Install and Build
|
|
29
|
+
run: |
|
|
30
|
+
yarn install
|
|
31
|
+
yarn prepare:ghpages
|
|
32
|
+
|
|
33
|
+
# Reference: https://github.com/rossjrw/pr-preview-action
|
|
34
|
+
- name: Deploy preview
|
|
35
|
+
uses: rossjrw/pr-preview-action@v1
|
|
36
|
+
with:
|
|
37
|
+
source-dir: ./ghpages/
|
|
38
|
+
umbrella-dir: pr
|
package/.husky/pre-commit
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npx lint-staged
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npx lint-staged
|
package/.prettierignore
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
coverage
|
|
1
|
+
coverage
|