@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,437 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
css,
|
|
3
|
-
html,
|
|
4
|
-
LitElement,
|
|
5
|
-
TemplateResult,
|
|
6
|
-
CSSResultGroup,
|
|
7
|
-
nothing,
|
|
8
|
-
PropertyValues,
|
|
9
|
-
} from 'lit';
|
|
10
|
-
import { repeat } from 'lit/directives/repeat.js';
|
|
11
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
-
import type { Aggregation, Bucket } from '@internetarchive/search-service';
|
|
13
|
-
import type { CollectionTitles } from '../../data-source/models';
|
|
14
|
-
import type {
|
|
15
|
-
FacetEventDetails,
|
|
16
|
-
FacetOption,
|
|
17
|
-
FacetState,
|
|
18
|
-
SelectedFacets,
|
|
19
|
-
} from '../../models';
|
|
20
|
-
import { updateSelectedFacetBucket } from '../../utils/facet-utils';
|
|
21
|
-
import { SmartQueryHeuristicGroup } from './smart-facet-heuristics';
|
|
22
|
-
import type { SmartFacetDropdown } from './smart-facet-dropdown';
|
|
23
|
-
import type { SmartFacet, SmartFacetEvent } from './models';
|
|
24
|
-
import { smartFacetEquals } from './smart-facet-equals';
|
|
25
|
-
import { dedupe } from './dedupe';
|
|
26
|
-
import { log } from '../../utils/log';
|
|
27
|
-
import filterIcon from '../../assets/img/icons/filter';
|
|
28
|
-
|
|
29
|
-
import './smart-facet-button';
|
|
30
|
-
import './smart-facet-dropdown';
|
|
31
|
-
|
|
32
|
-
const fieldPrefixes: Partial<Record<FacetOption, string>> = {
|
|
33
|
-
collection: 'Collection: ',
|
|
34
|
-
creator: 'By: ',
|
|
35
|
-
subject: 'About: ',
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function capitalize(str: string) {
|
|
39
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@customElement('smart-facet-bar')
|
|
43
|
-
export class SmartFacetBar extends LitElement {
|
|
44
|
-
@property({ type: String }) query?: string;
|
|
45
|
-
|
|
46
|
-
@property({ type: Object }) aggregations?: Record<string, Aggregation>;
|
|
47
|
-
|
|
48
|
-
@property({ type: Object }) selectedFacets?: SelectedFacets;
|
|
49
|
-
|
|
50
|
-
/** The map from collection identifiers to their titles */
|
|
51
|
-
@property({ type: Object })
|
|
52
|
-
collectionTitles?: CollectionTitles;
|
|
53
|
-
|
|
54
|
-
@property({ type: Boolean }) filterToggleShown = false;
|
|
55
|
-
|
|
56
|
-
@property({ type: Boolean }) filterToggleActive = false;
|
|
57
|
-
|
|
58
|
-
@property({ type: String }) label?: string;
|
|
59
|
-
|
|
60
|
-
@state() private heuristicRecs: SmartFacet[] = [];
|
|
61
|
-
|
|
62
|
-
@state() private smartFacets: SmartFacet[][] = [];
|
|
63
|
-
|
|
64
|
-
@state() private lastAggregations?: Record<string, Aggregation>;
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
// COMPONENT LIFECYCLE METHODS
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
render() {
|
|
71
|
-
if (!this.query) return nothing;
|
|
72
|
-
|
|
73
|
-
const shouldShowLabel = !!this.label && this.smartFacets.length > 0;
|
|
74
|
-
return html`
|
|
75
|
-
<div id="smart-facets-container">
|
|
76
|
-
${this.filtersToggleTemplate}
|
|
77
|
-
${shouldShowLabel
|
|
78
|
-
? html`<p id="filters-label">${this.label}</p>`
|
|
79
|
-
: nothing}
|
|
80
|
-
${repeat(
|
|
81
|
-
this.smartFacets,
|
|
82
|
-
f =>
|
|
83
|
-
`${f[0].label}|${f[0].facets[0].facetType}|${f[0].facets[0].bucketKey}`,
|
|
84
|
-
facet => this.makeSmartFacet(facet),
|
|
85
|
-
)}
|
|
86
|
-
</div>
|
|
87
|
-
`;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
protected willUpdate(changed: PropertyValues): void {
|
|
91
|
-
let shouldUpdateSmartFacets = false;
|
|
92
|
-
|
|
93
|
-
if (changed.has('query')) {
|
|
94
|
-
log('query change', changed.get('query'), this.query);
|
|
95
|
-
this.lastAggregations = undefined;
|
|
96
|
-
shouldUpdateSmartFacets = true;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
changed.has('aggregations') &&
|
|
101
|
-
!this.lastAggregations &&
|
|
102
|
-
this.aggregations &&
|
|
103
|
-
Object.keys(this.aggregations).length > 0
|
|
104
|
-
) {
|
|
105
|
-
log('aggs change', changed.get('aggregations'), this.aggregations);
|
|
106
|
-
this.lastAggregations = this.aggregations;
|
|
107
|
-
shouldUpdateSmartFacets = true;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (shouldUpdateSmartFacets) {
|
|
111
|
-
log('should update smart facets, doing so...');
|
|
112
|
-
this.updateSmartFacets();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
refresh(): void {
|
|
117
|
-
this.lastAggregations = this.aggregations;
|
|
118
|
-
this.updateSmartFacets();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
deselectAll(): void {
|
|
122
|
-
for (const sf of this.smartFacets) {
|
|
123
|
-
for (const facet of sf) {
|
|
124
|
-
facet.selected = false;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
this.requestUpdate();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private async updateSmartFacets(): Promise<void> {
|
|
131
|
-
log('updating smart facets');
|
|
132
|
-
if (this.query) {
|
|
133
|
-
this.heuristicRecs =
|
|
134
|
-
await new SmartQueryHeuristicGroup().getRecommendedFacets(this.query);
|
|
135
|
-
log('heuristic recs are', this.heuristicRecs);
|
|
136
|
-
this.smartFacets = dedupe(this.facetsToDisplay);
|
|
137
|
-
log('smart facets are', this.smartFacets);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
//
|
|
142
|
-
// OTHER METHODS
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
private makeSmartFacet(facets: SmartFacet[]) {
|
|
146
|
-
if (facets.length === 0) {
|
|
147
|
-
return nothing;
|
|
148
|
-
}
|
|
149
|
-
if (facets.length === 1) {
|
|
150
|
-
return this.smartFacetButton(facets[0]);
|
|
151
|
-
}
|
|
152
|
-
return this.smartFacetDropdown(facets);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
private smartFacetButton(facet: SmartFacet) {
|
|
156
|
-
return html`
|
|
157
|
-
<smart-facet-button
|
|
158
|
-
.facetInfo=${facet}
|
|
159
|
-
.labelPrefix=${fieldPrefixes[facet.facets[0].facetType]}
|
|
160
|
-
.selected=${facet.selected ?? false}
|
|
161
|
-
@facetClick=${this.facetClicked}
|
|
162
|
-
></smart-facet-button>
|
|
163
|
-
`;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
private smartFacetDropdown(facets: SmartFacet[]) {
|
|
167
|
-
return html`
|
|
168
|
-
<smart-facet-dropdown
|
|
169
|
-
.facetInfo=${facets}
|
|
170
|
-
.labelPrefix=${fieldPrefixes[facets[0].facets[0].facetType]}
|
|
171
|
-
.activeFacetRef=${facets[0].facets[0]}
|
|
172
|
-
@facetClick=${this.dropdownOptionClicked}
|
|
173
|
-
@dropdownClick=${this.dropdownClicked}
|
|
174
|
-
></smart-facet-dropdown>
|
|
175
|
-
`;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
private get filtersToggleTemplate(): TemplateResult | typeof nothing {
|
|
179
|
-
if (!this.filterToggleShown) return nothing;
|
|
180
|
-
|
|
181
|
-
return html`
|
|
182
|
-
<button
|
|
183
|
-
id="filters-toggle"
|
|
184
|
-
class=${this.filterToggleActive ? 'active' : ''}
|
|
185
|
-
title="${this.filterToggleActive ? 'Hide' : 'Show'} filters pane"
|
|
186
|
-
@click=${this.filterToggleClicked}
|
|
187
|
-
>
|
|
188
|
-
${filterIcon}
|
|
189
|
-
</button>
|
|
190
|
-
`;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
private get facetsToDisplay(): SmartFacet[][] {
|
|
194
|
-
const facets: SmartFacet[][] = [];
|
|
195
|
-
|
|
196
|
-
if (this.heuristicRecs.length > 0) {
|
|
197
|
-
for (const rec of this.heuristicRecs) {
|
|
198
|
-
// Suppress mediatype-only facets for now.
|
|
199
|
-
if (rec.facets.length === 1 && rec.facets[0].facetType === 'mediatype')
|
|
200
|
-
continue;
|
|
201
|
-
|
|
202
|
-
facets.push([rec]);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (this.lastAggregations) {
|
|
207
|
-
const keys = [
|
|
208
|
-
'mediatype',
|
|
209
|
-
'year',
|
|
210
|
-
'language',
|
|
211
|
-
'creator',
|
|
212
|
-
'subject',
|
|
213
|
-
'collection',
|
|
214
|
-
];
|
|
215
|
-
for (const key of keys) {
|
|
216
|
-
const agg = this.lastAggregations[key];
|
|
217
|
-
if (!agg) continue;
|
|
218
|
-
if (agg.buckets.length === 0) continue;
|
|
219
|
-
if (['lending', 'year_histogram', 'date_histogram'].includes(key))
|
|
220
|
-
continue;
|
|
221
|
-
if (typeof agg.buckets[0] === 'number') continue;
|
|
222
|
-
|
|
223
|
-
if (
|
|
224
|
-
key === 'mediatype' &&
|
|
225
|
-
this.selectedFacets &&
|
|
226
|
-
Object.values(this.selectedFacets.mediatype ?? {}).some(
|
|
227
|
-
bucket => bucket.state !== 'none',
|
|
228
|
-
)
|
|
229
|
-
) {
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const facetType = key as FacetOption;
|
|
234
|
-
const buckets = agg.buckets as Bucket[];
|
|
235
|
-
|
|
236
|
-
const unusedBuckets = buckets.filter(b => {
|
|
237
|
-
const selectedFacetBucket = this.selectedFacets?.[facetType]?.[b.key];
|
|
238
|
-
if (selectedFacetBucket && selectedFacetBucket.state !== 'none') {
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
return true;
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
if (facetType === 'mediatype') {
|
|
245
|
-
continue;
|
|
246
|
-
// Don't include mediatype bubbles
|
|
247
|
-
} else if (facetType === 'collection' || facetType === 'subject') {
|
|
248
|
-
const topBuckets = unusedBuckets.slice(0, 5);
|
|
249
|
-
facets.push(topBuckets.map(b => this.toSmartFacet(facetType, [b])));
|
|
250
|
-
} else {
|
|
251
|
-
facets.push([this.toSmartFacet(facetType, [unusedBuckets[0]])]);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return facets;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
private toSmartFacet(
|
|
260
|
-
facetType: FacetOption,
|
|
261
|
-
buckets: Bucket[],
|
|
262
|
-
// prefix = true
|
|
263
|
-
): SmartFacet {
|
|
264
|
-
return {
|
|
265
|
-
facets: buckets.map(bucket => {
|
|
266
|
-
let displayText = capitalize(bucket.key.toString());
|
|
267
|
-
if (facetType === 'collection') {
|
|
268
|
-
const title = this.collectionTitles?.get(bucket.key.toString());
|
|
269
|
-
if (title) displayText = title;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
return {
|
|
273
|
-
facetType,
|
|
274
|
-
bucketKey: bucket.key.toString(),
|
|
275
|
-
displayText,
|
|
276
|
-
};
|
|
277
|
-
}),
|
|
278
|
-
} as SmartFacet;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Toggles the state of the given smart facet, and updates the selected facets accordingly.
|
|
283
|
-
*/
|
|
284
|
-
private toggleSmartFacet(
|
|
285
|
-
facet: SmartFacet,
|
|
286
|
-
details: FacetEventDetails[],
|
|
287
|
-
): void {
|
|
288
|
-
let newState: FacetState;
|
|
289
|
-
if (facet.selected) {
|
|
290
|
-
// When deselected, leave the smart facet where it is
|
|
291
|
-
newState = 'none';
|
|
292
|
-
this.smartFacets = this.smartFacets.map(f => {
|
|
293
|
-
if (f[0] === facet) return [{ ...facet, selected: false }];
|
|
294
|
-
return f;
|
|
295
|
-
});
|
|
296
|
-
} else {
|
|
297
|
-
// When selected, move the toggled smart facet to the front of the list
|
|
298
|
-
newState = 'selected';
|
|
299
|
-
this.smartFacets = [
|
|
300
|
-
[{ ...facet, selected: true }],
|
|
301
|
-
...this.smartFacets.filter(f => f[0] !== facet),
|
|
302
|
-
];
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
this.updateSelectedFacets(
|
|
306
|
-
details.map(facet => ({
|
|
307
|
-
...facet,
|
|
308
|
-
bucket: {
|
|
309
|
-
...facet.bucket,
|
|
310
|
-
state: newState,
|
|
311
|
-
},
|
|
312
|
-
})),
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Updates the selected facet buckets for each of the given facets,
|
|
318
|
-
* and emits a `facetsChanged` event to notify parent components of
|
|
319
|
-
* the new state.
|
|
320
|
-
*/
|
|
321
|
-
private updateSelectedFacets(facets: FacetEventDetails[]): void {
|
|
322
|
-
for (const facet of facets) {
|
|
323
|
-
this.selectedFacets = updateSelectedFacetBucket(
|
|
324
|
-
this.selectedFacets,
|
|
325
|
-
facet.facetType,
|
|
326
|
-
facet.bucket,
|
|
327
|
-
true,
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
const event = new CustomEvent<SelectedFacets>('facetsChanged', {
|
|
332
|
-
detail: this.selectedFacets,
|
|
333
|
-
});
|
|
334
|
-
this.dispatchEvent(event);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Handler for when a smart facet button is clicked
|
|
339
|
-
*/
|
|
340
|
-
private facetClicked(e: CustomEvent<SmartFacetEvent>): void {
|
|
341
|
-
this.toggleSmartFacet(e.detail.smartFacet, e.detail.details);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Handler for when an option in a smart facet dropdown menu is selected
|
|
346
|
-
*/
|
|
347
|
-
private dropdownOptionClicked(e: CustomEvent<SmartFacetEvent>): void {
|
|
348
|
-
const existingFacet = this.smartFacets.find(
|
|
349
|
-
sf => sf.length === 1 && smartFacetEquals(sf[0], e.detail.smartFacet),
|
|
350
|
-
);
|
|
351
|
-
if (existingFacet) {
|
|
352
|
-
// The facet already exists outside the dropdown, so just select it there
|
|
353
|
-
this.toggleSmartFacet(existingFacet[0], e.detail.details);
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Otherwise, prepend a new smart facet for the selected option
|
|
358
|
-
this.smartFacets = [
|
|
359
|
-
[{ ...e.detail.smartFacet, selected: true }],
|
|
360
|
-
...this.smartFacets,
|
|
361
|
-
];
|
|
362
|
-
|
|
363
|
-
this.updateSelectedFacets(e.detail.details);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Handler for when any dropdown is clicked (whether button, caret, or menu item)
|
|
368
|
-
*/
|
|
369
|
-
private dropdownClicked(e: CustomEvent<SmartFacetDropdown>): void {
|
|
370
|
-
log('smart bar: onDropdownClick', e.detail);
|
|
371
|
-
this.shadowRoot
|
|
372
|
-
?.querySelectorAll('smart-facet-dropdown')
|
|
373
|
-
.forEach(dropdown => {
|
|
374
|
-
if (dropdown !== e.detail) {
|
|
375
|
-
log('closing', dropdown);
|
|
376
|
-
(dropdown as SmartFacetDropdown).close();
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
private filterToggleClicked(): void {
|
|
382
|
-
this.dispatchEvent(new CustomEvent('filtersToggled'));
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
//
|
|
386
|
-
// STYLES
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
static get styles(): CSSResultGroup {
|
|
390
|
-
return css`
|
|
391
|
-
#smart-facets-container {
|
|
392
|
-
display: flex;
|
|
393
|
-
align-items: center;
|
|
394
|
-
gap: 5px 10px;
|
|
395
|
-
padding: 10px 0;
|
|
396
|
-
white-space: nowrap;
|
|
397
|
-
overflow: scroll hidden;
|
|
398
|
-
scrollbar-width: none;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
#filters-toggle {
|
|
402
|
-
margin: 0;
|
|
403
|
-
border: 0;
|
|
404
|
-
padding: 5px 8px;
|
|
405
|
-
border-radius: 5px;
|
|
406
|
-
background: white;
|
|
407
|
-
color: #2c2c2c;
|
|
408
|
-
border: 1px solid #194880;
|
|
409
|
-
font-size: 1.4rem;
|
|
410
|
-
font-family: inherit;
|
|
411
|
-
text-decoration: none;
|
|
412
|
-
cursor: pointer;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
#filters-toggle.active {
|
|
416
|
-
background: #194880;
|
|
417
|
-
color: white;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
#filters-toggle > svg {
|
|
421
|
-
width: 12px;
|
|
422
|
-
filter: invert(0.16667);
|
|
423
|
-
vertical-align: -1px;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
#filters-toggle.active > svg {
|
|
427
|
-
filter: invert(1);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
#filters-label {
|
|
431
|
-
font-size: 1.4rem;
|
|
432
|
-
font-weight: var(--smartFacetLabelFontWeight, normal);
|
|
433
|
-
margin: 0 -5px 0 0;
|
|
434
|
-
}
|
|
435
|
-
`;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { css, html, LitElement, CSSResultGroup, nothing } from 'lit';
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
-
import {
|
|
4
|
-
mediatypeConfig,
|
|
5
|
-
MediatypeConfigKey,
|
|
6
|
-
} from '../../mediatype/mediatype-config';
|
|
7
|
-
import type { SmartFacet, SmartFacetEvent } from './models';
|
|
8
|
-
|
|
9
|
-
import closeCircleDark from '../../assets/img/icons/close-circle-dark';
|
|
10
|
-
|
|
11
|
-
function capitalize(str?: string): string | undefined {
|
|
12
|
-
if (!str) return str;
|
|
13
|
-
return str.charAt(0).toLocaleUpperCase() + str.slice(1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@customElement('smart-facet-button')
|
|
17
|
-
export class SmartFacetButton extends LitElement {
|
|
18
|
-
@property({ type: Object }) facetInfo?: SmartFacet;
|
|
19
|
-
|
|
20
|
-
@property({ type: String }) labelPrefix?: string;
|
|
21
|
-
|
|
22
|
-
@property({ type: Boolean }) selected = false;
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
// COMPONENT LIFECYCLE METHODS
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
render() {
|
|
29
|
-
if (!this.facetInfo) return nothing;
|
|
30
|
-
|
|
31
|
-
const isSingleFacet = this.facetInfo.facets.length === 1;
|
|
32
|
-
const firstFacet = this.facetInfo.facets[0];
|
|
33
|
-
|
|
34
|
-
const displayText = capitalize(
|
|
35
|
-
(this.labelPrefix ? `${this.labelPrefix} ` : '') +
|
|
36
|
-
(this.facetInfo.label ??
|
|
37
|
-
firstFacet.displayText ??
|
|
38
|
-
firstFacet.bucketKey),
|
|
39
|
-
);
|
|
40
|
-
if (!displayText) return nothing;
|
|
41
|
-
|
|
42
|
-
const icon =
|
|
43
|
-
isSingleFacet && firstFacet.facetType === 'mediatype'
|
|
44
|
-
? mediatypeConfig[firstFacet.bucketKey as MediatypeConfigKey].icon
|
|
45
|
-
: nothing;
|
|
46
|
-
|
|
47
|
-
return html`
|
|
48
|
-
<a
|
|
49
|
-
class="smart-facet-button ${this.selected ? 'selected' : ''}"
|
|
50
|
-
href=${this.href}
|
|
51
|
-
@click=${this.facetClicked}
|
|
52
|
-
>
|
|
53
|
-
${icon} ${displayText}
|
|
54
|
-
${this.selected
|
|
55
|
-
? html`<span class="unselect-button">${closeCircleDark}</span>`
|
|
56
|
-
: nothing}
|
|
57
|
-
</a>
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//
|
|
62
|
-
// OTHER METHODS
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
private get href(): string {
|
|
66
|
-
const url = new URL(window.location.href);
|
|
67
|
-
if (this.facetInfo) {
|
|
68
|
-
for (const facet of this.facetInfo.facets) {
|
|
69
|
-
url.searchParams.append(
|
|
70
|
-
'and[]',
|
|
71
|
-
encodeURIComponent(`${facet.facetType}:"${facet.bucketKey}"`),
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return url.toString();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private facetClicked(e: Event): void {
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
if (!this.facetInfo) return;
|
|
81
|
-
|
|
82
|
-
this.selected = !this.selected;
|
|
83
|
-
|
|
84
|
-
this.dispatchEvent(
|
|
85
|
-
new CustomEvent<SmartFacetEvent>('facetClick', {
|
|
86
|
-
detail: {
|
|
87
|
-
smartFacet: this.facetInfo,
|
|
88
|
-
details: this.facetInfo.facets.map(f => ({
|
|
89
|
-
facetType: f.facetType,
|
|
90
|
-
bucket: {
|
|
91
|
-
key: f.bucketKey,
|
|
92
|
-
count: 0,
|
|
93
|
-
state: this.selected ? 'selected' : 'none',
|
|
94
|
-
},
|
|
95
|
-
negative: false,
|
|
96
|
-
})),
|
|
97
|
-
},
|
|
98
|
-
}),
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//
|
|
103
|
-
// STYLES
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
static get styles(): CSSResultGroup {
|
|
107
|
-
return css`
|
|
108
|
-
.smart-facet-button {
|
|
109
|
-
display: inline-flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
column-gap: 5px;
|
|
112
|
-
padding: 5px 5px;
|
|
113
|
-
border-radius: 5px;
|
|
114
|
-
background: white;
|
|
115
|
-
color: #2c2c2c;
|
|
116
|
-
border: 1px solid #194880;
|
|
117
|
-
font-size: 1.4rem;
|
|
118
|
-
font-family: inherit;
|
|
119
|
-
line-height: normal;
|
|
120
|
-
text-decoration: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.smart-facet-button.selected {
|
|
124
|
-
background: #194880;
|
|
125
|
-
color: white;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.unselect-button > svg {
|
|
129
|
-
width: 10px;
|
|
130
|
-
height: 10px;
|
|
131
|
-
filter: invert(1);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.smart-facet-button > svg {
|
|
135
|
-
width: 12px;
|
|
136
|
-
height: 12px;
|
|
137
|
-
filter: invert(0.16667);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.smart-facet-button.selected > svg {
|
|
141
|
-
filter: invert(1);
|
|
142
|
-
}
|
|
143
|
-
`;
|
|
144
|
-
}
|
|
145
|
-
}
|