@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
|
@@ -1,644 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
css,
|
|
3
|
-
CSSResultGroup,
|
|
4
|
-
html,
|
|
5
|
-
LitElement,
|
|
6
|
-
nothing,
|
|
7
|
-
PropertyValues,
|
|
8
|
-
TemplateResult,
|
|
9
|
-
} from 'lit';
|
|
10
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
11
|
-
import {
|
|
12
|
-
Aggregation,
|
|
13
|
-
Bucket,
|
|
14
|
-
SearchServiceInterface,
|
|
15
|
-
SearchParams,
|
|
16
|
-
SearchType,
|
|
17
|
-
AggregationSortType,
|
|
18
|
-
FilterMap,
|
|
19
|
-
PageType,
|
|
20
|
-
} from '@internetarchive/search-service';
|
|
21
|
-
import type { ModalManagerInterface } from '@internetarchive/modal-manager';
|
|
22
|
-
import type { AnalyticsManagerInterface } from '@internetarchive/analytics-manager';
|
|
23
|
-
import { msg } from '@lit/localize';
|
|
24
|
-
import {
|
|
25
|
-
SelectedFacets,
|
|
26
|
-
FacetGroup,
|
|
27
|
-
FacetBucket,
|
|
28
|
-
FacetOption,
|
|
29
|
-
facetTitles,
|
|
30
|
-
suppressedCollections,
|
|
31
|
-
valueFacetSort,
|
|
32
|
-
defaultFacetSort,
|
|
33
|
-
getDefaultSelectedFacets,
|
|
34
|
-
FacetEventDetails,
|
|
35
|
-
tvMoreFacetSort,
|
|
36
|
-
} from '../models';
|
|
37
|
-
import type {
|
|
38
|
-
CollectionTitles,
|
|
39
|
-
PageSpecifierParams,
|
|
40
|
-
TVChannelAliases,
|
|
41
|
-
} from '../data-source/models';
|
|
42
|
-
import '@internetarchive/elements/ia-status-indicator/ia-status-indicator';
|
|
43
|
-
import './more-facets-pagination';
|
|
44
|
-
import './facets-template';
|
|
45
|
-
import {
|
|
46
|
-
analyticsActions,
|
|
47
|
-
analyticsCategories,
|
|
48
|
-
} from '../utils/analytics-events';
|
|
49
|
-
import './toggle-switch';
|
|
50
|
-
import { srOnlyStyle } from '../styles/sr-only';
|
|
51
|
-
import {
|
|
52
|
-
mergeSelectedFacets,
|
|
53
|
-
sortBucketsBySelectionState,
|
|
54
|
-
updateSelectedFacetBucket,
|
|
55
|
-
} from '../utils/facet-utils';
|
|
56
|
-
import {
|
|
57
|
-
MORE_FACETS__DEFAULT_PAGE_SIZE,
|
|
58
|
-
MORE_FACETS__MAX_AGGREGATIONS,
|
|
59
|
-
} from './models';
|
|
60
|
-
|
|
61
|
-
@customElement('more-facets-content')
|
|
62
|
-
export class MoreFacetsContent extends LitElement {
|
|
63
|
-
@property({ type: String }) facetKey?: FacetOption;
|
|
64
|
-
|
|
65
|
-
@property({ type: String }) query?: string;
|
|
66
|
-
|
|
67
|
-
@property({ type: Array }) identifiers?: string[];
|
|
68
|
-
|
|
69
|
-
@property({ type: Object }) filterMap?: FilterMap;
|
|
70
|
-
|
|
71
|
-
@property({ type: Number }) searchType?: SearchType;
|
|
72
|
-
|
|
73
|
-
@property({ type: Object }) pageSpecifierParams?: PageSpecifierParams;
|
|
74
|
-
|
|
75
|
-
@property({ type: Object })
|
|
76
|
-
collectionTitles?: CollectionTitles;
|
|
77
|
-
|
|
78
|
-
@property({ type: Object })
|
|
79
|
-
tvChannelAliases?: TVChannelAliases;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Maximum number of facets to show per page within the modal.
|
|
83
|
-
*/
|
|
84
|
-
@property({ type: Number }) facetsPerPage = MORE_FACETS__DEFAULT_PAGE_SIZE;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Whether we are waiting for facet data to load.
|
|
88
|
-
* We begin with this set to true so that we show an initial loading indicator.
|
|
89
|
-
*/
|
|
90
|
-
@property({ type: Boolean }) facetsLoading = true;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The set of pre-existing facet selections (including both selected & negated facets).
|
|
94
|
-
*/
|
|
95
|
-
@property({ type: Object }) selectedFacets?: SelectedFacets;
|
|
96
|
-
|
|
97
|
-
@property({ type: Number }) sortedBy: AggregationSortType =
|
|
98
|
-
AggregationSortType.COUNT;
|
|
99
|
-
|
|
100
|
-
@property({ type: Boolean }) isTvSearch = false;
|
|
101
|
-
|
|
102
|
-
@property({ type: Object }) modalManager?: ModalManagerInterface;
|
|
103
|
-
|
|
104
|
-
@property({ type: Object }) searchService?: SearchServiceInterface;
|
|
105
|
-
|
|
106
|
-
@property({ type: Object, attribute: false })
|
|
107
|
-
analyticsHandler?: AnalyticsManagerInterface;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The full set of aggregations received from the search service
|
|
111
|
-
*/
|
|
112
|
-
@state() private aggregations?: Record<string, Aggregation>;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* A FacetGroup storing the full set of facet buckets to be shown on the dialog.
|
|
116
|
-
*/
|
|
117
|
-
@state() private facetGroup?: FacetGroup;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* An object holding any changes the patron has made to their facet selections
|
|
121
|
-
* within the modal dialog but which they have not yet applied. These are
|
|
122
|
-
* eventually merged into the existing `selectedFacets` when the patron applies
|
|
123
|
-
* their changes, or discarded if they cancel/close the dialog.
|
|
124
|
-
*/
|
|
125
|
-
@state() private unappliedFacetChanges: SelectedFacets =
|
|
126
|
-
getDefaultSelectedFacets();
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Which page of facets we are showing.
|
|
130
|
-
*/
|
|
131
|
-
@state() private pageNumber = 1;
|
|
132
|
-
|
|
133
|
-
willUpdate(changed: PropertyValues): void {
|
|
134
|
-
if (
|
|
135
|
-
changed.has('aggregations') ||
|
|
136
|
-
changed.has('facetsPerPage') ||
|
|
137
|
-
changed.has('sortedBy') ||
|
|
138
|
-
changed.has('selectedFacets') ||
|
|
139
|
-
changed.has('unappliedFacetChanges')
|
|
140
|
-
) {
|
|
141
|
-
// Convert the merged selected facets & aggregations into a facet group, and
|
|
142
|
-
// store it for reuse across pages.
|
|
143
|
-
this.facetGroup = this.mergedFacets;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// If any of the search properties change, it triggers a facet fetch
|
|
147
|
-
if (
|
|
148
|
-
changed.has('facetKey') ||
|
|
149
|
-
changed.has('query') ||
|
|
150
|
-
changed.has('searchType') ||
|
|
151
|
-
changed.has('filterMap')
|
|
152
|
-
) {
|
|
153
|
-
this.facetsLoading = true;
|
|
154
|
-
this.pageNumber = 1;
|
|
155
|
-
this.sortedBy =
|
|
156
|
-
this.searchType === SearchType.TV
|
|
157
|
-
? tvMoreFacetSort[this.facetKey as FacetOption]
|
|
158
|
-
: defaultFacetSort[this.facetKey as FacetOption];
|
|
159
|
-
|
|
160
|
-
this.updateSpecificFacets();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
firstUpdated(): void {
|
|
165
|
-
this.setupEscapeListeners();
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Close more facets modal on Escape click
|
|
170
|
-
*/
|
|
171
|
-
private setupEscapeListeners() {
|
|
172
|
-
if (this.modalManager) {
|
|
173
|
-
document.addEventListener('keydown', (e: KeyboardEvent) => {
|
|
174
|
-
if (e.key === 'Escape') {
|
|
175
|
-
this.modalManager?.closeModal();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
} else {
|
|
179
|
-
document.removeEventListener('keydown', () => {});
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Whether facet requests are for the search_results page type (either defaulted or explicitly).
|
|
185
|
-
*/
|
|
186
|
-
private get isSearchResultsPage(): boolean {
|
|
187
|
-
// Default page type is search_results when none is specified, so we check
|
|
188
|
-
// for undefined as well.
|
|
189
|
-
const pageType: PageType | undefined = this.pageSpecifierParams?.pageType;
|
|
190
|
-
return pageType === undefined || pageType === 'search_results';
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Get specific facets data from search-service API based of currently query params
|
|
195
|
-
* - this.aggregations - hold result of search service and being used for further processing.
|
|
196
|
-
*/
|
|
197
|
-
async updateSpecificFacets(): Promise<void> {
|
|
198
|
-
if (!this.facetKey) return; // Can't fetch facets if we don't know what type of facets we need!
|
|
199
|
-
|
|
200
|
-
const trimmedQuery = this.query?.trim();
|
|
201
|
-
if (!trimmedQuery && this.isSearchResultsPage) return; // The search page _requires_ a query
|
|
202
|
-
|
|
203
|
-
const aggregations = {
|
|
204
|
-
simpleParams: [this.facetKey],
|
|
205
|
-
};
|
|
206
|
-
const aggregationsSize = MORE_FACETS__MAX_AGGREGATIONS; // Only request the 10K highest-count facets
|
|
207
|
-
|
|
208
|
-
const params: SearchParams = {
|
|
209
|
-
...this.pageSpecifierParams,
|
|
210
|
-
query: trimmedQuery || '',
|
|
211
|
-
identifiers: this.identifiers,
|
|
212
|
-
filters: this.filterMap,
|
|
213
|
-
aggregations,
|
|
214
|
-
aggregationsSize,
|
|
215
|
-
rows: 0, // todo - do we want server-side pagination with offset/page/limit flag?
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
const results = await this.searchService?.search(params, this.searchType);
|
|
219
|
-
this.aggregations = results?.success?.response.aggregations;
|
|
220
|
-
this.facetsLoading = false;
|
|
221
|
-
|
|
222
|
-
const collectionTitles = results?.success?.response?.collectionTitles;
|
|
223
|
-
if (collectionTitles) {
|
|
224
|
-
for (const [id, title] of Object.entries(collectionTitles)) {
|
|
225
|
-
this.collectionTitles?.set(id, title);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Handler for page number changes from the pagination widget.
|
|
232
|
-
*/
|
|
233
|
-
private pageNumberClicked(e: CustomEvent<{ page: number }>) {
|
|
234
|
-
const page = e?.detail?.page;
|
|
235
|
-
if (page) {
|
|
236
|
-
this.pageNumber = Number(page);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
this.analyticsHandler?.sendEvent({
|
|
240
|
-
category: analyticsCategories.default,
|
|
241
|
-
action: analyticsActions.moreFacetsPageChange,
|
|
242
|
-
label: `${this.pageNumber}`,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Combines the selected facets with the aggregations to create a single list of facets
|
|
248
|
-
*/
|
|
249
|
-
private get mergedFacets(): FacetGroup | undefined {
|
|
250
|
-
if (!this.facetKey || !this.selectedFacets) return undefined;
|
|
251
|
-
|
|
252
|
-
const { selectedFacetGroup, aggregationFacetGroup } = this;
|
|
253
|
-
|
|
254
|
-
// If we don't have any aggregations, then there is nothing to show yet
|
|
255
|
-
if (!aggregationFacetGroup) return undefined;
|
|
256
|
-
|
|
257
|
-
// Start with either the selected group if we have one, or the aggregate group otherwise
|
|
258
|
-
const facetGroup = { ...(selectedFacetGroup ?? aggregationFacetGroup) };
|
|
259
|
-
|
|
260
|
-
// Attach the counts to the selected buckets
|
|
261
|
-
const bucketsWithCount =
|
|
262
|
-
selectedFacetGroup?.buckets.map(bucket => {
|
|
263
|
-
const selectedBucket = aggregationFacetGroup.buckets.find(
|
|
264
|
-
b => b.key === bucket.key,
|
|
265
|
-
);
|
|
266
|
-
return selectedBucket
|
|
267
|
-
? {
|
|
268
|
-
...bucket,
|
|
269
|
-
count: selectedBucket.count,
|
|
270
|
-
}
|
|
271
|
-
: bucket;
|
|
272
|
-
}) ?? [];
|
|
273
|
-
|
|
274
|
-
// Sort the buckets by selection state
|
|
275
|
-
// We do this *prior* to considering unapplied selections, because we want the facets
|
|
276
|
-
// to remain in position when they are selected/unselected, rather than re-sort themselves.
|
|
277
|
-
sortBucketsBySelectionState(bucketsWithCount, this.sortedBy);
|
|
278
|
-
|
|
279
|
-
// Append any additional buckets that were not selected
|
|
280
|
-
aggregationFacetGroup.buckets.forEach(bucket => {
|
|
281
|
-
const existingBucket = selectedFacetGroup?.buckets.find(
|
|
282
|
-
b => b.key === bucket.key,
|
|
283
|
-
);
|
|
284
|
-
if (existingBucket) return;
|
|
285
|
-
bucketsWithCount.push(bucket);
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
// Apply any unapplied selections that appear on this page
|
|
289
|
-
const unappliedBuckets = this.unappliedFacetChanges[this.facetKey];
|
|
290
|
-
for (const [index, bucket] of bucketsWithCount.entries()) {
|
|
291
|
-
const unappliedBucket = unappliedBuckets?.[bucket.key];
|
|
292
|
-
if (unappliedBucket) {
|
|
293
|
-
bucketsWithCount[index] = { ...unappliedBucket };
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// For TV creator facets, uppercase the display text
|
|
298
|
-
if (this.facetKey === 'creator' && this.isTvSearch) {
|
|
299
|
-
bucketsWithCount.forEach(b => {
|
|
300
|
-
b.displayText = (b.displayText ?? b.key)?.toLocaleUpperCase();
|
|
301
|
-
|
|
302
|
-
const channelLabel = this.tvChannelAliases?.get(b.displayText);
|
|
303
|
-
if (channelLabel && channelLabel !== b.displayText) {
|
|
304
|
-
b.extraNote = `(${channelLabel})`;
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
facetGroup.buckets = bucketsWithCount;
|
|
310
|
-
return facetGroup;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Converts the selected facets for the current facet key to a `FacetGroup`,
|
|
315
|
-
* which is easier to work with.
|
|
316
|
-
*/
|
|
317
|
-
private get selectedFacetGroup(): FacetGroup | undefined {
|
|
318
|
-
if (!this.selectedFacets || !this.facetKey) return undefined;
|
|
319
|
-
|
|
320
|
-
const selectedFacetsForKey = this.selectedFacets[this.facetKey];
|
|
321
|
-
if (!selectedFacetsForKey) return undefined;
|
|
322
|
-
|
|
323
|
-
const facetGroupTitle = facetTitles[this.facetKey];
|
|
324
|
-
|
|
325
|
-
const buckets: FacetBucket[] = Object.entries(selectedFacetsForKey).map(
|
|
326
|
-
([value, data]) => {
|
|
327
|
-
const displayText: string = value;
|
|
328
|
-
return {
|
|
329
|
-
displayText,
|
|
330
|
-
key: value,
|
|
331
|
-
count: data?.count,
|
|
332
|
-
state: data?.state,
|
|
333
|
-
};
|
|
334
|
-
},
|
|
335
|
-
);
|
|
336
|
-
|
|
337
|
-
return {
|
|
338
|
-
title: facetGroupTitle,
|
|
339
|
-
key: this.facetKey,
|
|
340
|
-
buckets,
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Converts the raw `aggregations` for the current facet key to a `FacetGroup`,
|
|
346
|
-
* which is easier to work with.
|
|
347
|
-
*/
|
|
348
|
-
private get aggregationFacetGroup(): FacetGroup | undefined {
|
|
349
|
-
if (!this.aggregations || !this.facetKey) return undefined;
|
|
350
|
-
|
|
351
|
-
const currentAggregation = this.aggregations[this.facetKey];
|
|
352
|
-
if (!currentAggregation) return undefined;
|
|
353
|
-
|
|
354
|
-
const facetGroupTitle = facetTitles[this.facetKey];
|
|
355
|
-
|
|
356
|
-
// Order the facets according to the current sort option
|
|
357
|
-
let sortedBuckets = currentAggregation.getSortedBuckets(
|
|
358
|
-
this.sortedBy,
|
|
359
|
-
) as Bucket[];
|
|
360
|
-
|
|
361
|
-
if (this.facetKey === 'collection') {
|
|
362
|
-
// we are not showing fav- collections or certain deemphasized collections in facets
|
|
363
|
-
sortedBuckets = sortedBuckets?.filter(bucket => {
|
|
364
|
-
const bucketKey = bucket?.key?.toString();
|
|
365
|
-
return (
|
|
366
|
-
!suppressedCollections[bucketKey] && !bucketKey?.startsWith('fav-')
|
|
367
|
-
);
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// Construct the array of facet buckets from the aggregation buckets
|
|
372
|
-
const facetBuckets: FacetBucket[] = sortedBuckets.map(bucket => {
|
|
373
|
-
const bucketKeyStr = `${bucket.key}`;
|
|
374
|
-
return {
|
|
375
|
-
displayText: `${bucketKeyStr}`,
|
|
376
|
-
key: `${bucketKeyStr}`,
|
|
377
|
-
count: bucket.doc_count,
|
|
378
|
-
state: 'none',
|
|
379
|
-
};
|
|
380
|
-
});
|
|
381
|
-
|
|
382
|
-
return {
|
|
383
|
-
title: facetGroupTitle,
|
|
384
|
-
key: this.facetKey,
|
|
385
|
-
buckets: facetBuckets,
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Returns a FacetGroup representing only the current page of facet buckets to show.
|
|
391
|
-
*/
|
|
392
|
-
private get facetGroupForCurrentPage(): FacetGroup | undefined {
|
|
393
|
-
const { facetGroup } = this;
|
|
394
|
-
if (!facetGroup) return undefined;
|
|
395
|
-
|
|
396
|
-
// Slice out only the current page of facet buckets
|
|
397
|
-
const firstBucketIndexOnPage = (this.pageNumber - 1) * this.facetsPerPage;
|
|
398
|
-
const truncatedBuckets = facetGroup.buckets.slice(
|
|
399
|
-
firstBucketIndexOnPage,
|
|
400
|
-
firstBucketIndexOnPage + this.facetsPerPage,
|
|
401
|
-
);
|
|
402
|
-
|
|
403
|
-
return {
|
|
404
|
-
...facetGroup,
|
|
405
|
-
buckets: truncatedBuckets,
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
private get moreFacetsTemplate(): TemplateResult {
|
|
410
|
-
return html`
|
|
411
|
-
<facets-template
|
|
412
|
-
.facetGroup=${this.facetGroupForCurrentPage}
|
|
413
|
-
.selectedFacets=${this.selectedFacets}
|
|
414
|
-
.collectionTitles=${this.collectionTitles}
|
|
415
|
-
@facetClick=${(e: CustomEvent<FacetEventDetails>) => {
|
|
416
|
-
if (this.facetKey) {
|
|
417
|
-
this.unappliedFacetChanges = updateSelectedFacetBucket(
|
|
418
|
-
this.unappliedFacetChanges,
|
|
419
|
-
this.facetKey,
|
|
420
|
-
e.detail.bucket,
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
}}
|
|
424
|
-
></facets-template>
|
|
425
|
-
`;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
private get loaderTemplate(): TemplateResult {
|
|
429
|
-
return html`
|
|
430
|
-
<ia-status-indicator
|
|
431
|
-
class="facets-loader"
|
|
432
|
-
mode="loading"
|
|
433
|
-
></ia-status-indicator>
|
|
434
|
-
`;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* How many pages of facets to show in the modal pagination widget
|
|
439
|
-
*/
|
|
440
|
-
private get paginationSize(): number {
|
|
441
|
-
if (!this.aggregations || !this.facetKey) return 0;
|
|
442
|
-
|
|
443
|
-
// Calculate the appropriate number of pages to show in the modal pagination widget
|
|
444
|
-
const length = this.aggregations[this.facetKey]?.buckets.length;
|
|
445
|
-
return Math.ceil(length / this.facetsPerPage);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
// render pagination if more then 1 page
|
|
449
|
-
private get facetsPaginationTemplate() {
|
|
450
|
-
return this.paginationSize > 1
|
|
451
|
-
? html`<more-facets-pagination
|
|
452
|
-
.size=${this.paginationSize}
|
|
453
|
-
.currentPage=${1}
|
|
454
|
-
@pageNumberClicked=${this.pageNumberClicked}
|
|
455
|
-
></more-facets-pagination>`
|
|
456
|
-
: nothing;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
private get footerTemplate() {
|
|
460
|
-
if (this.paginationSize > 0) {
|
|
461
|
-
return html`${this.facetsPaginationTemplate}
|
|
462
|
-
<div class="footer">
|
|
463
|
-
<button
|
|
464
|
-
class="btn btn-cancel"
|
|
465
|
-
type="button"
|
|
466
|
-
@click=${this.cancelClick}
|
|
467
|
-
>
|
|
468
|
-
Cancel
|
|
469
|
-
</button>
|
|
470
|
-
<button
|
|
471
|
-
class="btn btn-submit"
|
|
472
|
-
type="button"
|
|
473
|
-
@click=${this.applySearchFacetsClicked}
|
|
474
|
-
>
|
|
475
|
-
Apply filters
|
|
476
|
-
</button>
|
|
477
|
-
</div> `;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
return nothing;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
private sortFacetAggregation(facetSortType: AggregationSortType) {
|
|
484
|
-
this.sortedBy = facetSortType;
|
|
485
|
-
this.dispatchEvent(
|
|
486
|
-
new CustomEvent('sortedFacets', { detail: this.sortedBy }),
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
private get modalHeaderTemplate(): TemplateResult {
|
|
491
|
-
const facetSort =
|
|
492
|
-
this.sortedBy ?? defaultFacetSort[this.facetKey as FacetOption];
|
|
493
|
-
const defaultSwitchSide =
|
|
494
|
-
facetSort === AggregationSortType.COUNT ? 'left' : 'right';
|
|
495
|
-
|
|
496
|
-
return html`<span class="sr-only">${msg('More facets for:')}</span>
|
|
497
|
-
<span class="title">
|
|
498
|
-
${this.facetGroup?.title}
|
|
499
|
-
|
|
500
|
-
<label class="sort-label">${msg('Sort by:')}</label>
|
|
501
|
-
${this.facetKey
|
|
502
|
-
? html`<toggle-switch
|
|
503
|
-
class="sort-toggle"
|
|
504
|
-
leftValue=${AggregationSortType.COUNT}
|
|
505
|
-
leftLabel="Count"
|
|
506
|
-
rightValue=${valueFacetSort[this.facetKey]}
|
|
507
|
-
.rightLabel=${this.facetGroup?.title}
|
|
508
|
-
side=${defaultSwitchSide}
|
|
509
|
-
@change=${(e: CustomEvent<string>) => {
|
|
510
|
-
this.sortFacetAggregation(
|
|
511
|
-
Number(e.detail) as AggregationSortType,
|
|
512
|
-
);
|
|
513
|
-
}}
|
|
514
|
-
></toggle-switch>`
|
|
515
|
-
: nothing}
|
|
516
|
-
</span>`;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
render() {
|
|
520
|
-
return html`
|
|
521
|
-
${this.facetsLoading
|
|
522
|
-
? this.loaderTemplate
|
|
523
|
-
: html`
|
|
524
|
-
<section id="more-facets">
|
|
525
|
-
<div class="header-content">${this.modalHeaderTemplate}</div>
|
|
526
|
-
<div class="facets-content">${this.moreFacetsTemplate}</div>
|
|
527
|
-
${this.footerTemplate}
|
|
528
|
-
</section>
|
|
529
|
-
`}
|
|
530
|
-
`;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
private applySearchFacetsClicked() {
|
|
534
|
-
const mergedSelections = mergeSelectedFacets(
|
|
535
|
-
this.selectedFacets,
|
|
536
|
-
this.unappliedFacetChanges,
|
|
537
|
-
);
|
|
538
|
-
|
|
539
|
-
const event = new CustomEvent<SelectedFacets>('facetsChanged', {
|
|
540
|
-
detail: mergedSelections,
|
|
541
|
-
bubbles: true,
|
|
542
|
-
composed: true,
|
|
543
|
-
});
|
|
544
|
-
this.dispatchEvent(event);
|
|
545
|
-
|
|
546
|
-
// Reset the unapplied changes back to default, now that they have been applied
|
|
547
|
-
this.unappliedFacetChanges = getDefaultSelectedFacets();
|
|
548
|
-
|
|
549
|
-
this.modalManager?.closeModal();
|
|
550
|
-
this.analyticsHandler?.sendEvent({
|
|
551
|
-
category: analyticsCategories.default,
|
|
552
|
-
action: `${analyticsActions.applyMoreFacetsModal}`,
|
|
553
|
-
label: `${this.facetKey}`,
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
private cancelClick() {
|
|
558
|
-
// Reset the unapplied changes back to default
|
|
559
|
-
this.unappliedFacetChanges = getDefaultSelectedFacets();
|
|
560
|
-
|
|
561
|
-
this.modalManager?.closeModal();
|
|
562
|
-
this.analyticsHandler?.sendEvent({
|
|
563
|
-
category: analyticsCategories.default,
|
|
564
|
-
action: analyticsActions.closeMoreFacetsModal,
|
|
565
|
-
label: `${this.facetKey}`,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
static get styles(): CSSResultGroup {
|
|
570
|
-
const modalSubmitButton = css`var(--primaryButtonBGColor, #194880)`;
|
|
571
|
-
|
|
572
|
-
return [
|
|
573
|
-
srOnlyStyle,
|
|
574
|
-
css`
|
|
575
|
-
section#more-facets {
|
|
576
|
-
overflow: auto;
|
|
577
|
-
padding: 10px; /* leaves room for scroll bar to appear without overlaying on content */
|
|
578
|
-
--facetsColumnCount: 3;
|
|
579
|
-
}
|
|
580
|
-
.header-content .title {
|
|
581
|
-
display: block;
|
|
582
|
-
text-align: left;
|
|
583
|
-
font-size: 1.8rem;
|
|
584
|
-
padding: 0 10px;
|
|
585
|
-
font-weight: bold;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.sort-label {
|
|
589
|
-
margin-left: 20px;
|
|
590
|
-
font-size: 1.3rem;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.sort-toggle {
|
|
594
|
-
font-weight: normal;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.facets-content {
|
|
598
|
-
font-size: 1.2rem;
|
|
599
|
-
max-height: 300px;
|
|
600
|
-
overflow: auto;
|
|
601
|
-
padding: 10px;
|
|
602
|
-
}
|
|
603
|
-
.facets-loader {
|
|
604
|
-
--icon-width: 70px;
|
|
605
|
-
margin-bottom: 20px;
|
|
606
|
-
display: block;
|
|
607
|
-
margin-left: auto;
|
|
608
|
-
margin-right: auto;
|
|
609
|
-
}
|
|
610
|
-
.btn {
|
|
611
|
-
border: none;
|
|
612
|
-
padding: 10px;
|
|
613
|
-
margin-bottom: 10px;
|
|
614
|
-
width: auto;
|
|
615
|
-
border-radius: 4px;
|
|
616
|
-
cursor: pointer;
|
|
617
|
-
}
|
|
618
|
-
.btn-cancel {
|
|
619
|
-
background-color: #2c2c2c;
|
|
620
|
-
color: white;
|
|
621
|
-
}
|
|
622
|
-
.btn-submit {
|
|
623
|
-
background-color: ${modalSubmitButton};
|
|
624
|
-
color: white;
|
|
625
|
-
}
|
|
626
|
-
.footer {
|
|
627
|
-
text-align: center;
|
|
628
|
-
margin-top: 10px;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
@media (max-width: 560px) {
|
|
632
|
-
section#more-facets {
|
|
633
|
-
max-height: 450px;
|
|
634
|
-
--facetsColumnCount: 1;
|
|
635
|
-
}
|
|
636
|
-
.facets-content {
|
|
637
|
-
overflow-y: auto;
|
|
638
|
-
height: 300px;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
`,
|
|
642
|
-
];
|
|
643
|
-
}
|
|
644
|
-
}
|