@internetarchive/collection-browser 4.7.0 → 4.8.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/.husky/pre-commit +0 -0
- package/dist/src/app-root.js +0 -2
- package/dist/src/app-root.js.map +1 -1
- package/dist/src/assets/img/icons/check.d.ts +2 -0
- package/dist/src/assets/img/icons/check.js +5 -0
- package/dist/src/assets/img/icons/check.js.map +1 -0
- package/dist/src/collection-facets/facet-row-template.d.ts +38 -0
- package/dist/src/collection-facets/facet-row-template.js +200 -0
- package/dist/src/collection-facets/facet-row-template.js.map +1 -0
- package/dist/src/collection-facets/facet-row.js +11 -186
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/models.d.ts +7 -2
- package/dist/src/collection-facets/models.js +7 -2
- package/dist/src/collection-facets/models.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +87 -21
- package/dist/src/collection-facets/more-facets-content.js +477 -200
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-scroller.d.ts +85 -0
- package/dist/src/collection-facets/more-facets-scroller.js +428 -0
- package/dist/src/collection-facets/more-facets-scroller.js.map +1 -0
- package/dist/src/collection-facets/page-window.d.ts +73 -0
- package/dist/src/collection-facets/page-window.js +202 -0
- package/dist/src/collection-facets/page-window.js.map +1 -0
- package/dist/src/collection-facets/toggle-switch.js +1 -0
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/models.d.ts +4 -0
- package/dist/src/models.js +16 -0
- package/dist/src/models.js.map +1 -1
- package/dist/src/utils/log.d.ts +1 -4
- package/dist/src/utils/normalize-filter-text.d.ts +28 -0
- package/dist/src/utils/normalize-filter-text.js +35 -0
- package/dist/src/utils/normalize-filter-text.js.map +1 -0
- package/dist/test/collection-facets/more-facets-content.test.js +367 -17
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-scroller.test.d.ts +1 -0
- package/dist/test/collection-facets/more-facets-scroller.test.js +288 -0
- package/dist/test/collection-facets/more-facets-scroller.test.js.map +1 -0
- package/dist/test/collection-facets/page-window.test.d.ts +1 -0
- package/dist/test/collection-facets/page-window.test.js +175 -0
- package/dist/test/collection-facets/page-window.test.js.map +1 -0
- package/dist/test/mocks/mock-search-responses.d.ts +6 -0
- package/dist/test/mocks/mock-search-responses.js +52 -0
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/mocks/mock-search-service.js +2 -1
- package/dist/test/mocks/mock-search-service.js.map +1 -1
- package/dist/test/utils/normalize-filter-text.test.d.ts +1 -0
- package/dist/test/utils/normalize-filter-text.test.js +69 -0
- package/dist/test/utils/normalize-filter-text.test.js.map +1 -0
- package/docs/design/column-virtualization.md +214 -0
- package/package.json +20 -16
- package/src/app-root.ts +0 -2
- package/src/assets/img/icons/check.ts +5 -0
- package/src/collection-facets/facet-row-template.ts +242 -0
- package/src/collection-facets/facet-row.ts +15 -202
- package/src/collection-facets/models.ts +8 -2
- package/src/collection-facets/more-facets-content.ts +528 -221
- package/src/collection-facets/more-facets-scroller.ts +485 -0
- package/src/collection-facets/page-window.ts +247 -0
- package/src/collection-facets/toggle-switch.ts +1 -0
- package/src/models.ts +17 -0
- package/src/utils/normalize-filter-text.ts +54 -0
- package/test/collection-facets/more-facets-content.test.ts +509 -24
- package/test/collection-facets/more-facets-scroller.test.ts +401 -0
- package/test/collection-facets/page-window.test.ts +208 -0
- package/test/mocks/mock-search-responses.ts +56 -0
- package/test/mocks/mock-search-service.ts +2 -0
- package/test/utils/normalize-filter-text.test.ts +87 -0
- package/web-test-runner.config.mjs +7 -2
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.editorconfig +0 -29
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/ci.yml +0 -27
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/gh-pages-main.yml +0 -39
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/npm-publish.yml +0 -39
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/pr-preview.yml +0 -38
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.husky/pre-commit +0 -1
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.prettierignore +0 -1
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/LICENSE +0 -661
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/README.md +0 -84
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/eslint.config.mjs +0 -53
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/index.html +0 -24
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/index.ts +0 -29
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/local.archive.org.cert +0 -86
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/local.archive.org.key +0 -27
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/package.json +0 -120
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/renovate.json +0 -6
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/app-root.ts +0 -1284
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/arrow-left.ts +0 -10
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/arrow-right.ts +0 -10
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/chevron.ts +0 -4
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/close-circle-dark.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/contract.ts +0 -9
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/empty-query.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/expand.ts +0 -9
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/eye-closed.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/eye.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/favorite-filled.ts +0 -10
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/favorite-unfilled.ts +0 -9
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/filter.ts +0 -10
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/login-required.ts +0 -18
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/account.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/audio.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/collection.ts +0 -12
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/data.ts +0 -15
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/etree.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/film.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/images.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/radio.ts +0 -15
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/search.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/software.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/texts.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-commercial.ts +0 -12
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-fact-check.ts +0 -12
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-quote.ts +0 -12
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/video.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/web.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/null-result.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/quote.ts +0 -7
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/restricted.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/reviews.ts +0 -11
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/upload.ts +0 -12
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/views.ts +0 -11
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/circular-activity-indicator.ts +0 -64
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-browser.ts +0 -3165
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facet-row.ts +0 -309
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facet-tombstone-row.ts +0 -40
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facets-template.ts +0 -85
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/models.ts +0 -10
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/more-facets-content.ts +0 -644
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/more-facets-pagination.ts +0 -294
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/dedupe.ts +0 -44
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +0 -27
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/index.ts +0 -3
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +0 -17
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +0 -70
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +0 -79
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +0 -93
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/models.ts +0 -36
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-bar.ts +0 -437
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-button.ts +0 -145
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-dropdown.ts +0 -185
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-equals.ts +0 -16
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-heuristics.ts +0 -26
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/toggle-switch.ts +0 -174
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets.ts +0 -1013
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-data-source-interface.ts +0 -351
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-data-source.ts +0 -1474
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-query-state.ts +0 -60
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/models.ts +0 -56
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/empty-placeholder.ts +0 -192
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/expanded-date-picker.ts +0 -191
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/language-code-handler/language-code-handler.ts +0 -64
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/language-code-handler/language-code-mapping.ts +0 -564
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/manage/manage-bar.ts +0 -276
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/manage/remove-items-modal-content.ts +0 -102
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/mediatype/mediatype-config.ts +0 -146
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/models.ts +0 -895
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/restoration-state-handler.ts +0 -550
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/alpha-bar-tooltip.ts +0 -53
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/alpha-bar.ts +0 -252
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/compact.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/list.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-disabled.ts +0 -15
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-down.ts +0 -17
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-up.ts +0 -17
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-triangle.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/tile.ts +0 -5
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/sort-filter-bar.ts +0 -733
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/ia-button.ts +0 -139
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/item-image-styles.ts +0 -124
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/sr-only.ts +0 -18
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/tile-action-styles.ts +0 -59
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/base-tile-component.ts +0 -124
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/collection-browser-loading-tile.ts +0 -26
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/account-tile.ts +0 -113
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/collection-tile.ts +0 -184
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/item-tile.ts +0 -347
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/search-tile.ts +0 -90
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/styles/tile-grid-shared-styles.ts +0 -130
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/tile-stats.ts +0 -211
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/hover/hover-pane-controller.ts +0 -638
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/hover/tile-hover-pane.ts +0 -184
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/image-block.ts +0 -162
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/item-image.ts +0 -214
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list-compact-header.ts +0 -112
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list-compact.ts +0 -278
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list.ts +0 -718
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/models.ts +0 -21
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/overlay/icon-overlay.ts +0 -57
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/overlay/text-overlay.ts +0 -79
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/review-block.ts +0 -130
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/text-snippet-block.ts +0 -132
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-dispatcher.ts +0 -637
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-display-value-provider.ts +0 -133
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-mediatype-icon.ts +0 -133
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/analytics-events.ts +0 -29
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/array-equals.ts +0 -8
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/collapse-repeated-quotes.ts +0 -13
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/date-filter-field.ts +0 -11
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/facet-utils.ts +0 -183
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-count.ts +0 -95
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-date.ts +0 -62
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-unit-size.ts +0 -43
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/local-date-from-utc.ts +0 -15
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/log.ts +0 -14
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/resolve-mediatype.ts +0 -26
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/sha1.ts +0 -9
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-browser.test.ts +0 -2639
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/facet-row.test.ts +0 -421
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/facets-template.test.ts +0 -139
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/more-facets-content.test.ts +0 -231
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/more-facets-pagination.test.ts +0 -201
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/toggle-switch.test.ts +0 -164
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets.test.ts +0 -928
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/data-source/collection-browser-data-source.test.ts +0 -193
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/empty-placeholder.test.ts +0 -88
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/expanded-date-picker.test.ts +0 -201
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/icon-overlay.test.ts +0 -38
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/image-block.test.ts +0 -247
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/item-image.test.ts +0 -220
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/manage/manage-bar.test.ts +0 -347
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/manage/remove-items-modal-content.test.ts +0 -81
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mediatype-config.test.ts +0 -11
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-analytics-handler.ts +0 -30
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-search-responses.ts +0 -1364
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-search-service.ts +0 -134
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/restoration-state-handler.test.ts +0 -480
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/review-block.test.ts +0 -62
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/alpha-bar-tooltip.test.ts +0 -17
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/alpha-bar.test.ts +0 -101
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/sort-filter-bar.test.ts +0 -443
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/text-overlay.test.ts +0 -55
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/text-snippet-block.test.ts +0 -85
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tile-stats.test.ts +0 -191
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/account-tile.test.ts +0 -121
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/collection-tile.test.ts +0 -114
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/item-tile.test.ts +0 -520
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/search-tile.test.ts +0 -75
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/hover/hover-pane-controller.test.ts +0 -482
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/hover/tile-hover-pane.test.ts +0 -80
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list-compact-header.test.ts +0 -43
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list-compact.test.ts +0 -282
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list.test.ts +0 -576
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-dispatcher.test.ts +0 -320
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-display-value-provider.test.ts +0 -172
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-mediatype-icon.test.ts +0 -160
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/array-equals.test.ts +0 -31
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-count.test.ts +0 -32
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-date.test.ts +0 -89
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-unit-size.test.ts +0 -21
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/local-date-from-utc.test.ts +0 -37
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/tsconfig.json +0 -25
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/types/dompurify.d.ts +0 -1
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/vite.config.ts +0 -29
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/web-dev-server.config.mjs +0 -30
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/web-test-runner.config.mjs +0 -52
- package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/yarn.lock +0 -5965
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.editorconfig +0 -29
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.github/workflows/ci.yml +0 -29
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.github/workflows/gh-pages-main.yml +0 -41
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.github/workflows/npm-publish.yml +0 -49
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.github/workflows/pr-preview.yml +0 -40
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.husky/pre-commit +0 -1
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/.prettierignore +0 -1
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/LICENSE +0 -661
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/README.md +0 -68
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/eslint.config.mjs +0 -53
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/index.html +0 -24
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/index.ts +0 -29
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/local.archive.org.cert +0 -86
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/local.archive.org.key +0 -27
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/package.json +0 -129
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/pnpm-lock.yaml +0 -7366
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/pnpm-workspace.yaml +0 -46
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/renovate.json +0 -6
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/app-root.ts +0 -1284
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/arrow-left.ts +0 -10
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/arrow-right.ts +0 -10
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/chevron.ts +0 -4
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/close-circle-dark.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/contract.ts +0 -9
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/empty-query.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/expand.ts +0 -9
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/eye-closed.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/eye.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/favorite-filled.ts +0 -10
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/favorite-unfilled.ts +0 -9
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/filter.ts +0 -10
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/login-required.ts +0 -18
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/account.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/audio.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/collection.ts +0 -12
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/data.ts +0 -15
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/etree.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/film.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/images.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/radio.ts +0 -15
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/search.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/software.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/texts.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/tv-commercial.ts +0 -12
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/tv-fact-check.ts +0 -12
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/tv-quote.ts +0 -12
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/tv.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/video.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/mediatype/web.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/null-result.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/quote.ts +0 -7
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/restricted.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/reviews.ts +0 -11
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/upload.ts +0 -12
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/assets/img/icons/views.ts +0 -11
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/circular-activity-indicator.ts +0 -64
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-browser.ts +0 -3165
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/facet-row.ts +0 -309
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/facet-tombstone-row.ts +0 -40
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/facets-template.ts +0 -85
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/models.ts +0 -10
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/more-facets-content.ts +0 -644
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/more-facets-pagination.ts +0 -294
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/dedupe.ts +0 -44
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +0 -27
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/index.ts +0 -3
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +0 -17
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +0 -70
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +0 -79
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +0 -93
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/models.ts +0 -36
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/smart-facet-bar.ts +0 -437
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/smart-facet-button.ts +0 -145
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/smart-facet-dropdown.ts +0 -185
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/smart-facet-equals.ts +0 -16
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/smart-facets/smart-facet-heuristics.ts +0 -26
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets/toggle-switch.ts +0 -174
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/collection-facets.ts +0 -1013
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/data-source/collection-browser-data-source-interface.ts +0 -351
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/data-source/collection-browser-data-source.ts +0 -1474
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/data-source/collection-browser-query-state.ts +0 -60
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/data-source/models.ts +0 -56
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/empty-placeholder.ts +0 -192
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/expanded-date-picker.ts +0 -191
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/language-code-handler/language-code-handler.ts +0 -64
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/language-code-handler/language-code-mapping.ts +0 -564
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/manage/manage-bar.ts +0 -276
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/manage/remove-items-modal-content.ts +0 -102
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/mediatype/mediatype-config.ts +0 -146
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/models.ts +0 -895
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/restoration-state-handler.ts +0 -550
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/alpha-bar-tooltip.ts +0 -53
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/alpha-bar.ts +0 -252
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/compact.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/list.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/sort-toggle-disabled.ts +0 -15
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/sort-toggle-down.ts +0 -17
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/sort-toggle-up.ts +0 -17
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/sort-triangle.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/img/tile.ts +0 -5
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/sort-filter-bar/sort-filter-bar.ts +0 -733
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/styles/ia-button.ts +0 -139
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/styles/item-image-styles.ts +0 -124
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/styles/sr-only.ts +0 -18
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/styles/tile-action-styles.ts +0 -59
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/base-tile-component.ts +0 -124
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/collection-browser-loading-tile.ts +0 -26
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/account-tile.ts +0 -113
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/collection-tile.ts +0 -184
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/item-tile.ts +0 -347
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/search-tile.ts +0 -90
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/styles/tile-grid-shared-styles.ts +0 -130
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/grid/tile-stats.ts +0 -211
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/hover/hover-pane-controller.ts +0 -638
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/hover/tile-hover-pane.ts +0 -184
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/image-block.ts +0 -162
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/item-image.ts +0 -214
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/list/tile-list-compact-header.ts +0 -112
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/list/tile-list-compact.ts +0 -278
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/list/tile-list.ts +0 -718
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/models.ts +0 -21
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/overlay/icon-overlay.ts +0 -57
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/overlay/text-overlay.ts +0 -79
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/review-block.ts +0 -130
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/text-snippet-block.ts +0 -132
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/tile-dispatcher.ts +0 -637
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/tile-display-value-provider.ts +0 -133
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/tiles/tile-mediatype-icon.ts +0 -133
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/analytics-events.ts +0 -29
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/array-equals.ts +0 -8
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/collapse-repeated-quotes.ts +0 -13
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/date-filter-field.ts +0 -11
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/facet-utils.ts +0 -183
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/format-count.ts +0 -95
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/format-date.ts +0 -62
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/format-unit-size.ts +0 -43
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/local-date-from-utc.ts +0 -15
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/log.ts +0 -14
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/resolve-mediatype.ts +0 -26
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/src/utils/sha1.ts +0 -9
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-browser.test.ts +0 -2639
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets/facet-row.test.ts +0 -421
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets/facets-template.test.ts +0 -139
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets/more-facets-content.test.ts +0 -231
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets/more-facets-pagination.test.ts +0 -201
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets/toggle-switch.test.ts +0 -164
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/collection-facets.test.ts +0 -928
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/data-source/collection-browser-data-source.test.ts +0 -193
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/empty-placeholder.test.ts +0 -88
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/expanded-date-picker.test.ts +0 -201
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/icon-overlay.test.ts +0 -38
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/image-block.test.ts +0 -247
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/item-image.test.ts +0 -220
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/manage/manage-bar.test.ts +0 -347
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/manage/remove-items-modal-content.test.ts +0 -81
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/mediatype-config.test.ts +0 -11
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/mocks/mock-analytics-handler.ts +0 -30
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/mocks/mock-search-responses.ts +0 -1364
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/mocks/mock-search-service.ts +0 -134
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/restoration-state-handler.test.ts +0 -480
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/review-block.test.ts +0 -62
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/sort-filter-bar/alpha-bar-tooltip.test.ts +0 -17
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/sort-filter-bar/alpha-bar.test.ts +0 -101
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/sort-filter-bar/sort-filter-bar.test.ts +0 -443
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/text-overlay.test.ts +0 -55
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/text-snippet-block.test.ts +0 -85
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tile-stats.test.ts +0 -191
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/grid/account-tile.test.ts +0 -121
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/grid/collection-tile.test.ts +0 -114
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/grid/item-tile.test.ts +0 -520
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/grid/search-tile.test.ts +0 -75
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/hover/hover-pane-controller.test.ts +0 -482
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/hover/tile-hover-pane.test.ts +0 -80
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/list/tile-list-compact-header.test.ts +0 -43
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/list/tile-list-compact.test.ts +0 -282
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/list/tile-list.test.ts +0 -576
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/tile-dispatcher.test.ts +0 -320
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/tile-display-value-provider.test.ts +0 -172
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/tiles/tile-mediatype-icon.test.ts +0 -160
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/utils/array-equals.test.ts +0 -31
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/utils/format-count.test.ts +0 -32
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/utils/format-date.test.ts +0 -89
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/utils/format-unit-size.test.ts +0 -21
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/test/utils/local-date-from-utc.test.ts +0 -37
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/tsconfig.json +0 -25
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/types/dompurify.d.ts +0 -1
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/vite.config.ts +0 -29
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/web-dev-server.config.mjs +0 -30
- package/.claude/worktrees/WEBDEV-9127-fix-publish-dist-tag/web-test-runner.config.mjs +0 -52
- package/dist/src/collection-facets/more-facets-pagination.d.ts +0 -36
- package/dist/src/collection-facets/more-facets-pagination.js +0 -260
- package/dist/src/collection-facets/more-facets-pagination.js.map +0 -1
- package/dist/test/collection-facets/more-facets-pagination.test.d.ts +0 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +0 -126
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +0 -1
- package/src/collection-facets/more-facets-pagination.ts +0 -294
- package/test/collection-facets/more-facets-pagination.test.ts +0 -201
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import {
|
|
2
|
+
aTimeout,
|
|
3
|
+
expect,
|
|
4
|
+
fixture,
|
|
5
|
+
oneEvent,
|
|
6
|
+
waitUntil,
|
|
7
|
+
} from '@open-wc/testing';
|
|
8
|
+
import { sendKeys } from '@web/test-runner-commands';
|
|
9
|
+
import { html } from 'lit';
|
|
10
|
+
import type { MoreFacetsScroller } from '../../src/collection-facets/more-facets-scroller';
|
|
11
|
+
import '../../src/collection-facets/more-facets-scroller';
|
|
12
|
+
import type { FacetBucket, FacetEventDetails } from '../../src/models';
|
|
13
|
+
|
|
14
|
+
const COL_WIDTH = 250;
|
|
15
|
+
|
|
16
|
+
function makeBuckets(n: number): FacetBucket[] {
|
|
17
|
+
return Array.from({ length: n }, (_, i) => ({
|
|
18
|
+
key: `value-${i}`,
|
|
19
|
+
count: n - i,
|
|
20
|
+
state: 'none',
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Renders a scroller wide enough for three columns per page. With 1000
|
|
26
|
+
* buckets in columns of 12, that's 84 columns over 28 pages.
|
|
27
|
+
*/
|
|
28
|
+
async function createScroller({
|
|
29
|
+
buckets = makeBuckets(1000),
|
|
30
|
+
rowsPerColumn = 12,
|
|
31
|
+
} = {}): Promise<MoreFacetsScroller> {
|
|
32
|
+
const wrapper = await fixture<HTMLDivElement>(
|
|
33
|
+
html`<div style="width: 900px">
|
|
34
|
+
<more-facets-scroller
|
|
35
|
+
.facetType=${'subject'}
|
|
36
|
+
.buckets=${buckets}
|
|
37
|
+
.rowsPerColumn=${rowsPerColumn}
|
|
38
|
+
></more-facets-scroller>
|
|
39
|
+
</div>`,
|
|
40
|
+
);
|
|
41
|
+
const el = wrapper.querySelector(
|
|
42
|
+
'more-facets-scroller',
|
|
43
|
+
) as MoreFacetsScroller;
|
|
44
|
+
await waitUntil(
|
|
45
|
+
() => buckets.length === 0 || el.shadowRoot?.querySelector('.page'),
|
|
46
|
+
'pages never rendered',
|
|
47
|
+
);
|
|
48
|
+
await el.updateComplete;
|
|
49
|
+
return el;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function scrollerOf(el: MoreFacetsScroller): HTMLElement {
|
|
53
|
+
return el.shadowRoot?.querySelector('.scroller') as HTMLElement;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function mountedPages(el: MoreFacetsScroller): number[] {
|
|
57
|
+
const pages = el.shadowRoot?.querySelectorAll<HTMLElement>('.page') ?? [];
|
|
58
|
+
return [...pages].map(p => Number(p.dataset.page));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function checkbox(
|
|
62
|
+
el: MoreFacetsScroller,
|
|
63
|
+
key: string,
|
|
64
|
+
kind: 'select' | 'hide' = 'select',
|
|
65
|
+
): HTMLInputElement {
|
|
66
|
+
const inputs = el.shadowRoot?.querySelectorAll<HTMLInputElement>(
|
|
67
|
+
`.${kind}-facet-checkbox`,
|
|
68
|
+
);
|
|
69
|
+
return [...(inputs ?? [])].find(i => i.value === key) as HTMLInputElement;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async function restOnPage(el: MoreFacetsScroller, page: number) {
|
|
73
|
+
el.scrollToPage(page);
|
|
74
|
+
await waitUntil(() => el.currentPage === page, `never rested on ${page}`);
|
|
75
|
+
await el.updateComplete;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
describe('More facets scroller', () => {
|
|
79
|
+
it('fits a whole number of columns in the viewport', async () => {
|
|
80
|
+
const el = await createScroller();
|
|
81
|
+
|
|
82
|
+
expect(scrollerOf(el).clientWidth).to.equal(3 * COL_WIDTH);
|
|
83
|
+
expect(el.pageCount).to.equal(28);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('renders a snap stub for every page, but rows only near the viewport', async () => {
|
|
87
|
+
const el = await createScroller();
|
|
88
|
+
const root = el.shadowRoot as ShadowRoot;
|
|
89
|
+
|
|
90
|
+
expect(root.querySelectorAll('.snap-stub')).to.have.length(28);
|
|
91
|
+
expect(mountedPages(el)).to.deep.equal([0, 1, 2]);
|
|
92
|
+
expect(root.querySelectorAll('.facet-row-container')).to.have.length(
|
|
93
|
+
3 * 3 * 12,
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('renders rows as plain DOM rather than an element per row', async () => {
|
|
98
|
+
const el = await createScroller();
|
|
99
|
+
|
|
100
|
+
expect(el.shadowRoot?.querySelectorAll('facet-row')).to.have.length(0);
|
|
101
|
+
expect(
|
|
102
|
+
el.shadowRoot?.querySelectorAll('.facet-row-container').length,
|
|
103
|
+
).to.be.greaterThan(0);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('stacks buckets top to bottom in columns of rowsPerColumn', async () => {
|
|
107
|
+
const el = await createScroller({ rowsPerColumn: 5 });
|
|
108
|
+
const columns = el.shadowRoot?.querySelectorAll(
|
|
109
|
+
'.page[data-page="0"] .column',
|
|
110
|
+
);
|
|
111
|
+
const keysIn = (col?: Element) =>
|
|
112
|
+
[
|
|
113
|
+
...(col?.querySelectorAll<HTMLInputElement>('.select-facet-checkbox') ??
|
|
114
|
+
[]),
|
|
115
|
+
].map(i => i.value);
|
|
116
|
+
|
|
117
|
+
expect(columns).to.have.length(3);
|
|
118
|
+
expect(keysIn(columns?.[0])).to.deep.equal([
|
|
119
|
+
'value-0',
|
|
120
|
+
'value-1',
|
|
121
|
+
'value-2',
|
|
122
|
+
'value-3',
|
|
123
|
+
'value-4',
|
|
124
|
+
]);
|
|
125
|
+
expect(keysIn(columns?.[1])[0]).to.equal('value-5');
|
|
126
|
+
expect(el.pageCount).to.equal(Math.ceil(200 / 3));
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it('keeps the number of mounted pages flat while scrolling end to end', async () => {
|
|
130
|
+
const el = await createScroller();
|
|
131
|
+
const root = el.shadowRoot as ShadowRoot;
|
|
132
|
+
const nodeCounts: number[] = [];
|
|
133
|
+
|
|
134
|
+
for (const page of [5, 10, 15, 20]) {
|
|
135
|
+
await restOnPage(el, page);
|
|
136
|
+
expect(mountedPages(el)).to.deep.equal([
|
|
137
|
+
page - 1,
|
|
138
|
+
page,
|
|
139
|
+
page + 1,
|
|
140
|
+
page + 2,
|
|
141
|
+
]);
|
|
142
|
+
nodeCounts.push(root.querySelectorAll('*').length);
|
|
143
|
+
}
|
|
144
|
+
expect(new Set(nodeCounts).size).to.equal(1);
|
|
145
|
+
|
|
146
|
+
await restOnPage(el, 27);
|
|
147
|
+
expect(mountedPages(el)).to.deep.equal([26, 27]);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('keeps the same element for a page that stays mounted', async () => {
|
|
151
|
+
const el = await createScroller();
|
|
152
|
+
const page1 = el.shadowRoot?.querySelector('.page[data-page="1"]');
|
|
153
|
+
|
|
154
|
+
await restOnPage(el, 1);
|
|
155
|
+
|
|
156
|
+
expect(el.shadowRoot?.querySelector('.page[data-page="1"]')).to.equal(
|
|
157
|
+
page1,
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('eases a release partway through a page to the nearest page boundary', async () => {
|
|
162
|
+
const el = await createScroller();
|
|
163
|
+
const scroller = scrollerOf(el);
|
|
164
|
+
const pageWidth = 3 * COL_WIDTH;
|
|
165
|
+
|
|
166
|
+
scroller.scrollLeft = 3 * pageWidth + 500; // Two-thirds into page 3
|
|
167
|
+
await waitUntil(() => el.currentPage === 4, 'did not ease forward');
|
|
168
|
+
expect(scroller.scrollLeft).to.equal(4 * pageWidth);
|
|
169
|
+
|
|
170
|
+
scroller.scrollLeft = 4 * pageWidth + 200; // A quarter into page 4
|
|
171
|
+
await waitUntil(
|
|
172
|
+
() => scroller.scrollLeft === 4 * pageWidth,
|
|
173
|
+
'did not ease back',
|
|
174
|
+
);
|
|
175
|
+
expect(el.currentPage).to.equal(4);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it('emits facetClick with the new state when a row is checked', async () => {
|
|
179
|
+
const el = await createScroller();
|
|
180
|
+
|
|
181
|
+
setTimeout(() => checkbox(el, 'value-0').click());
|
|
182
|
+
const selected = await oneEvent(el, 'facetClick');
|
|
183
|
+
expect((selected as CustomEvent<FacetEventDetails>).detail).to.deep.equal({
|
|
184
|
+
facetType: 'subject',
|
|
185
|
+
bucket: { key: 'value-0', count: 1000, state: 'selected' },
|
|
186
|
+
negative: false,
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
setTimeout(() => checkbox(el, 'value-1', 'hide').click());
|
|
190
|
+
const hidden = await oneEvent(el, 'facetClick');
|
|
191
|
+
expect((hidden as CustomEvent<FacetEventDetails>).detail).to.deep.include({
|
|
192
|
+
negative: true,
|
|
193
|
+
});
|
|
194
|
+
expect(
|
|
195
|
+
(hidden as CustomEvent<FacetEventDetails>).detail.bucket.state,
|
|
196
|
+
).to.equal('hidden');
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it('reflects bucket states in the checkboxes', async () => {
|
|
200
|
+
const buckets = makeBuckets(50);
|
|
201
|
+
buckets[0] = { ...buckets[0], state: 'selected' };
|
|
202
|
+
buckets[1] = { ...buckets[1], state: 'hidden' };
|
|
203
|
+
const el = await createScroller({ buckets });
|
|
204
|
+
|
|
205
|
+
expect(checkbox(el, 'value-0').checked).to.be.true;
|
|
206
|
+
expect(checkbox(el, 'value-1', 'hide').checked).to.be.true;
|
|
207
|
+
expect(checkbox(el, 'value-2').checked).to.be.false;
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it('emits pageChanged only when resting on a different page', async () => {
|
|
211
|
+
const el = await createScroller();
|
|
212
|
+
const landed: number[] = [];
|
|
213
|
+
el.addEventListener('pageChanged', e =>
|
|
214
|
+
landed.push((e as CustomEvent<number>).detail),
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
await restOnPage(el, 2);
|
|
218
|
+
el.scrollToPage(2);
|
|
219
|
+
await restOnPage(el, 3);
|
|
220
|
+
|
|
221
|
+
expect(landed).to.deep.equal([2, 3]);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
it('pages with the arrow buttons', async () => {
|
|
225
|
+
const el = await createScroller();
|
|
226
|
+
const prev = el.shadowRoot?.querySelector(
|
|
227
|
+
'.scroll-arrow.prev',
|
|
228
|
+
) as HTMLButtonElement;
|
|
229
|
+
const next = el.shadowRoot?.querySelector(
|
|
230
|
+
'.scroll-arrow.next',
|
|
231
|
+
) as HTMLButtonElement;
|
|
232
|
+
expect(prev.disabled).to.be.true;
|
|
233
|
+
expect(next.disabled).to.be.false;
|
|
234
|
+
|
|
235
|
+
next.click();
|
|
236
|
+
await waitUntil(() => el.currentPage === 1, 'next did not move');
|
|
237
|
+
await el.updateComplete;
|
|
238
|
+
expect(prev.disabled).to.be.false;
|
|
239
|
+
|
|
240
|
+
await restOnPage(el, 27);
|
|
241
|
+
expect(next.disabled).to.be.true;
|
|
242
|
+
|
|
243
|
+
prev.click();
|
|
244
|
+
await waitUntil(() => el.currentPage === 26, 'prev did not move');
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
it('only leaves out hide buttons when told to', async () => {
|
|
248
|
+
const buckets = makeBuckets(1);
|
|
249
|
+
const lone = await createScroller({ buckets });
|
|
250
|
+
const hideContainer = (el: MoreFacetsScroller) =>
|
|
251
|
+
el.shadowRoot?.querySelector('.hide-facet-container') as HTMLElement;
|
|
252
|
+
|
|
253
|
+
// One row on its own doesn't mean there's only one value in all
|
|
254
|
+
expect(hideContainer(lone).hidden).to.be.false;
|
|
255
|
+
|
|
256
|
+
lone.omitHideButtons = true;
|
|
257
|
+
await lone.updateComplete;
|
|
258
|
+
expect(hideContainer(lone).hidden).to.be.true;
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('hides the arrow buttons when every value fits on one page', async () => {
|
|
262
|
+
const el = await createScroller({ buckets: makeBuckets(10) });
|
|
263
|
+
const arrows = el.shadowRoot?.querySelectorAll('.scroll-arrow');
|
|
264
|
+
|
|
265
|
+
expect(el.pageCount).to.equal(1);
|
|
266
|
+
expect(arrows).to.have.length(2);
|
|
267
|
+
arrows?.forEach(a => expect(a.classList.contains('unneeded')).to.be.true);
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
it('moves focus to the scroller when the focused row is about to be removed', async () => {
|
|
271
|
+
const el = await createScroller();
|
|
272
|
+
checkbox(el, 'value-0').focus();
|
|
273
|
+
|
|
274
|
+
await restOnPage(el, 10);
|
|
275
|
+
|
|
276
|
+
expect(el.shadowRoot?.activeElement).to.equal(scrollerOf(el));
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
describe('keyboard focus', () => {
|
|
280
|
+
const pageWidth = 3 * COL_WIDTH;
|
|
281
|
+
const rowsPerPage = 3 * 12;
|
|
282
|
+
|
|
283
|
+
function focused(el: MoreFacetsScroller): string {
|
|
284
|
+
const active = el.shadowRoot?.activeElement as HTMLInputElement | null;
|
|
285
|
+
if (!active) return 'nothing';
|
|
286
|
+
if (active === scrollerOf(el)) return 'scroller';
|
|
287
|
+
const kind = active.classList.contains('hide-facet-checkbox')
|
|
288
|
+
? 'hide'
|
|
289
|
+
: 'select';
|
|
290
|
+
return `${kind}:${active.value}`;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function arrow(el: MoreFacetsScroller, which: 'prev' | 'next') {
|
|
294
|
+
return el.shadowRoot?.querySelector(
|
|
295
|
+
`.scroll-arrow.${which}`,
|
|
296
|
+
) as HTMLButtonElement;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** Presses Shift+Tab (this runner's sendKeys doesn't take key combos) */
|
|
300
|
+
async function shiftTab() {
|
|
301
|
+
await sendKeys({ down: 'Shift' });
|
|
302
|
+
await sendKeys({ press: 'Tab' });
|
|
303
|
+
await sendKeys({ up: 'Shift' });
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** Waits long enough for any scroll the focus change set off to settle */
|
|
307
|
+
async function settle(el: MoreFacetsScroller) {
|
|
308
|
+
await aTimeout(300);
|
|
309
|
+
await el.updateComplete;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
it('is a labeled tab stop of its own while there are values', async () => {
|
|
313
|
+
const el = await createScroller();
|
|
314
|
+
el.label = 'Subject values';
|
|
315
|
+
await el.updateComplete;
|
|
316
|
+
const scroller = scrollerOf(el);
|
|
317
|
+
|
|
318
|
+
expect(scroller.tabIndex).to.equal(0);
|
|
319
|
+
expect(scroller.getAttribute('role')).to.equal('group');
|
|
320
|
+
expect(scroller.getAttribute('aria-label')).to.equal('Subject values');
|
|
321
|
+
|
|
322
|
+
el.buckets = [];
|
|
323
|
+
await el.updateComplete;
|
|
324
|
+
expect(scroller.tabIndex).to.equal(-1);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
it('lands on the current page when tabbing in from the previous arrow', async () => {
|
|
328
|
+
const el = await createScroller();
|
|
329
|
+
await restOnPage(el, 3);
|
|
330
|
+
arrow(el, 'prev').focus();
|
|
331
|
+
|
|
332
|
+
await sendKeys({ press: 'Tab' });
|
|
333
|
+
await settle(el);
|
|
334
|
+
expect(focused(el)).to.equal('scroller');
|
|
335
|
+
|
|
336
|
+
await sendKeys({ press: 'Tab' });
|
|
337
|
+
await settle(el);
|
|
338
|
+
expect(focused(el)).to.equal(`select:value-${3 * rowsPerPage}`);
|
|
339
|
+
expect(el.currentPage).to.equal(3);
|
|
340
|
+
expect(scrollerOf(el).scrollLeft).to.equal(3 * pageWidth);
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
it('lands on the last row of the current page when tabbing back in from the next arrow', async () => {
|
|
344
|
+
const el = await createScroller();
|
|
345
|
+
await restOnPage(el, 3);
|
|
346
|
+
arrow(el, 'next').focus();
|
|
347
|
+
|
|
348
|
+
await shiftTab();
|
|
349
|
+
await settle(el);
|
|
350
|
+
|
|
351
|
+
expect(focused(el)).to.equal(`hide:value-${4 * rowsPerPage - 1}`);
|
|
352
|
+
expect(el.currentPage).to.equal(3);
|
|
353
|
+
expect(scrollerOf(el).scrollLeft).to.equal(3 * pageWidth);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
it('still tabs from the last row of a page on into the next page', async () => {
|
|
357
|
+
const el = await createScroller();
|
|
358
|
+
await restOnPage(el, 3);
|
|
359
|
+
checkbox(el, `value-${4 * rowsPerPage - 1}`, 'hide').focus();
|
|
360
|
+
|
|
361
|
+
await sendKeys({ press: 'Tab' });
|
|
362
|
+
await settle(el);
|
|
363
|
+
|
|
364
|
+
expect(focused(el)).to.equal(`select:value-${4 * rowsPerPage}`);
|
|
365
|
+
await waitUntil(() => el.currentPage === 4, 'did not follow focus');
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
it('still tabs back from the first row of a page into the previous page', async () => {
|
|
369
|
+
const el = await createScroller();
|
|
370
|
+
await restOnPage(el, 3);
|
|
371
|
+
checkbox(el, `value-${3 * rowsPerPage}`).focus();
|
|
372
|
+
|
|
373
|
+
await shiftTab();
|
|
374
|
+
await settle(el);
|
|
375
|
+
|
|
376
|
+
expect(focused(el)).to.equal(`hide:value-${3 * rowsPerPage - 1}`);
|
|
377
|
+
await waitUntil(() => el.currentPage === 2, 'did not follow focus');
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
it('lands on the current page when tabbing on from the scroller itself', async () => {
|
|
381
|
+
const el = await createScroller();
|
|
382
|
+
checkbox(el, 'value-0').focus();
|
|
383
|
+
await restOnPage(el, 10);
|
|
384
|
+
expect(focused(el)).to.equal('scroller');
|
|
385
|
+
|
|
386
|
+
await sendKeys({ press: 'Tab' });
|
|
387
|
+
await settle(el);
|
|
388
|
+
|
|
389
|
+
expect(focused(el)).to.equal(`select:value-${10 * rowsPerPage}`);
|
|
390
|
+
expect(el.currentPage).to.equal(10);
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
it('renders no pages for an empty list', async () => {
|
|
395
|
+
const el = await createScroller({ buckets: [] });
|
|
396
|
+
|
|
397
|
+
expect(el.pageCount).to.equal(0);
|
|
398
|
+
expect(el.shadowRoot?.querySelectorAll('.page')).to.have.length(0);
|
|
399
|
+
expect(el.shadowRoot?.querySelectorAll('.snap-stub')).to.have.length(0);
|
|
400
|
+
});
|
|
401
|
+
});
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { expect, fixture, nextFrame, waitUntil } from '@open-wc/testing';
|
|
2
|
+
import sinon from 'sinon';
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { ref } from 'lit/directives/ref.js';
|
|
6
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
7
|
+
import { PageWindow } from '../../src/collection-facets/page-window';
|
|
8
|
+
|
|
9
|
+
const COL_WIDTH = 100;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Minimal host for the controller: a 300px-wide scroller (three columns per
|
|
13
|
+
* page) over 49 columns, so the last of its 17 pages holds a single column.
|
|
14
|
+
* No snapping, so tests can park the scroller anywhere.
|
|
15
|
+
*/
|
|
16
|
+
@customElement('page-window-test-host')
|
|
17
|
+
class PageWindowTestHost extends LitElement {
|
|
18
|
+
rests: number[] = [];
|
|
19
|
+
|
|
20
|
+
renders = 0;
|
|
21
|
+
|
|
22
|
+
win = new PageWindow(this, {
|
|
23
|
+
colWidth: COL_WIDTH,
|
|
24
|
+
total: 49,
|
|
25
|
+
onRest: page => this.rests.push(page),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
get scroller(): HTMLElement {
|
|
29
|
+
return this.shadowRoot?.querySelector('.scroller') as HTMLElement;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
render() {
|
|
33
|
+
this.renders += 1;
|
|
34
|
+
const w = this.win;
|
|
35
|
+
const live: number[] = [];
|
|
36
|
+
for (let i = w.first; i <= w.last; i++) live.push(i);
|
|
37
|
+
return html`
|
|
38
|
+
<div class="scroller" ${ref(w.attach)}>
|
|
39
|
+
<div class="sizer" style="width:${w.totalWidth}px">
|
|
40
|
+
${repeat(
|
|
41
|
+
live,
|
|
42
|
+
i => i,
|
|
43
|
+
i =>
|
|
44
|
+
html`<div
|
|
45
|
+
class="page"
|
|
46
|
+
data-page=${i}
|
|
47
|
+
style="left:${i * w.pageWidth}px;width:${w.pageSpan(i)}px"
|
|
48
|
+
></div>`,
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static styles = css`
|
|
56
|
+
.scroller {
|
|
57
|
+
width: var(--scrollerWidth, 300px);
|
|
58
|
+
height: 50px;
|
|
59
|
+
overflow-x: auto;
|
|
60
|
+
overflow-y: hidden;
|
|
61
|
+
}
|
|
62
|
+
.sizer {
|
|
63
|
+
position: relative;
|
|
64
|
+
height: 100%;
|
|
65
|
+
}
|
|
66
|
+
.page {
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
height: 100%;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function createHost(): Promise<PageWindowTestHost> {
|
|
75
|
+
const el = await fixture<PageWindowTestHost>(
|
|
76
|
+
html`<page-window-test-host></page-window-test-host>`,
|
|
77
|
+
);
|
|
78
|
+
await waitUntil(() => el.win.colsPerPage === 3, 'viewport never measured');
|
|
79
|
+
await el.updateComplete;
|
|
80
|
+
return el;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Scrolls the host and waits for the controller to catch up */
|
|
84
|
+
async function scrollHostTo(el: PageWindowTestHost, left: number) {
|
|
85
|
+
el.scroller.scrollLeft = left;
|
|
86
|
+
await nextFrame();
|
|
87
|
+
await nextFrame();
|
|
88
|
+
await el.updateComplete;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
describe('PageWindow', () => {
|
|
92
|
+
afterEach(() => {
|
|
93
|
+
sinon.restore();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('derives the page size from the measured scroller width', async () => {
|
|
97
|
+
const el = await createHost();
|
|
98
|
+
const { win } = el;
|
|
99
|
+
|
|
100
|
+
expect(win.colsPerPage).to.equal(3);
|
|
101
|
+
expect(win.pageWidth).to.equal(300);
|
|
102
|
+
expect(win.pageCount).to.equal(17);
|
|
103
|
+
expect(win.totalWidth).to.equal(4900);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('trims the partial last page so nothing extends past the total width', async () => {
|
|
107
|
+
const el = await createHost();
|
|
108
|
+
const { win } = el;
|
|
109
|
+
|
|
110
|
+
expect(win.pageSpan(0)).to.equal(300);
|
|
111
|
+
expect(win.pageSpan(16)).to.equal(100);
|
|
112
|
+
expect(el.scroller.scrollWidth).to.equal(4900);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('mounts the visible pages plus one buffer page on each side', async () => {
|
|
116
|
+
const el = await createHost();
|
|
117
|
+
expect([el.win.first, el.win.last]).to.deep.equal([0, 2]);
|
|
118
|
+
|
|
119
|
+
await scrollHostTo(el, 1500); // Page 5
|
|
120
|
+
expect([el.win.first, el.win.last]).to.deep.equal([4, 7]);
|
|
121
|
+
const pages = el.shadowRoot?.querySelectorAll<HTMLElement>('.page') ?? [];
|
|
122
|
+
const mounted = [...pages].map(p => Number(p.dataset.page));
|
|
123
|
+
expect(mounted).to.deep.equal([4, 5, 6, 7]);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('only re-renders when a scroll crosses a page boundary', async () => {
|
|
127
|
+
const el = await createHost();
|
|
128
|
+
await scrollHostTo(el, 1510);
|
|
129
|
+
const rendersBefore = el.renders;
|
|
130
|
+
|
|
131
|
+
// Several scrolls within the same page leave the window alone (and all
|
|
132
|
+
// rest nearest to the same page)
|
|
133
|
+
await scrollHostTo(el, 1560);
|
|
134
|
+
await scrollHostTo(el, 1600);
|
|
135
|
+
await scrollHostTo(el, 1640);
|
|
136
|
+
expect(el.renders).to.equal(rendersBefore);
|
|
137
|
+
|
|
138
|
+
// Crossing into the next page shifts it
|
|
139
|
+
await scrollHostTo(el, 1810);
|
|
140
|
+
expect(el.renders).to.be.greaterThan(rendersBefore);
|
|
141
|
+
expect(el.win.first).to.equal(5);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('reports the page the scroller comes to rest on', async () => {
|
|
145
|
+
const el = await createHost();
|
|
146
|
+
|
|
147
|
+
el.win.scrollToPage(4);
|
|
148
|
+
await waitUntil(() => el.win.currentPage === 4, 'never rested on page 4');
|
|
149
|
+
expect(el.scroller.scrollLeft).to.equal(1200);
|
|
150
|
+
expect(el.rests).to.include(4);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it('counts resting at the far end as the last page, even when it is partial', async () => {
|
|
154
|
+
const el = await createHost();
|
|
155
|
+
|
|
156
|
+
// The last page starts at 4800, but the scroller can only reach 4600
|
|
157
|
+
el.win.scrollToPage(16);
|
|
158
|
+
await waitUntil(() => el.win.currentPage === 16, 'never reached the end');
|
|
159
|
+
expect(el.scroller.scrollLeft).to.equal(4600);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('clamps the window when the number of columns shrinks', async () => {
|
|
163
|
+
const el = await createHost();
|
|
164
|
+
|
|
165
|
+
el.win.setTotal(4);
|
|
166
|
+
el.requestUpdate();
|
|
167
|
+
await el.updateComplete;
|
|
168
|
+
|
|
169
|
+
expect(el.win.pageCount).to.equal(2);
|
|
170
|
+
expect([el.win.first, el.win.last]).to.deep.equal([0, 1]);
|
|
171
|
+
expect(el.shadowRoot?.querySelectorAll('.page')).to.have.length(2);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('keeps the leftmost column on screen when a resize changes the page size', async () => {
|
|
175
|
+
const el = await createHost();
|
|
176
|
+
await scrollHostTo(el, 900); // Page 3, whose first column is 9
|
|
177
|
+
|
|
178
|
+
el.style.setProperty('--scrollerWidth', '200px');
|
|
179
|
+
await waitUntil(() => el.win.colsPerPage === 2, 'resize never observed');
|
|
180
|
+
await el.updateComplete;
|
|
181
|
+
|
|
182
|
+
// Column 9 is on page 4 when pages are two columns wide
|
|
183
|
+
expect(el.scroller.scrollLeft).to.equal(800);
|
|
184
|
+
await waitUntil(() => el.win.currentPage === 4, 'did not land on page 4');
|
|
185
|
+
expect(el.win.pageCount).to.equal(25);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it('stops listening once the host is disconnected', async () => {
|
|
189
|
+
const el = await createHost();
|
|
190
|
+
const { scroller } = el;
|
|
191
|
+
const removeSpy = sinon.spy(scroller, 'removeEventListener');
|
|
192
|
+
|
|
193
|
+
el.remove();
|
|
194
|
+
|
|
195
|
+
expect(removeSpy.calledWith('scroll')).to.be.true;
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('listens again when the host is reconnected', async () => {
|
|
199
|
+
const el = await createHost();
|
|
200
|
+
const parent = el.parentElement as HTMLElement;
|
|
201
|
+
el.remove();
|
|
202
|
+
parent.appendChild(el);
|
|
203
|
+
await el.updateComplete;
|
|
204
|
+
|
|
205
|
+
await scrollHostTo(el, 1500);
|
|
206
|
+
expect(el.win.first).to.equal(4);
|
|
207
|
+
});
|
|
208
|
+
});
|
|
@@ -1349,6 +1349,62 @@ export const getMockSuccessWithManyAggregations: () => Result<
|
|
|
1349
1349
|
},
|
|
1350
1350
|
});
|
|
1351
1351
|
|
|
1352
|
+
/**
|
|
1353
|
+
* Returns a mock response with thousands of subject aggregation buckets
|
|
1354
|
+
* (`subject-0` through `subject-4999`, in descending order of count), plus a
|
|
1355
|
+
* few with punctuation and accents for exercising the More... dialog's filter.
|
|
1356
|
+
*/
|
|
1357
|
+
export const getMockSuccessWithLargeAggregations: () => Result<
|
|
1358
|
+
SearchResponse,
|
|
1359
|
+
SearchServiceError
|
|
1360
|
+
> = () => {
|
|
1361
|
+
const buckets = [
|
|
1362
|
+
...Array.from({ length: 5000 }, (_, i) => ({
|
|
1363
|
+
key: `subject-${i}`,
|
|
1364
|
+
doc_count: 10000 - i,
|
|
1365
|
+
})),
|
|
1366
|
+
{ key: 'Dr. Drew', doc_count: 3 },
|
|
1367
|
+
{ key: 'A.O.R.', doc_count: 2 },
|
|
1368
|
+
{ key: 'Café society', doc_count: 1 },
|
|
1369
|
+
{ key: 'WC-TV', doc_count: 1 },
|
|
1370
|
+
{ key: 'Human-animal relationships', doc_count: 1 },
|
|
1371
|
+
];
|
|
1372
|
+
return {
|
|
1373
|
+
success: {
|
|
1374
|
+
request: {
|
|
1375
|
+
kind: 'aggregations',
|
|
1376
|
+
clientParameters: {
|
|
1377
|
+
user_query: 'large-facets',
|
|
1378
|
+
sort: [],
|
|
1379
|
+
},
|
|
1380
|
+
backendRequests: {
|
|
1381
|
+
primary: {
|
|
1382
|
+
kind: 'aggregations',
|
|
1383
|
+
finalized_parameters: {
|
|
1384
|
+
user_query: 'large-facets',
|
|
1385
|
+
sort: [],
|
|
1386
|
+
},
|
|
1387
|
+
},
|
|
1388
|
+
},
|
|
1389
|
+
},
|
|
1390
|
+
rawResponse: {},
|
|
1391
|
+
sessionContext: {},
|
|
1392
|
+
response: {
|
|
1393
|
+
totalResults: 0,
|
|
1394
|
+
returnedCount: 0,
|
|
1395
|
+
results: [],
|
|
1396
|
+
aggregations: {
|
|
1397
|
+
subject: new Aggregation({ buckets }),
|
|
1398
|
+
},
|
|
1399
|
+
},
|
|
1400
|
+
responseHeader: {
|
|
1401
|
+
succeeded: true,
|
|
1402
|
+
query_time: 0,
|
|
1403
|
+
},
|
|
1404
|
+
},
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1352
1408
|
export const getMockErrorResult: () => Result<
|
|
1353
1409
|
SearchResponse,
|
|
1354
1410
|
SearchServiceError
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
getMockSuccessNoResults,
|
|
34
34
|
getMockSuccessWithWebArchiveHits,
|
|
35
35
|
getMockSuccessWithManyAggregations,
|
|
36
|
+
getMockSuccessWithLargeAggregations,
|
|
36
37
|
getMockSuccessTvFields,
|
|
37
38
|
getMockSuccessArchiveOrgUserResult,
|
|
38
39
|
getMockSuccessArchiveOrgUserNoBlurResult,
|
|
@@ -64,6 +65,7 @@ const responses: Record<
|
|
|
64
65
|
'tv-collection': getMockSuccessForTvCollection,
|
|
65
66
|
'web-archive': getMockSuccessWithWebArchiveHits,
|
|
66
67
|
'more-facets': getMockSuccessWithManyAggregations,
|
|
68
|
+
'large-facets': getMockSuccessWithLargeAggregations,
|
|
67
69
|
'many-fields': getMockSuccessManyFields,
|
|
68
70
|
'tv-fields': getMockSuccessTvFields,
|
|
69
71
|
'no-results': getMockSuccessNoResults,
|