@internetarchive/collection-browser 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +4 -4
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/index.d.ts +16 -0
- package/dist/index.js.map +1 -0
- package/dist/src/app-root.d.ts +105 -0
- package/dist/src/app-root.js +1076 -0
- package/dist/src/app-root.js.map +1 -0
- package/dist/src/assets/img/icons/arrow-left.d.ts +2 -0
- package/dist/src/assets/img/icons/arrow-left.js +10 -0
- package/dist/src/assets/img/icons/arrow-left.js.map +1 -0
- package/dist/src/assets/img/icons/arrow-right.d.ts +2 -0
- package/dist/src/assets/img/icons/arrow-right.js +10 -0
- package/dist/src/assets/img/icons/arrow-right.js.map +1 -0
- package/dist/src/assets/img/icons/chevron.d.ts +2 -0
- package/dist/src/assets/img/icons/chevron.js +4 -0
- package/dist/src/assets/img/icons/chevron.js.map +1 -0
- package/dist/src/assets/img/icons/close-circle-dark.d.ts +2 -0
- package/dist/src/assets/img/icons/close-circle-dark.js +5 -0
- package/dist/src/assets/img/icons/close-circle-dark.js.map +1 -0
- package/dist/src/assets/img/icons/contract.d.ts +2 -0
- package/dist/src/assets/img/icons/contract.js +9 -0
- package/dist/src/assets/img/icons/contract.js.map +1 -0
- package/dist/src/assets/img/icons/empty-query.d.ts +2 -0
- package/dist/src/assets/img/icons/empty-query.js +5 -0
- package/dist/src/assets/img/icons/empty-query.js.map +1 -0
- package/dist/src/assets/img/icons/expand.d.ts +2 -0
- package/dist/src/assets/img/icons/expand.js +9 -0
- package/dist/src/assets/img/icons/expand.js.map +1 -0
- package/dist/src/assets/img/icons/eye-closed.d.ts +2 -0
- package/dist/src/assets/img/icons/eye-closed.js +5 -0
- package/dist/src/assets/img/icons/eye-closed.js.map +1 -0
- package/dist/src/assets/img/icons/eye.d.ts +2 -0
- package/dist/src/assets/img/icons/eye.js +5 -0
- package/dist/src/assets/img/icons/eye.js.map +1 -0
- package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -0
- package/dist/src/assets/img/icons/favorite-filled.js +10 -0
- package/dist/src/assets/img/icons/favorite-filled.js.map +1 -0
- package/dist/src/assets/img/icons/favorite-unfilled.d.ts +1 -0
- package/dist/src/assets/img/icons/favorite-unfilled.js +9 -0
- package/dist/src/assets/img/icons/favorite-unfilled.js.map +1 -0
- package/dist/src/assets/img/icons/filter.d.ts +2 -0
- package/dist/src/assets/img/icons/filter.js +10 -0
- package/dist/src/assets/img/icons/filter.js.map +1 -0
- package/dist/src/assets/img/icons/login-required.d.ts +1 -0
- package/dist/src/assets/img/icons/login-required.js +18 -0
- package/dist/src/assets/img/icons/login-required.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/account.js +14 -0
- package/dist/src/assets/img/icons/mediatype/account.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/audio.js +14 -0
- package/dist/src/assets/img/icons/mediatype/audio.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/collection.js +12 -0
- package/dist/src/assets/img/icons/mediatype/collection.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/data.js +15 -0
- package/dist/src/assets/img/icons/mediatype/data.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/etree.js +14 -0
- package/dist/src/assets/img/icons/mediatype/etree.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/film.js +14 -0
- package/dist/src/assets/img/icons/mediatype/film.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/images.js +13 -0
- package/dist/src/assets/img/icons/mediatype/images.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/radio.js +15 -0
- package/dist/src/assets/img/icons/mediatype/radio.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/search.js +14 -0
- package/dist/src/assets/img/icons/mediatype/search.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/software.js +13 -0
- package/dist/src/assets/img/icons/mediatype/software.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/texts.js +13 -0
- package/dist/src/assets/img/icons/mediatype/texts.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-commercial.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-commercial.js +12 -0
- package/dist/src/assets/img/icons/mediatype/tv-commercial.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.js +12 -0
- package/dist/src/assets/img/icons/mediatype/tv-fact-check.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-quote.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/tv-quote.js +12 -0
- package/dist/src/assets/img/icons/mediatype/tv-quote.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/tv.js +14 -0
- package/dist/src/assets/img/icons/mediatype/tv.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/video.js +14 -0
- package/dist/src/assets/img/icons/mediatype/video.js.map +1 -0
- package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -0
- package/dist/src/assets/img/icons/mediatype/web.js +13 -0
- package/dist/src/assets/img/icons/mediatype/web.js.map +1 -0
- package/dist/src/assets/img/icons/null-result.d.ts +2 -0
- package/dist/src/assets/img/icons/null-result.js +5 -0
- package/dist/src/assets/img/icons/null-result.js.map +1 -0
- package/dist/src/assets/img/icons/quote.d.ts +1 -0
- package/dist/src/assets/img/icons/quote.js +7 -0
- package/dist/src/assets/img/icons/quote.js.map +1 -0
- package/dist/src/assets/img/icons/restricted.d.ts +1 -0
- package/dist/src/assets/img/icons/restricted.js +13 -0
- package/dist/src/assets/img/icons/restricted.js.map +1 -0
- package/dist/src/assets/img/icons/reviews.d.ts +1 -0
- package/dist/src/assets/img/icons/reviews.js +11 -0
- package/dist/src/assets/img/icons/reviews.js.map +1 -0
- package/dist/src/assets/img/icons/upload.d.ts +1 -0
- package/dist/src/assets/img/icons/upload.js +12 -0
- package/dist/src/assets/img/icons/upload.js.map +1 -0
- package/dist/src/assets/img/icons/views.d.ts +1 -0
- package/dist/src/assets/img/icons/views.js +11 -0
- package/dist/src/assets/img/icons/views.js.map +1 -0
- package/dist/src/circular-activity-indicator.d.ts +5 -0
- package/dist/src/circular-activity-indicator.js +66 -0
- package/dist/src/circular-activity-indicator.js.map +1 -0
- package/dist/src/collection-browser.d.ts +684 -0
- package/dist/src/collection-browser.js +2567 -0
- package/dist/src/collection-browser.js.map +1 -0
- package/dist/src/collection-facets/facet-row.d.ts +30 -0
- package/dist/src/collection-facets/facet-row.js +265 -0
- package/dist/src/collection-facets/facet-row.js.map +1 -0
- package/dist/src/collection-facets/facet-tombstone-row.d.ts +5 -0
- package/dist/src/collection-facets/facet-tombstone-row.js +43 -0
- package/dist/src/collection-facets/facet-tombstone-row.js.map +1 -0
- package/dist/src/collection-facets/facets-template.d.ts +13 -0
- package/dist/src/collection-facets/facets-template.js +68 -0
- package/dist/src/collection-facets/facets-template.js.map +1 -0
- package/dist/src/collection-facets/models.d.ts +9 -0
- package/dist/src/collection-facets/models.js +10 -0
- package/dist/src/collection-facets/models.js.map +1 -0
- package/dist/src/collection-facets/more-facets-content.d.ts +109 -0
- package/dist/src/collection-facets/more-facets-content.js +547 -0
- package/dist/src/collection-facets/more-facets-content.js.map +1 -0
- package/dist/src/collection-facets/more-facets-pagination.d.ts +36 -0
- package/dist/src/collection-facets/more-facets-pagination.js +264 -0
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/dedupe.d.ts +10 -0
- package/dist/src/collection-facets/smart-facets/dedupe.js +35 -0
- package/dist/src/collection-facets/smart-facets/dedupe.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.d.ts +5 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js +24 -0
- package/dist/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/index.d.ts +3 -0
- package/dist/src/collection-facets/smart-facets/heuristics/index.js +4 -0
- package/dist/src/collection-facets/smart-facets/heuristics/index.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.d.ts +4 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js +14 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.d.ts +6 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js +68 -0
- package/dist/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.d.ts +9 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js +69 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.d.ts +21 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js +76 -0
- package/dist/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/models.d.ts +30 -0
- package/dist/src/collection-facets/smart-facets/models.js +2 -0
- package/dist/src/collection-facets/smart-facets/models.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.d.ts +54 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +383 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +11 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js +133 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-button.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +28 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js +172 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.d.ts +2 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js +13 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-equals.js.map +1 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.d.ts +5 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js +18 -0
- package/dist/src/collection-facets/smart-facets/smart-facet-heuristics.js.map +1 -0
- package/dist/src/collection-facets/toggle-switch.d.ts +41 -0
- package/dist/src/collection-facets/toggle-switch.js +174 -0
- package/dist/src/collection-facets/toggle-switch.js.map +1 -0
- package/dist/src/collection-facets.d.ts +113 -0
- package/dist/src/collection-facets.js +872 -0
- package/dist/src/collection-facets.js.map +1 -0
- package/dist/src/data-source/collection-browser-data-source-interface.d.ts +261 -0
- package/dist/src/data-source/collection-browser-data-source-interface.js +2 -0
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -0
- package/dist/src/data-source/collection-browser-data-source.d.ts +400 -0
- package/dist/src/data-source/collection-browser-data-source.js +1103 -0
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -0
- package/dist/src/data-source/collection-browser-query-state.d.ts +49 -0
- package/dist/src/data-source/collection-browser-query-state.js +2 -0
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -0
- package/dist/src/data-source/models.d.ts +32 -0
- package/dist/src/data-source/models.js +9 -0
- package/dist/src/data-source/models.js.map +1 -0
- package/dist/src/empty-placeholder.d.ts +23 -0
- package/dist/src/empty-placeholder.js +165 -0
- package/dist/src/empty-placeholder.js.map +1 -0
- package/dist/src/expanded-date-picker.d.ts +50 -0
- package/dist/src/expanded-date-picker.js +182 -0
- package/dist/src/expanded-date-picker.js.map +1 -0
- package/dist/src/language-code-handler/language-code-handler.d.ts +37 -0
- package/dist/src/language-code-handler/language-code-handler.js +27 -0
- package/dist/src/language-code-handler/language-code-handler.js.map +1 -0
- package/dist/src/language-code-handler/language-code-mapping.d.ts +1 -0
- package/dist/src/language-code-handler/language-code-mapping.js +563 -0
- package/dist/src/language-code-handler/language-code-mapping.js.map +1 -0
- package/dist/src/manage/manage-bar.d.ts +58 -0
- package/dist/src/manage/manage-bar.js +237 -0
- package/dist/src/manage/manage-bar.js.map +1 -0
- package/dist/src/manage/remove-items-modal-content.d.ts +9 -0
- package/dist/src/manage/remove-items-modal-content.js +104 -0
- package/dist/src/manage/remove-items-modal-content.js.map +1 -0
- package/dist/src/mediatype/mediatype-config.d.ts +11 -0
- package/dist/src/mediatype/mediatype-config.js +116 -0
- package/dist/src/mediatype/mediatype-config.js.map +1 -0
- package/dist/src/models.d.ts +302 -0
- package/dist/src/models.js +511 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/restoration-state-handler.d.ts +75 -0
- package/dist/src/restoration-state-handler.js +403 -0
- package/dist/src/restoration-state-handler.js.map +1 -0
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +6 -0
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.js +60 -0
- package/dist/src/sort-filter-bar/alpha-bar-tooltip.js.map +1 -0
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +21 -0
- package/dist/src/sort-filter-bar/alpha-bar.js +241 -0
- package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -0
- package/dist/src/sort-filter-bar/img/compact.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/compact.js +5 -0
- package/dist/src/sort-filter-bar/img/compact.js.map +1 -0
- package/dist/src/sort-filter-bar/img/list.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/list.js +5 -0
- package/dist/src/sort-filter-bar/img/list.js.map +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js +15 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-disabled.js.map +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-down.js +17 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-down.js.map +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-up.js +17 -0
- package/dist/src/sort-filter-bar/img/sort-toggle-up.js.map +1 -0
- package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/sort-triangle.js +5 -0
- package/dist/src/sort-filter-bar/img/sort-triangle.js.map +1 -0
- package/dist/src/sort-filter-bar/img/tile.d.ts +1 -0
- package/dist/src/sort-filter-bar/img/tile.js +5 -0
- package/dist/src/sort-filter-bar/img/tile.js.map +1 -0
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +278 -0
- package/dist/src/sort-filter-bar/sort-filter-bar.js +1161 -0
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -0
- package/dist/src/styles/ia-button.d.ts +2 -0
- package/dist/src/styles/ia-button.js +134 -0
- package/dist/src/styles/ia-button.js.map +1 -0
- package/dist/src/styles/item-image-styles.d.ts +8 -0
- package/dist/src/styles/item-image-styles.js +123 -0
- package/dist/src/styles/item-image-styles.js.map +1 -0
- package/dist/src/styles/sr-only.d.ts +1 -0
- package/dist/src/styles/sr-only.js +18 -0
- package/dist/src/styles/sr-only.js.map +1 -0
- package/dist/src/tiles/base-tile-component.d.ts +27 -0
- package/dist/src/tiles/base-tile-component.js +82 -0
- package/dist/src/tiles/base-tile-component.js.map +1 -0
- package/dist/src/tiles/collection-browser-loading-tile.d.ts +5 -0
- package/dist/src/tiles/collection-browser-loading-tile.js +29 -0
- package/dist/src/tiles/collection-browser-loading-tile.js.map +1 -0
- package/dist/src/tiles/grid/account-tile.d.ts +18 -0
- package/dist/src/tiles/grid/account-tile.js +111 -0
- package/dist/src/tiles/grid/account-tile.js.map +1 -0
- package/dist/src/tiles/grid/collection-tile.d.ts +15 -0
- package/dist/src/tiles/grid/collection-tile.js +160 -0
- package/dist/src/tiles/grid/collection-tile.js.map +1 -0
- package/dist/src/tiles/grid/item-tile.d.ts +41 -0
- package/dist/src/tiles/grid/item-tile.js +321 -0
- package/dist/src/tiles/grid/item-tile.js.map +1 -0
- package/dist/src/tiles/grid/search-tile.d.ts +10 -0
- package/dist/src/tiles/grid/search-tile.js +95 -0
- package/dist/src/tiles/grid/search-tile.js.map +1 -0
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.d.ts +1 -0
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +128 -0
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -0
- package/dist/src/tiles/grid/tile-stats.d.ts +58 -0
- package/dist/src/tiles/grid/tile-stats.js +204 -0
- package/dist/src/tiles/grid/tile-stats.js.map +1 -0
- package/dist/src/tiles/hover/hover-pane-controller.d.ts +228 -0
- package/dist/src/tiles/hover/hover-pane-controller.js +446 -0
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -0
- package/dist/src/tiles/hover/tile-hover-pane.d.ts +20 -0
- package/dist/src/tiles/hover/tile-hover-pane.js +185 -0
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -0
- package/dist/src/tiles/image-block.d.ts +19 -0
- package/dist/src/tiles/image-block.js +175 -0
- package/dist/src/tiles/image-block.js.map +1 -0
- package/dist/src/tiles/item-image.d.ts +40 -0
- package/dist/src/tiles/item-image.js +191 -0
- package/dist/src/tiles/item-image.js.map +1 -0
- package/dist/src/tiles/list/tile-list-compact-header.d.ts +6 -0
- package/dist/src/tiles/list/tile-list-compact-header.js +85 -0
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -0
- package/dist/src/tiles/list/tile-list-compact.d.ts +19 -0
- package/dist/src/tiles/list/tile-list-compact.js +223 -0
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -0
- package/dist/src/tiles/list/tile-list.d.ts +54 -0
- package/dist/src/tiles/list/tile-list.js +621 -0
- package/dist/src/tiles/list/tile-list.js.map +1 -0
- package/dist/src/tiles/models.d.ts +1 -0
- package/dist/src/tiles/models.js +2 -0
- package/dist/src/tiles/models.js.map +1 -0
- package/dist/src/tiles/overlay/icon-overlay.d.ts +8 -0
- package/dist/src/tiles/overlay/icon-overlay.js +55 -0
- package/dist/src/tiles/overlay/icon-overlay.js.map +1 -0
- package/dist/src/tiles/overlay/text-overlay.d.ts +9 -0
- package/dist/src/tiles/overlay/text-overlay.js +74 -0
- package/dist/src/tiles/overlay/text-overlay.js.map +1 -0
- package/dist/src/tiles/review-block.d.ts +12 -0
- package/dist/src/tiles/review-block.js +134 -0
- package/dist/src/tiles/review-block.js.map +1 -0
- package/dist/src/tiles/text-snippet-block.d.ts +27 -0
- package/dist/src/tiles/text-snippet-block.js +132 -0
- package/dist/src/tiles/text-snippet-block.js.map +1 -0
- package/dist/src/tiles/tile-dispatcher.d.ts +71 -0
- package/dist/src/tiles/tile-dispatcher.js +472 -0
- package/dist/src/tiles/tile-dispatcher.js.map +1 -0
- package/dist/src/tiles/tile-display-value-provider.d.ts +47 -0
- package/dist/src/tiles/tile-display-value-provider.js +95 -0
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -0
- package/dist/src/tiles/tile-mediatype-icon.d.ts +27 -0
- package/dist/src/tiles/tile-mediatype-icon.js +130 -0
- package/dist/src/tiles/tile-mediatype-icon.js.map +1 -0
- package/dist/src/utils/analytics-events.d.ts +28 -0
- package/dist/src/utils/analytics-events.js +31 -0
- package/dist/src/utils/analytics-events.js.map +1 -0
- package/dist/src/utils/array-equals.d.ts +4 -0
- package/dist/src/utils/array-equals.js +11 -0
- package/dist/src/utils/array-equals.js.map +1 -0
- package/dist/src/utils/collapse-repeated-quotes.d.ts +11 -0
- package/dist/src/utils/collapse-repeated-quotes.js +14 -0
- package/dist/src/utils/collapse-repeated-quotes.js.map +1 -0
- package/dist/src/utils/facet-utils.d.ts +83 -0
- package/dist/src/utils/facet-utils.js +152 -0
- package/dist/src/utils/facet-utils.js.map +1 -0
- package/dist/src/utils/format-count.d.ts +7 -0
- package/dist/src/utils/format-count.js +76 -0
- package/dist/src/utils/format-count.js.map +1 -0
- package/dist/src/utils/format-date.d.ts +16 -0
- package/dist/src/utils/format-date.js +33 -0
- package/dist/src/utils/format-date.js.map +1 -0
- package/dist/src/utils/format-unit-size.d.ts +2 -0
- package/dist/src/utils/format-unit-size.js +34 -0
- package/dist/src/utils/format-unit-size.js.map +1 -0
- package/dist/src/utils/local-date-from-utc.d.ts +9 -0
- package/dist/src/utils/local-date-from-utc.js +16 -0
- package/dist/src/utils/local-date-from-utc.js.map +1 -0
- package/dist/src/utils/log.d.ts +7 -0
- package/dist/src/utils/log.js +14 -0
- package/dist/src/utils/log.js.map +1 -0
- package/dist/src/utils/resolve-mediatype.d.ts +8 -0
- package/dist/src/utils/resolve-mediatype.js +24 -0
- package/dist/src/utils/resolve-mediatype.js.map +1 -0
- package/dist/src/utils/sha1.d.ts +2 -0
- package/dist/src/utils/sha1.js +9 -0
- package/dist/src/utils/sha1.js.map +1 -0
- package/dist/test/collection-browser.test.d.ts +1 -0
- package/dist/test/collection-browser.test.js +1711 -0
- package/dist/test/collection-browser.test.js.map +1 -0
- package/dist/test/collection-facets/facet-row.test.d.ts +1 -0
- package/dist/test/collection-facets/facet-row.test.js +274 -0
- package/dist/test/collection-facets/facet-row.test.js.map +1 -0
- package/dist/test/collection-facets/facets-template.test.d.ts +1 -0
- package/dist/test/collection-facets/facets-template.test.js +101 -0
- package/dist/test/collection-facets/facets-template.test.js.map +1 -0
- package/dist/test/collection-facets/more-facets-content.test.d.ts +1 -0
- package/dist/test/collection-facets/more-facets-content.test.js +169 -0
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -0
- package/dist/test/collection-facets/more-facets-pagination.test.d.ts +1 -0
- package/dist/test/collection-facets/more-facets-pagination.test.js +132 -0
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -0
- package/dist/test/collection-facets/toggle-switch.test.d.ts +1 -0
- package/dist/test/collection-facets/toggle-switch.test.js +96 -0
- package/dist/test/collection-facets/toggle-switch.test.js.map +1 -0
- package/dist/test/collection-facets.test.d.ts +2 -0
- package/dist/test/collection-facets.test.js +745 -0
- package/dist/test/collection-facets.test.js.map +1 -0
- package/dist/test/data-source/collection-browser-data-source.test.d.ts +1 -0
- package/dist/test/data-source/collection-browser-data-source.test.js +102 -0
- package/dist/test/data-source/collection-browser-data-source.test.js.map +1 -0
- package/dist/test/empty-placeholder.test.d.ts +1 -0
- package/dist/test/empty-placeholder.test.js +63 -0
- package/dist/test/empty-placeholder.test.js.map +1 -0
- package/dist/test/expanded-date-picker.test.d.ts +1 -0
- package/dist/test/expanded-date-picker.test.js +130 -0
- package/dist/test/expanded-date-picker.test.js.map +1 -0
- package/dist/test/icon-overlay.test.d.ts +1 -0
- package/dist/test/icon-overlay.test.js +30 -0
- package/dist/test/icon-overlay.test.js.map +1 -0
- package/dist/test/image-block.test.d.ts +1 -0
- package/dist/test/image-block.test.js +218 -0
- package/dist/test/image-block.test.js.map +1 -0
- package/dist/test/item-image.test.d.ts +1 -0
- package/dist/test/item-image.test.js +196 -0
- package/dist/test/item-image.test.js.map +1 -0
- package/dist/test/manage/manage-bar.test.d.ts +2 -0
- package/dist/test/manage/manage-bar.test.js +106 -0
- package/dist/test/manage/manage-bar.test.js.map +1 -0
- package/dist/test/manage/remove-items-modal-content.test.d.ts +1 -0
- package/dist/test/manage/remove-items-modal-content.test.js +65 -0
- package/dist/test/manage/remove-items-modal-content.test.js.map +1 -0
- package/dist/test/mediatype-config.test.d.ts +1 -0
- package/dist/test/mediatype-config.test.js +11 -0
- package/dist/test/mediatype-config.test.js.map +1 -0
- package/dist/test/mocks/mock-analytics-handler.d.ts +10 -0
- package/dist/test/mocks/mock-analytics-handler.js +16 -0
- package/dist/test/mocks/mock-analytics-handler.js.map +1 -0
- package/dist/test/mocks/mock-search-responses.d.ts +31 -0
- package/dist/test/mocks/mock-search-responses.js +1241 -0
- package/dist/test/mocks/mock-search-responses.js.map +1 -0
- package/dist/test/mocks/mock-search-service.d.ts +16 -0
- package/dist/test/mocks/mock-search-service.js +65 -0
- package/dist/test/mocks/mock-search-service.js.map +1 -0
- package/dist/test/restoration-state-handler.test.d.ts +1 -0
- package/dist/test/restoration-state-handler.test.js +375 -0
- package/dist/test/restoration-state-handler.test.js.map +1 -0
- package/dist/test/review-block.test.d.ts +1 -0
- package/dist/test/review-block.test.js +48 -0
- package/dist/test/review-block.test.js.map +1 -0
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +1 -0
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +13 -0
- package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +1 -0
- package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +1 -0
- package/dist/test/sort-filter-bar/alpha-bar.test.js +74 -0
- package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -0
- package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +1 -0
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +609 -0
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -0
- package/dist/test/text-overlay.test.d.ts +1 -0
- package/dist/test/text-overlay.test.js +42 -0
- package/dist/test/text-overlay.test.js.map +1 -0
- package/dist/test/text-snippet-block.test.d.ts +1 -0
- package/dist/test/text-snippet-block.test.js +63 -0
- package/dist/test/text-snippet-block.test.js.map +1 -0
- package/dist/test/tile-stats.test.d.ts +1 -0
- package/dist/test/tile-stats.test.js +128 -0
- package/dist/test/tile-stats.test.js.map +1 -0
- package/dist/test/tiles/grid/account-tile.test.d.ts +1 -0
- package/dist/test/tiles/grid/account-tile.test.js +96 -0
- package/dist/test/tiles/grid/account-tile.test.js.map +1 -0
- package/dist/test/tiles/grid/collection-tile.test.d.ts +1 -0
- package/dist/test/tiles/grid/collection-tile.test.js +96 -0
- package/dist/test/tiles/grid/collection-tile.test.js.map +1 -0
- package/dist/test/tiles/grid/item-tile.test.d.ts +1 -0
- package/dist/test/tiles/grid/item-tile.test.js +427 -0
- package/dist/test/tiles/grid/item-tile.test.js.map +1 -0
- package/dist/test/tiles/grid/search-tile.test.d.ts +1 -0
- package/dist/test/tiles/grid/search-tile.test.js +66 -0
- package/dist/test/tiles/grid/search-tile.test.js.map +1 -0
- package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +1 -0
- package/dist/test/tiles/hover/hover-pane-controller.test.js +329 -0
- package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -0
- package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +1 -0
- package/dist/test/tiles/hover/tile-hover-pane.test.js +57 -0
- package/dist/test/tiles/hover/tile-hover-pane.test.js.map +1 -0
- package/dist/test/tiles/list/tile-list-compact.test.d.ts +1 -0
- package/dist/test/tiles/list/tile-list-compact.test.js +251 -0
- package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -0
- package/dist/test/tiles/list/tile-list.test.d.ts +1 -0
- package/dist/test/tiles/list/tile-list.test.js +469 -0
- package/dist/test/tiles/list/tile-list.test.js.map +1 -0
- package/dist/test/tiles/tile-dispatcher.test.d.ts +1 -0
- package/dist/test/tiles/tile-dispatcher.test.js +231 -0
- package/dist/test/tiles/tile-dispatcher.test.js.map +1 -0
- package/dist/test/tiles/tile-display-value-provider.test.d.ts +1 -0
- package/dist/test/tiles/tile-display-value-provider.test.js +142 -0
- package/dist/test/tiles/tile-display-value-provider.test.js.map +1 -0
- package/dist/test/tiles/tile-mediatype-icon.test.d.ts +1 -0
- package/dist/test/tiles/tile-mediatype-icon.test.js +145 -0
- package/dist/test/tiles/tile-mediatype-icon.test.js.map +1 -0
- package/dist/test/utils/array-equals.test.d.ts +1 -0
- package/dist/test/utils/array-equals.test.js +27 -0
- package/dist/test/utils/array-equals.test.js.map +1 -0
- package/dist/test/utils/format-count.test.d.ts +1 -0
- package/dist/test/utils/format-count.test.js +24 -0
- package/dist/test/utils/format-count.test.js.map +1 -0
- package/dist/test/utils/format-date.test.d.ts +1 -0
- package/dist/test/utils/format-date.test.js +61 -0
- package/dist/test/utils/format-date.test.js.map +1 -0
- package/dist/test/utils/format-unit-size.test.d.ts +1 -0
- package/dist/test/utils/format-unit-size.test.js +18 -0
- package/dist/test/utils/format-unit-size.test.js.map +1 -0
- package/dist/test/utils/local-date-from-utc.test.d.ts +1 -0
- package/dist/test/utils/local-date-from-utc.test.js +27 -0
- package/dist/test/utils/local-date-from-utc.test.js.map +1 -0
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +118 -117
- package/renovate.json +6 -6
- package/src/collection-browser.ts +2829 -2829
- package/src/collection-facets/more-facets-content.ts +639 -639
- package/src/collection-facets.ts +994 -995
- package/src/data-source/collection-browser-data-source.ts +1401 -1401
- package/src/data-source/collection-browser-query-state.ts +65 -65
- package/src/data-source/models.ts +43 -43
- package/src/tiles/base-tile-component.ts +65 -65
- package/src/tiles/grid/account-tile.ts +113 -113
- package/src/tiles/grid/collection-tile.ts +163 -163
- package/src/tiles/grid/item-tile.ts +340 -340
- package/src/tiles/hover/hover-pane-controller.ts +613 -517
- package/src/tiles/hover/tile-hover-pane.ts +184 -180
- package/src/tiles/list/tile-list-compact.ts +239 -239
- package/src/tiles/list/tile-list.ts +700 -700
- package/src/tiles/tile-dispatcher.ts +517 -490
- package/src/utils/format-date.ts +62 -62
- package/test/collection-browser.test.ts +2403 -2403
- package/test/tiles/grid/item-tile.test.ts +520 -520
- package/test/tiles/hover/hover-pane-controller.test.ts +418 -353
- package/test/tiles/list/tile-list-compact.test.ts +282 -282
- package/test/tiles/list/tile-list.test.ts +552 -552
- package/test/tiles/tile-dispatcher.test.ts +283 -187
- package/test/utils/format-date.test.ts +89 -89
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-facets.js","sourceRoot":"","sources":["../../src/collection-facets.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EAEV,OAAO,GAER,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AASvD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EACL,WAAW,GAEZ,MAAM,gCAAgC,CAAC;AASxC,OAAO,WAAW,MAAM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AAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;0DACA;AAG7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;0DACA;AAG7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;0DACT;AAGpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;0DACT;AAE3B;IAAR,KAAK,EAAE;oDAWN;AApFS,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAu5B5B","sourcesContent":["import {\r\n css,\r\n html,\r\n LitElement,\r\n PropertyValues,\r\n nothing,\r\n TemplateResult,\r\n} from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { map } from 'lit/directives/map.js';\r\nimport { ref } from 'lit/directives/ref.js';\r\nimport { msg } from '@lit/localize';\r\nimport { classMap } from 'lit/directives/class-map.js';\r\nimport {\r\n Aggregation,\r\n AggregationSortType,\r\n Bucket,\r\n FilterMap,\r\n SearchServiceInterface,\r\n SearchType,\r\n} from '@internetarchive/search-service';\r\nimport '@internetarchive/histogram-date-range';\r\nimport '@internetarchive/feature-feedback';\r\nimport {\r\n ModalConfig,\r\n ModalManagerInterface,\r\n} from '@internetarchive/modal-manager';\r\nimport type { FeatureFeedbackServiceInterface } from '@internetarchive/feature-feedback';\r\nimport type { RecaptchaManagerInterface } from '@internetarchive/recaptcha-manager';\r\nimport type { AnalyticsManagerInterface } from '@internetarchive/analytics-manager';\r\nimport type { SharedResizeObserverInterface } from '@internetarchive/shared-resize-observer';\r\nimport type {\r\n BarScalingOption,\r\n BinSnappingInterval,\r\n} from '@internetarchive/histogram-date-range';\r\nimport chevronIcon from './assets/img/icons/chevron';\r\nimport expandIcon from './assets/img/icons/expand';\r\nimport {\r\n FacetOption,\r\n SelectedFacets,\r\n FacetGroup,\r\n FacetBucket,\r\n defaultFacetDisplayOrder,\r\n facetTitles,\r\n lendingFacetDisplayNames,\r\n lendingFacetKeysVisibility,\r\n LendingFacetKey,\r\n suppressedCollections,\r\n defaultFacetSort,\r\n FacetEventDetails,\r\n} from './models';\r\nimport type {\r\n CollectionTitles,\r\n PageSpecifierParams,\r\n TVChannelAliases,\r\n} from './data-source/models';\r\nimport {\r\n analyticsActions,\r\n analyticsCategories,\r\n} from './utils/analytics-events';\r\nimport { srOnlyStyle } from './styles/sr-only';\r\nimport { ExpandedDatePicker } from './expanded-date-picker';\r\nimport {\r\n sortBucketsBySelectionState,\r\n updateSelectedFacetBucket,\r\n} from './utils/facet-utils';\r\n\r\nimport '@internetarchive/histogram-date-range';\r\nimport './collection-facets/more-facets-content';\r\nimport './collection-facets/facets-template';\r\nimport './collection-facets/facet-tombstone-row';\r\nimport './expanded-date-picker';\r\n\r\n@customElement('collection-facets')\r\nexport class CollectionFacets extends LitElement {\r\n @property({ type: Object }) searchService?: SearchServiceInterface;\r\n\r\n @property({ type: Number }) searchType?: SearchType;\r\n\r\n @property({ type: Object }) aggregations?: Record<string, Aggregation>;\r\n\r\n @property({ type: Object }) histogramAggregation?: Aggregation;\r\n\r\n @property({ type: String }) minSelectedDate?: string;\r\n\r\n @property({ type: String }) maxSelectedDate?: string;\r\n\r\n @property({ type: Boolean }) moreLinksVisible = true;\r\n\r\n @property({ type: Boolean }) facetsLoading = false;\r\n\r\n @property({ type: Boolean }) histogramAggregationLoading = false;\r\n\r\n @property({ type: Object }) selectedFacets?: SelectedFacets;\r\n\r\n @property({ type: Boolean }) collapsableFacets = false;\r\n\r\n @property({ type: Number }) contentWidth?: number;\r\n\r\n @property({ type: Boolean }) showHistogramDatePicker = false;\r\n\r\n @property({ type: Boolean }) allowExpandingDatePicker = false;\r\n\r\n @property({ type: Boolean }) suppressMediatypeFacets = false;\r\n\r\n @property({ type: String }) query?: string;\r\n\r\n @property({ type: Array }) identifiers?: string[];\r\n\r\n @property({ type: Object }) pageSpecifierParams?: PageSpecifierParams;\r\n\r\n @property({ type: Array }) parentCollections: string[] = [];\r\n\r\n @property({ type: Object }) filterMap?: FilterMap;\r\n\r\n @property({ type: String }) baseNavigationUrl?: string;\r\n\r\n @property({ type: String }) collectionPagePath: string = '/details/';\r\n\r\n @property({ type: Boolean }) isManageView = false;\r\n\r\n @property({ type: Boolean }) isTvSearch = false;\r\n\r\n @property({ type: Array }) facetDisplayOrder: FacetOption[] =\r\n defaultFacetDisplayOrder;\r\n\r\n @property({ type: Object, attribute: false })\r\n modalManager?: ModalManagerInterface;\r\n\r\n @property({ type: Object, attribute: false })\r\n resizeObserver?: SharedResizeObserverInterface;\r\n\r\n @property({ type: Object, attribute: false })\r\n featureFeedbackService?: FeatureFeedbackServiceInterface;\r\n\r\n @property({ type: Object, attribute: false })\r\n recaptchaManager?: RecaptchaManagerInterface;\r\n\r\n @property({ type: Object, attribute: false })\r\n analyticsHandler?: AnalyticsManagerInterface;\r\n\r\n @property({ type: Object, attribute: false })\r\n collectionTitles?: CollectionTitles;\r\n\r\n @property({ type: Object, attribute: false })\r\n tvChannelAliases?: TVChannelAliases;\r\n\r\n @state() openFacets: Record<FacetOption, boolean> = {\r\n subject: false,\r\n lending: false,\r\n mediatype: false,\r\n language: false,\r\n creator: false,\r\n collection: false,\r\n year: false,\r\n program: false,\r\n person: false,\r\n sponsor: false,\r\n };\r\n\r\n /**\r\n * Maximum # of facet buckets to render per facet group\r\n */\r\n private allowedFacetCount = 6;\r\n\r\n render() {\r\n const containerClasses = classMap({\r\n loading: this.facetsLoading,\r\n managing: this.isManageView,\r\n });\r\n\r\n // Added data-testid for Playwright testing\r\n // Using facet-group class and aria-labels is not ideal for Playwright locator\r\n const datePickerLabelId = 'date-picker-label';\r\n return html`\r\n <div id=\"container\" class=${containerClasses}>\r\n ${this.showHistogramDatePicker &&\r\n (this.histogramAggregation || this.histogramAggregationLoading)\r\n ? html`\r\n <section\r\n class=\"facet-group\"\r\n aria-labelledby=${datePickerLabelId}\r\n data-testid=\"facet-group-header-label-date-picker\"\r\n >\r\n <h3 id=${datePickerLabelId}>\r\n Year Published <span class=\"sr-only\">range filter</span>\r\n ${this.expandDatePickerBtnTemplate}\r\n </h3>\r\n ${this.histogramTemplate}\r\n </section>\r\n `\r\n : nothing}\r\n ${this.collectionPartOfTemplate}\r\n ${this.mergedFacets.map(facetGroup =>\r\n this.getFacetGroupTemplate(facetGroup),\r\n )}\r\n </div>\r\n `;\r\n }\r\n\r\n private get collectionPartOfTemplate(): TemplateResult | typeof nothing {\r\n // We only display the \"Part Of\" section on collection pages\r\n if (!this.parentCollections?.length) return nothing;\r\n\r\n // Added data-testid for Playwright testing\r\n // Using className and aria-labels is not ideal for Playwright locator\r\n const headingId = 'partof-heading';\r\n return html`\r\n <section\r\n class=\"facet-group partof-collections\"\r\n aria-labelledby=${headingId}\r\n data-testid=\"facet-group-partof-collections\"\r\n >\r\n <div class=\"facet-group-header\">\r\n <h3 id=${headingId}>${msg('Part Of')}</h3>\r\n </div>\r\n <ul>\r\n ${map(this.parentCollections, collxn => {\r\n const collectionURL = `${this.baseNavigationUrl}${this.collectionPagePath}${collxn}`;\r\n\r\n return html` <li>\r\n <a\r\n href=${collectionURL}\r\n data-id=${collxn}\r\n @click=${this.partOfCollectionClicked}\r\n >\r\n ${this.collectionTitles?.get(collxn) ?? collxn}\r\n </a>\r\n </li>`;\r\n })}\r\n </ul>\r\n </section>\r\n `;\r\n }\r\n\r\n private partOfCollectionClicked(e: Event): void {\r\n this.analyticsHandler?.sendEvent({\r\n category: analyticsCategories.default,\r\n action: analyticsActions.partOfCollectionClicked,\r\n label: (e.target as HTMLElement).dataset.id,\r\n });\r\n }\r\n\r\n /**\r\n * Properties to pass into the date-picker histogram component\r\n */\r\n private get histogramProps() {\r\n const { histogramAggregation: aggregation } = this;\r\n if (!aggregation) return undefined;\r\n\r\n // Normalize some properties from the raw aggregation\r\n const firstYear =\r\n aggregation.first_bucket_year ?? aggregation.first_bucket_key;\r\n const lastYear =\r\n aggregation.last_bucket_year ?? aggregation.last_bucket_key;\r\n if (firstYear == null || lastYear == null) return undefined; // We at least need a start/end year defined\r\n\r\n const firstMonth = aggregation.first_bucket_month ?? 1;\r\n const lastMonth = aggregation.last_bucket_month ?? 12;\r\n\r\n const yearInterval = aggregation.interval ?? 1;\r\n const monthInterval = aggregation.interval_in_months ?? 12;\r\n\r\n const zeroPadMonth = (month: number) => month.toString().padStart(2, '0');\r\n\r\n // The date picker is configured differently for TV search, allowing month-level resolution\r\n if (this.isTvSearch) {\r\n // Whether the bucket interval is less than a year\r\n // (i.e., requires individual months to be handled & labeled)\r\n const mustHandleMonths = monthInterval < 12;\r\n\r\n return {\r\n buckets: aggregation.buckets as number[],\r\n dateFormat: 'YYYY-MM',\r\n tooltipDateFormat: mustHandleMonths ? 'MMM YYYY' : 'YYYY',\r\n tooltipLabel: 'broadcast',\r\n binSnapping: (mustHandleMonths\r\n ? 'month'\r\n : 'year') as BinSnappingInterval,\r\n barScaling: 'linear' as BarScalingOption,\r\n minDate: `${firstYear}-${zeroPadMonth(firstMonth)}`,\r\n maxDate: `${lastYear}-${zeroPadMonth(lastMonth + monthInterval - 1)}`,\r\n };\r\n }\r\n\r\n // All other search types use the same configuration\r\n return {\r\n buckets: aggregation.buckets as number[],\r\n dateFormat: 'YYYY',\r\n tooltipDateFormat: 'YYYY',\r\n tooltipLabel: 'item',\r\n binSnapping: 'year' as BinSnappingInterval,\r\n barScaling: 'logarithmic' as BarScalingOption,\r\n minDate: `${firstYear}`,\r\n maxDate: `${lastYear + yearInterval - 1}`,\r\n };\r\n }\r\n\r\n /**\r\n * Opens a modal dialog containing an enlarged version of the date picker.\r\n */\r\n private showDatePickerModal(): void {\r\n const { histogramProps } = this;\r\n if (!histogramProps) return;\r\n\r\n const {\r\n buckets,\r\n dateFormat,\r\n tooltipDateFormat,\r\n tooltipLabel,\r\n binSnapping,\r\n barScaling,\r\n minDate,\r\n maxDate,\r\n } = histogramProps;\r\n\r\n // Because the modal manager does not clear its DOM content after being closed,\r\n // it may try to render the exact same date picker template when it is reopened.\r\n // And because it isn't actually a descendent of this collection-facets component,\r\n // changes to the template defined here may not trigger a reactive update to the date\r\n // picker, resulting in it displaying a stale date range.\r\n // This ref callback ensures that every time the date picker modal is opened, it will\r\n // always propagate the most recent date range into the date picker regardless of\r\n // whether Lit thinks the update is necessary.\r\n const expandedDatePickerChanged = (elmt?: Element) => {\r\n if (elmt && elmt instanceof ExpandedDatePicker) {\r\n const expandedDatePicker = elmt as ExpandedDatePicker;\r\n expandedDatePicker.minSelectedDate = this.minSelectedDate;\r\n expandedDatePicker.maxSelectedDate = this.maxSelectedDate;\r\n }\r\n };\r\n\r\n const customModalContent = html`\r\n <expanded-date-picker\r\n ${ref(expandedDatePickerChanged)}\r\n .minDate=${minDate}\r\n .maxDate=${maxDate}\r\n .minSelectedDate=${this.minSelectedDate}\r\n .maxSelectedDate=${this.maxSelectedDate}\r\n .customDateFormat=${dateFormat}\r\n .customTooltipDateFormat=${tooltipDateFormat}\r\n .customTooltipLabel=${tooltipLabel}\r\n .binSnapping=${binSnapping}\r\n .barScaling=${barScaling}\r\n .buckets=${buckets}\r\n .modalManager=${this.modalManager}\r\n .analyticsHandler=${this.analyticsHandler}\r\n @histogramDateRangeApplied=${this.histogramDateRangeUpdated}\r\n @modalClosed=${this.handleExpandedDatePickerClosed}\r\n ></expanded-date-picker>\r\n `;\r\n\r\n const config = new ModalConfig({\r\n bodyColor: '#fff',\r\n headerColor: '#194880',\r\n showHeaderLogo: false,\r\n closeOnBackdropClick: true, // TODO: want to fire analytics\r\n title: html`${msg('Select a date range')}`,\r\n });\r\n\r\n this.modalManager?.classList.add('expanded-date-picker');\r\n this.modalManager?.showModal({\r\n config,\r\n customModalContent,\r\n userClosedModalCallback: this.handleExpandedDatePickerClosed,\r\n });\r\n\r\n this.analyticsHandler?.sendEvent({\r\n category: analyticsCategories.default,\r\n action: analyticsActions.histogramExpanded,\r\n label: window.location.href,\r\n });\r\n }\r\n\r\n private handleExpandedDatePickerClosed = (): void => {\r\n this.modalManager?.classList.remove('expanded-date-picker');\r\n };\r\n\r\n updated(changed: PropertyValues) {\r\n if (changed.has('selectedFacets')) {\r\n this.dispatchFacetsChangedEvent();\r\n }\r\n }\r\n\r\n // TODO: want to fire analytics?\r\n private dispatchFacetsChangedEvent() {\r\n const event = new CustomEvent<SelectedFacets>('facetsChanged', {\r\n detail: this.selectedFacets,\r\n });\r\n this.dispatchEvent(event);\r\n }\r\n\r\n /**\r\n * Template for the \"Expand\" button to show the date picker modal, or\r\n * `nothing` if that button should currently not be shown.\r\n */\r\n private get expandDatePickerBtnTemplate(): TemplateResult | typeof nothing {\r\n return this.allowExpandingDatePicker && !this.facetsLoading\r\n ? html`<button\r\n class=\"expand-date-picker-btn\"\r\n aria-haspopup=\"dialog\"\r\n @click=${this.showDatePickerModal}\r\n >\r\n ${expandIcon}\r\n </button>`\r\n : nothing;\r\n }\r\n\r\n private get histogramTemplate(): TemplateResult | typeof nothing {\r\n if (this.histogramAggregationLoading) {\r\n return html` <div class=\"histogram-loading-indicator\">…</div> `;\r\n }\r\n\r\n const { histogramProps } = this;\r\n if (!histogramProps) return nothing;\r\n\r\n const {\r\n buckets,\r\n dateFormat,\r\n tooltipDateFormat,\r\n tooltipLabel,\r\n binSnapping,\r\n barScaling,\r\n minDate,\r\n maxDate,\r\n } = histogramProps;\r\n\r\n return html`\r\n <histogram-date-range\r\n class=${this.isTvSearch ? 'wide-inputs' : ''}\r\n .minDate=${minDate}\r\n .maxDate=${maxDate}\r\n .minSelectedDate=${this.minSelectedDate ?? minDate}\r\n .maxSelectedDate=${this.maxSelectedDate ?? maxDate}\r\n .updateDelay=${100}\r\n .dateFormat=${dateFormat}\r\n .tooltipDateFormat=${tooltipDateFormat}\r\n .tooltipLabel=${tooltipLabel}\r\n .binSnapping=${binSnapping}\r\n .barScaling=${barScaling}\r\n .bins=${buckets}\r\n missingDataMessage=\"...\"\r\n .width=${this.collapsableFacets && this.contentWidth\r\n ? this.contentWidth\r\n : 180}\r\n @histogramDateRangeUpdated=${this.histogramDateRangeUpdated}\r\n ></histogram-date-range>\r\n `;\r\n }\r\n\r\n /**\r\n * Dispatches a `histogramDateRangeUpdated` event with the date range copied from the\r\n * input event.\r\n *\r\n * Arrow function to ensure `this` is always bound to the current component.\r\n */\r\n private histogramDateRangeUpdated = (\r\n e: CustomEvent<{\r\n minDate: string;\r\n maxDate: string;\r\n }>,\r\n ): void => {\r\n const { minDate, maxDate } = e.detail;\r\n const event = new CustomEvent('histogramDateRangeUpdated', {\r\n detail: { minDate, maxDate },\r\n });\r\n this.dispatchEvent(event);\r\n };\r\n\r\n /**\r\n * Combines the selected facets with the aggregations to create a single list of facets\r\n */\r\n private get mergedFacets(): FacetGroup[] {\r\n const facetGroups: FacetGroup[] = [];\r\n\r\n this.facetDisplayOrder.forEach(facetKey => {\r\n if (facetKey === 'mediatype' && this.suppressMediatypeFacets) return;\r\n\r\n const selectedFacetGroup = this.selectedFacetGroups.find(\r\n group => group.key === facetKey,\r\n );\r\n const aggregateFacetGroup = this.aggregationFacetGroups.find(\r\n group => group.key === facetKey,\r\n );\r\n\r\n // if the user selected a facet, but it's not in the aggregation, we add it as-is\r\n if (selectedFacetGroup && !aggregateFacetGroup) {\r\n facetGroups.push(selectedFacetGroup);\r\n return;\r\n }\r\n\r\n // if we don't have an aggregate facet group, don't add this to the list\r\n if (!aggregateFacetGroup) return;\r\n\r\n // start with either the selected group if we have one, or the aggregate group\r\n const facetGroup = selectedFacetGroup ?? aggregateFacetGroup;\r\n\r\n // attach the counts to the selected buckets\r\n let bucketsWithCount =\r\n selectedFacetGroup?.buckets.map(bucket => {\r\n const selectedBucket = aggregateFacetGroup.buckets.find(\r\n b => b.key === bucket.key,\r\n );\r\n return selectedBucket\r\n ? {\r\n ...bucket,\r\n count: selectedBucket.count,\r\n }\r\n : bucket;\r\n }) ?? [];\r\n\r\n // append any additional buckets that were not selected\r\n aggregateFacetGroup.buckets.forEach(bucket => {\r\n const existingBucket = bucketsWithCount.find(b => b.key === bucket.key);\r\n if (existingBucket) return;\r\n bucketsWithCount.push(bucket);\r\n });\r\n\r\n /**\r\n * render limited facet items on page facet area\r\n *\r\n * - by-default we are showing 6 items\r\n * - additionally want to show all items (selected/suppressed) in page facet area\r\n */\r\n let allowedFacetCount = Object.keys(\r\n (selectedFacetGroup?.buckets as []) || [],\r\n )?.length;\r\n if (allowedFacetCount < this.allowedFacetCount) {\r\n allowedFacetCount = this.allowedFacetCount; // splice start index from 0th\r\n }\r\n\r\n // For lending facets, only include a specific subset of buckets\r\n if (facetKey === 'lending') {\r\n bucketsWithCount = bucketsWithCount.filter(\r\n bucket => lendingFacetKeysVisibility[bucket.key as LendingFacetKey],\r\n );\r\n }\r\n\r\n // Sort the FacetBuckets so that selected and hidden buckets come before the rest\r\n sortBucketsBySelectionState(bucketsWithCount, defaultFacetSort[facetKey]);\r\n\r\n // For mediatype facets, ensure the collection bucket is always shown if present\r\n if (facetKey === 'mediatype') {\r\n const collectionIndex = bucketsWithCount.findIndex(\r\n bucket => bucket.key === 'collection',\r\n );\r\n\r\n if (collectionIndex >= allowedFacetCount) {\r\n const [collectionBucket] = bucketsWithCount.splice(\r\n collectionIndex,\r\n 1,\r\n );\r\n\r\n // If we're showing lots of selected facets, ensure we're not cutting off the last one\r\n if (allowedFacetCount > this.allowedFacetCount) {\r\n allowedFacetCount += 1;\r\n }\r\n\r\n bucketsWithCount.splice(allowedFacetCount - 1, 0, collectionBucket);\r\n }\r\n }\r\n\r\n // For TV creator facets, uppercase the display text\r\n if (facetKey === 'creator' && this.isTvSearch) {\r\n bucketsWithCount.forEach(b => {\r\n b.displayText = (b.displayText ?? b.key)?.toLocaleUpperCase();\r\n\r\n const channelLabel = this.tvChannelAliases?.get(b.displayText);\r\n if (channelLabel && channelLabel !== b.displayText) {\r\n b.extraNote = `(${channelLabel})`;\r\n }\r\n });\r\n }\r\n\r\n // slice off how many items we want to show in page facet area\r\n facetGroup.buckets = bucketsWithCount.slice(0, allowedFacetCount);\r\n\r\n facetGroups.push(facetGroup);\r\n });\r\n\r\n return facetGroups;\r\n }\r\n\r\n /**\r\n * Converts the selected facets to a `FacetGroup` array,\r\n * which is easier to work with\r\n */\r\n private get selectedFacetGroups(): FacetGroup[] {\r\n if (!this.selectedFacets) return [];\r\n\r\n const facetGroups: FacetGroup[] = Object.entries(this.selectedFacets).map(\r\n ([key, selectedFacets]) => {\r\n const option = key as FacetOption;\r\n const title = facetTitles[option];\r\n\r\n const buckets: FacetBucket[] = Object.entries(selectedFacets).map(\r\n ([value, facetData]) => {\r\n let displayText: string = value;\r\n // for lending facets, convert the key to a readable format\r\n if (option === 'lending') {\r\n displayText =\r\n lendingFacetDisplayNames[value as LendingFacetKey] ?? value;\r\n }\r\n return {\r\n displayText,\r\n key: value,\r\n count: facetData.count,\r\n state: facetData.state,\r\n };\r\n },\r\n );\r\n\r\n return {\r\n title,\r\n key: option,\r\n buckets,\r\n };\r\n },\r\n );\r\n\r\n return facetGroups;\r\n }\r\n\r\n /**\r\n * Converts the raw `aggregations` to `FacetGroups`, which are easier to use\r\n */\r\n private get aggregationFacetGroups(): FacetGroup[] {\r\n const facetGroups: FacetGroup[] = [];\r\n Object.entries(this.aggregations ?? []).forEach(([key, aggregation]) => {\r\n // the year_histogram and date_histogram data is in a different format so can't be handled here\r\n if (['year_histogram', 'date_histogram'].includes(key)) return;\r\n\r\n const option = key as FacetOption;\r\n const title = facetTitles[option];\r\n if (!title) return;\r\n\r\n let castedBuckets = aggregation.getSortedBuckets(\r\n defaultFacetSort[option],\r\n ) as Bucket[];\r\n\r\n if (option === 'collection') {\r\n // we are not showing fav- collections or certain deemphasized collections in facets\r\n castedBuckets = castedBuckets?.filter(bucket => {\r\n const bucketKey = bucket?.key?.toString();\r\n return (\r\n !suppressedCollections[bucketKey] && !bucketKey?.startsWith('fav-')\r\n );\r\n });\r\n }\r\n\r\n const facetBuckets: FacetBucket[] = castedBuckets.map(bucket => {\r\n const bucketKey = bucket.key;\r\n let displayText = `${bucket.key}`;\r\n // for lending facets, convert the bucket key to a readable format\r\n if (option === 'lending') {\r\n displayText =\r\n lendingFacetDisplayNames[bucket.key as LendingFacetKey] ??\r\n `${bucket.key}`;\r\n }\r\n return {\r\n displayText,\r\n key: `${bucketKey}`,\r\n count: bucket.doc_count,\r\n state: 'none',\r\n };\r\n });\r\n const group: FacetGroup = {\r\n title,\r\n key: option,\r\n buckets: facetBuckets,\r\n };\r\n facetGroups.push(group);\r\n });\r\n return facetGroups;\r\n }\r\n\r\n /**\r\n * Generate the template for a facet group with a header and the collapsible\r\n * chevron for the mobile view\r\n */\r\n private getFacetGroupTemplate(\r\n facetGroup: FacetGroup,\r\n ): TemplateResult | typeof nothing {\r\n if (!this.facetsLoading && facetGroup.buckets.length === 0) return nothing;\r\n\r\n const { key } = facetGroup;\r\n const isOpen = this.openFacets[key];\r\n const collapser = html`\r\n <span class=\"collapser ${isOpen ? 'open' : ''}\"> ${chevronIcon} </span>\r\n `;\r\n\r\n const toggleCollapsed = () => {\r\n const newOpenFacets = { ...this.openFacets };\r\n newOpenFacets[key] = !isOpen;\r\n this.openFacets = newOpenFacets;\r\n };\r\n\r\n // Added data-testid for Playwright testing\r\n // Using className and aria-labels is not ideal for Playwright locator\r\n const headerId = `facet-group-header-label-${facetGroup.key}`;\r\n return html`\r\n <section\r\n class=\"facet-group ${this.collapsableFacets ? 'mobile' : ''}\"\r\n aria-labelledby=${headerId}\r\n data-testid=${headerId}\r\n >\r\n <div class=\"facet-group-header\">\r\n <h3\r\n id=${headerId}\r\n @click=${toggleCollapsed}\r\n @keyup=${toggleCollapsed}\r\n >\r\n ${this.collapsableFacets ? collapser : nothing} ${facetGroup.title}\r\n <span class=\"sr-only\">filters</span>\r\n </h3>\r\n </div>\r\n <div\r\n class=\"facet-group-content ${isOpen ? 'open' : ''}\"\r\n data-testid=\"facet-group-content-${facetGroup.key}\"\r\n >\r\n ${this.facetsLoading\r\n ? this.getTombstoneFacetGroupTemplate()\r\n : html`\r\n ${this.getFacetTemplate(facetGroup)}\r\n ${this.searchMoreFacetsLink(facetGroup)}\r\n `}\r\n </div>\r\n </section>\r\n `;\r\n }\r\n\r\n private getTombstoneFacetGroupTemplate(): TemplateResult {\r\n // Render five tombstone rows\r\n return html`\r\n ${map(\r\n Array(5).fill(null),\r\n () => html`<facet-tombstone-row></facet-tombstone-row>`,\r\n )}\r\n `;\r\n }\r\n\r\n /**\r\n * Generate the More... link button just below the facets group\r\n *\r\n * TODO: want to fire analytics?\r\n */\r\n private searchMoreFacetsLink(\r\n facetGroup: FacetGroup,\r\n ): TemplateResult | typeof nothing {\r\n // Don't render More... links for FTS searches\r\n if (!this.moreLinksVisible) {\r\n return nothing;\r\n }\r\n\r\n // Don't render More... links for lending facets\r\n if (facetGroup.key === 'lending') {\r\n return nothing;\r\n }\r\n\r\n // Don't render More... link if the number of facets < this.allowedFacetCount\r\n if (Object.keys(facetGroup.buckets).length < this.allowedFacetCount) {\r\n return nothing;\r\n }\r\n\r\n // We sort years in numeric order by default, rather than bucket count\r\n const facetSort = defaultFacetSort[facetGroup.key];\r\n\r\n // Added data-testid for Playwright testing\r\n // Using the className is not ideal for Playwright locator\r\n return html`<button\r\n class=\"more-link\"\r\n @click=${() => {\r\n this.showMoreFacetsModal(facetGroup, facetSort);\r\n this.analyticsHandler?.sendEvent({\r\n category: analyticsCategories.default,\r\n action: analyticsActions.showMoreFacetsModal,\r\n label: facetGroup.key,\r\n });\r\n this.dispatchEvent(\r\n new CustomEvent('showMoreFacets', { detail: facetGroup.key }),\r\n );\r\n }}\r\n data-testid=\"more-link-btn\"\r\n >\r\n More...\r\n </button>`;\r\n }\r\n\r\n async showMoreFacetsModal(\r\n facetGroup: FacetGroup,\r\n sortedBy: AggregationSortType,\r\n ): Promise<void> {\r\n const customModalContent = html`\r\n <more-facets-content\r\n .analyticsHandler=${this.analyticsHandler}\r\n .facetKey=${facetGroup.key}\r\n .query=${this.query}\r\n .identifiers=${this.identifiers}\r\n .filterMap=${this.filterMap}\r\n .pageSpecifierParams=${this.pageSpecifierParams}\r\n .modalManager=${this.modalManager}\r\n .searchService=${this.searchService}\r\n .searchType=${this.searchType}\r\n .collectionTitles=${this.collectionTitles}\r\n .tvChannelAliases=${this.tvChannelAliases}\r\n .selectedFacets=${this.selectedFacets}\r\n .sortedBy=${sortedBy}\r\n .isTvSearch=${this.isTvSearch}\r\n @facetsChanged=${(e: CustomEvent) => {\r\n const event = new CustomEvent<SelectedFacets>('facetsChanged', {\r\n detail: e.detail,\r\n bubbles: true,\r\n composed: true,\r\n });\r\n this.dispatchEvent(event);\r\n }}\r\n >\r\n </more-facets-content>\r\n `;\r\n\r\n const config = new ModalConfig({\r\n bodyColor: '#fff',\r\n headerColor: '#194880',\r\n showHeaderLogo: false,\r\n closeOnBackdropClick: true, // TODO: want to fire analytics\r\n title: html`Select filters`,\r\n });\r\n this.modalManager?.classList.add('more-search-facets');\r\n this.modalManager?.showModal({\r\n config,\r\n customModalContent,\r\n userClosedModalCallback: () => {\r\n this.modalManager?.classList.remove('more-search-facets');\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Generate the list template for each bucket in a facet group\r\n */\r\n private getFacetTemplate(facetGroup: FacetGroup): TemplateResult {\r\n return html`\r\n <facets-template\r\n .collectionPagePath=${this.collectionPagePath}\r\n .facetGroup=${facetGroup}\r\n .selectedFacets=${this.selectedFacets}\r\n .collectionTitles=${this.collectionTitles}\r\n @facetClick=${(e: CustomEvent<FacetEventDetails>) => {\r\n this.selectedFacets = updateSelectedFacetBucket(\r\n this.selectedFacets,\r\n facetGroup.key,\r\n e.detail.bucket,\r\n true,\r\n );\r\n\r\n const event = new CustomEvent<SelectedFacets>('facetsChanged', {\r\n detail: this.selectedFacets,\r\n bubbles: true,\r\n composed: true,\r\n });\r\n this.dispatchEvent(event);\r\n }}\r\n ></facets-template>\r\n `;\r\n }\r\n\r\n static get styles() {\r\n return [\r\n srOnlyStyle,\r\n css`\r\n a:link {\r\n text-decoration: none;\r\n color: var(--ia-theme-link-color, #4b64ff);\r\n }\r\n a:link:hover {\r\n text-decoration: underline;\r\n }\r\n\r\n #container.loading {\r\n opacity: 0.5;\r\n }\r\n\r\n #container.managing {\r\n opacity: 0.3;\r\n }\r\n\r\n .histogram-loading-indicator {\r\n width: 100%;\r\n height: 2.25rem;\r\n margin-top: 1.75rem;\r\n font-size: 1.4rem;\r\n text-align: center;\r\n }\r\n\r\n .collapser {\r\n display: inline-block;\r\n cursor: pointer;\r\n width: 10px;\r\n height: 10px;\r\n }\r\n\r\n .collapser svg {\r\n transition: transform 0.2s ease-in-out;\r\n }\r\n\r\n .collapser.open svg {\r\n transform: rotate(90deg);\r\n }\r\n\r\n .facet-group:not(:last-child) {\r\n margin-bottom: 2rem;\r\n }\r\n\r\n .facet-group h3 {\r\n margin-bottom: 0.7rem;\r\n }\r\n\r\n .facet-group.mobile h3 {\r\n cursor: pointer;\r\n }\r\n\r\n .facet-group-header {\r\n display: flex;\r\n margin-bottom: 0.7rem;\r\n justify-content: space-between;\r\n border-bottom: 1px solid rgb(232, 232, 232);\r\n }\r\n\r\n .facet-group-content {\r\n transition: max-height 0.2s ease-in-out;\r\n }\r\n\r\n .facet-group.mobile .facet-group-content {\r\n max-height: 0;\r\n overflow: hidden;\r\n }\r\n\r\n .facet-group.mobile .facet-group-content.open {\r\n max-height: 2000px;\r\n }\r\n\r\n .partof-collections ul {\r\n list-style-type: none;\r\n padding: 0;\r\n font-size: 1.2rem;\r\n }\r\n\r\n h3 {\r\n font-size: 1.4rem;\r\n margin: 0;\r\n }\r\n\r\n .more-link {\r\n font-size: 1.2rem;\r\n text-decoration: none;\r\n padding: 0;\r\n margin-top: 0.25rem;\r\n background: inherit;\r\n border: 0;\r\n color: var(--ia-theme-link-color, #4b64ff);\r\n cursor: pointer;\r\n }\r\n\r\n #date-picker-label {\r\n display: flex;\r\n justify-content: space-between;\r\n }\r\n\r\n .expand-date-picker-btn {\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n appearance: none;\r\n background: none;\r\n cursor: pointer;\r\n }\r\n\r\n .expand-date-picker-btn > svg {\r\n width: 14px;\r\n height: 14px;\r\n }\r\n\r\n .sorting-icon {\r\n height: 15px;\r\n cursor: pointer;\r\n }\r\n\r\n histogram-date-range.wide-inputs {\r\n --histogramDateRangeInputWidth: 4.8rem;\r\n }\r\n `,\r\n ];\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import type { FilterMap, Aggregation, CollectionExtraInfo, AccountExtraInfo, PageElementMap, SearchResponseSessionContext } from '@internetarchive/search-service';
|
|
2
|
+
import type { ReactiveController } from 'lit';
|
|
3
|
+
import type { PrefixFilterType, PrefixFilterCounts, TileModel } from '../models';
|
|
4
|
+
import type { PageSpecifierParams, CollectionTitles, TVChannelAliases } from './models';
|
|
5
|
+
export interface CollectionBrowserDataSourceInterface extends ReactiveController {
|
|
6
|
+
/**
|
|
7
|
+
* How many tile models are present in this data source
|
|
8
|
+
*/
|
|
9
|
+
readonly size: number;
|
|
10
|
+
/**
|
|
11
|
+
* How many results there are in the full result set for the current query
|
|
12
|
+
* (not necessarily all loaded yet).
|
|
13
|
+
*/
|
|
14
|
+
readonly totalResults: number;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the host has a valid set of properties for performing a search.
|
|
17
|
+
* For instance, on the search page this requires a valid search service and a
|
|
18
|
+
* non-empty query, while collection pages allow searching with an empty query
|
|
19
|
+
* for MDS but not FTS.
|
|
20
|
+
*/
|
|
21
|
+
readonly canPerformSearch: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the end of the set of results for the current query state has been
|
|
24
|
+
* encountered (i.e., the last page of results).
|
|
25
|
+
*/
|
|
26
|
+
readonly endOfDataReached: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* True if the initial work for a new query state has been completed (i.e., firing initial
|
|
29
|
+
* page/facet requests). False otherwise.
|
|
30
|
+
*/
|
|
31
|
+
readonly queryInitialized: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A string key compactly representing the current full search state, which can
|
|
34
|
+
* be used to determine, e.g., when a new search is required or whether an arriving
|
|
35
|
+
* response is outdated.
|
|
36
|
+
*/
|
|
37
|
+
readonly pageFetchQueryKey: string;
|
|
38
|
+
/**
|
|
39
|
+
* Similar to `pageFetchQueryKey`, but excluding properties that do not affect
|
|
40
|
+
* the validity of a set of facets (e.g., sort).
|
|
41
|
+
*/
|
|
42
|
+
readonly facetFetchQueryKey: string;
|
|
43
|
+
/**
|
|
44
|
+
* An object representing any collection- or profile-specific properties to be passed along
|
|
45
|
+
* to the search service, specifying the exact page/tab to fetch results for.
|
|
46
|
+
*/
|
|
47
|
+
readonly pageSpecifierParams: PageSpecifierParams | null;
|
|
48
|
+
/**
|
|
49
|
+
* A FilterMap object representing all filters applied to the current search,
|
|
50
|
+
* including any facets, letter filters, and date ranges.
|
|
51
|
+
*/
|
|
52
|
+
readonly filterMap: FilterMap;
|
|
53
|
+
/**
|
|
54
|
+
* The full set of aggregations retrieved for the current search.
|
|
55
|
+
*/
|
|
56
|
+
readonly aggregations?: Record<string, Aggregation>;
|
|
57
|
+
/**
|
|
58
|
+
* The `year_histogram` or `date_histogram` aggregation retrieved for the current search.
|
|
59
|
+
*/
|
|
60
|
+
readonly histogramAggregation?: Aggregation;
|
|
61
|
+
/**
|
|
62
|
+
* A map from collection identifiers that appear on hits or aggregations for the
|
|
63
|
+
* current search, to their human-readable collection titles.
|
|
64
|
+
*/
|
|
65
|
+
readonly collectionTitles: CollectionTitles;
|
|
66
|
+
/**
|
|
67
|
+
* A map from TV channel names appearing in `creator` aggregations, to their
|
|
68
|
+
* more human-readable network names.
|
|
69
|
+
*/
|
|
70
|
+
readonly tvChannelAliases: TVChannelAliases;
|
|
71
|
+
/**
|
|
72
|
+
* The "extra info" package provided by the PPS for collection pages, including details
|
|
73
|
+
* used to populate the target collection header & About tab content.
|
|
74
|
+
*/
|
|
75
|
+
readonly collectionExtraInfo?: CollectionExtraInfo;
|
|
76
|
+
/**
|
|
77
|
+
* The "extra info" package provided by the PPS for profile pages, including details
|
|
78
|
+
* used to populate the profile header.
|
|
79
|
+
*/
|
|
80
|
+
readonly accountExtraInfo?: AccountExtraInfo;
|
|
81
|
+
/**
|
|
82
|
+
* Context about the user session that produced the search response, from the PPS.
|
|
83
|
+
*/
|
|
84
|
+
readonly sessionContext?: SearchResponseSessionContext;
|
|
85
|
+
/**
|
|
86
|
+
* The set of requested page elements for profile pages, if applicable. These represent
|
|
87
|
+
* any content specific to the current profile tab.
|
|
88
|
+
*/
|
|
89
|
+
readonly pageElements?: PageElementMap;
|
|
90
|
+
/**
|
|
91
|
+
* An array of the current target collection's parent collections. Should include *all*
|
|
92
|
+
* ancestors in the collection hierarchy, not just the immediate parent.
|
|
93
|
+
*/
|
|
94
|
+
readonly parentCollections?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* An object storing result counts for the current search bucketed by letter prefix.
|
|
97
|
+
* Keys are the result field on which the prefixes are considered (e.g., title/creator)
|
|
98
|
+
* and values are a Record mapping letters to their counts.
|
|
99
|
+
*/
|
|
100
|
+
readonly prefixFilterCountMap: Partial<Record<PrefixFilterType, PrefixFilterCounts>>;
|
|
101
|
+
/**
|
|
102
|
+
* Any error message from the most recent search results response.
|
|
103
|
+
*/
|
|
104
|
+
readonly queryErrorMessage?: string;
|
|
105
|
+
/**
|
|
106
|
+
* An array of all the tile models whose management checkboxes are checked
|
|
107
|
+
*/
|
|
108
|
+
readonly checkedTileModels: TileModel[];
|
|
109
|
+
/**
|
|
110
|
+
* An array of all the tile models whose management checkboxes are unchecked
|
|
111
|
+
*/
|
|
112
|
+
readonly uncheckedTileModels: TileModel[];
|
|
113
|
+
/**
|
|
114
|
+
* A Promise which, after each query change, resolves once the fetches for the initial
|
|
115
|
+
* search have completed. Waits for *both* the hits and aggregations fetches to finish.
|
|
116
|
+
*
|
|
117
|
+
* Ensure you await this component's `updateComplete` promise before awaiting this
|
|
118
|
+
* one, to ensure you do not await an obsolete promise from the previous update.
|
|
119
|
+
*/
|
|
120
|
+
readonly initialSearchComplete: Promise<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Resets the data source to its empty state, with no result pages, aggregations, etc.
|
|
123
|
+
*/
|
|
124
|
+
reset(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Resets the data source's result pages, keeping other state intact.
|
|
127
|
+
*/
|
|
128
|
+
resetPages(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Adds the given page of tile models to the data source.
|
|
131
|
+
* If the given page number already exists, that page will be overwritten.
|
|
132
|
+
* This method expects that the provided tiles already fit the configured page size; it
|
|
133
|
+
* will not split them into multiple pages.
|
|
134
|
+
* @param pageNum Which page number to add (indexed starting from 1)
|
|
135
|
+
* @param pageTiles The array of tile models for the new page
|
|
136
|
+
*/
|
|
137
|
+
addPage(pageNum: number, pageTiles: TileModel[]): void;
|
|
138
|
+
/**
|
|
139
|
+
* Adds all of the given pages of tile models to the data source, splitting them into
|
|
140
|
+
* multiple pages according to the configured page size if necessary. Any pages that
|
|
141
|
+
* have tiles added by this method will have any existing content overwritten.
|
|
142
|
+
* @param firstPageNum Which page number to start adding pages from (pages are indexed starting from 1)
|
|
143
|
+
* @param tiles The full array of tile models to add across one or more pages
|
|
144
|
+
*/
|
|
145
|
+
addMultiplePages(firstPageNum: number, tiles: TileModel[]): void;
|
|
146
|
+
/**
|
|
147
|
+
* Returns the given page of tile models from the data source.
|
|
148
|
+
* @param pageNum Which page number to get (indexed starting from 1)
|
|
149
|
+
*/
|
|
150
|
+
getPage(pageNum: number): TileModel[];
|
|
151
|
+
/**
|
|
152
|
+
* Returns the full set of paged tile models stored in this data source.
|
|
153
|
+
*/
|
|
154
|
+
getAllPages(): Record<string, TileModel[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the data source contains any tiles for the given page number.
|
|
157
|
+
* @param pageNum Which page number to query (indexed starting from 1)
|
|
158
|
+
*/
|
|
159
|
+
hasPage(pageNum: number): boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Returns the single tile model appearing at the given index in the
|
|
162
|
+
* data source, with respect to the current page size. Returns `undefined` if
|
|
163
|
+
* the corresponding page is not present on the data source or if it does not
|
|
164
|
+
* contain a tile model at the corresponding index.
|
|
165
|
+
* @param index The 0-based index (within the full data source) of the tile to get
|
|
166
|
+
*/
|
|
167
|
+
getTileModelAt(index: number): TileModel | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Returns the first numeric tile index corresponding to the given tile model object,
|
|
170
|
+
* or -1 if the given tile model is not present.
|
|
171
|
+
* @param tile The tile model to search for in the data source
|
|
172
|
+
*/
|
|
173
|
+
indexOf(tile: TileModel): number;
|
|
174
|
+
/**
|
|
175
|
+
* Requests that the data source fire a backend request for the given page of results.
|
|
176
|
+
* @param pageNum Which page number to fetch results for
|
|
177
|
+
* @param numInitialPages How many pages should be batched together on an initial fetch
|
|
178
|
+
*/
|
|
179
|
+
fetchPage(pageNum: number, numInitialPages?: number): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Requests that the data source update its prefix bucket result counts for the given
|
|
182
|
+
* type of prefix filter.
|
|
183
|
+
* @param filterType Which prefixable field to update the buckets for (e.g., title/creator)
|
|
184
|
+
*/
|
|
185
|
+
updatePrefixFilterCounts(filterType: PrefixFilterType): Promise<void>;
|
|
186
|
+
/**
|
|
187
|
+
* Fetches and caches the prefix filter counts for the current sort type,
|
|
188
|
+
* provided it is one that permits prefix filtering. (If not, this does nothing).
|
|
189
|
+
*/
|
|
190
|
+
updatePrefixFiltersForCurrentSort(): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Clears the cached letter counts for both title and creator, and
|
|
193
|
+
* fetches a new set of counts for whichever of them is the currently
|
|
194
|
+
* selected sort option (which may be neither).
|
|
195
|
+
*
|
|
196
|
+
* Call this whenever the counts are invalidated (e.g., by a query change).
|
|
197
|
+
*/
|
|
198
|
+
refreshLetterCounts(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Returns the current page size of the data source.
|
|
201
|
+
*/
|
|
202
|
+
getPageSize(): number;
|
|
203
|
+
/**
|
|
204
|
+
* Changes the page size used by the data source, discarding any previously-fetched pages.
|
|
205
|
+
*
|
|
206
|
+
* **Note: this operation will reset any data stored in the data source!**
|
|
207
|
+
* @param pageSize
|
|
208
|
+
*/
|
|
209
|
+
setPageSize(pageSize: number): void;
|
|
210
|
+
/**
|
|
211
|
+
* Sets the total number of pages that should be batched together on each initial fetch.
|
|
212
|
+
* @param pages How many initial pages to batch
|
|
213
|
+
*/
|
|
214
|
+
setNumInitialPages(numPages: number): void;
|
|
215
|
+
/**
|
|
216
|
+
* Sets the total result count for this data source to the given value.
|
|
217
|
+
* @param count The number of total results to set
|
|
218
|
+
*/
|
|
219
|
+
setTotalResultCount(count: number): void;
|
|
220
|
+
/**
|
|
221
|
+
* Sets whether this data source should suppress further data fetches, i.e. ignore any
|
|
222
|
+
* future query changes on its host that would trigger a page/facet fetch.
|
|
223
|
+
* @param suppressed Whether further fetches for this data source should be suppressed
|
|
224
|
+
*/
|
|
225
|
+
setFetchesSuppressed(suppressed: boolean): void;
|
|
226
|
+
/**
|
|
227
|
+
* Sets whether the end of the current data has been reached, indicating whether further
|
|
228
|
+
* pages should be looked up.
|
|
229
|
+
* @param reached Whether we are at the end of the data for the current query state
|
|
230
|
+
*/
|
|
231
|
+
setEndOfDataReached(reached: boolean): void;
|
|
232
|
+
/**
|
|
233
|
+
* Notifies the data source that a query change has occurred, which may trigger a data
|
|
234
|
+
* reset & new fetches.
|
|
235
|
+
*/
|
|
236
|
+
handleQueryChange(): Promise<void>;
|
|
237
|
+
/**
|
|
238
|
+
* Notifies the data source that the readiness state of the facets has been changed, which
|
|
239
|
+
* may trigger facet fetches if they were previously delayed.
|
|
240
|
+
*/
|
|
241
|
+
handleFacetReadinessChange(ready: boolean): Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* Applies the given map function to all of the tile models in every page of the data
|
|
244
|
+
* source.
|
|
245
|
+
* @param callback A callback function to apply on each tile model, as with Array.map
|
|
246
|
+
*/
|
|
247
|
+
map(callback: (model: TileModel, index: number, array: TileModel[]) => TileModel): void;
|
|
248
|
+
/**
|
|
249
|
+
* Checks every tile's management checkbox
|
|
250
|
+
*/
|
|
251
|
+
checkAllTiles(): void;
|
|
252
|
+
/**
|
|
253
|
+
* Unchecks every tile's management checkbox
|
|
254
|
+
*/
|
|
255
|
+
uncheckAllTiles(): void;
|
|
256
|
+
/**
|
|
257
|
+
* Removes all tile models that are currently checked & adjusts the paging
|
|
258
|
+
* of the data source to account for any new gaps in the data.
|
|
259
|
+
*/
|
|
260
|
+
removeCheckedTiles(): void;
|
|
261
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-browser-data-source-interface.js","sourceRoot":"","sources":["../../../src/data-source/collection-browser-data-source-interface.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FilterMap,\n Aggregation,\n CollectionExtraInfo,\n AccountExtraInfo,\n PageElementMap,\n SearchResponseSessionContext,\n} from '@internetarchive/search-service';\nimport type { ReactiveController } from 'lit';\nimport type {\n PrefixFilterType,\n PrefixFilterCounts,\n TileModel,\n} from '../models';\nimport type {\n PageSpecifierParams,\n CollectionTitles,\n TVChannelAliases,\n} from './models';\n\nexport interface CollectionBrowserDataSourceInterface\n extends ReactiveController {\n /**\n * How many tile models are present in this data source\n */\n readonly size: number;\n\n /**\n * How many results there are in the full result set for the current query\n * (not necessarily all loaded yet).\n */\n readonly totalResults: number;\n\n /**\n * Whether the host has a valid set of properties for performing a search.\n * For instance, on the search page this requires a valid search service and a\n * non-empty query, while collection pages allow searching with an empty query\n * for MDS but not FTS.\n */\n readonly canPerformSearch: boolean;\n\n /**\n * Whether the end of the set of results for the current query state has been\n * encountered (i.e., the last page of results).\n */\n readonly endOfDataReached: boolean;\n\n /**\n * True if the initial work for a new query state has been completed (i.e., firing initial\n * page/facet requests). False otherwise.\n */\n readonly queryInitialized: boolean;\n\n /**\n * A string key compactly representing the current full search state, which can\n * be used to determine, e.g., when a new search is required or whether an arriving\n * response is outdated.\n */\n readonly pageFetchQueryKey: string;\n\n /**\n * Similar to `pageFetchQueryKey`, but excluding properties that do not affect\n * the validity of a set of facets (e.g., sort).\n */\n readonly facetFetchQueryKey: string;\n\n /**\n * An object representing any collection- or profile-specific properties to be passed along\n * to the search service, specifying the exact page/tab to fetch results for.\n */\n readonly pageSpecifierParams: PageSpecifierParams | null;\n\n /**\n * A FilterMap object representing all filters applied to the current search,\n * including any facets, letter filters, and date ranges.\n */\n readonly filterMap: FilterMap;\n\n /**\n * The full set of aggregations retrieved for the current search.\n */\n readonly aggregations?: Record<string, Aggregation>;\n\n /**\n * The `year_histogram` or `date_histogram` aggregation retrieved for the current search.\n */\n readonly histogramAggregation?: Aggregation;\n\n /**\n * A map from collection identifiers that appear on hits or aggregations for the\n * current search, to their human-readable collection titles.\n */\n readonly collectionTitles: CollectionTitles;\n\n /**\n * A map from TV channel names appearing in `creator` aggregations, to their\n * more human-readable network names.\n */\n readonly tvChannelAliases: TVChannelAliases;\n\n /**\n * The \"extra info\" package provided by the PPS for collection pages, including details\n * used to populate the target collection header & About tab content.\n */\n readonly collectionExtraInfo?: CollectionExtraInfo;\n\n /**\n * The \"extra info\" package provided by the PPS for profile pages, including details\n * used to populate the profile header.\n */\n readonly accountExtraInfo?: AccountExtraInfo;\n\n /**\n * Context about the user session that produced the search response, from the PPS.\n */\n readonly sessionContext?: SearchResponseSessionContext;\n\n /**\n * The set of requested page elements for profile pages, if applicable. These represent\n * any content specific to the current profile tab.\n */\n readonly pageElements?: PageElementMap;\n\n /**\n * An array of the current target collection's parent collections. Should include *all*\n * ancestors in the collection hierarchy, not just the immediate parent.\n */\n readonly parentCollections?: string[];\n\n /**\n * An object storing result counts for the current search bucketed by letter prefix.\n * Keys are the result field on which the prefixes are considered (e.g., title/creator)\n * and values are a Record mapping letters to their counts.\n */\n readonly prefixFilterCountMap: Partial<\n Record<PrefixFilterType, PrefixFilterCounts>\n >;\n\n /**\n * Any error message from the most recent search results response.\n */\n readonly queryErrorMessage?: string;\n\n /**\n * An array of all the tile models whose management checkboxes are checked\n */\n readonly checkedTileModels: TileModel[];\n\n /**\n * An array of all the tile models whose management checkboxes are unchecked\n */\n readonly uncheckedTileModels: TileModel[];\n\n /**\n * A Promise which, after each query change, resolves once the fetches for the initial\n * search have completed. Waits for *both* the hits and aggregations fetches to finish.\n *\n * Ensure you await this component's `updateComplete` promise before awaiting this\n * one, to ensure you do not await an obsolete promise from the previous update.\n */\n readonly initialSearchComplete: Promise<boolean>;\n\n /**\n * Resets the data source to its empty state, with no result pages, aggregations, etc.\n */\n reset(): void;\n\n /**\n * Resets the data source's result pages, keeping other state intact.\n */\n resetPages(): void;\n\n /**\n * Adds the given page of tile models to the data source.\n * If the given page number already exists, that page will be overwritten.\n * This method expects that the provided tiles already fit the configured page size; it\n * will not split them into multiple pages.\n * @param pageNum Which page number to add (indexed starting from 1)\n * @param pageTiles The array of tile models for the new page\n */\n addPage(pageNum: number, pageTiles: TileModel[]): void;\n\n /**\n * Adds all of the given pages of tile models to the data source, splitting them into\n * multiple pages according to the configured page size if necessary. Any pages that\n * have tiles added by this method will have any existing content overwritten.\n * @param firstPageNum Which page number to start adding pages from (pages are indexed starting from 1)\n * @param tiles The full array of tile models to add across one or more pages\n */\n addMultiplePages(firstPageNum: number, tiles: TileModel[]): void;\n\n /**\n * Returns the given page of tile models from the data source.\n * @param pageNum Which page number to get (indexed starting from 1)\n */\n getPage(pageNum: number): TileModel[];\n\n /**\n * Returns the full set of paged tile models stored in this data source.\n */\n getAllPages(): Record<string, TileModel[]>;\n\n /**\n * Whether the data source contains any tiles for the given page number.\n * @param pageNum Which page number to query (indexed starting from 1)\n */\n hasPage(pageNum: number): boolean;\n\n /**\n * Returns the single tile model appearing at the given index in the\n * data source, with respect to the current page size. Returns `undefined` if\n * the corresponding page is not present on the data source or if it does not\n * contain a tile model at the corresponding index.\n * @param index The 0-based index (within the full data source) of the tile to get\n */\n getTileModelAt(index: number): TileModel | undefined;\n\n /**\n * Returns the first numeric tile index corresponding to the given tile model object,\n * or -1 if the given tile model is not present.\n * @param tile The tile model to search for in the data source\n */\n indexOf(tile: TileModel): number;\n\n /**\n * Requests that the data source fire a backend request for the given page of results.\n * @param pageNum Which page number to fetch results for\n * @param numInitialPages How many pages should be batched together on an initial fetch\n */\n fetchPage(pageNum: number, numInitialPages?: number): Promise<void>;\n\n /**\n * Requests that the data source update its prefix bucket result counts for the given\n * type of prefix filter.\n * @param filterType Which prefixable field to update the buckets for (e.g., title/creator)\n */\n updatePrefixFilterCounts(filterType: PrefixFilterType): Promise<void>;\n\n /**\n * Fetches and caches the prefix filter counts for the current sort type,\n * provided it is one that permits prefix filtering. (If not, this does nothing).\n */\n updatePrefixFiltersForCurrentSort(): Promise<void>;\n\n /**\n * Clears the cached letter counts for both title and creator, and\n * fetches a new set of counts for whichever of them is the currently\n * selected sort option (which may be neither).\n *\n * Call this whenever the counts are invalidated (e.g., by a query change).\n */\n refreshLetterCounts(): void;\n\n /**\n * Returns the current page size of the data source.\n */\n getPageSize(): number;\n\n /**\n * Changes the page size used by the data source, discarding any previously-fetched pages.\n *\n * **Note: this operation will reset any data stored in the data source!**\n * @param pageSize\n */\n setPageSize(pageSize: number): void;\n\n /**\n * Sets the total number of pages that should be batched together on each initial fetch.\n * @param pages How many initial pages to batch\n */\n setNumInitialPages(numPages: number): void;\n\n /**\n * Sets the total result count for this data source to the given value.\n * @param count The number of total results to set\n */\n setTotalResultCount(count: number): void;\n\n /**\n * Sets whether this data source should suppress further data fetches, i.e. ignore any\n * future query changes on its host that would trigger a page/facet fetch.\n * @param suppressed Whether further fetches for this data source should be suppressed\n */\n setFetchesSuppressed(suppressed: boolean): void;\n\n /**\n * Sets whether the end of the current data has been reached, indicating whether further\n * pages should be looked up.\n * @param reached Whether we are at the end of the data for the current query state\n */\n setEndOfDataReached(reached: boolean): void;\n\n /**\n * Notifies the data source that a query change has occurred, which may trigger a data\n * reset & new fetches.\n */\n handleQueryChange(): Promise<void>;\n\n /**\n * Notifies the data source that the readiness state of the facets has been changed, which\n * may trigger facet fetches if they were previously delayed.\n */\n handleFacetReadinessChange(ready: boolean): Promise<void>;\n\n /**\n * Applies the given map function to all of the tile models in every page of the data\n * source.\n * @param callback A callback function to apply on each tile model, as with Array.map\n */\n map(\n callback: (\n model: TileModel,\n index: number,\n array: TileModel[],\n ) => TileModel,\n ): void;\n\n /**\n * Checks every tile's management checkbox\n */\n checkAllTiles(): void;\n\n /**\n * Unchecks every tile's management checkbox\n */\n uncheckAllTiles(): void;\n\n /**\n * Removes all tile models that are currently checked & adjusts the paging\n * of the data source to account for any new gaps in the data.\n */\n removeCheckedTiles(): void;\n}\n"]}
|